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:
authorSergej Reich <sergej.reich@googlemail.com>2013-09-06 12:35:00 +0400
committerSergej Reich <sergej.reich@googlemail.com>2013-09-06 12:35:00 +0400
commit36e6bddb5c155b4ae27a9cd17b4af26bbcdc8dae (patch)
tree025a56b2e71adc77d53a4a33ac17a6cf55d360c2
parentdf3974b6d1c6469ca1a0b8a1c505b09385198780 (diff)
parent63ade11564798e68943ad5d8c82d45771df67677 (diff)
svn merge -r59229:59868 ^/trunk/blender
-rw-r--r--CMakeLists.txt32
-rw-r--r--GNUmakefile5
-rwxr-xr-xbuild_files/build_environment/install_deps.sh4
-rw-r--r--build_files/cmake/Modules/FindPythonLibsUnix.cmake1
-rw-r--r--build_files/cmake/macros.cmake43
-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/btools.py4
-rw-r--r--doc/python_api/examples/bpy.types.UIList.1.py (renamed from doc/python_api/examples/bpy.types.UIList.py)5
-rw-r--r--doc/python_api/examples/bpy.types.UIList.2.py160
-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/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/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)48
-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.txt1
-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.py147
-rw-r--r--intern/cycles/blender/blender_camera.cpp22
-rw-r--r--intern/cycles/blender/blender_curves.cpp560
-rw-r--r--intern/cycles/blender/blender_mesh.cpp22
-rw-r--r--intern/cycles/blender/blender_object.cpp30
-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.cpp32
-rw-r--r--intern/cycles/blender/blender_session.h22
-rw-r--r--intern/cycles/blender/blender_shader.cpp42
-rw-r--r--intern/cycles/blender/blender_sync.cpp41
-rw-r--r--intern/cycles/blender/blender_sync.h22
-rw-r--r--intern/cycles/blender/blender_util.h22
-rw-r--r--intern/cycles/bvh/bvh.cpp8
-rw-r--r--intern/cycles/cmake/external_libs.cmake2
-rw-r--r--intern/cycles/device/device.cpp67
-rw-r--r--intern/cycles/device/device.h22
-rw-r--r--intern/cycles/device/device_cpu.cpp89
-rw-r--r--intern/cycles/device/device_cuda.cpp93
-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.cpp58
-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.txt1
-rw-r--r--intern/cycles/kernel/closure/bsdf.h24
-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.h22
-rw-r--r--intern/cycles/kernel/kernel_bvh.h189
-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.h28
-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.h22
-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.h22
-rw-r--r--intern/cycles/kernel/kernel_path.h628
-rw-r--r--intern/cycles/kernel/kernel_primitive.h22
-rw-r--r--intern/cycles/kernel/kernel_random.h33
-rw-r--r--intern/cycles/kernel/kernel_shader.h141
-rw-r--r--intern/cycles/kernel/kernel_sse2.cpp41
-rw-r--r--intern/cycles/kernel/kernel_sse3.cpp41
-rw-r--r--intern/cycles/kernel/kernel_subsurface.h484
-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.h92
-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.cpp8
-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.cpp68
-rw-r--r--intern/cycles/kernel/osl/osl_shader.h22
-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.osl22
-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_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.osl22
-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.osl22
-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.h8
-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.h63
-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.h35
-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.txt3
-rw-r--r--intern/cycles/render/attribute.cpp27
-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.cpp51
-rw-r--r--intern/cycles/render/bssrdf.h22
-rw-r--r--intern/cycles/render/buffers.cpp59
-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.cpp22
-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.cpp234
-rw-r--r--intern/cycles/render/nodes.h31
-rw-r--r--intern/cycles/render/object.cpp25
-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.cpp22
-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.cpp31
-rw-r--r--intern/cycles/render/shader.h23
-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.h22
-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.cpp170
-rw-r--r--intern/cycles/util/util_task.h75
-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.h86
-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.txt4
-rw-r--r--intern/ghost/SConscript7
-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_SystemPathsX11.cpp50
-rw-r--r--intern/ghost/intern/GHOST_SystemSDL.cpp24
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp43
-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/test/CMakeLists.txt62
-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.txt4
-rw-r--r--intern/guardedalloc/MEM_guardedalloc.h6
-rw-r--r--intern/guardedalloc/SConscript2
-rw-r--r--intern/guardedalloc/intern/mallocn.c135
-rw-r--r--intern/guardedalloc/intern/mmap_win.c2
-rw-r--r--intern/guardedalloc/mmap_win.h2
-rw-r--r--intern/guardedalloc/test/simpletest/memtest.c4
-rw-r--r--intern/opencolorio/fallback_impl.cc5
-rw-r--r--intern/opencolorio/ocio_capi.cc5
-rw-r--r--intern/opencolorio/ocio_capi.h1
-rw-r--r--intern/opencolorio/ocio_impl.cc2
-rw-r--r--intern/opencolorio/ocio_impl.h3
-rw-r--r--intern/opencolorio/ocio_impl_glsl.cc12
-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/prvicons.pngbin13948 -> 15991 bytes
-rwxr-xr-xrelease/datafiles/prvicons.sh5
-rw-r--r--release/datafiles/prvicons.svg28828
-rw-r--r--release/scripts/freestyle/style_modules/parameter_editor.py227
-rw-r--r--release/scripts/modules/addon_utils.py11
-rw-r--r--release/scripts/modules/bl_i18n_utils/bl_extract_messages.py15
-rw-r--r--release/scripts/modules/bl_i18n_utils/settings.py9
-rw-r--r--release/scripts/modules/bl_i18n_utils/utils.py2
-rw-r--r--release/scripts/modules/bpy_extras/io_utils.py5
-rw-r--r--release/scripts/modules/bpy_types.py2
-rw-r--r--release/scripts/modules/rna_info.py2
-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/maya.py1
-rw-r--r--release/scripts/startup/bl_operators/__init__.py1
-rw-r--r--release/scripts/startup/bl_operators/add_mesh_torus.py7
-rw-r--r--release/scripts/startup/bl_operators/mask.py34
-rw-r--r--release/scripts/startup/bl_operators/node.py8
-rw-r--r--release/scripts/startup/bl_operators/wm.py66
-rw-r--r--release/scripts/startup/bl_ui/__init__.py59
-rw-r--r--release/scripts/startup/bl_ui/properties_constraint.py22
-rw-r--r--release/scripts/startup/bl_ui/properties_data_armature.py3
-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_mesh.py3
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_freestyle.py6
-rw-r--r--release/scripts/startup/bl_ui/properties_mask_common.py23
-rw-r--r--release/scripts/startup/bl_ui/properties_material.py4
-rw-r--r--release/scripts/startup/bl_ui/properties_object.py7
-rw-r--r--release/scripts/startup/bl_ui/properties_paint_common.py5
-rw-r--r--release/scripts/startup/bl_ui/properties_particle.py23
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_common.py35
-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.py18
-rw-r--r--release/scripts/startup/bl_ui/properties_texture.py8
-rw-r--r--release/scripts/startup/bl_ui/space_clip.py124
-rw-r--r--release/scripts/startup/bl_ui/space_dopesheet.py2
-rw-r--r--release/scripts/startup/bl_ui/space_image.py25
-rw-r--r--release/scripts/startup/bl_ui/space_node.py19
-rw-r--r--release/scripts/startup/bl_ui/space_outliner.py4
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py38
-rw-r--r--release/scripts/startup/bl_ui/space_text.py8
-rw-r--r--release/scripts/startup/bl_ui/space_time.py6
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py7
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py27
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py91
-rw-r--r--release/scripts/templates_py/ui_list.py112
-rw-r--r--release/scripts/templates_py/ui_list_simple.py82
-rw-r--r--source/CMakeLists.txt4
-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.h10
-rw-r--r--source/blender/blenkernel/BKE_anim.h2
-rw-r--r--source/blender/blenkernel/BKE_armature.h4
-rw-r--r--source/blender/blenkernel/BKE_blender.h2
-rw-r--r--source/blender/blenkernel/BKE_brush.h4
-rw-r--r--source/blender/blenkernel/BKE_cloth.h2
-rw-r--r--source/blender/blenkernel/BKE_curve.h22
-rw-r--r--source/blender/blenkernel/BKE_displist.h2
-rw-r--r--source/blender/blenkernel/BKE_editmesh_bvh.h2
-rw-r--r--source/blender/blenkernel/BKE_idprop.h171
-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_mball.h2
-rw-r--r--source/blender/blenkernel/BKE_mesh.h24
-rw-r--r--source/blender/blenkernel/BKE_modifier.h20
-rw-r--r--source/blender/blenkernel/BKE_node.h2
-rw-r--r--source/blender/blenkernel/BKE_object.h3
-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_text.h2
-rw-r--r--source/blender/blenkernel/BKE_tracking.h34
-rw-r--r--source/blender/blenkernel/BKE_treehash.h52
-rw-r--r--source/blender/blenkernel/CMakeLists.txt3
-rw-r--r--source/blender/blenkernel/SConscript1
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c77
-rw-r--r--source/blender/blenkernel/intern/anim.c31
-rw-r--r--source/blender/blenkernel/intern/armature.c24
-rw-r--r--source/blender/blenkernel/intern/blender.c4
-rw-r--r--source/blender/blenkernel/intern/boids.c20
-rw-r--r--source/blender/blenkernel/intern/bpath.c22
-rw-r--r--source/blender/blenkernel/intern/brush.c11
-rw-r--r--source/blender/blenkernel/intern/camera.c25
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c36
-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/constraint.c26
-rw-r--r--source/blender/blenkernel/intern/context.c3
-rw-r--r--source/blender/blenkernel/intern/curve.c164
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c1
-rw-r--r--source/blender/blenkernel/intern/displist.c226
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c5
-rw-r--r--source/blender/blenkernel/intern/editderivedmesh.c2
-rw-r--r--source/blender/blenkernel/intern/editmesh.c15
-rw-r--r--source/blender/blenkernel/intern/editmesh_bvh.c15
-rw-r--r--source/blender/blenkernel/intern/effect.c5
-rw-r--r--source/blender/blenkernel/intern/font.c26
-rw-r--r--source/blender/blenkernel/intern/group.c4
-rw-r--r--source/blender/blenkernel/intern/idprop.c90
-rw-r--r--source/blender/blenkernel/intern/image.c13
-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/mask.c2
-rw-r--r--source/blender/blenkernel/intern/mask_rasterize.c18
-rw-r--r--source/blender/blenkernel/intern/material.c4
-rw-r--r--source/blender/blenkernel/intern/mball.c11
-rw-r--r--source/blender/blenkernel/intern/mesh.c184
-rw-r--r--source/blender/blenkernel/intern/mesh_validate.c278
-rw-r--r--source/blender/blenkernel/intern/modifier.c128
-rw-r--r--source/blender/blenkernel/intern/modifiers_bmesh.c2
-rw-r--r--source/blender/blenkernel/intern/navmesh_conversion.c3
-rw-r--r--source/blender/blenkernel/intern/node.c2
-rw-r--r--source/blender/blenkernel/intern/object.c244
-rw-r--r--source/blender/blenkernel/intern/object_deform.c5
-rw-r--r--source/blender/blenkernel/intern/particle.c48
-rw-r--r--source/blender/blenkernel/intern/particle_system.c49
-rw-r--r--source/blender/blenkernel/intern/pbvh.c34
-rw-r--r--source/blender/blenkernel/intern/pbvh_bmesh.c356
-rw-r--r--source/blender/blenkernel/intern/pbvh_intern.h4
-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/sca.c15
-rw-r--r--source/blender/blenkernel/intern/scene.c18
-rw-r--r--source/blender/blenkernel/intern/screen.c20
-rw-r--r--source/blender/blenkernel/intern/sequencer.c131
-rw-r--r--source/blender/blenkernel/intern/smoke.c10
-rw-r--r--source/blender/blenkernel/intern/sound.c2
-rw-r--r--source/blender/blenkernel/intern/subsurf_ccg.c18
-rw-r--r--source/blender/blenkernel/intern/text.c34
-rw-r--r--source/blender/blenkernel/intern/tracking.c222
-rw-r--r--source/blender/blenkernel/intern/treehash.c164
-rw-r--r--source/blender/blenlib/BLI_callbacks.h6
-rw-r--r--source/blender/blenlib/BLI_compiler_attrs.h88
-rw-r--r--source/blender/blenlib/BLI_dynstr.h14
-rw-r--r--source/blender/blenlib/BLI_edgehash.h58
-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.h161
-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_stack.h2
-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.h35
-rw-r--r--source/blender/blenlib/BLI_math_interp.h6
-rw-r--r--source/blender/blenlib/BLI_math_rotation.h8
-rw-r--r--source/blender/blenlib/BLI_math_vector.h97
-rw-r--r--source/blender/blenlib/BLI_memarena.h54
-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_MixBlendOperation.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_ConvertStraightToPremulOperation.h)46
-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_threads.h1
-rw-r--r--source/blender/blenlib/BLI_utildefines.h6
-rw-r--r--source/blender/blenlib/BLI_winstuff.h1
-rw-r--r--source/blender/blenlib/CMakeLists.txt11
-rw-r--r--source/blender/blenlib/PIL_time.h38
-rw-r--r--source/blender/blenlib/PIL_time_utildefines.h95
-rw-r--r--source/blender/blenlib/intern/BLI_ghash.c737
-rw-r--r--source/blender/blenlib/intern/BLI_heap.c9
-rw-r--r--source/blender/blenlib/intern/BLI_kdopbvh.c68
-rw-r--r--source/blender/blenlib/intern/BLI_kdtree.c171
-rw-r--r--source/blender/blenlib/intern/BLI_memarena.c58
-rw-r--r--source/blender/blenlib/intern/BLI_mempool.c422
-rw-r--r--source/blender/blenlib/intern/boxpack2d.c14
-rw-r--r--source/blender/blenlib/intern/edgehash.c361
-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.c15
-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.c268
-rw-r--r--source/blender/blenlib/intern/math_geom_inline.c5
-rw-r--r--source/blender/blenlib/intern/math_rotation.c19
-rw-r--r--source/blender/blenlib/intern/math_vector_inline.c49
-rw-r--r--source/blender/blenlib/intern/path_util.c24
-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.c9
-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/threads.c13
-rw-r--r--source/blender/blenloader/intern/readblenentry.c8
-rw-r--r--source/blender/blenloader/intern/readfile.c125
-rw-r--r--source/blender/blenloader/intern/undofile.c6
-rw-r--r--source/blender/blenloader/intern/versioning_legacy.c5
-rw-r--r--source/blender/blenloader/intern/writefile.c14
-rw-r--r--source/blender/bmesh/CMakeLists.txt9
-rw-r--r--source/blender/bmesh/bmesh.h11
-rw-r--r--source/blender/bmesh/bmesh_class.h2
-rw-r--r--source/blender/bmesh/bmesh_tools.h (renamed from source/blender/compositor/operations/COM_MixColorOperation.h)50
-rw-r--r--source/blender/bmesh/intern/bmesh_construct.c114
-rw-r--r--source/blender/bmesh/intern/bmesh_construct.h15
-rw-r--r--source/blender/bmesh/intern/bmesh_core.c83
-rw-r--r--source/blender/bmesh/intern/bmesh_core.h13
-rw-r--r--source/blender/bmesh/intern/bmesh_edgeloop.c5
-rw-r--r--source/blender/bmesh/intern/bmesh_inline.h2
-rw-r--r--source/blender/bmesh/intern/bmesh_iterators.h13
-rw-r--r--source/blender/bmesh/intern/bmesh_log.c43
-rw-r--r--source/blender/bmesh/intern/bmesh_log.h3
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh.c12
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh_conv.c2
-rw-r--r--source/blender/bmesh/intern/bmesh_mods.c11
-rw-r--r--source/blender/bmesh/intern/bmesh_opdefines.c60
-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.c189
-rw-r--r--source/blender/bmesh/intern/bmesh_operators_private.h2
-rw-r--r--source/blender/bmesh/intern/bmesh_polygon.c36
-rw-r--r--source/blender/bmesh/intern/bmesh_polygon.h50
-rw-r--r--source/blender/bmesh/intern/bmesh_queries.c31
-rw-r--r--source/blender/bmesh/intern/bmesh_queries.h1
-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.c99
-rw-r--r--source/blender/bmesh/operators/bmo_beautify.c39
-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.c11
-rw-r--r--source/blender/bmesh/operators/bmo_create.c8
-rw-r--r--source/blender/bmesh/operators/bmo_dissolve.c2
-rw-r--r--source/blender/bmesh/operators/bmo_dupe.c198
-rw-r--r--source/blender/bmesh/operators/bmo_edgenet.c28
-rw-r--r--source/blender/bmesh/operators/bmo_extrude.c16
-rw-r--r--source/blender/bmesh/operators/bmo_fill_attribute.c176
-rw-r--r--source/blender/bmesh/operators/bmo_fill_edgeloop.c2
-rw-r--r--source/blender/bmesh/operators/bmo_fill_grid.c213
-rw-r--r--source/blender/bmesh/operators/bmo_fill_holes.c120
-rw-r--r--source/blender/bmesh/operators/bmo_hull.c38
-rw-r--r--source/blender/bmesh/operators/bmo_inset.c442
-rw-r--r--source/blender/bmesh/operators/bmo_join_triangles.c23
-rw-r--r--source/blender/bmesh/operators/bmo_poke.c2
-rw-r--r--source/blender/bmesh/operators/bmo_primitive.c42
-rw-r--r--source/blender/bmesh/operators/bmo_removedoubles.c16
-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.c673
-rw-r--r--source/blender/bmesh/operators/bmo_triangulate.c38
-rw-r--r--source/blender/bmesh/operators/bmo_unsubdivide.c1
-rw-r--r--source/blender/bmesh/operators/bmo_utils.c6
-rw-r--r--source/blender/bmesh/operators/bmo_wireframe.c8
-rw-r--r--source/blender/bmesh/tools/bmesh_bevel.c28
-rw-r--r--source/blender/bmesh/tools/bmesh_bisect_plane.c412
-rw-r--r--source/blender/bmesh/tools/bmesh_bisect_plane.h (renamed from source/blender/compositor/operations/COM_RenderLayersAOOperation.h)25
-rw-r--r--source/blender/bmesh/tools/bmesh_decimate_unsubdivide.c3
-rw-r--r--source/blender/bmesh/tools/bmesh_edgenet.c25
-rw-r--r--source/blender/bmesh/tools/bmesh_edgenet.h3
-rw-r--r--source/blender/bmesh/tools/bmesh_edgesplit.c6
-rw-r--r--source/blender/collada/CameraExporter.cpp12
-rw-r--r--source/blender/collada/CameraExporter.h2
-rw-r--r--source/blender/collada/DocumentImporter.cpp7
-rw-r--r--source/blender/collada/MeshImporter.cpp2
-rw-r--r--source/blender/collada/collada.cpp10
-rw-r--r--source/blender/collada/collada_utils.cpp2
-rw-r--r--source/blender/compositor/CMakeLists.txt124
-rw-r--r--source/blender/compositor/intern/COM_Converter.cpp11
-rw-r--r--source/blender/compositor/intern/COM_MemoryBuffer.cpp9
-rw-r--r--source/blender/compositor/intern/COM_MemoryBuffer.h81
-rw-r--r--source/blender/compositor/nodes/COM_AlphaOverNode.cpp2
-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.cpp2
-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_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_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_ConvertPremulToStraightOperation.h48
-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_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_LuminanceMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MixAddOperation.cpp51
-rw-r--r--source/blender/compositor/operations/COM_MixAddOperation.h45
-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_MixBurnOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixColorOperation.cpp68
-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_OutputFileOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_PlaneTrackMaskOperation.cpp7
-rw-r--r--source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp7
-rw-r--r--source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ReadBufferOperation.cpp17
-rw-r--r--source/blender/compositor/operations/COM_ReadBufferOperation.h4
-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_RenderLayersColorOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersCyclesOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersCyclesOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersDepthProg.cpp29
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersDepthProg.h34
-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.cpp340
-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_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_ZCombineOperation.h2
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c7
-rw-r--r--source/blender/editors/animation/anim_filter.c21
-rw-r--r--source/blender/editors/animation/drivers.c38
-rw-r--r--source/blender/editors/animation/keyframing.c2
-rw-r--r--source/blender/editors/armature/armature_skinning.c5
-rw-r--r--source/blender/editors/armature/meshlaplacian.c2
-rw-r--r--source/blender/editors/armature/reeb.c2
-rw-r--r--source/blender/editors/curve/curve_intern.h1
-rw-r--r--source/blender/editors/curve/curve_ops.c2
-rw-r--r--source/blender/editors/curve/editcurve.c877
-rw-r--r--source/blender/editors/datafiles/CMakeLists.txt10
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c13
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c2
-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_mask.h2
-rw-r--r--source/blender/editors/include/ED_object.h5
-rw-r--r--source/blender/editors/include/ED_screen_types.h6
-rw-r--r--source/blender/editors/include/ED_uvedit.h2
-rw-r--r--source/blender/editors/include/UI_icons.h10
-rw-r--r--source/blender/editors/include/UI_interface.h33
-rw-r--r--source/blender/editors/include/UI_resources.h3
-rw-r--r--source/blender/editors/include/UI_view2d.h1
-rw-r--r--source/blender/editors/interface/interface.c23
-rw-r--r--source/blender/editors/interface/interface_handlers.c350
-rw-r--r--source/blender/editors/interface/interface_intern.h2
-rw-r--r--source/blender/editors/interface/interface_layout.c19
-rw-r--r--source/blender/editors/interface/interface_regions.c10
-rw-r--r--source/blender/editors/interface/interface_templates.c537
-rw-r--r--source/blender/editors/interface/interface_widgets.c15
-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.c17
-rw-r--r--source/blender/editors/io/io_collada.c20
-rw-r--r--source/blender/editors/mask/mask_add.c156
-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/editmesh_bisect.c331
-rw-r--r--source/blender/editors/mesh/editmesh_inset.c6
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c252
-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.c4
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c220
-rw-r--r--source/blender/editors/mesh/editmesh_utils.c2
-rw-r--r--source/blender/editors/mesh/mesh_intern.h2
-rw-r--r--source/blender/editors/mesh/mesh_navmesh.c4
-rw-r--r--source/blender/editors/mesh/mesh_ops.c1
-rw-r--r--source/blender/editors/mesh/meshtools.c3
-rw-r--r--source/blender/editors/metaball/mball_edit.c12
-rw-r--r--source/blender/editors/object/object_add.c14
-rw-r--r--source/blender/editors/object/object_edit.c124
-rw-r--r--source/blender/editors/object/object_modifier.c4
-rw-r--r--source/blender/editors/object/object_relations.c90
-rw-r--r--source/blender/editors/object/object_transform.c21
-rw-r--r--source/blender/editors/object/object_vgroup.c7
-rw-r--r--source/blender/editors/physics/particle_edit.c40
-rw-r--r--source/blender/editors/render/render_internal.c36
-rw-r--r--source/blender/editors/render/render_opengl.c2
-rw-r--r--source/blender/editors/render/render_preview.c7
-rw-r--r--source/blender/editors/screen/area.c2
-rw-r--r--source/blender/editors/screen/glutil.c11
-rw-r--r--source/blender/editors/screen/screen_edit.c22
-rw-r--r--source/blender/editors/screen/screen_ops.c34
-rw-r--r--source/blender/editors/sculpt_paint/paint_hide.c38
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c35
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c5
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c23
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c136
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c66
-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.c47
-rw-r--r--source/blender/editors/space_clip/clip_editor.c33
-rw-r--r--source/blender/editors/space_clip/clip_graph_draw.c6
-rw-r--r--source/blender/editors/space_clip/clip_graph_ops.c33
-rw-r--r--source/blender/editors/space_clip/clip_intern.h2
-rw-r--r--source/blender/editors/space_clip/clip_ops.c65
-rw-r--r--source/blender/editors/space_clip/clip_utils.c15
-rw-r--r--source/blender/editors/space_clip/space_clip.c126
-rw-r--r--source/blender/editors/space_clip/tracking_ops.c42
-rw-r--r--source/blender/editors/space_clip/tracking_select.c28
-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/space_file.c7
-rw-r--r--source/blender/editors/space_graph/graph_edit.c36
-rw-r--r--source/blender/editors/space_graph/graph_select.c31
-rw-r--r--source/blender/editors/space_image/image_ops.c38
-rw-r--r--source/blender/editors/space_image/space_image.c8
-rw-r--r--source/blender/editors/space_info/info_stats.c4
-rw-r--r--source/blender/editors/space_logic/logic_window.c10
-rw-r--r--source/blender/editors/space_node/drawnode.c33
-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.c23
-rw-r--r--source/blender/editors/space_node/node_edit.c22
-rw-r--r--source/blender/editors/space_node/node_intern.h5
-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.c15
-rw-r--r--source/blender/editors/space_node/node_view.c54
-rw-r--r--source/blender/editors/space_node/space_node.c8
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c4
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c7
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c109
-rw-r--r--source/blender/editors/space_outliner/space_outliner.c3
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c6
-rw-r--r--source/blender/editors/space_sequencer/sequencer_view.c3
-rw-r--r--source/blender/editors/space_sequencer/space_sequencer.c1
-rw-r--r--source/blender/editors/space_text/text_draw.c22
-rw-r--r--source/blender/editors/space_text/text_intern.h4
-rw-r--r--source/blender/editors/space_text/text_ops.c39
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c18
-rw-r--r--source/blender/editors/space_view3d/drawobject.c85
-rw-r--r--source/blender/editors/space_view3d/drawvolume.c1
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c12
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c183
-rw-r--r--source/blender/editors/space_view3d/view3d_fly.c22
-rw-r--r--source/blender/editors/space_view3d/view3d_intern.h1
-rw-r--r--source/blender/editors/space_view3d/view3d_iterators.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_ops.c8
-rw-r--r--source/blender/editors/space_view3d/view3d_project.c10
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c8
-rw-r--r--source/blender/editors/transform/transform.c45
-rw-r--r--source/blender/editors/transform/transform.h1
-rw-r--r--source/blender/editors/transform/transform_constraints.c8
-rw-r--r--source/blender/editors/transform/transform_conversions.c13
-rw-r--r--source/blender/editors/transform/transform_generics.c34
-rw-r--r--source/blender/editors/transform/transform_snap.c46
-rw-r--r--source/blender/editors/util/crazyspace.c9
-rw-r--r--source/blender/editors/uvedit/uvedit_draw.c14
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c8
-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/geometry/BBox.h6
-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/StrokeShader.h2
-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/gpu/GPU_buffers.h9
-rw-r--r--source/blender/gpu/intern/gpu_buffers.c99
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c4
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material.glsl2
-rw-r--r--source/blender/imbuf/IMB_colormanagement.h46
-rw-r--r--source/blender/imbuf/intern/IMB_colormanagement_intern.h13
-rw-r--r--source/blender/imbuf/intern/colormanagement.c144
-rw-r--r--source/blender/imbuf/intern/divers.c4
-rw-r--r--source/blender/imbuf/intern/imageprocess.c14
-rw-r--r--source/blender/imbuf/intern/jpeg.c6
-rw-r--r--source/blender/makesdna/DNA_curve_types.h3
-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_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.h11
-rw-r--r--source/blender/makesdna/DNA_object_types.h428
-rw-r--r--source/blender/makesdna/DNA_particle_types.h4
-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.h18
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h3
-rw-r--r--source/blender/makesdna/intern/CMakeLists.txt1
-rw-r--r--source/blender/makesdna/intern/SConscript4
-rw-r--r--source/blender/makesdna/intern/dna_genfile.c2
-rw-r--r--source/blender/makesrna/RNA_access.h30
-rw-r--r--source/blender/makesrna/RNA_types.h200
-rw-r--r--source/blender/makesrna/SConscript1
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt1
-rw-r--r--source/blender/makesrna/intern/makesrna.c7
-rw-r--r--source/blender/makesrna/intern/rna_access.c88
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c2
-rw-r--r--source/blender/makesrna/intern/rna_color.c1
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c3
-rw-r--r--source/blender/makesrna/intern/rna_define.c30
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c1
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c9
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c13
-rw-r--r--source/blender/makesrna/intern/rna_mesh_api.c6
-rw-r--r--source/blender/makesrna/intern/rna_meta.c4
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c8
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c86
-rw-r--r--source/blender/makesrna/intern/rna_object.c3
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c4
-rw-r--r--source/blender/makesrna/intern/rna_render.c47
-rw-r--r--source/blender/makesrna/intern/rna_rna.c12
-rw-r--r--source/blender/makesrna/intern/rna_scene.c104
-rw-r--r--source/blender/makesrna/intern/rna_sensor.c32
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c19
-rw-r--r--source/blender/makesrna/intern/rna_space.c36
-rw-r--r--source/blender/makesrna/intern/rna_test.c4
-rw-r--r--source/blender/makesrna/intern/rna_tracking.c142
-rw-r--r--source/blender/makesrna/intern/rna_ui.c257
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c59
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c12
-rw-r--r--source/blender/modifiers/intern/MOD_array.c21
-rw-r--r--source/blender/modifiers/intern/MOD_bevel.c1
-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_decimate.c2
-rw-r--r--source/blender/modifiers/intern/MOD_edgesplit.c1
-rw-r--r--source/blender/modifiers/intern/MOD_explode.c12
-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_triangulate.c3
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgproximity.c21
-rw-r--r--source/blender/nodes/NOD_composite.h2
-rw-r--r--source/blender/nodes/NOD_shader.h2
-rw-r--r--source/blender/nodes/NOD_static_types.h2
-rw-r--r--source/blender/nodes/NOD_texture.h2
-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.c11
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c44
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_sky.c3
-rw-r--r--source/blender/python/bmesh/bmesh_py_ops_call.c26
-rw-r--r--source/blender/python/bmesh/bmesh_py_types.c37
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_customdata.c1
-rw-r--r--source/blender/python/intern/bpy_app_handlers.c2
-rw-r--r--source/blender/python/intern/bpy_interface.c8
-rw-r--r--source/blender/python/intern/bpy_rna.c61
-rw-r--r--source/blender/python/intern/bpy_rna_anim.c3
-rw-r--r--source/blender/python/mathutils/mathutils_Vector.c2
-rw-r--r--source/blender/python/mathutils/mathutils_geometry.c45
-rw-r--r--source/blender/render/intern/source/convertblender.c10
-rw-r--r--source/blender/render/intern/source/pipeline.c52
-rw-r--r--source/blender/render/intern/source/pointdensity.c8
-rw-r--r--source/blender/render/intern/source/rayshade.c9
-rw-r--r--source/blender/render/intern/source/render_result.c2
-rw-r--r--source/blender/render/intern/source/rendercore.c52
-rw-r--r--source/blender/render/intern/source/shadeoutput.c4
-rw-r--r--source/blender/render/intern/source/zbuf.c2
-rw-r--r--source/blender/windowmanager/WM_api.h26
-rw-r--r--source/blender/windowmanager/WM_types.h33
-rw-r--r--source/blender/windowmanager/intern/wm.c17
-rw-r--r--source/blender/windowmanager/intern/wm_cursors.c18
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c43
-rw-r--r--source/blender/windowmanager/intern/wm_files.c11
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c3
-rw-r--r--source/blender/windowmanager/intern/wm_jobs.c11
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c76
-rw-r--r--source/blenderplayer/bad_level_call_stubs/stubs.c2
-rw-r--r--source/creator/creator.c18
-rw-r--r--source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp2
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp2
-rw-r--r--source/gameengine/Converter/BL_ShapeDeformer.cpp12
-rw-r--r--source/gameengine/Converter/KX_ConvertActuators.cpp1
-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.cpp15
-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/ghost/GPG_Application.cpp2
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp17
-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.h1
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.cpp1
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp10
-rw-r--r--source/gameengine/Ketsji/KX_RaySensor.h4
-rw-r--r--source/gameengine/Ketsji/KX_Scene.cpp2
-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_OpenGLRasterizer.cpp6
1198 files changed, 51461 insertions, 37563 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6efef21afc1..040e393867b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -261,7 +261,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")
@@ -373,7 +374,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()
@@ -771,14 +772,14 @@ 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
@@ -881,8 +882,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)
@@ -2145,6 +2144,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
diff --git a/GNUmakefile b/GNUmakefile
index 0d97d8e7b07..d5570a8e170 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -184,6 +184,7 @@ help:
@echo " * check_spelling_py - check for spelling errors (Python only)"
@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)"
@@ -322,6 +323,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/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh
index ae16b4efaac..529812ea415 100755
--- a/build_files/build_environment/install_deps.sh
+++ b/build_files/build_environment/install_deps.sh
@@ -212,6 +212,7 @@ ILMBASE_SOURCE="http://download.savannah.nongnu.org/releases/openexr/ilmbase-$IL
OPENEXR_FORCE_REBUILD=false
OPENEXR_SKIP=false
_with_built_openexr=false
+_need_openexr_ldconfig=false
OIIO_VERSION="1.1.10"
OIIO_SOURCE="https://github.com/OpenImageIO/oiio/archive/Release-$OIIO_VERSION.tar.gz"
@@ -230,6 +231,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
@@ -2776,7 +2778,7 @@ install_ARCH() {
if [ $? -eq 0 ]; then
install_packages_ARCH llvm clang
have_llvm=true
- LLVM_VERSION=`check_package_version_ge_ARCH llvm`
+ LLVM_VERSION=`check_package_version_ge_ARCH llvm $LLVM_VERSION_MIN`
LLVM_VERSION_FOUND=$LLVM_VERSION
clean_LLVM
else
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..e392666ea96 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -387,7 +387,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
@@ -799,4 +799,45 @@ macro(data_to_c_simple
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/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/btools.py b/build_files/scons/tools/btools.py
index 53dd99a7971..454e72a1a72 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', ''),
diff --git a/doc/python_api/examples/bpy.types.UIList.py b/doc/python_api/examples/bpy.types.UIList.1.py
index 0f4ae0703cc..97c9bb40480 100644
--- a/doc/python_api/examples/bpy.types.UIList.py
+++ b/doc/python_api/examples/bpy.types.UIList.1.py
@@ -22,7 +22,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
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..3ffd099859a
--- /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(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/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/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..364db3592c7 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)
+ 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/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..2a438397ae0 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;
@@ -188,6 +192,7 @@ static void keyboard(unsigned char key)
else if(key == 27) // escape
options.session->progress.set_cancel("Cancelled");
}
+#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..9b72efd90cf 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
)
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..18b68ca3e9d 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")
@@ -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")
@@ -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()
@@ -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")
@@ -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")
-
- row = layout.row()
- row.prop(ccscene, "use_parents", text="Include parents")
+ layout.prop(ccscene, "primitive", text="Primitive")
+ layout.prop(ccscene, "shape", text="Shape")
+
+ 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")
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..57ef9a1005c 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++) {
@@ -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++) {
-
- 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);
+ 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);
- float radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], time);
+ 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((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 (; 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);
+ 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);
- if(CData->psys_closetip[sys] && (subv == segments) && (curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 2))
- radius =0.0f;
+ if(CData->psys_closetip[sys] && (curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1))
+ radius =0.0f;
- mesh->add_curve_key(ickey_loc, radius);
- if(attr_intercept)
- attr_intercept->add(time);
+ 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,7 @@ 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)
+void ExportCurveTriangleUV(Mesh *mesh, ParticleCurveData *CData, int vert_offset, int resol, float3 *uvdata)
{
if(uvdata == NULL)
return;
@@ -784,56 +643,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 +686,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 +711,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 +719,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))
@@ -1013,13 +794,8 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
}
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 +807,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,32 +820,16 @@ 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;
- }
- }
+ ExportCurveSegments(scene, mesh, &CData);
}
@@ -1109,7 +869,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 +878,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(
@@ -1148,7 +908,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 +918,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)
diff --git a/intern/cycles/blender/blender_mesh.cpp b/intern/cycles/blender/blender_mesh.cpp
index 55282a1ec00..628f9dae695 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
*/
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp
index 3410c73fbde..461e897efe1 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 */
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..23390060118 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"
@@ -590,7 +588,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..5dfbd97366a 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"
@@ -317,7 +315,23 @@ 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_COMPATIBLE:
+ subsurface->closure = CLOSURE_BSSRDF_COMPATIBLE_ID;
+ break;
+ 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);
@@ -618,8 +632,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..337d075cce4 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"
@@ -191,7 +189,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 +198,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 +319,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 +412,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 +458,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 +492,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 = 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..f6e19229578 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__
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/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..10d4112b57d 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)
@@ -55,27 +56,49 @@ void Device::draw_pixels(device_memory& rgba, int y, int w, int h, int dy, int w
{
pixels_copy_from(rgba, y, w, h);
+ GLuint texid;
+ glGenTextures(1, &texid);
+ glBindTexture(GL_TEXTURE_2D, texid);
+ if(rgba.data_type == TYPE_HALF)
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, w, h, 0, GL_RGBA, GL_HALF_FLOAT, (void*)rgba.data_pointer);
+ else
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, (void*)rgba.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);
+
if(transparent) {
glEnable(GL_BLEND);
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);
- uint8_t *pixels = (uint8_t*)rgba.data_pointer;
+ glPushMatrix();
+ glTranslatef(0.0f, (float)dy, 0.0f);
- /* 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;
+ 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);
- glDrawPixels(w, h, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
+ glEnd();
- glRasterPos2f(0.0f, 0.0f);
- glPixelZoom(1.0f, 1.0f);
+ glPopMatrix();
if(transparent)
glDisable(GL_BLEND);
+
+ glBindTexture(GL_TEXTURE_2D, 0);
+ glDisable(GL_TEXTURE_2D);
+ glDeleteTextures(1, &texid);
}
Device *Device::create(DeviceInfo& info, Stats &stats, bool background)
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..b1dbdec9d36 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);
}
@@ -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);
+ }
}
}
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index ec7157aa083..b5eaa69bf0e 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,7 +37,7 @@ CCL_NAMESPACE_BEGIN
class CUDADevice : public Device
{
public:
- TaskPool task_pool;
+ DedicatedTaskPool task_pool;
CUdevice cuDevice;
CUcontext cuContext;
CUmodule cuModule;
@@ -558,7 +556,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 +568,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 +625,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 +633,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 +651,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 +687,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 +774,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 +874,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 +935,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 +948,7 @@ public:
break;
}
- path_trace(tile, sample, progressive);
+ path_trace(tile, sample, branched);
tile.sample = sample + 1;
@@ -963,9 +978,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 +993,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..d723df70c89 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)
@@ -982,17 +988,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 +1006,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 +1016,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 +1062,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);
@@ -1102,7 +1110,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..40cae22ed97 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
diff --git a/intern/cycles/kernel/closure/bsdf.h b/intern/cycles/kernel/closure/bsdf.h
index 5e7b845059d..d81bbebd5a8 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,9 @@
#endif
#include "../closure/bsdf_westin.h"
#include "../closure/bsdf_toon.h"
+#ifdef __SUBSURFACE__
#include "../closure/bssrdf.h"
+#endif
CCL_NAMESPACE_BEGIN
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..422de1f3df8 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
diff --git a/intern/cycles/kernel/kernel_bvh.h b/intern/cycles/kernel/kernel_bvh.h
index c9e14645d47..4b01f2eebcd 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,32 +781,32 @@ __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
@@ -844,38 +852,38 @@ __device_inline bool scene_intersect(KernelGlobals *kg, const Ray *ray, const ui
}
#ifdef __SUBSURFACE__
-__device_inline int scene_intersect_subsurface(KernelGlobals *kg, const Ray *ray, Intersection *isect, int subsurface_object, float subsurface_random)
+__device_inline 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 +988,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 +1133,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 +1147,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..cb86ce8c4ae 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;
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..3ef33a2703b 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;
+
+ float4 *in = (__global float4*)(buffer + index*kernel_data.film.pass_stride);
+ half *out = (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..ab0a717b592 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 */
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..7b1c6681e0a 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
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h
index bf06f8dd5f6..1f0d9973bed 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__
@@ -100,11 +98,11 @@ __device_inline void path_state_next(KernelGlobals *kg, PathState *state, int la
/* diffuse/glossy/singular */
if(label & LABEL_DIFFUSE) {
- state->flag |= PATH_RAY_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;
+ state->flag |= PATH_RAY_GLOSSY|PATH_RAY_GLOSSY_ANCESTOR;
state->flag &= ~(PATH_RAY_DIFFUSE|PATH_RAY_SINGULAR|PATH_RAY_MIS_SKIP);
}
else {
@@ -117,7 +115,7 @@ __device_inline void path_state_next(KernelGlobals *kg, PathState *state, int la
__device_inline uint path_state_ray_visibility(KernelGlobals *kg, PathState *state)
{
- uint flag = state->flag;
+ uint flag = state->flag & PATH_RAY_ALL_VISIBILITY;
/* for visibility, diffuse/glossy are for reflection only */
if(flag & PATH_RAY_TRANSMIT)
@@ -233,52 +231,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(__BSSRDF__)
- 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 +267,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,31 +288,9 @@ __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;
- }
-#endif
-
- /* holdout mask objects do not write data passes */
- kernel_write_data_passes(kg, buffer, &L, &sd, sample, state.flag, throughput);
+ 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);
/* blurring of bsdf after bounces, for rays that have a small likelihood
* of following this particular path (diffuse, rough glossy) */
@@ -368,22 +306,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,30 +328,11 @@ __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;
@@ -438,7 +356,35 @@ __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_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);
+
+ if(old_subsurface_scatter_use(&sd)) {
+ old_subsurface_scatter_step(kg, &sd, state.flag, sc, &lcg_state, false);
+ }
+ else {
+ 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 +393,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 +410,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 +434,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 +444,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 +461,155 @@ __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)
{
-#ifdef __LAMP_MIS__
+ /* 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;
float ray_t = 0.0f;
+ 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 +628,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 +659,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 +699,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,29 +722,12 @@ __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;
@@ -679,23 +751,78 @@ __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_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);
+
+ if(old_subsurface_scatter_use(&sd)) {
+ old_subsurface_scatter_step(kg, &sd, state.flag, sc, &lcg_state, false);
+ }
+ else {
+ 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 +832,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 +855,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 +865,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 +882,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 +991,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 +1058,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 +1178,44 @@ __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);
+
+ 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_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 +1229,46 @@ __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);
+ if(old_subsurface_scatter_use(&sd)) {
+ ShaderData bssrdf_sd = sd;
+ old_subsurface_scatter_step(kg, &bssrdf_sd, state.flag, sc, &lcg_state, true);
+
+ /* compute lighting with the BSDF closure */
+ kernel_branched_path_integrate_lighting(kg, rng, sample*num_samples + j,
+ aa_samples*num_samples,
+ &bssrdf_sd, throughput, num_samples_inv,
+ ray_pdf, ray_pdf, state, rng_offset, &L, buffer);
+ }
+ else {
+ 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 +1323,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 +1344,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 +1354,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 +1376,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_primitive.h b/intern/cycles/kernel/kernel_primitive.h
index 323394cd9dc..4a06dff84bf 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__
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..e8e9af64df6 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
*/
/*
@@ -184,52 +182,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);
@@ -468,6 +446,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;
@@ -706,34 +686,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 +724,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 +959,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..862626d6899 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
@@ -39,19 +37,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_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)
{
- 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_sse2_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 Evaluate */
diff --git a/intern/cycles/kernel/kernel_sse3.cpp b/intern/cycles/kernel/kernel_sse3.cpp
index a25c0bca93a..c44098606a5 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
@@ -41,19 +39,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_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)
{
- 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_sse3_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 Evaluate */
diff --git a/intern/cycles/kernel/kernel_subsurface.h b/intern/cycles/kernel/kernel_subsurface.h
index 4fae961512e..4567f2ff0ce 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);
-
- 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);
+/* NEW BSSRDF: See "BSSRDF Importance Sampling", SIGGRAPH 2013 */
- 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,12 +75,366 @@ __device ShaderClosure *subsurface_scatter_pick_closure(KernelGlobals *kg, Shade
}
/* should never happen */
+ sd->randb_closure = 0.0f;
*probability = 1.0f;
return NULL;
}
+__device float3 subsurface_scatter_eval(ShaderData *sd, ShaderClosure *sc, float disk_r, float r, bool all)
+{
+#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++) {
+ 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 = bssrdf_pdf(sc, r);
+ float disk_pdf = bssrdf_pdf(sc, disk_r);
+
+ /* 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;
+
+ num_bssrdf++;
+ }
+ }
+
+ 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 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, bool hit, float3 N)
+{
+ sd->flag &= ~SD_CLOSURE_FLAGS;
+ sd->randb_closure = 0.0f;
+
+ 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;
+}
+
+/* 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, float disk_u, float disk_v, bool all)
+{
+ 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);
+
+ 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;
+ }
+
+ /* 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 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);
+
+ /* 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);
+
+ /* real distance to sampled point */
+ float r = len(sd->P - origP);
+
+ /* 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);
+
+ /* setup diffuse bsdf */
+ subsurface_scatter_setup_diffuse_bsdf(sd, eval, (num_hits > 0), N);
+}
+
+
+/* OLD BSSRDF */
+
+__device float old_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);
+
+ return r*radius;
+}
+
+#ifdef BSSRDF_MULTI_EVAL
+__device float old_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;
+
+ return pdf;
+}
+#endif
+
#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 old_subsurface_scatter_multi_eval(KernelGlobals *kg, ShaderData *sd, bool hit, float refl, float *r, int num_r, bool all)
{
/* compute pdf */
float3 eval_sum = make_float3(0.0f, 0.0f, 0.0f);
@@ -119,7 +451,7 @@ __device float3 subsurface_scatter_multi_eval(KernelGlobals *kg, ShaderData *sd,
/* compute pdf */
float pdf = 1.0f;
for(int i = 0; i < num_r; i++)
- pdf *= bssrdf_pdf(kg, sc->data0, refl, r[i]);
+ pdf *= old_bssrdf_pdf(kg, sc->data0, refl, r[i]);
eval_sum += sc->weight*pdf;
pdf_sum += sample_weight*pdf;
@@ -132,8 +464,8 @@ __device float3 subsurface_scatter_multi_eval(KernelGlobals *kg, ShaderData *sd,
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 */
+ /* in case of branched path integrate we sample all bssrdf's once,
+ * for path trace we pick one, so adjust pdf for that */
if(all)
inv_pdf_sum = 1.0f/pdf_sum;
else
@@ -148,31 +480,8 @@ __device float3 subsurface_scatter_multi_eval(KernelGlobals *kg, ShaderData *sd,
}
#endif
-/* replace closures with a single diffuse bsdf closure after scatter step */
-__device void subsurface_scatter_setup_diffuse_bsdf(ShaderData *sd, float3 weight)
-{
- 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;
-
- /* todo: evaluate shading to get blurred textures and bump mapping */
- /* shader_eval_surface(kg, sd, 0.0f, state_flag, SHADER_CONTEXT_SSS); */
-}
-
/* 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 old_subsurface_scatter_step(KernelGlobals *kg, ShaderData *sd, int state_flag, ShaderClosure *sc, uint *lcg_state, bool all)
{
float radius = sc->data0;
float refl = max(average(sc->weight)*3.0f, 0.0f);
@@ -187,14 +496,13 @@ __device void subsurface_scatter_step(KernelGlobals *kg, ShaderData *sd, int sta
/* 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);
+ float u1 = lcg_step_float(lcg_state);
+ float u2 = lcg_step_float(lcg_state);
+ float u3 = lcg_step_float(lcg_state);
+ float u4 = lcg_step_float(lcg_state);
+ float u5 = lcg_step_float(lcg_state);
+
+ r = old_bssrdf_sample_distance(kg, radius, refl, u5);
#ifdef BSSRDF_MULTI_EVAL
r_attempts[num_attempts] = r;
#endif
@@ -213,7 +521,7 @@ __device void subsurface_scatter_step(KernelGlobals *kg, ShaderData *sd, int sta
/* 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))
+ if(scene_intersect_subsurface(kg, &ray, &isect, sd->object, lcg_state, 1) == 0)
continue;
/* setup new shading point */
@@ -226,18 +534,32 @@ __device void subsurface_scatter_step(KernelGlobals *kg, ShaderData *sd, int sta
/* evaluate subsurface scattering closures */
#ifdef BSSRDF_MULTI_EVAL
- weight *= subsurface_scatter_multi_eval(kg, sd, hit, refl, r_attempts, num_attempts, all);
+ weight *= old_subsurface_scatter_multi_eval(kg, sd, hit, refl, r_attempts, num_attempts, all);
#else
weight *= sc->weight;
#endif
-#ifdef BSSRDF_SKIP_NO_HIT
if(!hit)
weight = make_float3(0.0f, 0.0f, 0.0f);
-#endif
+
+ /* optionally blur colors and bump mapping */
+ float3 N = sd->N;
+ subsurface_color_bump_blur(kg, sd, sd, state_flag, &weight, &N);
/* replace closures with a single diffuse BSDF */
- subsurface_scatter_setup_diffuse_bsdf(sd, weight);
+ subsurface_scatter_setup_diffuse_bsdf(sd, weight, hit, N);
+}
+
+__device bool old_subsurface_scatter_use(ShaderData *sd)
+{
+ for(int i = 0; i < sd->num_closure; i++) {
+ ShaderClosure *sc = &sd->closure[i];
+
+ if(sc->type == CLOSURE_BSSRDF_COMPATIBLE_ID)
+ return true;
+ }
+
+ return false;
}
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..98594df8b10 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__
@@ -43,6 +41,7 @@ CCL_NAMESPACE_BEGIN
#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 +55,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 +67,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 +213,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 +392,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 +440,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,7 +462,7 @@ typedef struct ShaderClosure {
float data1;
float3 N;
-#ifdef __ANISOTROPIC__
+#if defined(__ANISOTROPIC__) || defined(__SUBSURFACE__)
float3 T;
#endif
@@ -508,11 +508,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 +717,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 +754,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,28 +789,26 @@ 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 {
@@ -838,7 +827,6 @@ typedef struct KernelData {
KernelCamera cam;
KernelFilm film;
KernelBackground background;
- KernelSunSky sunsky;
KernelIntegrator integrator;
KernelBVH bvh;
KernelCurves curve;
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..6a3f27fb7b1 100644
--- a/intern/cycles/kernel/osl/osl_closures.cpp
+++ b/intern/cycles/kernel/osl/osl_closures.cpp
@@ -218,7 +218,13 @@ 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);
}
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..3c057f2b968 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
@@ -156,8 +158,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));
@@ -184,6 +189,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 +206,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 +219,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 +239,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(sc.type != CLOSURE_BSSRDF_COMPATIBLE_ID && (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 +282,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 +310,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 */
@@ -372,6 +388,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/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..6b61c689066 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"
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_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..c29891ed574 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"
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..3ed791fdc92 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..5c1d1be0ee7 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..a21dd24059d 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"
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..3ad2bbc0588 100644
--- a/intern/cycles/kernel/shaders/stdosl.h
+++ b/intern/cycles/kernel/shaders/stdosl.h
@@ -463,10 +463,14 @@ 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;
+// 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..9a9aefa5b29 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);
@@ -340,28 +338,39 @@ __device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *st
break;
}
#ifdef __SUBSURFACE__
- case CLOSURE_BSSRDF_ID: {
+ case CLOSURE_BSSRDF_COMPATIBLE_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(type != CLOSURE_BSSRDF_COMPATIBLE_ID && (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 +380,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 +396,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..e2b299e661d 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,
@@ -369,8 +372,12 @@ typedef enum ClosureType {
CLOSURE_BSDF_BSSRDF_ID,
CLOSURE_BSDF_TRANSPARENT_ID,
+ /* BSSRDF */
+ CLOSURE_BSSRDF_COMPATIBLE_ID,
+ CLOSURE_BSSRDF_CUBIC_ID,
+ CLOSURE_BSSRDF_GAUSSIAN_ID,
+
/* Other */
- CLOSURE_BSSRDF_ID,
CLOSURE_EMISSION_ID,
CLOSURE_DEBUG_ID,
CLOSURE_BACKGROUND_ID,
@@ -391,7 +398,7 @@ typedef enum ClosureType {
#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_BSSRDF(type) (type == CLOSURE_BSDF_BSSRDF_ID)
-#define CLOSURE_IS_BSSRDF(type) (type == CLOSURE_BSSRDF_ID)
+#define CLOSURE_IS_BSSRDF(type) (type >= CLOSURE_BSSRDF_COMPATIBLE_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..dbbfe2ee7c9 100644
--- a/intern/cycles/render/CMakeLists.txt
+++ b/intern/cycles/render/CMakeLists.txt
@@ -35,6 +35,7 @@ set(SRC
scene.cpp
session.cpp
shader.cpp
+ sky_model.cpp
sobol.cpp
svm.cpp
tables.cpp
@@ -62,6 +63,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..cf024272e02 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";
@@ -277,9 +273,6 @@ Attribute *AttributeSet::add(AttributeStandard std, ustring name)
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
index 8ec3c6a1384..69cab5e1824 100644
--- a/intern/cycles/render/bssrdf.cpp
+++ b/intern/cycles/render/bssrdf.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 "bssrdf.h"
@@ -25,11 +23,16 @@
#include "kernel_types.h"
#include "kernel_montecarlo.h"
-#include "closure/bsdf_diffuse.h"
-#include "closure/bssrdf.h"
-
CCL_NAMESPACE_BEGIN
+static float bssrdf_cubic(float ld, float r)
+{
+ if(ld == 0.0f)
+ return (r == 0.0f)? 1.0f: 0.0f;
+
+ return powf(ld - min(r, ld), 3.0f) * 4.0f/powf(ld, 4.0f);
+}
+
/* Cumulative density function utilities */
static float cdf_lookup_inverse(const vector<float>& table, float2 range, float x)
@@ -61,25 +64,19 @@ static void cdf_invert(vector<float>& to, float2 to_range, const vector<float>&
/* 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)
+static void bssrdf_lookup_table_create(float ld, 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 max_radius = ld;
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[i] = bssrdf_cubic(ld, x);
pdf_sum += pdf[i];
}
@@ -124,13 +121,9 @@ void bssrdf_table_build(vector<float>& table)
/* 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);
+ bssrdf_lookup_table_create(radius, 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));
diff --git a/intern/cycles/render/bssrdf.h b/intern/cycles/render/bssrdf.h
index 975ac0b46ec..b8f0d44bc34 100644
--- a/intern/cycles/render/bssrdf.h
+++ b/intern/cycles/render/bssrdf.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 __BSSRDF_H__
diff --git a/intern/cycles/render/buffers.cpp b/intern/cycles/render/buffers.cpp
index b509134512b..5fb648cec5f 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;
}
@@ -300,12 +297,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 +313,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 +334,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 +357,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 +377,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 +404,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..76bdcf7cdab 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"
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..22bca659072 100644
--- a/intern/cycles/render/nodes.cpp
+++ b/intern/cycles/render/nodes.cpp
@@ -1,25 +1,24 @@
/*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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_transform.h"
@@ -386,19 +385,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 +421,103 @@ 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);
+
+ 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);
+
+ 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;
+ }
+
+ 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);
+}
- 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);
+/* 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 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;
- 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);
+ enm.insert("Preetham", NODE_SKY_OLD);
+ enm.insert("Hosek / Wilkie", NODE_SKY_NEW);
- 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);
+ 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 +528,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 +546,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 +564,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 +1369,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 +1402,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 +1420,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 +1699,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()
@@ -1835,6 +1955,8 @@ void IsotropicVolumeNode::compile(OSLCompiler& compiler)
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);
diff --git a/intern/cycles/render/nodes.h b/intern/cycles/render/nodes.h
index 46b426ea20b..50338ddd5c0 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__
@@ -107,6 +105,10 @@ public:
float3 sun_direction;
float turbidity;
+ float ground_albedo;
+
+ ustring type;
+ static ShaderEnum type_enum;
};
class OutputNode : public ShaderNode {
@@ -201,7 +203,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 +273,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 {
diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp
index 7931a51b99d..0479dd9af74 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()
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..ce287f86b83 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>
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..6e3a4695d71 100644
--- a/intern/cycles/render/shader.cpp
+++ b/intern/cycles/render/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"
@@ -55,6 +53,7 @@ Shader::Shader()
has_converter_blackbody = false;
has_volume = false;
has_displacement = false;
+ has_bssrdf_bump = false;
used = false;
@@ -236,11 +235,19 @@ void ShaderManager::device_update_common(Device *device, DeviceScene *dscene, Sc
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;
}
diff --git a/intern/cycles/render/shader.h b/intern/cycles/render/shader.h
index d7eac603fa6..a58d6955da0 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;
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..07a296ed1e6 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__
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..e5a5ac8cddf 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"
@@ -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::cancelled()
+{
+ 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..22515e3e433 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
@@ -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 cancelled(); /* for worker thread, test if cancelled */
+
+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..f48fd1e124b 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,70 @@ template<size_t i0, size_t i1, size_t i2, size_t i3> __device_inline const __m12
}
#endif
+/* Half Floats */
+
+#ifdef __KERNEL_OPENCL__
+
+__device_inline void float4_store_half(half *h, const float4 *f, float 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..2adeb573f06 100644
--- a/intern/elbeem/CMakeLists.txt
+++ b/intern/elbeem/CMakeLists.txt
@@ -106,10 +106,6 @@ add_definitions(
-DNEWDIRVELMOTEST=0
)
-if(WINDOWS)
- add_definitions(-DUSE_MSVC6FIXES)
-endif()
-
if(WITH_OPENMP)
add_definitions(-DPARALLEL=1)
else()
diff --git a/intern/ghost/SConscript b/intern/ghost/SConscript
index e48e4ee6b96..d1ecc5e8c13 100644
--- a/intern/ghost/SConscript
+++ b/intern/ghost/SConscript
@@ -75,7 +75,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'):
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_SystemPathsX11.cpp b/intern/ghost/intern/GHOST_SystemPathsX11.cpp
index 35bebd588c3..50eb68d9264 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,41 @@ 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 = "";
/* 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 (home) {
- snprintf(user_path, sizeof(user_path), "%s/.blender/%s", home, versionstr);
- return (GHOST_TUns8 *)user_path;
+ if (user_path.empty()) {
+ const char *home = getenv("HOME");
+
+ if (home) {
+ user_path = string(home) + "/.blender/" + versionstr;
+ }
+ else {
+ return NULL;
+ }
}
-
- return NULL;
+ return (GHOST_TUns8 *)user_path.c_str();
}
else {
- const char *home = getenv("XDG_CONFIG_HOME");
+ if (user_path.empty()) {
+ const char *home = getenv("XDG_CONFIG_HOME");
- if (home) {
- snprintf(user_path, sizeof(user_path), "%s/blender/%s", home, versionstr);
- }
- else {
- home = getenv("HOME");
+ 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..b43758b345f 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -1110,7 +1110,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 +1136,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 +1162,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 +1184,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_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/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/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..1e140c5b674 100644
--- a/intern/guardedalloc/CMakeLists.txt
+++ b/intern/guardedalloc/CMakeLists.txt
@@ -25,6 +25,7 @@
set(INC
.
+ ../atomic
)
set(INC_SYS
@@ -35,6 +36,9 @@ set(SRC
./intern/mallocn.c
MEM_guardedalloc.h
+
+ # include here since its a header-only
+ ../atomic/atomic_ops.h
)
if(WIN32 AND NOT UNIX)
diff --git a/intern/guardedalloc/MEM_guardedalloc.h b/intern/guardedalloc/MEM_guardedalloc.h
index 0939fe1cf86..d5ba2f5bd68 100644
--- a/intern/guardedalloc/MEM_guardedalloc.h
+++ b/intern/guardedalloc/MEM_guardedalloc.h
@@ -190,7 +190,7 @@ extern "C" {
* Are the start/end block markers still correct ?
*
* @retval 0 for correct memory, 1 for corrupted memory. */
- int MEM_check_memory_integrity(void);
+ 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. */
@@ -207,13 +207,13 @@ extern "C" {
/** Get mapped memory usage. */
uintptr_t MEM_get_mapped_memory_in_use(void);
/** Get amount of memory blocks in use. */
- int MEM_get_memory_blocks_in_use(void);
+ unsigned int MEM_get_memory_blocks_in_use(void);
/** Reset the peak memory statistic to zero. */
void MEM_reset_peak_memory(void);
/** Get the peak memory usage in bytes, including mmap allocations. */
- uintptr_t MEM_get_peak_memory(void)
+ size_t MEM_get_peak_memory(void)
#if MEM_GNU_ATTRIBUTES
__attribute__((warn_unused_result))
#endif
diff --git a/intern/guardedalloc/SConscript b/intern/guardedalloc/SConscript
index eb558763dbe..e3f787fe6c2 100644
--- a/intern/guardedalloc/SConscript
+++ b/intern/guardedalloc/SConscript
@@ -38,6 +38,6 @@ 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..e8102d98345 100644
--- a/intern/guardedalloc/intern/mallocn.c
+++ b/intern/guardedalloc/intern/mallocn.c
@@ -48,19 +48,22 @@
# define __func__ __FUNCTION__
#endif
+/* only for utility functions */
+#if defined(__GNUC__) && defined(__linux__)
+#include <malloc.h>
+# define HAVE_MALLOC_H
+#endif
+
#include "MEM_guardedalloc.h"
+/* to ensure strict conversions */
+#include "../../source/blender/blenlib/BLI_strict_flags.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
+#include "atomic_ops.h"
/* Only for debugging:
* store original buffer's name when doing MEM_dupallocN
@@ -110,6 +113,18 @@ static void memcount_raise(const char *name)
}
#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)
+
+
/* --------------------------------------------------------------------- */
/* Data definition */
/* --------------------------------------------------------------------- */
@@ -210,8 +225,8 @@ static const char *check_memlist(MemHead *memh);
/* --------------------------------------------------------------------- */
-static volatile int totblock = 0;
-static volatile uintptr_t mem_in_use = 0, mmap_in_use = 0, peak_mem = 0;
+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;
@@ -219,7 +234,7 @@ 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;
+static bool malloc_debug_memset = false;
#ifdef malloc
#undef malloc
@@ -280,11 +295,17 @@ static void mem_lock_thread(void)
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();
}
-int MEM_check_memory_integrity(void)
+bool MEM_check_memory_integrity(void)
{
const char *err_val = NULL;
MemHead *listend;
@@ -311,7 +332,7 @@ void MEM_set_lock_callback(void (*lock)(void), void (*unlock)(void))
void MEM_set_memory_debug(void)
{
- malloc_debug_memset = 1;
+ malloc_debug_memset = true;
}
size_t MEM_allocN_len(const void *vmemh)
@@ -487,31 +508,29 @@ static void make_memhead_header(MemHead *memh, size_t len, const char *str)
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;
}
-
- totblock++;
- mem_in_use += len;
-
peak_mem = mem_in_use > peak_mem ? mem_in_use : peak_mem;
+ mem_unlock_thread();
}
void *MEM_mallocN(size_t len, const char *str)
{
MemHead *memh;
- mem_lock_thread();
-
- len = (len + 3) & ~3; /* allocate in units of 4 */
+ len = SIZET_ALIGN_4(len);
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);
@@ -522,7 +541,6 @@ void *MEM_mallocN(size_t len, const char *str)
#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;
@@ -532,15 +550,12 @@ void *MEM_callocN(size_t len, const char *str)
{
MemHead *memh;
- mem_lock_thread();
-
- len = (len + 3) & ~3; /* allocate in units of 4 */
+ len = SIZET_ALIGN_4(len);
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__);
@@ -548,7 +563,6 @@ void *MEM_callocN(size_t len, const char *str)
#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;
@@ -559,17 +573,23 @@ void *MEM_mapallocN(size_t len, const char *str)
{
MemHead *memh;
- mem_lock_thread();
-
- len = (len + 3) & ~3; /* allocate in units of 4 */
+ 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;
- mmap_in_use += len;
+ 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
@@ -580,7 +600,6 @@ void *MEM_mapallocN(size_t len, const char *str)
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);
@@ -620,8 +639,10 @@ void MEM_printmemlist_stats(void)
{
MemHead *membl;
MemPrintBlock *pb, *printblock;
- int totpb, a, b;
-
+ unsigned int totpb, a, b;
+#ifdef HAVE_MALLOC_H
+ size_t mem_in_use_slop = 0;
+#endif
mem_lock_thread();
/* put memory blocks into array */
@@ -641,6 +662,13 @@ void MEM_printmemlist_stats(void)
totpb++;
pb++;
+#ifdef HAVE_MALLOC_H
+ if (!membl->mmap) {
+ mem_in_use_slop += (sizeof(MemHead) + sizeof(MemTail) +
+ malloc_usable_size((void *)membl)) - membl->len;
+ }
+#endif
+
if (membl->next)
membl = MEMNEXT(membl->next);
else break;
@@ -669,6 +697,10 @@ void MEM_printmemlist_stats(void)
(double)mem_in_use / (double)(1024 * 1024));
printf("peak memory len: %.3f MB\n",
(double)peak_mem / (double)(1024 * 1024));
+#ifdef HAVE_MALLOC_H
+ printf("slop memory len: %.3f MB\n",
+ (double)mem_in_use_slop / (double)(1024 * 1024));
+#endif
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",
@@ -679,7 +711,8 @@ void MEM_printmemlist_stats(void)
mem_unlock_thread();
-#if 0 /* GLIBC only */
+#ifdef HAVE_MALLOC_H /* GLIBC only */
+ printf("System Statistics:\n");
malloc_stats();
#endif
}
@@ -838,7 +871,6 @@ void MEM_freeN(void *vmemh)
return;
}
- mem_lock_thread();
if ((memh->tag1 == MEMTAG1) &&
(memh->tag2 == MEMTAG2) &&
((memh->len & 0x3) == 0))
@@ -852,8 +884,6 @@ void MEM_freeN(void *vmemh)
/* after tags !!! */
rem_memblock(memh);
- mem_unlock_thread();
-
return;
}
MemorY_ErroR(memh->name, "end corrupt");
@@ -863,7 +893,9 @@ void MEM_freeN(void *vmemh)
}
}
else {
+ mem_lock_thread();
name = check_memlist(memh);
+ mem_unlock_thread();
if (name == NULL)
MemorY_ErroR("free", "pointer not in memlist");
else
@@ -873,8 +905,6 @@ void MEM_freeN(void *vmemh)
totblock--;
/* here a DUMP should happen */
- mem_unlock_thread();
-
return;
}
@@ -921,6 +951,7 @@ static void remlink(volatile localListBase *listbase, void *vlink)
static void rem_memblock(MemHead *memh)
{
+ mem_lock_thread();
remlink(membase, &memh->next);
if (memh->prev) {
if (memh->next)
@@ -928,9 +959,10 @@ static void rem_memblock(MemHead *memh)
else
MEMNEXT(memh->prev)->nextname = NULL;
}
+ mem_unlock_thread();
- totblock--;
- mem_in_use -= memh->len;
+ atomic_sub_u(&totblock, 1);
+ atomic_sub_z(&mem_in_use, memh->len);
#ifdef DEBUG_MEMDUPLINAME
if (memh->need_free_name)
@@ -938,9 +970,16 @@ static void rem_memblock(MemHead *memh)
#endif
if (memh->mmap) {
- mmap_in_use -= memh->len;
+ 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)
@@ -1046,9 +1085,9 @@ static const char *check_memlist(MemHead *memh)
return(name);
}
-uintptr_t MEM_get_peak_memory(void)
+size_t MEM_get_peak_memory(void)
{
- uintptr_t _peak_mem;
+ size_t _peak_mem;
mem_lock_thread();
_peak_mem = peak_mem;
@@ -1086,9 +1125,9 @@ uintptr_t MEM_get_mapped_memory_in_use(void)
return _mmap_in_use;
}
-int MEM_get_memory_blocks_in_use(void)
+unsigned int MEM_get_memory_blocks_in_use(void)
{
- int _totblock;
+ unsigned int _totblock;
mem_lock_thread();
_totblock = totblock;
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..0f88a8e3ba8 100644
--- a/intern/guardedalloc/mmap_win.h
+++ b/intern/guardedalloc/mmap_win.h
@@ -52,7 +52,7 @@
#include "../../source/blender/blenlib/BLI_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/opencolorio/fallback_impl.cc b/intern/opencolorio/fallback_impl.cc
index 37f624e1f8b..9d6561fb4cb 100644
--- a/intern/opencolorio/fallback_impl.cc
+++ b/intern/opencolorio/fallback_impl.cc
@@ -381,6 +381,11 @@ void FallbackImpl::matrixTransformScale(float * , float * , const float *)
{
}
+bool FallbackImpl::supportGLSLDraw(void)
+{
+ return false;
+}
+
bool FallbackImpl::setupGLSLDraw(struct OCIO_GLSLDrawState **state_r, OCIO_ConstProcessorRcPtr *processor, bool predivide)
{
return false;
diff --git a/intern/opencolorio/ocio_capi.cc b/intern/opencolorio/ocio_capi.cc
index c8db2c2b531..49f8d2ca41e 100644
--- a/intern/opencolorio/ocio_capi.cc
+++ b/intern/opencolorio/ocio_capi.cc
@@ -283,6 +283,11 @@ void OCIO_matrixTransformScale(float * m44, float * offset4, const float *scale4
impl->matrixTransformScale(m44, offset4, scale4f);
}
+int OCIO_supportGLSLDraw(void)
+{
+ return (int) impl->supportGLSLDraw();
+}
+
int OCIO_setupGLSLDraw(struct OCIO_GLSLDrawState **state_r, OCIO_ConstProcessorRcPtr *processor, int predivide)
{
return (int) impl->setupGLSLDraw(state_r, processor, (bool) predivide);
diff --git a/intern/opencolorio/ocio_capi.h b/intern/opencolorio/ocio_capi.h
index 3632a0da1c6..0b3102a290d 100644
--- a/intern/opencolorio/ocio_capi.h
+++ b/intern/opencolorio/ocio_capi.h
@@ -121,6 +121,7 @@ void OCIO_matrixTransformRelease(OCIO_MatrixTransformRcPtr *mt);
void OCIO_matrixTransformScale(float * m44, float * offset4, const float * scale4);
+int OCIO_supportGLSLDraw(void);
int OCIO_setupGLSLDraw(struct OCIO_GLSLDrawState **state_r, OCIO_ConstProcessorRcPtr *processor, int 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..9f490ea05ac 100644
--- a/intern/opencolorio/ocio_impl.cc
+++ b/intern/opencolorio/ocio_impl.cc
@@ -56,7 +56,7 @@ using namespace OCIO_NAMESPACE;
#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
+#define MEM_DELETE(what, type) if (what) { ((type*)(what))->~type(); MEM_freeN(what); } (void)0
static const int LUT3D_EDGE_SIZE = 32;
diff --git a/intern/opencolorio/ocio_impl.h b/intern/opencolorio/ocio_impl.h
index a328470ccb5..a1e743bf2f6 100644
--- a/intern/opencolorio/ocio_impl.h
+++ b/intern/opencolorio/ocio_impl.h
@@ -96,6 +96,7 @@ public:
virtual void matrixTransformScale(float * m44, float * offset4, const float * scale4) = 0;
+ virtual bool supportGLSLDraw(void) = 0;
virtual bool setupGLSLDraw(struct OCIO_GLSLDrawState **state_r, OCIO_ConstProcessorRcPtr *processor, bool predivide) = 0;
virtual void finishGLSLDraw(struct OCIO_GLSLDrawState *state) = 0;
virtual void freeGLState(struct OCIO_GLSLDrawState *state_r) = 0;
@@ -169,6 +170,7 @@ public:
void matrixTransformScale(float * m44, float * offset4, const float * scale4);
+ bool supportGLSLDraw(void);
bool setupGLSLDraw(struct OCIO_GLSLDrawState **state_r, OCIO_ConstProcessorRcPtr *processor, bool predivide);
void finishGLSLDraw(struct OCIO_GLSLDrawState *state);
void freeGLState(struct OCIO_GLSLDrawState *state_r);
@@ -243,6 +245,7 @@ public:
void matrixTransformScale(float * m44, float * offset4, const float * scale4);
+ bool supportGLSLDraw(void);
bool setupGLSLDraw(struct OCIO_GLSLDrawState **state_r, OCIO_ConstProcessorRcPtr *processor, 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..1a3132fa4b3 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>
@@ -202,6 +197,13 @@ static bool ensureLUT3DAllocated(OCIO_GLSLDrawState *state)
return state->lut3d_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.
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/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/scripts/freestyle/style_modules/parameter_editor.py b/release/scripts/freestyle/style_modules/parameter_editor.py
index 5b773cd7a6d..371019ebe18 100644
--- a/release/scripts/freestyle/style_modules/parameter_editor.py
+++ b/release/scripts/freestyle/style_modules/parameter_editor.py
@@ -38,24 +38,29 @@ 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,47 @@ 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()
+
+
+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 seg1.dot(seg2) < 0.0 and seg2.dot(seg3) < 0.0:
+ 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
+
+
# main function for parameter processing
def process(layer_name, lineset_name):
@@ -1150,6 +1282,9 @@ def process(layer_name, lineset_name):
elif m.type == '2D_TRANSFORM':
shaders_list.append(Transform2DShader(
m.pivot, m.scale_x, m.scale_y, m.angle, m.pivot_u, m.pivot_x, m.pivot_y))
+ ###
+ shaders_list.append(StrokeCleaner())
+ ###
color = linestyle.color
if (not linestyle.use_chaining) or (linestyle.chaining == 'PLAIN' and linestyle.use_same_object):
thickness_position = linestyle.thickness_position
diff --git a/release/scripts/modules/addon_utils.py b/release/scripts/modules/addon_utils.py
index 3aa4eef6392..2ac7d4c85aa 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
@@ -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..e40b067f552 100644
--- a/release/scripts/modules/bl_i18n_utils/settings.py
+++ b/release/scripts/modules/bl_i18n_utils/settings.py
@@ -467,9 +467,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..1b6d65d89d0 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))]
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_types.py b/release/scripts/modules/bpy_types.py
index d3ac5a6093c..f8870cbe705 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -547,7 +547,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..804055e61a5 100644
--- a/release/scripts/modules/rna_info.py
+++ b/release/scripts/modules/rna_info.py
@@ -296,6 +296,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")
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/maya.py b/release/scripts/presets/keyconfig/maya.py
index a61da0b09d2..fe955b344bd 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')
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..fcb9feab192 100644
--- a/release/scripts/startup/bl_operators/add_mesh_torus.py
+++ b/release/scripts/startup/bl_operators/add_mesh_torus.py
@@ -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..16349c27e39 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
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 63d9aa31ddd..909842d3c2b 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -1272,6 +1272,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 +1288,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 +1609,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 +1712,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 +1794,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 +1814,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 +1857,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 +1867,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)
@@ -1875,7 +1907,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):
diff --git a/release/scripts/startup/bl_ui/__init__.py b/release/scripts/startup/bl_ui/__init__.py
index b9f2e8406c6..511f1705d5e 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..5bb9c151c2c 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")
diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py
index 74f33170384..e01764a5496 100644
--- a/release/scripts/startup/bl_ui/properties_data_armature.py
+++ b/release/scripts/startup/bl_ui/properties_data_armature.py
@@ -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")
@@ -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_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py
index b5461c45433..a703222ecd0 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:
@@ -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")
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 861d64382ef..5d998ca0404 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -780,7 +780,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..18dd8f591e8 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)
@@ -576,7 +576,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 +612,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_mask_common.py b/release/scripts/startup/bl_ui/properties_mask_common.py
index 9f72d7a6d88..aa4d671e938 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)
@@ -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")
@@ -247,8 +242,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:")
@@ -302,9 +296,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):
@@ -316,8 +308,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..eff538971c0 100644
--- a/release/scripts/startup/bl_ui/properties_material.py
+++ b/release/scripts/startup/bl_ui/properties_material.py
@@ -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..5995b765ae6 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")
diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py
index 931b47896a6..0d526514b5c 100644
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@ -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)
@@ -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):
diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py
index 3d7fe59ff77..26587472566 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):
@@ -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:
+ 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_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..e11f179e2cb 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:")
diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py
index 8875161170a..e1b6aee29ae 100644
--- a/release/scripts/startup/bl_ui/properties_texture.py
+++ b/release/scripts/startup/bl_ui/properties_texture.py
@@ -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 04584855ed3..746128eb2c5 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="")
@@ -211,7 +211,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")
@@ -227,9 +227,8 @@ class CLIP_PT_tools_marker(CLIP_PT_tracking_panel, Panel):
row.menu('CLIP_MT_tracking_settings_presets', text=label)
row.operator("clip.tracking_settings_preset_add",
text="", icon='ZOOMIN')
- props = row.operator("clip.tracking_settings_preset_add",
- text="", icon='ZOOMOUT')
- props.remove_active = True
+ row.operator("clip.tracking_settings_preset_add",
+ text="", icon='ZOOMOUT').remove_active = True
col.separator()
@@ -295,18 +294,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
+ row.operator("clip.refine_markers", text="Backwards").backwards = True
+ row.operator("clip.refine_markers", text="Forwards").backwards = False
- col = layout.column(align=True)
- props = col.operator("clip.clear_track_path", text="Clear After")
- props.action = 'REMAINED'
-
- 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")
@@ -315,6 +310,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
@@ -360,7 +356,7 @@ class CLIP_PT_tools_solve(CLIP_PT_tracking_panel, Panel):
col.active = not settings.use_tripod_solver
col.prop(settings, "use_fallback_reconstruction",
text="Allow Fallback")
- sub = col.column()
+ sub = col.column(align=True)
sub.active = settings.use_fallback_reconstruction
sub.prop(settings, "reconstruction_success_threshold")
@@ -405,14 +401,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'
@@ -422,6 +417,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")
@@ -493,7 +489,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")
@@ -553,19 +549,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()
@@ -575,9 +569,8 @@ 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")
@@ -593,6 +586,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
@@ -664,11 +658,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:
@@ -703,21 +697,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")
@@ -755,14 +749,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")
@@ -1030,15 +1024,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")
@@ -1051,16 +1044,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()
@@ -1082,10 +1074,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"
@@ -1107,8 +1097,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):
@@ -1159,12 +1149,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")
@@ -1174,11 +1163,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..398d1596216 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -183,17 +183,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):
@@ -714,8 +707,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':
@@ -745,14 +736,14 @@ class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
col.active = brush.brush_capabilities.has_overlay
col.label(text="Overlay:")
- row = col.row()
+ 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')
@@ -777,14 +768,14 @@ class IMAGE_PT_tools_mask_texture(BrushButtonsPanel, Panel):
col.active = brush.brush_capabilities.has_overlay
col.label(text="Overlay:")
- row = col.row()
+ row = col.row(align=True)
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 = 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')
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index da41f9c6bef..843bafabdec 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):
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..7137a5097ee 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')
@@ -924,8 +923,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..baaffa6530d 100644
--- a/release/scripts/startup/bl_ui/space_text.py
+++ b/release/scripts/startup/bl_ui/space_text.py
@@ -45,7 +45,7 @@ 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')
@@ -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")
diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py
index becdc792230..de8be9dff99 100644
--- a/release/scripts/startup/bl_ui/space_time.py
+++ b/release/scripts/startup/bl_ui/space_time.py
@@ -62,14 +62,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 +85,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)
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 781ebd32318..81892b62ad7 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()
@@ -1828,6 +1830,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()
@@ -2141,6 +2144,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 +2493,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="")
@@ -2942,7 +2946,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 +3003,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..c40b9807f20 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)
@@ -175,8 +174,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 +186,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 +235,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 +281,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 +463,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 +609,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')
@@ -675,13 +676,13 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
col = layout.column(align=True)
col.label(text="Overlay:")
- row = col.row()
+ 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()
+ 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')
@@ -702,8 +703,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, "blend", text="Blend")
col = layout.column()
@@ -713,13 +712,13 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
col = layout.column(align=True)
col.label(text="Overlay:")
- row = col.row()
+ 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()
+ 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')
@@ -739,8 +738,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()
@@ -771,13 +768,13 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
col = layout.column(align=True)
col.label(text="Overlay:")
- row = col.row()
+ 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()
+ 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')
@@ -810,14 +807,14 @@ class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel):
col.active = brush.brush_capabilities.has_overlay
col.label(text="Overlay:")
- row = col.row()
+ 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')
@@ -848,14 +845,14 @@ class VIEW3D_PT_tools_mask_texture(View3DPanel, Panel):
col.active = brush.brush_capabilities.has_overlay
col.label(text="Overlay:")
- row = col.row()
+ row = col.row(align=True)
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 = 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')
@@ -916,6 +913,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()
@@ -947,6 +945,9 @@ class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
sub.active = brush.use_smooth_stroke
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):
@@ -1031,8 +1032,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 +1050,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 +1138,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 +1155,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 +1176,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,15 +1211,13 @@ 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")
row = layout.row()
row.prop(ipaint, "use_normal_falloff")
-
+
sub = row.row()
sub.active = (ipaint.use_normal_falloff)
sub.prop(ipaint, "normal_angle", text="")
@@ -1333,7 +1330,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 +1354,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/templates_py/ui_list.py b/release/scripts/templates_py/ui_list.py
index f71b342c854..61ad0ae0435 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(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/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/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..d8af90b4ae7 100644
--- a/source/blender/blenkernel/BKE_DerivedMesh.h
+++ b/source/blender/blenkernel/BKE_DerivedMesh.h
@@ -72,6 +72,8 @@
#include "DNA_customdata_types.h"
#include "DNA_meshdata_types.h"
+#include "BLI_compiler_attrs.h"
+
#include "BKE_customdata.h"
#include "BKE_bvhutils.h"
@@ -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_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_armature.h b/source/blender/blenkernel/BKE_armature.h
index 9bdc5b0fc8f..60e03af5077 100644
--- a/source/blender/blenkernel/BKE_armature.h
+++ b/source/blender/blenkernel/BKE_armature.h
@@ -124,11 +124,13 @@ 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) ( \
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h
index 84e24df43e5..13fd4b2bab7 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -42,7 +42,7 @@ extern "C" {
* and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */
#define BLENDER_VERSION 268
-#define BLENDER_SUBVERSION 2
+#define BLENDER_SUBVERSION 3
/* 262 was the last editmesh release but it has compatibility code for bmesh data */
#define BLENDER_MINVERSION 262
#define BLENDER_MINSUBVERSION 0
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_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..609b7e4ae4b 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);
@@ -139,6 +150,7 @@ 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);
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_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_idprop.h b/source/blender/blenkernel/BKE_idprop.h
index 133a0690dc6..71fd163a8ee 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,30 @@ 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_RemFromGroup(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_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..3d443cbe38c 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -108,7 +108,7 @@ void BKE_mesh_calc_poly_angles(struct MPoly *mpoly, struct MLoop *loopstart,
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);
+ int *r_totgroup, const bool use_bitflags);
void BKE_mesh_calc_relative_deform(
const struct MPoly *mpoly, const int totpoly,
@@ -332,16 +332,16 @@ void BKE_mesh_edge_poly_map_create(MeshElemMap **r_map, int **r_mem,
/* vertex level transformations & checks (no derived mesh) */
-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]);
+bool BKE_mesh_minmax(struct Mesh *me, float r_min[3], float r_max[3]);
+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]);
void BKE_mesh_translate(struct Mesh *me, const float offset[3], const bool do_keys);
/* 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(
+bool BKE_mesh_validate_arrays(
struct Mesh *me,
struct MVert *mverts, unsigned int totvert,
struct MEdge *medges, unsigned int totedge,
@@ -349,9 +349,17 @@ 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);
+ const bool do_verbose, const bool do_fixes,
+ bool *r_change);
+
+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);
+
int BKE_mesh_validate(struct Mesh *me, const int do_verbose);
-int BKE_mesh_validate_dm(struct DerivedMesh *dm);
void BKE_mesh_calc_edges(struct Mesh *mesh, bool update, const bool select);
diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h
index 0727e11f397..f42e131394b 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,
@@ -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_node.h b/source/blender/blenkernel/BKE_node.h
index 27192437c89..a9d06ad6512 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"
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index 992792dcb99..8007aba2a53 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -60,6 +60,7 @@ 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);
@@ -193,6 +194,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_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_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_tracking.h b/source/blender/blenkernel/BKE_tracking.h
index 0d148e55753..51946da3857 100644
--- a/source/blender/blenkernel/BKE_tracking.h
+++ b/source/blender/blenkernel/BKE_tracking.h
@@ -68,7 +68,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 **** */
@@ -80,8 +80,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);
@@ -98,7 +98,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);
@@ -145,7 +145,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);
@@ -178,7 +178,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]);
@@ -194,15 +194,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,
@@ -210,8 +210,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_refine_marker(struct MovieClip *clip, struct MovieTrackingTrack *track, struct MovieTrackingMarker *marker, bool backwards);
/* **** Plane tracking **** */
@@ -219,8 +219,8 @@ void BKE_tracking_track_plane_from_existing_motion(struct MovieTrackingPlaneTrac
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 MovieTrackingObject *object,
@@ -229,14 +229,14 @@ struct MovieReconstructContext *BKE_tracking_reconstruction_context_new(struct M
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..e9142ef1abd 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
@@ -152,6 +153,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 +245,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..3c3ac61a3cb 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',
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 2ece90183bd..8f4c2973104 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)
{
@@ -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);
@@ -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);
@@ -2072,6 +2090,7 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D
ndm = modwrap_applyModifierEM(md, ob, em, orcodm, MOD_APPLY_ORCO);
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 +2116,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 +2758,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 +2768,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 +2778,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 +2798,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);
@@ -3262,4 +3278,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/anim.c b/source/blender/blenkernel/intern/anim.c
index ba680147201..49c9a8e9083 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);
@@ -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;
@@ -1332,7 +1327,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 +1564,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/armature.c b/source/blender/blenkernel/intern/armature.c
index f006710dc21..6b2b782717d 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)
{
@@ -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..3fbdba351b0 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -924,9 +924,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..8ce84609c15 100644
--- a/source/blender/blenkernel/intern/boids.c
+++ b/source/blender/blenkernel/intern/boids.c
@@ -253,7 +253,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 +300,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 +356,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 +375,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 +396,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 +623,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 +640,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;
diff --git a/source/blender/blenkernel/intern/bpath.c b/source/blender/blenkernel/intern/bpath.c
index 4018b757559..30dc7514eaf 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)
{
@@ -405,6 +423,8 @@ void BKE_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int
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);
+ 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/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..1bc12cffe7b 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -1814,7 +1814,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 +2405,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 +2607,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 +2642,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 +2670,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 +2740,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/constraint.c b/source/blender/blenkernel/intern/constraint.c
index eda770ddf30..7b7d20a54e0 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;
@@ -3396,13 +3392,11 @@ static void shrinkwrap_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra
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;
- if (dot_v3v3(no, no) < FLT_EPSILON) {
+ 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) {
@@ -3650,14 +3644,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..4e381669bb9 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;
+
+ BKE_curve_boundbox_calc(cu, loc, size);
- 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;
+ 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])
@@ -1586,10 +1595,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 +1854,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 +2456,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 +2471,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 +2507,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 +2520,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 +2547,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 +2640,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,7 +2662,7 @@ 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 */
nr = bl->nr;
@@ -2676,7 +2684,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 +2692,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 +2712,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 +2725,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 +2767,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 +2806,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 +2820,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,6 +3084,14 @@ 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)
+{
+ 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)
{
@@ -3401,7 +3417,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 +3446,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 +3474,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 +3505,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/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 4ce06623bae..f786f842be3 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>
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..a6cff9f20fb 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -3802,14 +3802,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..caa5bf90584 100644
--- a/source/blender/blenkernel/intern/editderivedmesh.c
+++ b/source/blender/blenkernel/intern/editderivedmesh.c
@@ -1872,7 +1872,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..6a89d16d7bf 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"
@@ -123,6 +124,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 +219,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 +268,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;
diff --git a/source/blender/blenkernel/intern/editmesh_bvh.c b/source/blender/blenkernel/intern/editmesh_bvh.c
index fced3472566..5b00e5a83ac 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,7 +218,7 @@ 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;
@@ -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) {
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/font.c b/source/blender/blenkernel/intern/font.c
index 7c23438f93d..f24d84df2e8 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;
}
@@ -819,8 +835,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 +863,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/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..2e32c18b264 100644
--- a/source/blender/blenkernel/intern/idprop.c
+++ b/source/blender/blenkernel/intern/idprop.c
@@ -133,11 +133,10 @@ void IDP_AppendArray(IDProperty *prop, IDProperty *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*/
+ /* 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 +153,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 +170,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 +209,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 +228,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;
}
@@ -301,14 +288,23 @@ static IDProperty *IDP_CopyArray(IDProperty *prop)
}
/* ---------- String Type ------------ */
+
+/**
+ *
+ * \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 +314,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);
}
@@ -354,7 +350,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);
}
@@ -822,7 +818,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 +832,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.*/
}
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 86382c64ed3..8c0c16402da 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));
}
@@ -2152,9 +2149,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 +2191,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/mask.c b/source/blender/blenkernel/intern/mask.c
index a7bfb15c99d..afd725f55fe 100644
--- a/source/blender/blenkernel/intern/mask.c
+++ b/source/blender/blenkernel/intern/mask.c
@@ -1402,7 +1402,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..874e60936d1 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
@@ -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..a4b59153e2b 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;
@@ -2281,7 +2280,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 +2293,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 +2331,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..459f7216d00 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -46,6 +46,7 @@
#include "BLI_utildefines.h"
#include "BLI_blenlib.h"
+#include "BLI_memarena.h"
#include "BLI_math.h"
#include "BLI_edgehash.h"
#include "BLI_bitmap.h"
@@ -177,8 +178,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);
@@ -657,6 +658,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 +689,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);
}
@@ -908,7 +912,7 @@ static void make_edges_mdata(MVert *UNUSED(allvert), MFace *allface, MLoop *alll
MPoly *mpoly;
MFace *mface;
MEdge *medge, *med;
- EdgeHash *hash = BLI_edgehash_new();
+ EdgeHash *hash;
struct EdgeSort *edsort, *ed;
int a, totedge = 0;
unsigned int totedge_final = 0;
@@ -985,6 +989,7 @@ static void make_edges_mdata(MVert *UNUSED(allvert), MFace *allface, MLoop *alll
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));
}
@@ -1237,10 +1242,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 +1314,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 +1666,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,6 +1932,21 @@ void BKE_mesh_smooth_flag_set(Object *meshOb, int enableSmooth)
}
}
+/**
+ * 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);
+ }
+}
+
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])
@@ -1935,6 +1968,9 @@ void BKE_mesh_calc_normals_mapping_ex(MVert *mverts, int numVerts,
MPoly *mp;
if (numPolys == 0) {
+ if (only_face_normals == FALSE) {
+ mesh_calc_normals_vert_fallback(mverts, numVerts);
+ }
return;
}
@@ -2293,7 +2329,7 @@ void BKE_mesh_convert_mfaces_to_mpolys_ex(ID *id, CustomData *fdata, CustomData
CustomData_external_read(fdata, id, CD_MASK_MDISPS, totface_i);
}
- eh = BLI_edgehash_new();
+ eh = BLI_edgehash_new_ex(__func__, totedge_i);
/* build edge hash */
me = medge;
@@ -2698,6 +2734,7 @@ int BKE_mesh_recalc_tessellation(CustomData *fdata,
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;
@@ -2780,7 +2817,11 @@ int BKE_mesh_recalc_tessellation(CustomData *fdata,
#endif
ml = mloop + mp->loopstart;
- 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);
sf_vert_first = NULL;
sf_vert_last = NULL;
for (j = 0; j < mp->totloop; j++, ml++) {
@@ -2832,12 +2873,17 @@ int BKE_mesh_recalc_tessellation(CustomData *fdata,
mface_index++;
}
- BLI_scanfill_end(&sf_ctx);
+ 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;
@@ -3266,19 +3312,21 @@ static float mesh_calc_poly_planar_area_centroid(MPoly *mpoly, MLoop *loopstart,
* 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)
+ * \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)
+ int *r_totgroup, const bool use_bitflags)
{
int *poly_groups;
int *poly_stack;
- STACK_DECLARE(poly_stack);
int poly_prev = 0;
- int poly_group_id = 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;
@@ -3297,10 +3345,11 @@ int *BKE_mesh_calc_smoothgroups(const MEdge *medge, const int totedge,
poly_groups = MEM_callocN(sizeof(int) * totpoly, __func__);
poly_stack = MEM_mallocN(sizeof(int) * totpoly, __func__);
- STACK_INIT(poly_stack);
-
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) {
@@ -3313,40 +3362,88 @@ int *BKE_mesh_calc_smoothgroups(const MEdge *medge, const int totedge,
break;
}
+ poly_group_id = use_bitflags ? temp_poly_group_id : ++tot_group;
+
/* 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) {
+ poly_stack[ps_end_idx++] = poly;
- const MPoly *mp = &mpoly[poly];
+ while (ps_curr_idx != ps_end_idx) {
+ const MPoly *mp;
const MLoop *ml;
- int j = mp->totloop;
+ int j;
+ poly = poly_stack[ps_curr_idx++];
BLI_assert(poly_groups[poly] == poly_group_id);
- for (ml = &mloop[mp->loopstart]; j--; ml++) {
+ 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)) {
- /* 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);
+ 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;
}
}
}
@@ -3355,9 +3452,7 @@ int *BKE_mesh_calc_smoothgroups(const MEdge *medge, const int totedge,
MEM_freeN(edge_poly_mem);
MEM_freeN(poly_stack);
- STACK_FREE(poly_stack);
-
- *r_totgroup = poly_group_id;
+ *r_totgroup = tot_group + 1;
return poly_groups;
}
@@ -3653,7 +3748,7 @@ void BKE_mesh_flush_select_from_verts(Mesh *me)
/* 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,7 +3759,7 @@ 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])
+bool BKE_mesh_center_median(Mesh *me, float cent[3])
{
int i = me->totvert;
MVert *mvert;
@@ -3680,19 +3775,19 @@ int BKE_mesh_center_median(Mesh *me, float cent[3])
return (me->totvert != 0);
}
-int BKE_mesh_center_bounds(Mesh *me, float cent[3])
+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 1;
+ return true;
}
- return 0;
+ return false;
}
-int BKE_mesh_center_centroid(Mesh *me, float cent[3])
+bool BKE_mesh_center_centroid(Mesh *me, float cent[3])
{
int i = me->totpoly;
MPoly *mpoly;
@@ -3714,6 +3809,11 @@ int BKE_mesh_center_centroid(Mesh *me, float cent[3])
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);
}
@@ -3830,9 +3930,7 @@ void BKE_mesh_poly_edgehash_insert(EdgeHash *ehash, const MPoly *mp, const MLoop
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);
- }
+ BLI_edgehash_reinsert(ehash, ml->v, ml_next->v, NULL);
ml = ml_next;
ml_next++;
diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c
index 2eced15a147..b5056f75bf9 100644
--- a/source/blender/blenkernel/intern/mesh_validate.c
+++ b/source/blender/blenkernel/intern/mesh_validate.c
@@ -182,16 +182,28 @@ static int search_polyloop_cmp(const void *v1, const void *v2)
return sp1->loopstart > sp2->loopstart ? 1 : sp1->loopstart < sp2->loopstart ? -1 : 0;
}
-#define PRINT if (do_verbose) printf
-
-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 +218,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 +230,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 +247,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 +261,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 +272,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 +302,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 +320,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 +331,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 +408,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 +460,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 +482,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 +495,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 +511,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 +523,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 +539,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 +561,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 +648,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 +691,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 +700,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 +719,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 +739,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 +754,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 +805,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 +824,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 +839,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,62 +889,76 @@ 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;
+ 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);
- 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;
-}
-
-int BKE_mesh_validate_dm(DerivedMesh *dm)
-{
- 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);
+ else {
+ return false;
+ }
}
/**
@@ -921,7 +973,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 +983,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 */
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index 41e0acf9f7a..780bd9733f5 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) {
@@ -604,7 +603,8 @@ bool modifier_isCorrectableDeformed(ModifierData *md)
bool modifiers_isCorrectableDeformed(Object *ob)
{
- ModifierData *md = modifiers_getVirtualModifierList(ob);
+ VirtualModifierData virtualModifierData;
+ ModifierData *md = modifiers_getVirtualModifierList(ob, &virtualModifierData);
for (; md; md = md->next) {
if (ob->mode == OB_MODE_EDIT && (md->mode & eModifierMode_Editmode) == 0) {
diff --git a/source/blender/blenkernel/intern/modifiers_bmesh.c b/source/blender/blenkernel/intern/modifiers_bmesh.c
index 290b0684e40..d1797810c86 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);
}
/**
diff --git a/source/blender/blenkernel/intern/navmesh_conversion.c b/source/blender/blenkernel/intern/navmesh_conversion.c
index 1d662ae3116..68564a1e298 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;
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 1349c4dc8d4..ee5b11d3beb 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -2666,7 +2666,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)
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 962209bef87..6ffab678691 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);
}
@@ -246,8 +256,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 +283,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 +355,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)
@@ -1256,8 +1282,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 +1303,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 +1799,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 +1832,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 +1989,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 +2013,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 +2312,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 +2381,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 +2529,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;
@@ -3158,8 +3168,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 +3191,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 +3217,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)))
@@ -3422,3 +3435,128 @@ 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;
+ float co[3];
+
+ 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) {
+ 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++) {
+ 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--) {
+ 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--) {
+ 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 ca38aa42928..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;
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 6b754743c11..216bc94a058 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)
{
@@ -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..db22e030821 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));
@@ -4108,7 +4107,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 +4478,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 +4493,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 +4776,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 0e2e2bcfe19..29473fe64b7 100644
--- a/source/blender/blenkernel/intern/pbvh_bmesh.c
+++ b/source/blender/blenkernel/intern/pbvh_bmesh.c
@@ -48,8 +48,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 +67,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 +91,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 +100,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 +140,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 +177,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 +192,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 +227,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 +262,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 +286,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 +310,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 +373,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); // assign handles below
- 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_assign(bvh->bm_vert_to_node, v,
- SET_INT_IN_POINTER(new_owner - bvh->nodes), NULL, NULL);
- 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 +391,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 +424,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;
@@ -427,10 +434,14 @@ static void pbvh_bmesh_face_remove(PBVH *bvh, BMFace *f)
if (new_node) {
pbvh_bmesh_vert_ownership_transfer(bvh, new_node, v);
}
+ else {
+ BLI_gset_remove(f_node->bm_unique_verts, v, NULL);
+ BLI_ghash_remove(bvh->bm_vert_to_node, v, NULL, NULL);
+ }
}
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];
@@ -495,16 +513,13 @@ static int edge_queue_tri_in_sphere(const EdgeQueue *q, BMFace *f)
}
/* Return true if the vertex mask is less than 0.5, false otherwise */
-static int check_mask_half(BMesh *bm, BMVert *v)
+static bool check_mask_half(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) < 0.5f);
}
-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;
@@ -512,56 +527,56 @@ static void edge_queue_insert(EdgeQueue *q, BLI_mempool *pool, BMEdge *e,
* 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);
+ if (check_mask_half(eq_ctx, e->v1) && check_mask_half(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 +590,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 +614,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 +629,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 +653,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,7 +668,7 @@ 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;
@@ -686,7 +701,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 +721,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 +730,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 +748,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 +756,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 +784,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 +860,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 +931,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 +942,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 +1026,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 +1083,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,6 +1101,7 @@ 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;
@@ -1085,8 +1110,10 @@ int BKE_pbvh_bmesh_update_topology(PBVH *bvh, PBVHTopologyUpdateMode mode,
EdgeQueue q;
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);
@@ -1096,8 +1123,10 @@ int BKE_pbvh_bmesh_update_topology(PBVH *bvh, PBVHTopologyUpdateMode mode,
EdgeQueue q;
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 +1165,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 +1182,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 +1246,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 +1280,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;
@@ -1311,6 +1362,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 +1390,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 +1414,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 +1440,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 +1469,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 +1483,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 +1522,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 +1533,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..9af1c1decf5 100644
--- a/source/blender/blenkernel/intern/pbvh_intern.h
+++ b/source/blender/blenkernel/intern/pbvh_intern.h
@@ -101,8 +101,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 b7aab87fc47..ff61dfc5266 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)
@@ -1059,6 +1090,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)
{
@@ -1071,6 +1107,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;
@@ -1111,6 +1148,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;
@@ -1163,6 +1201,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;
@@ -1201,6 +1240,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;
@@ -1240,6 +1280,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;
@@ -1276,6 +1317,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;
@@ -2087,21 +2129,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);
@@ -2129,8 +2181,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);
@@ -2177,8 +2235,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);
@@ -2973,12 +3037,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/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..5829ff4995e 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"
@@ -1064,6 +1065,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 +1100,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 */
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c
index fe2f52d79fd..efcbcacf974 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 ************** */
@@ -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..43845638754 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);
}
}
@@ -865,8 +875,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;
@@ -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/smoke.c b/source/blender/blenkernel/intern/smoke.c
index bb65955e3b5..189c1e967dd 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -1142,8 +1142,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 +1160,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
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..d5761fa918e 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -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++) {
@@ -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++) {
@@ -3190,8 +3189,10 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
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 +3218,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;
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/tracking.c b/source/blender/blenkernel/intern/tracking.c
index 54ba9ea56d7..19c1bf9b8a8 100644
--- a/source/blender/blenkernel/intern/tracking.c
+++ b/source/blender/blenkernel/intern/tracking.c
@@ -212,7 +212,7 @@ 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->settings.reconstruction_success_threshold = 1e-3f;
tracking->stabilization.scaleinf = 1.0f;
tracking->stabilization.locinf = 1.0f;
@@ -501,7 +501,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;
}
@@ -678,7 +678,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;
}
@@ -687,7 +687,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);
@@ -1022,7 +1022,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);
@@ -1303,6 +1303,25 @@ void BKE_tracking_marker_get_subframe_position(MovieTrackingTrack *track, float
/*********************** Plane Track *************************/
+static void plane_tracks_replace_point_track(ListBase *plane_tracks,
+ MovieTrackingTrack *old_track,
+ MovieTrackingTrack *new_track)
+{
+ MovieTrackingPlaneTrack *plane_track;
+
+ for (plane_track = plane_tracks->first;
+ plane_track;
+ plane_track = plane_track->next)
+ {
+ int i;
+ for (i = 0; i < plane_track->point_tracksnr; i++) {
+ if (plane_track->point_tracks[i] == old_track) {
+ plane_track->point_tracks[i] = new_track;
+ }
+ }
+ }
+}
+
/* Creates new plane track out of selected point tracks */
MovieTrackingPlaneTrack *BKE_tracking_plane_track_add(MovieTracking *tracking, ListBase *plane_tracks_base,
ListBase *tracks, int framenr)
@@ -1622,17 +1641,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;
@@ -1655,7 +1674,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)
@@ -1886,7 +1905,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)
@@ -1928,7 +1947,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;
@@ -2020,7 +2039,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,
@@ -2032,7 +2051,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])
@@ -2053,8 +2072,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;
@@ -2062,8 +2081,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;
@@ -2079,8 +2098,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;
@@ -2088,8 +2107,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;
@@ -2098,7 +2117,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,
@@ -2107,7 +2126,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;
@@ -2170,7 +2189,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];
@@ -2185,7 +2204,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);
}
@@ -2197,7 +2216,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;
@@ -2229,7 +2248,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);
}
}
@@ -2240,8 +2259,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;
@@ -2305,7 +2324,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;
@@ -2318,7 +2337,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");
@@ -2367,17 +2386,19 @@ static void tracks_map_insert(TracksMap *map, MovieTrackingTrack *track, void *c
map->ptr++;
}
+/* TODO(sergey): Make it so tracks are not re-allocating here */
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;
+ ListBase *old_tracks, *plane_tracks;
int a;
if (map->is_camera) {
old_tracks = &tracking->tracks;
+ plane_tracks = &tracking->plane_tracks;
}
else {
MovieTrackingObject *object = BKE_tracking_object_get_named(tracking, map->object_name);
@@ -2388,6 +2409,7 @@ static void tracks_map_merge(TracksMap *map, MovieTracking *tracking)
}
old_tracks = &object->tracks;
+ plane_tracks = &object->plane_tracks;
}
/* duplicate currently operating tracks to temporary list.
@@ -2395,50 +2417,41 @@ 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 *new_track, *old_track;
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;
+ new_track = tracking_track_duplicate(track);
- while (cur) {
- if (cur == old)
- break;
+ /* find original of operating track in list of previously displayed tracks */
+ old_track = BLI_ghash_lookup(map->hash, track);
+ if (old_track) {
+ if (BLI_findindex(old_tracks, old_track) != -1) {
+ /* Update active track in movie clip. */
+ if (old_track == act_track) {
+ tracking->act_track = new_track;
+ }
- cur = cur->next;
- }
+ /* Update track used for rotation stabilization. */
+ if (old_track == rot_track) {
+ tracking->stabilization.rot_track = new_track;
+ }
- /* 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;
+ new_track->flag = track->flag = old_track->flag;
+ new_track->pat_flag = track->pat_flag = old_track->pat_flag;
+ new_track->search_flag = track->search_flag = old_track->search_flag;
- track->flag = cur->flag;
- track->pat_flag = cur->pat_flag;
- track->search_flag = cur->search_flag;
+ plane_tracks_replace_point_track(plane_tracks, old_track, new_track);
- BKE_tracking_track_free(cur);
- BLI_freelinkN(old_tracks, cur);
+ BKE_tracking_track_free(old_track);
+ BLI_freelinkN(old_tracks, old_track);
}
}
- new_track = tracking_track_duplicate(track);
-
- BLI_ghash_remove(map->hash, track, NULL, NULL); /* XXX: are we actually need this */
+ /* Update old-new track mapping */
+ BLI_ghash_remove(map->hash, track, NULL, NULL);
BLI_ghash_insert(map->hash, track, new_track);
- if (replace_sel) /* update current selection in clip */
- tracking->act_track = new_track;
-
- if (replace_rot) /* update track used for rotation stabilization */
- tracking->stabilization.rot_track = new_track;
-
BLI_addtail(&tracks, new_track);
}
@@ -2518,7 +2531,7 @@ typedef struct MovieTrackingContext {
MovieTrackingSettings settings;
TracksMap *tracks_map;
- short backwards, sequence;
+ bool backwards, sequence;
int sync_frame;
} MovieTrackingContext;
@@ -2691,7 +2704,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;
@@ -2887,19 +2900,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;
}
@@ -3039,7 +3057,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;
@@ -3053,7 +3071,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;
@@ -3061,7 +3079,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;
@@ -3128,7 +3146,7 @@ int BKE_tracking_context_step(MovieTrackingContext *context)
* 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;
@@ -3146,7 +3164,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
@@ -3346,12 +3364,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;
@@ -3365,7 +3383,7 @@ typedef struct MovieReconstructContext {
TracksMap *tracks_map;
float success_threshold;
- int use_fallback_reconstruction;
+ bool use_fallback_reconstruction;
int sfra, efra;
} MovieReconstructContext;
@@ -3434,7 +3452,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;
@@ -3611,12 +3629,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 */
@@ -3625,16 +3643,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.
@@ -3828,7 +3846,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;
@@ -3853,9 +3871,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,
@@ -4020,7 +4038,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);
@@ -4032,14 +4050,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
@@ -4077,7 +4095,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)
{
@@ -4107,7 +4125,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 */
@@ -4167,8 +4185,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;
@@ -4307,7 +4325,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;
@@ -4369,7 +4387,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);
@@ -4396,7 +4414,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,
@@ -4646,7 +4664,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;
@@ -4783,7 +4801,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/blenlib/BLI_callbacks.h b/source/blender/blenlib/BLI_callbacks.h
index 8a0442c8bc8..4f727773cd2 100644
--- a/source/blender/blenlib/BLI_callbacks.h
+++ b/source/blender/blenlib/BLI_callbacks.h
@@ -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/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 1962201c8d2..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;
@@ -40,24 +42,56 @@ enum {
EDGEHASH_FLAG_ALLOW_DUPES = (1 << 0), /* only checked for in debug mode */
};
-EdgeHash *BLI_edgehash_new(void);
+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);
-void BLI_edgehash_assign(EdgeHash *eh, unsigned int v0, unsigned int v1, void *val);
-void *BLI_edgehash_lookup(EdgeHash *eh, unsigned int v0, unsigned int v1);
-void **BLI_edgehash_lookup_p(EdgeHash *eh, unsigned int v0, unsigned int v1);
-bool BLI_edgehash_haskey(EdgeHash *eh, unsigned int v0, unsigned int v1);
-int BLI_edgehash_size(EdgeHash *eh);
+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 short flag);
-void BLI_edgehash_flag_clear(EdgeHash *eh, unsigned short flag);
+void BLI_edgehash_flag_set(EdgeHash *eh, unsigned int flag);
+void BLI_edgehash_flag_clear(EdgeHash *eh, unsigned int flag);
-EdgeHashIterator *BLI_edgehashIterator_new(EdgeHash *eh);
+EdgeHashIterator *BLI_edgehashIterator_new(EdgeHash *eh) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
void BLI_edgehashIterator_free(EdgeHashIterator *ehi);
void BLI_edgehashIterator_getKey(EdgeHashIterator *ehi, unsigned int *v0_r, unsigned int *v1_r);
-void *BLI_edgehashIterator_getValue(EdgeHashIterator *ehi);
+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);
+bool BLI_edgehashIterator_isDone(EdgeHashIterator *ehi) ATTR_WARN_UNUSED_RESULT;
+
+#define BLI_EDGEHASH_SIZE_GUESS_FROM_LOOPS(totloop) ((totloop) / 2)
+#define BLI_EDGEHASH_SIZE_GUESS_FROM_POLYS(totpoly) ((totpoly) * 2)
+
+/* *** EdgeSet *** */
+
+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); }
+
-#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 97dbcc051c4..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
@@ -56,77 +59,37 @@ enum {
/* *** */
-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_assign(GHash *gh, void *key, void *val, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp);
-void *BLI_ghash_lookup(GHash *gh, const void *key);
-void **BLI_ghash_lookup_p(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_flag_set(GHash *gh, unsigned short flag);
-void BLI_ghash_flag_clear(GHash *gh, unsigned short flag);
+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_); \
@@ -149,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;
@@ -164,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_stack.h b/source/blender/blenlib/BLI_linklist_stack.h
index 82ca986d9ca..e9cf820c6c8 100644
--- a/source/blender/blenlib/BLI_linklist_stack.h
+++ b/source/blender/blenlib/BLI_linklist_stack.h
@@ -81,7 +81,7 @@
BLI_mempool_destroy(_##var##_pool); \
_##var##_pool = NULL; (void)_##var##_pool; \
var = NULL; (void)var; \
- (void)_##var##_type; \
+ (void)&(_##var##_type); \
} (void)0
#include "BLI_linklist.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..d3f6c7ef14b 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);
+bool isect_point_poly_v2_int(const int pt[2], const int verts[][2], const unsigned int nr);
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]);
@@ -277,11 +294,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..543ff1bb38c 100644
--- a/source/blender/blenlib/BLI_math_interp.h
+++ b/source/blender/blenlib/BLI_math_interp.h
@@ -26,8 +26,8 @@
*
*/
-#ifndef BLI_MATH_INTERP
-#define BLI_MATH_INTERP
+#ifndef __BLI_MATH_INTERP__
+#define __BLI_MATH_INTERP__
void BLI_bicubic_interpolation_fl(const float *buffer, float *output, int width, int height,
int components, float u, float v);
@@ -41,4 +41,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__ */
diff --git a/source/blender/blenlib/BLI_math_rotation.h b/source/blender/blenlib/BLI_math_rotation.h
index b3702d10d87..87c065f3016 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);
@@ -163,13 +163,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..675ba88fc72 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]);
@@ -117,10 +113,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 +135,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 +147,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 +192,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 +262,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 +293,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..9ff4883c89c 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))
-
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..88650719712 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,29 @@ 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
-;
-
-void BLI_mempool_as_array(BLI_mempool *pool, void *data)
-#ifdef __GNUC__
-__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_arrayN(BLI_mempool *pool, const char *allocstr)
-#ifdef __GNUC__
-__attribute__((malloc))
-__attribute__((warn_unused_result))
-__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);
/** 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 +81,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..e7d2130e473 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 16384
+
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_MixBlendOperation.h b/source/blender/blenlib/BLI_sort.h
index ce3f187a5e2..4df17d98a4b 100644
--- a/source/blender/compositor/operations/COM_MixBlendOperation.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_MixBlendOperation_h
-#define _COM_MixBlendOperation_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 MixBlendOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixBlendOperation();
-
- /**
- * 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_ConvertStraightToPremulOperation.h b/source/blender/blenlib/BLI_strict_flags.h
index d0191f292d2..5c5a6f45f0c 100644
--- a/source/blender/compositor/operations/COM_ConvertStraightToPremulOperation.h
+++ b/source/blender/blenlib/BLI_strict_flags.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,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:
- * Dalai Felinto
+ * ***** END GPL LICENSE BLOCK *****
*/
-#ifndef _COM_ConvertStraightToPremulOperation_h
-#define _COM_ConvertStraightToPremulOperation_h
-#include "COM_NodeOperation.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 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);
- void initExecution();
- void deinitExecution();
-
-};
+#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_threads.h b/source/blender/blenlib/BLI_threads.h
index 154986936a2..38ad0827246 100644
--- a/source/blender/blenlib/BLI_threads.h
+++ b/source/blender/blenlib/BLI_threads.h
@@ -50,6 +50,7 @@ struct ListBase;
/*this is run once at startup*/
void BLI_threadapi_init(void);
+void BLI_threadapi_exit(void);
void BLI_init_threads(struct ListBase *threadbase, void *(*do_thread)(void *), int tot);
int BLI_available_threads(struct ListBase *threadbase);
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index 327a997bf39..c3a3c035ed3 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -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 8b604e41824..82f07268521 100644
--- a/source/blender/blenlib/CMakeLists.txt
+++ b/source/blender/blenlib/CMakeLists.txt
@@ -86,6 +86,8 @@ 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
@@ -98,14 +100,15 @@ 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_cpu.h
BLI_dlrbTree.h
BLI_dynlib.h
@@ -147,7 +150,10 @@ 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
@@ -160,6 +166,7 @@ set(SRC
BLI_voxel.h
BLI_winstuff.h
PIL_time.h
+ PIL_time_utildefines.h
)
if(WITH_BINRELOC)
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..c253aba875f
--- /dev/null
+++ b/source/blender/blenlib/PIL_time_utildefines.h
@@ -0,0 +1,95 @@
+/*
+ * ***** 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.
+ *
+ * \note requires BLI_utildefines.h for 'AT'.
+ */
+
+#ifndef __PIL_TIME_UTILDEFINES_H__
+#define __PIL_TIME_UTILDEFINES_H__
+
+#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_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c
index 8221393d4d5..fcca6cd59ba 100644
--- a/source/blender/blenlib/intern/BLI_ghash.c
+++ b/source/blender/blenlib/intern/BLI_ghash.c
@@ -43,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,
@@ -61,6 +53,16 @@ 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
+
/***/
typedef struct Entry {
@@ -69,7 +71,7 @@ typedef struct Entry {
void *key, *val;
} Entry;
-typedef struct GHash {
+struct GHash {
GHashHashFP hashfp;
GHashCmpFP cmpfp;
@@ -77,275 +79,481 @@ typedef struct GHash {
struct BLI_mempool *entrypool;
unsigned int nbuckets;
unsigned int nentries;
- unsigned short cursize, flag;
-} GHash;
+ unsigned int cursize, flag;
+};
/* -------------------------------------------------------------------- */
/* GHash API */
-/* internal utility 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 (gh->cmpfp(key, e->key) == 0) {
+ 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 void ghash_insert_ex(GHash *gh, void *key, void *val,
- unsigned int hash)
+static GHash *ghash_new(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info,
+ const unsigned int nentries_reserve,
+ const unsigned int entry_size)
{
- Entry *e = (Entry *)BLI_mempool_alloc(gh->entrypool);
+ GHash *gh = MEM_mallocN(sizeof(*gh), info);
+
+ gh->hashfp = hashfp;
+ gh->cmpfp = cmpfp;
+
+ gh->nbuckets = hashsizes[0]; /* gh->cursize */
+ gh->nentries = 0;
+ 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;
+}
+
+/**
+ * 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)
+{
+ 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;
+ if (UNLIKELY(ghash_test_expand_buckets(++gh->nentries, gh->nbuckets))) {
+ ghash_resize_buckets(gh, hashsizes[++gh->cursize]);
+ }
+}
- 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 = ghash_keyhash(gh, e->key);
- e->next = gh->buckets[hash];
- gh->buckets[hash] = e;
- }
- }
+/**
+ * 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)
+{
+ 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;
- MEM_freeN(old);
+ if (UNLIKELY(ghash_test_expand_buckets(++gh->nentries, gh->nbuckets))) {
+ ghash_resize_buckets(gh, hashsizes[++gh->cursize]);
}
}
+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);
+}
-/* Public API */
+/**
+ * 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)
+{
+ Entry *e;
+ Entry *e_prev = NULL;
-GHash *BLI_ghash_new(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info)
+ for (e = gh->buckets[hash]; e; e = 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);
+
+ if (e_prev) e_prev->next = e_next;
+ else gh->buckets[hash] = e_next;
+
+ gh->nentries--;
+ return e;
+ }
+ e_prev = e;
+ }
+
+ return NULL;
+}
+
+/**
+ * Run free callbacks for freeing entries.
+ */
+static void ghash_free_cb(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
{
- GHash *gh = MEM_mallocN(sizeof(*gh), info);
- gh->hashfp = hashfp;
- gh->cmpfp = cmpfp;
- gh->entrypool = BLI_mempool_create(sizeof(Entry), 64, 64, 0);
+ unsigned int i;
- gh->cursize = 0;
- gh->nentries = 0;
- gh->nbuckets = hashsizes[gh->cursize];
+ BLI_assert(keyfreefp || valfreefp);
- gh->buckets = MEM_callocN(gh->nbuckets * sizeof(*gh->buckets), "buckets");
+ for (i = 0; i < gh->nbuckets; i++) {
+ Entry *e;
- return gh;
+ for (e = gh->buckets[i]; e; ) {
+ Entry *e_next = e->next;
+
+ if (keyfreefp) keyfreefp(e->key);
+ if (valfreefp) valfreefp(e->val);
+
+ e = e_next;
+ }
+ }
+}
+/** \} */
+
+
+/** \name Public API
+ * \{ */
+
+/**
+ * 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)
+{
+ return ghash_new(hashfp, cmpfp, info,
+ nentries_reserve,
+ (unsigned int)sizeof(Entry));
+}
+
+/**
+ * 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);
}
+/**
+ * \return size of the GHash.
+ */
int BLI_ghash_size(GHash *gh)
{
return (int)gh->nentries;
}
+/**
+ * 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)
{
- const unsigned int hash = ghash_keyhash(gh, key);
- ghash_insert_ex(gh, key, val, hash);
+ ghash_insert(gh, key, val);
}
/**
- * Assign a new value to a key that may already be in ghash.
+ * Inserts a new value to a key that may already be in ghash.
+ *
* Avoids #BLI_ghash_remove, #BLI_ghash_insert calls (double lookups)
*
- * \note We may want to have 'BLI_ghash_assign_ex' function that takes
- * GHashKeyFreeFP & GHashValFreeFP args. for now aren't needed.
+ * \returns true if a new key has been added.
*/
-void BLI_ghash_assign(GHash *gh, void *key, void *val, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
+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;
}
}
+/**
+ * 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)
{
Entry *e = ghash_lookup_entry(gh, key);
+ IS_GHASH_ASSERT(gh);
return e ? e->val : NULL;
}
+/**
+ * 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;
}
+/**
+ * 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;
- Entry *p = NULL;
-
- for (e = gh->buckets[hash]; e; e = e->next) {
- if (gh->cmpfp(key, e->key) == 0) {
- Entry *n = 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;
-
- gh->nentries--;
- return true;
- }
- p = e;
+ Entry *e = ghash_remove_ex(gh, key, keyfreefp, valfreefp, hash);
+ if (e) {
+ BLI_mempool_free(gh->entrypool, e);
+ return true;
+ }
+ else {
+ return false;
}
-
- return false;
}
/* 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)
+/**
+ * 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)
{
const unsigned int hash = ghash_keyhash(gh, key);
- Entry *e;
- Entry *p = NULL;
-
- for (e = gh->buckets[hash]; e; e = e->next) {
- if (gh->cmpfp(key, e->key) == 0) {
- Entry *n = e->next;
- void *value = e->val;
-
- if (keyfreefp) keyfreefp(e->key);
- 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;
-
- gh->nentries--;
- return value;
- }
- p = e;
+ 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;
}
-
- return NULL;
}
+/**
+ * \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);
}
-void BLI_ghash_clear(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
+/**
+ * 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)
{
- unsigned int i;
+ if (keyfreefp || valfreefp)
+ ghash_free_cb(gh, keyfreefp, valfreefp);
- if (keyfreefp || valfreefp) {
- for (i = 0; i < gh->nbuckets; i++) {
- Entry *e;
-
- for (e = gh->buckets[i]; e; ) {
- Entry *n = e->next;
-
- 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);
}
- 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");
+
+ BLI_mempool_clear_ex(gh->entrypool, nentries_reserve ? (int)nentries_reserve : -1);
}
-void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
+/**
+ * Wraps #BLI_ghash_clear_ex with zero entries reserved.
+ */
+void BLI_ghash_clear(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
{
- unsigned int i;
-
- if (keyfreefp || valfreefp) {
- for (i = 0; i < gh->nbuckets; i++) {
- Entry *e;
-
- for (e = gh->buckets[i]; e; ) {
- Entry *n = e->next;
-
- if (keyfreefp) keyfreefp(e->key);
- if (valfreefp) valfreefp(e->val);
+ BLI_ghash_clear_ex(gh, keyfreefp, valfreefp, 0);
+}
- e = n;
- }
- }
- }
+/**
+ * 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);
}
-void BLI_ghash_flag_set(GHash *gh, unsigned short flag)
+/**
+ * Sets a GHash flag.
+ */
+void BLI_ghash_flag_set(GHash *gh, unsigned int flag)
{
gh->flag |= flag;
}
-void BLI_ghash_flag_clear(GHash *gh, unsigned short flag)
+/**
+ * Clear a GHash flag.
+ */
+void BLI_ghash_flag_clear(GHash *gh, unsigned int flag)
{
- gh->flag &= (unsigned short)~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;
@@ -358,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) {
@@ -384,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)
@@ -450,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");
@@ -497,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..45bdeeedcf9 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"
/***/
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index a4c72aa26b0..80483fbfa38 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;
@@ -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_memarena.c b/source/blender/blenlib/intern/BLI_memarena.c
index ef10cb805ad..747c2f0c2b7 100644
--- a/source/blender/blenlib/intern/BLI_memarena.c
+++ b/source/blender/blenlib/intern/BLI_memarena.c
@@ -30,18 +30,13 @@
* \ingroup bli
*/
+#include <string.h>
+
#include "MEM_guardedalloc.h"
#include "BLI_memarena.h"
#include "BLI_linklist.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"
struct MemArena {
unsigned char *curbuf;
@@ -89,6 +84,16 @@ void BLI_memarena_free(MemArena *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 +103,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,11 +115,7 @@ 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;
@@ -125,3 +124,32 @@ void *BLI_memarena_alloc(MemArena *ma, int size)
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);
+ }
+ }
+}
diff --git a/source/blender/blenlib/intern/BLI_mempool.c b/source/blender/blenlib/intern/BLI_mempool.c
index bb326a23d59..febf09745fb 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,16 +43,8 @@
#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
-#endif
/* note: copied from BLO_blend_defs.h, don't use here because we're in BLI */
#ifdef __BIG_ENDIAN__
@@ -65,37 +60,181 @@
/* currently totalloc isnt used */
// #define USE_TOTALLOC
+/* when undefined, merge the allocs for BLI_mempool_chunk and its data */
+// #define USE_DATA_PTR
+
+/**
+ * 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)
+{
+ return totelem / pchunk + 1;
+}
+
+static BLI_mempool_chunk *mempool_chunk_alloc(BLI_mempool *pool)
{
- BLI_mempool *pool = NULL;
- BLI_freenode *lasttail = NULL, *curnode = NULL;
- int i, j, maxchunks;
+ 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 +256,25 @@ 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;
- }
- }
-
- /* set the end of this chunks memory to the new tail for next iteration */
- lasttail = curnode;
-#ifdef USE_TOTALLOC
- pool->totalloc += pool->pchunk;
-#endif
+ BLI_mempool_chunk *mpchunk = mempool_chunk_alloc(pool);
+ lasttail = mempool_chunk_add(pool, mpchunk, lasttail);
}
- /* terminate the list */
- curnode->next = NULL;
+
return pool;
}
@@ -189,46 +285,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 +297,6 @@ void *BLI_mempool_alloc(BLI_mempool *pool)
}
pool->free = pool->free->next;
- //memset(retval, 0, pool->esize);
return retval;
}
@@ -258,6 +316,22 @@ 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");
+ }
+ }
+#endif
+
if (pool->flag & BLI_MEMPOOL_ALLOW_ITER) {
#ifndef NDEBUG
/* this will detect double free's */
@@ -275,33 +349,18 @@ void BLI_mempool_free(BLI_mempool *pool, void *addr)
if (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++) {
+ 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;
@@ -312,14 +371,14 @@ void BLI_mempool_free(BLI_mempool *pool, void *addr)
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 +396,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 +409,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 +435,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 +448,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 +469,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 +496,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 +523,69 @@ 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;
+
+ 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);
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);
}
}
diff --git a/source/blender/blenlib/intern/boxpack2d.c b/source/blender/blenlib/intern/boxpack2d.c
index 8a97fdcab67..1087b02b3bb 100644
--- a/source/blender/blenlib/intern/boxpack2d.c
+++ b/source/blender/blenlib/intern/boxpack2d.c
@@ -27,7 +27,9 @@
#include <stdlib.h> /* for qsort */
#include "MEM_guardedalloc.h"
-#include "BLI_boxpack2d.h"
+#include "BLI_strict_flags.h"
+
+#include "BLI_boxpack2d.h" /* own include */
/* BoxPacker for backing 2D rectangles into a square
*
@@ -169,11 +171,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++) {
@@ -241,7 +243,7 @@ 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 */
@@ -318,7 +320,7 @@ void BLI_box_pack_2D(BoxPack *boxarray, const int len, float *tot_width, float *
(*tot_height) = max_ff(BOXTOP(box), (*tot_height));
/* Place the box */
- vert->free &= ~quad_flags[j];
+ vert->free &= (short)~quad_flags[j];
switch (j) {
case TR:
diff --git a/source/blender/blenlib/intern/edgehash.c b/source/blender/blenlib/intern/edgehash.c
index bac69183f0c..b26e007b3e6 100644
--- a/source/blender/blenlib/intern/edgehash.c
+++ b/source/blender/blenlib/intern/edgehash.c
@@ -38,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[] = {
@@ -55,6 +48,16 @@ static const unsigned int _ehash_hashsizes[] = {
268435459
};
+/* 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) \
if (v0 > v1) { \
@@ -75,36 +78,94 @@ struct EdgeHash {
EdgeEntry **buckets;
BLI_mempool *epool;
unsigned int nbuckets, nentries;
- unsigned short cursize, flag;
+ unsigned int cursize, flag;
};
/* -------------------------------------------------------------------- */
/* EdgeHash API */
-/* internal utility API */
-
-#define EDGE_HASH(v0, v1) ((v0 * 39) ^ (v1 * 31))
+/** \name Internal Utility API
+ * \{ */
+/**
+ * Get the hash for a key.
+ */
BLI_INLINE unsigned int edgehash_keyhash(EdgeHash *eh, unsigned int v0, unsigned int v1)
{
BLI_assert(v0 < v1);
- return EDGE_HASH(v0, v1) % eh->nbuckets;
+
+ 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);
}
+/**
+ * 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 (v0 == e->v0 && v1 == e->v1) {
+ 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;
@@ -113,12 +174,40 @@ BLI_INLINE EdgeEntry *edgehash_lookup_entry(EdgeHash *eh, unsigned int v0, unsig
return edgehash_lookup_entry_ex(eh, v0, v1, hash);
}
-static void edgehash_insert_ex(EdgeHash *eh, unsigned int v0, unsigned int v1, void *val,
- unsigned int 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);
@@ -130,44 +219,85 @@ static void edgehash_insert_ex(EdgeHash *eh, unsigned int v0, unsigned int v1, v
e->val = val;
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 = edgehash_keyhash(eh, e->v0, e->v1);
- e->next = eh->buckets[hash];
- eh->buckets[hash] = e;
- }
- }
+/**
+ * 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;
+ /* intentionally leave value unset */
+ eh->buckets[hash] = e;
+
+ if (UNLIKELY(edgehash_test_expand_buckets(++eh->nentries, eh->nbuckets))) {
+ edgehash_resize_buckets(eh, _ehash_hashsizes[++eh->cursize]);
+ }
+}
+
+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;
- MEM_freeN(old);
+ BLI_assert(valfreefp);
+
+ for (i = 0; i < eh->nbuckets; i++) {
+ EdgeEntry *e;
+
+ for (e = eh->buckets[i]; e; ) {
+ EdgeEntry *e_next = e->next;
+
+ if (valfreefp) valfreefp(e->val);
+
+ e = e_next;
+ }
}
}
-#undef EDGE_HASH
+/** \} */
+/** \name Public API
+ * \{ */
+
/* Public API */
-EdgeHash *BLI_edgehash_new(void)
+EdgeHash *BLI_edgehash_new_ex(const char *info,
+ const unsigned int nentries_reserve)
{
- 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);
+ return edgehash_new(info,
+ nentries_reserve,
+ sizeof(EdgeEntry));
+}
- return eh;
+EdgeHash *BLI_edgehash_new(const char *info)
+{
+ return BLI_edgehash_new_ex(info, 0);
}
/**
@@ -176,29 +306,30 @@ EdgeHash *BLI_edgehash_new(void)
*/
void BLI_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);
+ edgehash_insert(eh, v0, v1, val);
}
/**
* Assign a new value to a key that may already be in edgehash.
*/
-void BLI_edgehash_assign(EdgeHash *eh, unsigned int v0, unsigned int v1, void *val)
+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);
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;
}
}
@@ -209,6 +340,7 @@ void BLI_edgehash_assign(EdgeHash *eh, unsigned int v0, unsigned int v1, void *v
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;
}
@@ -221,6 +353,7 @@ void **BLI_edgehash_lookup_p(EdgeHash *eh, unsigned int v0, unsigned int v1)
void *BLI_edgehash_lookup(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;
}
@@ -243,30 +376,32 @@ int BLI_edgehash_size(EdgeHash *eh)
/**
* Remove all edges from hash.
*/
-void BLI_edgehash_clear(EdgeHash *eh, EdgeHashFreeFP valfreefp)
+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);
@@ -275,20 +410,25 @@ void BLI_edgehash_free(EdgeHash *eh, EdgeHashFreeFP valfreefp)
}
-void BLI_edgehash_flag_set(EdgeHash *eh, unsigned short flag)
+void BLI_edgehash_flag_set(EdgeHash *eh, unsigned int flag)
{
eh->flag |= flag;
}
-void BLI_edgehash_flag_clear(EdgeHash *eh, unsigned short flag)
+void BLI_edgehash_flag_clear(EdgeHash *eh, unsigned int flag)
{
- eh->flag &= (unsigned short)~flag;
+ eh->flag &= ~flag;
}
+/** \} */
+
/* -------------------------------------------------------------------- */
/* EdgeHash Iterator API */
+/** \name Iterator API
+ * \{ */
+
struct EdgeHashIterator {
EdgeHash *eh;
unsigned int curBucket;
@@ -344,6 +484,14 @@ void *BLI_edgehashIterator_getValue(EdgeHashIterator *ehi)
}
/**
+ * 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)
@@ -378,3 +526,80 @@ 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..8e22d6f1182 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,11 +54,11 @@ 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 {
@@ -67,14 +68,14 @@ bool BLI_lasso_is_point_inside(const int mcords[][2], const short moves,
}
/* 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..cf1377f6627 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,15 @@ 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)
{
/* 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 +729,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 +747,19 @@ 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);
}
-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)
{
/* 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 +768,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,7 +786,6 @@ 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);
@@ -878,6 +894,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,6 +1098,22 @@ bool isect_ray_tri_threshold_v3(const float p1[3], const float d[3],
}
/**
+ * 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, optionally treat line as directional (like a ray) with the no_flip argument.
*
* \param out The intersection point.
@@ -1050,50 +1121,28 @@ bool isect_ray_tri_threshold_v3(const float p1[3], const float d[3],
* \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 +1168,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);
}
@@ -1645,6 +1694,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 +1820,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 +1874,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) {
@@ -2137,8 +2200,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 +2214,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 +2244,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);
+ }
}
}
@@ -3616,4 +3687,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_rotation.c b/source/blender/blenlib/intern/math_rotation.c
index 9fd8c479d6e..c9919e7be37 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);
}
@@ -993,7 +993,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 +1018,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 +1229,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 +1478,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 +1503,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 +1531,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 +1610,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));
}
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c
index 8e5040d983b..ce5d9657c7f 100644
--- a/source/blender/blenlib/intern/math_vector_inline.c
+++ b/source/blender/blenlib/intern/math_vector_inline.c
@@ -771,61 +771,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 +851,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/path_util.c b/source/blender/blenlib/intern/path_util.c
index 2c06a812c8a..68e0f2c4026 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"
@@ -1649,6 +1641,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 +1695,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 +1716,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 525bb37ae40..7bb0747daaa 100644
--- a/source/blender/blenlib/intern/smallhash.c
+++ b/source/blender/blenlib/intern/smallhash.c
@@ -31,6 +31,7 @@
#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,14 +44,6 @@
#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 *), \
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/threads.c b/source/blender/blenlib/intern/threads.c
index 2b6fb52c49c..c8b84d9310a 100644
--- a/source/blender/blenlib/intern/threads.c
+++ b/source/blender/blenlib/intern/threads.c
@@ -107,7 +107,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 +134,24 @@ 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)
+{
+ BLI_spin_end(&_malloc_lock);
}
/* tot = 0 only initializes malloc mutex in a safe way (see sequence.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..0cd473fd74d 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 */
@@ -3123,7 +3120,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 +3395,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) {
@@ -4373,12 +4367,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);
@@ -4829,8 +4819,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 +5013,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);
@@ -5443,10 +5434,10 @@ static void direct_link_scene(FileData *fd, Scene *sce)
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 +5694,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 +6031,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 +6119,10 @@ 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);
+ if (ui_list->properties)
+ IDP_DirectLinkProperty(ui_list->properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
}
if (spacetype == SPACE_EMPTY) {
@@ -6324,7 +6311,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 +7020,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);
}
@@ -7148,7 +7135,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) {
@@ -9455,12 +9442,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 +9477,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) {
@@ -9578,11 +9565,11 @@ 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
@@ -9625,6 +9612,32 @@ 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;
+ }
+ }
+ }
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
@@ -10526,11 +10539,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 +10963,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 +11098,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 +11148,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 +11227,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_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c
index 82040020ce4..dad132f45df 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;
}
}
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index b7254ffe1a9..90405583544 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;
@@ -2394,6 +2391,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;
@@ -2475,7 +2481,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;
diff --git a/source/blender/bmesh/CMakeLists.txt b/source/blender/bmesh/CMakeLists.txt
index 533593d6f77..67f95cca6aa 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
@@ -119,6 +121,8 @@ set(SRC
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
@@ -132,8 +136,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 1f7c9ee97f6..7905a57633e 100644
--- a/source/blender/bmesh/bmesh.h
+++ b/source/blender/bmesh/bmesh.h
@@ -222,7 +222,7 @@
* - 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.
+ * - use two different iterator types for BMO map/buffer types.
* - avoid string lookups for BMO slot lookups _especially_ when used in loops, this is very crappy.
*
*
@@ -251,8 +251,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,13 +269,6 @@ extern "C" {
#include "intern/bmesh_inline.h"
-#include "tools/bmesh_bevel.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
diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h
index 0e4c014a06a..13ed505a8d8 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. */
diff --git a/source/blender/compositor/operations/COM_MixColorOperation.h b/source/blender/bmesh/bmesh_tools.h
index 1409d726f03..b2dac810bce 100644
--- a/source/blender/compositor/operations/COM_MixColorOperation.h
+++ b/source/blender/bmesh/bmesh_tools.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,35 @@
* 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):
+ *
+ * ***** END GPL LICENSE BLOCK *****
*/
-#ifndef _COM_MixColorOperation_h
-#define _COM_MixColorOperation_h
-#include "COM_MixBaseOperation.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 MixColorOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixColorOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-};
+#ifdef __cplusplus
+extern "C" {
#endif
+
+#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..1633a54398a 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,64 +66,10 @@ 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);
}
/**
@@ -171,7 +118,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 +238,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 +266,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 +327,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 +347,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 +369,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 +428,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 +447,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;
}
@@ -824,6 +753,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 +833,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;
diff --git a/source/blender/bmesh/intern/bmesh_construct.h b/source/blender/bmesh/intern/bmesh_construct.h
index f0bd7b316e9..0ee626dec64 100644
--- a/source/blender/bmesh/intern/bmesh_construct.h
+++ b/source/blender/bmesh/intern/bmesh_construct.h
@@ -29,20 +29,19 @@
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);
-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..34e11f5c9f9 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);
@@ -86,10 +87,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 +114,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;
@@ -148,8 +150,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 +192,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 +231,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 +254,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 +262,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);
@@ -320,11 +323,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 +337,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 +368,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
/**
@@ -1053,7 +1094,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 +1121,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 */
@@ -1243,7 +1282,7 @@ BMFace *bmesh_sfme(BMesh *bm, BMFace *f, BMVert *v1, BMVert *v2,
}
/* 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 +1423,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 +2009,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 +2175,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;
diff --git a/source/blender/bmesh/intern/bmesh_core.h b/source/blender/bmesh/intern/bmesh_core.h
index c9e806335dd..a18c2ebd32c 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);
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_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.h b/source/blender/bmesh/intern/bmesh_iterators.h
index b5535b59321..bb25d3fabd1 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.
@@ -181,18 +182,10 @@ 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
-;
+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 b50f35be4f3..30728636a58 100644
--- a/source/blender/bmesh/intern/bmesh_log.c
+++ b/source/blender/bmesh/intern/bmesh_log.c
@@ -95,6 +95,7 @@ struct BMLog {
typedef struct {
float co[3];
+ short no[3];
float mask;
char hflag;
} BMLogVert;
@@ -117,8 +118,8 @@ static void bm_log_vert_id_set(BMLog *log, BMVert *v, unsigned int id)
{
void *vid = SET_INT_IN_POINTER(id);
- BLI_ghash_assign(log->id_to_elem, vid, v, NULL, NULL);
- BLI_ghash_assign(log->elem_to_id, v, vid, NULL, NULL);
+ 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 */
@@ -141,8 +142,8 @@ static void bm_log_face_id_set(BMLog *log, BMFace *f, unsigned int id)
{
void *fid = SET_INT_IN_POINTER(id);
- BLI_ghash_assign(log->id_to_elem, fid, f, NULL, NULL);
- BLI_ghash_assign(log->elem_to_id, f, fid, NULL, NULL);
+ 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 */
@@ -187,6 +188,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;
}
@@ -273,9 +275,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));
}
}
@@ -291,7 +294,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));
}
}
@@ -305,8 +308,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);
@@ -400,7 +407,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);
@@ -434,8 +441,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);
@@ -927,6 +934,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..4767c82ff2f 100644
--- a/source/blender/bmesh/intern/bmesh_log.h
+++ b/source/blender/bmesh/intern/bmesh_log.h
@@ -92,6 +92,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..cc2324ba34a 100644
--- a/source/blender/bmesh/intern/bmesh_mesh.c
+++ b/source/blender/bmesh/intern/bmesh_mesh.c
@@ -667,14 +667,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 +701,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 +734,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");
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..3ffdd0f86a6 100644
--- a/source/blender/bmesh/intern/bmesh_mods.c
+++ b/source/blender/bmesh/intern/bmesh_mods.c
@@ -356,10 +356,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 +372,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 +380,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;
}
@@ -1067,7 +1068,7 @@ 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;
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c
index 371d55f385e..e6291cac241 100644
--- a/source/blender/bmesh/intern/bmesh_opdefines.c
+++ b/source/blender/bmesh/intern/bmesh_opdefines.c
@@ -577,6 +577,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,8 +631,9 @@ static BMOpDefine bmo_edgenet_fill_def = {
"edgenet_fill",
/* slots_in */
{{"edges", BMO_OP_SLOT_ELEMENT_BUF, {BM_EDGE}}, /* input edges */
- {"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 */
@@ -1095,6 +1118,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.
@@ -1130,6 +1177,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}},
@@ -1549,7 +1598,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 */
@@ -1601,7 +1652,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 */
};
/*
@@ -1728,6 +1779,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 */
@@ -1770,6 +1822,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,
@@ -1810,6 +1863,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..9551c55959e 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)
+{
+ BLI_assert(iter->slot->slot_subtype.map == BMO_OP_SLOT_SUBTYPE_MAP_FLT);
+ return **((float **)iter->val);
+}
+
+int BMO_iter_map_value_int(BMOIter *iter)
{
- return *((void **)iter->val);
+ BLI_assert(iter->slot->slot_subtype.map == BMO_OP_SLOT_SUBTYPE_MAP_INT);
+ return **((int **)iter->val);
}
-float BMO_iter_map_value_f(BMOIter *iter)
+bool BMO_iter_map_value_bool(BMOIter *iter)
{
- return *((float *)iter->val);
+ BLI_assert(iter->slot->slot_subtype.map == BMO_OP_SLOT_SUBTYPE_MAP_BOOL);
+ return **((int **)iter->val);
}
/* error system */
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..a82d3d07712 100644
--- a/source/blender/bmesh/intern/bmesh_polygon.c
+++ b/source/blender/bmesh/intern/bmesh_polygon.c
@@ -875,7 +875,7 @@ static BMLoop *poly_find_ear(BMFace *f, float (*projectverts)[2], const bool use
i++;
} while ((l_iter = l_iter->next) != l_first);
- /* pick 0/1 based on best lenth */
+ /* pick 0/1 based on best length */
/* 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);
@@ -1203,3 +1203,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..14fe1e76360 100644
--- a/source/blender/bmesh/intern/bmesh_polygon.h
+++ b/source/blender/bmesh/intern/bmesh_polygon.h
@@ -27,40 +27,40 @@
* \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);
+ 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 20769872012..9b4f34d18f2 100644
--- a/source/blender/bmesh/intern/bmesh_queries.c
+++ b/source/blender/bmesh/intern/bmesh_queries.c
@@ -992,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
@@ -1714,14 +1733,14 @@ bool BM_face_exists_overlap(BMVert **varr, const int len, BMFace **r_f_overlap)
#ifdef DEBUG
/* check flag isn't already set */
- for(i = 0; i < len; i++) {
+ 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++) {
+ 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)) {
@@ -1764,7 +1783,7 @@ bool BM_face_exists_overlap_subset(BMVert **varr, const int len)
#ifdef DEBUG
/* check flag isn't already set */
- for(i = 0; i < len; i++) {
+ 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);
@@ -1772,7 +1791,7 @@ bool BM_face_exists_overlap_subset(BMVert **varr, const int len)
}
#endif
- for(i = 0; i < len; i++) {
+ 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*/
@@ -1780,7 +1799,7 @@ bool BM_face_exists_overlap_subset(BMVert **varr, const int len)
if (is_init == false) {
is_init = true;
- for(i = 0; i < len; i++) {
+ for (i = 0; i < len; i++) {
BM_ELEM_API_FLAG_ENABLE(varr[i], _FLAG_OVERLAP);
}
}
@@ -1805,7 +1824,7 @@ bool BM_face_exists_overlap_subset(BMVert **varr, const int len)
}
if (is_init == true) {
- for(i = 0; i < len; i++) {
+ for (i = 0; i < len; i++) {
BM_ELEM_API_FLAG_DISABLE(varr[i], _FLAG_OVERLAP);
}
}
diff --git a/source/blender/bmesh/intern/bmesh_queries.h b/source/blender/bmesh/intern/bmesh_queries.h
index 38d30b2d005..16c8875dce3 100644
--- a/source/blender/bmesh/intern/bmesh_queries.h
+++ b/source/blender/bmesh/intern/bmesh_queries.h
@@ -108,6 +108,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..a68d9ccd2bc 100644
--- a/source/blender/bmesh/intern/bmesh_walkers_impl.c
+++ b/source/blender/bmesh/intern/bmesh_walkers_impl.c
@@ -85,7 +85,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 +95,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)
@@ -167,8 +167,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 +177,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 +187,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 +211,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 +223,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)
@@ -251,7 +251,7 @@ static void *bmw_ConnectedVertexWalker_step(BMWalker *walker)
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 +276,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);
}
@@ -334,11 +334,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 +367,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;
}
@@ -403,18 +403,18 @@ 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;
}
}
@@ -448,7 +448,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 +494,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)
@@ -531,7 +530,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 +542,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 +556,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 +566,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 +601,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 +611,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 +654,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 +664,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 +693,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 +738,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 +750,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)
@@ -806,8 +803,9 @@ static void *bmw_FaceLoopWalker_step(BMWalker *walker)
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 +836,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 +856,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)
@@ -925,7 +922,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
@@ -937,14 +934,14 @@ static void *bmw_EdgeringWalker_step(BMWalker *walker)
}
/* 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 +954,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)
@@ -1004,7 +1001,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 +1019,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..a6d781c2066 100644
--- a/source/blender/bmesh/operators/bmo_beautify.c
+++ b/source/blender/bmesh/operators/bmo_beautify.c
@@ -28,7 +28,7 @@
*
* 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
+ * To avoid this - each edge stores a set of it previous
* states so as not to rotate back.
*
* TODO
@@ -47,6 +47,7 @@
#ifdef DEBUG_TIME
# include "PIL_time.h"
+# include "PIL_time_utildefines.h"
#endif
enum {
@@ -54,14 +55,14 @@ enum {
};
/* -------------------------------------------------------------------- */
-/* GHash for edge rotation */
+/* 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_ghashutil_hash(const void *ptr)
+static unsigned int erot_gsetutil_hash(const void *ptr)
{
const EdRotState *e_state = (const EdRotState *)ptr;
unsigned int
@@ -71,7 +72,7 @@ static unsigned int erot_ghashutil_hash(const void *ptr)
hash ^= BLI_ghashutil_inthash(SET_INT_IN_POINTER(e_state->f2));
return hash;
}
-static int erot_ghashutil_cmp(const void *a, const void *b)
+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;
@@ -86,9 +87,9 @@ static int erot_ghashutil_cmp(const void *a, const void *b)
else return 0;
}
-static GHash *erot_ghash_new(void)
+static GSet *erot_gset_new(void)
{
- return BLI_ghash_new(erot_ghashutil_hash, erot_ghashutil_cmp, __func__);
+ return BLI_gset_new(erot_gsetutil_hash, erot_gsetutil_cmp, __func__);
}
/* ensure v0 is smaller */
@@ -236,12 +237,12 @@ static float bm_edge_calc_rotate_beauty(const BMEdge *e, const int flag)
/* 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,
+static void bm_edge_update_beauty_cost_single(BMEdge *e, Heap *eheap, HeapNode **eheap_table, GSet **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];
+ GSet *e_state_set = edge_state_arr[i];
if (eheap_table[i]) {
BLI_heap_remove(eheap, eheap_table[i]);
@@ -254,10 +255,10 @@ static void bm_edge_update_beauty_cost_single(BMEdge *e, Heap *eheap, HeapNode *
// 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) {
+ if (e_state_set != NULL) {
EdRotState e_state_alt;
erot_state_alternate(e, &e_state_alt);
- if (BLI_ghash_haskey(e_state_hash, (void *)&e_state_alt)) {
+ if (BLI_gset_haskey(e_state_set, (void *)&e_state_alt)) {
// printf(" skipping, we already have this state\n");
return;
}
@@ -277,7 +278,7 @@ static void bm_edge_update_beauty_cost_single(BMEdge *e, Heap *eheap, HeapNode *
}
/* 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,
+static void bm_edge_update_beauty_cost(BMEdge *e, Heap *eheap, HeapNode **eheap_table, GSet **edge_state_arr,
const int flag)
{
BMLoop *l;
@@ -308,7 +309,7 @@ static void bm_mesh_beautify_fill(BMesh *bm, BMEdge **edge_array, const int edge
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__);
+ GSet **edge_state_arr = MEM_callocN(edge_array_len * sizeof(GSet *), __func__);
BLI_mempool *edge_state_pool = BLI_mempool_create(sizeof(EdRotState), 512, 512, BLI_MEMPOOL_SYSMALLOC);
int i;
@@ -338,18 +339,18 @@ static void bm_mesh_beautify_fill(BMesh *bm, BMEdge **edge_array, const int edge
e = BM_edge_rotate(bm, e, false, BM_EDGEROT_CHECK_EXISTS);
if (LIKELY(e)) {
- GHash *e_state_hash = edge_state_arr[i];
+ GSet *e_state_set = edge_state_arr[i];
- /* add the new state into the hash so we don't move into this state again
+ /* 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_hash == NULL)) {
- edge_state_arr[i] = e_state_hash = erot_ghash_new(); /* store previous state */
+ if (UNLIKELY(e_state_set == NULL)) {
+ edge_state_arr[i] = e_state_set = erot_gset_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);
+ 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));
@@ -373,7 +374,7 @@ static void bm_mesh_beautify_fill(BMesh *bm, BMEdge **edge_array, const int edge
for (i = 0; i < edge_array_len; i++) {
if (edge_state_arr[i]) {
- BLI_ghash_free(edge_state_arr[i], NULL, NULL);
+ BLI_gset_free(edge_state_arr[i], NULL);
}
}
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..f4bb73f87ea 100644
--- a/source/blender/bmesh/operators/bmo_bridge.c
+++ b/source/blender/bmesh/operators/bmo_bridge.c
@@ -121,7 +121,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 +273,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 +342,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 +355,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;
diff --git a/source/blender/bmesh/operators/bmo_create.c b/source/blender/bmesh/operators/bmo_create.c
index cce5c992d2a..dd814fa8bfb 100644
--- a/source/blender/bmesh/operators/bmo_create.c
+++ b/source/blender/bmesh/operators/bmo_create.c
@@ -153,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 mat_nr=%i use_smooth=%b",
- ELE_NEW, 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);
@@ -182,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;
}
@@ -283,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 e038b6b9f05..d3c7a6864c3 100644
--- a/source/blender/bmesh/operators/bmo_dissolve.c
+++ b/source/blender/bmesh/operators/bmo_dissolve.c
@@ -32,6 +32,8 @@
#include "BLI_math.h"
#include "bmesh.h"
+#include "bmesh_tools.h"
+
#include "intern/bmesh_operators_private.h"
diff --git a/source/blender/bmesh/operators/bmo_dupe.c b/source/blender/bmesh/operators/bmo_dupe.c
index 1dc7b0a414d..bd2485b92fb 100644
--- a/source/blender/bmesh/operators/bmo_dupe.c
+++ b/source/blender/bmesh/operators/bmo_dupe.c
@@ -46,23 +46,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 +74,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 +133,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);
-
- BM_elem_attrs_copy(source_mesh, target_mesh, source_face, target_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);
- /* 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 +183,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 +194,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 +212,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 +245,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 +265,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 +273,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 +312,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 +471,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 +510,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 6c88161ca35..c58a11f21ec 100644
--- a/source/blender/bmesh/operators/bmo_edgenet.c
+++ b/source/blender/bmesh/operators/bmo_edgenet.c
@@ -37,6 +37,7 @@
#include "BLI_heap.h"
#include "bmesh.h"
+#include "bmesh_tools.h"
#include "intern/bmesh_operators_private.h" /* own include */
@@ -50,19 +51,23 @@
void bmo_edgenet_fill_exec(BMesh *bm, BMOperator *op)
{
+ BMOperator op_attr;
BMOIter siter;
BMFace *f;
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 int sides = BMO_slot_int_get(op->slots_in, "sides");
if (!bm->totvert || !bm->totedge)
return;
+ 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);
- BM_mesh_edgenet(bm, true, FACE_NEW);
+ BM_mesh_elem_hflag_disable_all(bm, BM_FACE, BM_ELEM_TAG, false);
+ BM_mesh_edgenet(bm, true, true); // TODO, sides
- BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "faces.out", BM_FACE, FACE_NEW);
+ 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) {
f->mat_nr = mat_nr;
@@ -73,13 +78,20 @@ void bmo_edgenet_fill_exec(BMesh *bm, BMOperator *op)
BM_face_normal_update(f);
}
- /* recalc normals,
- * TODO, could do checks to make normals consistent */
- {
- BMO_op_callf(bm, op->flag,
- "recalc_face_normals faces=%S",
- op, "faces.out");
+ /* --- 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);
+
+ BMO_op_exec(bm, &op_attr);
+
+ /* 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);
+
}
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 e388205552e..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);
@@ -170,7 +170,7 @@ void bmo_extrude_edge_only_exec(BMesh *bm, BMOperator *op)
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);
@@ -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..f53b4536e44
--- /dev/null
+++ b/source/blender/bmesh/operators/bmo_fill_attribute.c
@@ -0,0 +1,176 @@
+
+/*
+ * ***** 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 "MEM_guardedalloc.h"
+
+#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..35916c76e85 100644
--- a/source/blender/bmesh/operators/bmo_fill_grid.c
+++ b/source/blender/bmesh/operators/bmo_fill_grid.c
@@ -103,6 +103,94 @@ 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.
+ * Since this runs on each loop, could reduce calls to #barycentric_weights_v2_quad.
+ */
+static void bm_loop_interp_from_grid_boundary_4(BMesh *bm, BMLoop *l, BMLoop *l_bound[4], const float uv[2])
+{
+ float cos[4][2] = {
+ {uv[0], 0},
+ {0, uv[1]},
+ {uv[0], 1},
+ {1, uv[1]}};
+
+ void *l_cdata[4] = {
+ l_bound[0]->head.data,
+ l_bound[1]->head.data,
+ l_bound[2]->head.data,
+ l_bound[3]->head.data};
+
+ float w[4];
+
+ barycentric_weights_v2_quad(UNPACK4(cos), uv, w);
+ 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);
+}
+
+/** \} */
+
+
/**
* This may be useful outside the bmesh operator.
*
@@ -113,8 +201,12 @@ static void bm_grid_fill_array(BMesh *bm, BMVert **v_grid, const int xtot, const
const bool use_flip)
{
const bool use_vert_interp = CustomData_has_interp(&bm->vdata);
+ const bool use_loop_interp = CustomData_has_interp(&bm->ldata);
int x, y;
+ /* for use_loop_interp */
+ BMLoop *((*larr_x_a)[2]), *((*larr_x_b)[2]), *((*larr_y_a)[2]), *((*larr_y_b)[2]);
+
#define XY(_x, _y) ((_x) + ((_y) * (xtot)))
#ifdef BARYCENTRIC_INTERP
@@ -141,6 +233,31 @@ static void bm_grid_fill_array(BMesh *bm, BMVert **v_grid, const int xtot, const
true);
#endif
+
+ /* 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
@@ -187,7 +304,7 @@ static void bm_grid_fill_array(BMesh *bm, BMVert **v_grid, const int xtot, const
(float)y / ((float)ytot - 1));
#endif
- 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
@@ -218,7 +335,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 +345,90 @@ 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;
+ float uv[2]; /* xy in the grid */
+ 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++) {
+
+ uv[0] = (float)(x + x_side) / (xtot - 1);
+ uv[1] = (float)(y + y_side) / (ytot - 1);
+
+ if (interp_from == 'B') {
+ 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, uv);
+ }
+ else if (interp_from == 'X') {
+ 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, uv[1]);
+ }
+ else if (interp_from == 'Y') {
+ 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, uv[0]);
+ }
+ else {
+ BLI_assert(0);
+ }
+ }
+ }
}
+ /* end interp */
+
+
BMO_elem_flag_enable(bm, f, FACE_OUT);
f->mat_nr = mat_nr;
if (use_smooth) {
@@ -237,6 +436,14 @@ 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);
+ }
+
#undef XY
}
diff --git a/source/blender/bmesh/operators/bmo_fill_holes.c b/source/blender/bmesh/operators/bmo_fill_holes.c
index 40a682e790d..8160d28d7a7 100644
--- a/source/blender/bmesh/operators/bmo_fill_holes.c
+++ b/source/blender/bmesh/operators/bmo_fill_holes.c
@@ -28,110 +28,58 @@
#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..e3a8e67c427 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,7 +135,7 @@ 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);
+ f = BM_face_create_verts(bm, t->v, 3, example, BM_CREATE_NO_DOUBLE, true);
BM_face_copy_shared(bm, f);
}
/* Mark face for 'geom.out' slot and select */
@@ -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;
@@ -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 cffca91eabd..2063e458550 100644
--- a/source/blender/bmesh/operators/bmo_inset.c
+++ b/source/blender/bmesh/operators/bmo_inset.c
@@ -32,6 +32,7 @@
#include "BLI_math.h"
#include "BLI_array.h"
+#include "BLI_alloca.h"
#include "BLI_memarena.h"
#include "BKE_customdata.h"
@@ -42,199 +43,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;
-
- BMLoop *l_a;
- BMLoop *l_b;
+ /* copy loop data */
+ l_other = l_iter->radial_next;
- 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 +315,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 +353,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 +489,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 +532,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 +811,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.
@@ -894,7 +918,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..6d4f257909c 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)
{
@@ -214,7 +204,8 @@ void bmo_join_triangles_exec(BMesh *bm, BMOperator *op)
BMOIter siter;
BMFace *f;
BMEdge *e;
- JoinEdge *jedges = NULL;
+ /* 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;
diff --git a/source/blender/bmesh/operators/bmo_poke.c b/source/blender/bmesh/operators/bmo_poke.c
index 690a8a5176f..de65f4767ff 100644
--- a/source/blender/bmesh/operators/bmo_poke.c
+++ b/source/blender/bmesh/operators/bmo_poke.c
@@ -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..45653f3411f 100644
--- a/source/blender/bmesh/operators/bmo_primitive.c
+++ b/source/blender/bmesh/operators/bmo_primitive.c
@@ -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 4ee4979fdcd..5ab909ffb0c 100644
--- a/source/blender/bmesh/operators/bmo_removedoubles.c
+++ b/source/blender/bmesh/operators/bmo_removedoubles.c
@@ -71,6 +71,11 @@ static void remdoubles_splitface(BMFace *f, BMesh *bm, BMOperator *op, BMOpSlot
#define EDGE_COL 2
#define FACE_MARK 2
+/**
+ * \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;
@@ -189,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];
@@ -495,13 +498,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 dd720c9cc0f..4b538dccb4e 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 *****
*/
@@ -29,656 +29,81 @@
#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(__func__);
-
- 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(__func__);
-
- 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);
+#define ELE_OUT 1
- 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) {
- BMVert *v_split = BLI_ghash_lookup(symm->edge_split_map, e);
- if (v_split) {
- /* 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]) {
- BMVert *v_src = BLI_ghash_lookup(symm->vert_symm_map, sp->src_verts[v]);
- if (v_src)
- return v_src;
- 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);
-
- 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;
- }
-
- 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;
+ 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;
- 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);
+ BMOperator op_bisect;
+ BMOperator op_dupe;
+ BMOperator op_weld;
- /* Find first loop edge crossing the axis */
- symm_poly_next_crossing(symm, &sp, 0, &l1, &l2);
+ BMOpSlot *slot_vertmap;
+ BMOpSlot *slot_targetmap;
- /* 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);
- }
+ float plane_no[3];
+ float scale[3];
- /* 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;
+ BMOIter siter;
+ BMVert *v;
- /* Calculate number of new polygons/loops */
- if (segment_len == 0) {
- }
- else if (sp.already_symmetric) {
- int new_loops;
+ copy_v3_fl(plane_no, 0.0f);
+ copy_v3_fl(scale, 1.0f);
- 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;
+ plane_no[axis] = direction > 2 ? 1.0f : -1.0f;
+ scale[axis] *= -1.0f;
- BLI_array_empty(fv);
- BLI_array_empty(fe);
- BLI_array_grow_items(fv, new_loops);
- BLI_array_grow_items(fe, new_loops);
+ /* 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);
- 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);
+ BMO_op_exec(bm, &op_bisect);
- symm_mesh_output_poly_with_splits(symm, &sp,
- fv, fe,
- segment_len,
- l2);
+ /* Duplicate */
+ BMO_op_initf(bm, &op_dupe, op->flag,
+ "duplicate geom=%S",
+ &op_bisect, "geom.out");
- 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);
+ BMO_op_exec(bm, &op_dupe);
- symm_mesh_output_poly_with_splits(symm, &sp,
- fv, fe,
- segment_len,
- l2);
+ /* 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);
- BM_face_kill(symm->bm, f);
- /* Output bridge triangle */
+ 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");
- BLI_array_empty(fv);
- BLI_array_empty(fe);
- BLI_array_grow_items(fv, 3);
- BLI_array_grow_items(fe, 3);
- 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);
- }
+ /* Weld verts */
+ BMO_op_init(bm, &op_weld, op->flag, "weld_verts");
- BLI_assert(fv[0] && fv[1] && fv[2]);
+ slot_vertmap = BMO_slot_get(op_dupe.slots_out, "vert_map.out");
+ slot_targetmap = BMO_slot_get(op_weld.slots_in, "targetmap");
- symm_face_create_v(symm->bm, NULL, fv, fe, 3);
- }
- }
+ 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);
}
- BLI_array_free(pv);
- BLI_array_free(fv);
- BLI_array_free(fe);
-}
-
-/* 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)));
-
- 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);
- }
- }
-
- /* 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);
- }
- }
-}
-
-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..590b5ea97c4 100644
--- a/source/blender/bmesh/operators/bmo_triangulate.c
+++ b/source/blender/bmesh/operators/bmo_triangulate.c
@@ -34,6 +34,7 @@
#include "BLI_scanfill.h"
#include "bmesh.h"
+#include "bmesh_tools.h"
#include "intern/bmesh_operators_private.h"
@@ -58,6 +59,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 +67,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 +96,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 +134,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..e23358bf4ff 100644
--- a/source/blender/bmesh/operators/bmo_utils.c
+++ b/source/blender/bmesh/operators/bmo_utils.c
@@ -41,14 +41,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)
diff --git a/source/blender/bmesh/operators/bmo_wireframe.c b/source/blender/bmesh/operators/bmo_wireframe.c
index c07e2c3bbf2..e87dd29b153 100644
--- a/source/blender/bmesh/operators/bmo_wireframe.c
+++ b/source/blender/bmesh/operators/bmo_wireframe.c
@@ -229,9 +229,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 +269,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 +303,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);
}
}
}
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c
index 27ca8c6ccc0..adeb3fdc630 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) {
@@ -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.
@@ -1143,7 +1133,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;
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..3baf8675a0d
--- /dev/null
+++ b/source/blender/bmesh/tools/bmesh_bisect_plane.c
@@ -0,0 +1,412 @@
+/*
+ * ***** 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_mempool.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);
+
+ (void)bm;
+ (void)plane;
+
+ /* 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)) {
+ 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 {
+ /* 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);
+ }
+ }
+
+ }
+ }
+ }
+ }
+ }
+
+ 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_RenderLayersAOOperation.h b/source/blender/bmesh/tools/bmesh_bisect_plane.h
index 71b0b885e81..15f902642c8 100644
--- a/source/blender/compositor/operations/COM_RenderLayersAOOperation.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_RenderLayersAOOperation_h
-#define _COM_RenderLayersAOOperation_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 RenderLayersAOOperation : public RenderLayersBaseProg {
-public:
- RenderLayersAOOperation();
-};
+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_unsubdivide.c b/source/blender/bmesh/tools/bmesh_decimate_unsubdivide.c
index 0667d560615..bc9288f98f6 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)
diff --git a/source/blender/bmesh/tools/bmesh_edgenet.c b/source/blender/bmesh/tools/bmesh_edgenet.c
index ed5d47e9391..14d474fed61 100644
--- a/source/blender/bmesh/tools/bmesh_edgenet.c
+++ b/source/blender/bmesh/tools/bmesh_edgenet.c
@@ -37,14 +37,10 @@
#include "BLI_linklist.h"
#include "bmesh.h"
+#include "bmesh_edgenet.h" /* own include */
+
+#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
-#endif
/* Data for one end of an edge involved in a bevel */
typedef struct VertNetInfo {
@@ -117,7 +113,7 @@ static unsigned int bm_edgenet_path_from_pass(
v_ls_tot += 1;
v = vn->prev;
vn = &vnet_info[BM_elem_index_get(v)];
- } while ((vn->pass == pass));
+ } while (vn->pass == pass);
return v_ls_tot;
}
@@ -132,7 +128,7 @@ static bool bm_edgenet_path_check_overlap(
{
/* vert order doesn't matter */
unsigned int v_ls_tot = 0;
- LinkNode *v_ls;
+ LinkNode *v_ls = NULL;
BMVert *v_pair[2] = {v1, v2};
unsigned int i;
@@ -145,7 +141,7 @@ static bool bm_edgenet_path_check_overlap(
v_ls_tot += 1;
v = vn->prev;
vn = &vnet_info[BM_elem_index_get(v)];
- } while ((vn->pass == pass));
+ } while (vn->pass == pass);
}
if (v_ls_tot) {
@@ -193,7 +189,7 @@ static BMFace *bm_edgenet_face_from_path(
}
#endif
- f = BM_face_create(bm, vert_arr, edge_arr, (int)path_len, 0);
+ f = BM_face_create(bm, vert_arr, edge_arr, (int)path_len, NULL, BM_CREATE_NOP);
return f;
}
@@ -443,7 +439,8 @@ static LinkNode *bm_edgenet_path_calc_best(
* \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 short face_oflag)
+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);
@@ -491,8 +488,8 @@ void BM_mesh_edgenet(BMesh *bm, const bool use_edge_tag, const short face_oflag)
}
} while ((l_iter = l_iter->next) != l_first);
- if (face_oflag) {
- BMO_elem_flag_enable(bm, f, face_oflag);
+ if (use_new_face_tag) {
+ BM_elem_flag_enable(f, BM_ELEM_TAG);
}
/* the face index only needs to be unique, not kept valid */
diff --git a/source/blender/bmesh/tools/bmesh_edgenet.h b/source/blender/bmesh/tools/bmesh_edgenet.h
index ffb3fa133da..327a7f5aa23 100644
--- a/source/blender/bmesh/tools/bmesh_edgenet.h
+++ b/source/blender/bmesh/tools/bmesh_edgenet.h
@@ -27,6 +27,7 @@
* \ingroup bmesh
*/
-void BM_mesh_edgenet(BMesh *bm, const bool use_edge_tag, const short face_oflag);
+void BM_mesh_edgenet(BMesh *bm,
+ const bool use_edge_tag, const bool use_new_face_tag);
#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/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/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp
index c6337e27218..5592be6e872 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/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp
index 8aa68ed9d04..0c46a2bd858 100644
--- a/source/blender/collada/MeshImporter.cpp
+++ b/source/blender/collada/MeshImporter.cpp
@@ -857,7 +857,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..85bbaf4748f 100644
--- a/source/blender/collada/collada.cpp
+++ b/source/blender/collada/collada.cpp
@@ -83,16 +83,6 @@ int collada_export(Scene *sce,
{
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;
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/compositor/CMakeLists.txt b/source/blender/compositor/CMakeLists.txt
index a119a89c842..29049511321 100644
--- a/source/blender/compositor/CMakeLists.txt
+++ b/source/blender/compositor/CMakeLists.txt
@@ -368,48 +368,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 +394,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 +425,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 +445,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 +526,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/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_MemoryBuffer.cpp b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
index 357a4c1d4c0..4bebf004a89 100644
--- a/source/blender/compositor/intern/COM_MemoryBuffer.cpp
+++ b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
@@ -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/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_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..c3aaf8358fe 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"
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_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_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_ConvertPremulToStraightOperation.h b/source/blender/compositor/operations/COM_ConvertPremulToStraightOperation.h
deleted file mode 100644
index 9d3ab156555..00000000000
--- a/source/blender/compositor/operations/COM_ConvertPremulToStraightOperation.h
+++ /dev/null
@@ -1,48 +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
- */
-
-#ifndef _COM_ConvertPremulToStraightOperation_h
-#define _COM_ConvertPremulToStraightOperation_h
-#include "COM_NodeOperation.h"
-
-
-/**
- * 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();
-};
-#endif
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_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_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_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_MixAddOperation.h b/source/blender/compositor/operations/COM_MixAddOperation.h
deleted file mode 100644
index 5a52846e847..00000000000
--- a/source/blender/compositor/operations/COM_MixAddOperation.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_MixAddOperation_h
-#define _COM_MixAddOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-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);
-
-};
-#endif
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_MixBurnOperation.h b/source/blender/compositor/operations/COM_MixBurnOperation.h
deleted file mode 100644
index 131ccfa2130..00000000000
--- a/source/blender/compositor/operations/COM_MixBurnOperation.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_MixBurnOperation_h
-#define _COM_MixBurnOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-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);
-
-};
-#endif
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_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_OutputFileOperation.cpp b/source/blender/compositor/operations/COM_OutputFileOperation.cpp
index 15e5ab947d4..d0eadc5c4d1 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,
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 c90e915fcd5..2385219c656 100644
--- a/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp
@@ -106,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()
@@ -114,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()
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 22820375831..3aeef6bf409 100644
--- a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
+++ b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
@@ -62,7 +62,22 @@ void ReadBufferOperation::executePixel(float output[4], float x, float y, PixelS
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);
}
}
diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.h b/source/blender/compositor/operations/COM_ReadBufferOperation.h
index c8dcfb7c33d..7a67056eda6 100644
--- a/source/blender/compositor/operations/COM_ReadBufferOperation.h
+++ b/source/blender/compositor/operations/COM_ReadBufferOperation.h
@@ -41,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_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_RenderLayersColorOperation.h b/source/blender/compositor/operations/COM_RenderLayersColorOperation.h
deleted file mode 100644
index 4f4dfbfb6f3..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersColorOperation.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_RenderLayersColorOperation_h
-#define _COM_RenderLayersColorOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersColorOperation : public RenderLayersBaseProg {
-public:
- RenderLayersColorOperation();
-};
-
-#endif
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_RenderLayersCyclesOperation.h b/source/blender/compositor/operations/COM_RenderLayersCyclesOperation.h
deleted file mode 100644
index baa53c7388b..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersCyclesOperation.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_RenderLayersCyclesOperation_h
-#define _COM_RenderLayersCyclesOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersCyclesOperation : public RenderLayersBaseProg {
-public:
- RenderLayersCyclesOperation(int pass);
-};
-
-#endif
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_RenderLayersDepthProg.h b/source/blender/compositor/operations/COM_RenderLayersDepthProg.h
deleted file mode 100644
index fdbe25c818e..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersDepthProg.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_RenderLayersDepthProg_h
-#define _COM_RenderLayersDepthProg_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersDepthProg : public RenderLayersBaseProg {
-public:
- RenderLayersDepthProg();
-
-};
-
-#endif
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..8a32502982c
--- /dev/null
+++ b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
@@ -0,0 +1,340 @@
+/*
+ * 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);
+}
+
+/* ******** 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..48aaa47cc50 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();
+};
+
+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_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_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/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_filter.c b/source/blender/editors/animation/anim_filter.c
index 91003674524..041a2c2216e 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -1541,10 +1541,16 @@ static size_t animdata_filter_ds_nodetree(bAnimContext *ac, ListBase *anim_data,
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) {
+ 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 +1561,10 @@ 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->id.flag & LIB_DOIT))
+ continue;
+ linestyle->id.flag &= ~LIB_DOIT;
/* add scene-level animation channels */
BEGIN_ANIMFILTER_SUBCHANNELS(FILTER_LS_SCED(linestyle))
@@ -2533,13 +2543,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 +2559,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 +2570,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/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/keyframing.c b/source/blender/editors/animation/keyframing.c
index 63acc5a943c..cfc03050a9e 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -256,7 +256,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? */
}
}
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/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/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/curve_intern.h b/source/blender/editors/curve/curve_intern.h
index d197697e60b..8a5e4b338d3 100644
--- a/source/blender/editors/curve/curve_intern.h
+++ b/source/blender/editors/curve/curve_intern.h
@@ -76,6 +76,7 @@ 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);
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..ce0881b2e11 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -106,11 +106,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);
-
-/* still need to eradicate a few :( */
-#define CALLOC_STRUCT_N(x, y, name) (x *)MEM_callocN((y) * sizeof(x), name)
+typedef enum eVisible_Types {
+ HIDDEN = true,
+ VISIBLE = false,
+} eVisible_Types;
+
+typedef enum eEndPoint_Types {
+ FIRST = true,
+ LAST = false,
+} eEndPoint_Types;
+
+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_selected(Object *obedit, const eCurveElem_Types type, const bool split);
static float nurbcircle[8][2] = {
{0.0, -1.0}, {-1.0, -1.0}, {-1.0, 0.0}, {-1.0, 1.0},
@@ -149,69 +163,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 +365,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 +678,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;
@@ -1463,6 +1467,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_selected(obedit, CURVE_SEGMENT, 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_editcurve;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+}
+
/* ******************* FLAGS ********************* */
static short isNurbselUV(Nurb *nu, int *u, int *v, int flag)
@@ -1614,9 +1661,8 @@ 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;
@@ -1744,9 +1790,6 @@ 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;
}
@@ -1869,40 +1912,54 @@ 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, *newnu, *startnu;
BezTriple *bezt, *bezt1;
BPoint *bp, *bp1;
Curve *cu = (Curve *)obedit->data;
- int a, b, starta, enda, newu, newv;
+ int a, b, starta, enda, diffa, newu, newv;
char *usel;
cu->lastsel = NULL;
nu = editnurb->last;
while (nu) {
+ startnu = NULL;
if (nu->type == CU_BEZIER) {
bezt = nu->bezt;
for (a = 0; a < nu->pntsu; a++) {
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));
+ diffa = enda - starta + 1;
+
+ if (startnu != NULL && enda == nu->pntsu - 1) {
+ /* end point of cyclic spline selected, so merge end points with start points */
+ bezt1 = (BezTriple *)MEM_mallocN((startnu->pntsu + diffa) * sizeof(BezTriple), "adduplicateN");
+ memcpy(bezt1, &nu->bezt[starta], diffa * sizeof(BezTriple));
+ memcpy(&bezt1[diffa], startnu->bezt, startnu->pntsu * sizeof(BezTriple));
+
+ MEM_freeN(startnu->bezt);
+ startnu->bezt = bezt1;
+ startnu->pntsu += diffa;
+ newnu = startnu;
+ }
+ else {
+ newnu = ED_curve_nurbcpy(nu, diffa);
+ BLI_addtail(newnurb, newnu);
+ set_actNurb(obedit, newnu);
+ memcpy(newnu->bezt, &nu->bezt[starta], newnu->pntsu * sizeof(BezTriple));
+ }
b = newnu->pntsu;
bezt1 = newnu->bezt;
@@ -1914,6 +1971,7 @@ static void adduplicateflagNurb(Object *obedit, short flag)
if (nu->flagu & CU_NURB_CYCLIC) {
if (starta != 0 || enda != nu->pntsu - 1) {
newnu->flagu &= ~CU_NURB_CYCLIC;
+ if (starta == 0) startnu = newnu;
}
}
}
@@ -1926,20 +1984,32 @@ static void adduplicateflagNurb(Object *obedit, short flag)
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));
+ diffa = enda - starta + 1;
+
+ if (startnu != NULL && enda == nu->pntsu - 1) {
+ /* end point of cyclic spline selected, so merge end points with start points */
+ bp1 = (BPoint *)MEM_mallocN((startnu->pntsu + diffa) * sizeof(BPoint), "adduplicateN2");
+ memcpy(bp1, &nu->bp[starta], diffa * sizeof(BPoint));
+ memcpy(&bp1[diffa], startnu->bp, startnu->pntsu * sizeof(BPoint));
+
+ MEM_freeN(startnu->bp);
+ startnu->bp = bp1;
+ startnu->pntsu += diffa;
+ newnu = startnu;
+ }
+ else {
+ newnu = ED_curve_nurbcpy(nu, diffa);
+ BLI_addtail(newnurb, newnu);
+ set_actNurb(obedit, newnu);
+ memcpy(newnu->bp, &nu->bp[starta], newnu->pntsu * sizeof(BPoint));
+ }
b = newnu->pntsu;
bp1 = newnu->bp;
@@ -1951,12 +2021,9 @@ static void adduplicateflagNurb(Object *obedit, short flag)
if (nu->flagu & CU_NURB_CYCLIC) {
if (starta != 0 || enda != nu->pntsu - 1) {
newnu->flagu &= ~CU_NURB_CYCLIC;
+ if (starta == 0) startnu = newnu;
}
}
-
- /* knots */
- newnu->knotsu = NULL;
- BKE_nurb_knot_calc_u(newnu);
}
bp++;
}
@@ -1964,7 +2031,7 @@ static void adduplicateflagNurb(Object *obedit, short flag)
else {
/* a rectangular area in nurb has to be selected */
if (isNurbsel(nu)) {
- usel = MEM_callocN(nu->pntsu, "adduplicateN4");
+ usel = MEM_callocN(nu->pntsu, "adduplicateN3");
bp = nu->bp;
for (a = 0; a < nu->pntsv; a++) {
for (b = 0; b < nu->pntsu; b++, bp++) {
@@ -1993,13 +2060,13 @@ static void adduplicateflagNurb(Object *obedit, short flag)
if (newu == 1) SWAP(int, newu, newv);
- newnu = (Nurb *)MEM_mallocN(sizeof(Nurb), "adduplicateN5");
+ newnu = (Nurb *)MEM_mallocN(sizeof(Nurb), "adduplicateN4");
memcpy(newnu, nu, sizeof(Nurb));
- BLI_addtail(editnurb, newnu);
+ BLI_addtail(newnurb, newnu);
set_actNurb(obedit, newnu);
newnu->pntsu = newu;
newnu->pntsv = newv;
- newnu->bp = (BPoint *)MEM_mallocN(newu * newv * sizeof(BPoint), "adduplicateN6");
+ newnu->bp = (BPoint *)MEM_mallocN(newu * newv * sizeof(BPoint), "adduplicateN5");
BKE_nurb_order_clamp_u(newnu);
BKE_nurb_order_clamp_v(newnu);
@@ -2040,6 +2107,22 @@ static void adduplicateflagNurb(Object *obedit, short flag)
nu = nu->prev;
}
+ for (nu = newnurb->first; nu; nu = nu->next) {
+ /* knots done after duplicate as pntsu may change */
+ if (nu->pntsv == 1) {
+ nu->knotsu = NULL;
+ BKE_nurb_knot_calc_u(nu);
+ }
+
+ if (split) {
+ if (nu->type == CU_BEZIER) {
+ /* recalc first and last */
+ BKE_nurb_handle_calc_simple(nu, &nu->bezt[0]);
+ BKE_nurb_handle_calc_simple(nu, &nu->bezt[nu->pntsu - 1]);
+ }
+ }
+ }
+
/* actnu changed */
}
@@ -2513,7 +2596,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 +2615,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 +2636,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 +2661,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 +2680,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 +2688,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 +2708,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 +2723,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 +2748,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 +2873,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 +2891,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 +2947,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 +2958,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 +3924,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 +4232,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 +4244,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 +4261,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 +4269,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,11 +4286,11 @@ 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;
}
}
@@ -4217,7 +4301,7 @@ bool mouse_nurb(bContext *C, const int mval[2], bool extend, bool deselect, bool
if (bezt) {
if (hand == 1) {
- select_beztriple(bezt, SELECT, 1, HIDDEN);
+ select_beztriple(bezt, SELECT, SELECT, HIDDEN);
cu->lastsel = bezt;
}
else {
@@ -4229,7 +4313,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);
}
}
@@ -4944,7 +5028,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 +5044,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 +5105,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 +5114,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++;
}
}
@@ -5103,10 +5187,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 +5301,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 +5316,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 +5425,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 +5471,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 +5513,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 +5565,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 +5575,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 +5618,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 +5637,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 +5656,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 +5679,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--;
@@ -5672,9 +5754,14 @@ void CURVE_OT_select_nth(wmOperatorType *ot)
static int duplicate_exec(bContext *C, wmOperator *UNUSED(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);
+ }
return OPERATOR_FINISHED;
}
@@ -5696,37 +5783,31 @@ void CURVE_OT_duplicate(wmOperatorType *ot)
/********************** delete operator *********************/
-static int delete_exec(bContext *C, wmOperator *op)
+static int curve_delete_selected(Object *obedit, eCurveElem_Types type, const bool split)
{
- Object *obedit = CTX_data_edit_object(C);
Curve *cu = obedit->data;
EditNurb *editnurb = cu->editnurb;
ListBase *nubase = &editnurb->nurbs;
- Nurb *nu, *nu1;
+ Nurb *nu, *nu1, *startnu;
BezTriple *bezt, *bezt1, *bezt2;
BPoint *bp, *bp1, *bp2;
- int a, cut = 0, type = RNA_enum_get(op->ptr, "type");
+ int a, b, starta, enda, cut = 0;
int nuindex = 0;
+ ListBase newnurb = {NULL, NULL};
if (obedit->type == OB_SURF) {
- if (type == 0) {
- deleteflagNurb(C, op, 1);
+ if (type == CURVE_VERTEX) {
+ return deleteflagNurb(obedit, SELECT);
}
else {
keyIndex_delNurbList(editnurb, nubase);
BKE_nurbList_free(nubase);
- if (ED_curve_updateAnimPaths(obedit->data))
- WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit);
+ return OPERATOR_FINISHED;
}
-
- WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
- DAG_id_tag_update(obedit->data, 0);
-
- return OPERATOR_FINISHED;
}
- if (type == 0) {
+ if (type == CURVE_VERTEX) {
/* first loop, can we remove entire pieces? */
Nurb *next;
nu = nubase->first;
@@ -5861,204 +5942,343 @@ static int delete_exec(bContext *C, wmOperator *op)
nu = next;
}
}
- else if (type == 1) { /* erase segment */
- /* find the 2 selected points */
- bezt1 = bezt2 = NULL;
- bp1 = bp2 = NULL;
- nu1 = NULL;
- nuindex = 0;
+ else if (type == CURVE_SEGMENT) {
for (nu = nubase->first; nu; nu = nu->next) {
+ startnu = nu1 = NULL;
+ starta = enda = cut = -1;
+
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 */
+ 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 = ED_curve_nurbcpy(nu, cut);
+ }
+ 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 = ED_curve_nurbcpy(nu, cut + 1);
+ ED_curve_beztcpy(editnurb, &nu1->bezt[1], nu->bezt, cut);
+ starta = nu->pntsu - 1;
+ cut = 1;
+ }
+ else {
+ nu1 = ED_curve_nurbcpy(nu, cut);
+
+ if (nu->flagu & CU_NURB_CYCLIC) startnu = nu1;
+ }
+ }
+ 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 = ED_curve_nurbcpy(nu, cut + 1);
+ ED_curve_beztcpy(editnurb, &nu1->bezt[cut], nu->bezt, 1);
+ }
+ else if (startnu != NULL) {
+ /* if startnu exists it is a cyclic spline, start and end should be connected */
+ bezt1 = (BezTriple *)MEM_mallocN((cut + startnu->pntsu) * sizeof(BezTriple), "delNurb3");
+ ED_curve_beztcpy(editnurb, bezt1, &nu->bezt[starta], cut);
+ ED_curve_beztcpy(editnurb, &bezt1[cut], nu->bezt, startnu->pntsu);
+
+ MEM_freeN(startnu->bezt);
+ startnu->bezt = bezt1;
+ startnu->pntsu += cut;
+
+ if (split) {
+ for (b = 0; b < startnu->pntsu; b++, bezt1++) {
+ select_beztriple(bezt1, DESELECT, SELECT, true);
+ }
+ }
+
+ BKE_nurb_handles_calc(startnu);
+ }
+ else {
+ nu1 = ED_curve_nurbcpy(nu, cut);
+ }
}
- 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 {
+ /* mid spline selection, copy adjacent start and end */
+ starta--;
+ enda++;
+ cut = enda - starta + 1;
+
+ nu1 = ED_curve_nurbcpy(nu, cut);
+ }
+
+ if (nu1 != NULL) {
+ ED_curve_beztcpy(editnurb, nu1->bezt, &nu->bezt[starta], cut);
+
+ if (starta != 0 || enda != nu->pntsu - 1) nu1->flagu &= ~CU_NURB_CYCLIC;
+
+ if (split) {
+ /* deselect for split operator */
+ for (b = 0, bezt1 = nu1->bezt; b < nu1->pntsu; b++, bezt1++) {
+ select_beztriple(bezt1, DESELECT, SELECT, true);
}
}
- return OPERATOR_FINISHED;
+ BLI_addtail(&newnurb, nu1);
+ BKE_nurb_handles_calc(nu1);
+ 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 */
+ bezt1 = nu->bezt;
+ bezt2 = &nu->bezt[1];
+ if (BEZSELECTED_HIDDENHANDLES(cu, bezt1) && BEZSELECTED_HIDDENHANDLES(cu, bezt2)) {
+ nu1 = ED_curve_nurbcpy(nu, 1);
+ ED_curve_beztcpy(editnurb, nu1->bezt, bezt1, 1);
+ BLI_addtail(&newnurb, nu1);
+ }
+
+ bezt1 = &nu->bezt[nu->pntsu - 1];
+ bezt2 = &nu->bezt[nu->pntsu - 2];
+ if (BEZSELECTED_HIDDENHANDLES(cu, bezt1) && BEZSELECTED_HIDDENHANDLES(cu, bezt2)) {
+ nu1 = ED_curve_nurbcpy(nu, 1);
+ ED_curve_beztcpy(editnurb, nu1->bezt, bezt1, 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 */
+ 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 if (a < nu->pntsu - 1 && !((bp + 1)->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->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 = ED_curve_nurbcpy(nu, 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->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 = ED_curve_nurbcpy(nu, cut + 1);
+ ED_curve_bpcpy(editnurb, &nu1->bp[1], nu->bp, cut);
+ starta = nu->pntsu - 1;
+ cut = 1;
+ }
+ else {
+ nu1 = ED_curve_nurbcpy(nu, cut);
+
+ if (nu->flagu & CU_NURB_CYCLIC) startnu = nu1;
+ }
+ }
+ 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 = ED_curve_nurbcpy(nu, cut + 1);
+ ED_curve_bpcpy(editnurb, &nu1->bp[cut], nu->bp, 1);
+ }
+ else if (startnu != NULL) {
+ /* if startnu exists it is a cyclic spline, start and end should be connected */
+ bp1 = (BPoint *)MEM_mallocN((cut + startnu->pntsu) * sizeof(BPoint), "delNurb4");
+ ED_curve_bpcpy(editnurb, bp1, &nu->bp[starta], cut);
+ ED_curve_bpcpy(editnurb, &bp1[cut], nu->bp, startnu->pntsu);
+
+ MEM_freeN(startnu->bp);
+ startnu->bp = bp1;
+ startnu->pntsu += cut;
+
+ if (split) {
+ for (b = 0; b < startnu->pntsu; b++, bp1++) {
+ select_bpoint(bp1, DESELECT, SELECT, HIDDEN);
+ }
}
+
+ BKE_nurb_order_clamp_u(startnu);
+ BKE_nurb_knot_calc_u(startnu);
+ }
+ else {
+ nu1 = ED_curve_nurbcpy(nu, cut);
}
+ }
+ else {
+ /* mid spline selection, copy adjacent start and end */
+ starta--;
+ enda++;
+ cut = enda - starta + 1;
- return OPERATOR_FINISHED;
+ nu1 = ED_curve_nurbcpy(nu, cut);
}
- cut = a;
- nu1 = nu;
- break;
- }
- bp++;
- }
- }
- 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);
+ if (nu1 != NULL) {
+ ED_curve_bpcpy(editnurb, nu1->bp, &nu->bp[starta], cut);
- nu1->flagu &= ~CU_NURB_CYCLIC;
- MEM_freeN(bezt);
- BKE_nurb_handles_calc(nu);
- }
- else { /* add new curve */
+ if (starta != 0 || enda != nu->pntsu - 1) nu1->flagu &= ~CU_NURB_CYCLIC;
-/* seems to be an error here... but where? (a can become zero) */
+ if (split) {
+ /* deselect for split operator */
+ for (b = 0, bp1 = nu1->bp; b < nu1->pntsu; b++, bp1++) {
+ select_bpoint(bp1, DESELECT, SELECT, HIDDEN);
+ }
+ }
- 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;
+ BLI_addtail(&newnurb, nu1);
+ nu1->knotsu = NULL;
+ BKE_nurb_order_clamp_u(nu1);
+ BKE_nurb_knot_calc_u(nu1);
+ nu1 = NULL;
+ }
+ starta = enda = -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);
- }
- }
- 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;
- }
- 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);
+ 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 = ED_curve_nurbcpy(nu, 1);
+ ED_curve_bpcpy(editnurb, nu1->bp, bp1, 1);
+ BLI_addtail(&newnurb, nu1);
+ nu1->knotsu = NULL;
+ }
- BKE_nurb_order_clamp_u(nu1);
- BKE_nurb_knot_calc_u(nu1);
+ bp1 = &nu->bp[nu->pntsu - 1];
+ bp2 = &nu->bp[nu->pntsu - 2];
+ if ((bp1->f1 & SELECT) && (bp2->f1 & SELECT)) {
+ nu1 = ED_curve_nurbcpy(nu, 1);
+ ED_curve_bpcpy(editnurb, nu1->bp, bp1, 1);
+ BLI_addtail(&newnurb, nu1);
+ nu1->knotsu = NULL;
+ }
}
}
}
- }
- else if (type == 2) {
- cu->actnu = -1;
- keyIndex_delNurbList(editnurb, nubase);
+
BKE_nurbList_free(nubase);
+ BLI_movelisttolist(nubase, &newnurb);
+ }
+ else {
+ BLI_assert(0);
}
- 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 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 = curve_delete_selected(obedit, type, false);
+
+ 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 retval;
+}
+
+static EnumPropertyItem curve_delete_type_items[] = {
+ {CURVE_VERTEX, "VERTICES", 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)
+{
+ Object *obedit;
+ EnumPropertyItem *item = NULL;
+ int totitem = 0;
+
+
+ if (!C) /* needed for docs and i18n tools */
+ return curve_delete_type_items;
+
+ obedit = CTX_data_edit_object(C);
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);
+ RNA_enum_items_add_value(&item, &totitem, curve_delete_type_items, CURVE_VERTEX);
}
else {
- pup = uiPupMenuBegin(C, IFACE_("Delete"), ICON_NONE);
- layout = uiPupMenuLayout(pup);
- uiItemsEnumO(layout, op->type->idname, "type");
- uiPupMenuEnd(C, pup);
+ 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);
}
- return OPERATOR_CANCELLED;
+ 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 +6286,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 *********************/
@@ -6345,7 +6568,7 @@ Nurb *add_nurbs_primitive(bContext *C, Object *obedit, float mat[4][4], int type
nu->pntsu = 4;
nu->pntsv = 1;
nu->orderu = 4;
- nu->bp = CALLOC_STRUCT_N(BPoint, 4, "addNurbprim3");
+ nu->bp = (BPoint *)MEM_callocN(sizeof(BPoint) * 4, "addNurbprim3");
bp = nu->bp;
for (a = 0; a < 4; a++, bp++) {
@@ -6381,7 +6604,7 @@ Nurb *add_nurbs_primitive(bContext *C, Object *obedit, float mat[4][4], int type
nu->orderu = 5;
nu->flagu = CU_NURB_ENDPOINT; /* endpoint */
nu->resolu = cu->resolu;
- nu->bp = CALLOC_STRUCT_N(BPoint, 5, "addNurbprim3");
+ nu->bp = (BPoint *)MEM_callocN(sizeof(BPoint) * 5, "addNurbprim3");
bp = nu->bp;
for (a = 0; a < 5; a++, bp++) {
@@ -6414,7 +6637,7 @@ Nurb *add_nurbs_primitive(bContext *C, Object *obedit, float mat[4][4], int type
if (cutype == CU_BEZIER) {
if (!force_3d) nu->flag |= CU_2D;
nu->pntsu = 4;
- nu->bezt = CALLOC_STRUCT_N(BezTriple, 4, "addNurbprim1");
+ nu->bezt = (BezTriple *)MEM_callocN(sizeof(BezTriple) * 4, "addNurbprim1");
nu->flagu = CU_NURB_CYCLIC;
bezt = nu->bezt;
@@ -6451,7 +6674,7 @@ Nurb *add_nurbs_primitive(bContext *C, Object *obedit, float mat[4][4], int type
nu->pntsu = 8;
nu->pntsv = 1;
nu->orderu = 4;
- nu->bp = CALLOC_STRUCT_N(BPoint, 8, "addNurbprim6");
+ nu->bp = (BPoint *)MEM_callocN(sizeof(BPoint) * 8, "addNurbprim6");
nu->flagu = CU_NURB_CYCLIC;
bp = nu->bp;
@@ -6484,7 +6707,7 @@ Nurb *add_nurbs_primitive(bContext *C, Object *obedit, float mat[4][4], int type
nu->orderu = 4;
nu->orderv = 4;
nu->flag = CU_SMOOTH;
- nu->bp = CALLOC_STRUCT_N(BPoint, 4 * 4, "addNurbprim6");
+ nu->bp = (BPoint *)MEM_callocN(sizeof(BPoint) * (4 * 4), "addNurbprim6");
nu->flagu = 0;
nu->flagv = 0;
bp = nu->bp;
@@ -6546,7 +6769,7 @@ Nurb *add_nurbs_primitive(bContext *C, Object *obedit, float mat[4][4], int type
nu->resolu = cu->resolu;
nu->resolv = cu->resolv;
nu->flag = CU_SMOOTH;
- nu->bp = CALLOC_STRUCT_N(BPoint, 5, "addNurbprim6");
+ nu->bp = (BPoint *)MEM_callocN(sizeof(BPoint) * 5, "addNurbprim6");
nu->flagu = 0;
bp = nu->bp;
@@ -7158,6 +7381,22 @@ void ED_curve_bpcpy(EditNurb *editnurb, BPoint *dst, BPoint *src, int count)
keyIndex_updateBP(editnurb, src, dst, count);
}
+Nurb *ED_curve_nurbcpy(Nurb *src, int count)
+{
+ Nurb *newnu = (Nurb *)MEM_mallocN(sizeof(Nurb), "copyNurb");
+ memcpy(newnu, src, sizeof(Nurb));
+ newnu->pntsu = count;
+
+ if (src->bezt) {
+ newnu->bezt = (BezTriple *)MEM_mallocN(count * sizeof(BezTriple), "copyNurb2");
+ }
+ else {
+ newnu->bp = (BPoint *)MEM_mallocN(count * sizeof(BPoint), "copyNurb3");
+ }
+
+ return newnu;
+}
+
int ED_curve_actSelection(Curve *cu, float center[3])
{
Nurb *nu = get_lastsel_nurb(cu);
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..c5dc8654e9d 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;
}
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 4c5727f16ed..da832554443 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -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];
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_mask.h b/source/blender/editors/include/ED_mask.h
index 420ab24e5e9..3e2dbe255df 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);
diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h
index 90b131e5acc..7553cb3699c 100644
--- a/source/blender/editors/include/ED_object.h
+++ b/source/blender/editors/include/ED_object.h
@@ -92,7 +92,7 @@ typedef enum eParentType {
PAR_PATH_CONST,
PAR_LATTICE,
PAR_VERTEX,
- PAR_TRIA
+ PAR_VERTEX_TRI
} eParentType;
#ifdef __RNA_TYPES_H__
@@ -101,7 +101,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 +123,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 */
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_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/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..8b395505623 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"
@@ -327,30 +328,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 +535,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 +826,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..fb70ad50b5d 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);
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 21a63183c1a..ec5a4d0027d 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -985,7 +985,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... */
@@ -1807,12 +1807,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 +2049,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 +2233,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 +2257,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);
}
}
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index f9ee2b67e6b..dc7813510ec 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;
@@ -2660,8 +2663,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 +2682,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;
}
@@ -3406,6 +3413,100 @@ 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) {
+ 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)
{
@@ -5161,13 +5262,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 */
@@ -5273,7 +5373,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 +5387,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 +5401,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 +5460,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:
@@ -5436,7 +5531,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;
}
@@ -5622,8 +5732,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 +5876,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 +6531,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;
+ }
- CLAMP(value, 0, ui_list->list_last_len - 1);
+ if (is_over_dragbut && type == LEFTMOUSE && val == KM_PRESS) {
+ uiHandleButtonData *data;
+ int *size = (int *)but->poin;
- 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;
+ ui_handle_button_activate(C, ar, but, BUTTON_ACTIVATE);
+ button_activate_state(C, but, BUTTON_STATE_INIT);
+
+ data = but->active;
+ data->dragstarty = my;
- RNA_property_int_range(&but->rnapoin, but->rnaprop, &min, &max);
- value = CLAMPIS(value, min, max);
+ button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
- if (value != value_orig) {
- RNA_property_int_set(&but->rnapoin, but->rnaprop, value);
- RNA_property_update(C, &but->rnapoin, but->rnaprop);
+ /* 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;
- ui_apply_undo(but);
- ED_region_tag_redraw(ar);
+ retval = WM_UI_HANDLER_BREAK;
+ }
+ else {
+ /* 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, 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;
- }
- }
}
}
}
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index d2a8c47b347..0b02a1a5db4 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);
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 079ba97aa9d..424d2231a03 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) {
@@ -568,7 +570,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 +1467,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 +1510,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 +2434,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 +2692,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);
+ }
}
}
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 95f47be0b70..832dd4d23ce 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -2605,12 +2605,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..4e79fd19f24 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);
@@ -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);
+
+ overlap = uiLayoutOverlap(col);
- uiBlockSetFlag(subblock, UI_BLOCK_LIST_ITEM);
+ 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.6f, &(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.6f, 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.6f, &(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.6f, 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 **************************/
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 594d3e40dcd..b469dc994bc 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -2850,6 +2850,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 +2980,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:
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..3e9e16b285c 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;
}
@@ -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.
@@ -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;
diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c
index a1bb7a8ae88..70fa97bebc1 100644
--- a/source/blender/editors/io/io_collada.c
+++ b/source/blender/editors/io/io_collada.c
@@ -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");
@@ -129,6 +147,8 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
/* get editmode results */
ED_object_editmode_load(CTX_data_edit_object(C));
+
+
if (collada_export(CTX_data_scene(C),
filepath,
apply_modifiers,
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_edit.c b/source/blender/editors/mask/mask_edit.c
index 9ae5b436fb3..62eb9cc240a 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);
@@ -417,6 +453,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)
@@ -429,6 +468,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);
@@ -500,6 +542,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);
@@ -514,7 +559,6 @@ void ED_keymap_mask(wmKeyConfig *keyconf)
void ED_operatormacros_mask(void)
{
- /* XXX: just for sample */
wmOperatorType *ot;
wmOperatorTypeMacro *otmacro;
@@ -531,4 +575,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 bd148c48980..51705aa5837 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/editmesh_bisect.c b/source/blender/editors/mesh/editmesh_bisect.c
new file mode 100644
index 00000000000..5968e0991d1
--- /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 infront 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, give_cursor(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 = "Enforce symmetry (both form and topological) across an axis";
+ 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 infront 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_inset.c b/source/blender/editors/mesh/editmesh_inset.c
index dba19ee5da6..3966826a5b2 100644
--- a/source/blender/editors/mesh/editmesh_inset.c
+++ b/source/blender/editors/mesh/editmesh_inset.c
@@ -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 2e73cbd02ed..cc3d486c2f3 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -499,10 +499,12 @@ static void knife_add_single_cut(KnifeTool_OpData *kcd)
{
KnifeEdge *kfe = new_knife_edge(kcd), *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->draw = true;
@@ -573,10 +575,17 @@ 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)
{
@@ -589,6 +598,11 @@ static int find_connected_linehit(KnifeTool_OpData *kcd, int testi, BMFace *f, i
{
return i;
}
+ else if (kcd->linehits[testi].v &&
+ kcd->linehits[testi].v == kcd->linehits[i].v)
+ {
+ return i;
+ }
}
else if (f) {
if (find_ref(&kcd->linehits[i].kfe->faces, f))
@@ -598,13 +612,38 @@ static int find_connected_linehit(KnifeTool_OpData *kcd, int testi, BMFace *f, 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 +692,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 +725,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 +759,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 +844,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 +876,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;
@@ -1181,9 +1209,9 @@ 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;
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 +1222,9 @@ static BMEdgeHit *knife_edge_tri_isect(KnifeTool_OpData *kcd, BMBVHTree *bmtree,
copy_v3_v3(cos + 3, v2);
copy_v3_v3(cos + 6, v3);
+ normal_tri_v3(tri_norm, v1, v2, v3);
+ plane_from_point_normal_v3(tri_plane, v1, tri_norm);
+
BLI_bvhtree_insert(tree2, 0, cos, 3);
BLI_bvhtree_balance(tree2);
@@ -1217,11 +1248,24 @@ 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)) {
+ n_isects = 0;
+ if (fabsf(dist_to_plane_v3(kfe->v1->cageco, tri_plane)) < KNIFE_FLT_EPS &&
+ fabsf(dist_to_plane_v3(kfe->v2->cageco, tri_plane)) < KNIFE_FLT_EPS)
+ {
+ /* both kfe ends are in cutting triangle */
+ copy_v3_v3(isects[0], kfe->v1->cageco);
+ copy_v3_v3(isects[1], kfe->v2->cageco);
+ 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], no[3], view[3], sp[2];
- interp_v3_v3v3(p, kfe->v1->cageco, kfe->v2->cageco, lambda);
-
+ copy_v3_v3(p, isects[j]);
if (kcd->curr.vert && len_squared_v3v3(kcd->curr.vert->cageco, p) < depsilon_sq) {
continue;
}
@@ -1268,7 +1312,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 +1327,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 +1337,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 +1354,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);
}
@@ -1502,7 +1552,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 +1702,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 +1795,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);
@@ -1993,7 +2043,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);
}
@@ -2683,7 +2733,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);
}
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 f4a55af742c..806ae96cb61 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -2510,7 +2510,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");
@@ -2538,7 +2538,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)
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 38ce56b4bc7..75ff5256e10 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;
@@ -2292,7 +2311,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 +2835,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 calcualte 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 +2983,43 @@ 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_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 = mod_i(offset, clamp);
+
+ /* 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))
+ use_prepare ? BM_ELEM_TAG : BM_ELEM_SELECT, em->mat_nr, use_smooth))
{
return OPERATOR_CANCELLED;
}
@@ -2855,6 +3047,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 +3060,12 @@ 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);
}
static int edbm_fill_holes_exec(bContext *C, wmOperator *op)
@@ -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)
diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c
index 46cab3b4416..a64a23a9f4a 100644
--- a/source/blender/editors/mesh/editmesh_utils.c
+++ b/source/blender/editors/mesh/editmesh_utils.c
@@ -1481,7 +1481,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..d889ed1bc74 100644
--- a/source/blender/editors/mesh/mesh_navmesh.c
+++ b/source/blender/editors/mesh/mesh_navmesh.c
@@ -350,7 +350,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,7 +381,7 @@ 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 */
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index b5352fb35f4..c98ad13acf6 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);
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index d012a8ac656..ce1cacdfb3a 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) {
@@ -1136,7 +1135,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..b79eeee49d7 100644
--- a/source/blender/editors/metaball/mball_edit.c
+++ b/source/blender/editors/metaball/mball_edit.c
@@ -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;
@@ -499,19 +501,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/object/object_add.c b/source/blender/editors/object/object_add.c
index ce61b4fce50..b907cba33e2 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1243,7 +1243,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;
@@ -1385,7 +1385,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 +1553,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 +1595,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 +1616,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 +1635,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 +1658,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_edit.c b/source/blender/editors/object/object_edit.c
index 7f7a0777bbf..c69210e2450 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);
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;
@@ -1500,19 +1516,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 +1553,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 +1584,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 +1617,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 +1634,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_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..be4948d8a80 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;
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 366aa72f2b8..36ce72f1cab 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -562,6 +562,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;
}
@@ -589,8 +604,10 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
}
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;
@@ -768,7 +785,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..b68fa150777 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -1561,9 +1561,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];
- closest_to_plane_v3(projA, coord, norm, start);
- closest_to_plane_v3(projB, coord, norm, end);
+ plane_from_point_normal_v3(plane, coord, norm);
+
+ 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;
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index d6bb394ff79..1a561efd217 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);
}
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index 3a6bd05df0b..0d6e6fb5ac1 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 ***************** */
@@ -270,6 +270,7 @@ typedef struct RenderJob {
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);
@@ -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);
@@ -804,6 +817,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 +831,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 +947,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 +1138,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(NULL, &scene->display_settings, true, false)) {
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,
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index e21e889d99d..57416a59aa1 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -591,7 +591,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;
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/screen/area.c b/source/blender/editors/screen/area.c
index e805b3f30fc..7cbc8c9b277 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1806,7 +1806,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..13befeceee9 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -1091,15 +1091,18 @@ 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, false);
}
else {
- ok = IMB_colormanagement_setup_glsl_draw(view_settings, display_settings, TRUE);
+ ok = IMB_colormanagement_setup_glsl_draw(view_settings, display_settings,
+ true, false);
}
}
else {
ok = IMB_colormanagement_setup_glsl_draw_from_space(view_settings, display_settings,
- ibuf->rect_colorspace, FALSE);
+ ibuf->rect_colorspace,
+ false, false);
}
if (ok) {
@@ -1178,7 +1181,7 @@ int glaBufferTransformFromRole_glsl(float *buffer, int width, int height, int ro
GPU_offscreen_bind(ofs);
- if (!IMB_colormanagement_setup_transform_from_role_glsl(role, TRUE)) {
+ if (!IMB_colormanagement_setup_transform_from_role_glsl(role, true)) {
GPU_offscreen_unbind(ofs);
GPU_offscreen_free(ofs);
return FALSE;
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 498762f1603..10c2ecd6fd9 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;
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 3066b733fc5..a02bd1ea391 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;
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..feff02fa121 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"
@@ -1006,9 +1007,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 +1022,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 +1044,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..dfada683dda 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -3883,7 +3883,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,
@@ -4279,9 +4279,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_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index bdf542526ee..0b0607babc1 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -1011,7 +1011,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 +1044,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 +1059,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 +1073,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 +1088,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 +1280,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..e41d4a741ae 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"
@@ -477,6 +478,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);
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 2c654507015..538e8394b1f 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,35 @@ 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');
+ }
+ 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 +2094,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 +2649,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 +2657,41 @@ 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);
}
}
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);
@@ -3407,6 +3424,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);
}
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 2edd00c015d..9ba4f507b69 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) {
@@ -3422,7 +3427,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,7 +3721,8 @@ 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};
int i;
int mode;
@@ -3768,6 +3774,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 +3791,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 */
@@ -4561,7 +4569,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)
@@ -4800,8 +4810,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 */
@@ -4907,21 +4917,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 +4956,13 @@ 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);
}
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/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..4f3f81e38dc 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)
@@ -490,7 +497,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 +560,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 +600,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 +715,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 +1004,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 +1067,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 +1114,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 +1164,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 +1407,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);
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c
index 08d0af817a8..0d64a3ce594 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 ******** */
diff --git a/source/blender/editors/space_clip/clip_graph_draw.c b/source/blender/editors/space_clip/clip_graph_draw.c
index 973200dc340..173d65ee4fc 100644
--- a/source/blender/editors/space_clip/clip_graph_draw.c
+++ b/source/blender/editors/space_clip/clip_graph_draw.c
@@ -126,7 +126,7 @@ static void tracking_segment_end_cb(void *UNUSED(userdata))
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;
+ struct { MovieTrackingTrack *act_track; bool sel; float xscale, yscale, hsize; } *data = userdata;
int sel = 0, sel_flag;
if (track != data->act_track)
@@ -151,7 +151,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;
+ struct { MovieTrackingTrack *act_track; bool sel; float xscale, yscale, hsize; } userdata;
BKE_movieclip_get_size(clip, &sc->user, &width, &height);
@@ -160,7 +160,7 @@ 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,
diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c
index cdb0fdadebd..393f92f5af5 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);
@@ -200,15 +200,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);
@@ -242,15 +242,15 @@ static int mouse_select_curve(bContext *C, float co[2], int extend)
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 +269,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 +313,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 +353,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");
diff --git a/source/blender/editors/space_clip/clip_intern.h b/source/blender/editors/space_clip/clip_intern.h
index 8d112b7413c..e6f1813b3a4 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);
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c
index de19df9abe2..f96a0e71dfc 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)
@@ -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;
@@ -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;
@@ -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,51 @@ 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);
+
+ 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..635aa388541 100644
--- a/source/blender/editors/space_clip/clip_utils.c
+++ b/source/blender/editors/space_clip/clip_utils.c
@@ -76,7 +76,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 +89,7 @@ void clip_graph_tracking_values_iterate_track(
if (segment_end)
segment_end(userdata);
- open = FALSE;
+ open = false;
}
continue;
@@ -98,7 +99,7 @@ void clip_graph_tracking_values_iterate_track(
if (segment_start)
segment_start(userdata, track, coord);
- open = TRUE;
+ open = true;
prevval = marker->pos[coord];
}
@@ -184,7 +185,7 @@ void clip_delete_track(bContext *C, MovieClip *clip, MovieTrackingTrack *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;
if (track == act_track)
tracking->act_track = NULL;
@@ -192,19 +193,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;
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index 8213853c937..8ecf9635af9 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);
@@ -724,6 +726,9 @@ 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);
+
/* ******** Hotkeys avalaible for preview region only ******** */
keymap = WM_keymap_find(keyconf, "Clip Graph Editor", SPACE_CLIP, 0);
@@ -854,36 +859,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;
@@ -893,12 +898,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 {
@@ -906,11 +911,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;
}
}
@@ -918,11 +923,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 {
@@ -930,11 +935,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;
}
}
@@ -942,11 +947,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 {
@@ -954,11 +959,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;
}
}
@@ -966,11 +971,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 {
@@ -978,11 +983,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;
}
}
@@ -991,11 +996,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 {
@@ -1003,11 +1008,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;
}
}
@@ -1015,11 +1020,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 {
@@ -1027,11 +1032,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;
}
}
@@ -1116,6 +1121,8 @@ 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;
/* if tracking is in progress, we should synchronize framenr from clipuser
* so latest tracked frame would be shown */
@@ -1147,29 +1154,38 @@ 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,
+ mask_width, mask_height,
aspx, aspy,
TRUE, TRUE,
sc->stabmat, C);
}
-
-
}
+ 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 */
@@ -1177,7 +1193,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 e14fc8ad399..8106befcab8 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;
}
}
}
@@ -1145,18 +1145,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)
@@ -1960,7 +1960,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 +1979,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 +2099,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 +2127,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 +2151,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;
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_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/space_file.c b/source/blender/editors/space_file/space_file.c
index 6f3d0367574..9758e2e9135 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;
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 9d22d6fcc95..5546682e470 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -882,8 +882,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 +1680,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 +1688,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_select.c b/source/blender/editors/space_graph/graph_select.c
index cbec3072c44..d87bd9a5077 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)
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 2da3f3adb67..6a3259e030e 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -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);
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index c0ef59e9e25..5a8292abcab 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,7 @@ 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);
+ draw_image_cursor(ar, sima->cursor);
}
ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST_VIEW);
@@ -719,7 +723,7 @@ 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);
+ draw_image_cursor(ar, sima->cursor);
}
/* scrollers? */
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c
index 98c9c8d15fe..c1cddf092aa 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;
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..4e98c9fd894 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -809,9 +809,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,6 +911,11 @@ 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 *UNUSED(C), PointerRNA *ptr)
+{
+ 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);
@@ -1039,6 +1048,9 @@ static void node_shader_set_butfunc(bNodeType *ntype)
case SH_NODE_BSDF_REFRACTION:
ntype->uifunc = node_shader_buts_glossy;
break;
+ case SH_NODE_SUBSURFACE_SCATTERING:
+ ntype->uifunc = node_shader_buts_subsurface;
+ break;
case SH_NODE_BSDF_TOON:
ntype->uifunc = node_shader_buts_toon;
break;
@@ -1620,12 +1632,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);
}
@@ -3061,7 +3075,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 +3093,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 +3103,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..b40a7e4702e 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -1075,31 +1075,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)
@@ -1251,6 +1251,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 +1260,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..3ba749a8eff 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -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 */
@@ -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..9b7b00fba00 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);
@@ -129,6 +129,7 @@ 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 +183,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..6ce31783bff 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) {
diff --git a/source/blender/editors/space_node/node_view.c b/source/blender/editors/space_node/node_view.c
index 9e6e1e628f6..e47a1315663 100644
--- a/source/blender/editors/space_node/node_view.c
+++ b/source/blender/editors/space_node/node_view.c
@@ -327,6 +327,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 = "Zoom in/out the background image";
+
+ /* 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..a59b2fc21df 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -602,8 +602,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..6200b98350f 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -1389,6 +1389,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 */
}
}
}
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index 1e9b681197c..2de8f52d677 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -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_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 404821900df..b86fba1398a 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,63 +138,22 @@ static void outliner_storage_cleanup(SpaceOops *soops)
}
}
-/* This function hashes only by type, nr and id, while cmp function also compares 'used' flag;
- * This is done to skip full treehash rebuild in outliner_storage_cleanup */
-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 || tse_a->used != tse_b->used;
-}
-
-static TreeStoreElem *lookup_treehash(GHash *th, short type, short nr, short used, ID *id)
-{
- TreeStoreElem tse_template;
- tse_template.type = type;
- tse_template.nr = type ? nr : 0; // we're picky! :)
- tse_template.id = id;
- tse_template.used = used;
- return BLI_ghash_lookup(th, &tse_template);
-}
-
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;
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");
- BLI_ghash_flag_set(soops->treehash, GHASH_FLAG_ALLOW_DUPES);
- }
-
- 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 for unused tree elements is in treestore */
- tselem = lookup_treehash(soops->treehash, type, nr, 0, id);
+ /* 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;
@@ -221,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);
}
/* ********************************************************* */
@@ -266,7 +213,7 @@ TreeElement *outliner_find_tse(SpaceOops *soops, TreeStoreElem *tse)
if (tse->id == NULL) return NULL;
/* check if 'tse' is in treestore */
- tselem = lookup_treehash(soops->treehash, tse->type, tse->nr, tse->used, tse->id);
+ tselem = BKE_treehash_lookup_any(soops->treehash, tse->type, tse->nr, tse->id);
if (tselem)
return outliner_find_tree_element(&soops->tree, tselem);
@@ -430,6 +377,28 @@ 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) {
+ lineset->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->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;
@@ -455,6 +424,8 @@ 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);
+
+ outliner_add_line_styles(soops, lb, sce, te);
}
// can be inlined if necessary
@@ -813,6 +784,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;
+ }
}
}
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..ebec818bb36 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -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;
diff --git a/source/blender/editors/space_sequencer/sequencer_view.c b/source/blender/editors/space_sequencer/sequencer_view.c
index 68428cd890f..18733d4e409 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;
}
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index 04b2a21bf79..84c6329db53 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -491,6 +491,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;
}
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..b4c2062ab00 100644
--- a/source/blender/editors/space_text/text_intern.h
+++ b/source/blender/editors/space_text/text_intern.h
@@ -54,10 +54,10 @@ 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.2f * 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..2c2a8b255da 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -949,7 +949,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 +983,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 +1063,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 +1096,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 +1861,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:
@@ -2086,10 +2098,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 */
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index d3d8868520d..6961ada462d 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"
@@ -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;
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 62e3f8471a3..ac216907c7f 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -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;
@@ -3094,9 +3094,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 */
@@ -3369,8 +3366,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))
@@ -3971,7 +3966,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 +4016,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 +4044,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;
}
@@ -4566,7 +4564,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 +4890,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 +5640,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 +6063,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))
@@ -6248,7 +6246,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 +6281,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;
@@ -6323,7 +6319,6 @@ static void drawObjectSelect(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
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 +6326,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 +6343,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 +6370,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 +6378,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 +6387,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);
}
}
@@ -6662,23 +6656,17 @@ 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 (ob->type == OB_MESH) {
+ 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) {
@@ -6703,7 +6691,9 @@ 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);
+ if (ELEM(NULL, ob->curve_cache, ob->curve_cache->disp.first)) {
+ BKE_displist_make_curveTypes(scene, ob, 0);
+ }
}
/* draw outline for selected objects, mesh does itself */
@@ -6807,7 +6797,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
draw_bounding_volume(scene, ob, ob->boundtype);
}
}
- else if (ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb ? ob->bb : cu->bb)) {
+ else if (ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb)) {
empty_object = drawDispList(scene, v3d, rv3d, base, dt, dflag, ob_wire_col);
}
@@ -6825,7 +6815,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
draw_bounding_volume(scene, ob, ob->boundtype);
}
}
- else if (ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb ? ob->bb : cu->bb)) {
+ 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)
@@ -7050,6 +7040,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);
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/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index bae2134591a..4ebd9706ac9 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -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;
@@ -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) {
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 7b8c197f3e6..f78d8981400 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -3533,6 +3533,189 @@ 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;
+ float mousevec[3];
+
+ if (op->customdata) {
+ ViewOpsData *vod = op->customdata;
+ ar = vod->ar;
+ v3d = vod->v3d;
+ }
+ else {
+ ar = CTX_wm_region(C);
+ v3d = CTX_wm_view3d(C);
+ }
+
+ negate_v3_v3(mousevec, ((RegionView3D *)ar->regiondata)->viewinv[2]);
+ normalize_v3(mousevec);
+
+ 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];
+
+ normalize_v3_v3(mousevec, rv3d->viewinv[2]);
+ negate_v3(mousevec);
+ view_roll_angle(ar, quat_new, rv3d->viewquat, mousevec, angle);
+
+ view3d_smooth_view(C, v3d, ar, NULL, NULL, NULL, quat_new, NULL, NULL);
+
+ 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_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"},
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_intern.h b/source/blender/editors/space_view3d/view3d_intern.h
index 085af4e5c18..54999b1ae95 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);
diff --git a/source/blender/editors/space_view3d/view3d_iterators.c b/source/blender/editors/space_view3d/view3d_iterators.c
index d13ab15d837..2023513ad92 100644
--- a/source/blender/editors/space_view3d/view3d_iterators.c
+++ b/source/blender/editors/space_view3d/view3d_iterators.c
@@ -368,7 +368,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..e7da921bba2 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);
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_view.c b/source/blender/editors/space_view3d/view3d_view.c
index 44c338d22b9..0246e2b75a9 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"
@@ -617,7 +618,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);
@@ -1433,6 +1434,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 +1451,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 +1508,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..82c117a7486 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1749,29 +1749,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? */
@@ -4825,7 +4828,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 */
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h
index 4954f861934..a0550c99988 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -350,6 +350,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;
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c
index fd8fba91fc9..a73bf86feb1 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -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();
}
}
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 1849bfecc51..73c0b3c0ff4 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -275,6 +275,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;
}
@@ -990,8 +997,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;
}
}
@@ -1031,8 +1037,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? */
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 4c7ac4193b3..359f6425126 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -1063,6 +1063,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);
@@ -1522,7 +1523,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 +1531,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 +1640,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);
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index 909ca68cc20..86bdcbdb394 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -1147,7 +1147,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 +1234,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)
{
@@ -1518,6 +1518,45 @@ 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 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 +1584,9 @@ 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);
+ }
if (retval) {
if (r_ob) {
diff --git a/source/blender/editors/util/crazyspace.c b/source/blender/editors/util/crazyspace.c
index bed8aaaddf2..721a7a3b855 100644
--- a/source/blender/editors/util/crazyspace.c
+++ b/source/blender/editors/util/crazyspace.c
@@ -260,11 +260,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 +315,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 +324,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);
@@ -375,7 +377,8 @@ void crazyspace_build_sculpt(Scene *scene, Object *ob, float (**deformmats)[3][3
float (*origVerts)[3] = MEM_dupallocN(deformedVerts);
float *quats = NULL;
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) {
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..8c299cccbc2 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -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;
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/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/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/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/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/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/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..d7919125fee 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -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/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index 2aee5b4846a..cd8c2db1821 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -2087,7 +2087,7 @@ 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);
}
diff --git a/source/blender/imbuf/IMB_colormanagement.h b/source/blender/imbuf/IMB_colormanagement.h
index 7399b8554aa..1f1fdedfa40 100644
--- a/source/blender/imbuf/IMB_colormanagement.h
+++ b/source/blender/imbuf/IMB_colormanagement.h
@@ -31,6 +31,8 @@
#ifndef __IMB_COLORMANAGEMENT_H__
#define __IMB_COLORMANAGEMENT_H__
+#include "BLI_sys_types.h"
+
#define BCM_CONFIG_FILE "config.ocio"
struct bContext;
@@ -62,19 +64,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 +93,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 +115,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);
@@ -142,7 +147,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 +159,34 @@ 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,
+ bool skip_curves);
/* 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,
+ bool skip_curves);
/* 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,
+ bool skip_curves);
/* 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/intern/IMB_colormanagement_intern.h b/source/blender/imbuf/intern/IMB_colormanagement_intern.h
index c372e125a66..3e201a2fc28 100644
--- a/source/blender/imbuf/intern/IMB_colormanagement_intern.h
+++ b/source/blender/imbuf/intern/IMB_colormanagement_intern.h
@@ -28,10 +28,11 @@
*
*/
-#ifndef IMB_COLORMANAGEMENT_INTERN_H
-#define IMB_COLORMANAGEMENT_INTERN_H
+#ifndef __IMB_COLORMANAGEMENT_INTERN_H__
+#define __IMB_COLORMANAGEMENT_INTERN_H__
#include "DNA_listBase.h"
+#include "BLI_sys_types.h"
struct OCIO_ConstProcessorRcPtr;
struct ImBuf;
@@ -48,8 +49,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 {
@@ -87,7 +88,7 @@ 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);
@@ -97,4 +98,4 @@ 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/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c
index 0167eaccef0..a466074d06f 100644
--- a/source/blender/imbuf/intern/colormanagement.c
+++ b/source/blender/imbuf/intern/colormanagement.c
@@ -99,7 +99,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 {
@@ -470,7 +470,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);
@@ -923,7 +923,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);
}
}
@@ -1134,6 +1134,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 +1166,7 @@ typedef struct DisplayBufferThread {
int channels;
float dither;
- int is_data;
+ bool is_data;
const char *byte_colorspace;
const char *float_colorspace;
@@ -1180,7 +1195,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 +1239,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 +1273,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 +1292,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 +1325,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 +1418,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 +1429,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 +1440,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 +1451,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 +1477,7 @@ typedef struct ProcessorTransformThread {
int start_line;
int tot_line;
int channels;
- int predivide;
+ bool predivide;
} ProcessorTransformThread;
typedef struct ProcessorTransformInit {
@@ -1471,7 +1486,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 +1496,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 +1522,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 +1530,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 +1549,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 +1576,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 +1648,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 +1668,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 +1747,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 +1765,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 +1779,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 +1842,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
@@ -1843,7 +1858,7 @@ ImBuf *IMB_colormanagement_imbuf_for_write(ImBuf *ibuf, int save_as_render, int
for (type = IMB_FILE_TYPES; type->is_a; 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 +1893,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,
@@ -1964,7 +1979,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 +2034,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 +2296,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;
@@ -2480,7 +2495,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 +2576,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 */
@@ -2608,7 +2623,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
@@ -2673,7 +2688,7 @@ ColormanageProcessor *IMB_colormanagement_display_processor_new(const ColorManag
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 +2737,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) {
@@ -2807,6 +2822,17 @@ static void update_glsl_display_processor(const ColorManagedViewSettings *view_s
}
}
+bool IMB_colormanagement_support_glsl_draw(const ColorManagedViewSettings *view_settings,
+ bool skip_curves)
+{
+ /* curves not supported yet */
+ if (!skip_curves)
+ if (view_settings && (view_settings->flag & COLORMANAGE_VIEW_USE_CURVES))
+ return 0;
+
+ return OCIO_supportGLSLDraw();
+}
+
/**
* Configures GLSL shader for conversion from specified to
* display color space
@@ -2820,9 +2846,10 @@ 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,
+ bool skip_curves)
{
ColorManagedViewSettings default_view_settings;
const ColorManagedViewSettings *applied_view_settings;
@@ -2840,8 +2867,9 @@ int IMB_colormanagement_setup_glsl_draw_from_space(const ColorManagedViewSetting
}
/* RGB curves mapping is not supported on GPU yet. */
- if (applied_view_settings->flag & COLORMANAGE_VIEW_USE_CURVES)
- return FALSE;
+ if (!skip_curves)
+ 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,
@@ -2851,27 +2879,27 @@ int IMB_colormanagement_setup_glsl_draw_from_space(const ColorManagedViewSetting
}
/* 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, bool skip_curves)
{
return IMB_colormanagement_setup_glsl_draw_from_space(view_settings, display_settings,
- NULL, predivide);
+ NULL, predivide, skip_curves);
}
/* 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;
IMB_colormanagement_display_settings_from_ctx(C, &view_settings, &display_settings);
- return IMB_colormanagement_setup_glsl_draw_from_space(view_settings, display_settings, from_colorspace, predivide);
+ return IMB_colormanagement_setup_glsl_draw_from_space(view_settings, display_settings, from_colorspace, predivide, false);
}
/* 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 +2925,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;
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/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/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/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index 7ff8667f90e..2cfbbbd516b 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];
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_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 fda696f2e28..e7eb670572a 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -720,8 +720,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 {
@@ -937,6 +939,10 @@ typedef struct NodeShaderNormalMap {
#define SHD_WAVE_BANDS 0
#define SHD_WAVE_RINGS 1
+/* sky texture */
+#define SHD_SKY_OLD 0
+#define SHD_SKY_NEW 1
+
/* image/environment texture */
#define SHD_COLORSPACE_NONE 0
#define SHD_COLORSPACE_COLOR 1
@@ -965,6 +971,11 @@ typedef struct NodeShaderNormalMap {
#define SHD_NORMAL_MAP_BLENDER_OBJECT 3
#define SHD_NORMAL_MAP_BLENDER_WORLD 4
+/* tangent */
+#define SHD_SUBSURFACE_COMPATIBLE 0
+#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..53d2ab1df07 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 */
@@ -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_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 85655ce09bd..0478ff567a0 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; /* note, allows duplicates */
+
+ /* pointers to treestore elements, grouped by (id, type, nr) in hashtable for faster searching */
+ void *treehash;
} SpaceOops;
@@ -1083,6 +1093,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_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/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt
index 70c79fa393c..f8fa625415e 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
..
)
diff --git a/source/blender/makesdna/intern/SConscript b/source/blender/makesdna/intern/SConscript
index c0db40dcfd2..7c3af30ee83 100644
--- a/source/blender/makesdna/intern/SConscript
+++ b/source/blender/makesdna/intern/SConscript
@@ -46,7 +46,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..b6152c4a4bf 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;
@@ -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,11 +1114,7 @@ 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 */
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..dfe1ebb3385 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',
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 592c518e9c0..eb0c4f7c422 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -276,6 +276,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/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index c158facca7c..4703e70b369 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -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";
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index f3e561cde0a..e935ff285b1 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -650,7 +650,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 +673,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 +721,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;
@@ -3329,7 +3329,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) {
@@ -4982,7 +4982,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);
@@ -5049,7 +5049,7 @@ char *RNA_pointer_as_string_keywords_ex(bContext *C, PointerRNA *ptr, PointerRNA
PropertyRNA *prop_default;
char *buf_default;
- RNA_PROP_BEGIN(ptr, propptr, iterprop)
+ RNA_PROP_BEGIN (ptr, propptr, iterprop)
{
prop = propptr.data;
@@ -5357,7 +5357,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 +5536,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 +5576,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 +5622,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 +5634,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 +5652,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)
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index 99053714246..d6e6786800b 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -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_color.c b/source/blender/makesrna/intern/rna_color.c
index ebd06475c79..933f06cec8c 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -584,6 +584,7 @@ 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);
}
}
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index 05d4c5a59d2..6a1aa37d0cc 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -1083,7 +1083,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");
}
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 287d7ee2ed3..d4b1130763b 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -1321,6 +1321,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 +1386,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:
{
@@ -3208,7 +3236,7 @@ void RNA_def_property_duplicate_pointers(StructOrFunctionRNA *cont_, PropertyRNA
if (prop->identifier) {
if (cont->prophash) {
prop->identifier = BLI_strdup(prop->identifier);
- BLI_ghash_assign(cont->prophash, (void *)prop->identifier, prop, NULL, NULL);
+ 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_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_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index ffc9ac0e52e..f59f3db3652 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"
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index fd931262904..8104fc169f6 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);
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 35d8a0fb433..1473bcd9ab8 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -575,8 +575,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 +586,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);
}
@@ -1106,12 +1108,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)
{
@@ -1771,7 +1776,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);
@@ -1868,7 +1875,9 @@ static void rna_def_mpolygon(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");
+#endif
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c
index ad9977fef50..7fec4a1ff9c 100644
--- a/source/blender/makesrna/intern/rna_mesh_api.c
+++ b/source/blender/makesrna/intern/rna_mesh_api.c
@@ -57,14 +57,15 @@ 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)
+void rna_Mesh_calc_smooth_groups(struct 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
@@ -87,6 +88,7 @@ void RNA_api_mesh(StructRNA *srna)
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);
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c
index 11f0e48012b..49b63933ae9 100644
--- a/source/blender/makesrna/intern/rna_meta.c
+++ b/source/blender/makesrna/intern/rna_meta.c
@@ -320,13 +320,13 @@ 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_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_text(prop, "Render Size", "Polygonization resolution in rendering");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index cd6067fb7e8..7fc61c0acfd 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -667,8 +667,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;
}
@@ -1720,7 +1720,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 +2781,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_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index b4576509098..eb18f791b04 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -921,22 +921,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;
@@ -1563,22 +1547,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;
@@ -2851,6 +2819,15 @@ 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);
+}
+
#else
static EnumPropertyItem prop_image_layer_items[] = {
@@ -3220,10 +3197,22 @@ 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}
+ };
+
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");
@@ -3231,8 +3220,14 @@ static void def_sh_tex_sky(StructRNA *srna)
prop = RNA_def_property(srna, "turbidity", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 1.0f, 30.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)
@@ -3640,6 +3635,25 @@ 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_COMPATIBLE, "COMPATIBLE", 0, "Compatible", "Subsurface scattering falloff compatible with previous versions"},
+ {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;
@@ -6822,16 +6836,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);
@@ -7247,8 +7257,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");
@@ -7261,8 +7269,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");
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index e71d1d22c4b..9bf9bc1deac 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);
}
@@ -903,6 +903,7 @@ 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);
}
/* why does this have to be so complicated?, can't all this crap be
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 1d2aa08e7cd..e40d0cca79e 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -861,7 +861,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 files 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);
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c
index 82cdfcdd631..5b809a51705 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, true);
+}
+
+static void engine_bind_display_space_shader(RenderEngine *UNUSED(engine), Scene *scene)
+{
+ IMB_colormanagement_setup_glsl_draw(&scene->view_settings,
+ &scene->display_settings,
+ false, true);
+}
+
+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 cancelled, 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_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..e58bf2598f7 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -487,7 +487,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))
@@ -2690,202 +2694,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 +2901,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 +2924,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);
@@ -4190,12 +4194,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);
diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c
index 278dc074c50..5a3ec8f1f1d 100644
--- a/source/blender/makesrna/intern/rna_sensor.c
+++ b/source/blender/makesrna/intern/rna_sensor.c
@@ -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..f8e1ac094aa 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;
@@ -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");
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index f7a0d865274..54012122617 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -172,6 +172,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 +198,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;
@@ -959,6 +963,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)
{
@@ -1255,6 +1267,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);
@@ -2194,7 +2215,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);
@@ -3292,7 +3314,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 +3456,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 +3556,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..e54e5f9bcad 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) \
diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c
index 1026a2c7772..fc71be75d3c 100644
--- a/source/blender/makesrna/intern/rna_tracking.c
+++ b/source/blender/makesrna/intern/rna_tracking.c
@@ -229,23 +229,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;
@@ -455,19 +465,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;
@@ -511,7 +535,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 +647,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[] = {
@@ -1067,7 +1130,7 @@ 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);
@@ -1317,7 +1380,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 +1394,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)
@@ -1566,10 +1656,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 +1706,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..6d521c6364f 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}
};
@@ -269,8 +268,24 @@ static StructRNA *rna_Panel_refine(PointerRNA *ptr)
}
/* UIList */
+static unsigned int rna_UIList_filter_const_FILTER_ITEM_get(PointerRNA *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 bitfalg '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..3b609b69374 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -2134,6 +2134,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)
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 01b14abfb1f..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"
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_decimate.c b/source/blender/modifiers/intern/MOD_decimate.c
index 9fdb40e71dc..a3569cbde68 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"
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..f6b882c5a69 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++) {
@@ -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) {
@@ -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_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_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_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/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..e5d20f7dc73 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);
diff --git a/source/blender/nodes/NOD_static_types.h b/source/blender/nodes/NOD_static_types.h
index eeec40c911f..6e2c30f98cf 100644
--- a/source/blender/nodes/NOD_static_types.h
+++ b/source/blender/nodes/NOD_static_types.h
@@ -86,7 +86,7 @@ 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_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", "" )
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/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..aed8a0224f1 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)
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_sky.c b/source/blender/nodes/shader/nodes/node_shader_tex_sky.c
index f9cd4b72912..c80b5282de3 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_sky.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_sky.c
@@ -48,6 +48,8 @@ static void node_shader_init_tex_sky(bNodeTree *UNUSED(ntree), bNode *node)
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/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..92fb506497f 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);
}
diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c
index b0604fa2dbc..30902c615a1 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"
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_interface.c b/source/blender/python/intern/bpy_interface.c
index feffea20553..dc1f5828c15 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -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_rna.c b/source/blender/python/intern/bpy_rna.c
index 3cd030e9b08..29f2d308367 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -6875,7 +6875,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 +6883,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 +6914,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 +6978,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 +6986,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 +7084,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 +7219,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 +7259,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/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c
index d44bce502ca..19ffc7f06ef 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"
diff --git a/source/blender/python/mathutils/mathutils_geometry.c b/source/blender/python/mathutils/mathutils_geometry.c
index 8509c46b395..b69e3eb23f8 100644
--- a/source/blender/python/mathutils/mathutils_geometry.c
+++ b/source/blender/python/mathutils/mathutils_geometry.c
@@ -568,22 +568,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 +600,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 {
@@ -980,24 +977,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 +1062,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 +1118,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);
@@ -1151,7 +1170,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 +1179,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;
}
}
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index ab888ba198b..a0104a30d0e 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -1741,7 +1741,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++) {
@@ -2094,9 +2094,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)
@@ -3279,7 +3279,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++) {
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 899c9b335be..8ac69b101f4 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? */
@@ -1697,12 +1713,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 +1738,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 +1774,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 +1786,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);
@@ -2399,6 +2424,7 @@ static int render_initialize_from_main(Render *re, Main *bmain, Scene *scene, Sc
/* not too nice, but it survives anim-border render */
if (anim) {
+ render_update_anim_renderdata(re, &scene->r);
re->disprect = disprect;
return 1;
}
@@ -2516,7 +2542,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 +2573,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 +2593,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);
@@ -2909,7 +2935,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/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..838f73b5e83 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);
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/rendercore.c b/source/blender/render/intern/source/rendercore.c
index fa3cf1cef87..982e9b1a410 100644
--- a/source/blender/render/intern/source/rendercore.c
+++ b/source/blender/render/intern/source/rendercore.c
@@ -1957,36 +1957,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/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/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..4480b8ab158 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);
@@ -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);
@@ -386,6 +375,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 *);
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index f1932c8aa97..e6b6df11d7d 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"
@@ -522,12 +523,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 +535,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 +565,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..e76d38dd0e2 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 */
@@ -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_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index b4f193bdbe6..72cd794489b 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 */
@@ -308,7 +307,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 */
@@ -964,9 +963,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,6 +972,7 @@ 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);
@@ -1102,9 +1101,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 +1111,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 +1328,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);
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index f4b50667b2f..abda68d8b24 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -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) {
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..188ad251b8a 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;
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index f1a9f6dc007..62b29266c5c 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -796,7 +796,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 +833,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 +866,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;
@@ -901,7 +901,7 @@ int WM_operator_view3d_distance_invoke(struct bContext *C, struct wmOperator *op
/* always run, so the values are initialized,
* otherwise we may get differ behavior when (dia != 1.0) */
- RNA_STRUCT_BEGIN(op->ptr, prop)
+ RNA_STRUCT_BEGIN (op->ptr, prop)
{
if (RNA_property_type(prop) == PROP_FLOAT) {
PropertySubType pstype = RNA_property_subtype(prop);
@@ -1137,10 +1137,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 +1177,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);
@@ -1553,7 +1563,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))
{
@@ -2253,7 +2263,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 +2429,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 +2460,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 +2476,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;
@@ -2566,7 +2572,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);
@@ -3199,7 +3205,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 +3231,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];
@@ -3385,6 +3391,7 @@ typedef struct {
int initial_mouse[2];
unsigned int gltex;
ListBase orig_paintcursors;
+ bool use_secondary_tex;
void *cursor;
} RadialControl;
@@ -3428,7 +3435,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 +3708,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 +3903,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 +4152,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 +4270,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/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c
index 21502492c05..65d2437a4bb 100644
--- a/source/blenderplayer/bad_level_call_stubs/stubs.c
+++ b/source/blenderplayer/bad_level_call_stubs/stubs.c
@@ -458,7 +458,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/creator.c b/source/creator/creator.c
index a710c07f34b..b442194bd7d 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -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);
@@ -1517,6 +1517,7 @@ int main(int argc, const char **argv)
IMB_init();
BKE_images_init();
+ BKE_modifier_init();
BKE_brush_system_init();
@@ -1682,12 +1683,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 +1693,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 c3bd93fec81..cab1cbde94f 100644
--- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
+++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
@@ -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 == 1, VSYNC_ON == 0, 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/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index 99613f8bd99..dd9609968b0 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -2950,7 +2950,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/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp
index 27989983326..9d8e9e85461 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
)
{
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..64ab0af4d26 100644
--- a/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
+++ b/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
@@ -278,7 +278,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 +294,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 +337,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/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
index 88468ecc88a..ad6c8a38305 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
@@ -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 == 1, VSYNC_ON == 0, 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..0b1fbf977dd 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -57,22 +57,24 @@ extern "C"
{
#endif // __cplusplus
#include "MEM_guardedalloc.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 "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 +458,7 @@ int main(int argc, char** argv)
IMB_init();
BKE_images_init();
+ BKE_modifier_init();
#ifdef WITH_FFMPEG
IMB_ffmpeg_init();
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 6d56c06e090..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;
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_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index efda1c5301b..29f28b7cc24 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -1385,7 +1385,7 @@ static PyObject *gPySetVsync(PyObject *, PyObject *args)
if (interval == VSYNC_ADAPTIVE)
interval = -1;
- gp_Canvas->SetSwapInterval(!interval); // VSYNC_OFF == 1, VSYNC_ON == 0, so this works
+ 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 0b90e0227c8..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;
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_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;