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:
-rw-r--r--CMakeLists.txt5
-rw-r--r--build_files/build_environment/CMakeLists.txt4
-rw-r--r--build_files/build_environment/cmake/embree.cmake69
-rw-r--r--build_files/build_environment/cmake/ffi.cmake2
-rw-r--r--build_files/build_environment/cmake/ffmpeg.cmake1
-rw-r--r--build_files/build_environment/cmake/harvest.cmake4
-rw-r--r--build_files/build_environment/cmake/opencollada.cmake2
-rw-r--r--build_files/build_environment/cmake/openvdb.cmake6
-rw-r--r--build_files/build_environment/cmake/options.cmake3
-rw-r--r--build_files/build_environment/cmake/python.cmake7
-rw-r--r--build_files/build_environment/cmake/sdl.cmake1
-rw-r--r--build_files/build_environment/cmake/versions.cmake6
-rwxr-xr-xbuild_files/build_environment/install_deps.sh244
-rw-r--r--build_files/build_environment/patches/ffi.diff11
-rw-r--r--build_files/build_environment/windows/build_deps.cmd22
-rw-r--r--build_files/cmake/Modules/FindEmbree.cmake108
-rw-r--r--build_files/cmake/Modules/FindJeMalloc.cmake9
-rw-r--r--build_files/cmake/Modules/FindOpenColorIO.cmake2
-rw-r--r--build_files/cmake/Modules/FindPCRE.cmake7
-rw-r--r--build_files/cmake/Modules/FindPythonLibsUnix.cmake4
-rw-r--r--build_files/cmake/clang_array_check.py2
-rwxr-xr-xbuild_files/cmake/cmake_consistency_check.py4
-rwxr-xr-xbuild_files/cmake/cmake_netbeans_project.py2
-rwxr-xr-xbuild_files/cmake/cmake_qtcreator_project.py2
-rw-r--r--build_files/cmake/config/blender_full.cmake2
-rw-r--r--build_files/cmake/config/blender_headless.cmake2
-rw-r--r--build_files/cmake/config/blender_release.cmake2
-rw-r--r--build_files/cmake/config/bpy_module.cmake2
-rw-r--r--build_files/cmake/macros.cmake25
-rw-r--r--build_files/cmake/platform/platform_apple.cmake7
-rw-r--r--build_files/cmake/platform/platform_apple_xcode.cmake4
-rw-r--r--build_files/cmake/platform/platform_unix.cmake6
-rw-r--r--build_files/cmake/platform/platform_win32.cmake64
-rwxr-xr-xbuild_files/utils/build_tgz.sh2
-rw-r--r--build_files/windows/check_libraries.cmd2
-rw-r--r--build_files/windows/configure_msbuild.cmd8
-rw-r--r--build_files/windows/detect_msvc_classic.cmd2
-rw-r--r--build_files/windows/find_dependencies.cmd8
-rw-r--r--build_files/windows/parse_arguments.cmd2
-rw-r--r--build_files/windows/reset_variables.cmd2
-rw-r--r--build_files/windows/show_help.cmd2
-rw-r--r--doc/python_api/examples/bpy.app.handlers.1.py2
-rw-r--r--doc/python_api/rst/info_api_reference.rst2
-rw-r--r--intern/cycles/CMakeLists.txt25
-rw-r--r--intern/cycles/app/CMakeLists.txt6
-rw-r--r--intern/cycles/app/cycles_xml.h2
-rw-r--r--intern/cycles/blender/CCL_api.h2
-rw-r--r--intern/cycles/blender/addon/engine.py47
-rw-r--r--intern/cycles/blender/addon/properties.py36
-rw-r--r--intern/cycles/blender/addon/ui.py40
-rw-r--r--intern/cycles/blender/blender_curves.cpp3
-rw-r--r--intern/cycles/blender/blender_logging.cpp2
-rw-r--r--intern/cycles/blender/blender_object.cpp19
-rw-r--r--intern/cycles/blender/blender_object_cull.h2
-rw-r--r--intern/cycles/blender/blender_python.cpp12
-rw-r--r--intern/cycles/blender/blender_session.cpp39
-rw-r--r--intern/cycles/blender/blender_session.h2
-rw-r--r--intern/cycles/blender/blender_shader.cpp4
-rw-r--r--intern/cycles/blender/blender_sync.cpp87
-rw-r--r--intern/cycles/blender/blender_sync.h8
-rw-r--r--intern/cycles/blender/blender_util.h9
-rw-r--r--intern/cycles/bvh/CMakeLists.txt2
-rw-r--r--intern/cycles/bvh/bvh.cpp11
-rw-r--r--intern/cycles/bvh/bvh.h8
-rw-r--r--intern/cycles/bvh/bvh2.h2
-rw-r--r--intern/cycles/bvh/bvh4.h2
-rw-r--r--intern/cycles/bvh/bvh8.cpp31
-rw-r--r--intern/cycles/bvh/bvh8.h2
-rw-r--r--intern/cycles/bvh/bvh_build.h3
-rw-r--r--intern/cycles/bvh/bvh_embree.cpp884
-rw-r--r--intern/cycles/bvh/bvh_embree.h79
-rw-r--r--intern/cycles/bvh/bvh_node.h2
-rw-r--r--intern/cycles/bvh/bvh_params.h14
-rw-r--r--intern/cycles/bvh/bvh_sort.h2
-rw-r--r--intern/cycles/bvh/bvh_split.h2
-rw-r--r--intern/cycles/bvh/bvh_unaligned.h2
-rw-r--r--intern/cycles/cmake/external_libs.cmake6
-rw-r--r--intern/cycles/device/device.cpp2
-rw-r--r--intern/cycles/device/device.h11
-rw-r--r--intern/cycles/device/device_cpu.cpp62
-rw-r--r--intern/cycles/device/device_cuda.cpp46
-rw-r--r--intern/cycles/device/device_denoising.cpp10
-rw-r--r--intern/cycles/device/device_denoising.h2
-rw-r--r--intern/cycles/device/device_intern.h12
-rw-r--r--intern/cycles/device/device_memory.h3
-rw-r--r--intern/cycles/device/device_multi.cpp8
-rw-r--r--intern/cycles/device/device_network.cpp5
-rw-r--r--intern/cycles/device/device_network.h2
-rw-r--r--intern/cycles/device/device_opencl.cpp7
-rw-r--r--intern/cycles/device/device_split_kernel.h2
-rw-r--r--intern/cycles/device/device_task.h4
-rw-r--r--intern/cycles/device/opencl/opencl.h4
-rw-r--r--intern/cycles/device/opencl/opencl_base.cpp50
-rw-r--r--intern/cycles/device/opencl/opencl_mega.cpp4
-rw-r--r--intern/cycles/device/opencl/opencl_split.cpp6
-rw-r--r--intern/cycles/device/opencl/opencl_util.cpp8
-rw-r--r--intern/cycles/graph/node.h2
-rw-r--r--intern/cycles/graph/node_type.h2
-rw-r--r--intern/cycles/kernel/CMakeLists.txt6
-rw-r--r--intern/cycles/kernel/bvh/bvh.h171
-rw-r--r--intern/cycles/kernel/bvh/bvh_embree.h126
-rw-r--r--intern/cycles/kernel/bvh/bvh_local.h4
-rw-r--r--intern/cycles/kernel/bvh/bvh_shadow_all.h4
-rw-r--r--intern/cycles/kernel/bvh/bvh_traversal.h4
-rw-r--r--intern/cycles/kernel/bvh/bvh_volume.h4
-rw-r--r--intern/cycles/kernel/bvh/bvh_volume_all.h4
-rw-r--r--intern/cycles/kernel/bvh/obvh_local.h6
-rw-r--r--intern/cycles/kernel/bvh/obvh_shadow_all.h8
-rw-r--r--intern/cycles/kernel/bvh/obvh_traversal.h10
-rw-r--r--intern/cycles/kernel/bvh/obvh_volume.h6
-rw-r--r--intern/cycles/kernel/bvh/obvh_volume_all.h6
-rw-r--r--intern/cycles/kernel/bvh/qbvh_local.h6
-rw-r--r--intern/cycles/kernel/bvh/qbvh_shadow_all.h7
-rw-r--r--intern/cycles/kernel/bvh/qbvh_traversal.h10
-rw-r--r--intern/cycles/kernel/bvh/qbvh_volume.h6
-rw-r--r--intern/cycles/kernel/bvh/qbvh_volume_all.h6
-rw-r--r--intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h2
-rw-r--r--intern/cycles/kernel/closure/bsdf_ashikhmin_velvet.h2
-rw-r--r--intern/cycles/kernel/closure/bsdf_diffuse.h2
-rw-r--r--intern/cycles/kernel/closure/bsdf_diffuse_ramp.h4
-rw-r--r--intern/cycles/kernel/closure/bsdf_hair.h2
-rw-r--r--intern/cycles/kernel/closure/bsdf_hair_principled.h8
-rw-r--r--intern/cycles/kernel/closure/bsdf_microfacet.h2
-rw-r--r--intern/cycles/kernel/closure/bsdf_microfacet_multi_impl.h8
-rw-r--r--intern/cycles/kernel/closure/bsdf_oren_nayar.h2
-rw-r--r--intern/cycles/kernel/closure/bsdf_phong_ramp.h4
-rw-r--r--intern/cycles/kernel/closure/bsdf_principled_diffuse.h2
-rw-r--r--intern/cycles/kernel/closure/bsdf_principled_sheen.h2
-rw-r--r--intern/cycles/kernel/closure/bsdf_reflection.h2
-rw-r--r--intern/cycles/kernel/closure/bsdf_refraction.h2
-rw-r--r--intern/cycles/kernel/closure/bsdf_toon.h2
-rw-r--r--intern/cycles/kernel/closure/bsdf_transparent.h2
-rw-r--r--intern/cycles/kernel/closure/bsdf_util.h2
-rw-r--r--intern/cycles/kernel/closure/bssrdf.h2
-rw-r--r--intern/cycles/kernel/filter/filter.h2
-rw-r--r--intern/cycles/kernel/filter/filter_defines.h2
-rw-r--r--intern/cycles/kernel/filter/filter_nlm_cpu.h139
-rw-r--r--intern/cycles/kernel/geom/geom_curve_intersect.h26
-rw-r--r--intern/cycles/kernel/geom/geom_object.h24
-rw-r--r--intern/cycles/kernel/geom/geom_subd_triangle.h4
-rw-r--r--intern/cycles/kernel/geom/geom_triangle_intersect.h414
-rw-r--r--intern/cycles/kernel/kernel.h2
-rw-r--r--intern/cycles/kernel/kernel_color.h2
-rw-r--r--intern/cycles/kernel/kernel_compat_cpu.h2
-rw-r--r--intern/cycles/kernel/kernel_compat_cuda.h2
-rw-r--r--intern/cycles/kernel/kernel_compat_opencl.h2
-rw-r--r--intern/cycles/kernel/kernel_globals.h8
-rw-r--r--intern/cycles/kernel/kernel_id_passes.h94
-rw-r--r--intern/cycles/kernel/kernel_math.h2
-rw-r--r--intern/cycles/kernel/kernel_montecarlo.h99
-rw-r--r--intern/cycles/kernel/kernel_passes.h47
-rw-r--r--intern/cycles/kernel/kernel_path.h8
-rw-r--r--intern/cycles/kernel/kernel_path_volume.h8
-rw-r--r--intern/cycles/kernel/kernel_queues.h2
-rw-r--r--intern/cycles/kernel/kernel_random.h2
-rw-r--r--intern/cycles/kernel/kernel_shader.h5
-rw-r--r--intern/cycles/kernel/kernel_shadow.h2
-rw-r--r--intern/cycles/kernel/kernel_types.h49
-rw-r--r--intern/cycles/kernel/kernel_volume.h8
-rw-r--r--intern/cycles/kernel/kernels/cpu/filter_cpu.h1
-rw-r--r--intern/cycles/kernel/kernels/cpu/filter_cpu_impl.h3
-rw-r--r--intern/cycles/kernel/kernels/cpu/kernel_cpu_image.h4
-rw-r--r--intern/cycles/kernel/kernels/cpu/kernel_cpu_impl.h10
-rw-r--r--intern/cycles/kernel/kernels/cuda/filter.cu23
-rw-r--r--intern/cycles/kernel/kernels/cuda/kernel.cu30
-rw-r--r--intern/cycles/kernel/kernels/opencl/filter.cl23
-rw-r--r--intern/cycles/kernel/kernels/opencl/kernel.cl12
-rw-r--r--intern/cycles/kernel/kernels/opencl/kernel_opencl_image.h2
-rw-r--r--intern/cycles/kernel/osl/osl_closures.h2
-rw-r--r--intern/cycles/kernel/osl/osl_globals.h2
-rw-r--r--intern/cycles/kernel/osl/osl_services.cpp32
-rw-r--r--intern/cycles/kernel/osl/osl_services.h9
-rw-r--r--intern/cycles/kernel/osl/osl_shader.cpp2
-rw-r--r--intern/cycles/kernel/osl/osl_shader.h2
-rw-r--r--intern/cycles/kernel/shaders/oslutil.h2
-rw-r--r--intern/cycles/kernel/shaders/stdosl.h68
-rw-r--r--intern/cycles/kernel/split/kernel_buffer_update.h13
-rw-r--r--intern/cycles/kernel/split/kernel_shader_sort.h4
-rw-r--r--intern/cycles/kernel/split/kernel_split_data.h4
-rw-r--r--intern/cycles/kernel/split/kernel_split_data_types.h4
-rw-r--r--intern/cycles/kernel/svm/svm.h4
-rw-r--r--intern/cycles/kernel/svm/svm_closure.h6
-rw-r--r--intern/cycles/kernel/svm/svm_hsv.h2
-rw-r--r--intern/cycles/kernel/svm/svm_ramp.h2
-rw-r--r--intern/cycles/kernel/svm/svm_ramp_util.h2
-rw-r--r--intern/cycles/kernel/svm/svm_types.h2
-rw-r--r--intern/cycles/kernel/svm/svm_wave.h2
-rw-r--r--intern/cycles/render/CMakeLists.txt2
-rw-r--r--intern/cycles/render/attribute.h2
-rw-r--r--intern/cycles/render/background.h2
-rw-r--r--intern/cycles/render/bake.h2
-rw-r--r--intern/cycles/render/buffers.cpp74
-rw-r--r--intern/cycles/render/buffers.h6
-rw-r--r--intern/cycles/render/camera.cpp2
-rw-r--r--intern/cycles/render/camera.h3
-rw-r--r--intern/cycles/render/constant_fold.h2
-rw-r--r--intern/cycles/render/coverage.cpp143
-rw-r--r--intern/cycles/render/coverage.h49
-rw-r--r--intern/cycles/render/curves.h4
-rw-r--r--intern/cycles/render/film.cpp37
-rw-r--r--intern/cycles/render/film.h15
-rw-r--r--intern/cycles/render/graph.h2
-rw-r--r--intern/cycles/render/image.h2
-rw-r--r--intern/cycles/render/integrator.h2
-rw-r--r--intern/cycles/render/light.h2
-rw-r--r--intern/cycles/render/mesh.cpp49
-rw-r--r--intern/cycles/render/mesh.h3
-rw-r--r--intern/cycles/render/nodes.h3
-rw-r--r--intern/cycles/render/object.cpp39
-rw-r--r--intern/cycles/render/object.h8
-rw-r--r--intern/cycles/render/osl.cpp2
-rw-r--r--intern/cycles/render/osl.h3
-rw-r--r--intern/cycles/render/particles.h4
-rw-r--r--intern/cycles/render/scene.cpp12
-rw-r--r--intern/cycles/render/scene.h3
-rw-r--r--intern/cycles/render/session.cpp5
-rw-r--r--intern/cycles/render/session.h4
-rw-r--r--intern/cycles/render/shader.cpp22
-rw-r--r--intern/cycles/render/shader.h4
-rw-r--r--intern/cycles/render/sobol.h2
-rw-r--r--intern/cycles/render/stats.h2
-rw-r--r--intern/cycles/render/svm.cpp2
-rw-r--r--intern/cycles/render/svm.h3
-rw-r--r--intern/cycles/render/tables.h2
-rw-r--r--intern/cycles/render/tile.h2
-rw-r--r--intern/cycles/subd/subd_dice.h2
-rw-r--r--intern/cycles/subd/subd_patch.h2
-rw-r--r--intern/cycles/subd/subd_patch_table.cpp4
-rw-r--r--intern/cycles/subd/subd_patch_table.h4
-rw-r--r--intern/cycles/subd/subd_split.h2
-rw-r--r--intern/cycles/test/render_graph_finalize_test.cpp1
-rw-r--r--intern/cycles/test/util_path_test.cpp4
-rw-r--r--intern/cycles/util/CMakeLists.txt3
-rw-r--r--intern/cycles/util/util_algorithm.h2
-rw-r--r--intern/cycles/util/util_args.h2
-rw-r--r--intern/cycles/util/util_array.h289
-rw-r--r--intern/cycles/util/util_atomic.h32
-rw-r--r--intern/cycles/util/util_avxb.h72
-rw-r--r--intern/cycles/util/util_avxf.h10
-rw-r--r--intern/cycles/util/util_boundbox.h2
-rw-r--r--intern/cycles/util/util_color.h2
-rw-r--r--intern/cycles/util/util_debug.h2
-rw-r--r--intern/cycles/util/util_defines.h12
-rw-r--r--intern/cycles/util/util_foreach.h2
-rw-r--r--intern/cycles/util/util_function.h2
-rw-r--r--intern/cycles/util/util_guarded_allocator.cpp4
-rw-r--r--intern/cycles/util/util_guarded_allocator.h6
-rw-r--r--intern/cycles/util/util_half.h2
-rw-r--r--intern/cycles/util/util_hash.h2
-rw-r--r--intern/cycles/util/util_ies.cpp7
-rw-r--r--intern/cycles/util/util_ies.h2
-rw-r--r--intern/cycles/util/util_image.h2
-rw-r--r--intern/cycles/util/util_list.h2
-rw-r--r--intern/cycles/util/util_logging.cpp2
-rw-r--r--intern/cycles/util/util_logging.h6
-rw-r--r--intern/cycles/util/util_map.h2
-rw-r--r--intern/cycles/util/util_math.h30
-rw-r--r--intern/cycles/util/util_math_cdf.h2
-rw-r--r--intern/cycles/util/util_math_fast.h28
-rw-r--r--intern/cycles/util/util_math_float2.h2
-rw-r--r--intern/cycles/util/util_math_float3.h2
-rw-r--r--intern/cycles/util/util_math_float4.h14
-rw-r--r--intern/cycles/util/util_math_int2.h2
-rw-r--r--intern/cycles/util/util_math_int3.h2
-rw-r--r--intern/cycles/util/util_math_int4.h42
-rw-r--r--intern/cycles/util/util_math_intersect.h2
-rw-r--r--intern/cycles/util/util_md5.h2
-rw-r--r--intern/cycles/util/util_murmurhash.cpp127
-rw-r--r--intern/cycles/util/util_murmurhash.h30
-rw-r--r--intern/cycles/util/util_opengl.h2
-rw-r--r--intern/cycles/util/util_optimization.h2
-rw-r--r--intern/cycles/util/util_param.h2
-rw-r--r--intern/cycles/util/util_path.cpp2
-rw-r--r--intern/cycles/util/util_progress.h10
-rw-r--r--intern/cycles/util/util_projection.h4
-rw-r--r--intern/cycles/util/util_queue.h2
-rw-r--r--intern/cycles/util/util_rect.h2
-rw-r--r--intern/cycles/util/util_set.h2
-rw-r--r--intern/cycles/util/util_simd.h14
-rw-r--r--intern/cycles/util/util_sky_model.h2
-rw-r--r--intern/cycles/util/util_sseb.h2
-rw-r--r--intern/cycles/util/util_ssef.h12
-rw-r--r--intern/cycles/util/util_stack_allocator.h4
-rw-r--r--intern/cycles/util/util_static_assert.h2
-rw-r--r--intern/cycles/util/util_stats.h2
-rw-r--r--intern/cycles/util/util_string.h2
-rw-r--r--intern/cycles/util/util_system.cpp4
-rw-r--r--intern/cycles/util/util_system.h2
-rw-r--r--intern/cycles/util/util_texture.h2
-rw-r--r--intern/cycles/util/util_thread.cpp2
-rw-r--r--intern/cycles/util/util_thread.h6
-rw-r--r--intern/cycles/util/util_transform.h27
-rw-r--r--intern/cycles/util/util_types.h2
-rw-r--r--intern/cycles/util/util_types_float3.h4
-rw-r--r--intern/cycles/util/util_types_float3_impl.h4
-rw-r--r--intern/cycles/util/util_types_float4.h4
-rw-r--r--intern/cycles/util/util_types_float4_impl.h4
-rw-r--r--intern/cycles/util/util_types_float8.h6
-rw-r--r--intern/cycles/util/util_types_float8_impl.h4
-rw-r--r--intern/cycles/util/util_types_int3.h4
-rw-r--r--intern/cycles/util/util_types_int3_impl.h4
-rw-r--r--intern/cycles/util/util_types_int4.h6
-rw-r--r--intern/cycles/util/util_types_int4_impl.h14
-rw-r--r--intern/cycles/util/util_vector.h296
-rw-r--r--intern/cycles/util/util_version.h2
-rw-r--r--intern/cycles/util/util_view.cpp2
-rw-r--r--intern/cycles/util/util_view.h8
-rw-r--r--intern/cycles/util/util_windows.h2
-rw-r--r--intern/cycles/util/util_xml.h2
-rw-r--r--intern/elbeem/extern/LBM_fluidsim.h5
-rw-r--r--intern/ghost/GHOST_C-api.h5
-rw-r--r--intern/ghost/GHOST_ISystem.h5
-rw-r--r--intern/ghost/intern/GHOST_C-api.cpp6
-rw-r--r--intern/ghost/intern/GHOST_DropTargetWin32.h2
-rw-r--r--intern/ghost/intern/GHOST_EventTrackpad.h4
-rw-r--r--intern/ghost/intern/GHOST_System.cpp6
-rw-r--r--intern/ghost/intern/GHOST_System.h6
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.h4
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.mm12
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.h20
-rw-r--r--intern/ghost/intern/GHOST_Window.h16
-rw-r--r--intern/ghost/intern/GHOST_WindowCocoa.mm19
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.cpp13
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.h12
-rw-r--r--intern/ghost/intern/GHOST_WindowX11.cpp10
-rw-r--r--intern/guardedalloc/CMakeLists.txt5
-rw-r--r--intern/guardedalloc/intern/mallocn.c7
-rw-r--r--intern/locale/boost_locale_wrapper.cpp12
-rw-r--r--intern/smoke/intern/FLUID_3D.cpp56
-rw-r--r--release/datafiles/colormanagement/config.ocio2
-rw-r--r--release/scripts/modules/addon_utils.py7
-rw-r--r--release/scripts/modules/bl_i18n_utils/settings.py28
-rw-r--r--release/scripts/modules/bpy_extras/wm_utils/progress_report.py (renamed from release/scripts/modules/progress_report.py)0
-rw-r--r--release/scripts/modules/console/complete_namespace.py2
-rw-r--r--release/scripts/startup/bl_operators/object_randomize_transform.py2
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_lightmap.py8
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_smart_project.py14
-rw-r--r--release/scripts/startup/bl_operators/wm.py8
-rw-r--r--release/scripts/startup/bl_ui/properties_data_metaball.py3
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py3
-rw-r--r--release/scripts/startup/bl_ui/properties_object.py2
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py20
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py2
-rw-r--r--release/text/readme.html4
-rw-r--r--source/blender/alembic/intern/abc_customdata.cc10
-rw-r--r--source/blender/alembic/intern/abc_exporter.cc2
-rw-r--r--source/blender/alembic/intern/abc_exporter.h2
-rw-r--r--source/blender/alembic/intern/abc_hair.cc2
-rw-r--r--source/blender/alembic/intern/abc_points.cc8
-rw-r--r--source/blender/avi/intern/avi.c10
-rw-r--r--source/blender/blenkernel/BKE_action.h8
-rw-r--r--source/blender/blenkernel/BKE_animsys.h2
-rw-r--r--source/blender/blenkernel/BKE_armature.h2
-rw-r--r--source/blender/blenkernel/BKE_blendfile.h12
-rw-r--r--source/blender/blenkernel/BKE_brush.h2
-rw-r--r--source/blender/blenkernel/BKE_bvhutils.h2
-rw-r--r--source/blender/blenkernel/BKE_ccg.h2
-rw-r--r--source/blender/blenkernel/BKE_curve.h2
-rw-r--r--source/blender/blenkernel/BKE_customdata.h2
-rw-r--r--source/blender/blenkernel/BKE_dynamicpaint.h2
-rw-r--r--source/blender/blenkernel/BKE_editmesh.h2
-rw-r--r--source/blender/blenkernel/BKE_fcurve.h10
-rw-r--r--source/blender/blenkernel/BKE_global.h24
-rw-r--r--source/blender/blenkernel/BKE_gpencil.h2
-rw-r--r--source/blender/blenkernel/BKE_library_query.h2
-rw-r--r--source/blender/blenkernel/BKE_node.h2
-rw-r--r--source/blender/blenkernel/BKE_paint.h32
-rw-r--r--source/blender/blenkernel/BKE_particle.h4
-rw-r--r--source/blender/blenkernel/BKE_pointcache.h2
-rw-r--r--source/blender/blenkernel/BKE_shrinkwrap.h6
-rw-r--r--source/blender/blenkernel/BKE_unit.h2
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf_intern.h2
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c12
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf_opensubdiv_converter.c36
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c8
-rw-r--r--source/blender/blenkernel/intern/action.c32
-rw-r--r--source/blender/blenkernel/intern/anim.c20
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c146
-rw-r--r--source/blender/blenkernel/intern/armature.c24
-rw-r--r--source/blender/blenkernel/intern/armature_update.c12
-rw-r--r--source/blender/blenkernel/intern/blender_undo.c6
-rw-r--r--source/blender/blenkernel/intern/blendfile.c63
-rw-r--r--source/blender/blenkernel/intern/bmfont.c2
-rw-r--r--source/blender/blenkernel/intern/boids.c4
-rw-r--r--source/blender/blenkernel/intern/brush.c6
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c22
-rw-r--r--source/blender/blenkernel/intern/cloth.c14
-rw-r--r--source/blender/blenkernel/intern/collision.c8
-rw-r--r--source/blender/blenkernel/intern/constraint.c96
-rw-r--r--source/blender/blenkernel/intern/context.c2
-rw-r--r--source/blender/blenkernel/intern/curve.c10
-rw-r--r--source/blender/blenkernel/intern/customdata.c2
-rw-r--r--source/blender/blenkernel/intern/data_transfer.c2
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c264
-rw-r--r--source/blender/blenkernel/intern/editderivedmesh.c2
-rw-r--r--source/blender/blenkernel/intern/effect.c394
-rw-r--r--source/blender/blenkernel/intern/fcurve.c64
-rw-r--r--source/blender/blenkernel/intern/fmodifier.c60
-rw-r--r--source/blender/blenkernel/intern/font.c4
-rw-r--r--source/blender/blenkernel/intern/gpencil.c4
-rw-r--r--source/blender/blenkernel/intern/icons.c18
-rw-r--r--source/blender/blenkernel/intern/image.c20
-rw-r--r--source/blender/blenkernel/intern/ipo.c60
-rw-r--r--source/blender/blenkernel/intern/lamp.c13
-rw-r--r--source/blender/blenkernel/intern/library.c2
-rw-r--r--source/blender/blenkernel/intern/library_remap.c2
-rw-r--r--source/blender/blenkernel/intern/mask_rasterize.c6
-rw-r--r--source/blender/blenkernel/intern/material.c17
-rw-r--r--source/blender/blenkernel/intern/mball_tessellate.c22
-rw-r--r--source/blender/blenkernel/intern/mesh.c12
-rw-r--r--source/blender/blenkernel/intern/mesh_convert.c6
-rw-r--r--source/blender/blenkernel/intern/mesh_evaluate.c16
-rw-r--r--source/blender/blenkernel/intern/mesh_mapping.c2
-rw-r--r--source/blender/blenkernel/intern/mesh_remap.c20
-rw-r--r--source/blender/blenkernel/intern/mesh_validate.c18
-rw-r--r--source/blender/blenkernel/intern/modifier.c4
-rw-r--r--source/blender/blenkernel/intern/modifiers_bmesh.c2
-rw-r--r--source/blender/blenkernel/intern/nla.c118
-rw-r--r--source/blender/blenkernel/intern/node.c2
-rw-r--r--source/blender/blenkernel/intern/object.c14
-rw-r--r--source/blender/blenkernel/intern/object_deform.c2
-rw-r--r--source/blender/blenkernel/intern/object_dupli.c8
-rw-r--r--source/blender/blenkernel/intern/packedFile.c4
-rw-r--r--source/blender/blenkernel/intern/paint.c64
-rw-r--r--source/blender/blenkernel/intern/particle.c2
-rw-r--r--source/blender/blenkernel/intern/particle_system.c16
-rw-r--r--source/blender/blenkernel/intern/pbvh.c16
-rw-r--r--source/blender/blenkernel/intern/pointcache.c2
-rw-r--r--source/blender/blenkernel/intern/report.c2
-rw-r--r--source/blender/blenkernel/intern/rigidbody.c48
-rw-r--r--source/blender/blenkernel/intern/scene.c12
-rw-r--r--source/blender/blenkernel/intern/seqeffects.c14
-rw-r--r--source/blender/blenkernel/intern/sequencer.c6
-rw-r--r--source/blender/blenkernel/intern/shrinkwrap.c6
-rw-r--r--source/blender/blenkernel/intern/smoke.c18
-rw-r--r--source/blender/blenkernel/intern/softbody.c24
-rw-r--r--source/blender/blenkernel/intern/subsurf_ccg.c98
-rw-r--r--source/blender/blenkernel/intern/suggestions.c4
-rw-r--r--source/blender/blenkernel/intern/text.c10
-rw-r--r--source/blender/blenkernel/intern/texture.c13
-rw-r--r--source/blender/blenkernel/intern/tracking.c6
-rw-r--r--source/blender/blenkernel/intern/tracking_region_tracker.c2
-rw-r--r--source/blender/blenkernel/intern/tracking_stabilize.c2
-rw-r--r--source/blender/blenkernel/intern/tracking_util.c22
-rw-r--r--source/blender/blenkernel/intern/unit.c4
-rw-r--r--source/blender/blenkernel/intern/world.c13
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c20
-rw-r--r--source/blender/blenlib/BLI_dlrbTree.h10
-rw-r--r--source/blender/blenlib/BLI_math.h45
-rw-r--r--source/blender/blenlib/BLI_math_geom.h5
-rw-r--r--source/blender/blenlib/BLI_math_vector.h1
-rw-r--r--source/blender/blenlib/BLI_rect.h3
-rw-r--r--source/blender/blenlib/BLI_utildefines.h8
-rw-r--r--source/blender/blenlib/intern/BLI_ghash_utils.c10
-rw-r--r--source/blender/blenlib/intern/BLI_kdopbvh.c18
-rw-r--r--source/blender/blenlib/intern/DLRB_tree.c4
-rw-r--r--source/blender/blenlib/intern/array_store.c4
-rw-r--r--source/blender/blenlib/intern/astar.c6
-rw-r--r--source/blender/blenlib/intern/freetypefont.c2
-rw-r--r--source/blender/blenlib/intern/math_geom.c64
-rw-r--r--source/blender/blenlib/intern/math_matrix.c19
-rw-r--r--source/blender/blenlib/intern/math_rotation.c2
-rw-r--r--source/blender/blenlib/intern/math_vector_inline.c25
-rw-r--r--source/blender/blenlib/intern/path_util.c4
-rw-r--r--source/blender/blenlib/intern/rand.c2
-rw-r--r--source/blender/blenlib/intern/rct.c4
-rw-r--r--source/blender/blenlib/intern/task.c63
-rw-r--r--source/blender/blenloader/BLO_readfile.h14
-rw-r--r--source/blender/blenloader/intern/readblenentry.c9
-rw-r--r--source/blender/blenloader/intern/readfile.c20
-rw-r--r--source/blender/blenloader/intern/undofile.c2
-rw-r--r--source/blender/blenloader/intern/versioning_260.c2
-rw-r--r--source/blender/bmesh/bmesh.h2
-rw-r--r--source/blender/bmesh/intern/bmesh_callback_generic.c6
-rw-r--r--source/blender/bmesh/intern/bmesh_callback_generic.h6
-rw-r--r--source/blender/bmesh/intern/bmesh_log.c60
-rw-r--r--source/blender/bmesh/intern/bmesh_marking.c4
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh.c48
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh.h28
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh_conv.c2
-rw-r--r--source/blender/bmesh/intern/bmesh_opdefines.c5
-rw-r--r--source/blender/bmesh/intern/bmesh_polygon.c45
-rw-r--r--source/blender/bmesh/intern/bmesh_polygon.h2
-rw-r--r--source/blender/bmesh/intern/bmesh_query.c44
-rw-r--r--source/blender/bmesh/intern/bmesh_query.h2
-rw-r--r--source/blender/bmesh/intern/bmesh_structure.c2
-rw-r--r--source/blender/bmesh/intern/bmesh_walkers.c8
-rw-r--r--source/blender/bmesh/operators/bmo_bevel.c4
-rw-r--r--source/blender/bmesh/operators/bmo_dupe.c73
-rw-r--r--source/blender/bmesh/operators/bmo_extrude.c20
-rw-r--r--source/blender/bmesh/operators/bmo_subdivide.c39
-rw-r--r--source/blender/bmesh/operators/bmo_subdivide_edgering.c6
-rw-r--r--source/blender/bmesh/tools/bmesh_bevel.c1
-rw-r--r--source/blender/bmesh/tools/bmesh_intersect.c4
-rw-r--r--source/blender/bmesh/tools/bmesh_wireframe.c1
-rw-r--r--source/blender/collada/AnimationExporter.cpp41
-rw-r--r--source/blender/collada/AnimationImporter.h11
-rw-r--r--source/blender/collada/ArmatureExporter.cpp2
-rw-r--r--source/blender/collada/ArmatureImporter.cpp6
-rw-r--r--source/blender/collada/ControllerExporter.cpp4
-rw-r--r--source/blender/collada/GeometryExporter.cpp4
-rw-r--r--source/blender/collada/GeometryExporter.h2
-rw-r--r--source/blender/collada/MeshImporter.cpp18
-rw-r--r--source/blender/collada/SceneExporter.cpp2
-rw-r--r--source/blender/collada/collada_utils.cpp4
-rw-r--r--source/blender/compositor/COM_compositor.h4
-rw-r--r--source/blender/compositor/COM_defines.h4
-rw-r--r--source/blender/compositor/intern/COM_CPUDevice.cpp4
-rw-r--r--source/blender/compositor/intern/COM_CPUDevice.h4
-rw-r--r--source/blender/compositor/intern/COM_ChunkOrder.cpp4
-rw-r--r--source/blender/compositor/intern/COM_ChunkOrder.h4
-rw-r--r--source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp4
-rw-r--r--source/blender/compositor/intern/COM_ChunkOrderHotspot.h4
-rw-r--r--source/blender/compositor/intern/COM_CompositorContext.cpp4
-rw-r--r--source/blender/compositor/intern/COM_CompositorContext.h4
-rw-r--r--source/blender/compositor/intern/COM_Converter.cpp6
-rw-r--r--source/blender/compositor/intern/COM_Converter.h4
-rw-r--r--source/blender/compositor/intern/COM_Debug.cpp2
-rw-r--r--source/blender/compositor/intern/COM_Debug.h2
-rw-r--r--source/blender/compositor/intern/COM_Device.cpp4
-rw-r--r--source/blender/compositor/intern/COM_Device.h4
-rw-r--r--source/blender/compositor/intern/COM_ExecutionGroup.cpp6
-rw-r--r--source/blender/compositor/intern/COM_ExecutionGroup.h4
-rw-r--r--source/blender/compositor/intern/COM_ExecutionSystem.cpp4
-rw-r--r--source/blender/compositor/intern/COM_ExecutionSystem.h10
-rw-r--r--source/blender/compositor/intern/COM_MemoryBuffer.cpp4
-rw-r--r--source/blender/compositor/intern/COM_MemoryBuffer.h4
-rw-r--r--source/blender/compositor/intern/COM_MemoryProxy.cpp4
-rw-r--r--source/blender/compositor/intern/COM_MemoryProxy.h6
-rw-r--r--source/blender/compositor/intern/COM_Node.cpp4
-rw-r--r--source/blender/compositor/intern/COM_Node.h4
-rw-r--r--source/blender/compositor/intern/COM_NodeConverter.cpp2
-rw-r--r--source/blender/compositor/intern/COM_NodeConverter.h2
-rw-r--r--source/blender/compositor/intern/COM_NodeGraph.cpp2
-rw-r--r--source/blender/compositor/intern/COM_NodeGraph.h2
-rw-r--r--source/blender/compositor/intern/COM_NodeOperation.cpp6
-rw-r--r--source/blender/compositor/intern/COM_NodeOperation.h4
-rw-r--r--source/blender/compositor/intern/COM_NodeOperationBuilder.cpp2
-rw-r--r--source/blender/compositor/intern/COM_NodeOperationBuilder.h2
-rw-r--r--source/blender/compositor/intern/COM_OpenCLDevice.cpp4
-rw-r--r--source/blender/compositor/intern/COM_OpenCLDevice.h4
-rw-r--r--source/blender/compositor/intern/COM_SingleThreadedOperation.cpp4
-rw-r--r--source/blender/compositor/intern/COM_SingleThreadedOperation.h4
-rw-r--r--source/blender/compositor/intern/COM_SocketReader.cpp4
-rw-r--r--source/blender/compositor/intern/COM_SocketReader.h4
-rw-r--r--source/blender/compositor/intern/COM_WorkPackage.cpp4
-rw-r--r--source/blender/compositor/intern/COM_WorkPackage.h4
-rw-r--r--source/blender/compositor/intern/COM_WorkScheduler.cpp4
-rw-r--r--source/blender/compositor/intern/COM_WorkScheduler.h4
-rw-r--r--source/blender/compositor/intern/COM_compositor.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_AlphaOverNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_AlphaOverNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_BilateralBlurNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_BilateralBlurNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_BlurNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_BlurNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_BokehBlurNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_BokehBlurNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_BokehImageNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_BokehImageNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_BoxMaskNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_BoxMaskNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_BrightnessNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_BrightnessNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ChannelMatteNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_ChannelMatteNode.h2
-rw-r--r--source/blender/compositor/nodes/COM_ChromaMatteNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_ChromaMatteNode.h2
-rw-r--r--source/blender/compositor/nodes/COM_ColorBalanceNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_ColorBalanceNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ColorCorrectionNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_ColorCorrectionNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ColorCurveNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_ColorCurveNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ColorMatteNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_ColorMatteNode.h2
-rw-r--r--source/blender/compositor/nodes/COM_ColorNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_ColorNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ColorRampNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_ColorRampNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ColorSpillNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_ColorSpillNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ColorToBWNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_ColorToBWNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_CombineColorNode.cpp6
-rw-r--r--source/blender/compositor/nodes/COM_CombineColorNode.h6
-rw-r--r--source/blender/compositor/nodes/COM_CompositorNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_CompositorNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_ConvertAlphaNode.h2
-rw-r--r--source/blender/compositor/nodes/COM_CornerPinNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_CornerPinNode.h2
-rw-r--r--source/blender/compositor/nodes/COM_CropNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_CropNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_DefocusNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_DefocusNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_DifferenceMatteNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_DifferenceMatteNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_DilateErodeNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_DilateErodeNode.h6
-rw-r--r--source/blender/compositor/nodes/COM_DirectionalBlurNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_DirectionalBlurNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_DisplaceNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_DisplaceNode.h2
-rw-r--r--source/blender/compositor/nodes/COM_DistanceMatteNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_DistanceMatteNode.h2
-rw-r--r--source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_EllipseMaskNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_EllipseMaskNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_FilterNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_FilterNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_FlipNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_FlipNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_GammaNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_GammaNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_GlareNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_GlareNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_HueSaturationValueNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_IDMaskNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_IDMaskNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ImageNode.cpp6
-rw-r--r--source/blender/compositor/nodes/COM_ImageNode.h6
-rw-r--r--source/blender/compositor/nodes/COM_InpaintNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_InpaintNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_InvertNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_InvertNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_KeyingNode.cpp6
-rw-r--r--source/blender/compositor/nodes/COM_KeyingNode.h6
-rw-r--r--source/blender/compositor/nodes/COM_KeyingScreenNode.cpp6
-rw-r--r--source/blender/compositor/nodes/COM_KeyingScreenNode.h6
-rw-r--r--source/blender/compositor/nodes/COM_LensDistortionNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_LensDistortionNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_LuminanceMatteNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_LuminanceMatteNode.h2
-rw-r--r--source/blender/compositor/nodes/COM_MapRangeNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_MapRangeNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_MapUVNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_MapUVNode.h2
-rw-r--r--source/blender/compositor/nodes/COM_MapValueNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_MapValueNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_MaskNode.cpp6
-rw-r--r--source/blender/compositor/nodes/COM_MaskNode.h6
-rw-r--r--source/blender/compositor/nodes/COM_MathNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_MathNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_MixNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_MixNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_MovieClipNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_MovieClipNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_MovieDistortionNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_MovieDistortionNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_NormalNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_NormalNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_NormalizeNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_NormalizeNode.h2
-rw-r--r--source/blender/compositor/nodes/COM_OutputFileNode.cpp6
-rw-r--r--source/blender/compositor/nodes/COM_OutputFileNode.h6
-rw-r--r--source/blender/compositor/nodes/COM_PixelateNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_PixelateNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_PlaneTrackDeformNode.cpp6
-rw-r--r--source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h2
-rw-r--r--source/blender/compositor/nodes/COM_RenderLayersNode.cpp8
-rw-r--r--source/blender/compositor/nodes/COM_RenderLayersNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_RotateNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_RotateNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ScaleNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_ScaleNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_SeparateColorNode.cpp6
-rw-r--r--source/blender/compositor/nodes/COM_SeparateColorNode.h6
-rw-r--r--source/blender/compositor/nodes/COM_SetAlphaNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_SetAlphaNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_SocketProxyNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_SocketProxyNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_SplitViewerNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_SplitViewerNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_Stabilize2dNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_Stabilize2dNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_SunBeamsNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_SunBeamsNode.h2
-rw-r--r--source/blender/compositor/nodes/COM_SwitchNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_SwitchNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_SwitchViewNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_SwitchViewNode.h2
-rw-r--r--source/blender/compositor/nodes/COM_TextureNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_TextureNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_TimeNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_TimeNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_TonemapNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_TonemapNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_TrackPositionNode.cpp6
-rw-r--r--source/blender/compositor/nodes/COM_TrackPositionNode.h6
-rw-r--r--source/blender/compositor/nodes/COM_TransformNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_TransformNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_TranslateNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_TranslateNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ValueNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_ValueNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_VectorBlurNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_VectorBlurNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_VectorCurveNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_VectorCurveNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ViewLevelsNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_ViewLevelsNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ViewerNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_ViewerNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ZCombineNode.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_ZCombineNode.h4
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverKeyOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverMixedOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_AntiAliasOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_BilateralBlurOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_BilateralBlurOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_BlurBaseOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_BlurBaseOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_BokehBlurOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_BokehBlurOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_BokehImageOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_BokehImageOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_BoxMaskOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_BoxMaskOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_BrightnessOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_BrightnessOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_CalculateMeanOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_CalculateMeanOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_ChangeHSVOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ChangeHSVOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_ChannelMatteOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_ChannelMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ChromaMatteOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_ChromaMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ColorBalanceLGGOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ColorCorrectionOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_ColorCurveOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ColorCurveOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_ColorMatteOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_ColorMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ColorRampOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ColorRampOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_ColorSpillOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ColorSpillOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_CompositorOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_CompositorOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorProfileOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_ConvertOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ConvertOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ConvolutionFilterOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_CropOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_CropOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_CurveBaseOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_CurveBaseOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_DifferenceMatteOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_DilateErodeOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_DilateErodeOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_DirectionalBlurOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_DisplaceOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_DisplaceOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_DisplaceSimpleOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_DotproductOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_DotproductOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_EllipseMaskOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_EllipseMaskOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_FastGaussianBlurOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_FlipOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_FlipOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_GammaCorrectOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_GammaCorrectOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_GammaOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_GammaOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_GaussianBokehBlurOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_GaussianXBlurOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_GaussianYBlurOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_GlareBaseOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_GlareBaseOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_GlareFogGlowOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_GlareGhostOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_GlareGhostOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_GlareSimpleStarOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_GlareSimpleStarOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_GlareStreaksOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_GlareStreaksOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_GlareThresholdOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_GlareThresholdOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_IDMaskOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_IDMaskOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_ImageOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ImageOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_InpaintOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_InpaintOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_InvertOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_InvertOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_KeyingBlurOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_KeyingBlurOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_KeyingClipOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_KeyingClipOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_KeyingDespillOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_KeyingDespillOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_KeyingOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_KeyingOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_KeyingScreenOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_KeyingScreenOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_LuminanceMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MapRangeOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_MapRangeOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_MapUVOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_MapUVOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MapValueOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_MapValueOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_MaskOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MaskOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_MathBaseOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_MathBaseOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_MixOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_MixOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_MovieClipAttributeOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_MovieClipOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_MovieClipOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_MovieDistortionOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MovieDistortionOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_MultilayerImageOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MultilayerImageOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_NormalizeOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_NormalizeOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_OpenCLKernels.cl4
-rw-r--r--source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_OutputFileMultiViewOperation.h8
-rw-r--r--source/blender/compositor/operations/COM_OutputFileOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_OutputFileOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_PixelateOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_PixelateOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_PlaneCornerPinOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_PlaneCornerPinOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_PlaneDistortCommonOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_PlaneTrackOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_PlaneTrackOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_PreviewOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_PreviewOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_QualityStepHelper.cpp4
-rw-r--r--source/blender/compositor/operations/COM_QualityStepHelper.h4
-rw-r--r--source/blender/compositor/operations/COM_ReadBufferOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ReadBufferOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersProg.cpp4
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersProg.h4
-rw-r--r--source/blender/compositor/operations/COM_RotateOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_RotateOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_ScaleOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_ScaleOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_SetAlphaOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_SetAlphaOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_SetColorOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_SetColorOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_SetSamplerOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_SetSamplerOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_SetValueOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_SetValueOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_SetVectorOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_SetVectorOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_SocketProxyOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_SocketProxyOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_SplitOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_SplitOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_SunBeamsOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_SunBeamsOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_TextureOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_TextureOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_TonemapOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_TonemapOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_TrackPositionOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_TrackPositionOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_TranslateOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_TranslateOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_VectorBlurOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_VectorBlurOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_VectorCurveOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_VectorCurveOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_ViewerOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ViewerOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_WrapOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_WrapOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_WriteBufferOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_WriteBufferOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_ZCombineOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ZCombineOperation.h4
-rwxr-xr-xsource/blender/datatoc/datatoc_icon_split.py2
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc4
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.h2
-rw-r--r--source/blender/depsgraph/intern/depsgraph.cc2
-rw-r--r--source/blender/depsgraph/intern/depsgraph_types.h2
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c56
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c76
-rw-r--r--source/blender/editors/animation/anim_deps.c4
-rw-r--r--source/blender/editors/animation/anim_draw.c14
-rw-r--r--source/blender/editors/animation/anim_filter.c190
-rw-r--r--source/blender/editors/animation/anim_intern.h8
-rw-r--r--source/blender/editors/animation/anim_ipo_utils.c26
-rw-r--r--source/blender/editors/animation/anim_markers.c4
-rw-r--r--source/blender/editors/animation/anim_ops.c4
-rw-r--r--source/blender/editors/animation/drivers.c16
-rw-r--r--source/blender/editors/animation/fmodifier_ui.c8
-rw-r--r--source/blender/editors/animation/keyframes_draw.c12
-rw-r--r--source/blender/editors/animation/keyframes_edit.c24
-rw-r--r--source/blender/editors/animation/keyframes_general.c20
-rw-r--r--source/blender/editors/animation/keyframing.c132
-rw-r--r--source/blender/editors/animation/keyingsets.c62
-rw-r--r--source/blender/editors/armature/armature_add.c6
-rw-r--r--source/blender/editors/armature/armature_edit.c26
-rw-r--r--source/blender/editors/armature/armature_naming.c2
-rw-r--r--source/blender/editors/armature/armature_relations.c24
-rw-r--r--source/blender/editors/armature/editarmature_sketch.c14
-rw-r--r--source/blender/editors/armature/pose_edit.c4
-rw-r--r--source/blender/editors/armature/pose_group.c4
-rw-r--r--source/blender/editors/armature/pose_lib.c36
-rw-r--r--source/blender/editors/armature/pose_select.c8
-rw-r--r--source/blender/editors/armature/pose_slide.c42
-rw-r--r--source/blender/editors/armature/pose_transform.c6
-rw-r--r--source/blender/editors/armature/pose_utils.c8
-rw-r--r--source/blender/editors/curve/editcurve.c4
-rw-r--r--source/blender/editors/curve/editcurve_add.c2
-rw-r--r--source/blender/editors/curve/editcurve_paint.c10
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c34
-rw-r--r--source/blender/editors/gpencil/editaction_gpencil.c12
-rw-r--r--source/blender/editors/gpencil/gpencil_brush.c12
-rw-r--r--source/blender/editors/gpencil/gpencil_convert.c4
-rw-r--r--source/blender/editors/gpencil/gpencil_data.c4
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c4
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c42
-rw-r--r--source/blender/editors/gpencil/gpencil_select.c12
-rw-r--r--source/blender/editors/gpencil/gpencil_undo.c4
-rw-r--r--source/blender/editors/gpencil/gpencil_utils.c4
-rw-r--r--source/blender/editors/include/ED_anim_api.h38
-rw-r--r--source/blender/editors/include/ED_armature.h2
-rw-r--r--source/blender/editors/include/ED_keyframes_edit.h4
-rw-r--r--source/blender/editors/include/ED_keyframing.h28
-rw-r--r--source/blender/editors/include/ED_types.h2
-rw-r--r--source/blender/editors/include/ED_view3d.h20
-rw-r--r--source/blender/editors/include/UI_interface.h1
-rw-r--r--source/blender/editors/include/UI_view2d.h6
-rw-r--r--source/blender/editors/interface/interface.c6
-rw-r--r--source/blender/editors/interface/interface_eyedropper_color.c2
-rw-r--r--source/blender/editors/interface/interface_eyedropper_datablock.c5
-rw-r--r--source/blender/editors/interface/interface_handlers.c16
-rw-r--r--source/blender/editors/interface/interface_layout.c37
-rw-r--r--source/blender/editors/interface/interface_ops.c6
-rw-r--r--source/blender/editors/interface/interface_panel.c10
-rw-r--r--source/blender/editors/interface/interface_templates.c56
-rw-r--r--source/blender/editors/interface/interface_utils.c2
-rw-r--r--source/blender/editors/interface/view2d.c78
-rw-r--r--source/blender/editors/interface/view2d_ops.c21
-rw-r--r--source/blender/editors/mask/mask_shapekey.c2
-rw-r--r--source/blender/editors/mesh/editmesh_extrude.c24
-rw-r--r--source/blender/editors/mesh/editmesh_extrude_spin.c49
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c16
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c9
-rw-r--r--source/blender/editors/mesh/editmesh_utils.c6
-rw-r--r--source/blender/editors/mesh/mesh_mirror.c2
-rw-r--r--source/blender/editors/mesh/mesh_ops.c2
-rw-r--r--source/blender/editors/mesh/meshtools.c8
-rw-r--r--source/blender/editors/object/object_constraint.c26
-rw-r--r--source/blender/editors/object/object_relations.c2
-rw-r--r--source/blender/editors/object/object_vgroup.c2
-rw-r--r--source/blender/editors/physics/particle_edit.c4
-rw-r--r--source/blender/editors/render/render_internal.c2
-rw-r--r--source/blender/editors/render/render_preview.c2
-rw-r--r--source/blender/editors/screen/area.c4
-rw-r--r--source/blender/editors/screen/screen_ops.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c16
-rw-r--r--source/blender/editors/sculpt_paint/paint_curve.c12
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c10
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_2d.c12
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c28
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c16
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c18
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c14
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c13
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_uv.c2
-rw-r--r--source/blender/editors/space_action/action_draw.c8
-rw-r--r--source/blender/editors/space_action/action_edit.c8
-rw-r--r--source/blender/editors/space_action/action_select.c46
-rw-r--r--source/blender/editors/space_clip/clip_ops.c12
-rw-r--r--source/blender/editors/space_clip/space_clip.c6
-rw-r--r--source/blender/editors/space_file/file_draw.c2
-rw-r--r--source/blender/editors/space_file/file_ops.c3
-rw-r--r--source/blender/editors/space_file/filelist.c20
-rw-r--r--source/blender/editors/space_file/filelist.h18
-rw-r--r--source/blender/editors/space_file/fsmenu.c47
-rw-r--r--source/blender/editors/space_file/space_file.c2
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c12
-rw-r--r--source/blender/editors/space_graph/graph_draw.c72
-rw-r--r--source/blender/editors/space_graph/graph_edit.c18
-rw-r--r--source/blender/editors/space_graph/graph_ops.c4
-rw-r--r--source/blender/editors/space_graph/graph_select.c58
-rw-r--r--source/blender/editors/space_graph/graph_utils.c14
-rw-r--r--source/blender/editors/space_graph/space_graph.c4
-rw-r--r--source/blender/editors/space_image/image_buttons.c2
-rw-r--r--source/blender/editors/space_info/info_ops.c4
-rw-r--r--source/blender/editors/space_logic/logic_window.c2
-rw-r--r--source/blender/editors/space_nla/nla_buttons.c4
-rw-r--r--source/blender/editors/space_nla/nla_channels.c6
-rw-r--r--source/blender/editors/space_nla/nla_draw.c44
-rw-r--r--source/blender/editors/space_nla/nla_edit.c20
-rw-r--r--source/blender/editors/space_nla/nla_ops.c31
-rw-r--r--source/blender/editors/space_nla/nla_select.c30
-rw-r--r--source/blender/editors/space_node/node_relationships.c8
-rw-r--r--source/blender/editors/space_node/node_templates.c6
-rw-r--r--source/blender/editors/space_node/node_view.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c12
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c15
-rw-r--r--source/blender/editors/space_outliner/outliner_intern.h2
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c8
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c14
-rw-r--r--source/blender/editors/space_script/script_edit.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c16
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c13
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c8
-rw-r--r--source/blender/editors/space_sequencer/space_sequencer.c2
-rw-r--r--source/blender/editors/space_text/text_format_lua.c4
-rw-r--r--source/blender/editors/space_text/text_format_osl.c6
-rw-r--r--source/blender/editors/space_text/text_format_pov.c8
-rw-r--r--source/blender/editors/space_text/text_format_pov_ini.c4
-rw-r--r--source/blender/editors/space_text/text_format_py.c6
-rw-r--r--source/blender/editors/space_text/text_ops.c4
-rw-r--r--source/blender/editors/space_time/space_time.c16
-rw-r--r--source/blender/editors/space_view3d/drawanimviz.c4
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c34
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c2
-rw-r--r--source/blender/editors/space_view3d/drawvolume.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_camera_control.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_fly.c6
-rw-r--r--source/blender/editors/space_view3d/view3d_project.c68
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c1
-rw-r--r--source/blender/editors/space_view3d/view3d_walk.c10
-rw-r--r--source/blender/editors/transform/transform.c26
-rw-r--r--source/blender/editors/transform/transform.h6
-rw-r--r--source/blender/editors/transform/transform_conversions.c50
-rw-r--r--source/blender/editors/transform/transform_generics.c16
-rw-r--r--source/blender/editors/transform/transform_orientations.c2
-rw-r--r--source/blender/editors/transform/transform_snap.c2
-rw-r--r--source/blender/editors/transform/transform_snap_object.c2
-rw-r--r--source/blender/editors/undo/CMakeLists.txt1
-rw-r--r--source/blender/editors/undo/ed_undo.c35
-rw-r--r--source/blender/editors/util/ed_transverts.c2
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.c111
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.h3
-rw-r--r--source/blender/editors/uvedit/uvedit_smart_stitch.c1
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c6
-rw-r--r--source/blender/freestyle/intern/application/AppCanvas.h2
-rw-r--r--source/blender/freestyle/intern/application/AppConfig.h2
-rw-r--r--source/blender/freestyle/intern/application/Controller.cpp10
-rw-r--r--source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h2
-rw-r--r--source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp3
-rw-r--r--source/blender/freestyle/intern/geometry/Grid.h11
-rw-r--r--source/blender/freestyle/intern/geometry/SweepLine.h2
-rw-r--r--source/blender/freestyle/intern/image/ImagePyramid.cpp2
-rw-r--r--source/blender/freestyle/intern/python/BPy_Convert.h90
-rw-r--r--source/blender/freestyle/intern/python/BPy_IntegrationType.cpp2
-rw-r--r--source/blender/freestyle/intern/python/BPy_Interface1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_SShape.cpp2
-rw-r--r--source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp8
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeCamera.h4
-rw-r--r--source/blender/freestyle/intern/system/PythonInterpreter.h2
-rw-r--r--source/blender/freestyle/intern/view_map/Interface0D.cpp10
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapIO.cpp12
-rw-r--r--source/blender/gpu/CMakeLists.txt22
-rw-r--r--source/blender/gpu/GPU_texture.h8
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c8
-rw-r--r--source/blender/gpu/intern/gpu_codegen.h6
-rw-r--r--source/blender/gpu/intern/gpu_shader.c2
-rw-r--r--source/blender/imbuf/intern/dds/BlockDXT.cpp4
-rw-r--r--source/blender/imbuf/intern/dds/ColorBlock.h4
-rw-r--r--source/blender/imbuf/intern/dds/Image.cpp6
-rw-r--r--source/blender/imbuf/intern/dds/Image.h10
-rw-r--r--source/blender/imbuf/intern/filetype.c2
-rw-r--r--source/blender/imbuf/intern/filter.c4
-rw-r--r--source/blender/imbuf/intern/imageprocess.c4
-rw-r--r--source/blender/imbuf/intern/iris.c8
-rw-r--r--source/blender/imbuf/intern/jpeg.c4
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp8
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.h1
-rw-r--r--source/blender/imbuf/intern/scaling.c5
-rw-r--r--source/blender/makesdna/DNA_ID.h6
-rw-r--r--source/blender/makesdna/DNA_action_types.h2
-rw-r--r--source/blender/makesdna/DNA_anim_types.h14
-rw-r--r--source/blender/makesdna/DNA_armature_types.h2
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h34
-rw-r--r--source/blender/makesdna/DNA_gpencil_types.h18
-rw-r--r--source/blender/makesdna/DNA_mask_types.h2
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h7
-rw-r--r--source/blender/makesdna/DNA_object_fluidsim_types.h2
-rw-r--r--source/blender/makesdna/DNA_particle_types.h4
-rw-r--r--source/blender/makesdna/DNA_rigidbody_types.h2
-rw-r--r--source/blender/makesdna/DNA_scene_types.h8
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h2
-rw-r--r--source/blender/makesdna/DNA_smoke_types.h2
-rw-r--r--source/blender/makesdna/DNA_space_types.h2
-rw-r--r--source/blender/makesdna/DNA_tracking_types.h2
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h8
-rw-r--r--source/blender/makesdna/DNA_windowmanager_types.h2
-rw-r--r--source/blender/makesdna/intern/dna_genfile.c10
-rw-r--r--source/blender/makesdna/intern/makesdna.c12
-rw-r--r--source/blender/makesrna/RNA_types.h2
-rw-r--r--source/blender/makesrna/intern/makesrna.c4
-rw-r--r--source/blender/makesrna/intern/rna_ID.c2
-rw-r--r--source/blender/makesrna/intern/rna_access.c2
-rw-r--r--source/blender/makesrna/intern/rna_armature.c2
-rw-r--r--source/blender/makesrna/intern/rna_brush.c12
-rw-r--r--source/blender/makesrna/intern/rna_color.c2
-rw-r--r--source/blender/makesrna/intern/rna_define.c2
-rw-r--r--source/blender/makesrna/intern/rna_dynamicpaint.c8
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c14
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c2
-rw-r--r--source/blender/makesrna/intern/rna_key.c2
-rw-r--r--source/blender/makesrna/intern/rna_lattice.c2
-rw-r--r--source/blender/makesrna/intern/rna_linestyle.c2
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c3
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c7
-rw-r--r--source/blender/makesrna/intern/rna_movieclip.c12
-rw-r--r--source/blender/makesrna/intern/rna_nla.c22
-rw-r--r--source/blender/makesrna/intern/rna_object.c2
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c2
-rw-r--r--source/blender/makesrna/intern/rna_render.c2
-rw-r--r--source/blender/makesrna/intern/rna_scene.c18
-rw-r--r--source/blender/makesrna/intern/rna_space.c10
-rw-r--r--source/blender/makesrna/intern/rna_ui.c5
-rw-r--r--source/blender/makesrna/intern/rna_wm.c4
-rw-r--r--source/blender/modifiers/intern/MOD_build.c34
-rw-r--r--source/blender/modifiers/intern/MOD_explode.c10
-rw-r--r--source/blender/modifiers/intern/MOD_mask.c46
-rw-r--r--source/blender/modifiers/intern/MOD_meshsequencecache.c7
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_image.c4
-rw-r--r--source/blender/physics/intern/BPH_mass_spring.cpp2
-rw-r--r--source/blender/physics/intern/ConstrainedConjugateGradient.h2
-rw-r--r--source/blender/physics/intern/implicit_blender.c2
-rw-r--r--source/blender/python/BPY_extern.h4
-rw-r--r--source/blender/python/bmesh/bmesh_py_api.c2
-rw-r--r--source/blender/python/bmesh/bmesh_py_types.c14
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_customdata.c2
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_meshdata.c8
-rw-r--r--source/blender/python/generic/idprop_py_api.c2
-rw-r--r--source/blender/python/generic/py_capi_utils.c5
-rw-r--r--source/blender/python/generic/py_capi_utils.h34
-rw-r--r--source/blender/python/intern/CMakeLists.txt4
-rw-r--r--source/blender/python/intern/bpy_app.c9
-rw-r--r--source/blender/python/intern/bpy_app_handlers.c4
-rw-r--r--source/blender/python/intern/bpy_app_translations.c28
-rw-r--r--source/blender/python/intern/bpy_interface.c21
-rw-r--r--source/blender/python/intern/bpy_path.c2
-rw-r--r--source/blender/python/intern/bpy_rna.c8
-rw-r--r--source/blender/python/mathutils/mathutils.c2
-rw-r--r--source/blender/python/mathutils/mathutils_Color.c8
-rw-r--r--source/blender/python/mathutils/mathutils_Euler.c4
-rw-r--r--source/blender/python/mathutils/mathutils_Quaternion.c16
-rw-r--r--source/blender/python/mathutils/mathutils_Vector.c16
-rw-r--r--source/blender/python/mathutils/mathutils_geometry.c4
-rw-r--r--source/blender/render/intern/raytrace/rayobject_internal.h8
-rw-r--r--source/blender/render/intern/raytrace/rayobject_rtbuild.h8
-rw-r--r--source/blender/render/intern/raytrace/reorganize.h2
-rw-r--r--source/blender/render/intern/source/pipeline.c7
-rw-r--r--source/blender/render/intern/source/rayshade.c4
-rw-r--r--source/blender/render/intern/source/render_texture.c14
-rw-r--r--source/blender/render/intern/source/rendercore.c2
-rw-r--r--source/blender/render/intern/source/shadbuf.c4
-rw-r--r--source/blender/windowmanager/WM_api.h8
-rw-r--r--source/blender/windowmanager/intern/wm_cursors.c2
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c2
-rw-r--r--source/blender/windowmanager/intern/wm_files.c70
-rw-r--r--source/blender/windowmanager/intern/wm_files_link.c6
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c4
-rw-r--r--source/blender/windowmanager/intern/wm_jobs.c2
-rw-r--r--source/blender/windowmanager/intern/wm_keymap.c2
-rw-r--r--source/blender/windowmanager/intern/wm_menu_type.c1
-rw-r--r--source/blender/windowmanager/intern/wm_operator_type.c2
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c16
-rw-r--r--source/blender/windowmanager/intern/wm_window.c20
-rw-r--r--source/creator/CMakeLists.txt18
-rw-r--r--source/creator/creator_args.c19
-rw-r--r--source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp3
-rw-r--r--source/gameengine/Expressions/EXP_BoolValue.h2
-rw-r--r--source/gameengine/Expressions/EXP_Value.h2
-rw-r--r--source/gameengine/Expressions/intern/InputParser.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_KeyboardSensor.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_MouseSensor.cpp2
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_Dome.cpp16
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_MouseFocusSensor.cpp8
-rw-r--r--source/gameengine/Ketsji/KX_RadarSensor.cpp6
-rw-r--r--source/gameengine/Network/NG_NetworkScene.h2
-rw-r--r--source/gameengine/SceneGraph/SG_Spatial.h2
-rw-r--r--tests/gtests/blenlib/BLI_ghash_performance_test.cc40
-rw-r--r--tests/gtests/blenlib/BLI_ghash_test.cc28
-rw-r--r--tests/gtests/blenlib/BLI_heap_test.cc24
-rw-r--r--tests/gtests/blenlib/BLI_linklist_lockfree_test.cc4
-rw-r--r--tests/python/CMakeLists.txt2
-rw-r--r--tests/python/bl_run_operators.py2
-rw-r--r--tests/python/bl_test.py2
-rwxr-xr-xtests/python/modules/render_report.py11
-rwxr-xr-xtests/python/opengl_draw_tests.py3
1249 files changed, 9304 insertions, 5605 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 91a79af8141..eb8df075380 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -405,6 +405,7 @@ option(WITH_CYCLES "Enable Cycles Render Engine" ON)
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" ${_init_CYCLES_OSL})
+option(WITH_CYCLES_EMBREE "Build Cycles with Embree support" OFF)
option(WITH_CYCLES_OPENSUBDIV "Build Cycles with OpenSubdiv support" ${_init_CYCLES_OPENSUBDIV})
option(WITH_CYCLES_CUDA_BINARIES "Build Cycles CUDA binaries" OFF)
option(WITH_CYCLES_CUBIN_COMPILER "Build cubins with nvrtc based compiler instead of nvcc" OFF)
@@ -577,6 +578,9 @@ if(WIN32)
option(WINDOWS_USE_VISUAL_STUDIO_FOLDERS "Organize the visual studio project according to source folders." ON)
mark_as_advanced(WINDOWS_USE_VISUAL_STUDIO_FOLDERS)
+
+ option(WINDOWS_PYTHON_DEBUG "Include the files needed for debugging python scripts with visual studio 2017+." OFF)
+ mark_as_advanced(WINDOWS_PYTHON_DEBUG)
endif()
# avoid using again
@@ -1518,6 +1522,7 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
"/wd4305" # truncation from 'type1' to 'type2'
"/wd4800" # forcing value to bool 'true' or 'false'
"/wd4828" # The file contains a character that is illegal
+ "/wd4996" # identifier was declared deprecated
# errors:
"/we4013" # 'function' undefined; assuming extern returning int
"/we4133" # incompatible pointer types
diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt
index 00e486bbb40..8c1d38c0635 100644
--- a/build_files/build_environment/CMakeLists.txt
+++ b/build_files/build_environment/CMakeLists.txt
@@ -97,6 +97,10 @@ if(WITH_WEBP)
include(cmake/webp.cmake)
endif()
+if(WITH_EMBREE)
+ include(cmake/embree.cmake)
+endif()
+
if(WIN32)
# HMD branch deps
include(cmake/hidapi.cmake)
diff --git a/build_files/build_environment/cmake/embree.cmake b/build_files/build_environment/cmake/embree.cmake
new file mode 100644
index 00000000000..8c523e25f0c
--- /dev/null
+++ b/build_files/build_environment/cmake/embree.cmake
@@ -0,0 +1,69 @@
+# ***** 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 *****
+
+# Note the utility apps may use png/tiff/gif system libraries, but the
+# library itself does not depend on them, so should give no problems.
+
+set(EMBREE_EXTRA_ARGS
+ -DEMBREE_ISPC_SUPPORT=OFF
+ -DEMBREE_TUTORIALS=OFF
+ -DEMBREE_STATIC_LIB=ON
+ -DEMBREE_RAY_MASK=ON
+ -DEMBREE_FILTER_FUNCTION=ON
+ -DEMBREE_BACKFACE_CULLING=OFF
+ -DEMBREE_TASKING_SYSTEM=INTERNAL
+ -DEMBREE_MAX_ISA=AVX2
+)
+
+if(WIN32)
+ set(EMBREE_BUILD_DIR ${BUILD_MODE}/)
+else()
+ set(EMBREE_BUILD_DIR)
+endif()
+
+ExternalProject_Add(external_embree
+ URL ${EMBREE_URI}
+ DOWNLOAD_DIR ${DOWNLOAD_DIR}
+ URL_HASH MD5=${EMBREE_HASH}
+ PREFIX ${BUILD_DIR}/embree
+ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
+ INSTALL_DIR ${LIBDIR}/embree
+)
+if(WIN32)
+
+ if(BUILD_MODE STREQUAL Release)
+ ExternalProject_Add_Step(external_embree after_install
+ COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/embree ${HARVEST_TARGET}/embree
+ DEPENDEES install
+ )
+ else()
+ ExternalProject_Add_Step(external_embree after_install
+ COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree3.lib ${HARVEST_TARGET}/embree/lib/embree3_d.lib
+ COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx.lib ${HARVEST_TARGET}/embree/lib/embree_avx_d.lib
+ COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx2.lib ${HARVEST_TARGET}/embree/lib/embree_avx2_d.lib
+ COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_sse42.lib ${HARVEST_TARGET}/embree/lib/embree_sse42_d.lib
+ COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/lexers.lib ${HARVEST_TARGET}/embree/lib/lexers_d.lib
+ COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/math.lib ${HARVEST_TARGET}/embree/lib/math_d.lib
+ COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/simd.lib ${HARVEST_TARGET}/embree/lib/simd_d.lib
+ COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/sys.lib ${HARVEST_TARGET}/embree/lib/sys_d.lib
+ COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/tasking.lib ${HARVEST_TARGET}/embree/lib/tasking_d.lib
+ DEPENDEES install
+ )
+ endif()
+
+endif()
diff --git a/build_files/build_environment/cmake/ffi.cmake b/build_files/build_environment/cmake/ffi.cmake
index 18531fd7906..bc0932022cb 100644
--- a/build_files/build_environment/cmake/ffi.cmake
+++ b/build_files/build_environment/cmake/ffi.cmake
@@ -25,8 +25,10 @@ ExternalProject_Add(external_ffi
--enable-shared=no
--enable-static=yes
--with-pic
+ --libdir=${LIBDIR}/ffi/lib/
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && make install
+ PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/ffi/src/external_ffi < ${PATCH_DIR}/ffi.diff
INSTALL_DIR ${LIBDIR}/ffi
)
diff --git a/build_files/build_environment/cmake/ffmpeg.cmake b/build_files/build_environment/cmake/ffmpeg.cmake
index 5c8347cd40e..2a8e3fd5d33 100644
--- a/build_files/build_environment/cmake/ffmpeg.cmake
+++ b/build_files/build_environment/cmake/ffmpeg.cmake
@@ -112,6 +112,7 @@ ExternalProject_Add(external_ffmpeg
--disable-indev=alsa
--disable-outdev=alsa
--disable-crystalhd
+ --disable-sndio
BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make install
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ffmpeg ${DEFAULT_CMAKE_FLAGS}
diff --git a/build_files/build_environment/cmake/harvest.cmake b/build_files/build_environment/cmake/harvest.cmake
index 4ec71bf2ed2..f2e9c2fa8db 100644
--- a/build_files/build_environment/cmake/harvest.cmake
+++ b/build_files/build_environment/cmake/harvest.cmake
@@ -57,7 +57,7 @@ if(BUILD_MODE STREQUAL Release)
# hidapi
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hidapi/ ${HARVEST_TARGET}/hidapi/ &&
# webp, straight up copy
- ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/webp ${HARVEST_TARGET}/webp
+ ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/webp ${HARVEST_TARGET}/webp &&
DEPENDS
)
endif()
@@ -191,5 +191,7 @@ harvest(vpx/lib ffmpeg/lib "*.a")
harvest(webp/lib ffmpeg/lib "*.a")
harvest(x264/lib ffmpeg/lib "*.a")
harvest(xvidcore/lib ffmpeg/lib "*.a")
+harvest(embree/include embree/include "*.h")
+harvest(embree/lib embree/lib "*.a")
endif()
diff --git a/build_files/build_environment/cmake/opencollada.cmake b/build_files/build_environment/cmake/opencollada.cmake
index c9aee2bfe64..ec3dcde1607 100644
--- a/build_files/build_environment/cmake/opencollada.cmake
+++ b/build_files/build_environment/cmake/opencollada.cmake
@@ -48,7 +48,7 @@ if(WIN32)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opencollada after_install
- COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/buffer.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/buffer_d.lib
+ COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/buffer.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/buffer_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/ftoa.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/ftoa_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/GeneratedSaxParser.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/GeneratedSaxParser_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/MathMLSolver.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/MathMLSolver_d.lib
diff --git a/build_files/build_environment/cmake/openvdb.cmake b/build_files/build_environment/cmake/openvdb.cmake
index 125c1b2df85..ccdc00ee0d8 100644
--- a/build_files/build_environment/cmake/openvdb.cmake
+++ b/build_files/build_environment/cmake/openvdb.cmake
@@ -50,9 +50,9 @@ set(OPENVDB_EXTRA_ARGS
)
if(WIN32)
- #Namespaces seem to be buggy and cause linker erorrs due to things not
- #being in the correct namespace
- #needs to link pthreads due to it being a blosc dependency
+ # Namespaces seem to be buggy and cause linker errors due to things not
+ # being in the correct namespace
+ # needs to link pthreads due to it being a blosc dependency
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
-DOPENEXR_NAMESPACE_VERSIONING=OFF
-DEXTRA_LIBS:FILEPATH=${LIBDIR}/pthreads/lib/pthreadVC2.lib
diff --git a/build_files/build_environment/cmake/options.cmake b/build_files/build_environment/cmake/options.cmake
index 7bf971208ae..20e9750bed6 100644
--- a/build_files/build_environment/cmake/options.cmake
+++ b/build_files/build_environment/cmake/options.cmake
@@ -20,6 +20,7 @@ if(WIN32)
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/lapack/fftw3 by installing mingw64" ON)
endif()
option(WITH_WEBP "Enable building of oiio with webp support" OFF)
+option(WITH_EMBREE "Enable building of Embree" OFF)
set(MAKE_THREADS 1 CACHE STRING "Number of threads to run make with")
if(NOT BUILD_MODE)
@@ -143,7 +144,7 @@ else()
set(PLATFORM_CXXFLAGS "-std=c++11 -fPIC")
set(PLATFORM_LDFLAGS)
set(PLATFORM_BUILD_TARGET)
- set(PLATFORM_CMAKE_FLAGS)
+ set(PLATFORM_CMAKE_FLAGS -DCMAKE_INSTALL_LIBDIR=lib)
endif()
if(WITH_OPTIMIZED_DEBUG)
diff --git a/build_files/build_environment/cmake/python.cmake b/build_files/build_environment/cmake/python.cmake
index c61a0084b6f..89cbe8c6ae2 100644
--- a/build_files/build_environment/cmake/python.cmake
+++ b/build_files/build_environment/cmake/python.cmake
@@ -89,11 +89,12 @@ else()
set(PYTHON_CONFIGURE_EXTRA_ARGS "--with-openssl=${LIBDIR}/ssl")
set(PYTHON_CFLAGS "-I${LIBDIR}/sqlite/include -I${LIBDIR}/bzip2/include -I${LIBDIR}/lzma/include -I${LIBDIR}/zlib/include")
- set(PYTHON_LDFLAGS "-L${LIBDIR}/sqlite/lib -L${LIBDIR}/bzip2/lib -L${LIBDIR}/lzma/lib -L${LIBDIR}/zlib/lib")
+ set(PYTHON_LDFLAGS "-L${LIBDIR}/ffi/lib -L${LIBDIR}/sqlite/lib -L${LIBDIR}/bzip2/lib -L${LIBDIR}/lzma/lib -L${LIBDIR}/zlib/lib")
set(PYTHON_CONFIGURE_EXTRA_ENV
export CFLAGS=${PYTHON_CFLAGS} &&
export CPPFLAGS=${PYTHON_CFLAGS} &&
- export LDFLAGS=${PYTHON_LDFLAGS})
+ export LDFLAGS=${PYTHON_LDFLAGS} &&
+ export PKG_CONFIG_PATH=${LIBDIR}/ffi/lib/pkgconfig)
set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_linux.diff)
ExternalProject_Add(external_python
@@ -141,7 +142,7 @@ if(MSVC)
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/select${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/select${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/unicodedata${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/unicodedata${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/winsound${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/winsound${PYTHON_POSTFIX}.pyd
- #xxlimited is an example extention module, we don't need to ship it and debug doesn't build it
+ #xxlimited is an example extension module, we don't need to ship it and debug doesn't build it
#leaving it commented out, so I won't get confused again with the next update.
#COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/xxlimited${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/xxlimited${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/libssl-1_1${SSL_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/libssl-1_1${SSL_POSTFIX}.dll
diff --git a/build_files/build_environment/cmake/sdl.cmake b/build_files/build_environment/cmake/sdl.cmake
index 8383c5a5a79..ab81ad130e8 100644
--- a/build_files/build_environment/cmake/sdl.cmake
+++ b/build_files/build_environment/cmake/sdl.cmake
@@ -25,6 +25,7 @@ else()
-DSDL_STATIC=ON
-DSDL_SHARED=OFF
-DSDL_VIDEO=OFF
+ -DSNDIO=OFF
)
endif()
diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake
index 7ede80a2be9..85f59762ef2 100644
--- a/build_files/build_environment/cmake/versions.cmake
+++ b/build_files/build_environment/cmake/versions.cmake
@@ -21,7 +21,7 @@ set(ZLIB_URI https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz)
set(ZLIB_HASH 1c9f62f0778697a09d36121ead88e08e)
set(OPENAL_VERSION 1.18.2)
-set(OPENAL_URI http://kcat.strangesoft.net/openal-releases/openal-soft-${OPENAL_VERSION}.tar.bz2)
+set(OPENAL_URI http://openal-soft.org/openal-releases/openal-soft-${OPENAL_VERSION}.tar.bz2)
set(OPENAL_HASH d4eeb0889812e2fdeaa1843523d76190)
set(PNG_VERSION 1.6.35)
@@ -298,3 +298,7 @@ set(SSL_HASH ebbfc844a8c8cc0ea5dc10b86c9ce97f401837f3fa08c17b2cdadc118253cf99)
set(SQLITE_VERSION 3.24.0)
set(SQLITE_URI https://www.sqlite.org/2018/sqlite-src-3240000.zip)
set(SQLITE_HASH fb558c49ee21a837713c4f1e7e413309aabdd9c7)
+
+set(EMBREE_VERSION 3.2.4)
+set(EMBREE_URI https://github.com/embree/embree/archive/v${EMBREE_VERSION}.zip)
+set(EMBREE_HASH 3d4a1147002ff43939d45140aa9d6fb8)
diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh
index 8c9105225f1..62e5181e039 100755
--- a/build_files/build_environment/install_deps.sh
+++ b/build_files/build_environment/install_deps.sh
@@ -26,17 +26,17 @@ ARGS=$( \
getopt \
-o s:i:t:h \
--long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,use-cxx11,\
-with-all,with-opencollada,with-jack,\
+with-all,with-opencollada,with-jack,with-embree,\
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,\
force-all,force-python,force-numpy,force-boost,\
force-ocio,force-openexr,force-oiio,force-llvm,force-osl,force-osd,force-openvdb,\
-force-ffmpeg,force-opencollada,force-alembic,\
+force-ffmpeg,force-opencollada,force-alembic,force-embree,\
build-all,build-python,build-numpy,build-boost,\
build-ocio,build-openexr,build-oiio,build-llvm,build-osl,build-osd,build-openvdb,\
-build-ffmpeg,build-opencollada,build-alembic,\
+build-ffmpeg,build-opencollada,build-alembic,build-embree,\
skip-python,skip-numpy,skip-boost,\
skip-ocio,skip-openexr,skip-oiio,skip-llvm,skip-osl,skip-osd,skip-openvdb,\
-skip-ffmpeg,skip-opencollada,skip-alembic \
+skip-ffmpeg,skip-opencollada,skip-alembic,skip-embree \
-- "$@" \
)
@@ -54,8 +54,9 @@ SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
# Do not install some optional, potentially conflicting libs by default...
WITH_ALL=false
-# Do not yet enable opencollada, use --with-opencollada (or --with-all) option to try it.
+# Do not yet enable opencollada or embree, use --with-opencollada/--with-embree (or --with-all) option to try it.
WITH_OPENCOLLADA=false
+WITH_EMBREE=false
THREADS=$(nproc)
@@ -67,6 +68,7 @@ or use --source/--install options, if you want to use other paths!
Number of threads for building: \$THREADS (automatically detected, use --threads=<nbr> to override it).
Full install: \$WITH_ALL (use --with-all option to enable it).
Building OpenCOLLADA: \$WITH_OPENCOLLADA (use --with-opencollada option to enable it).
+Building Embree: \$WITH_EMBREE (use --with-embree option to enable it).
Example:
Full install without OpenCOLLADA: --with-all --skip-opencollada
@@ -118,6 +120,9 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
--with-opencollada
Build and install the OpenCOLLADA libraries.
+ --with-embree
+ Build and install the Embree libraries.
+
--with-jack
Install the jack libraries.
@@ -182,6 +187,9 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
--build-opencollada
Force the build of OpenCOLLADA.
+ --build-embree
+ Force the build of Embree.
+
--build-ffmpeg
Force the build of FFMpeg.
@@ -234,6 +242,9 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
--force-opencollada
Force the rebuild of OpenCOLLADA.
+ --force-embree
+ Force the rebuild of Embree.
+
--force-ffmpeg
Force the rebuild of FFMpeg.
@@ -279,6 +290,9 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
--skip-opencollada
Unconditionally skip OpenCOLLADA installation/building.
+ --skip-Embree
+ Unconditionally skip Embree installation/building.
+
--skip-ffmpeg
Unconditionally skip FFMpeg installation/building.\""
@@ -374,6 +388,12 @@ OPENCOLLADA_FORCE_BUILD=false
OPENCOLLADA_FORCE_REBUILD=false
OPENCOLLADA_SKIP=false
+
+EMBREE_VERSION="3.2.4"
+EMBREE_FORCE_BUILD=false
+EMBREE_FORCE_REBUILD=false
+EMBREE_SKIP=false
+
FFMPEG_VERSION="4.0.2"
FFMPEG_VERSION_MIN="2.8.4"
FFMPEG_FORCE_BUILD=false
@@ -507,6 +527,9 @@ while true; do
--with-opencollada)
WITH_OPENCOLLADA=true; shift; continue
;;
+ --with-embree)
+ WITH_EMBREE=true; shift; continue
+ ;;
--with-jack)
WITH_JACK=true; shift; continue;
;;
@@ -552,6 +575,7 @@ while true; do
OSD_FORCE_BUILD=true
OPENVDB_FORCE_BUILD=true
OPENCOLLADA_FORCE_BUILD=true
+ EMBREE_FORCE_BUILD=true
FFMPEG_FORCE_BUILD=true
ALEMBIC_FORCE_BUILD=true
shift; continue
@@ -593,6 +617,9 @@ while true; do
--build-opencollada)
OPENCOLLADA_FORCE_BUILD=true; shift; continue
;;
+ --build-embree)
+ EMBREE_FORCE_BUILD=true; shift; continue
+ ;;
--build-ffmpeg)
FFMPEG_FORCE_BUILD=true; shift; continue
;;
@@ -611,6 +638,7 @@ while true; do
OSD_FORCE_REBUILD=true
OPENVDB_FORCE_REBUILD=true
OPENCOLLADA_FORCE_REBUILD=true
+ EMBREE_FORCE_REBUILD=true
FFMPEG_FORCE_REBUILD=true
ALEMBIC_FORCE_REBUILD=true
shift; continue
@@ -650,6 +678,9 @@ while true; do
--force-opencollada)
OPENCOLLADA_FORCE_REBUILD=true; shift; continue
;;
+ --force-embree)
+ EMBREE_FORCE_REBUILD=true; shift; continue
+ ;;
--force-ffmpeg)
FFMPEG_FORCE_REBUILD=true; shift; continue
;;
@@ -689,6 +720,9 @@ while true; do
--skip-opencollada)
OPENCOLLADA_SKIP=true; shift; continue
;;
+ --skip-embree)
+ EMBREE_SKIP=true; shift; continue
+ ;;
--skip-ffmpeg)
FFMPEG_SKIP=true; shift; continue
;;
@@ -713,6 +747,9 @@ done
if [ "$WITH_ALL" = true -a "$OPENCOLLADA_SKIP" = false ]; then
WITH_OPENCOLLADA=true
fi
+if [ "$WITH_ALL" = true -a "$EMBREE_SKIP" = false ]; then
+ WITH_EMBREE=true
+fi
if [ "$WITH_ALL" = true ]; then
WITH_JACK=true
fi
@@ -748,9 +785,10 @@ OCIO_SOURCE=( "https://github.com/imageworks/OpenColorIO/archive/v$OCIO_VERSION.
#~ OCIO_SOURCE_REPO_UID="6de971097c7f552300f669ed69ca0b6cf5a70843"
OPENEXR_USE_REPO=false
-OPENEXR_SOURCE=( "https://github.com/openexr/openexr/releases/download/v$OPENEXR_VERSION/openexr-$OPENEXR_VERSION.tar.gz" )
+#~ OPENEXR_SOURCE=( "https://github.com/openexr/openexr/releases/download/v$OPENEXR_VERSION/openexr-$OPENEXR_VERSION.tar.gz" )
+OPENEXR_SOURCE_REPO_UID="0ac2ea34c8f3134148a5df4052e40f155b76f6fb"
+OPENEXR_SOURCE=( "https://github.com/openexr/openexr/archive/$OPENEXR_SOURCE_REPO_UID.tar.gz" )
#~ OPENEXR_SOURCE_REPO=( "https://github.com/mont29/openexr.git" )
-#~ OPENEXR_SOURCE_REPO_UID="2787aa1cf652d244ed45ae124eb1553f6cff11ee"
ILMBASE_SOURCE=( "https://github.com/openexr/openexr/releases/download/v$ILMBASE_VERSION/ilmbase-$ILMBASE_VERSION.tar.gz" )
OIIO_USE_REPO=false
@@ -800,6 +838,13 @@ OPENCOLLADA_SOURCE=( "https://github.com/KhronosGroup/OpenCOLLADA/archive/v${OPE
#~ OPENCOLLADA_REPO_UID="e937c3897b86fc0da53cde97257f5156"
#~ OPENCOLLADA_REPO_BRANCH="master"
+EMBREE_USE_REPO=false
+EMBREE_SOURCE=( "https://github.com/embree/embree/archive/v${EMBREE_VERSION}.tar.gz" )
+#~ EMBREE_SOURCE_REPO=( "https://github.com/embree/embree.git" )
+#~ EMBREE_REPO_UID="4a12bfed63c90e85b6eab98b8cdd8dd2a3ba5809"
+#~ EMBREE_REPO_BRANCH="master"
+
+
FFMPEG_SOURCE=( "http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2" )
# C++11 is required now
@@ -840,6 +885,7 @@ You may also want to build them yourself (optional ones are [between brackets]):
* [OpenSubDiv $OSD_VERSION_MIN] (from $OSD_SOURCE_REPO, branch $OSD_SOURCE_REPO_BRANCH, commit $OSD_SOURCE_REPO_UID).
* [OpenVDB $OPENVDB_VERSION_MIN] (from $OPENVDB_SOURCE), [Blosc $OPENVDB_BLOSC_VERSION] (from $OPENVDB_BLOSC_SOURCE).
* [OpenCollada $OPENCOLLADA_VERSION] (from $OPENCOLLADA_SOURCE).
+ * [Embree $EMBREE_VERSION] (from $EMBREE_SOURCE).
* [Alembic $ALEMBIC_VERSION] (from $ALEMBIC_SOURCE).\""
if [ "$DO_SHOW_DEPS" = true ]; then
@@ -1204,7 +1250,7 @@ compile_Boost() {
if [ ! -d $_inst ]; then
INFO "Building Boost-$BOOST_VERSION"
- # Rebuild dependecies as well!
+ # Rebuild dependencies as well!
OIIO_FORCE_BUILD=true
OIIO_FORCE_REBUILD=true
OSL_FORCE_BUILD=true
@@ -1397,7 +1443,7 @@ compile_ILMBASE() {
if [ ! -d $_openexr_inst ]; then
INFO "Building ILMBase-$ILMBASE_VERSION"
- # Rebuild dependecies as well!
+ # Rebuild dependencies as well!
OPENEXR_FORCE_BUILD=true
OPENEXR_FORCE_REBUILD=true
@@ -1493,7 +1539,7 @@ compile_OPENEXR() {
if [ ! -d $_inst ]; then
INFO "Building OpenEXR-$OPENEXR_VERSION"
- # Rebuild dependecies as well!
+ # Rebuild dependencies as well!
OIIO_FORCE_BUILD=true
OIIO_FORCE_REBUILD=true
@@ -1607,7 +1653,7 @@ compile_OIIO() {
if [ ! -d $_inst ]; then
INFO "Building OpenImageIO-$OIIO_VERSION"
- # Rebuild dependecies as well!
+ # Rebuild dependencies as well!
OSL_FORCE_BUILD=true
OSL_FORCE_REBUILD=true
@@ -1749,7 +1795,7 @@ compile_LLVM() {
if [ ! -d $_inst ]; then
INFO "Building LLVM-$LLVM_VERSION (CLANG included!)"
- # Rebuild dependecies as well!
+ # Rebuild dependencies as well!
OSL_FORCE_BUILD=true
OSL_FORCE_REBUILD=true
@@ -2075,7 +2121,7 @@ compile_BLOSC() {
if [ ! -d $_inst ]; then
INFO "Building Blosc-$OPENVDB_BLOSC_VERSION"
- # Rebuild dependecies as well!
+ # Rebuild dependencies as well!
OPENVDB_FORCE_BUILD=true
OPENVDB_FORCE_REBUILD=true
@@ -2415,6 +2461,101 @@ compile_OpenCOLLADA() {
fi
}
+#### Build Embree ####
+_init_embree() {
+ _src=$SRC/embree-$EMBREE_VERSION
+ _git=true
+ _inst=$INST/embree-$EMBREE_VERSION
+ _inst_shortcut=$INST/embree
+}
+
+clean_Embree() {
+ _init_embree
+ _clean
+}
+
+compile_Embree() {
+ if [ "$NO_BUILD" = true ]; then
+ WARNING "--no-build enabled, Embree will not be compiled!"
+ return
+ fi
+
+ # To be changed each time we make edits that would modify the compiled results!
+ embree_magic=9
+ _init_embree
+
+ # Clean install if needed!
+ magic_compile_check embree-$EMBREE_VERSION $embree_magic
+ if [ $? -eq 1 -o "$EMBREE_FORCE_REBUILD" = true ]; then
+ clean_Embree
+ fi
+
+ if [ ! -d $_inst ]; then
+ INFO "Building Embree-$EMBREE_VERSION"
+
+ prepare_opt
+
+ if [ ! -d $_src ]; then
+ mkdir -p $SRC
+ if [ "EMBREE_USE_REPO" = true ]; then
+ git clone $EMBREE_SOURCE_REPO $_src
+ else
+ download EMBREE_SOURCE[@] "$_src.tar.gz"
+ INFO "Unpacking Embree-$EMBREE_VERSION"
+ tar -C $SRC -xf $_src.tar.gz
+ fi
+ fi
+
+ cd $_src
+
+ if [ "$EMBREE_USE_REPO" = true ]; then
+ git pull origin $EMBREE_REPO_BRANCH
+
+ # Stick to same rev as windows' libs...
+ git checkout $EMBREE_REPO_UID
+ git reset --hard
+ fi
+
+ # Always refresh the whole build!
+ if [ -d build ]; then
+ rm -rf build
+ fi
+ mkdir build
+ cd build
+
+ cmake_d="-D CMAKE_BUILD_TYPE=Release"
+ cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
+ cmake_d="$cmake_d -D EMBREE_ISPC_SUPPORT=OFF"
+ cmake_d="$cmake_d -D EMBREE_TUTORIALS=OFF"
+ cmake_d="$cmake_d -D EMBREE_STATIC_LIB=ON"
+ cmake_d="$cmake_d -D EMBREE_RAY_MASK=ON"
+ cmake_d="$cmake_d -D EMBREE_FILTER_FUNCTION=ON"
+ cmake_d="$cmake_d -D EMBREE_BACKFACE_CULLING=OFF"
+ cmake_d="$cmake_d -D EMBREE_TASKING_SYSTEM=INTERNAL"
+ cmake_d="$cmake_d -D EMBREE_MAX_ISA=AVX2"
+
+ cmake $cmake_d ../
+
+ make -j$THREADS && make install
+ make clean
+
+ if [ -d $_inst ]; then
+ _create_inst_shortcut
+ else
+ ERROR "Embree-$EMBREE_VERSION failed to compile, exiting"
+ exit 1
+ fi
+
+ magic_compile_set embree-$EMBREE_VERSION $embree_magic
+
+ cd $CWD
+ INFO "Done compiling Embree-$EMBREE_VERSION!"
+ else
+ INFO "Own Embree-$EMBREE_VERSION is up to date, nothing to do!"
+ INFO "If you want to force rebuild of this lib, use the --force-embree option."
+ fi
+}
+
#### Build FFMPEG ####
_init_ffmpeg() {
_src=$SRC/ffmpeg-$FFMPEG_VERSION
@@ -2982,6 +3123,23 @@ install_DEB() {
fi
fi
+ if [ "$WITH_EMBREE" = true ]; then
+ _do_compile_embree=false
+ PRINT ""
+ if [ "$EMBREE_SKIP" = true ]; then
+ WARNING "Skipping Embree installation, as requested..."
+ elif [ "$EMBREE_FORCE_BUILD" = true ]; then
+ INFO "Forced Embree building, as requested..."
+ _do_compile_embree=true
+ else
+ # No package currently!
+ _do_compile_embree=true
+ fi
+
+ if [ "$_do_compile_embree" = true ]; then
+ compile_Embree
+ fi
+ fi
PRINT ""
if [ "$FFMPEG_SKIP" = true ]; then
@@ -3529,6 +3687,23 @@ install_RPM() {
fi
fi
+ if [ "$WITH_EMBREE" = true ]; then
+ PRINT ""
+ _do_compile_embree=false
+ if [ "$OPENCOLLADA_SKIP" = true ]; then
+ WARNING "Skipping Embree installation, as requested..."
+ elif [ "$EMBREE_FORCE_BUILD" = true ]; then
+ INFO "Forced Embree building, as requested..."
+ _do_compile_embree=true
+ else
+ # No package...
+ _do_compile_embree=true
+ fi
+
+ if [ "$_do_compile_embree" = true ]; then
+ compile_Embree
+ fi
+ fi
PRINT ""
if [ "$FFMPEG_SKIP" = true ]; then
@@ -3959,6 +4134,28 @@ install_ARCH() {
fi
fi
+ if [ "$WITH_EMBREE" = true ]; then
+ PRINT ""
+ _do_compile_embree=false
+ if [ "$EMBREE_SKIP" = true ]; then
+ WARNING "Skipping Embree installation, as requested..."
+ elif [ "$EMBREE_FORCE_BUILD" = true ]; then
+ INFO "Forced Embree building, as requested..."
+ _do_compile_embree=true
+ else
+ check_package_ARCH embree
+ if [ $? -eq 0 ]; then
+ install_packages_ARCH embree
+ clean_Embree
+ else
+ _do_compile_embree=true
+ fi
+ fi
+
+ if [ "$_do_compile_embree" = true ]; then
+ compile_Embree
+ fi
+ fi
PRINT ""
if [ "$FFMPEG_SKIP" = true ]; then
@@ -4130,6 +4327,21 @@ install_OTHER() {
fi
fi
+ if [ "$WITH_EMBREE" = true ]; then
+ _do_compile_embree=false
+ PRINT ""
+ if [ "$EMBREE_SKIP" = true ]; then
+ WARNING "Skipping Embree installation, as requested..."
+ elif [ "$EMBREE_FORCE_BUILD" = true ]; then
+ INFO "Forced Embree building, as requested..."
+ _do_compile_embree=true
+ fi
+
+ if [ "$_do_compile_embree" = true ]; then
+ PRINT ""
+ compile_Embree
+ fi
+ fi
PRINT ""
if [ "$FFMPEG_SKIP" = true ]; then
@@ -4325,6 +4537,12 @@ print_info() {
_buildargs="$_buildargs $_1"
fi
+ if [ "$WITH_EMBREE" = true ]; then
+ _1="-D WITH_CYCLES_EMBREE=ON"
+ PRINT " $_1"
+ _buildargs="$_buildargs $_1"
+ fi
+
if [ "$WITH_JACK" = true ]; then
_1="-D WITH_JACK=ON"
_2="-D WITH_JACK_DYNLOAD=ON"
diff --git a/build_files/build_environment/patches/ffi.diff b/build_files/build_environment/patches/ffi.diff
new file mode 100644
index 00000000000..84e7f0407e2
--- /dev/null
+++ b/build_files/build_environment/patches/ffi.diff
@@ -0,0 +1,11 @@
+--- Makefile.in 2014-11-12 06:59:58.000000000 -0500
++++ Makefile.in 2018-09-17 13:36:10.974086554 -0400
+@@ -600,7 +600,7 @@
+ target_os = @target_os@
+ target_vendor = @target_vendor@
+ toolexecdir = @toolexecdir@
+-toolexeclibdir = @toolexeclibdir@
++toolexeclibdir = $(libdir)
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
diff --git a/build_files/build_environment/windows/build_deps.cmd b/build_files/build_environment/windows/build_deps.cmd
index 500e689cdc8..bb9dda81435 100644
--- a/build_files/build_environment/windows/build_deps.cmd
+++ b/build_files/build_environment/windows/build_deps.cmd
@@ -68,6 +68,8 @@ goto usage
setlocal ENABLEEXTENSIONS
set CMAKE_DEBUG_OPTIONS=-DWITH_OPTIMIZED_DEBUG=On
if "%3" == "debug" set CMAKE_DEBUG_OPTIONS=-DWITH_OPTIMIZED_DEBUG=Off
+set dobuild=1
+if "%4" == "nobuild" set dobuild=0
set SOURCE_DIR=%~dp0\..
set BUILD_DIR=%cd%\build
@@ -117,20 +119,24 @@ cd %Staging%\%BuildDir%%ARCH%R
echo %DATE% %TIME% : Start > %StatusFile%
cmake -G "%CMAKE_BUILDER%" %SOURCE_DIR% -DDOWNLOAD_DIR=%BUILD_DIR%/downloads -DBUILD_MODE=Release -DHARVEST_TARGET=%HARVEST_DIR%/%HARVESTROOT%%VSVER_SHORT%/
echo %DATE% %TIME% : Release Configuration done >> %StatusFile%
-msbuild /m "ll.vcxproj" /p:Configuration=Release /fl /flp:logfile=BlenderDeps_llvm.log;Verbosity=normal
-msbuild /m "BlenderDependencies.sln" /p:Configuration=Release /fl /flp:logfile=BlenderDeps.log;Verbosity=minimal /verbosity:minimal
-echo %DATE% %TIME% : Release Build done >> %StatusFile%
-cmake --build . --target Harvest_Release_Results > Harvest_Release.txt
+if "%dobuild%" == "1" (
+ msbuild /m "ll.vcxproj" /p:Configuration=Release /fl /flp:logfile=BlenderDeps_llvm.log;Verbosity=normal
+ msbuild /m "BlenderDependencies.sln" /p:Configuration=Release /fl /flp:logfile=BlenderDeps.log;Verbosity=minimal /verbosity:minimal
+ echo %DATE% %TIME% : Release Build done >> %StatusFile%
+ cmake --build . --target Harvest_Release_Results > Harvest_Release.txt
+)
echo %DATE% %TIME% : Release Harvest done >> %StatusFile%
cd %BUILD_DIR%
mkdir %STAGING%\%BuildDir%%ARCH%D
cd %Staging%\%BuildDir%%ARCH%D
cmake -G "%CMAKE_BUILDER%" %SOURCE_DIR% -DDOWNLOAD_DIR=%BUILD_DIR%/downloads -DCMAKE_BUILD_TYPE=Debug -DBUILD_MODE=Debug -DHARVEST_TARGET=%HARVEST_DIR%/%HARVESTROOT%%VSVER_SHORT%/ %CMAKE_DEBUG_OPTIONS%
echo %DATE% %TIME% : Debug Configuration done >> %StatusFile%
-msbuild /m "ll.vcxproj" /p:Configuration=Debug /fl /flp:logfile=BlenderDeps_llvm.log;;Verbosity=normal
-msbuild /m "BlenderDependencies.sln" /p:Configuration=Debug /verbosity:n /fl /flp:logfile=BlenderDeps.log;;Verbosity=normal
-echo %DATE% %TIME% : Debug Build done >> %StatusFile%
-cmake --build . --target Harvest_Debug_Results> Harvest_Debug.txt
+if "%dobuild%" == "1" (
+ msbuild /m "ll.vcxproj" /p:Configuration=Debug /fl /flp:logfile=BlenderDeps_llvm.log;;Verbosity=normal
+ msbuild /m "BlenderDependencies.sln" /p:Configuration=Debug /verbosity:n /fl /flp:logfile=BlenderDeps.log;;Verbosity=normal
+ echo %DATE% %TIME% : Debug Build done >> %StatusFile%
+ cmake --build . --target Harvest_Debug_Results> Harvest_Debug.txt
+)
echo %DATE% %TIME% : Debug Harvest done >> %StatusFile%
cd %BUILD_DIR%
diff --git a/build_files/cmake/Modules/FindEmbree.cmake b/build_files/cmake/Modules/FindEmbree.cmake
new file mode 100644
index 00000000000..d3ef8c6eb4c
--- /dev/null
+++ b/build_files/cmake/Modules/FindEmbree.cmake
@@ -0,0 +1,108 @@
+# - Find Embree library
+# Find the native Embree includes and library
+# This module defines
+# EMBREE_INCLUDE_DIRS, where to find rtcore.h, Set when
+# EMBREE_INCLUDE_DIR is found.
+# EMBREE_LIBRARIES, libraries to link against to use Embree.
+# EMBREE_ROOT_DIR, The base directory to search for Embree.
+# This can also be an environment variable.
+# EMBREEFOUND, If false, do not try to use Embree.
+#
+# also defined, but not for general use are
+# EMBREE_LIBRARY, where to find the Embree library.
+
+#=============================================================================
+# Copyright 2018 Blender Foundation.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+# If EMBREE_ROOT_DIR was defined in the environment, use it.
+IF(NOT EMBREE_ROOT_DIR AND NOT $ENV{EMBREE_ROOT_DIR} STREQUAL "")
+ SET(EMBREE_ROOT_DIR $ENV{EMBREE_ROOT_DIR})
+ENDIF()
+
+SET(_embree_SEARCH_DIRS
+ ${EMBREE_ROOT_DIR}
+ /usr/local
+ /sw # Fink
+ /opt/local # DarwinPorts
+ /opt/embree
+ /opt/lib/embree
+)
+
+FIND_PATH(EMBREE_INCLUDE_DIR
+ NAMES
+ embree3/rtcore.h
+ HINTS
+ ${_embree_SEARCH_DIRS}
+ PATH_SUFFIXES
+ include
+)
+
+
+SET(_embree_FIND_COMPONENTS
+ embree_avx
+ embree_avx2
+ embree_sse42
+ embree3
+ lexers
+ math
+ simd
+ sys
+ tasking
+)
+
+SET(_embree_LIBRARIES)
+FOREACH(COMPONENT ${_embree_FIND_COMPONENTS})
+ STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
+
+ FIND_LIBRARY(EMBREE_${UPPERCOMPONENT}_LIBRARY
+ NAMES
+ ${COMPONENT}
+ HINTS
+ ${_embree_SEARCH_DIRS}
+ PATH_SUFFIXES
+ lib64 lib
+ )
+ LIST(APPEND _embree_LIBRARIES "${EMBREE_${UPPERCOMPONENT}_LIBRARY}")
+ENDFOREACH()
+
+
+FIND_LIBRARY(EMBREE_LIBRARY
+ NAMES
+ libembree3
+ HINTS
+ ${_embree_SEARCH_DIRS}
+ PATH_SUFFIXES
+ lib64 lib
+)
+
+# handle the QUIETLY and REQUIRED arguments and set EMBREE_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(EMBREE DEFAULT_MSG
+ _embree_LIBRARIES EMBREE_INCLUDE_DIR)
+
+IF(EMBREE_FOUND)
+ SET(EMBREE_LIBRARIES ${_embree_LIBRARIES})
+ SET(EMBREE_INCLUDE_DIRS ${EMBREE_INCLUDE_DIR})
+ENDIF(EMBREE_FOUND)
+
+MARK_AS_ADVANCED(
+ EMBREE_INCLUDE_DIR
+)
+
+FOREACH(COMPONENT ${_embree_FIND_COMPONENTS})
+ STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
+ MARK_AS_ADVANCED(EMBREE_${UPPERCOMPONENT}_LIBRARY)
+ENDFOREACH()
+
+UNSET(_embree_SEARCH_DIRS)
+UNSET(_embree_FIND_COMPONENTS)
+UNSET(_embree_LIBRARIES)
diff --git a/build_files/cmake/Modules/FindJeMalloc.cmake b/build_files/cmake/Modules/FindJeMalloc.cmake
index 506892b34ba..0abe103cd2e 100644
--- a/build_files/cmake/Modules/FindJeMalloc.cmake
+++ b/build_files/cmake/Modules/FindJeMalloc.cmake
@@ -53,6 +53,15 @@ FIND_LIBRARY(JEMALLOC_LIBRARY
lib64 lib
)
+if(JEMALLOC_INCLUDE_DIR)
+ SET(_version_regex "^#define[ \t]+JEMALLOC_VERSION[ \t]+\"([^\"]+)\".*")
+ file(STRINGS "${JEMALLOC_INCLUDE_DIR}/jemalloc.h"
+ JEMALLOC_VERSION REGEX "${_version_regex}")
+ string(REGEX REPLACE "${_version_regex}" "\\1"
+ JEMALLOC_VERSION "${JEMALLOC_VERSION}")
+ unset(_version_regex)
+endif()
+
# handle the QUIETLY and REQUIRED arguments and set JEMALLOC_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
diff --git a/build_files/cmake/Modules/FindOpenColorIO.cmake b/build_files/cmake/Modules/FindOpenColorIO.cmake
index 1d26d6b0f86..218b5f721bc 100644
--- a/build_files/cmake/Modules/FindOpenColorIO.cmake
+++ b/build_files/cmake/Modules/FindOpenColorIO.cmake
@@ -60,7 +60,7 @@ FOREACH(COMPONENT ${_opencolorio_FIND_COMPONENTS})
HINTS
${_opencolorio_SEARCH_DIRS}
PATH_SUFFIXES
- lib64 lib
+ lib64 lib lib64/static lib/static
)
IF(OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY)
LIST(APPEND _opencolorio_LIBRARIES "${OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY}")
diff --git a/build_files/cmake/Modules/FindPCRE.cmake b/build_files/cmake/Modules/FindPCRE.cmake
index 20b5c1d5c28..1fd56dc1234 100644
--- a/build_files/cmake/Modules/FindPCRE.cmake
+++ b/build_files/cmake/Modules/FindPCRE.cmake
@@ -56,8 +56,13 @@ INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG
PCRE_LIBRARY PCRE_INCLUDE_DIR)
+# With 'make deps' precompiled libs, opencollada ships with a copy of libpcre
+# but not the headers, ${PCRE_LIBRARY} will be valid in this case
+# but PCRE_FOUND will be FALSE. So we set this variable outside of
+# the IF(PCRE_FOUND) below to allow blender to successfully link.
+SET(PCRE_LIBRARIES ${PCRE_LIBRARY})
+
IF(PCRE_FOUND)
- SET(PCRE_LIBRARIES ${PCRE_LIBRARY})
SET(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR})
ENDIF(PCRE_FOUND)
diff --git a/build_files/cmake/Modules/FindPythonLibsUnix.cmake b/build_files/cmake/Modules/FindPythonLibsUnix.cmake
index 140f8be048a..84e1fbdb35c 100644
--- a/build_files/cmake/Modules/FindPythonLibsUnix.cmake
+++ b/build_files/cmake/Modules/FindPythonLibsUnix.cmake
@@ -38,7 +38,7 @@ IF(NOT PYTHON_ROOT_DIR AND NOT $ENV{PYTHON_ROOT_DIR} STREQUAL "")
SET(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR})
ENDIF()
-SET(PYTHON_VERSION 3.6 CACHE STRING "Python Version (major and minor only)")
+SET(PYTHON_VERSION 3.7 CACHE STRING "Python Version (major and minor only)")
MARK_AS_ADVANCED(PYTHON_VERSION)
@@ -75,7 +75,7 @@ SET(_python_SEARCH_DIRS
"/opt/lib/python-${PYTHON_VERSION}"
)
-# only search for the dirs if we havn't already
+# only search for the dirs if we haven't already
IF((NOT _IS_INC_DEF) OR (NOT _IS_INC_CONF_DEF) OR (NOT _IS_LIB_DEF) OR (NOT _IS_LIB_PATH_DEF))
SET(_PYTHON_ABI_FLAGS_TEST
"m;mu;u; " # release
diff --git a/build_files/cmake/clang_array_check.py b/build_files/cmake/clang_array_check.py
index 6eaaebce52f..ad7974e2176 100644
--- a/build_files/cmake/clang_array_check.py
+++ b/build_files/cmake/clang_array_check.py
@@ -130,7 +130,7 @@ def function_parm_wash_tokens(parm):
)
"""
- Return tolens without trailing commads and 'const'
+ Return tolens without trailing commands and 'const'
"""
tokens = [t for t in parm.get_tokens()]
diff --git a/build_files/cmake/cmake_consistency_check.py b/build_files/cmake/cmake_consistency_check.py
index 443657532de..ab87095874f 100755
--- a/build_files/cmake/cmake_consistency_check.py
+++ b/build_files/cmake/cmake_consistency_check.py
@@ -285,7 +285,7 @@ def main():
ignore_used = [False] * len(IGNORE)
# now check on files not accounted for.
- print("\nC/C++ Files CMake doesnt know about...")
+ print("\nC/C++ Files CMake does not know about...")
for cf in sorted(source_list(SOURCE_DIR, is_c)):
if not is_ignore(cf, ignore_used):
if cf not in global_c:
@@ -302,7 +302,7 @@ def main():
print("bad_c: ", cf)
'''
- print("\nC/C++ Headers CMake doesnt know about...")
+ print("\nC/C++ Headers CMake does not know about...")
for hf in sorted(source_list(SOURCE_DIR, is_c_header)):
if not is_ignore(hf, ignore_used):
if hf not in global_h:
diff --git a/build_files/cmake/cmake_netbeans_project.py b/build_files/cmake/cmake_netbeans_project.py
index 97eb6b245f5..02a800fe6f1 100755
--- a/build_files/cmake/cmake_netbeans_project.py
+++ b/build_files/cmake/cmake_netbeans_project.py
@@ -71,7 +71,7 @@ def create_nb_project_main():
if (includes, defines) == (None, None):
return
- # for some reason it doesnt give all internal includes
+ # for some reason it doesn't give all internal includes
includes = list(set(includes) | set(dirname(f) for f in files if is_c_header(f)))
includes.sort()
diff --git a/build_files/cmake/cmake_qtcreator_project.py b/build_files/cmake/cmake_qtcreator_project.py
index 231784df588..ee9f2e3f58e 100755
--- a/build_files/cmake/cmake_qtcreator_project.py
+++ b/build_files/cmake/cmake_qtcreator_project.py
@@ -85,7 +85,7 @@ def create_qtc_project_main(name):
if (includes, defines) == (None, None):
return
- # for some reason it doesnt give all internal includes
+ # for some reason it doesn't give all internal includes
includes = list(set(includes) | set(os.path.dirname(f)
for f in files_rel if is_c_header(f)))
includes.sort()
diff --git a/build_files/cmake/config/blender_full.cmake b/build_files/cmake/config/blender_full.cmake
index c896c0452b3..e38d1781b5d 100644
--- a/build_files/cmake/config/blender_full.cmake
+++ b/build_files/cmake/config/blender_full.cmake
@@ -1,4 +1,4 @@
-# Turn everything ON thats expected for an official release builds.
+# Turn everything ON that's expected for an official release builds.
#
# Example usage:
# cmake -C../blender/build_files/cmake/config/blender_full.cmake ../blender
diff --git a/build_files/cmake/config/blender_headless.cmake b/build_files/cmake/config/blender_headless.cmake
index 4399eb9e5c4..18a023af99c 100644
--- a/build_files/cmake/config/blender_headless.cmake
+++ b/build_files/cmake/config/blender_headless.cmake
@@ -9,7 +9,7 @@ set(WITH_HEADLESS ON CACHE BOOL "" FORCE)
set(WITH_GAMEENGINE OFF CACHE BOOL "" FORCE)
# disable audio, its possible some devs may want this but for now disable
-# so the python module doesnt hold the audio device and loads quickly.
+# so the python module doesn't hold the audio device and loads quickly.
set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
set(WITH_FFTW3 OFF CACHE BOOL "" FORCE)
set(WITH_JACK OFF CACHE BOOL "" FORCE)
diff --git a/build_files/cmake/config/blender_release.cmake b/build_files/cmake/config/blender_release.cmake
index 121a82f8059..f475bb0714a 100644
--- a/build_files/cmake/config/blender_release.cmake
+++ b/build_files/cmake/config/blender_release.cmake
@@ -1,4 +1,4 @@
-# Turn everything ON thats expected for an official release builds.
+# Turn everything ON that's expected for an official release builds.
#
# Example usage:
# cmake -C../blender/build_files/cmake/config/blender_release.cmake ../blender
diff --git a/build_files/cmake/config/bpy_module.cmake b/build_files/cmake/config/bpy_module.cmake
index 854d6e49370..c90fafc60ab 100644
--- a/build_files/cmake/config/bpy_module.cmake
+++ b/build_files/cmake/config/bpy_module.cmake
@@ -16,7 +16,7 @@ set(WITH_PYTHON_INSTALL OFF CACHE BOOL "" FORCE)
set(WITH_GAMEENGINE OFF CACHE BOOL "" FORCE)
# disable audio, its possible some devs may want this but for now disable
-# so the python module doesnt hold the audio device and loads quickly.
+# so the python module doesn't hold the audio device and loads quickly.
set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
set(WITH_FFTW3 OFF CACHE BOOL "" FORCE)
set(WITH_JACK OFF CACHE BOOL "" FORCE)
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 69a1eb2eb3a..0143335d3b1 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -199,7 +199,7 @@ endfunction()
# Support per-target CMake flags
# Read from: CMAKE_C_FLAGS_**** (made upper case) when set.
#
-# 'name' should alway match the target name,
+# 'name' should always match the target name,
# use this macro before add_library or add_executable.
#
# Optionally takes an arg passed to set(), eg PARENT_SCOPE.
@@ -370,6 +370,11 @@ function(setup_liblinks
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}" PARENT_SCOPE)
set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}" PARENT_SCOPE)
+ # jemalloc must be early in the list, to be before pthread (see T57998)
+ if(WITH_MEM_JEMALLOC)
+ target_link_libraries(${target} ${JEMALLOC_LIBRARIES})
+ endif()
+
target_link_libraries(
${target}
${PNG_LIBRARIES}
@@ -435,6 +440,9 @@ function(setup_liblinks
if(WITH_CYCLES_OSL)
target_link_libraries(${target} ${OSL_LIBRARIES})
endif()
+ if(WITH_CYCLES_EMBREE)
+ target_link_libraries(${target} ${EMBREE_LIBRARIES})
+ endif()
if(WITH_BOOST)
target_link_libraries(${target} ${BOOST_LIBRARIES})
if(Boost_USE_STATIC_LIBS AND Boost_USE_ICU)
@@ -482,9 +490,6 @@ function(setup_liblinks
)
endif()
endif()
- if(WITH_MEM_JEMALLOC)
- target_link_libraries(${target} ${JEMALLOC_LIBRARIES})
- endif()
if(WITH_MOD_CLOTH_ELTOPO)
target_link_libraries(${target} ${LAPACK_LIBRARIES})
endif()
@@ -509,7 +514,7 @@ function(setup_liblinks
target_link_libraries(${target} ${GFLAGS_LIBRARIES})
endif()
- # We put CLEW and CUEW here because OPENSUBDIV_LIBRARIES dpeends on them..
+ # We put CLEW and CUEW here because OPENSUBDIV_LIBRARIES depends on them..
if(WITH_CYCLES OR WITH_COMPOSITOR OR WITH_OPENSUBDIV)
target_link_libraries(${target} "extern_clew")
if(WITH_CUDA_DYNLOAD)
@@ -666,10 +671,10 @@ function(SETUP_BLENDER_SORTED_LIBS)
bf_intern_mikktspace
bf_intern_dualcon
bf_intern_cycles
+ cycles_device
cycles_render
cycles_graph
cycles_bvh
- cycles_device
cycles_kernel
cycles_util
cycles_subd
@@ -1195,7 +1200,11 @@ function(delayed_do_install
foreach(i RANGE ${n})
list(GET files ${i} f)
list(GET destinations ${i} d)
- install(FILES ${f} DESTINATION ${targetdir}/${d})
+ if(NOT IS_ABSOLUTE ${d})
+ install(FILES ${f} DESTINATION ${targetdir}/${d})
+ else()
+ install(FILES ${f} DESTINATION ${d})
+ endif()
endforeach()
endif()
endfunction()
@@ -1232,6 +1241,8 @@ function(data_to_c_simple
get_filename_component(_file_to ${CMAKE_CURRENT_BINARY_DIR}/${file_from}.c REALPATH)
list(APPEND ${list_to_add} ${_file_to})
+ source_group(Generated FILES ${_file_to})
+ list(APPEND ${list_to_add} ${file_from})
set(${list_to_add} ${${list_to_add}} PARENT_SCOPE)
get_filename_component(_file_to_path ${_file_to} PATH)
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake
index b10a2e175c1..b57c351862f 100644
--- a/build_files/cmake/platform/platform_apple.cmake
+++ b/build_files/cmake/platform/platform_apple.cmake
@@ -378,6 +378,11 @@ if(WITH_CYCLES_OSL)
endif()
endif()
+if(WITH_CYCLES_EMBREE)
+ find_package(Embree 3.2.4 REQUIRED)
+ set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Xlinker -stack_size -Xlinker 0x100000")
+endif()
+
if(WITH_OPENMP)
execute_process(COMMAND ${CMAKE_C_COMPILER} --version OUTPUT_VARIABLE COMPILER_VENDOR)
string(SUBSTRING "${COMPILER_VENDOR}" 0 5 VENDOR_NAME) # truncate output
@@ -408,7 +413,7 @@ if(${XCODE_VERSION} VERSION_EQUAL 5 OR ${XCODE_VERSION} VERSION_GREATER 5)
# Xcode 5 is always using CLANG, which has too low template depth of 128 for libmv
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024")
endif()
-# Get rid of eventually clashes, we export some symbols explicite as local
+# Get rid of eventually clashes, we export some symbols explicitly as local
set(PLATFORM_LINKFLAGS
"${PLATFORM_LINKFLAGS} -Xlinker -unexported_symbols_list -Xlinker '${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map'"
)
diff --git a/build_files/cmake/platform/platform_apple_xcode.cmake b/build_files/cmake/platform/platform_apple_xcode.cmake
index 7af69c092cc..04fda25b7f5 100644
--- a/build_files/cmake/platform/platform_apple_xcode.cmake
+++ b/build_files/cmake/platform/platform_apple_xcode.cmake
@@ -83,7 +83,7 @@ if(${XCODE_VERSION} VERSION_LESS 4.3)
# use guaranteed existing sdk
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk CACHE PATH "" FORCE)
else()
- # note: xcode-select path could be ambigous,
+ # note: xcode-select path could be ambiguous,
# cause /Applications/Xcode.app/Contents/Developer or /Applications/Xcode.app would be allowed
# so i use a selfcomposed bundlepath here
set(OSX_SYSROOT_PREFIX ${XCODE_BUNDLE}/Contents/Developer/Platforms/MacOSX.platform)
@@ -97,7 +97,7 @@ else()
endif()
if(OSX_SYSTEM MATCHES 10.9)
- # make sure syslibs and headers are looked up in sdk ( expecially for 10.9 openGL atm. )
+ # make sure syslibs and headers are looked up in sdk ( especially for 10.9 openGL atm. )
set(CMAKE_FIND_ROOT_PATH ${CMAKE_OSX_SYSROOT})
endif()
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
index bc6ebeab97c..688029617ff 100644
--- a/build_files/cmake/platform/platform_unix.cmake
+++ b/build_files/cmake/platform/platform_unix.cmake
@@ -305,7 +305,7 @@ if(WITH_BOOST)
if(Boost_USE_STATIC_LIBS AND WITH_BOOST_ICU)
find_package(IcuLinux)
endif()
- mark_as_advanced(Boost_DIR) # why doesnt boost do this?
+ mark_as_advanced(Boost_DIR) # why doesn't boost do this?
endif()
set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
@@ -359,6 +359,10 @@ if(WITH_OPENCOLORIO)
endif()
endif()
+if(WITH_CYCLES_EMBREE)
+ find_package(Embree 3.2.4 REQUIRED)
+endif()
+
if(WITH_LLVM)
if(EXISTS ${LIBDIR})
set(LLVM_STATIC ON)
diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake
index 793e24d0c61..d5d0b03d505 100644
--- a/build_files/cmake/platform/platform_win32.cmake
+++ b/build_files/cmake/platform/platform_win32.cmake
@@ -607,3 +607,67 @@ if(WITH_CYCLES_OSL)
set(WITH_CYCLES_OSL OFF)
endif()
endif()
+
+if(WITH_CYCLES_EMBREE)
+ windows_find_package(Embree)
+ if(NOT EMBREE_FOUND)
+ set(EMBREE_INCLUDE_DIRS ${LIBDIR}/embree/include)
+ set(EMBREE_LIBRARIES
+ optimized ${LIBDIR}/embree/lib/embree3.lib
+ optimized ${LIBDIR}/embree/lib/embree_avx2.lib
+ optimized ${LIBDIR}/embree/lib/embree_avx.lib
+ optimized ${LIBDIR}/embree/lib/embree_sse42.lib
+ optimized ${LIBDIR}/embree/lib/lexers.lib
+ optimized ${LIBDIR}/embree/lib/math.lib
+ optimized ${LIBDIR}/embree/lib/simd.lib
+ optimized ${LIBDIR}/embree/lib/sys.lib
+ optimized ${LIBDIR}/embree/lib/tasking.lib
+
+ debug ${LIBDIR}/embree/lib/embree3_d.lib
+ debug ${LIBDIR}/embree/lib/embree_avx2_d.lib
+ debug ${LIBDIR}/embree/lib/embree_avx_d.lib
+ debug ${LIBDIR}/embree/lib/embree_sse42_d.lib
+ debug ${LIBDIR}/embree/lib/lexers_d.lib
+ debug ${LIBDIR}/embree/lib/math_d.lib
+ debug ${LIBDIR}/embree/lib/simd_d.lib
+ debug ${LIBDIR}/embree/lib/sys_d.lib
+ debug ${LIBDIR}/embree/lib/tasking_d.lib)
+ endif()
+endif()
+
+if (WINDOWS_PYTHON_DEBUG)
+ # Include the system scripts in the blender_python_system_scripts project.
+ FILE(GLOB_RECURSE inFiles "${CMAKE_SOURCE_DIR}/release/scripts/*.*" )
+ ADD_CUSTOM_TARGET(blender_python_system_scripts SOURCES ${inFiles})
+ foreach(_source IN ITEMS ${inFiles})
+ get_filename_component(_source_path "${_source}" PATH)
+ string(REPLACE "${CMAKE_SOURCE_DIR}/release/scripts/" "" _source_path "${_source_path}")
+ string(REPLACE "/" "\\" _group_path "${_source_path}")
+ source_group("${_group_path}" FILES "${_source}")
+ endforeach()
+ # Include the user scripts from the profile folder in the blender_python_user_scripts project.
+ set(USER_SCRIPTS_ROOT "$ENV{appdata}/blender foundation/blender/${BLENDER_VERSION}")
+ file(TO_CMAKE_PATH ${USER_SCRIPTS_ROOT} USER_SCRIPTS_ROOT)
+ FILE(GLOB_RECURSE inFiles "${USER_SCRIPTS_ROOT}/scripts/*.*" )
+ ADD_CUSTOM_TARGET(blender_python_user_scripts SOURCES ${inFiles})
+ foreach(_source IN ITEMS ${inFiles})
+ get_filename_component(_source_path "${_source}" PATH)
+ string(REPLACE "${USER_SCRIPTS_ROOT}/scripts" "" _source_path "${_source_path}")
+ string(REPLACE "/" "\\" _group_path "${_source_path}")
+ source_group("${_group_path}" FILES "${_source}")
+ endforeach()
+ set_target_properties(blender_python_system_scripts PROPERTIES FOLDER "scripts")
+ set_target_properties(blender_python_user_scripts PROPERTIES FOLDER "scripts")
+ # Set the default debugging options for the project, only write this file once so the user
+ # is free to override them at their own perril.
+ set(USER_PROPS_FILE "${CMAKE_CURRENT_BINARY_DIR}/source/creator/blender.Cpp.user.props")
+ if(NOT EXISTS ${USER_PROPS_FILE})
+ # Layout below is messy, because otherwise the generated file will look messy.
+ file(WRITE ${USER_PROPS_FILE} "<?xml version=\"1.0\" encoding=\"utf-8\"?>
+<Project DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">
+ <PropertyGroup>
+ <LocalDebuggerCommandArguments>-con --env-system-scripts \"${CMAKE_SOURCE_DIR}/release/scripts\" </LocalDebuggerCommandArguments>
+ </PropertyGroup>
+</Project>")
+ endif()
+endif()
diff --git a/build_files/utils/build_tgz.sh b/build_files/utils/build_tgz.sh
index c568d17db1c..203e58d5a68 100755
--- a/build_files/utils/build_tgz.sh
+++ b/build_files/utils/build_tgz.sh
@@ -63,7 +63,7 @@ echo "OK"
# Create checksum file
cd "$BASE_DIR"
-echo -n "Createing checksum: \"$BASE_DIR/$TARBALL.md5sum\" ..."
+echo -n "Creating checksum: \"$BASE_DIR/$TARBALL.md5sum\" ..."
md5sum "$TARBALL" > "$TARBALL.md5sum"
echo "OK"
diff --git a/build_files/windows/check_libraries.cmd b/build_files/windows/check_libraries.cmd
index 90c50293720..506728a194f 100644
--- a/build_files/windows/check_libraries.cmd
+++ b/build_files/windows/check_libraries.cmd
@@ -26,7 +26,7 @@ if NOT EXIST %BUILD_VS_LIBDIR% (
:RETRY
"%SVN%" checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/%BUILD_VS_SVNDIR% %BUILD_VS_LIBDIR%
if errorlevel 1 (
- set /p LibRetry= "Error during donwload, retry? y/n"
+ set /p LibRetry= "Error during download, retry? y/n"
if /I "!LibRetry!"=="Y" (
cd %BUILD_VS_LIBDIR%
"%SVN%" cleanup
diff --git a/build_files/windows/configure_msbuild.cmd b/build_files/windows/configure_msbuild.cmd
index f8c2a87de8e..bdd4ecc227a 100644
--- a/build_files/windows/configure_msbuild.cmd
+++ b/build_files/windows/configure_msbuild.cmd
@@ -19,7 +19,11 @@ if "%WITH_CLANG%"=="1" (
exit /b 1
)
)
-set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Visual Studio %BUILD_VS_VER% %BUILD_VS_YEAR%%WINDOWS_ARCH%" %TESTS_CMAKE_ARGS% %CLANG_CMAKE_ARGS% %ASAN_CMAKE_ARGS%
+
+if "%WITH_PYDEBUG%"=="1" (
+ set PYDEBUG_CMAKE_ARGS=-DWINDOWS_PYTHON_DEBUG=On
+)
+set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Visual Studio %BUILD_VS_VER% %BUILD_VS_YEAR%%WINDOWS_ARCH%" %TESTS_CMAKE_ARGS% %CLANG_CMAKE_ARGS% %ASAN_CMAKE_ARGS% %PYDEBUG_CMAKE_ARGS%
if NOT EXIST %BUILD_DIR%\nul (
mkdir %BUILD_DIR%
@@ -41,7 +45,7 @@ if "%NOBUILD%"=="1" set MUST_CONFIGURE=1
if "%MUST_CONFIGURE%"=="1" (
if NOT "%verbose%" == "" (
- echo %CMAKE% %BUILD_CMAKE_ARGS% -H%BLENDER_DIR% -B%BUILD_DIR%
+ echo "%CMAKE% %BUILD_CMAKE_ARGS% -H%BLENDER_DIR% -B%BUILD_DIR%"
)
cmake ^
diff --git a/build_files/windows/detect_msvc_classic.cmd b/build_files/windows/detect_msvc_classic.cmd
index 61bfcf92ddf..2910e3b7305 100644
--- a/build_files/windows/detect_msvc_classic.cmd
+++ b/build_files/windows/detect_msvc_classic.cmd
@@ -64,6 +64,6 @@ exit /b 1
:DetectionComplete
if NOT "%verbose%" == "" (
- echo Visual Studio %BUILD_VS_YEAR% Detected successfuly
+ echo Visual Studio %BUILD_VS_YEAR% Detected successfully
)
exit /b 0
diff --git a/build_files/windows/find_dependencies.cmd b/build_files/windows/find_dependencies.cmd
index 219e9801831..a861cf1c98b 100644
--- a/build_files/windows/find_dependencies.cmd
+++ b/build_files/windows/find_dependencies.cmd
@@ -1,11 +1,11 @@
-REM find all dependencies and set the corresponding environement variables.
+REM find all dependencies and set the corresponding environment variables.
for %%X in (svn.exe) do (set SVN=%%~$PATH:X)
for %%X in (cmake.exe) do (set CMAKE=%%~$PATH:X)
for %%X in (git.exe) do (set GIT=%%~$PATH:X)
if NOT "%verbose%" == "" (
- echo svn : %SVN%
- echo cmake : %CMAKE%
- echo git : %GIT%
+ echo svn : "%SVN%"
+ echo cmake : "%CMAKE%"
+ echo git : "%GIT%"
)
if "%CMAKE%" == "" (
echo Cmake not found in path, required for building, exiting...
diff --git a/build_files/windows/parse_arguments.cmd b/build_files/windows/parse_arguments.cmd
index e8caddaf4ea..30bd2ebdcd2 100644
--- a/build_files/windows/parse_arguments.cmd
+++ b/build_files/windows/parse_arguments.cmd
@@ -64,6 +64,8 @@ if NOT "%1" == "" (
shift /1
) else if "%1" == "nobuild" (
set NOBUILD=1
+ ) else if "%1" == "pydebug" (
+ set WITH_PYDEBUG=1
) else if "%1" == "showhash" (
SET BUILD_SHOW_HASHES=1
REM Non-Build Commands
diff --git a/build_files/windows/reset_variables.cmd b/build_files/windows/reset_variables.cmd
index a522ed7407f..ba584a7f34a 100644
--- a/build_files/windows/reset_variables.cmd
+++ b/build_files/windows/reset_variables.cmd
@@ -25,3 +25,5 @@ set WITH_CLANG=
set WITH_ASAN=
set CLANG_CMAKE_ARGS=
set ASAN_CMAKE_ARGS=
+set WITH_PYDEBUG=
+set PYDEBUG_CMAKE_ARGS=
diff --git a/build_files/windows/show_help.cmd b/build_files/windows/show_help.cmd
index 694b28c88ed..984c1ccfbeb 100644
--- a/build_files/windows/show_help.cmd
+++ b/build_files/windows/show_help.cmd
@@ -16,7 +16,7 @@ echo.
echo Configuration options
echo - verbose ^(enable diagnostic output during configuration^)
echo - with_tests ^(enable building unit tests^)
-echo - noge ^(disable building game enginge and player^)
+echo - noge ^(disable building game engine and player^)
echo - debug ^(Build an unoptimized debuggable build^)
echo - packagename [newname] ^(override default cpack package name^)
echo - buildir [newdir] ^(override default build folder^)
diff --git a/doc/python_api/examples/bpy.app.handlers.1.py b/doc/python_api/examples/bpy.app.handlers.1.py
index 34b16c27b86..cd24873fcbc 100644
--- a/doc/python_api/examples/bpy.app.handlers.1.py
+++ b/doc/python_api/examples/bpy.app.handlers.1.py
@@ -3,7 +3,7 @@ Persistent Handler Example
++++++++++++++++++++++++++
By default handlers are freed when loading new files, in some cases you may
-wan't the handler stay running across multiple files (when the handler is
+want the handler stay running across multiple files (when the handler is
part of an add-on for example).
For this the :data:`bpy.app.handlers.persistent` decorator needs to be used.
diff --git a/doc/python_api/rst/info_api_reference.rst b/doc/python_api/rst/info_api_reference.rst
index ab690a8ee06..130aa68a6b3 100644
--- a/doc/python_api/rst/info_api_reference.rst
+++ b/doc/python_api/rst/info_api_reference.rst
@@ -53,7 +53,7 @@ Here are some characteristics ID Data-Blocks share.
Simple Data Access
------------------
-Lets start with a simple case, say you want a python script to adjust the objects location.
+Lets start with a simple case, say you want a python script to adjust the object's location.
Start by finding this setting in the interface ``Properties Window -> Object -> Transform -> Location``
diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt
index 0147a4306f4..873bbfa36fa 100644
--- a/intern/cycles/CMakeLists.txt
+++ b/intern/cycles/CMakeLists.txt
@@ -3,7 +3,14 @@ if(NOT WITH_BLENDER AND WITH_CYCLES_STANDALONE)
set(CYCLES_INSTALL_PATH "")
else()
set(WITH_CYCLES_BLENDER ON)
- set(CYCLES_INSTALL_PATH "scripts/addons/cycles")
+ # WINDOWS_PYTHON_DEBUG needs to write into the user addons folder since it will
+ # be started with --env-system-scripts pointing to the release folder, which will
+ # lack the cycles addon, and we don't want to write into it.
+ if(NOT WINDOWS_PYTHON_DEBUG)
+ set(CYCLES_INSTALL_PATH "scripts/addons/cycles")
+ else()
+ set(CYCLES_INSTALL_PATH "$ENV{appdata}/blender foundation/blender/${BLENDER_VERSION}/scripts/addons/cycles")
+ endif()
endif()
# External Libraries
@@ -210,6 +217,15 @@ if(WITH_CYCLES_OSL)
)
endif()
+if(WITH_CYCLES_EMBREE)
+ add_definitions(-DWITH_EMBREE)
+ add_definitions(-DEMBREE_STATIC_LIB)
+ include_directories(
+ SYSTEM
+ ${EMBREE_INCLUDE_DIRS}
+ )
+endif()
+
if(WITH_CYCLES_OPENSUBDIV)
add_definitions(-DWITH_OPENSUBDIV)
include_directories(
@@ -283,12 +299,19 @@ if(WITH_CYCLES_CUDA_BINARIES AND (NOT WITH_CYCLES_CUBIN_COMPILER))
set(MAX_MSVC 1910)
elseif(${CUDA_VERSION} EQUAL "9.1")
set(MAX_MSVC 1911)
+ elseif(${CUDA_VERSION} EQUAL "10.0")
+ set(MAX_MSVC 1999)
endif()
if(NOT MSVC_VERSION LESS ${MAX_MSVC} OR CMAKE_C_COMPILER_ID MATCHES "Clang")
message(STATUS "nvcc not supported for this compiler version, using cycles_cubin_cc instead.")
set(WITH_CYCLES_CUBIN_COMPILER ON)
endif()
unset(MAX_MSVC)
+ elseif(APPLE)
+ if(${XCODE_VERSION} VERSION_GREATER_EQUAL 10.0)
+ message(STATUS "nvcc not supported for this compiler version, using cycles_cubin_cc instead.")
+ set(WITH_CYCLES_CUBIN_COMPILER ON)
+ endif()
endif()
endif()
diff --git a/intern/cycles/app/CMakeLists.txt b/intern/cycles/app/CMakeLists.txt
index 4fd551b33c2..2c1367a86dc 100644
--- a/intern/cycles/app/CMakeLists.txt
+++ b/intern/cycles/app/CMakeLists.txt
@@ -77,6 +77,9 @@ macro(cycles_target_link_libraries target)
if(WITH_CYCLES_OSL)
target_link_libraries(${target} ${OSL_LIBRARIES} ${LLVM_LIBRARIES})
endif()
+ if(WITH_CYCLES_EMBREE)
+ target_link_libraries(${target} ${EMBREE_LIBRARIES})
+ endif()
if(WITH_CYCLES_OPENSUBDIV)
target_link_libraries(${target} ${OPENSUBDIV_LIBRARIES})
endif()
@@ -144,6 +147,9 @@ if(WITH_CYCLES_CUBIN_COMPILER)
target_link_libraries(cycles_cubin_cc
extern_cuew
${OPENIMAGEIO_LIBRARIES}
+ ${OPENEXR_LIBRARIES}
+ ${PUGIXML_LIBRARIES}
+ ${BOOST_LIBRARIES}
${PLATFORM_LINKLIBS}
)
if(NOT CYCLES_STANDALONE_REPOSITORY)
diff --git a/intern/cycles/app/cycles_xml.h b/intern/cycles/app/cycles_xml.h
index 6a48980d8ea..a7bc1895d4e 100644
--- a/intern/cycles/app/cycles_xml.h
+++ b/intern/cycles/app/cycles_xml.h
@@ -29,4 +29,4 @@ void xml_read_file(Scene *scene, const char *filepath);
CCL_NAMESPACE_END
-#endif /* __CYCLES_XML_H__ */
+#endif /* __CYCLES_XML_H__ */
diff --git a/intern/cycles/blender/CCL_api.h b/intern/cycles/blender/CCL_api.h
index 233ffc8802c..b9750ad0c53 100644
--- a/intern/cycles/blender/CCL_api.h
+++ b/intern/cycles/blender/CCL_api.h
@@ -33,4 +33,4 @@ void CCL_logging_verbosity_set(int verbosity);
}
#endif
-#endif /* __CCL_API_H__ */
+#endif /* __CCL_API_H__ */
diff --git a/intern/cycles/blender/addon/engine.py b/intern/cycles/blender/addon/engine.py
index 87dcbe486c7..23239ee4352 100644
--- a/intern/cycles/blender/addon/engine.py
+++ b/intern/cycles/blender/addon/engine.py
@@ -254,21 +254,32 @@ def register_passes(engine, scene, srl):
if crl.use_pass_volume_indirect: engine.register_pass(scene, srl, "VolumeInd", 3, "RGB", 'COLOR')
cscene = scene.cycles
- if crl.use_denoising and crl.denoising_store_passes and not cscene.use_progressive_refine:
- engine.register_pass(scene, srl, "Denoising Normal", 3, "XYZ", 'VECTOR')
- engine.register_pass(scene, srl, "Denoising Normal Variance", 3, "XYZ", 'VECTOR')
- engine.register_pass(scene, srl, "Denoising Albedo", 3, "RGB", 'COLOR')
- engine.register_pass(scene, srl, "Denoising Albedo Variance", 3, "RGB", 'COLOR')
- engine.register_pass(scene, srl, "Denoising Depth", 1, "Z", 'VALUE')
- engine.register_pass(scene, srl, "Denoising Depth Variance", 1, "Z", 'VALUE')
- engine.register_pass(scene, srl, "Denoising Shadow A", 3, "XYV", 'VECTOR')
- engine.register_pass(scene, srl, "Denoising Shadow B", 3, "XYV", 'VECTOR')
- engine.register_pass(scene, srl, "Denoising Image", 3, "RGB", 'COLOR')
- engine.register_pass(scene, srl, "Denoising Image Variance", 3, "RGB", 'COLOR')
-
- clean_options = ("denoising_diffuse_direct", "denoising_diffuse_indirect",
- "denoising_glossy_direct", "denoising_glossy_indirect",
- "denoising_transmission_direct", "denoising_transmission_indirect",
- "denoising_subsurface_direct", "denoising_subsurface_indirect")
- if any(getattr(crl, option) for option in clean_options):
- engine.register_pass(scene, srl, "Denoising Clean", 3, "RGB", 'COLOR')
+
+ if crl.use_pass_crypto_object:
+ for i in range(0, crl.pass_crypto_depth, 2):
+ engine.register_pass(scene, srl, "CryptoObject" + '{:02d}'.format(i), 4, "RGBA", 'COLOR')
+ if crl.use_pass_crypto_material:
+ for i in range(0, crl.pass_crypto_depth, 2):
+ engine.register_pass(scene, srl, "CryptoMaterial" + '{:02d}'.format(i), 4, "RGBA", 'COLOR')
+ if srl.cycles.use_pass_crypto_asset:
+ for i in range(0, srl.cycles.pass_crypto_depth, 2):
+ engine.register_pass(scene, srl, "CryptoAsset" + '{:02d}'.format(i), 4, "RGBA", 'COLOR')
+
+ if crl.use_denoising or crl.denoising_store_passes:
+ engine.register_pass(scene, srl, "Noisy Image", 4, "RGBA", 'COLOR')
+ if crl.denoising_store_passes:
+ engine.register_pass(scene, srl, "Denoising Normal", 3, "XYZ", 'VECTOR')
+ engine.register_pass(scene, srl, "Denoising Normal Variance", 3, "XYZ", 'VECTOR')
+ engine.register_pass(scene, srl, "Denoising Albedo", 3, "RGB", 'COLOR')
+ engine.register_pass(scene, srl, "Denoising Albedo Variance", 3, "RGB", 'COLOR')
+ engine.register_pass(scene, srl, "Denoising Depth", 1, "Z", 'VALUE')
+ engine.register_pass(scene, srl, "Denoising Depth Variance", 1, "Z", 'VALUE')
+ engine.register_pass(scene, srl, "Denoising Shadow A", 3, "XYV", 'VECTOR')
+ engine.register_pass(scene, srl, "Denoising Shadow B", 3, "XYV", 'VECTOR')
+ engine.register_pass(scene, srl, "Denoising Image Variance", 3, "RGB", 'COLOR')
+ clean_options = ("denoising_diffuse_direct", "denoising_diffuse_indirect",
+ "denoising_glossy_direct", "denoising_glossy_indirect",
+ "denoising_transmission_direct", "denoising_transmission_indirect",
+ "denoising_subsurface_direct", "denoising_subsurface_indirect")
+ if any(getattr(crl, option) for option in clean_options):
+ engine.register_pass(scene, srl, "Denoising Clean", 3, "RGB", 'COLOR')
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index 80b83c94012..d986ba8c7a8 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -547,6 +547,11 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
description="Use special type BVH optimized for hair (uses more ram but renders faster)",
default=True,
)
+ cls.use_bvh_embree = BoolProperty(
+ name="Use Embree",
+ description="Use Embree as ray accelerator",
+ default=False,
+ )
cls.debug_bvh_time_steps = IntProperty(
name="BVH Time Steps",
description="Split BVH primitives by this number of time steps to speed up render time in cost of memory",
@@ -1339,7 +1344,36 @@ class CyclesRenderLayerSettings(bpy.types.PropertyGroup):
default=False,
update=update_render_passes,
)
-
+ cls.use_pass_crypto_object = BoolProperty(
+ name="Cryptomatte Object",
+ description="Render cryptomatte object pass, for isolating objects in compositing",
+ default=False,
+ update=update_render_passes,
+ )
+ cls.use_pass_crypto_material = BoolProperty(
+ name="Cryptomatte Material",
+ description="Render cryptomatte material pass, for isolating materials in compositing",
+ default=False,
+ update=update_render_passes,
+ )
+ cls.use_pass_crypto_asset = BoolProperty(
+ name="Cryptomatte Asset",
+ description="Render cryptomatte asset pass, for isolating groups of objects with the same parent",
+ default=False,
+ update=update_render_passes,
+ )
+ cls.pass_crypto_depth = IntProperty(
+ name="Cryptomatte Levels",
+ description="Sets how many unique objects can be distinguished per pixel",
+ default=6, min=2, max=16, step=2,
+ update=update_render_passes,
+ )
+ cls.pass_crypto_accurate = BoolProperty(
+ name="Cryptomatte Accurate",
+ description="Gerenate a more accurate Cryptomatte pass. CPU only, may render slower and use more memory",
+ default=True,
+ update=update_render_passes,
+ )
@classmethod
def unregister(cls):
del bpy.types.SceneRenderLayer.cycles
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 5edbcb19672..2f1adfe4178 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -17,6 +17,7 @@
# <pep8 compliant>
import bpy
+import _cycles
from bpy.types import (
Panel,
@@ -430,11 +431,18 @@ class CYCLES_RENDER_PT_performance(CyclesButtonsPanel, Panel):
col.separator()
col.label(text="Acceleration structure:")
+ if _cycles.with_embree:
+ row = col.row()
+ row.active = use_cpu(context)
+ row.prop(cscene, "use_bvh_embree")
+ row = col.row()
col.prop(cscene, "debug_use_spatial_splits")
- col.prop(cscene, "debug_use_hair_bvh")
+ row = col.row()
+ row.active = not cscene.use_bvh_embree or not _cycles.with_embree
+ row.prop(cscene, "debug_use_hair_bvh")
row = col.row()
- row.active = not cscene.debug_use_spatial_splits
+ row.active = not cscene.debug_use_spatial_splits and not cscene.use_bvh_embree
row.prop(cscene, "debug_bvh_time_steps")
col = layout.column()
@@ -491,8 +499,6 @@ class CYCLES_RENDER_PT_layer_passes(CyclesButtonsPanel, Panel):
bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
- import _cycles
-
layout = self.layout
scene = context.scene
@@ -517,6 +523,8 @@ class CYCLES_RENDER_PT_layer_passes(CyclesButtonsPanel, Panel):
col.prop(rl, "use_pass_shadow")
col.prop(rl, "use_pass_ambient_occlusion")
col.separator()
+ col.prop(crl, "denoising_store_passes", text="Denoising Data")
+ col.separator()
col.prop(rl, "pass_alpha_threshold")
col = split.column()
@@ -549,12 +557,6 @@ class CYCLES_RENDER_PT_layer_passes(CyclesButtonsPanel, Panel):
col.prop(rl, "use_pass_emit", text="Emission")
col.prop(rl, "use_pass_environment")
- if context.scene.cycles.feature_set == 'EXPERIMENTAL':
- col.separator()
- sub = col.column()
- sub.active = crl.use_denoising
- sub.prop(crl, "denoising_store_passes", text="Denoising")
-
col = layout.column()
col.prop(crl, "pass_debug_render_time")
if _cycles.with_cycles_debug:
@@ -563,6 +565,17 @@ class CYCLES_RENDER_PT_layer_passes(CyclesButtonsPanel, Panel):
col.prop(crl, "pass_debug_bvh_intersections")
col.prop(crl, "pass_debug_ray_bounces")
+ crl = rl.cycles
+ layout.label("Cryptomatte:")
+ row = layout.row(align=True)
+ row.prop(crl, "use_pass_crypto_object", text="Object", toggle=True)
+ row.prop(crl, "use_pass_crypto_material", text="Material", toggle=True)
+ row.prop(crl, "use_pass_crypto_asset", text="Asset", toggle=True)
+ row = layout.row(align=True)
+ row.prop(crl, "pass_crypto_depth")
+ row = layout.row(align=True)
+ row.active = use_cpu(context)
+ row.prop(crl, "pass_crypto_accurate", text="Accurate Mode")
class CYCLES_RENDER_PT_views(CyclesButtonsPanel, Panel):
bl_label = "Views"
@@ -630,9 +643,8 @@ class CYCLES_RENDER_PT_denoising(CyclesButtonsPanel, Panel):
rl = rd.layers.active
crl = rl.cycles
- layout.active = crl.use_denoising
-
split = layout.split()
+ split.active = crl.use_denoising
col = split.column()
sub = col.column(align=True)
@@ -647,24 +659,28 @@ class CYCLES_RENDER_PT_denoising(CyclesButtonsPanel, Panel):
layout.separator()
row = layout.row()
+ row.active = crl.use_denoising or crl.denoising_store_passes
row.label(text="Diffuse:")
sub = row.row(align=True)
sub.prop(crl, "denoising_diffuse_direct", text="Direct", toggle=True)
sub.prop(crl, "denoising_diffuse_indirect", text="Indirect", toggle=True)
row = layout.row()
+ row.active = crl.use_denoising or crl.denoising_store_passes
row.label(text="Glossy:")
sub = row.row(align=True)
sub.prop(crl, "denoising_glossy_direct", text="Direct", toggle=True)
sub.prop(crl, "denoising_glossy_indirect", text="Indirect", toggle=True)
row = layout.row()
+ row.active = crl.use_denoising or crl.denoising_store_passes
row.label(text="Transmission:")
sub = row.row(align=True)
sub.prop(crl, "denoising_transmission_direct", text="Direct", toggle=True)
sub.prop(crl, "denoising_transmission_indirect", text="Indirect", toggle=True)
row = layout.row()
+ row.active = crl.use_denoising or crl.denoising_store_passes
row.label(text="Subsurface:")
sub = row.row(align=True)
sub.prop(crl, "denoising_subsurface_direct", text="Direct", toggle=True)
diff --git a/intern/cycles/blender/blender_curves.cpp b/intern/cycles/blender/blender_curves.cpp
index 99313866e9e..94d5dc5ea3d 100644
--- a/intern/cycles/blender/blender_curves.cpp
+++ b/intern/cycles/blender/blender_curves.cpp
@@ -707,7 +707,7 @@ static void ExportCurveSegmentsMotion(Mesh *mesh, ParticleCurveData *CData, int
if(diff == 0) {
for(int curvekey = CData->curve_firstkey[curve]; curvekey < CData->curve_firstkey[curve] + CData->curve_keynum[curve]; curvekey++) {
if(i < mesh->curve_keys.size()) {
- mP[i] =CurveSegmentMotionCV(CData, sys, curve, curvekey);
+ mP[i] = CurveSegmentMotionCV(CData, sys, curve, curvekey);
if(!have_motion) {
/* unlike mesh coordinates, these tend to be slightly different
* between frames due to particle transforms into/out of object
@@ -718,7 +718,6 @@ static void ExportCurveSegmentsMotion(Mesh *mesh, ParticleCurveData *CData, int
have_motion = true;
}
}
-
i++;
}
}
diff --git a/intern/cycles/blender/blender_logging.cpp b/intern/cycles/blender/blender_logging.cpp
index d0f82e37662..3fca4efd097 100644
--- a/intern/cycles/blender/blender_logging.cpp
+++ b/intern/cycles/blender/blender_logging.cpp
@@ -22,7 +22,7 @@ void CCL_init_logging(const char *argv0)
ccl::util_logging_init(argv0);
}
-void CCL_start_debug_logging(void)
+void CCL_start_debug_logging()
{
ccl::util_logging_start();
}
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp
index 35bf7beda41..a05c982b367 100644
--- a/intern/cycles/blender/blender_object.cpp
+++ b/intern/cycles/blender/blender_object.cpp
@@ -384,6 +384,23 @@ Object *BlenderSync::sync_object(BL::Object& b_parent,
object_updated = true;
}
+ /* sync the asset name for Cryptomatte */
+ BL::Object parent = b_ob.parent();
+ ustring parent_name;
+ if(parent) {
+ while(parent.parent()) {
+ parent = parent.parent();
+ }
+ parent_name = parent.name();
+ }
+ else {
+ parent_name = b_ob.name();
+ }
+ if(object->asset_name != parent_name) {
+ object->asset_name = parent_name;
+ object_updated = true;
+ }
+
/* object sync
* transform comparison should not be needed, but duplis don't work perfect
* in the depsgraph and may not signal changes, so this is a workaround */
@@ -404,8 +421,8 @@ Object *BlenderSync::sync_object(BL::Object& b_parent,
if(scene->need_motion() == Scene::MOTION_BLUR) {
motion_steps = object_motion_steps(b_parent, b_ob);
+ mesh->motion_steps = motion_steps;
if(motion_steps && object_use_deform_motion(b_parent, b_ob)) {
- mesh->motion_steps = motion_steps;
mesh->use_motion_blur = true;
}
}
diff --git a/intern/cycles/blender/blender_object_cull.h b/intern/cycles/blender/blender_object_cull.h
index 2147877a860..6e2a22438ec 100644
--- a/intern/cycles/blender/blender_object_cull.h
+++ b/intern/cycles/blender/blender_object_cull.h
@@ -46,4 +46,4 @@ private:
CCL_NAMESPACE_END
-#endif /* __BLENDER_OBJECT_CULL_H__ */
+#endif /* __BLENDER_OBJECT_CULL_H__ */
diff --git a/intern/cycles/blender/blender_python.cpp b/intern/cycles/blender/blender_python.cpp
index 4b01eb5f2d4..8b3bec56d1f 100644
--- a/intern/cycles/blender/blender_python.cpp
+++ b/intern/cycles/blender/blender_python.cpp
@@ -839,10 +839,18 @@ void *CCL_python_module_init()
#ifdef WITH_NETWORK
PyModule_AddObject(mod, "with_network", Py_True);
Py_INCREF(Py_True);
-#else /* WITH_NETWORK */
+#else /* WITH_NETWORK */
PyModule_AddObject(mod, "with_network", Py_False);
Py_INCREF(Py_False);
-#endif /* WITH_NETWORK */
+#endif /* WITH_NETWORK */
+
+#ifdef WITH_EMBREE
+ PyModule_AddObject(mod, "with_embree", Py_True);
+ Py_INCREF(Py_True);
+#else /* WITH_EMBREE */
+ PyModule_AddObject(mod, "with_embree", Py_False);
+ Py_INCREF(Py_False);
+#endif /* WITH_EMBREE */
return (void*)mod;
}
diff --git a/intern/cycles/blender/blender_session.cpp b/intern/cycles/blender/blender_session.cpp
index a07131d04ae..75c7dcee05e 100644
--- a/intern/cycles/blender/blender_session.cpp
+++ b/intern/cycles/blender/blender_session.cpp
@@ -35,6 +35,7 @@
#include "util/util_function.h"
#include "util/util_hash.h"
#include "util/util_logging.h"
+#include "util/util_murmurhash.h"
#include "util/util_progress.h"
#include "util/util_time.h"
@@ -370,6 +371,17 @@ void BlenderSession::update_render_tile(RenderTile& rtile, bool highlight)
do_write_update_render_tile(rtile, false, false);
}
+static void add_cryptomatte_layer(BL::RenderResult& b_rr, string name, string manifest)
+{
+ string identifier = string_printf("%08x", util_murmur_hash3(name.c_str(), name.length(), 0));
+ string prefix = "cryptomatte/" + identifier.substr(0, 7) + "/";
+
+ render_add_metadata(b_rr, prefix+"name", name);
+ render_add_metadata(b_rr, prefix+"hash", "MurmurHash3_32");
+ render_add_metadata(b_rr, prefix+"conversion", "uint32_to_float32");
+ render_add_metadata(b_rr, prefix+"manifest", manifest);
+}
+
void BlenderSession::render()
{
/* set callback to write out render results */
@@ -405,17 +417,19 @@ void BlenderSession::render()
BL::RenderLayer b_rlay = *b_single_rlay;
/* add passes */
- array<Pass> passes = sync->sync_render_passes(b_rlay, *b_layer_iter, session_params);
+ vector<Pass> passes = sync->sync_render_passes(b_rlay, *b_layer_iter, session_params);
buffer_params.passes = passes;
PointerRNA crl = RNA_pointer_get(&b_layer_iter->ptr, "cycles");
bool use_denoising = get_boolean(crl, "use_denoising");
+ bool denoising_passes = use_denoising || get_boolean(crl, "denoising_store_passes");
session->tile_manager.schedule_denoising = use_denoising;
- buffer_params.denoising_data_pass = use_denoising;
+ buffer_params.denoising_data_pass = denoising_passes;
buffer_params.denoising_clean_pass = (scene->film->denoising_flags & DENOISING_CLEAN_ALL_PASSES);
session->params.use_denoising = use_denoising;
+ session->params.denoising_passes = denoising_passes;
session->params.denoising_radius = get_int(crl, "denoising_radius");
session->params.denoising_strength = get_float(crl, "denoising_strength");
session->params.denoising_feature_strength = get_float(crl, "denoising_feature_strength");
@@ -475,15 +489,28 @@ void BlenderSession::render()
break;
}
+ BL::RenderResult b_full_rr = b_engine.get_result();
if(is_single_layer) {
- BL::RenderResult b_rr = b_engine.get_result();
string num_aa_samples = string_printf("%d", session->params.samples);
- b_rr.stamp_data_add_field("Cycles Samples", num_aa_samples.c_str());
+ render_add_metadata(b_full_rr, "Cycles Samples", num_aa_samples);
/* TODO(sergey): Report whether we're doing resumable render
* and also start/end sample if so.
*/
}
+ if(scene->film->cryptomatte_passes & CRYPT_OBJECT) {
+ add_cryptomatte_layer(b_full_rr, b_rlay_name+".CryptoObject",
+ scene->object_manager->get_cryptomatte_objects(scene));
+ }
+ if(scene->film->cryptomatte_passes & CRYPT_MATERIAL) {
+ add_cryptomatte_layer(b_full_rr, b_rlay_name+".CryptoMaterial",
+ scene->shader_manager->get_cryptomatte_materials(scene));
+ }
+ if(scene->film->cryptomatte_passes & CRYPT_ASSET) {
+ add_cryptomatte_layer(b_full_rr, b_rlay_name+".CryptoAsset",
+ scene->object_manager->get_cryptomatte_assets(scene));
+ }
+
/* free result without merging */
end_render_result(b_engine, b_rr, true, true, false);
@@ -700,7 +727,7 @@ void BlenderSession::do_write_update_render_result(BL::RenderResult& b_rr,
bool read = false;
if(pass_type != PASS_NONE) {
/* copy pixels */
- read = buffers->get_pass_rect(pass_type, exposure, sample, components, &pixels[0]);
+ read = buffers->get_pass_rect(pass_type, exposure, sample, components, &pixels[0], b_pass.name());
}
else {
int denoising_offset = BlenderSync::get_denoising_pass(b_pass);
@@ -719,7 +746,7 @@ void BlenderSession::do_write_update_render_result(BL::RenderResult& b_rr,
else {
/* copy combined pass */
BL::RenderPass b_combined_pass(b_rlay.passes.find_by_name("Combined", b_rview_name.c_str()));
- if(buffers->get_pass_rect(PASS_COMBINED, exposure, sample, 4, &pixels[0]))
+ if(buffers->get_pass_rect(PASS_COMBINED, exposure, sample, 4, &pixels[0], "Combined"))
b_combined_pass.rect(&pixels[0]);
}
diff --git a/intern/cycles/blender/blender_session.h b/intern/cycles/blender/blender_session.h
index 08f5c873bef..b8a9096b354 100644
--- a/intern/cycles/blender/blender_session.h
+++ b/intern/cycles/blender/blender_session.h
@@ -173,4 +173,4 @@ protected:
CCL_NAMESPACE_END
-#endif /* __BLENDER_SESSION_H__ */
+#endif /* __BLENDER_SESSION_H__ */
diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp
index 3eefb92f6af..e33a6c20a52 100644
--- a/intern/cycles/blender/blender_shader.cpp
+++ b/intern/cycles/blender/blender_shader.cpp
@@ -635,8 +635,8 @@ static ShaderNode *add_node(Scene *scene,
}
}
#else
- (void)b_data;
- (void)b_ntree;
+ (void) b_data;
+ (void) b_ntree;
#endif
}
else if(b_node.is_a(&RNA_ShaderNodeTexImage)) {
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp
index 5e47252e336..832847c179f 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -40,6 +40,8 @@
CCL_NAMESPACE_BEGIN
+static const char *cryptomatte_prefix = "Crypto";
+
/* Constructor */
BlenderSync::BlenderSync(BL::RenderEngine& b_engine,
@@ -517,6 +519,9 @@ PassType BlenderSync::get_pass_type(BL::RenderPass& b_pass)
MAP_PASS("Debug Ray Bounces", PASS_RAY_BOUNCES);
#endif
MAP_PASS("Debug Render Time", PASS_RENDER_TIME);
+ if(string_startswith(name, cryptomatte_prefix)) {
+ return PASS_CRYPTOMATTE;
+ }
#undef MAP_PASS
return PASS_NONE;
@@ -525,6 +530,9 @@ PassType BlenderSync::get_pass_type(BL::RenderPass& b_pass)
int BlenderSync::get_denoising_pass(BL::RenderPass& b_pass)
{
string name = b_pass.name();
+
+ if(name == "Noisy Image") return DENOISING_PASS_COLOR;
+
if(name.substr(0, 10) != "Denoising ") {
return -1;
}
@@ -539,7 +547,6 @@ int BlenderSync::get_denoising_pass(BL::RenderPass& b_pass)
MAP_PASS("Depth Variance", DENOISING_PASS_DEPTH_VAR);
MAP_PASS("Shadow A", DENOISING_PASS_SHADOW_A);
MAP_PASS("Shadow B", DENOISING_PASS_SHADOW_B);
- MAP_PASS("Image", DENOISING_PASS_COLOR);
MAP_PASS("Image Variance", DENOISING_PASS_COLOR_VAR);
MAP_PASS("Clean", DENOISING_PASS_CLEAN);
#undef MAP_PASS
@@ -547,11 +554,11 @@ int BlenderSync::get_denoising_pass(BL::RenderPass& b_pass)
return -1;
}
-array<Pass> BlenderSync::sync_render_passes(BL::RenderLayer& b_rlay,
- BL::SceneRenderLayer& b_srlay,
- const SessionParams &session_params)
+vector<Pass> BlenderSync::sync_render_passes(BL::RenderLayer& b_rlay,
+ BL::SceneRenderLayer& b_srlay,
+ const SessionParams &session_params)
{
- array<Pass> passes;
+ vector<Pass> passes;
Pass::add(PASS_COMBINED, passes);
if(!session_params.device.advanced_shading) {
@@ -571,22 +578,11 @@ array<Pass> BlenderSync::sync_render_passes(BL::RenderLayer& b_rlay,
Pass::add(pass_type, passes);
}
- scene->film->denoising_flags = 0;
PointerRNA crp = RNA_pointer_get(&b_srlay.ptr, "cycles");
- if(get_boolean(crp, "denoising_store_passes") &&
- get_boolean(crp, "use_denoising"))
- {
- b_engine.add_pass("Denoising Normal", 3, "XYZ", b_srlay.name().c_str());
- b_engine.add_pass("Denoising Normal Variance", 3, "XYZ", b_srlay.name().c_str());
- b_engine.add_pass("Denoising Albedo", 3, "RGB", b_srlay.name().c_str());
- b_engine.add_pass("Denoising Albedo Variance", 3, "RGB", b_srlay.name().c_str());
- b_engine.add_pass("Denoising Depth", 1, "Z", b_srlay.name().c_str());
- b_engine.add_pass("Denoising Depth Variance", 1, "Z", b_srlay.name().c_str());
- b_engine.add_pass("Denoising Shadow A", 3, "XYV", b_srlay.name().c_str());
- b_engine.add_pass("Denoising Shadow B", 3, "XYV", b_srlay.name().c_str());
- b_engine.add_pass("Denoising Image", 3, "RGB", b_srlay.name().c_str());
- b_engine.add_pass("Denoising Image Variance", 3, "RGB", b_srlay.name().c_str());
-
+ bool use_denoising = get_boolean(crp, "use_denoising");
+ bool store_denoising_passes = get_boolean(crp, "denoising_store_passes");
+ scene->film->denoising_flags = 0;
+ if(use_denoising || store_denoising_passes) {
#define MAP_OPTION(name, flag) if(!get_boolean(crp, name)) scene->film->denoising_flags |= flag;
MAP_OPTION("denoising_diffuse_direct", DENOISING_CLEAN_DIFFUSE_DIR);
MAP_OPTION("denoising_diffuse_indirect", DENOISING_CLEAN_DIFFUSE_IND);
@@ -597,9 +593,22 @@ array<Pass> BlenderSync::sync_render_passes(BL::RenderLayer& b_rlay,
MAP_OPTION("denoising_subsurface_direct", DENOISING_CLEAN_SUBSURFACE_DIR);
MAP_OPTION("denoising_subsurface_indirect", DENOISING_CLEAN_SUBSURFACE_IND);
#undef MAP_OPTION
+ b_engine.add_pass("Noisy Image", 4, "RGBA", b_srlay.name().c_str());
+ }
+
+ if(store_denoising_passes) {
+ b_engine.add_pass("Denoising Normal", 3, "XYZ", b_srlay.name().c_str());
+ b_engine.add_pass("Denoising Normal Variance", 3, "XYZ", b_srlay.name().c_str());
+ b_engine.add_pass("Denoising Albedo", 3, "RGB", b_srlay.name().c_str());
+ b_engine.add_pass("Denoising Albedo Variance", 3, "RGB", b_srlay.name().c_str());
+ b_engine.add_pass("Denoising Depth", 1, "Z", b_srlay.name().c_str());
+ b_engine.add_pass("Denoising Depth Variance", 1, "Z", b_srlay.name().c_str());
+ b_engine.add_pass("Denoising Shadow A", 3, "XYV", b_srlay.name().c_str());
+ b_engine.add_pass("Denoising Shadow B", 3, "XYV", b_srlay.name().c_str());
+ b_engine.add_pass("Denoising Image Variance", 3, "RGB", b_srlay.name().c_str());
if(scene->film->denoising_flags & DENOISING_CLEAN_ALL_PASSES) {
- b_engine.add_pass("Denoising Clean", 3, "RGB", b_srlay.name().c_str());
+ b_engine.add_pass("Denoising Clean", 3, "RGB", b_srlay.name().c_str());
}
}
#ifdef __KERNEL_DEBUG__
@@ -633,6 +642,39 @@ array<Pass> BlenderSync::sync_render_passes(BL::RenderLayer& b_rlay,
Pass::add(PASS_VOLUME_INDIRECT, passes);
}
+ /* Cryptomatte stores two ID/weight pairs per RGBA layer.
+ * User facing paramter is the number of pairs. */
+ int crypto_depth = min(16, get_int(crp, "pass_crypto_depth")) / 2;
+ scene->film->cryptomatte_depth = crypto_depth;
+ scene->film->cryptomatte_passes = CRYPT_NONE;
+ if(get_boolean(crp, "use_pass_crypto_object")) {
+ for(int i = 0; i < crypto_depth; ++i) {
+ string passname = cryptomatte_prefix + string_printf("Object%02d", i);
+ b_engine.add_pass(passname.c_str(), 4, "RGBA", b_srlay.name().c_str());
+ Pass::add(PASS_CRYPTOMATTE, passes, passname.c_str());
+ }
+ scene->film->cryptomatte_passes = (CryptomatteType)(scene->film->cryptomatte_passes | CRYPT_OBJECT);
+ }
+ if(get_boolean(crp, "use_pass_crypto_material")) {
+ for(int i = 0; i < crypto_depth; ++i) {
+ string passname = cryptomatte_prefix + string_printf("Material%02d", i);
+ b_engine.add_pass(passname.c_str(), 4, "RGBA", b_srlay.name().c_str());
+ Pass::add(PASS_CRYPTOMATTE, passes, passname.c_str());
+ }
+ scene->film->cryptomatte_passes = (CryptomatteType)(scene->film->cryptomatte_passes | CRYPT_MATERIAL);
+ }
+ if(get_boolean(crp, "use_pass_crypto_asset")) {
+ for(int i = 0; i < crypto_depth; ++i) {
+ string passname = cryptomatte_prefix + string_printf("Asset%02d", i);
+ b_engine.add_pass(passname.c_str(), 4, "RGBA", b_srlay.name().c_str());
+ Pass::add(PASS_CRYPTOMATTE, passes, passname.c_str());
+ }
+ scene->film->cryptomatte_passes = (CryptomatteType)(scene->film->cryptomatte_passes | CRYPT_ASSET);
+ }
+ if(get_boolean(crp, "pass_crypto_accurate") && scene->film->cryptomatte_passes != CRYPT_NONE) {
+ scene->film->cryptomatte_passes = (CryptomatteType)(scene->film->cryptomatte_passes | CRYPT_ACCURATE);
+ }
+
return passes;
}
@@ -689,6 +731,9 @@ SceneParams BlenderSync::get_scene_params(BL::Scene& b_scene,
params.bvh_layout = DebugFlags().cpu.bvh_layout;
}
+#ifdef WITH_EMBREE
+ params.bvh_layout = RNA_boolean_get(&cscene, "use_bvh_embree") ? BVH_LAYOUT_EMBREE : params.bvh_layout;
+#endif
return params;
}
diff --git a/intern/cycles/blender/blender_sync.h b/intern/cycles/blender/blender_sync.h
index 5e63f76033d..6d78f62c7d0 100644
--- a/intern/cycles/blender/blender_sync.h
+++ b/intern/cycles/blender/blender_sync.h
@@ -66,9 +66,9 @@ public:
void **python_thread_state,
const char *layer = 0);
void sync_render_layers(BL::SpaceView3D& b_v3d, const char *layer);
- array<Pass> sync_render_passes(BL::RenderLayer& b_rlay,
- BL::SceneRenderLayer& b_srlay,
- const SessionParams &session_params);
+ vector<Pass> sync_render_passes(BL::RenderLayer& b_rlay,
+ BL::SceneRenderLayer& b_srlay,
+ const SessionParams &session_params);
void sync_integrator();
void sync_camera(BL::RenderSettings& b_render,
BL::Object& b_override,
@@ -213,4 +213,4 @@ private:
CCL_NAMESPACE_END
-#endif /* __BLENDER_SYNC_H__ */
+#endif /* __BLENDER_SYNC_H__ */
diff --git a/intern/cycles/blender/blender_util.h b/intern/cycles/blender/blender_util.h
index 7e61888348b..eb7019f45bc 100644
--- a/intern/cycles/blender/blender_util.h
+++ b/intern/cycles/blender/blender_util.h
@@ -20,6 +20,7 @@
#include "render/mesh.h"
#include "util/util_algorithm.h"
+#include "util/util_array.h"
#include "util/util_map.h"
#include "util/util_path.h"
#include "util/util_set.h"
@@ -243,6 +244,12 @@ static inline float *image_get_float_pixels_for_frame(BL::Image& image,
return BKE_image_get_float_pixels_for_frame(image.ptr.data, frame);
}
+static inline void render_add_metadata(BL::RenderResult& b_rr, string name, string value)
+{
+ b_rr.stamp_data_add_field(name.c_str(), value.c_str());
+}
+
+
/* Utilities */
static inline Transform get_transform(const BL::Array<float, 16>& array)
@@ -832,4 +839,4 @@ protected:
CCL_NAMESPACE_END
-#endif /* __BLENDER_UTIL_H__ */
+#endif /* __BLENDER_UTIL_H__ */
diff --git a/intern/cycles/bvh/CMakeLists.txt b/intern/cycles/bvh/CMakeLists.txt
index fcd28572fdf..6014624f395 100644
--- a/intern/cycles/bvh/CMakeLists.txt
+++ b/intern/cycles/bvh/CMakeLists.txt
@@ -13,6 +13,7 @@ set(SRC
bvh8.cpp
bvh_binning.cpp
bvh_build.cpp
+ bvh_embree.cpp
bvh_node.cpp
bvh_sort.cpp
bvh_split.cpp
@@ -26,6 +27,7 @@ set(SRC_HEADERS
bvh8.h
bvh_binning.h
bvh_build.h
+ bvh_embree.h
bvh_node.h
bvh_params.h
bvh_sort.h
diff --git a/intern/cycles/bvh/bvh.cpp b/intern/cycles/bvh/bvh.cpp
index bc73a3ad264..ac0614e3659 100644
--- a/intern/cycles/bvh/bvh.cpp
+++ b/intern/cycles/bvh/bvh.cpp
@@ -26,6 +26,10 @@
#include "bvh/bvh_build.h"
#include "bvh/bvh_node.h"
+#ifdef WITH_EMBREE
+#include "bvh/bvh_embree.h"
+#endif
+
#include "util/util_foreach.h"
#include "util/util_logging.h"
#include "util/util_progress.h"
@@ -41,6 +45,7 @@ const char *bvh_layout_name(BVHLayout layout)
case BVH_LAYOUT_BVH4: return "BVH4";
case BVH_LAYOUT_BVH8: return "BVH8";
case BVH_LAYOUT_NONE: return "NONE";
+ case BVH_LAYOUT_EMBREE: return "EMBREE";
case BVH_LAYOUT_ALL: return "ALL";
}
LOG(DFATAL) << "Unsupported BVH layout was passed.";
@@ -96,6 +101,10 @@ BVH *BVH::create(const BVHParams& params, const vector<Object*>& objects)
return new BVH4(params, objects);
case BVH_LAYOUT_BVH8:
return new BVH8(params, objects);
+ case BVH_LAYOUT_EMBREE:
+#ifdef WITH_EMBREE
+ return new BVHEmbree(params, objects);
+#endif
case BVH_LAYOUT_NONE:
case BVH_LAYOUT_ALL:
break;
@@ -106,7 +115,7 @@ BVH *BVH::create(const BVHParams& params, const vector<Object*>& objects)
/* Building */
-void BVH::build(Progress& progress)
+void BVH::build(Progress& progress, Stats*)
{
progress.set_substatus("Building BVH");
diff --git a/intern/cycles/bvh/bvh.h b/intern/cycles/bvh/bvh.h
index 86be0bae4be..c8ad29004d7 100644
--- a/intern/cycles/bvh/bvh.h
+++ b/intern/cycles/bvh/bvh.h
@@ -19,12 +19,13 @@
#define __BVH_H__
#include "bvh/bvh_params.h"
-
+#include "util/util_array.h"
#include "util/util_types.h"
#include "util/util_vector.h"
CCL_NAMESPACE_BEGIN
+class Stats;
class BVHNode;
struct BVHStackEntry;
class BVHParams;
@@ -35,7 +36,6 @@ class Progress;
#define BVH_ALIGN 4096
#define TRI_NODE_SIZE 3
-
/* Packed BVH
*
* BVH stored as it will be used for traversal on the rendering device. */
@@ -91,7 +91,7 @@ public:
static BVH *create(const BVHParams& params, const vector<Object*>& objects);
virtual ~BVH() {}
- void build(Progress& progress);
+ virtual void build(Progress& progress, Stats *stats=NULL);
void refit(Progress& progress);
protected:
@@ -126,4 +126,4 @@ struct BVHStackEntry
CCL_NAMESPACE_END
-#endif /* __BVH_H__ */
+#endif /* __BVH_H__ */
diff --git a/intern/cycles/bvh/bvh2.h b/intern/cycles/bvh/bvh2.h
index df65ddca5b7..ecc697567bb 100644
--- a/intern/cycles/bvh/bvh2.h
+++ b/intern/cycles/bvh/bvh2.h
@@ -84,4 +84,4 @@ protected:
CCL_NAMESPACE_END
-#endif /* __BVH2_H__ */
+#endif /* __BVH2_H__ */
diff --git a/intern/cycles/bvh/bvh4.h b/intern/cycles/bvh/bvh4.h
index 310909a37e1..28bab2fe327 100644
--- a/intern/cycles/bvh/bvh4.h
+++ b/intern/cycles/bvh/bvh4.h
@@ -84,4 +84,4 @@ protected:
CCL_NAMESPACE_END
-#endif /* __BVH4_H__ */
+#endif /* __BVH4_H__ */
diff --git a/intern/cycles/bvh/bvh8.cpp b/intern/cycles/bvh/bvh8.cpp
index 70d003d938a..b95fe572e27 100644
--- a/intern/cycles/bvh/bvh8.cpp
+++ b/intern/cycles/bvh/bvh8.cpp
@@ -124,6 +124,7 @@ void BVH8::pack_aligned_node(int idx,
data[0].a = __uint_as_float(visibility & ~PATH_RAY_NODE_UNALIGNED);
data[0].b = time_from;
data[0].c = time_to;
+
for(int i = 0; i < num; i++) {
float3 bb_min = bounds[i].min;
float3 bb_max = bounds[i].max;
@@ -140,8 +141,8 @@ void BVH8::pack_aligned_node(int idx,
for(int i = num; i < 8; i++) {
/* We store BB which would never be recorded as intersection
- * so kernel might safely assume there are always 4 child nodes.
- */
+ * so kernel might safely assume there are always 4 child nodes.
+ */
data[1][i] = FLT_MAX;
data[2][i] = -FLT_MAX;
@@ -153,6 +154,7 @@ void BVH8::pack_aligned_node(int idx,
data[7][i] = __int_as_float(0);
}
+
memcpy(&pack.nodes[idx], data, sizeof(float4)*BVH_ONODE_SIZE);
}
@@ -189,6 +191,7 @@ void BVH8::pack_unaligned_node(int idx,
{
float8 data[BVH_UNALIGNED_ONODE_SIZE];
memset(data, 0, sizeof(data));
+
data[0].a = __uint_as_float(visibility | PATH_RAY_NODE_UNALIGNED);
data[0].b = time_from;
data[0].c = time_to;
@@ -222,21 +225,21 @@ void BVH8::pack_unaligned_node(int idx,
* so kernel might safely assume there are always 4 child nodes.
*/
- data[1][i] = 1.0f;
- data[2][i] = 0.0f;
- data[3][i] = 0.0f;
+ data[1][i] = NAN;
+ data[2][i] = NAN;
+ data[3][i] = NAN;
- data[4][i] = 0.0f;
- data[5][i] = 0.0f;
- data[6][i] = 0.0f;
+ data[4][i] = NAN;
+ data[5][i] = NAN;
+ data[6][i] = NAN;
- data[7][i] = 0.0f;
- data[8][i] = 0.0f;
- data[9][i] = 0.0f;
+ data[7][i] = NAN;
+ data[8][i] = NAN;
+ data[9][i] = NAN;
- data[10][i] = -FLT_MAX;
- data[11][i] = -FLT_MAX;
- data[12][i] = -FLT_MAX;
+ data[10][i] = NAN;
+ data[11][i] = NAN;
+ data[12][i] = NAN;
data[13][i] = __int_as_float(0);
}
diff --git a/intern/cycles/bvh/bvh8.h b/intern/cycles/bvh/bvh8.h
index 274a2442c7e..834daf3abce 100644
--- a/intern/cycles/bvh/bvh8.h
+++ b/intern/cycles/bvh/bvh8.h
@@ -95,4 +95,4 @@ protected:
CCL_NAMESPACE_END
-#endif /* __BVH8_H__ */
+#endif /* __BVH8_H__ */
diff --git a/intern/cycles/bvh/bvh_build.h b/intern/cycles/bvh/bvh_build.h
index 7b245139819..dd95a5cc0e8 100644
--- a/intern/cycles/bvh/bvh_build.h
+++ b/intern/cycles/bvh/bvh_build.h
@@ -23,6 +23,7 @@
#include "bvh/bvh_params.h"
#include "bvh/bvh_unaligned.h"
+#include "util/util_array.h"
#include "util/util_task.h"
#include "util/util_vector.h"
@@ -142,4 +143,4 @@ protected:
CCL_NAMESPACE_END
-#endif /* __BVH_BUILD_H__ */
+#endif /* __BVH_BUILD_H__ */
diff --git a/intern/cycles/bvh/bvh_embree.cpp b/intern/cycles/bvh/bvh_embree.cpp
new file mode 100644
index 00000000000..7489fe8ea42
--- /dev/null
+++ b/intern/cycles/bvh/bvh_embree.cpp
@@ -0,0 +1,884 @@
+/*
+ * Copyright 2018, 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 class implemens a ray accelerator for Cycles using Intel's Embree library.
+ * It supports triangles, curves, object and deformation blur and instancing.
+ * Not supported are thick line segments, those have no native equivalent in Embree.
+ * They could be implemented using Embree's thick curves, at the expense of wasted memory.
+ * User defined intersections for Embree could also be an option, but since Embree only uses aligned BVHs
+ * for user geometry, this would come with reduced performance and/or higher memory usage.
+ *
+ * Since Embree allows object to be either curves or triangles but not both, Cycles object IDs are maapped
+ * to Embree IDs by multiplying by two and adding one for curves.
+ *
+ * This implementation shares RTCDevices between Cycles instances. Eventually each instance should get
+ * a separate RTCDevice to correctly keep track of memory usage.
+ *
+ * Vertex and index buffers are duplicated between Cycles device arrays and Embree. These could be merged,
+ * which would requrie changes to intersection refinement, shader setup, mesh light sampling and a few
+ * other places in Cycles where direct access to vertex data is required.
+ */
+
+#ifdef WITH_EMBREE
+
+#include <pmmintrin.h>
+#include <xmmintrin.h>
+#include <embree3/rtcore_geometry.h>
+
+#include "bvh/bvh_embree.h"
+
+/* Kernel includes are necessary so that the filter function for Embree can access the packed BVH. */
+#include "kernel/bvh/bvh_embree.h"
+#include "kernel/kernel_compat_cpu.h"
+#include "kernel/split/kernel_split_data_types.h"
+#include "kernel/kernel_globals.h"
+#include "kernel/kernel_random.h"
+
+#include "render/mesh.h"
+#include "render/object.h"
+#include "util/util_foreach.h"
+#include "util/util_logging.h"
+#include "util/util_progress.h"
+
+CCL_NAMESPACE_BEGIN
+
+#define IS_HAIR(x) (x & 1)
+
+/* This gets called by Embree at every valid ray/object intersection.
+ * Things like recording subsurface or shadow hits for later evaluation
+ * as well as filtering for volume objects happen here.
+ * Cycles' own BVH does that directly inside the traversal calls.
+ */
+static void rtc_filter_func(const RTCFilterFunctionNArguments *args)
+{
+ /* Current implementation in Cycles assumes only single-ray intersection queries. */
+ assert(args->N == 1);
+
+ const RTCRay *ray = (RTCRay*)args->ray;
+ const RTCHit *hit = (RTCHit*)args->hit;
+ CCLIntersectContext *ctx = ((IntersectContext*)args->context)->userRayExt;
+ KernelGlobals *kg = ctx->kg;
+
+ /* Check if there is backfacing hair to ignore. */
+ if(IS_HAIR(hit->geomID) && (kernel_data.curve.curveflags & CURVE_KN_INTERPOLATE)
+ && !(kernel_data.curve.curveflags & CURVE_KN_BACKFACING)
+ && !(kernel_data.curve.curveflags & CURVE_KN_RIBBONS)) {
+ if(dot(make_float3(ray->dir_x, ray->dir_y, ray->dir_z), make_float3(hit->Ng_x, hit->Ng_y, hit->Ng_z)) > 0.0f) {
+ *args->valid = 0;
+ return;
+ }
+ }
+}
+
+static void rtc_filter_occluded_func(const RTCFilterFunctionNArguments* args)
+{
+ assert(args->N == 1);
+
+ const RTCRay *ray = (RTCRay*)args->ray;
+ RTCHit *hit = (RTCHit*)args->hit;
+ CCLIntersectContext *ctx = ((IntersectContext*)args->context)->userRayExt;
+ KernelGlobals *kg = ctx->kg;
+
+ /* For all ray types: Check if there is backfacing hair to ignore */
+ if(IS_HAIR(hit->geomID) && (kernel_data.curve.curveflags & CURVE_KN_INTERPOLATE)
+ && !(kernel_data.curve.curveflags & CURVE_KN_BACKFACING)
+ && !(kernel_data.curve.curveflags & CURVE_KN_RIBBONS)) {
+ if(dot(make_float3(ray->dir_x, ray->dir_y, ray->dir_z), make_float3(hit->Ng_x, hit->Ng_y, hit->Ng_z)) > 0.0f) {
+ *args->valid = 0;
+ return;
+ }
+ }
+
+ switch(ctx->type) {
+ case CCLIntersectContext::RAY_SHADOW_ALL: {
+ /* Append the intersection to the end of the array. */
+ if(ctx->num_hits < ctx->max_hits) {
+ Intersection current_isect;
+ kernel_embree_convert_hit(kg, ray, hit, &current_isect);
+ for(size_t i = 0; i < ctx->max_hits; ++i) {
+ if(current_isect.object == ctx->isect_s[i].object &&
+ current_isect.prim == ctx->isect_s[i].prim &&
+ current_isect.t == ctx->isect_s[i].t) {
+ /* This intersection was already recorded, skip it. */
+ *args->valid = 0;
+ break;
+ }
+ }
+ Intersection *isect = &ctx->isect_s[ctx->num_hits];
+ ++ctx->num_hits;
+ *isect = current_isect;
+ int prim = kernel_tex_fetch(__prim_index, isect->prim);
+ int shader = 0;
+ if(kernel_tex_fetch(__prim_type, isect->prim) & PRIMITIVE_ALL_TRIANGLE) {
+ shader = kernel_tex_fetch(__tri_shader, prim);
+ }
+ else {
+ float4 str = kernel_tex_fetch(__curves, prim);
+ shader = __float_as_int(str.z);
+ }
+ int flag = kernel_tex_fetch(__shaders, shader & SHADER_MASK).flags;
+ /* If no transparent shadows, all light is blocked. */
+ if(flag & (SD_HAS_TRANSPARENT_SHADOW)) {
+ /* This tells Embree to continue tracing. */
+ *args->valid = 0;
+ }
+ }
+ else {
+ /* Increase the number of hits beyond ray.max_hits
+ * so that the caller can detect this as opaque. */
+ ++ctx->num_hits;
+ }
+ break;
+ }
+ case CCLIntersectContext::RAY_SSS: {
+ /* No intersection information requested, just return a hit. */
+ if(ctx->max_hits == 0) {
+ break;
+ }
+
+ /* See triangle_intersect_subsurface() for the native equivalent. */
+ for(int i = min(ctx->max_hits, ctx->ss_isect->num_hits) - 1; i >= 0; --i) {
+ if(ctx->ss_isect->hits[i].t == ray->tfar) {
+ /* This tells Embree to continue tracing. */
+ *args->valid = 0;
+ break;
+ }
+ }
+
+ ++ctx->ss_isect->num_hits;
+ int hit_idx;
+
+ if(ctx->ss_isect->num_hits <= ctx->max_hits) {
+ hit_idx = ctx->ss_isect->num_hits - 1;
+ }
+ else {
+ /* reservoir sampling: if we are at the maximum number of
+ * hits, randomly replace element or skip it */
+ hit_idx = lcg_step_uint(ctx->lcg_state) % ctx->ss_isect->num_hits;
+
+ if(hit_idx >= ctx->max_hits) {
+ /* This tells Embree to continue tracing. */
+ *args->valid = 0;
+ break;
+ }
+ }
+ /* record intersection */
+ kernel_embree_convert_local_hit(kg, ray, hit, &ctx->ss_isect->hits[hit_idx], ctx->sss_object_id);
+ ctx->ss_isect->Ng[hit_idx].x = hit->Ng_x;
+ ctx->ss_isect->Ng[hit_idx].y = hit->Ng_y;
+ ctx->ss_isect->Ng[hit_idx].z = hit->Ng_z;
+ ctx->ss_isect->Ng[hit_idx] = normalize(ctx->ss_isect->Ng[hit_idx]);
+ /* This tells Embree to continue tracing .*/
+ *args->valid = 0;
+ break;
+ }
+ case CCLIntersectContext::RAY_VOLUME_ALL: {
+ /* Append the intersection to the end of the array. */
+ if(ctx->num_hits < ctx->max_hits) {
+ Intersection current_isect;
+ kernel_embree_convert_hit(kg, ray, hit, &current_isect);
+ for(size_t i = 0; i < ctx->max_hits; ++i) {
+ if(current_isect.object == ctx->isect_s[i].object &&
+ current_isect.prim == ctx->isect_s[i].prim &&
+ current_isect.t == ctx->isect_s[i].t) {
+ /* This intersection was already recorded, skip it. */
+ *args->valid = 0;
+ break;
+ }
+ }
+ Intersection *isect = &ctx->isect_s[ctx->num_hits];
+ ++ctx->num_hits;
+ *isect = current_isect;
+ /* Only primitives from volume object. */
+ uint tri_object = (isect->object == OBJECT_NONE) ?
+ kernel_tex_fetch(__prim_object, isect->prim) : isect->object;
+ int object_flag = kernel_tex_fetch(__object_flag, tri_object);
+ if((object_flag & SD_OBJECT_HAS_VOLUME) == 0) {
+ --ctx->num_hits;
+ }
+ /* This tells Embree to continue tracing. */
+ *args->valid = 0;
+ break;
+ }
+ }
+ case CCLIntersectContext::RAY_REGULAR:
+ default:
+ /* Nothing to do here. */
+ break;
+ }
+}
+
+static size_t unaccounted_mem = 0;
+
+static bool rtc_memory_monitor_func(void* userPtr, const ssize_t bytes, const bool)
+{
+ Stats *stats = (Stats*)userPtr;
+ if(stats) {
+ if(bytes > 0) {
+ stats->mem_alloc(bytes);
+ }
+ else {
+ stats->mem_free(-bytes);
+ }
+ }
+ else {
+ /* A stats pointer may not yet be available. Keep track of the memory usage for later. */
+ if(bytes >= 0) {
+ atomic_add_and_fetch_z(&unaccounted_mem, bytes);
+ }
+ else {
+ atomic_sub_and_fetch_z(&unaccounted_mem, -bytes);
+ }
+ }
+ return true;
+}
+
+static void rtc_error_func(void*, enum RTCError, const char* str)
+{
+ VLOG(1) << str;
+}
+
+static double progress_start_time = 0.0f;
+
+static bool rtc_progress_func(void* user_ptr, const double n)
+{
+ Progress *progress = (Progress*)user_ptr;
+
+ if(time_dt() - progress_start_time < 0.25) {
+ return true;
+ }
+
+ string msg = string_printf("Building BVH %.0f%%", n * 100.0);
+ progress->set_substatus(msg);
+ progress_start_time = time_dt();
+
+ return !progress->get_cancel();
+}
+
+/* This is to have a shared device between all BVH instances.
+ It would be useful to actually to use a separte RTCDevice per Cycles instance. */
+RTCDevice BVHEmbree::rtc_shared_device = NULL;
+int BVHEmbree::rtc_shared_users = 0;
+thread_mutex BVHEmbree::rtc_shared_mutex;
+
+BVHEmbree::BVHEmbree(const BVHParams& params_, const vector<Object*>& objects_)
+: BVH(params_, objects_), scene(NULL), mem_used(0), top_level(NULL), stats(NULL),
+ curve_subdivisions(params.curve_subdivisions), build_quality(RTC_BUILD_QUALITY_REFIT),
+ use_curves(params_.curve_flags & CURVE_KN_INTERPOLATE),
+ use_ribbons(params.curve_flags & CURVE_KN_RIBBONS), dynamic_scene(true)
+{
+ _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
+ _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
+ thread_scoped_lock lock(rtc_shared_mutex);
+ if(rtc_shared_users == 0) {
+ rtc_shared_device = rtcNewDevice("verbose=0");
+ /* Check here if Embree was built with the correct flags. */
+ ssize_t ret = rtcGetDeviceProperty (rtc_shared_device,RTC_DEVICE_PROPERTY_RAY_MASK_SUPPORTED);
+ if(ret != 1) {
+ assert(0);
+ VLOG(1) << "Embree is compiled without the RTC_DEVICE_PROPERTY_RAY_MASK_SUPPORTED flag."\
+ "Ray visiblity will not work.";
+ }
+ ret = rtcGetDeviceProperty (rtc_shared_device,RTC_DEVICE_PROPERTY_FILTER_FUNCTION_SUPPORTED);
+ if(ret != 1) {
+ assert(0);
+ VLOG(1) << "Embree is compiled without the RTC_DEVICE_PROPERTY_FILTER_FUNCTION_SUPPORTED flag."\
+ "Renders may not look as expected.";
+ }
+ ret = rtcGetDeviceProperty (rtc_shared_device,RTC_DEVICE_PROPERTY_CURVE_GEOMETRY_SUPPORTED);
+ if(ret != 1) {
+ assert(0);
+ VLOG(1) << "Embree is compiled without the RTC_DEVICE_PROPERTY_CURVE_GEOMETRY_SUPPORTED flag. "\
+ "Line primitives will not be rendered.";
+ }
+ ret = rtcGetDeviceProperty (rtc_shared_device,RTC_DEVICE_PROPERTY_TRIANGLE_GEOMETRY_SUPPORTED);
+ if(ret != 1) {
+ assert(0);
+ VLOG(1) << "Embree is compiled without the RTC_DEVICE_PROPERTY_TRIANGLE_GEOMETRY_SUPPORTED flag. "\
+ "Triangle primitives will not be rendered.";
+ }
+ ret = rtcGetDeviceProperty (rtc_shared_device,RTC_DEVICE_PROPERTY_BACKFACE_CULLING_ENABLED);
+ if(ret != 0) {
+ assert(0);
+ VLOG(1) << "Embree is compiled with the RTC_DEVICE_PROPERTY_BACKFACE_CULLING_ENABLED flag. "\
+ "Renders may not look as expected.";
+ }
+ }
+ ++rtc_shared_users;
+
+ rtcSetDeviceErrorFunction(rtc_shared_device, rtc_error_func, NULL);
+
+ pack.root_index = -1;
+}
+
+BVHEmbree::~BVHEmbree()
+{
+ if(!params.top_level) {
+ destroy(scene);
+ }
+}
+
+void BVHEmbree::destroy(RTCScene scene)
+{
+ if(scene) {
+ rtcReleaseScene(scene);
+ scene = NULL;
+ }
+ thread_scoped_lock lock(rtc_shared_mutex);
+ --rtc_shared_users;
+ if(rtc_shared_users == 0) {
+ rtcReleaseDevice (rtc_shared_device);
+ rtc_shared_device = NULL;
+ }
+}
+
+void BVHEmbree::delete_rtcScene()
+{
+ if(scene) {
+ /* When this BVH is used as an instance in a top level BVH, don't delete now
+ * Let the top_level BVH know that it should delete it later. */
+ if(top_level) {
+ top_level->add_delayed_delete_scene(scene);
+ }
+ else {
+ rtcReleaseScene(scene);
+ if(delayed_delete_scenes.size()) {
+ foreach(RTCScene s, delayed_delete_scenes) {
+ rtcReleaseScene(s);
+ }
+ }
+ delayed_delete_scenes.clear();
+ }
+ scene = NULL;
+ }
+}
+
+void BVHEmbree::build(Progress& progress, Stats *stats_)
+{
+ assert(rtc_shared_device);
+ stats = stats_;
+ rtcSetDeviceMemoryMonitorFunction(rtc_shared_device, rtc_memory_monitor_func, stats);
+
+ progress.set_substatus("Building BVH");
+
+ if(scene) {
+ rtcReleaseScene(scene);
+ scene = NULL;
+ }
+
+ const bool dynamic = params.bvh_type == SceneParams::BVH_DYNAMIC;
+
+ scene = rtcNewScene(rtc_shared_device);
+ const RTCSceneFlags scene_flags = (dynamic ? RTC_SCENE_FLAG_DYNAMIC : RTC_SCENE_FLAG_NONE) |
+ RTC_SCENE_FLAG_COMPACT | RTC_SCENE_FLAG_ROBUST;
+ rtcSetSceneFlags(scene, scene_flags);
+ build_quality = dynamic ? RTC_BUILD_QUALITY_LOW :
+ (params.use_spatial_split ? RTC_BUILD_QUALITY_HIGH : RTC_BUILD_QUALITY_MEDIUM);
+ rtcSetSceneBuildQuality(scene, build_quality);
+
+ int i = 0;
+
+ pack.object_node.clear();
+
+ foreach(Object *ob, objects) {
+ if(params.top_level) {
+ if(!ob->is_traceable()) {
+ ++i;
+ continue;
+ }
+ if(!ob->mesh->is_instanced()) {
+ add_object(ob, i);
+ }
+ else {
+ add_instance(ob, i);
+ }
+ }
+ else {
+ add_object(ob, i);
+ }
+ ++i;
+ if(progress.get_cancel()) return;
+ }
+
+ if(progress.get_cancel()) {
+ delete_rtcScene();
+ stats = NULL;
+ return;
+ }
+
+ rtcSetSceneProgressMonitorFunction(scene, rtc_progress_func, &progress);
+ rtcCommitScene(scene);
+
+ pack_primitives();
+
+ if(progress.get_cancel()) {
+ delete_rtcScene();
+ stats = NULL;
+ return;
+ }
+
+ progress.set_substatus("Packing geometry");
+ pack_nodes(NULL);
+
+ stats = NULL;
+}
+
+void BVHEmbree::add_object(Object *ob, int i)
+{
+ Mesh *mesh = ob->mesh;
+ if(params.primitive_mask & PRIMITIVE_ALL_TRIANGLE && mesh->num_triangles() > 0) {
+ add_triangles(ob, i);
+ }
+ if(params.primitive_mask & PRIMITIVE_ALL_CURVE && mesh->num_curves() > 0) {
+ add_curves(ob, i);
+ }
+}
+
+void BVHEmbree::add_instance(Object *ob, int i)
+{
+ if(!ob || !ob->mesh) {
+ assert(0);
+ return;
+ }
+ BVHEmbree *instance_bvh = (BVHEmbree*)(ob->mesh->bvh);
+
+ if(instance_bvh->top_level != this) {
+ instance_bvh->top_level = this;
+ }
+
+ const size_t num_motion_steps = ob->use_motion() ? ob->motion.size() : 1;
+ RTCGeometry geom_id = rtcNewGeometry(rtc_shared_device, RTC_GEOMETRY_TYPE_INSTANCE);
+ rtcSetGeometryInstancedScene(geom_id, instance_bvh->scene);
+ rtcSetGeometryTimeStepCount(geom_id, num_motion_steps);
+
+ if(ob->use_motion()) {
+ for(size_t step = 0; step < num_motion_steps; ++step) {
+ rtcSetGeometryTransform(geom_id, step, RTC_FORMAT_FLOAT3X4_ROW_MAJOR, (const float*)&ob->motion[step]);
+ }
+ }
+ else {
+ rtcSetGeometryTransform(geom_id, 0, RTC_FORMAT_FLOAT3X4_ROW_MAJOR, (const float*)&ob->tfm);
+ }
+
+ pack.prim_index.push_back_slow(-1);
+ pack.prim_object.push_back_slow(i);
+ pack.prim_type.push_back_slow(PRIMITIVE_NONE);
+ pack.prim_tri_index.push_back_slow(-1);
+
+ rtcSetGeometryUserData(geom_id, (void*) instance_bvh->scene);
+ rtcSetGeometryMask(geom_id, ob->visibility);
+
+ rtcCommitGeometry(geom_id);
+ rtcAttachGeometryByID(scene, geom_id, i*2);
+ rtcReleaseGeometry(geom_id);
+}
+
+void BVHEmbree::add_triangles(Object *ob, int i)
+{
+ size_t prim_offset = pack.prim_index.size();
+ Mesh *mesh = ob->mesh;
+ const Attribute *attr_mP = NULL;
+ size_t num_motion_steps = 1;
+ if(mesh->has_motion_blur()) {
+ attr_mP = mesh->attributes.find(ATTR_STD_MOTION_VERTEX_POSITION);
+ if(attr_mP) {
+ num_motion_steps = mesh->motion_steps;
+ if(num_motion_steps > RTC_MAX_TIME_STEP_COUNT) {
+ assert(0);
+ num_motion_steps = RTC_MAX_TIME_STEP_COUNT;
+ }
+ }
+ }
+
+ const size_t num_triangles = mesh->num_triangles();
+ RTCGeometry geom_id = rtcNewGeometry(rtc_shared_device, RTC_GEOMETRY_TYPE_TRIANGLE);
+ rtcSetGeometryBuildQuality(geom_id, build_quality);
+ rtcSetGeometryTimeStepCount(geom_id, num_motion_steps);
+
+ unsigned *rtc_indices = (unsigned*)rtcSetNewGeometryBuffer(geom_id, RTC_BUFFER_TYPE_INDEX, 0,
+ RTC_FORMAT_UINT3, sizeof (int) * 3, num_triangles);
+ assert(rtc_indices);
+ if(!rtc_indices) {
+ VLOG(1) << "Embree could not create new geometry buffer for mesh " << mesh->name.c_str() << ".\n";
+ return;
+ }
+ for(size_t j = 0; j < num_triangles; ++j) {
+ Mesh::Triangle t = mesh->get_triangle(j);
+ rtc_indices[j*3] = t.v[0];
+ rtc_indices[j*3+1] = t.v[1];
+ rtc_indices[j*3+2] = t.v[2];
+ }
+
+ update_tri_vertex_buffer(geom_id, mesh);
+
+ pack.prim_object.reserve(pack.prim_object.size() + num_triangles);
+ pack.prim_type.reserve(pack.prim_type.size() + num_triangles);
+ pack.prim_index.reserve(pack.prim_index.size() + num_triangles);
+ pack.prim_tri_index.reserve(pack.prim_index.size() + num_triangles);
+ for(size_t j = 0; j < num_triangles; ++j) {
+ pack.prim_object.push_back_reserved(i);
+ pack.prim_type.push_back_reserved(num_motion_steps > 1 ? PRIMITIVE_MOTION_TRIANGLE : PRIMITIVE_TRIANGLE);
+ pack.prim_index.push_back_reserved(j);
+ pack.prim_tri_index.push_back_reserved(j);
+ }
+
+ rtcSetGeometryUserData(geom_id, (void*) prim_offset);
+ rtcSetGeometryIntersectFilterFunction(geom_id, rtc_filter_func);
+ rtcSetGeometryOccludedFilterFunction(geom_id, rtc_filter_occluded_func);
+ rtcSetGeometryMask(geom_id, ob->visibility);
+
+ rtcCommitGeometry(geom_id);
+ rtcAttachGeometryByID(scene, geom_id, i*2);
+ rtcReleaseGeometry(geom_id);
+}
+
+void BVHEmbree::update_tri_vertex_buffer(RTCGeometry geom_id, const Mesh* mesh)
+{
+ const Attribute *attr_mP = NULL;
+ size_t num_motion_steps = 1;
+ int t_mid = 0;
+ if(mesh->has_motion_blur()) {
+ attr_mP = mesh->attributes.find(ATTR_STD_MOTION_VERTEX_POSITION);
+ if(attr_mP) {
+ num_motion_steps = mesh->motion_steps;
+ t_mid = (num_motion_steps - 1) / 2;
+ if(num_motion_steps > RTC_MAX_TIME_STEP_COUNT) {
+ assert(0);
+ num_motion_steps = RTC_MAX_TIME_STEP_COUNT;
+ }
+ }
+ }
+ const size_t num_verts = mesh->verts.size();
+
+ for(int t = 0; t < num_motion_steps; ++t) {
+ const float3 *verts;
+ if(t == t_mid) {
+ verts = &mesh->verts[0];
+ }
+ else {
+ int t_ = (t > t_mid) ? (t - 1) : t;
+ verts = &attr_mP->data_float3()[t_ * num_verts];
+ }
+
+ float *rtc_verts = (float*) rtcSetNewGeometryBuffer(geom_id, RTC_BUFFER_TYPE_VERTEX, t,
+ RTC_FORMAT_FLOAT3, sizeof(float) * 3, num_verts + 1);
+ assert(rtc_verts);
+ if(rtc_verts) {
+ for(size_t j = 0; j < num_verts; ++j) {
+ rtc_verts[0] = verts[j].x;
+ rtc_verts[1] = verts[j].y;
+ rtc_verts[2] = verts[j].z;
+ rtc_verts += 3;
+ }
+ }
+ }
+}
+
+void BVHEmbree::update_curve_vertex_buffer(RTCGeometry geom_id, const Mesh* mesh)
+{
+ const Attribute *attr_mP = NULL;
+ size_t num_motion_steps = 1;
+ if(mesh->has_motion_blur()) {
+ attr_mP = mesh->curve_attributes.find(ATTR_STD_MOTION_VERTEX_POSITION);
+ if(attr_mP) {
+ num_motion_steps = mesh->motion_steps;
+ }
+ }
+
+ const size_t num_curves = mesh->num_curves();
+ size_t num_keys = 0;
+ for(size_t j = 0; j < num_curves; ++j) {
+ const Mesh::Curve c = mesh->get_curve(j);
+ num_keys += c.num_keys;
+ }
+
+ /* Copy the CV data to Embree */
+ const int t_mid = (num_motion_steps - 1) / 2;
+ const float *curve_radius = &mesh->curve_radius[0];
+ for(int t = 0; t < num_motion_steps; ++t) {
+ const float3 *verts;
+ if(t == t_mid || attr_mP == NULL) {
+ verts = &mesh->curve_keys[0];
+ }
+ else {
+ int t_ = (t > t_mid) ? (t - 1) : t;
+ verts = &attr_mP->data_float3()[t_ * num_keys];
+ }
+
+ float4 *rtc_verts = (float4*)rtcSetNewGeometryBuffer(geom_id, RTC_BUFFER_TYPE_VERTEX, t,
+ RTC_FORMAT_FLOAT4, sizeof (float) * 4, num_keys);
+ float4 *rtc_tangents = NULL;
+ if(use_curves) {
+ rtc_tangents = (float4*)rtcSetNewGeometryBuffer(geom_id, RTC_BUFFER_TYPE_TANGENT, t,
+ RTC_FORMAT_FLOAT4, sizeof (float) * 4, num_keys);
+ assert(rtc_tangents);
+ }
+ assert(rtc_verts);
+ if(rtc_verts) {
+ if(use_curves && rtc_tangents) {
+ const size_t num_curves = mesh->num_curves();
+ for(size_t j = 0; j < num_curves; ++j) {
+ Mesh::Curve c = mesh->get_curve(j);
+ int fk = c.first_key;
+ rtc_verts[0] = float3_to_float4(verts[fk]);
+ rtc_verts[0].w = curve_radius[fk];
+ rtc_tangents[0] = float3_to_float4(verts[fk + 1] - verts[fk]);
+ rtc_tangents[0].w = curve_radius[fk + 1] - curve_radius[fk];
+ ++fk;
+ int k = 1;
+ for(;k < c.num_segments(); ++k, ++fk) {
+ rtc_verts[k] = float3_to_float4(verts[fk]);
+ rtc_verts[k].w = curve_radius[fk];
+ rtc_tangents[k] = float3_to_float4((verts[fk + 1] - verts[fk - 1]) * 0.5f);
+ rtc_tangents[k].w = (curve_radius[fk + 1] - curve_radius[fk - 1]) * 0.5f;
+ }
+ rtc_verts[k] = float3_to_float4(verts[fk]);
+ rtc_verts[k].w = curve_radius[fk];
+ rtc_tangents[k] = float3_to_float4(verts[fk] - verts[fk - 1]);
+ rtc_tangents[k].w = curve_radius[fk] - curve_radius[fk - 1];
+ rtc_verts += c.num_keys;
+ rtc_tangents += c.num_keys;
+ }
+ }
+ else {
+ for(size_t j = 0; j < num_keys; ++j) {
+ rtc_verts[j] = float3_to_float4(verts[j]);
+ rtc_verts[j].w = curve_radius[j];
+ }
+ }
+ }
+ }
+}
+
+void BVHEmbree::add_curves(Object *ob, int i)
+{
+ size_t prim_offset = pack.prim_index.size();
+ const Mesh *mesh = ob->mesh;
+ const Attribute *attr_mP = NULL;
+ size_t num_motion_steps = 1;
+ if(mesh->has_motion_blur()) {
+ attr_mP = mesh->curve_attributes.find(ATTR_STD_MOTION_VERTEX_POSITION);
+ if(attr_mP) {
+ num_motion_steps = mesh->motion_steps;
+ }
+ }
+
+ const size_t num_curves = mesh->num_curves();
+ size_t num_segments = 0;
+ for(size_t j = 0; j < num_curves; ++j) {
+ Mesh::Curve c = mesh->get_curve(j);
+ assert(c.num_segments() > 0);
+ num_segments += c.num_segments();
+ }
+
+ /* Make room for Cycles specific data. */
+ pack.prim_object.reserve(pack.prim_object.size() + num_segments);
+ pack.prim_type.reserve(pack.prim_type.size() + num_segments);
+ pack.prim_index.reserve(pack.prim_index.size() + num_segments);
+ pack.prim_tri_index.reserve(pack.prim_index.size() + num_segments);
+
+ enum RTCGeometryType type = (!use_curves) ? RTC_GEOMETRY_TYPE_FLAT_LINEAR_CURVE :
+ (use_ribbons ? RTC_GEOMETRY_TYPE_FLAT_HERMITE_CURVE :
+ RTC_GEOMETRY_TYPE_ROUND_HERMITE_CURVE);
+
+ RTCGeometry geom_id = rtcNewGeometry(rtc_shared_device, type);
+ rtcSetGeometryTessellationRate(geom_id, curve_subdivisions);
+ unsigned *rtc_indices = (unsigned*) rtcSetNewGeometryBuffer(geom_id, RTC_BUFFER_TYPE_INDEX, 0,
+ RTC_FORMAT_UINT, sizeof (int), num_segments);
+ size_t rtc_index = 0;
+ for(size_t j = 0; j < num_curves; ++j) {
+ Mesh::Curve c = mesh->get_curve(j);
+ for(size_t k = 0; k < c.num_segments(); ++k) {
+ rtc_indices[rtc_index] = c.first_key + k;
+ /* Cycles specific data. */
+ pack.prim_object.push_back_reserved(i);
+ pack.prim_type.push_back_reserved(PRIMITIVE_PACK_SEGMENT(num_motion_steps > 1 ?
+ PRIMITIVE_MOTION_CURVE : PRIMITIVE_CURVE, k));
+ pack.prim_index.push_back_reserved(j);
+ pack.prim_tri_index.push_back_reserved(rtc_index);
+
+ ++rtc_index;
+ }
+ }
+
+ rtcSetGeometryBuildQuality(geom_id, build_quality);
+ rtcSetGeometryTimeStepCount(geom_id, num_motion_steps);
+
+ update_curve_vertex_buffer(geom_id, mesh);
+
+ rtcSetGeometryUserData(geom_id, (void*) prim_offset);
+ rtcSetGeometryIntersectFilterFunction(geom_id, rtc_filter_func);
+ rtcSetGeometryOccludedFilterFunction(geom_id, rtc_filter_occluded_func);
+ rtcSetGeometryMask(geom_id, ob->visibility);
+
+ rtcCommitGeometry(geom_id);
+ rtcAttachGeometryByID(scene, geom_id, i * 2 + 1);
+ rtcReleaseGeometry(geom_id);
+}
+
+void BVHEmbree::pack_nodes(const BVHNode *)
+{
+ /* Quite a bit of this code is for compatibility with Cycles' native BVH. */
+ if(!params.top_level) {
+ return;
+ }
+
+ for(size_t i = 0; i < pack.prim_index.size(); ++i) {
+ if(pack.prim_index[i] != -1) {
+ if(pack.prim_type[i] & PRIMITIVE_ALL_CURVE)
+ pack.prim_index[i] += objects[pack.prim_object[i]]->mesh->curve_offset;
+ else
+ pack.prim_index[i] += objects[pack.prim_object[i]]->mesh->tri_offset;
+ }
+ }
+
+ size_t prim_offset = pack.prim_index.size();
+
+ /* reserve */
+ size_t prim_index_size = pack.prim_index.size();
+ size_t prim_tri_verts_size = pack.prim_tri_verts.size();
+
+ size_t pack_prim_index_offset = prim_index_size;
+ size_t pack_prim_tri_verts_offset = prim_tri_verts_size;
+ size_t object_offset = 0;
+
+ map<Mesh*, int> mesh_map;
+
+ foreach(Object *ob, objects) {
+ Mesh *mesh = ob->mesh;
+ BVH *bvh = mesh->bvh;
+
+ if(mesh->need_build_bvh()) {
+ if(mesh_map.find(mesh) == mesh_map.end()) {
+ prim_index_size += bvh->pack.prim_index.size();
+ prim_tri_verts_size += bvh->pack.prim_tri_verts.size();
+ mesh_map[mesh] = 1;
+ }
+ }
+ }
+
+ mesh_map.clear();
+
+ pack.prim_index.resize(prim_index_size);
+ pack.prim_type.resize(prim_index_size);
+ pack.prim_object.resize(prim_index_size);
+ pack.prim_visibility.clear();
+ pack.prim_tri_verts.resize(prim_tri_verts_size);
+ pack.prim_tri_index.resize(prim_index_size);
+ pack.object_node.resize(objects.size());
+
+ int *pack_prim_index = (pack.prim_index.size())? &pack.prim_index[0]: NULL;
+ int *pack_prim_type = (pack.prim_type.size())? &pack.prim_type[0]: NULL;
+ int *pack_prim_object = (pack.prim_object.size())? &pack.prim_object[0]: NULL;
+ float4 *pack_prim_tri_verts = (pack.prim_tri_verts.size())? &pack.prim_tri_verts[0]: NULL;
+ uint *pack_prim_tri_index = (pack.prim_tri_index.size())? &pack.prim_tri_index[0]: NULL;
+
+ /* merge */
+ foreach(Object *ob, objects) {
+ Mesh *mesh = ob->mesh;
+
+ /* We assume that if mesh doesn't need own BVH it was already included
+ * into a top-level BVH and no packing here is needed.
+ */
+ if(!mesh->need_build_bvh()) {
+ pack.object_node[object_offset++] = prim_offset;
+ continue;
+ }
+
+ /* if mesh already added once, don't add it again, but used set
+ * node offset for this object */
+ map<Mesh*, int>::iterator it = mesh_map.find(mesh);
+
+ if(mesh_map.find(mesh) != mesh_map.end()) {
+ int noffset = it->second;
+ pack.object_node[object_offset++] = noffset;
+ continue;
+ }
+
+ BVHEmbree *bvh = (BVHEmbree*)mesh->bvh;
+
+ rtc_memory_monitor_func(stats, unaccounted_mem, true);
+ unaccounted_mem = 0;
+
+ int mesh_tri_offset = mesh->tri_offset;
+ int mesh_curve_offset = mesh->curve_offset;
+
+ /* fill in node indexes for instances */
+ pack.object_node[object_offset++] = prim_offset;
+
+ mesh_map[mesh] = pack.object_node[object_offset-1];
+
+ /* merge primitive, object and triangle indexes */
+ if(bvh->pack.prim_index.size()) {
+ size_t bvh_prim_index_size = bvh->pack.prim_index.size();
+ int *bvh_prim_index = &bvh->pack.prim_index[0];
+ int *bvh_prim_type = &bvh->pack.prim_type[0];
+ uint *bvh_prim_tri_index = &bvh->pack.prim_tri_index[0];
+
+ for(size_t i = 0; i < bvh_prim_index_size; ++i) {
+ if(bvh->pack.prim_type[i] & PRIMITIVE_ALL_CURVE) {
+ pack_prim_index[pack_prim_index_offset] = bvh_prim_index[i] + mesh_curve_offset;
+ pack_prim_tri_index[pack_prim_index_offset] = -1;
+ }
+ else {
+ pack_prim_index[pack_prim_index_offset] = bvh_prim_index[i] + mesh_tri_offset;
+ pack_prim_tri_index[pack_prim_index_offset] =
+ bvh_prim_tri_index[i] + pack_prim_tri_verts_offset;
+ }
+
+ pack_prim_type[pack_prim_index_offset] = bvh_prim_type[i];
+ pack_prim_object[pack_prim_index_offset] = 0;
+
+ ++pack_prim_index_offset;
+ }
+ }
+
+ /* Merge triangle vertices data. */
+ if(bvh->pack.prim_tri_verts.size()) {
+ const size_t prim_tri_size = bvh->pack.prim_tri_verts.size();
+ memcpy(pack_prim_tri_verts + pack_prim_tri_verts_offset,
+ &bvh->pack.prim_tri_verts[0],
+ prim_tri_size*sizeof(float4));
+ pack_prim_tri_verts_offset += prim_tri_size;
+ }
+
+ prim_offset += bvh->pack.prim_index.size();
+ }
+}
+
+void BVHEmbree::refit_nodes()
+{
+ /* Update all vertex buffers, then tell Embree to rebuild/-fit the BVHs. */
+ unsigned geom_id = 0;
+ foreach(Object *ob, objects) {
+ if(!params.top_level || (ob->is_traceable() && !ob->mesh->is_instanced())) {
+ if(params.primitive_mask & PRIMITIVE_ALL_TRIANGLE && ob->mesh->num_triangles() > 0) {
+ update_tri_vertex_buffer(rtcGetGeometry(scene, geom_id), ob->mesh);
+ rtcCommitGeometry(rtcGetGeometry(scene,geom_id));
+ }
+
+ if(params.primitive_mask & PRIMITIVE_ALL_CURVE && ob->mesh->num_curves() > 0) {
+ update_curve_vertex_buffer(rtcGetGeometry(scene, geom_id+1), ob->mesh);
+ rtcCommitGeometry(rtcGetGeometry(scene,geom_id+1));
+ }
+ }
+ geom_id += 2;
+ }
+ rtcCommitScene(scene);
+}
+CCL_NAMESPACE_END
+
+#endif /* WITH_EMBREE */
diff --git a/intern/cycles/bvh/bvh_embree.h b/intern/cycles/bvh/bvh_embree.h
new file mode 100644
index 00000000000..9990826ba98
--- /dev/null
+++ b/intern/cycles/bvh/bvh_embree.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2018, 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.
+ */
+
+#ifndef __BVH_EMBREE_H__
+#define __BVH_EMBREE_H__
+
+#ifdef WITH_EMBREE
+
+#include <embree3/rtcore.h>
+#include <embree3/rtcore_scene.h>
+
+#include "bvh/bvh.h"
+#include "bvh/bvh_params.h"
+
+#include "util/util_thread.h"
+#include "util/util_types.h"
+#include "util/util_vector.h"
+
+CCL_NAMESPACE_BEGIN
+
+class Mesh;
+
+class BVHEmbree : public BVH
+{
+public:
+ virtual void build(Progress& progress, Stats *stats) override;
+ virtual ~BVHEmbree();
+ RTCScene scene;
+ static void destroy(RTCScene);
+protected:
+ friend class BVH;
+ BVHEmbree(const BVHParams& params, const vector<Object*>& objects);
+
+ virtual void pack_nodes(const BVHNode*) override;
+ virtual void refit_nodes() override;
+
+ void add_object(Object *ob, int i);
+ void add_instance(Object *ob, int i);
+ void add_curves(Object *ob, int i);
+ void add_triangles(Object *ob, int i);
+
+ ssize_t mem_used;
+
+ void add_delayed_delete_scene(RTCScene scene) { delayed_delete_scenes.push_back(scene); }
+ BVHEmbree *top_level;
+private:
+ void delete_rtcScene();
+ void update_tri_vertex_buffer(RTCGeometry geom_id, const Mesh* mesh);
+ void update_curve_vertex_buffer(RTCGeometry geom_id, const Mesh* mesh);
+
+ static RTCDevice rtc_shared_device;
+ static int rtc_shared_users;
+ static thread_mutex rtc_shared_mutex;
+
+ Stats *stats;
+ vector<RTCScene> delayed_delete_scenes;
+ int curve_subdivisions;
+ enum RTCBuildQuality build_quality;
+ bool use_curves, use_ribbons, dynamic_scene;
+};
+
+CCL_NAMESPACE_END
+
+#endif /* WITH_EMBREE */
+
+#endif /* __BVH_EMBREE_H__ */
diff --git a/intern/cycles/bvh/bvh_node.h b/intern/cycles/bvh/bvh_node.h
index ed89d52a50a..65d5df01158 100644
--- a/intern/cycles/bvh/bvh_node.h
+++ b/intern/cycles/bvh/bvh_node.h
@@ -169,4 +169,4 @@ public:
CCL_NAMESPACE_END
-#endif /* __BVH_NODE_H__ */
+#endif /* __BVH_NODE_H__ */
diff --git a/intern/cycles/bvh/bvh_params.h b/intern/cycles/bvh/bvh_params.h
index d8dd7df6ba1..6408d56da80 100644
--- a/intern/cycles/bvh/bvh_params.h
+++ b/intern/cycles/bvh/bvh_params.h
@@ -90,6 +90,13 @@ public:
/* Same as above, but for triangle primitives. */
int num_motion_triangle_steps;
+ /* Same as in SceneParams. */
+ int bvh_type;
+
+ /* These are needed for Embree. */
+ int curve_flags;
+ int curve_subdivisions;
+
/* fixed parameters */
enum {
MAX_DEPTH = 64,
@@ -123,6 +130,11 @@ public:
num_motion_curve_steps = 0;
num_motion_triangle_steps = 0;
+
+ bvh_type = 0;
+
+ curve_flags = 0;
+ curve_subdivisions = 4;
}
/* SAH costs */
@@ -274,4 +286,4 @@ struct BVHSpatialStorage {
CCL_NAMESPACE_END
-#endif /* __BVH_PARAMS_H__ */
+#endif /* __BVH_PARAMS_H__ */
diff --git a/intern/cycles/bvh/bvh_sort.h b/intern/cycles/bvh/bvh_sort.h
index 936401d8607..6910cc1e9b4 100644
--- a/intern/cycles/bvh/bvh_sort.h
+++ b/intern/cycles/bvh/bvh_sort.h
@@ -35,4 +35,4 @@ void bvh_reference_sort(int start,
CCL_NAMESPACE_END
-#endif /* __BVH_SORT_H__ */
+#endif /* __BVH_SORT_H__ */
diff --git a/intern/cycles/bvh/bvh_split.h b/intern/cycles/bvh/bvh_split.h
index a874a118b99..cb47deab211 100644
--- a/intern/cycles/bvh/bvh_split.h
+++ b/intern/cycles/bvh/bvh_split.h
@@ -259,4 +259,4 @@ public:
CCL_NAMESPACE_END
-#endif /* __BVH_SPLIT_H__ */
+#endif /* __BVH_SPLIT_H__ */
diff --git a/intern/cycles/bvh/bvh_unaligned.h b/intern/cycles/bvh/bvh_unaligned.h
index c3ece051cd5..bcfb6ed68da 100644
--- a/intern/cycles/bvh/bvh_unaligned.h
+++ b/intern/cycles/bvh/bvh_unaligned.h
@@ -77,4 +77,4 @@ protected:
CCL_NAMESPACE_END
-#endif /* __BVH_UNALIGNED_H__ */
+#endif /* __BVH_UNALIGNED_H__ */
diff --git a/intern/cycles/cmake/external_libs.cmake b/intern/cycles/cmake/external_libs.cmake
index 2e386a6bfc5..d0f473a2939 100644
--- a/intern/cycles/cmake/external_libs.cmake
+++ b/intern/cycles/cmake/external_libs.cmake
@@ -133,6 +133,12 @@ if(CYCLES_STANDALONE_REPOSITORY)
set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB")
####
+ # embree
+ if(WITH_CYCLES_EMBREE)
+ find_package(embree 3.2.4 REQUIRED)
+ endif()
+
+ ####
# Logging
if(WITH_CYCLES_LOGGING)
find_package(Glog REQUIRED)
diff --git a/intern/cycles/device/device.cpp b/intern/cycles/device/device.cpp
index 6959dd73c32..7e20bb449c3 100644
--- a/intern/cycles/device/device.cpp
+++ b/intern/cycles/device/device.cpp
@@ -361,7 +361,6 @@ DeviceInfo Device::get_multi_device(const vector<DeviceInfo>& subdevices, int th
info.has_half_images = true;
info.has_volume_decoupled = true;
- info.bvh_layout_mask = BVH_LAYOUT_ALL;
info.has_osl = true;
foreach(const DeviceInfo &device, subdevices) {
@@ -396,7 +395,6 @@ DeviceInfo Device::get_multi_device(const vector<DeviceInfo>& subdevices, int th
/* Accumulate device info. */
info.has_half_images &= device.has_half_images;
info.has_volume_decoupled &= device.has_volume_decoupled;
- info.bvh_layout_mask = device.bvh_layout_mask & info.bvh_layout_mask;
info.has_osl &= device.has_osl;
}
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h
index 2400788c833..f3fb338e638 100644
--- a/intern/cycles/device/device.h
+++ b/intern/cycles/device/device.h
@@ -58,7 +58,6 @@ public:
bool advanced_shading; /* Supports full shading system. */
bool has_half_images; /* Support half-float textures. */
bool has_volume_decoupled; /* Decoupled volume shading. */
- BVHLayoutMask bvh_layout_mask; /* Bitmask of supported BVH layouts. */
bool has_osl; /* Support Open Shading Language. */
bool use_split_kernel; /* Use split or mega kernel. */
int cpu_threads;
@@ -74,7 +73,6 @@ public:
advanced_shading = true;
has_half_images = false;
has_volume_decoupled = false;
- bvh_layout_mask = BVH_LAYOUT_NONE;
has_osl = false;
use_split_kernel = false;
}
@@ -183,7 +181,7 @@ public:
/* Convert the requested features structure to a build options,
* which could then be passed to compilers.
*/
- string get_build_options(void) const
+ string get_build_options() const
{
string build_options = "";
if(experimental) {
@@ -242,8 +240,8 @@ std::ostream& operator <<(std::ostream &os,
/* Device */
struct DeviceDrawParams {
- function<void(void)> bind_display_space_shader_cb;
- function<void(void)> unbind_display_space_shader_cb;
+ function<void()> bind_display_space_shader_cb;
+ function<void()> unbind_display_space_shader_cb;
};
class Device {
@@ -281,6 +279,7 @@ public:
fflush(stderr);
}
virtual bool show_samples() const { return false; }
+ virtual BVHLayoutMask get_bvh_layout_mask() const = 0;
/* statistics */
Stats &stats;
@@ -361,4 +360,4 @@ private:
CCL_NAMESPACE_END
-#endif /* __DEVICE_H__ */
+#endif /* __DEVICE_H__ */
diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp
index 7c72ab1a009..76f6466bbde 100644
--- a/intern/cycles/device/device_cpu.cpp
+++ b/intern/cycles/device/device_cpu.cpp
@@ -41,6 +41,7 @@
#include "kernel/osl/osl_globals.h"
#include "render/buffers.h"
+#include "render/coverage.h"
#include "util/util_debug.h"
#include "util/util_foreach.h"
@@ -80,11 +81,11 @@ public:
/* Silence potential warnings about unused variables
* when compiling without some architectures. */
- (void)kernel_sse2;
- (void)kernel_sse3;
- (void)kernel_sse41;
- (void)kernel_avx;
- (void)kernel_avx2;
+ (void) kernel_sse2;
+ (void) kernel_sse3;
+ (void) kernel_sse41;
+ (void) kernel_avx;
+ (void) kernel_avx2;
#ifdef WITH_CYCLES_OPTIMIZED_KERNEL_AVX2
if(DebugFlags().cpu.has_avx2() && system_cpu_support_avx2()) {
architecture_name = "AVX2";
@@ -184,11 +185,11 @@ public:
KernelFunctions<void(*)(int, int, float*, float*, float*, float*, int*, int)> filter_detect_outliers_kernel;
KernelFunctions<void(*)(int, int, float*, float*, float*, float*, int*, int)> filter_combine_halves_kernel;
- KernelFunctions<void(*)(int, int, float*, float*, float*, int*, int, int, float, float)> filter_nlm_calc_difference_kernel;
- KernelFunctions<void(*)(float*, float*, int*, int, int)> filter_nlm_blur_kernel;
- KernelFunctions<void(*)(float*, float*, int*, int, int)> filter_nlm_calc_weight_kernel;
- KernelFunctions<void(*)(int, int, float*, float*, float*, float*, int*, int, int)> filter_nlm_update_output_kernel;
- KernelFunctions<void(*)(float*, float*, int*, int)> filter_nlm_normalize_kernel;
+ KernelFunctions<void(*)(int, int, float*, float*, float*, int*, int, int, float, float)> filter_nlm_calc_difference_kernel;
+ KernelFunctions<void(*)(float*, float*, int*, int, int)> filter_nlm_blur_kernel;
+ KernelFunctions<void(*)(float*, float*, int*, int, int)> filter_nlm_calc_weight_kernel;
+ KernelFunctions<void(*)(int, int, float*, float*, float*, float*, float*, int*, int, int)> filter_nlm_update_output_kernel;
+ KernelFunctions<void(*)(float*, float*, int*, int)> filter_nlm_normalize_kernel;
KernelFunctions<void(*)(float*, int, int, int, float*, int*, int*, int, int, float)> filter_construct_transform_kernel;
KernelFunctions<void(*)(int, int, float*, float*, float*, int*, float*, float3*, int*, int*, int, int, int)> filter_nlm_construct_gramian_kernel;
@@ -277,6 +278,20 @@ public:
return (info.cpu_threads == 1);
}
+ virtual BVHLayoutMask get_bvh_layout_mask() const {
+ BVHLayoutMask bvh_layout_mask = BVH_LAYOUT_BVH2;
+ if(DebugFlags().cpu.has_sse2() && system_cpu_support_sse2()) {
+ bvh_layout_mask |= BVH_LAYOUT_BVH4;
+ }
+ if(DebugFlags().cpu.has_avx2() && system_cpu_support_avx2()) {
+ bvh_layout_mask |= BVH_LAYOUT_BVH8;
+ }
+#ifdef WITH_EMBREE
+ bvh_layout_mask |= BVH_LAYOUT_EMBREE;
+#endif /* WITH_EMBREE */
+ return bvh_layout_mask;
+ }
+
void load_texture_info()
{
if(need_texture_info) {
@@ -499,6 +514,7 @@ public:
filter_nlm_update_output_kernel()(dx, dy,
blurDifference,
(float*) image_ptr,
+ difference,
(float*) out_ptr,
weightAccum,
local_rect,
@@ -676,12 +692,22 @@ public:
void path_trace(DeviceTask &task, RenderTile &tile, KernelGlobals *kg)
{
+ const bool use_coverage = kernel_data.film.cryptomatte_passes & CRYPT_ACCURATE;
+
scoped_timer timer(&tile.buffers->render_time);
+ Coverage coverage(kg, tile);
+ if(use_coverage) {
+ coverage.init_path_trace();
+ }
+
float *render_buffer = (float*)tile.buffer;
int start_sample = tile.start_sample;
int end_sample = tile.start_sample + tile.num_samples;
+ _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
+ _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
+
for(int sample = start_sample; sample < end_sample; sample++) {
if(task.get_cancel() || task_pool.canceled()) {
if(task.need_finish_queue == false)
@@ -690,6 +716,9 @@ public:
for(int y = tile.y; y < tile.y + tile.h; y++) {
for(int x = tile.x; x < tile.x + tile.w; x++) {
+ if(use_coverage) {
+ coverage.init_pixel(x, y);
+ }
path_trace_kernel()(kg, render_buffer,
sample, x, y, tile.offset, tile.stride);
}
@@ -699,6 +728,9 @@ public:
task.update_progress(&tile, tile.w*tile.h);
}
+ if(use_coverage) {
+ coverage.finalize();
+ }
}
void denoise(DenoisingTask& denoising, RenderTile &tile)
@@ -759,7 +791,6 @@ public:
}
else if(tile.task == RenderTile::DENOISE) {
denoise(denoising, tile);
-
task.update_progress(&tile, tile.w*tile.h);
}
@@ -1027,13 +1058,6 @@ void device_cpu_info(vector<DeviceInfo>& devices)
info.id = "CPU";
info.num = 0;
info.advanced_shading = true;
- info.bvh_layout_mask = BVH_LAYOUT_BVH2;
- if(system_cpu_support_sse2()) {
- info.bvh_layout_mask |= BVH_LAYOUT_BVH4;
- }
- if(system_cpu_support_avx2()) {
- info.bvh_layout_mask |= BVH_LAYOUT_BVH8;
- }
info.has_volume_decoupled = true;
info.has_osl = true;
info.has_half_images = true;
@@ -1041,7 +1065,7 @@ void device_cpu_info(vector<DeviceInfo>& devices)
devices.insert(devices.begin(), info);
}
-string device_cpu_capabilities(void)
+string device_cpu_capabilities()
{
string capabilities = "";
capabilities += system_cpu_support_sse2() ? "SSE2 " : "";
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index da8e49f129f..46e7b043603 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -73,12 +73,12 @@ const char *cuewErrorString(CUresult result)
return error.c_str();
}
-const char *cuewCompilerPath(void)
+const char *cuewCompilerPath()
{
return CYCLES_CUDA_NVCC_EXECUTABLE;
}
-int cuewCompilerVersion(void)
+int cuewCompilerVersion()
{
return (CUDA_VERSION / 100) + (CUDA_VERSION % 100 / 10);
}
@@ -181,6 +181,10 @@ public:
return true;
}
+ virtual BVHLayoutMask get_bvh_layout_mask() const {
+ return BVH_LAYOUT_BVH2;
+ }
+
/*#ifdef NDEBUG
#define cuda_abort()
#else
@@ -207,7 +211,7 @@ public:
/*cuda_abort();*/ \
cuda_error_documentation(); \
} \
- } (void)0
+ } (void) 0
bool cuda_error_(CUresult result, const string& stmt)
{
@@ -1397,18 +1401,14 @@ public:
int h = task->reconstruction_state.source_h;
int stride = task->buffer.stride;
- int shift_stride = stride*h;
+ int pass_stride = task->buffer.pass_stride;
int num_shifts = (2*r+1)*(2*r+1);
- int mem_size = sizeof(float)*shift_stride*num_shifts;
-
- device_only_memory<uchar> temporary_mem(this, "Denoising temporary_mem");
- temporary_mem.alloc_to_device(2*mem_size);
if(have_error())
return false;
- CUdeviceptr difference = cuda_device_ptr(temporary_mem.device_pointer);
- CUdeviceptr blurDifference = difference + mem_size;
+ CUdeviceptr difference = cuda_device_ptr(task->buffer.temporary_mem.device_pointer);
+ CUdeviceptr blurDifference = difference + sizeof(float)*pass_stride*num_shifts;
{
CUfunction cuNLMCalcDifference, cuNLMBlur, cuNLMCalcWeight, cuNLMConstructGramian;
@@ -1426,9 +1426,9 @@ public:
task->reconstruction_state.source_w * task->reconstruction_state.source_h,
num_shifts);
- void *calc_difference_args[] = {&color_ptr, &color_variance_ptr, &difference, &w, &h, &stride, &shift_stride, &r, &task->buffer.pass_stride, &a, &k_2};
- void *blur_args[] = {&difference, &blurDifference, &w, &h, &stride, &shift_stride, &r, &f};
- void *calc_weight_args[] = {&blurDifference, &difference, &w, &h, &stride, &shift_stride, &r, &f};
+ void *calc_difference_args[] = {&color_ptr, &color_variance_ptr, &difference, &w, &h, &stride, &pass_stride, &r, &pass_stride, &a, &k_2};
+ void *blur_args[] = {&difference, &blurDifference, &w, &h, &stride, &pass_stride, &r, &f};
+ void *calc_weight_args[] = {&blurDifference, &difference, &w, &h, &stride, &pass_stride, &r, &f};
void *construct_gramian_args[] = {&blurDifference,
&task->buffer.mem.device_pointer,
&task->storage.transform.device_pointer,
@@ -1437,9 +1437,8 @@ public:
&task->storage.XtWY.device_pointer,
&task->reconstruction_state.filter_window,
&w, &h, &stride,
- &shift_stride, &r,
- &f,
- &task->buffer.pass_stride};
+ &pass_stride, &r,
+ &f};
CUDA_LAUNCH_KERNEL_1D(cuNLMCalcDifference, calc_difference_args);
CUDA_LAUNCH_KERNEL_1D(cuNLMBlur, blur_args);
@@ -1448,8 +1447,6 @@ public:
CUDA_LAUNCH_KERNEL_1D(cuNLMConstructGramian, construct_gramian_args);
}
- temporary_mem.free();
-
{
CUfunction cuFinalize;
cuda_assert(cuModuleGetFunction(&cuFinalize, cuFilterModule, "kernel_cuda_filter_finalize"));
@@ -1667,7 +1664,7 @@ public:
for(int sample = start_sample; sample < end_sample; sample += step_samples) {
/* Setup and copy work tile to device. */
wtile->start_sample = sample;
- wtile->num_samples = min(step_samples, end_sample - sample);;
+ wtile->num_samples = min(step_samples, end_sample - sample);
work_tiles.copy_to_device();
CUdeviceptr d_work_tiles = cuda_device_ptr(work_tiles.device_pointer);
@@ -2149,7 +2146,7 @@ public:
/*cuda_abort();*/ \
device->cuda_error_documentation(); \
} \
- } (void)0
+ } (void) 0
/* CUDA context scope. */
@@ -2358,7 +2355,7 @@ int2 CUDASplitKernel::split_kernel_global_size(device_memory& kg, device_memory&
return global_size;
}
-bool device_cuda_init(void)
+bool device_cuda_init()
{
#ifdef WITH_CUDA_DYNLOAD
static bool initialized = false;
@@ -2396,7 +2393,7 @@ bool device_cuda_init(void)
return result;
#else /* WITH_CUDA_DYNLOAD */
return true;
-#endif /* WITH_CUDA_DYNLOAD */
+#endif /* WITH_CUDA_DYNLOAD */
}
Device *device_cuda_create(DeviceInfo& info, Stats &stats, bool background)
@@ -2466,7 +2463,6 @@ void device_cuda_info(vector<DeviceInfo>& devices)
info.advanced_shading = (major >= 3);
info.has_half_images = (major >= 3);
info.has_volume_decoupled = false;
- info.bvh_layout_mask = BVH_LAYOUT_BVH2;
int pci_location[3] = {0, 0, 0};
cuDeviceGetAttribute(&pci_location[0], CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID, num);
@@ -2501,7 +2497,7 @@ void device_cuda_info(vector<DeviceInfo>& devices)
devices.insert(devices.end(), display_devices.begin(), display_devices.end());
}
-string device_cuda_capabilities(void)
+string device_cuda_capabilities()
{
CUresult result = device_cuda_safe_init();
if(result != CUDA_SUCCESS) {
@@ -2534,7 +2530,7 @@ string device_cuda_capabilities(void)
capabilities += string_printf("\t\tCU_DEVICE_ATTRIBUTE_" #attr "\t\t\t%d\n", \
value); \
} \
- } (void)0
+ } (void) 0
/* TODO(sergey): Strip all attributes which are not useful for us
* or does not depend on the driver.
*/
diff --git a/intern/cycles/device/device_denoising.cpp b/intern/cycles/device/device_denoising.cpp
index 23c18fa15b2..78c65a3d22d 100644
--- a/intern/cycles/device/device_denoising.cpp
+++ b/intern/cycles/device/device_denoising.cpp
@@ -99,14 +99,18 @@ void DenoisingTask::setup_denoising_buffer()
buffer.mem.alloc_to_device(mem_size, false);
/* CPUs process shifts sequentially while GPUs process them in parallel. */
- int num_shifts = 1;
+ int num_layers;
if(buffer.gpu_temporary_mem) {
/* Shadowing prefiltering uses a radius of 6, so allocate at least that much. */
int max_radius = max(radius, 6);
- num_shifts = (2*max_radius + 1) * (2*max_radius + 1);
+ int num_shifts = (2*max_radius + 1) * (2*max_radius + 1);
+ num_layers = 2*num_shifts + 1;
+ }
+ else {
+ num_layers = 3;
}
/* Allocate two layers per shift as well as one for the weight accumulation. */
- buffer.temporary_mem.alloc_to_device((2*num_shifts + 1) * buffer.pass_stride);
+ buffer.temporary_mem.alloc_to_device(num_layers * buffer.pass_stride);
}
void DenoisingTask::prefilter_shadowing()
diff --git a/intern/cycles/device/device_denoising.h b/intern/cycles/device/device_denoising.h
index 7474f71ff78..8e0666d0e59 100644
--- a/intern/cycles/device/device_denoising.h
+++ b/intern/cycles/device/device_denoising.h
@@ -166,4 +166,4 @@ protected:
CCL_NAMESPACE_END
-#endif /* __DEVICE_DENOISING_H__ */
+#endif /* __DEVICE_DENOISING_H__ */
diff --git a/intern/cycles/device/device_intern.h b/intern/cycles/device/device_intern.h
index 941be448101..e6495c2bff3 100644
--- a/intern/cycles/device/device_intern.h
+++ b/intern/cycles/device/device_intern.h
@@ -22,9 +22,9 @@ CCL_NAMESPACE_BEGIN
class Device;
Device *device_cpu_create(DeviceInfo& info, Stats &stats, bool background);
-bool device_opencl_init(void);
+bool device_opencl_init();
Device *device_opencl_create(DeviceInfo& info, Stats &stats, bool background);
-bool device_cuda_init(void);
+bool device_cuda_init();
Device *device_cuda_create(DeviceInfo& info, Stats &stats, bool background);
Device *device_network_create(DeviceInfo& info, Stats &stats, const char *address);
Device *device_multi_create(DeviceInfo& info, Stats &stats, bool background);
@@ -34,10 +34,10 @@ void device_opencl_info(vector<DeviceInfo>& devices);
void device_cuda_info(vector<DeviceInfo>& devices);
void device_network_info(vector<DeviceInfo>& devices);
-string device_cpu_capabilities(void);
-string device_opencl_capabilities(void);
-string device_cuda_capabilities(void);
+string device_cpu_capabilities();
+string device_opencl_capabilities();
+string device_cuda_capabilities();
CCL_NAMESPACE_END
-#endif /* __DEVICE_INTERN_H__ */
+#endif /* __DEVICE_INTERN_H__ */
diff --git a/intern/cycles/device/device_memory.h b/intern/cycles/device/device_memory.h
index 2b4835c9c65..e43834bdc8d 100644
--- a/intern/cycles/device/device_memory.h
+++ b/intern/cycles/device/device_memory.h
@@ -21,6 +21,7 @@
*
* Data types for allocating, copying and freeing device memory. */
+#include "util/util_array.h"
#include "util/util_half.h"
#include "util/util_texture.h"
#include "util/util_types.h"
@@ -496,4 +497,4 @@ protected:
CCL_NAMESPACE_END
-#endif /* __DEVICE_MEMORY_H__ */
+#endif /* __DEVICE_MEMORY_H__ */
diff --git a/intern/cycles/device/device_multi.cpp b/intern/cycles/device/device_multi.cpp
index f1bd3fd13e1..490ee3951c9 100644
--- a/intern/cycles/device/device_multi.cpp
+++ b/intern/cycles/device/device_multi.cpp
@@ -103,6 +103,14 @@ public:
return devices.front().device->show_samples();
}
+ virtual BVHLayoutMask get_bvh_layout_mask() const {
+ BVHLayoutMask bvh_layout_mask = BVH_LAYOUT_ALL;
+ foreach(const SubDevice& sub_device, devices) {
+ bvh_layout_mask &= sub_device.device->get_bvh_layout_mask();
+ }
+ return bvh_layout_mask;
+ }
+
bool load_kernels(const DeviceRequestedFeatures& requested_features)
{
foreach(SubDevice& sub, devices)
diff --git a/intern/cycles/device/device_network.cpp b/intern/cycles/device/device_network.cpp
index 204e405421d..b6e18621f12 100644
--- a/intern/cycles/device/device_network.cpp
+++ b/intern/cycles/device/device_network.cpp
@@ -87,6 +87,10 @@ public:
snd.write();
}
+ virtual BVHLayoutMask get_bvh_layout_mask() const {
+ return BVH_LAYOUT_BVH2;
+ }
+
void mem_alloc(device_memory& mem)
{
if(mem.name) {
@@ -306,7 +310,6 @@ void device_network_info(vector<DeviceInfo>& devices)
/* todo: get this info from device */
info.advanced_shading = true;
info.has_volume_decoupled = false;
- info.bvh_layout_mask = BVH_LAYOUT_BVH2;
info.has_osl = false;
devices.push_back(info);
diff --git a/intern/cycles/device/device_network.h b/intern/cycles/device/device_network.h
index 96e0de742db..67626ae177f 100644
--- a/intern/cycles/device/device_network.h
+++ b/intern/cycles/device/device_network.h
@@ -488,4 +488,4 @@ CCL_NAMESPACE_END
#endif
-#endif /* __DEVICE_NETWORK_H__ */
+#endif /* __DEVICE_NETWORK_H__ */
diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp
index be0f8f45399..71410f80d57 100644
--- a/intern/cycles/device/device_opencl.cpp
+++ b/intern/cycles/device/device_opencl.cpp
@@ -44,7 +44,7 @@ Device *device_opencl_create(DeviceInfo& info, Stats &stats, bool background)
}
}
-bool device_opencl_init(void)
+bool device_opencl_init()
{
static bool initialized = false;
static bool result = false;
@@ -136,7 +136,6 @@ void device_opencl_info(vector<DeviceInfo>& devices)
info.use_split_kernel = OpenCLInfo::kernel_use_split(platform_name,
device_type);
info.has_volume_decoupled = false;
- info.bvh_layout_mask = BVH_LAYOUT_BVH2;
info.id = id;
/* Check OpenCL extensions */
@@ -147,7 +146,7 @@ void device_opencl_info(vector<DeviceInfo>& devices)
}
}
-string device_opencl_capabilities(void)
+string device_opencl_capabilities()
{
if(OpenCLInfo::device_type() == 0) {
return "All OpenCL devices are forced to be OFF";
@@ -246,4 +245,4 @@ string device_opencl_capabilities(void)
CCL_NAMESPACE_END
-#endif /* WITH_OPENCL */
+#endif /* WITH_OPENCL */
diff --git a/intern/cycles/device/device_split_kernel.h b/intern/cycles/device/device_split_kernel.h
index 26ddce5bb22..5af4367d1b6 100644
--- a/intern/cycles/device/device_split_kernel.h
+++ b/intern/cycles/device/device_split_kernel.h
@@ -130,4 +130,4 @@ public:
CCL_NAMESPACE_END
-#endif /* __DEVICE_SPLIT_KERNEL_H__ */
+#endif /* __DEVICE_SPLIT_KERNEL_H__ */
diff --git a/intern/cycles/device/device_task.h b/intern/cycles/device/device_task.h
index ec87aa8c560..861014373b3 100644
--- a/intern/cycles/device/device_task.h
+++ b/intern/cycles/device/device_task.h
@@ -64,7 +64,7 @@ public:
function<void(long, int)> update_progress_sample;
function<void(RenderTile&)> update_tile_sample;
function<void(RenderTile&)> release_tile;
- function<bool(void)> get_cancel;
+ function<bool()> get_cancel;
function<void(RenderTile*, Device*)> map_neighbor_tiles;
function<void(RenderTile*, Device*)> unmap_neighbor_tiles;
@@ -85,4 +85,4 @@ protected:
CCL_NAMESPACE_END
-#endif /* __DEVICE_TASK_H__ */
+#endif /* __DEVICE_TASK_H__ */
diff --git a/intern/cycles/device/opencl/opencl.h b/intern/cycles/device/opencl/opencl.h
index 6c73d10a376..8cb7f6d0b82 100644
--- a/intern/cycles/device/opencl/opencl.h
+++ b/intern/cycles/device/opencl/opencl.h
@@ -245,7 +245,7 @@ public:
(device)->set_error(message); \
fprintf(stderr, "%s\n", message.c_str()); \
} \
- } (void)0
+ } (void) 0
#define opencl_assert(stmt) \
{ \
@@ -257,7 +257,7 @@ public:
error_msg = message; \
fprintf(stderr, "%s\n", message.c_str()); \
} \
- } (void)0
+ } (void) 0
class OpenCLDeviceBase : public Device
{
diff --git a/intern/cycles/device/opencl/opencl_base.cpp b/intern/cycles/device/opencl/opencl_base.cpp
index cc887134bb0..1e73d37d7a4 100644
--- a/intern/cycles/device/opencl/opencl_base.cpp
+++ b/intern/cycles/device/opencl/opencl_base.cpp
@@ -761,7 +761,7 @@ bool OpenCLDeviceBase::denoising_non_local_means(device_ptr image_ptr,
cl_mem variance_mem = CL_MEM_PTR(variance_ptr);
cl_mem out_mem = CL_MEM_PTR(out_ptr);
- mem_zero_kernel(*difference, sizeof(float)*pass_stride);
+ mem_zero_kernel(*weightAccum, sizeof(float)*pass_stride);
mem_zero_kernel(out_ptr, sizeof(float)*pass_stride);
cl_kernel ckNLMCalcDifference = denoising_program(ustring("filter_nlm_calc_difference"));
@@ -865,38 +865,38 @@ bool OpenCLDeviceBase::denoising_reconstruct(device_ptr color_ptr,
int h = task->reconstruction_state.source_h;
int stride = task->buffer.stride;
- int shift_stride = stride*h;
- int num_shifts = (2*task->radius + 1)*(2*task->radius + 1);
- int mem_size = sizeof(float)*shift_stride*num_shifts;
+ int r = task->radius;
+ int pass_stride = task->buffer.pass_stride;
+ int num_shifts = (2*r+1)*(2*r+1);
- cl_mem difference = clCreateBuffer(cxContext, CL_MEM_READ_WRITE, mem_size, NULL, &ciErr);
- opencl_assert_err(ciErr, "clCreateBuffer denoising_reconstruct");
- cl_mem blurDifference = clCreateBuffer(cxContext, CL_MEM_READ_WRITE, mem_size, NULL, &ciErr);
- opencl_assert_err(ciErr, "clCreateBuffer denoising_reconstruct");
+ device_sub_ptr difference(task->buffer.temporary_mem, 0, pass_stride*num_shifts);
+ device_sub_ptr blurDifference(task->buffer.temporary_mem, pass_stride*num_shifts, pass_stride*num_shifts);
+ cl_mem difference_mem = CL_MEM_PTR(*difference);
+ cl_mem blurDifference_mem = CL_MEM_PTR(*blurDifference);
kernel_set_args(ckNLMCalcDifference, 0,
color_mem,
color_variance_mem,
- difference,
+ difference_mem,
w, h, stride,
- shift_stride,
- task->radius,
- task->buffer.pass_stride,
+ pass_stride,
+ r,
+ pass_stride,
1.0f, task->nlm_k_2);
kernel_set_args(ckNLMBlur, 0,
- difference,
- blurDifference,
+ difference_mem,
+ blurDifference_mem,
w, h, stride,
- shift_stride,
- task->radius, 4);
+ pass_stride,
+ r, 4);
kernel_set_args(ckNLMCalcWeight, 0,
- blurDifference,
- difference,
+ blurDifference_mem,
+ difference_mem,
w, h, stride,
- shift_stride,
- task->radius, 4);
+ pass_stride,
+ r, 4);
kernel_set_args(ckNLMConstructGramian, 0,
- blurDifference,
+ blurDifference_mem,
buffer_mem,
transform_mem,
rank_mem,
@@ -904,9 +904,8 @@ bool OpenCLDeviceBase::denoising_reconstruct(device_ptr color_ptr,
XtWY_mem,
task->reconstruction_state.filter_window,
w, h, stride,
- shift_stride,
- task->radius, 4,
- task->buffer.pass_stride);
+ pass_stride,
+ r, 4);
enqueue_kernel(ckNLMCalcDifference, w*h, num_shifts, true);
enqueue_kernel(ckNLMBlur, w*h, num_shifts, true);
@@ -914,9 +913,6 @@ bool OpenCLDeviceBase::denoising_reconstruct(device_ptr color_ptr,
enqueue_kernel(ckNLMBlur, w*h, num_shifts, true);
enqueue_kernel(ckNLMConstructGramian, w*h, num_shifts, true, 256);
- opencl_assert(clReleaseMemObject(difference));
- opencl_assert(clReleaseMemObject(blurDifference));
-
kernel_set_args(ckFinalize, 0,
output_mem,
rank_mem,
diff --git a/intern/cycles/device/opencl/opencl_mega.cpp b/intern/cycles/device/opencl/opencl_mega.cpp
index e004c0b44f4..89001366d9d 100644
--- a/intern/cycles/device/opencl/opencl_mega.cpp
+++ b/intern/cycles/device/opencl/opencl_mega.cpp
@@ -43,6 +43,10 @@ public:
return true;
}
+ virtual BVHLayoutMask get_bvh_layout_mask() const {
+ return BVH_LAYOUT_BVH2;
+ }
+
virtual bool load_kernels(const DeviceRequestedFeatures& /*requested_features*/,
vector<OpenCLProgram*> &programs)
{
diff --git a/intern/cycles/device/opencl/opencl_split.cpp b/intern/cycles/device/opencl/opencl_split.cpp
index 66a4aa7e891..adb73bc6e2c 100644
--- a/intern/cycles/device/opencl/opencl_split.cpp
+++ b/intern/cycles/device/opencl/opencl_split.cpp
@@ -95,6 +95,10 @@ public:
return true;
}
+ virtual BVHLayoutMask get_bvh_layout_mask() const {
+ return BVH_LAYOUT_BVH2;
+ }
+
virtual bool load_kernels(const DeviceRequestedFeatures& requested_features,
vector<OpenCLDeviceBase::OpenCLProgram*> &programs)
{
@@ -459,4 +463,4 @@ Device *opencl_create_split_device(DeviceInfo& info, Stats& stats, bool backgrou
CCL_NAMESPACE_END
-#endif /* WITH_OPENCL */
+#endif /* WITH_OPENCL */
diff --git a/intern/cycles/device/opencl/opencl_util.cpp b/intern/cycles/device/opencl/opencl_util.cpp
index 895e4149a3a..4c9f3cd6ef7 100644
--- a/intern/cycles/device/opencl/opencl_util.cpp
+++ b/intern/cycles/device/opencl/opencl_util.cpp
@@ -106,7 +106,7 @@ cl_context OpenCLCache::get_context(cl_platform_id platform,
cl_int ciErr = clRetainContext(slot.context);
assert(ciErr == CL_SUCCESS);
- (void)ciErr;
+ (void) ciErr;
return slot.context;
}
@@ -153,7 +153,7 @@ cl_program OpenCLCache::get_program(cl_platform_id platform,
cl_int ciErr = clRetainProgram(entry.program);
assert(ciErr == CL_SUCCESS);
- (void)ciErr;
+ (void) ciErr;
return entry.program;
}
@@ -188,7 +188,7 @@ void OpenCLCache::store_context(cl_platform_id platform,
* The caller is going to release the object when done with it. */
cl_int ciErr = clRetainContext(context);
assert(ciErr == CL_SUCCESS);
- (void)ciErr;
+ (void) ciErr;
}
void OpenCLCache::store_program(cl_platform_id platform,
@@ -227,7 +227,7 @@ void OpenCLCache::store_program(cl_platform_id platform,
*/
cl_int ciErr = clRetainProgram(program);
assert(ciErr == CL_SUCCESS);
- (void)ciErr;
+ (void) ciErr;
}
string OpenCLCache::get_kernel_md5()
diff --git a/intern/cycles/graph/node.h b/intern/cycles/graph/node.h
index 11695a8631d..d50a3786139 100644
--- a/intern/cycles/graph/node.h
+++ b/intern/cycles/graph/node.h
@@ -18,9 +18,9 @@
#include "graph/node_type.h"
+#include "util/util_array.h"
#include "util/util_map.h"
#include "util/util_param.h"
-#include "util/util_vector.h"
CCL_NAMESPACE_BEGIN
diff --git a/intern/cycles/graph/node_type.h b/intern/cycles/graph/node_type.h
index 1d565794b27..7d6abae2314 100644
--- a/intern/cycles/graph/node_type.h
+++ b/intern/cycles/graph/node_type.h
@@ -17,7 +17,7 @@
#pragma once
#include "graph/node_enum.h"
-
+#include "util/util_array.h"
#include "util/util_map.h"
#include "util/util_param.h"
#include "util/util_string.h"
diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt
index c6e92c6d89d..92cb66bdec9 100644
--- a/intern/cycles/kernel/CMakeLists.txt
+++ b/intern/cycles/kernel/CMakeLists.txt
@@ -82,6 +82,7 @@ set(SRC_BVH_HEADERS
bvh/obvh_traversal.h
bvh/obvh_volume.h
bvh/obvh_volume_all.h
+ bvh/bvh_embree.h
)
set(SRC_HEADERS
@@ -96,6 +97,7 @@ set(SRC_HEADERS
kernel_emission.h
kernel_film.h
kernel_globals.h
+ kernel_id_passes.h
kernel_jitter.h
kernel_light.h
kernel_math.h
@@ -340,11 +342,11 @@ if(WITH_CYCLES_CUDA_BINARIES)
set(CUDA_VERSION "${CUDA_VERSION_MAJOR}${CUDA_VERSION_MINOR}")
# warn for other versions
- if(CUDA_VERSION MATCHES "80" OR CUDA_VERSION MATCHES "90")
+ if(CUDA_VERSION MATCHES "90" OR CUDA_VERSION MATCHES "91")
else()
message(WARNING
"CUDA version ${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR} detected, "
- "build may succeed but only CUDA 8.0 is officially supported")
+ "build may succeed but only CUDA 9.0 and 9.1 are officially supported")
endif()
# build for each arch
diff --git a/intern/cycles/kernel/bvh/bvh.h b/intern/cycles/kernel/bvh/bvh.h
index 2ad55d041bf..6708a3efac1 100644
--- a/intern/cycles/kernel/bvh/bvh.h
+++ b/intern/cycles/kernel/bvh/bvh.h
@@ -25,6 +25,10 @@
* the code has been extended and modified to support more primitives and work
* with CPU/CUDA/OpenCL. */
+#ifdef __EMBREE__
+# include "kernel/bvh/bvh_embree.h"
+#endif
+
CCL_NAMESPACE_BEGIN
#include "kernel/bvh/bvh_types.h"
@@ -32,9 +36,9 @@ CCL_NAMESPACE_BEGIN
/* Common QBVH functions. */
#ifdef __QBVH__
# include "kernel/bvh/qbvh_nodes.h"
-#ifdef __KERNEL_AVX2__
-# include "kernel/bvh/obvh_nodes.h"
-#endif
+# ifdef __KERNEL_AVX2__
+# include "kernel/bvh/obvh_nodes.h"
+# endif
#endif
/* Regular BVH traversal */
@@ -160,6 +164,19 @@ CCL_NAMESPACE_BEGIN
#undef BVH_NAME_EVAL
#undef BVH_FUNCTION_FULL_NAME
+ccl_device_inline bool scene_intersect_valid(const Ray *ray)
+{
+ /* NOTE: Due to some vectorization code non-finite origin point might
+ * cause lots of false-positive intersections which will overflow traversal
+ * stack.
+ * This code is a quick way to perform early output, to avoid crashes in
+ * such cases.
+ * From production scenes so far it seems it's enough to test first element
+ * only.
+ */
+ return isfinite(ray->P.x);
+}
+
/* Note: ray is passed by value to work around a possible CUDA compiler bug. */
ccl_device_intersect bool scene_intersect(KernelGlobals *kg,
const Ray ray,
@@ -169,39 +186,57 @@ ccl_device_intersect bool scene_intersect(KernelGlobals *kg,
float difl,
float extmax)
{
+ if(!scene_intersect_valid(&ray)) {
+ return false;
+ }
+#ifdef __EMBREE__
+ if(kernel_data.bvh.scene) {
+ isect->t = ray.t;
+ CCLIntersectContext ctx(kg, CCLIntersectContext::RAY_REGULAR);
+ IntersectContext rtc_ctx(&ctx);
+ RTCRayHit ray_hit;
+ kernel_embree_setup_rayhit(ray, ray_hit, visibility);
+ rtcIntersect1(kernel_data.bvh.scene, &rtc_ctx.context, &ray_hit);
+ if(ray_hit.hit.geomID != RTC_INVALID_GEOMETRY_ID && ray_hit.hit.primID != RTC_INVALID_GEOMETRY_ID) {
+ kernel_embree_convert_hit(kg, &ray_hit.ray, &ray_hit.hit, isect);
+ return true;
+ }
+ return false;
+ }
+#endif /* __EMBREE__ */
#ifdef __OBJECT_MOTION__
if(kernel_data.bvh.have_motion) {
# ifdef __HAIR__
if(kernel_data.bvh.have_curves)
return bvh_intersect_hair_motion(kg, &ray, isect, visibility, lcg_state, difl, extmax);
-# endif /* __HAIR__ */
+# endif /* __HAIR__ */
return bvh_intersect_motion(kg, &ray, isect, visibility);
}
-#endif /* __OBJECT_MOTION__ */
+#endif /* __OBJECT_MOTION__ */
#ifdef __HAIR__
if(kernel_data.bvh.have_curves)
return bvh_intersect_hair(kg, &ray, isect, visibility, lcg_state, difl, extmax);
-#endif /* __HAIR__ */
+#endif /* __HAIR__ */
#ifdef __KERNEL_CPU__
# ifdef __INSTANCING__
if(kernel_data.bvh.have_instancing)
return bvh_intersect_instancing(kg, &ray, isect, visibility);
-# endif /* __INSTANCING__ */
+# endif /* __INSTANCING__ */
return bvh_intersect(kg, &ray, isect, visibility);
-#else /* __KERNEL_CPU__ */
+#else /* __KERNEL_CPU__ */
# ifdef __INSTANCING__
return bvh_intersect_instancing(kg, &ray, isect, visibility);
# else
return bvh_intersect(kg, &ray, isect, visibility);
-# endif /* __INSTANCING__ */
+# endif /* __INSTANCING__ */
-#endif /* __KERNEL_CPU__ */
+#endif /* __KERNEL_CPU__ */
}
#ifdef __BVH_LOCAL__
@@ -213,6 +248,58 @@ ccl_device_intersect bool scene_intersect_local(KernelGlobals *kg,
uint *lcg_state,
int max_hits)
{
+ if(!scene_intersect_valid(&ray)) {
+ return false;
+ }
+#ifdef __EMBREE__
+ if(kernel_data.bvh.scene) {
+ CCLIntersectContext ctx(kg, CCLIntersectContext::RAY_SSS);
+ ctx.lcg_state = lcg_state;
+ ctx.max_hits = max_hits;
+ ctx.ss_isect = local_isect;
+ local_isect->num_hits = 0;
+ ctx.sss_object_id = local_object;
+ IntersectContext rtc_ctx(&ctx);
+ RTCRay rtc_ray;
+ kernel_embree_setup_ray(ray, rtc_ray, PATH_RAY_ALL_VISIBILITY);
+
+ /* Get the Embree scene for this intersection. */
+ RTCGeometry geom = rtcGetGeometry(kernel_data.bvh.scene, local_object * 2);
+ if(geom) {
+ float3 P = ray.P;
+ float3 dir = ray.D;
+ float3 idir = ray.D;
+ const int object_flag = kernel_tex_fetch(__object_flag, local_object);
+ if(!(object_flag & SD_OBJECT_TRANSFORM_APPLIED)) {
+ Transform ob_itfm;
+ rtc_ray.tfar = bvh_instance_motion_push(kg,
+ local_object,
+ &ray,
+ &P,
+ &dir,
+ &idir,
+ ray.t,
+ &ob_itfm);
+ /* bvh_instance_motion_push() returns the inverse transform but
+ * it's not needed here. */
+ (void) ob_itfm;
+
+ rtc_ray.org_x = P.x;
+ rtc_ray.org_y = P.y;
+ rtc_ray.org_z = P.z;
+ rtc_ray.dir_x = dir.x;
+ rtc_ray.dir_y = dir.y;
+ rtc_ray.dir_z = dir.z;
+ }
+ RTCScene scene = (RTCScene)rtcGetGeometryUserData(geom);
+ if(scene) {
+ rtcOccluded1(scene, &rtc_ctx.context, &rtc_ray);
+ }
+ }
+
+ return local_isect->num_hits > 0;
+ }
+#endif /* __EMBREE__ */
#ifdef __OBJECT_MOTION__
if(kernel_data.bvh.have_motion) {
return bvh_intersect_local_motion(kg,
@@ -222,7 +309,7 @@ ccl_device_intersect bool scene_intersect_local(KernelGlobals *kg,
lcg_state,
max_hits);
}
-#endif /* __OBJECT_MOTION__ */
+#endif /* __OBJECT_MOTION__ */
return bvh_intersect_local(kg,
&ray,
local_isect,
@@ -240,6 +327,27 @@ ccl_device_intersect bool scene_intersect_shadow_all(KernelGlobals *kg,
uint max_hits,
uint *num_hits)
{
+ if(!scene_intersect_valid(ray)) {
+ return false;
+ }
+# ifdef __EMBREE__
+ if(kernel_data.bvh.scene) {
+ CCLIntersectContext ctx(kg, CCLIntersectContext::RAY_SHADOW_ALL);
+ ctx.isect_s = isect;
+ ctx.max_hits = max_hits;
+ ctx.num_hits = 0;
+ IntersectContext rtc_ctx(&ctx);
+ RTCRay rtc_ray;
+ kernel_embree_setup_ray(*ray, rtc_ray, PATH_RAY_SHADOW);
+ rtcOccluded1(kernel_data.bvh.scene, &rtc_ctx.context, &rtc_ray);
+
+ if(ctx.num_hits > max_hits) {
+ return true;
+ }
+ *num_hits = ctx.num_hits;
+ return rtc_ray.tfar == -INFINITY;
+ }
+# endif
# ifdef __OBJECT_MOTION__
if(kernel_data.bvh.have_motion) {
# ifdef __HAIR__
@@ -251,7 +359,7 @@ ccl_device_intersect bool scene_intersect_shadow_all(KernelGlobals *kg,
max_hits,
num_hits);
}
-# endif /* __HAIR__ */
+# endif /* __HAIR__ */
return bvh_intersect_shadow_all_motion(kg,
ray,
@@ -260,7 +368,7 @@ ccl_device_intersect bool scene_intersect_shadow_all(KernelGlobals *kg,
max_hits,
num_hits);
}
-# endif /* __OBJECT_MOTION__ */
+# endif /* __OBJECT_MOTION__ */
# ifdef __HAIR__
if(kernel_data.bvh.have_curves) {
@@ -271,7 +379,7 @@ ccl_device_intersect bool scene_intersect_shadow_all(KernelGlobals *kg,
max_hits,
num_hits);
}
-# endif /* __HAIR__ */
+# endif /* __HAIR__ */
# ifdef __INSTANCING__
if(kernel_data.bvh.have_instancing) {
@@ -282,7 +390,7 @@ ccl_device_intersect bool scene_intersect_shadow_all(KernelGlobals *kg,
max_hits,
num_hits);
}
-# endif /* __INSTANCING__ */
+# endif /* __INSTANCING__ */
return bvh_intersect_shadow_all(kg,
ray,
@@ -299,24 +407,27 @@ ccl_device_intersect bool scene_intersect_volume(KernelGlobals *kg,
Intersection *isect,
const uint visibility)
{
+ if(!scene_intersect_valid(ray)) {
+ return false;
+ }
# ifdef __OBJECT_MOTION__
if(kernel_data.bvh.have_motion) {
return bvh_intersect_volume_motion(kg, ray, isect, visibility);
}
-# endif /* __OBJECT_MOTION__ */
+# endif /* __OBJECT_MOTION__ */
# ifdef __KERNEL_CPU__
# ifdef __INSTANCING__
if(kernel_data.bvh.have_instancing)
return bvh_intersect_volume_instancing(kg, ray, isect, visibility);
-# endif /* __INSTANCING__ */
+# endif /* __INSTANCING__ */
return bvh_intersect_volume(kg, ray, isect, visibility);
-# else /* __KERNEL_CPU__ */
+# else /* __KERNEL_CPU__ */
# ifdef __INSTANCING__
return bvh_intersect_volume_instancing(kg, ray, isect, visibility);
# else
return bvh_intersect_volume(kg, ray, isect, visibility);
-# endif /* __INSTANCING__ */
-# endif /* __KERNEL_CPU__ */
+# endif /* __INSTANCING__ */
+# endif /* __KERNEL_CPU__ */
}
#endif /* __VOLUME__ */
@@ -327,15 +438,31 @@ ccl_device_intersect uint scene_intersect_volume_all(KernelGlobals *kg,
const uint max_hits,
const uint visibility)
{
+ if(!scene_intersect_valid(ray)) {
+ return false;
+ }
+# ifdef __EMBREE__
+ if(kernel_data.bvh.scene) {
+ CCLIntersectContext ctx(kg, CCLIntersectContext::RAY_VOLUME_ALL);
+ ctx.isect_s = isect;
+ ctx.max_hits = max_hits;
+ ctx.num_hits = 0;
+ IntersectContext rtc_ctx(&ctx);
+ RTCRay rtc_ray;
+ kernel_embree_setup_ray(*ray, rtc_ray, visibility);
+ rtcOccluded1(kernel_data.bvh.scene, &rtc_ctx.context, &rtc_ray);
+ return rtc_ray.tfar == -INFINITY;
+ }
+# endif
# ifdef __OBJECT_MOTION__
if(kernel_data.bvh.have_motion) {
return bvh_intersect_volume_all_motion(kg, ray, isect, max_hits, visibility);
}
-# endif /* __OBJECT_MOTION__ */
+# endif /* __OBJECT_MOTION__ */
# ifdef __INSTANCING__
if(kernel_data.bvh.have_instancing)
return bvh_intersect_volume_all_instancing(kg, ray, isect, max_hits, visibility);
-# endif /* __INSTANCING__ */
+# endif /* __INSTANCING__ */
return bvh_intersect_volume_all(kg, ray, isect, max_hits, visibility);
}
#endif /* __VOLUME_RECORD_ALL__ */
diff --git a/intern/cycles/kernel/bvh/bvh_embree.h b/intern/cycles/kernel/bvh/bvh_embree.h
new file mode 100644
index 00000000000..34a099ebb4d
--- /dev/null
+++ b/intern/cycles/kernel/bvh/bvh_embree.h
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2018, 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.
+ */
+
+#include <embree3/rtcore_ray.h>
+#include <embree3/rtcore_scene.h>
+
+#include "kernel/kernel_compat_cpu.h"
+#include "kernel/split/kernel_split_data_types.h"
+#include "kernel/kernel_globals.h"
+#include "util/util_vector.h"
+
+CCL_NAMESPACE_BEGIN
+
+struct CCLIntersectContext {
+ typedef enum {
+ RAY_REGULAR = 0,
+ RAY_SHADOW_ALL = 1,
+ RAY_SSS = 2,
+ RAY_VOLUME_ALL = 3,
+
+ } RayType;
+
+ KernelGlobals *kg;
+ RayType type;
+
+ /* for shadow rays */
+ Intersection *isect_s;
+ int max_hits;
+ int num_hits;
+
+ /* for SSS Rays: */
+ LocalIntersection *ss_isect;
+ int sss_object_id;
+ uint *lcg_state;
+
+ CCLIntersectContext(KernelGlobals *kg_, RayType type_)
+ {
+ kg = kg_;
+ type = type_;
+ max_hits = 1;
+ num_hits = 0;
+ isect_s = NULL;
+ ss_isect = NULL;
+ sss_object_id = -1;
+ lcg_state = NULL;
+ }
+};
+
+class IntersectContext
+{
+public:
+ IntersectContext(CCLIntersectContext* ctx)
+ {
+ rtcInitIntersectContext(&context);
+ userRayExt = ctx;
+ }
+ RTCIntersectContext context;
+ CCLIntersectContext* userRayExt;
+};
+
+ccl_device_inline void kernel_embree_setup_ray(const Ray& ray, RTCRay& rtc_ray, const uint visibility)
+{
+ rtc_ray.org_x = ray.P.x;
+ rtc_ray.org_y = ray.P.y;
+ rtc_ray.org_z = ray.P.z;
+ rtc_ray.dir_x = ray.D.x;
+ rtc_ray.dir_y = ray.D.y;
+ rtc_ray.dir_z = ray.D.z;
+ rtc_ray.tnear = 0.0f;
+ rtc_ray.tfar = ray.t;
+ rtc_ray.time = ray.time;
+ rtc_ray.mask = visibility;
+}
+
+ccl_device_inline void kernel_embree_setup_rayhit(const Ray& ray, RTCRayHit& rayhit, const uint visibility)
+{
+ kernel_embree_setup_ray(ray, rayhit.ray, visibility);
+ rayhit.hit.geomID = RTC_INVALID_GEOMETRY_ID;
+ rayhit.hit.primID = RTC_INVALID_GEOMETRY_ID;
+}
+
+ccl_device_inline void kernel_embree_convert_hit(KernelGlobals *kg, const RTCRay *ray, const RTCHit *hit, Intersection *isect)
+{
+ bool is_hair = hit->geomID & 1;
+ isect->u = is_hair ? hit->u : 1.0f - hit->v - hit->u;
+ isect->v = is_hair ? hit->v : hit->u;
+ isect->t = ray->tfar;
+ isect->Ng = make_float3(hit->Ng_x, hit->Ng_y, hit->Ng_z);
+ if(hit->instID[0] != RTC_INVALID_GEOMETRY_ID) {
+ RTCScene inst_scene = (RTCScene)rtcGetGeometryUserData(rtcGetGeometry(kernel_data.bvh.scene, hit->instID[0]));
+ isect->prim = hit->primID + (intptr_t)rtcGetGeometryUserData(rtcGetGeometry(inst_scene, hit->geomID)) + kernel_tex_fetch(__object_node, hit->instID[0]/2);
+ isect->object = hit->instID[0]/2;
+ }
+ else {
+ isect->prim = hit->primID + (intptr_t)rtcGetGeometryUserData(rtcGetGeometry(kernel_data.bvh.scene, hit->geomID));
+ isect->object = OBJECT_NONE;
+ }
+ isect->type = kernel_tex_fetch(__prim_type, isect->prim);
+}
+
+ccl_device_inline void kernel_embree_convert_local_hit(KernelGlobals *kg, const RTCRay *ray, const RTCHit *hit, Intersection *isect, int local_object_id)
+{
+ isect->u = 1.0f - hit->v - hit->u;
+ isect->v = hit->u;
+ isect->t = ray->tfar;
+ isect->Ng = make_float3(hit->Ng_x, hit->Ng_y, hit->Ng_z);
+ RTCScene inst_scene = (RTCScene)rtcGetGeometryUserData(rtcGetGeometry(kernel_data.bvh.scene, local_object_id * 2));
+ isect->prim = hit->primID + (intptr_t)rtcGetGeometryUserData(rtcGetGeometry(inst_scene, hit->geomID)) + kernel_tex_fetch(__object_node, local_object_id);
+ isect->object = local_object_id;
+ isect->type = kernel_tex_fetch(__prim_type, isect->prim);
+}
+
+CCL_NAMESPACE_END
diff --git a/intern/cycles/kernel/bvh/bvh_local.h b/intern/cycles/kernel/bvh/bvh_local.h
index 2b02f4527bb..8364bc3aa9a 100644
--- a/intern/cycles/kernel/bvh/bvh_local.h
+++ b/intern/cycles/kernel/bvh/bvh_local.h
@@ -136,7 +136,7 @@ bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg,
node_addr,
PATH_RAY_ALL_VISIBILITY,
dist);
-#else // __KERNEL_SSE2__
+#else // __KERNEL_SSE2__
traverse_mask = NODE_INTERSECT(kg,
P,
dir,
@@ -151,7 +151,7 @@ bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg,
node_addr,
PATH_RAY_ALL_VISIBILITY,
dist);
-#endif // __KERNEL_SSE2__
+#endif // __KERNEL_SSE2__
node_addr = __float_as_int(cnodes.z);
node_addr_child1 = __float_as_int(cnodes.w);
diff --git a/intern/cycles/kernel/bvh/bvh_shadow_all.h b/intern/cycles/kernel/bvh/bvh_shadow_all.h
index d525b29fd94..64eb2f3f659 100644
--- a/intern/cycles/kernel/bvh/bvh_shadow_all.h
+++ b/intern/cycles/kernel/bvh/bvh_shadow_all.h
@@ -124,7 +124,7 @@ bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg,
node_addr,
visibility,
dist);
-#else // __KERNEL_SSE2__
+#else // __KERNEL_SSE2__
traverse_mask = NODE_INTERSECT(kg,
P,
dir,
@@ -139,7 +139,7 @@ bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg,
node_addr,
visibility,
dist);
-#endif // __KERNEL_SSE2__
+#endif // __KERNEL_SSE2__
node_addr = __float_as_int(cnodes.z);
node_addr_child1 = __float_as_int(cnodes.w);
diff --git a/intern/cycles/kernel/bvh/bvh_traversal.h b/intern/cycles/kernel/bvh/bvh_traversal.h
index e95d2408201..af9f04db0ba 100644
--- a/intern/cycles/kernel/bvh/bvh_traversal.h
+++ b/intern/cycles/kernel/bvh/bvh_traversal.h
@@ -146,7 +146,7 @@ ccl_device_noinline bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg,
visibility,
dist);
}
-#else // __KERNEL_SSE2__
+#else // __KERNEL_SSE2__
# if BVH_FEATURE(BVH_HAIR_MINIMUM_WIDTH)
if(difl != 0.0f) {
traverse_mask = NODE_INTERSECT_ROBUST(kg,
@@ -184,7 +184,7 @@ ccl_device_noinline bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg,
visibility,
dist);
}
-#endif // __KERNEL_SSE2__
+#endif // __KERNEL_SSE2__
node_addr = __float_as_int(cnodes.z);
node_addr_child1 = __float_as_int(cnodes.w);
diff --git a/intern/cycles/kernel/bvh/bvh_volume.h b/intern/cycles/kernel/bvh/bvh_volume.h
index 7d03855cb8f..12d4c5eb94a 100644
--- a/intern/cycles/kernel/bvh/bvh_volume.h
+++ b/intern/cycles/kernel/bvh/bvh_volume.h
@@ -120,7 +120,7 @@ bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg,
node_addr,
visibility,
dist);
-#else // __KERNEL_SSE2__
+#else // __KERNEL_SSE2__
traverse_mask = NODE_INTERSECT(kg,
P,
dir,
@@ -135,7 +135,7 @@ bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg,
node_addr,
visibility,
dist);
-#endif // __KERNEL_SSE2__
+#endif // __KERNEL_SSE2__
node_addr = __float_as_int(cnodes.z);
node_addr_child1 = __float_as_int(cnodes.w);
diff --git a/intern/cycles/kernel/bvh/bvh_volume_all.h b/intern/cycles/kernel/bvh/bvh_volume_all.h
index 3d9b598914f..6205b9bcf7a 100644
--- a/intern/cycles/kernel/bvh/bvh_volume_all.h
+++ b/intern/cycles/kernel/bvh/bvh_volume_all.h
@@ -124,7 +124,7 @@ uint BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg,
node_addr,
visibility,
dist);
-#else // __KERNEL_SSE2__
+#else // __KERNEL_SSE2__
traverse_mask = NODE_INTERSECT(kg,
P,
dir,
@@ -139,7 +139,7 @@ uint BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg,
node_addr,
visibility,
dist);
-#endif // __KERNEL_SSE2__
+#endif // __KERNEL_SSE2__
node_addr = __float_as_int(cnodes.z);
node_addr_child1 = __float_as_int(cnodes.w);
diff --git a/intern/cycles/kernel/bvh/obvh_local.h b/intern/cycles/kernel/bvh/obvh_local.h
index 92143193a6a..eb24a607caa 100644
--- a/intern/cycles/kernel/bvh/obvh_local.h
+++ b/intern/cycles/kernel/bvh/obvh_local.h
@@ -73,12 +73,6 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(OBVH)(KernelGlobals *kg,
object = local_object;
}
-#ifndef __KERNEL_SSE41__
- if(!isfinite(P.x)) {
- return false;
- }
-#endif
-
avxf tnear(0.0f), tfar(isect_t);
#if BVH_FEATURE(BVH_HAIR)
avx3f dir4(avxf(dir.x), avxf(dir.y), avxf(dir.z));
diff --git a/intern/cycles/kernel/bvh/obvh_shadow_all.h b/intern/cycles/kernel/bvh/obvh_shadow_all.h
index 3e877065127..8b739b3438a 100644
--- a/intern/cycles/kernel/bvh/obvh_shadow_all.h
+++ b/intern/cycles/kernel/bvh/obvh_shadow_all.h
@@ -66,12 +66,6 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(OBVH)(KernelGlobals *kg,
*num_hits = 0;
isect_array->t = tmax;
-#ifndef __KERNEL_SSE41__
- if(!isfinite(P.x)) {
- return false;
- }
-#endif
-
#if BVH_FEATURE(BVH_INSTANCING)
int num_hits_in_instance = 0;
#endif
@@ -103,7 +97,7 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(OBVH)(KernelGlobals *kg,
/* Traverse internal nodes. */
while(node_addr >= 0 && node_addr != ENTRYPOINT_SENTINEL) {
float4 inodes = kernel_tex_fetch(__bvh_nodes, node_addr+0);
- (void)inodes;
+ (void) inodes;
if(false
#ifdef __VISIBILITY_FLAG__
diff --git a/intern/cycles/kernel/bvh/obvh_traversal.h b/intern/cycles/kernel/bvh/obvh_traversal.h
index 2021d8e1143..6bb19eb1ed9 100644
--- a/intern/cycles/kernel/bvh/obvh_traversal.h
+++ b/intern/cycles/kernel/bvh/obvh_traversal.h
@@ -64,12 +64,6 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(OBVH)(KernelGlobals *kg,
Transform ob_itfm;
#endif
-#ifndef __KERNEL_SSE41__
- if(!isfinite(P.x)) {
- return false;
- }
-#endif
-
isect->t = ray->t;
isect->u = 0.0f;
isect->v = 0.0f;
@@ -103,7 +97,7 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(OBVH)(KernelGlobals *kg,
/* Traverse internal nodes. */
while(node_addr >= 0 && node_addr != ENTRYPOINT_SENTINEL) {
float4 inodes = kernel_tex_fetch(__bvh_nodes, node_addr+0);
- (void)inodes;
+ (void) inodes;
if(UNLIKELY(node_dist > isect->t)
#if BVH_FEATURE(BVH_MOTION)
@@ -179,7 +173,7 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(OBVH)(KernelGlobals *kg,
avxf cnodes;
/* TODO(sergey): Investigate whether moving cnodes upwards
* gives a speedup (will be different cache pattern but will
- * avoid extra check here),
+ * avoid extra check here).
*/
#if BVH_FEATURE(BVH_HAIR)
if(__float_as_uint(inodes.x) & PATH_RAY_NODE_UNALIGNED) {
diff --git a/intern/cycles/kernel/bvh/obvh_volume.h b/intern/cycles/kernel/bvh/obvh_volume.h
index da9ddbd4f24..80d09c59039 100644
--- a/intern/cycles/kernel/bvh/obvh_volume.h
+++ b/intern/cycles/kernel/bvh/obvh_volume.h
@@ -52,12 +52,6 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(OBVH)(KernelGlobals *kg,
Transform ob_itfm;
#endif
-#ifndef __KERNEL_SSE41__
- if(!isfinite(P.x)) {
- return false;
- }
-#endif
-
isect->t = ray->t;
isect->u = 0.0f;
isect->v = 0.0f;
diff --git a/intern/cycles/kernel/bvh/obvh_volume_all.h b/intern/cycles/kernel/bvh/obvh_volume_all.h
index a88573e6f86..87216127ddb 100644
--- a/intern/cycles/kernel/bvh/obvh_volume_all.h
+++ b/intern/cycles/kernel/bvh/obvh_volume_all.h
@@ -58,12 +58,6 @@ ccl_device uint BVH_FUNCTION_FULL_NAME(OBVH)(KernelGlobals *kg,
uint num_hits = 0;
isect_array->t = tmax;
-#ifndef __KERNEL_SSE41__
- if(!isfinite(P.x)) {
- return 0;
- }
-#endif
-
#if BVH_FEATURE(BVH_INSTANCING)
int num_hits_in_instance = 0;
#endif
diff --git a/intern/cycles/kernel/bvh/qbvh_local.h b/intern/cycles/kernel/bvh/qbvh_local.h
index ee3827de309..22d434a8737 100644
--- a/intern/cycles/kernel/bvh/qbvh_local.h
+++ b/intern/cycles/kernel/bvh/qbvh_local.h
@@ -82,12 +82,6 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg,
object = local_object;
}
-#ifndef __KERNEL_SSE41__
- if(!isfinite(P.x)) {
- return false;
- }
-#endif
-
ssef tnear(0.0f), tfar(isect_t);
#if BVH_FEATURE(BVH_HAIR)
sse3f dir4(ssef(dir.x), ssef(dir.y), ssef(dir.z));
diff --git a/intern/cycles/kernel/bvh/qbvh_shadow_all.h b/intern/cycles/kernel/bvh/qbvh_shadow_all.h
index 46fd178aed6..37606e10b92 100644
--- a/intern/cycles/kernel/bvh/qbvh_shadow_all.h
+++ b/intern/cycles/kernel/bvh/qbvh_shadow_all.h
@@ -66,11 +66,6 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg,
*num_hits = 0;
isect_array->t = tmax;
-#ifndef __KERNEL_SSE41__
- if(!isfinite(P.x)) {
- return false;
- }
-#endif
#if BVH_FEATURE(BVH_INSTANCING)
int num_hits_in_instance = 0;
@@ -103,7 +98,7 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg,
/* Traverse internal nodes. */
while(node_addr >= 0 && node_addr != ENTRYPOINT_SENTINEL) {
float4 inodes = kernel_tex_fetch(__bvh_nodes, node_addr+0);
- (void)inodes;
+ (void) inodes;
if(false
#ifdef __VISIBILITY_FLAG__
diff --git a/intern/cycles/kernel/bvh/qbvh_traversal.h b/intern/cycles/kernel/bvh/qbvh_traversal.h
index 335a4afd47a..35c6e3aeec9 100644
--- a/intern/cycles/kernel/bvh/qbvh_traversal.h
+++ b/intern/cycles/kernel/bvh/qbvh_traversal.h
@@ -71,12 +71,6 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg,
Transform ob_itfm;
#endif
-#ifndef __KERNEL_SSE41__
- if(!isfinite(P.x)) {
- return false;
- }
-#endif
-
isect->t = ray->t;
isect->u = 0.0f;
isect->v = 0.0f;
@@ -112,7 +106,7 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg,
/* Traverse internal nodes. */
while(node_addr >= 0 && node_addr != ENTRYPOINT_SENTINEL) {
float4 inodes = kernel_tex_fetch(__bvh_nodes, node_addr+0);
- (void)inodes;
+ (void) inodes;
if(UNLIKELY(node_dist > isect->t)
#if BVH_FEATURE(BVH_MOTION)
@@ -188,7 +182,7 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg,
float4 cnodes;
/* TODO(sergey): Investigate whether moving cnodes upwards
* gives a speedup (will be different cache pattern but will
- * avoid extra check here),
+ * avoid extra check here).
*/
#if BVH_FEATURE(BVH_HAIR)
if(__float_as_uint(inodes.x) & PATH_RAY_NODE_UNALIGNED) {
diff --git a/intern/cycles/kernel/bvh/qbvh_volume.h b/intern/cycles/kernel/bvh/qbvh_volume.h
index 192ce009524..7ec264e5f78 100644
--- a/intern/cycles/kernel/bvh/qbvh_volume.h
+++ b/intern/cycles/kernel/bvh/qbvh_volume.h
@@ -58,12 +58,6 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg,
Transform ob_itfm;
#endif
-#ifndef __KERNEL_SSE41__
- if(!isfinite(P.x)) {
- return false;
- }
-#endif
-
isect->t = ray->t;
isect->u = 0.0f;
isect->v = 0.0f;
diff --git a/intern/cycles/kernel/bvh/qbvh_volume_all.h b/intern/cycles/kernel/bvh/qbvh_volume_all.h
index 1e454e4d36b..dd603d79334 100644
--- a/intern/cycles/kernel/bvh/qbvh_volume_all.h
+++ b/intern/cycles/kernel/bvh/qbvh_volume_all.h
@@ -64,12 +64,6 @@ ccl_device uint BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg,
uint num_hits = 0;
isect_array->t = tmax;
-#ifndef __KERNEL_SSE41__
- if(!isfinite(P.x)) {
- return 0;
- }
-#endif
-
#if BVH_FEATURE(BVH_INSTANCING)
int num_hits_in_instance = 0;
#endif
diff --git a/intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h b/intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h
index ff238b7a834..4e7425bd800 100644
--- a/intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h
+++ b/intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h
@@ -232,4 +232,4 @@ ccl_device int bsdf_ashikhmin_shirley_sample(const ShaderClosure *sc, float3 Ng,
CCL_NAMESPACE_END
-#endif /* __BSDF_ASHIKHMIN_SHIRLEY_H__ */
+#endif /* __BSDF_ASHIKHMIN_SHIRLEY_H__ */
diff --git a/intern/cycles/kernel/closure/bsdf_ashikhmin_velvet.h b/intern/cycles/kernel/closure/bsdf_ashikhmin_velvet.h
index b0bdea723b9..80fd9ba2b37 100644
--- a/intern/cycles/kernel/closure/bsdf_ashikhmin_velvet.h
+++ b/intern/cycles/kernel/closure/bsdf_ashikhmin_velvet.h
@@ -158,4 +158,4 @@ ccl_device int bsdf_ashikhmin_velvet_sample(const ShaderClosure *sc, float3 Ng,
CCL_NAMESPACE_END
-#endif /* __BSDF_ASHIKHMIN_VELVET_H__ */
+#endif /* __BSDF_ASHIKHMIN_VELVET_H__ */
diff --git a/intern/cycles/kernel/closure/bsdf_diffuse.h b/intern/cycles/kernel/closure/bsdf_diffuse.h
index ee6d4cdf2df..946c460a70e 100644
--- a/intern/cycles/kernel/closure/bsdf_diffuse.h
+++ b/intern/cycles/kernel/closure/bsdf_diffuse.h
@@ -139,4 +139,4 @@ ccl_device int bsdf_translucent_sample(const ShaderClosure *sc, float3 Ng, float
CCL_NAMESPACE_END
-#endif /* __BSDF_DIFFUSE_H__ */
+#endif /* __BSDF_DIFFUSE_H__ */
diff --git a/intern/cycles/kernel/closure/bsdf_diffuse_ramp.h b/intern/cycles/kernel/closure/bsdf_diffuse_ramp.h
index 35bb2fdf0e8..ca33a5b275c 100644
--- a/intern/cycles/kernel/closure/bsdf_diffuse_ramp.h
+++ b/intern/cycles/kernel/closure/bsdf_diffuse_ramp.h
@@ -103,8 +103,8 @@ ccl_device int bsdf_diffuse_ramp_sample(const ShaderClosure *sc, float3 Ng, floa
return LABEL_REFLECT|LABEL_DIFFUSE;
}
-#endif /* __OSL__ */
+#endif /* __OSL__ */
CCL_NAMESPACE_END
-#endif /* __BSDF_DIFFUSE_RAMP_H__ */
+#endif /* __BSDF_DIFFUSE_RAMP_H__ */
diff --git a/intern/cycles/kernel/closure/bsdf_hair.h b/intern/cycles/kernel/closure/bsdf_hair.h
index 7b44a23f05b..e1a0cfaa3f5 100644
--- a/intern/cycles/kernel/closure/bsdf_hair.h
+++ b/intern/cycles/kernel/closure/bsdf_hair.h
@@ -277,4 +277,4 @@ ccl_device int bsdf_hair_transmission_sample(const ShaderClosure *sc, float3 Ng,
CCL_NAMESPACE_END
-#endif /* __BSDF_HAIR_H__ */
+#endif /* __BSDF_HAIR_H__ */
diff --git a/intern/cycles/kernel/closure/bsdf_hair_principled.h b/intern/cycles/kernel/closure/bsdf_hair_principled.h
index b3b56be39ff..68335ee887a 100644
--- a/intern/cycles/kernel/closure/bsdf_hair_principled.h
+++ b/intern/cycles/kernel/closure/bsdf_hair_principled.h
@@ -229,7 +229,7 @@ ccl_device int bsdf_principled_hair_setup(ShaderData *sd, PrincipledHairBSDF *bs
return SD_BSDF|SD_BSDF_HAS_EVAL|SD_BSDF_NEEDS_LCG;
}
-#endif /* __HAIR__ */
+#endif /* __HAIR__ */
/* Given the Fresnel term and transmittance, generate the attenuation terms for each bounce. */
ccl_device_inline void hair_attenuation(KernelGlobals *kg,
@@ -296,7 +296,7 @@ ccl_device float3 bsdf_principled_hair_eval(KernelGlobals *kg,
float3 Y = float4_to_float3(bsdf->extra->geom);
float3 X = safe_normalize(sd->dPdu);
- kernel_assert(fabsf(dot(X, Y)) < 1e-4f);
+ kernel_assert(fabsf(dot(X, Y)) < 1e-3f);
float3 Z = safe_normalize(cross(X, Y));
float3 wo = make_float3(dot(sd->I, X), dot(sd->I, Y), dot(sd->I, Z));
@@ -378,7 +378,7 @@ ccl_device int bsdf_principled_hair_sample(KernelGlobals *kg,
float3 Y = float4_to_float3(bsdf->extra->geom);
float3 X = safe_normalize(sd->dPdu);
- kernel_assert(fabsf(dot(X, Y)) < 1e-4f);
+ kernel_assert(fabsf(dot(X, Y)) < 1e-3f);
float3 Z = safe_normalize(cross(X, Y));
float3 wo = make_float3(dot(sd->I, X), dot(sd->I, Y), dot(sd->I, Z));
@@ -499,4 +499,4 @@ ccl_device void bsdf_principled_hair_blur(ShaderClosure *sc, float roughness)
CCL_NAMESPACE_END
-#endif /* __BSDF_HAIR_PRINCIPLED_H__ */
+#endif /* __BSDF_HAIR_PRINCIPLED_H__ */
diff --git a/intern/cycles/kernel/closure/bsdf_microfacet.h b/intern/cycles/kernel/closure/bsdf_microfacet.h
index e74d5ebaa42..32b6e50b09a 100644
--- a/intern/cycles/kernel/closure/bsdf_microfacet.h
+++ b/intern/cycles/kernel/closure/bsdf_microfacet.h
@@ -1124,4 +1124,4 @@ ccl_device int bsdf_microfacet_beckmann_sample(KernelGlobals *kg, const ShaderCl
CCL_NAMESPACE_END
-#endif /* __BSDF_MICROFACET_H__ */
+#endif /* __BSDF_MICROFACET_H__ */
diff --git a/intern/cycles/kernel/closure/bsdf_microfacet_multi_impl.h b/intern/cycles/kernel/closure/bsdf_microfacet_multi_impl.h
index e73915dbda7..5d300ef6db5 100644
--- a/intern/cycles/kernel/closure/bsdf_microfacet_multi_impl.h
+++ b/intern/cycles/kernel/closure/bsdf_microfacet_multi_impl.h
@@ -76,7 +76,7 @@ ccl_device_forceinline float3 MF_FUNCTION_FULL_NAME(mf_eval)(
eval *= -lambda_r / (shadowing_lambda - lambda_r);
else
eval *= -lambda_r * beta(-lambda_r, shadowing_lambda+1.0f);
-#else /* MF_MULTI_GLOSSY */
+#else /* MF_MULTI_GLOSSY */
const float G2 = 1.0f / (1.0f - (lambda_r + 1.0f) + shadowing_lambda);
float val = G2 * 0.25f / wi.z;
if(alpha.x == alpha.y)
@@ -129,7 +129,7 @@ ccl_device_forceinline float3 MF_FUNCTION_FULL_NAME(mf_eval)(
phase = mf_eval_phase_glass(wr, lambda_r, wo, wo_outside, alpha, eta);
else
phase = mf_eval_phase_glass(wr, lambda_r, -wo, !wo_outside, alpha, 1.0f/eta);
-#else /* MF_MULTI_GLOSSY */
+#else /* MF_MULTI_GLOSSY */
phase = mf_eval_phase_glossy(wr, lambda_r, wo, alpha) * throughput;
#endif
eval += throughput * phase * mf_G1(wo_outside? wo: -wo, mf_C1((outside == wo_outside)? hr: -hr), shadowing_lambda);
@@ -153,7 +153,7 @@ ccl_device_forceinline float3 MF_FUNCTION_FULL_NAME(mf_eval)(
else if(use_fresnel && order > 0) {
throughput *= interpolate_fresnel_color(wi_prev, wm, eta, F0, cspec0);
}
-#else /* MF_MULTI_GLOSSY */
+#else /* MF_MULTI_GLOSSY */
if(use_fresnel && order > 0) {
throughput *= interpolate_fresnel_color(-wr, wm, eta, F0, cspec0);
}
@@ -248,7 +248,7 @@ ccl_device_forceinline float3 MF_FUNCTION_FULL_NAME(mf_sample)(
throughput *= t_color;
}
}
-#else /* MF_MULTI_GLOSSY */
+#else /* MF_MULTI_GLOSSY */
if(use_fresnel) {
float3 t_color = interpolate_fresnel_color(-wr, wm, eta, F0, cspec0);
diff --git a/intern/cycles/kernel/closure/bsdf_oren_nayar.h b/intern/cycles/kernel/closure/bsdf_oren_nayar.h
index 6b770fc0c16..3446d1609d9 100644
--- a/intern/cycles/kernel/closure/bsdf_oren_nayar.h
+++ b/intern/cycles/kernel/closure/bsdf_oren_nayar.h
@@ -108,4 +108,4 @@ ccl_device int bsdf_oren_nayar_sample(const ShaderClosure *sc, float3 Ng, float3
CCL_NAMESPACE_END
-#endif /* __BSDF_OREN_NAYAR_H__ */
+#endif /* __BSDF_OREN_NAYAR_H__ */
diff --git a/intern/cycles/kernel/closure/bsdf_phong_ramp.h b/intern/cycles/kernel/closure/bsdf_phong_ramp.h
index 91c7803346d..83da05ac435 100644
--- a/intern/cycles/kernel/closure/bsdf_phong_ramp.h
+++ b/intern/cycles/kernel/closure/bsdf_phong_ramp.h
@@ -135,8 +135,8 @@ ccl_device int bsdf_phong_ramp_sample(const ShaderClosure *sc, float3 Ng, float3
return LABEL_REFLECT|LABEL_GLOSSY;
}
-#endif /* __OSL__ */
+#endif /* __OSL__ */
CCL_NAMESPACE_END
-#endif /* __BSDF_PHONG_RAMP_H__ */
+#endif /* __BSDF_PHONG_RAMP_H__ */
diff --git a/intern/cycles/kernel/closure/bsdf_principled_diffuse.h b/intern/cycles/kernel/closure/bsdf_principled_diffuse.h
index 83be2b35a00..2f65fd54be2 100644
--- a/intern/cycles/kernel/closure/bsdf_principled_diffuse.h
+++ b/intern/cycles/kernel/closure/bsdf_principled_diffuse.h
@@ -122,4 +122,4 @@ ccl_device int bsdf_principled_diffuse_sample(const ShaderClosure *sc,
CCL_NAMESPACE_END
-#endif /* __BSDF_PRINCIPLED_DIFFUSE_H__ */
+#endif /* __BSDF_PRINCIPLED_DIFFUSE_H__ */
diff --git a/intern/cycles/kernel/closure/bsdf_principled_sheen.h b/intern/cycles/kernel/closure/bsdf_principled_sheen.h
index 8b7c4399516..ccdcb1babd2 100644
--- a/intern/cycles/kernel/closure/bsdf_principled_sheen.h
+++ b/intern/cycles/kernel/closure/bsdf_principled_sheen.h
@@ -108,4 +108,4 @@ ccl_device int bsdf_principled_sheen_sample(const ShaderClosure *sc,
CCL_NAMESPACE_END
-#endif /* __BSDF_PRINCIPLED_SHEEN_H__ */
+#endif /* __BSDF_PRINCIPLED_SHEEN_H__ */
diff --git a/intern/cycles/kernel/closure/bsdf_reflection.h b/intern/cycles/kernel/closure/bsdf_reflection.h
index b33b6e3597b..94f1c283af7 100644
--- a/intern/cycles/kernel/closure/bsdf_reflection.h
+++ b/intern/cycles/kernel/closure/bsdf_reflection.h
@@ -77,4 +77,4 @@ ccl_device int bsdf_reflection_sample(const ShaderClosure *sc, float3 Ng, float3
CCL_NAMESPACE_END
-#endif /* __BSDF_REFLECTION_H__ */
+#endif /* __BSDF_REFLECTION_H__ */
diff --git a/intern/cycles/kernel/closure/bsdf_refraction.h b/intern/cycles/kernel/closure/bsdf_refraction.h
index b181650e928..abdd01c7a1d 100644
--- a/intern/cycles/kernel/closure/bsdf_refraction.h
+++ b/intern/cycles/kernel/closure/bsdf_refraction.h
@@ -86,4 +86,4 @@ ccl_device int bsdf_refraction_sample(const ShaderClosure *sc, float3 Ng, float3
CCL_NAMESPACE_END
-#endif /* __BSDF_REFRACTION_H__ */
+#endif /* __BSDF_REFRACTION_H__ */
diff --git a/intern/cycles/kernel/closure/bsdf_toon.h b/intern/cycles/kernel/closure/bsdf_toon.h
index 6d8074b7130..097a56f22eb 100644
--- a/intern/cycles/kernel/closure/bsdf_toon.h
+++ b/intern/cycles/kernel/closure/bsdf_toon.h
@@ -215,4 +215,4 @@ ccl_device int bsdf_glossy_toon_sample(const ShaderClosure *sc, float3 Ng, float
CCL_NAMESPACE_END
-#endif /* __BSDF_TOON_H__ */
+#endif /* __BSDF_TOON_H__ */
diff --git a/intern/cycles/kernel/closure/bsdf_transparent.h b/intern/cycles/kernel/closure/bsdf_transparent.h
index f788dbcd0ff..060dff69f52 100644
--- a/intern/cycles/kernel/closure/bsdf_transparent.h
+++ b/intern/cycles/kernel/closure/bsdf_transparent.h
@@ -106,4 +106,4 @@ ccl_device int bsdf_transparent_sample(const ShaderClosure *sc, float3 Ng, float
CCL_NAMESPACE_END
-#endif /* __BSDF_TRANSPARENT_H__ */
+#endif /* __BSDF_TRANSPARENT_H__ */
diff --git a/intern/cycles/kernel/closure/bsdf_util.h b/intern/cycles/kernel/closure/bsdf_util.h
index b080e025d16..4f3453675c7 100644
--- a/intern/cycles/kernel/closure/bsdf_util.h
+++ b/intern/cycles/kernel/closure/bsdf_util.h
@@ -158,4 +158,4 @@ ccl_device_forceinline float3 interpolate_fresnel_color(float3 L, float3 H, floa
CCL_NAMESPACE_END
-#endif /* __BSDF_UTIL_H__ */
+#endif /* __BSDF_UTIL_H__ */
diff --git a/intern/cycles/kernel/closure/bssrdf.h b/intern/cycles/kernel/closure/bssrdf.h
index ba0c6ae8c61..98c7f23c288 100644
--- a/intern/cycles/kernel/closure/bssrdf.h
+++ b/intern/cycles/kernel/closure/bssrdf.h
@@ -499,4 +499,4 @@ ccl_device_forceinline float bssrdf_pdf(const ShaderClosure *sc, float r)
CCL_NAMESPACE_END
-#endif /* __KERNEL_BSSRDF_H__ */
+#endif /* __KERNEL_BSSRDF_H__ */
diff --git a/intern/cycles/kernel/filter/filter.h b/intern/cycles/kernel/filter/filter.h
index f6e474d6702..4209d69ee73 100644
--- a/intern/cycles/kernel/filter/filter.h
+++ b/intern/cycles/kernel/filter/filter.h
@@ -49,4 +49,4 @@ CCL_NAMESPACE_BEGIN
CCL_NAMESPACE_END
-#endif /* __FILTER_H__ */
+#endif /* __FILTER_H__ */
diff --git a/intern/cycles/kernel/filter/filter_defines.h b/intern/cycles/kernel/filter/filter_defines.h
index 1a2f22a6987..67f4e62ac0f 100644
--- a/intern/cycles/kernel/filter/filter_defines.h
+++ b/intern/cycles/kernel/filter/filter_defines.h
@@ -68,4 +68,4 @@ typedef struct TileInfo {
# define ccl_get_tile_buffer(id) (tile_info->buffers[id])
#endif
-#endif /* __FILTER_DEFINES_H__*/
+#endif /* __FILTER_DEFINES_H__*/
diff --git a/intern/cycles/kernel/filter/filter_nlm_cpu.h b/intern/cycles/kernel/filter/filter_nlm_cpu.h
index e2da0fd872b..af73c0dadf2 100644
--- a/intern/cycles/kernel/filter/filter_nlm_cpu.h
+++ b/intern/cycles/kernel/filter/filter_nlm_cpu.h
@@ -16,6 +16,9 @@
CCL_NAMESPACE_BEGIN
+#define load4_a(buf, ofs) (*((float4*) ((buf) + (ofs))))
+#define load4_u(buf, ofs) load_float4((buf)+(ofs))
+
ccl_device_inline void kernel_filter_nlm_calc_difference(int dx, int dy,
const float *ccl_restrict weight_image,
const float *ccl_restrict variance_image,
@@ -26,20 +29,28 @@ ccl_device_inline void kernel_filter_nlm_calc_difference(int dx, int dy,
float a,
float k_2)
{
+ /* Strides need to be aligned to 16 bytes. */
+ kernel_assert((stride % 4) == 0 && (channel_offset % 4) == 0);
+
+ int aligned_lowx = rect.x & (~3);
+ const int numChannels = (channel_offset > 0)? 3 : 1;
+ const float4 channel_fac = make_float4(1.0f / numChannels);
+
for(int y = rect.y; y < rect.w; y++) {
- for(int x = rect.x; x < rect.z; x++) {
- float diff = 0.0f;
- int numChannels = channel_offset? 3 : 1;
- for(int c = 0; c < numChannels; c++) {
- float cdiff = weight_image[c*channel_offset + y*stride + x] - weight_image[c*channel_offset + (y+dy)*stride + (x+dx)];
- float pvar = variance_image[c*channel_offset + y*stride + x];
- float qvar = variance_image[c*channel_offset + (y+dy)*stride + (x+dx)];
- diff += (cdiff*cdiff - a*(pvar + min(pvar, qvar))) / (1e-8f + k_2*(pvar+qvar));
- }
- if(numChannels > 1) {
- diff *= 1.0f/numChannels;
+ int idx_p = y*stride + aligned_lowx;
+ int idx_q = (y+dy)*stride + aligned_lowx + dx;
+ for(int x = aligned_lowx; x < rect.z; x += 4, idx_p += 4, idx_q += 4) {
+ float4 diff = make_float4(0.0f);
+ for(int c = 0, chan_ofs = 0; c < numChannels; c++, chan_ofs += channel_offset) {
+ /* idx_p is guaranteed to be aligned, but idx_q isn't. */
+ float4 color_p = load4_a(weight_image, idx_p + chan_ofs);
+ float4 color_q = load4_u(weight_image, idx_q + chan_ofs);
+ float4 cdiff = color_p - color_q;
+ float4 var_p = load4_a(variance_image, idx_p + chan_ofs);
+ float4 var_q = load4_u(variance_image, idx_q + chan_ofs);
+ diff += (cdiff*cdiff - a*(var_p + min(var_p, var_q))) / (make_float4(1e-8f) + k_2*(var_p+var_q));
}
- difference_image[y*stride + x] = diff;
+ load4_a(difference_image, idx_p) = diff*channel_fac;
}
}
}
@@ -50,52 +61,77 @@ ccl_device_inline void kernel_filter_nlm_blur(const float *ccl_restrict differen
int stride,
int f)
{
- int aligned_lowx = rect.x / 4;
- int aligned_highx = (rect.z + 3) / 4;
+ int aligned_lowx = round_down(rect.x, 4);
for(int y = rect.y; y < rect.w; y++) {
const int low = max(rect.y, y-f);
const int high = min(rect.w, y+f+1);
- for(int x = rect.x; x < rect.z; x++) {
- out_image[y*stride + x] = 0.0f;
+ for(int x = aligned_lowx; x < rect.z; x += 4) {
+ load4_a(out_image, y*stride + x) = make_float4(0.0f);
}
for(int y1 = low; y1 < high; y1++) {
- float4* out_image4 = (float4*)(out_image + y*stride);
- float4* difference_image4 = (float4*)(difference_image + y1*stride);
- for(int x = aligned_lowx; x < aligned_highx; x++) {
- out_image4[x] += difference_image4[x];
+ for(int x = aligned_lowx; x < rect.z; x += 4) {
+ load4_a(out_image, y*stride + x) += load4_a(difference_image, y1*stride + x);
}
}
- for(int x = rect.x; x < rect.z; x++) {
- out_image[y*stride + x] *= 1.0f/(high - low);
+ float fac = 1.0f/(high - low);
+ for(int x = aligned_lowx; x < rect.z; x += 4) {
+ load4_a(out_image, y*stride + x) *= fac;
}
}
}
-ccl_device_inline void kernel_filter_nlm_calc_weight(const float *ccl_restrict difference_image,
- float *out_image,
- int4 rect,
- int stride,
- int f)
+ccl_device_inline void nlm_blur_horizontal(const float *ccl_restrict difference_image,
+ float *out_image,
+ int4 rect,
+ int stride,
+ int f)
{
+ int aligned_lowx = round_down(rect.x, 4);
for(int y = rect.y; y < rect.w; y++) {
- for(int x = rect.x; x < rect.z; x++) {
- out_image[y*stride + x] = 0.0f;
+ for(int x = aligned_lowx; x < rect.z; x += 4) {
+ load4_a(out_image, y*stride + x) = make_float4(0.0f);
}
}
+
for(int dx = -f; dx <= f; dx++) {
- int pos_dx = max(0, dx);
- int neg_dx = min(0, dx);
+ aligned_lowx = round_down(rect.x - min(0, dx), 4);
+ int highx = rect.z - max(0, dx);
+ int4 lowx4 = make_int4(rect.x - min(0, dx));
+ int4 highx4 = make_int4(rect.z - max(0, dx));
for(int y = rect.y; y < rect.w; y++) {
- for(int x = rect.x-neg_dx; x < rect.z-pos_dx; x++) {
- out_image[y*stride + x] += difference_image[y*stride + x+dx];
+ for(int x = aligned_lowx; x < highx; x += 4) {
+ int4 x4 = make_int4(x) + make_int4(0, 1, 2, 3);
+ int4 active = (x4 >= lowx4) & (x4 < highx4);
+
+ float4 diff = load4_u(difference_image, y*stride + x + dx);
+ load4_a(out_image, y*stride + x) += mask(active, diff);
}
}
}
+
+ aligned_lowx = round_down(rect.x, 4);
for(int y = rect.y; y < rect.w; y++) {
- for(int x = rect.x; x < rect.z; x++) {
- const int low = max(rect.x, x-f);
- const int high = min(rect.z, x+f+1);
- out_image[y*stride + x] = fast_expf(-max(out_image[y*stride + x] * (1.0f/(high - low)), 0.0f));
+ for(int x = aligned_lowx; x < rect.z; x += 4) {
+ float4 x4 = make_float4(x) + make_float4(0.0f, 1.0f, 2.0f, 3.0f);
+ float4 low = max(make_float4(rect.x), x4 - make_float4(f));
+ float4 high = min(make_float4(rect.z), x4 + make_float4(f+1));
+ load4_a(out_image, y*stride + x) *= rcp(high - low);
+ }
+ }
+}
+
+ccl_device_inline void kernel_filter_nlm_calc_weight(const float *ccl_restrict difference_image,
+ float *out_image,
+ int4 rect,
+ int stride,
+ int f)
+{
+ nlm_blur_horizontal(difference_image, out_image, rect, stride, f);
+
+ int aligned_lowx = round_down(rect.x, 4);
+ for(int y = rect.y; y < rect.w; y++) {
+ for(int x = aligned_lowx; x < rect.z; x += 4) {
+ load4_a(out_image, y*stride + x) = fast_expf4(-max(load4_a(out_image, y*stride + x), make_float4(0.0f)));
}
}
}
@@ -103,23 +139,29 @@ ccl_device_inline void kernel_filter_nlm_calc_weight(const float *ccl_restrict d
ccl_device_inline void kernel_filter_nlm_update_output(int dx, int dy,
const float *ccl_restrict difference_image,
const float *ccl_restrict image,
+ float *temp_image,
float *out_image,
float *accum_image,
int4 rect,
int stride,
int f)
{
+ nlm_blur_horizontal(difference_image, temp_image, rect, stride, f);
+
+ int aligned_lowx = round_down(rect.x, 4);
for(int y = rect.y; y < rect.w; y++) {
- for(int x = rect.x; x < rect.z; x++) {
- const int low = max(rect.x, x-f);
- const int high = min(rect.z, x+f+1);
- float sum = 0.0f;
- for(int x1 = low; x1 < high; x1++) {
- sum += difference_image[y*stride + x1];
- }
- float weight = sum * (1.0f/(high - low));
- accum_image[y*stride + x] += weight;
- out_image[y*stride + x] += weight*image[(y+dy)*stride + (x+dx)];
+ for(int x = aligned_lowx; x < rect.z; x += 4) {
+ int4 x4 = make_int4(x) + make_int4(0, 1, 2, 3);
+ int4 active = (x4 >= make_int4(rect.x)) & (x4 < make_int4(rect.z));
+
+ int idx_p = y*stride + x, idx_q = (y+dy)*stride + (x+dx);
+
+ float4 weight = load4_a(temp_image, idx_p);
+ load4_a(accum_image, idx_p) += mask(active, weight);
+
+ float4 val = load4_u(image, idx_q);
+
+ load4_a(out_image, idx_p) += mask(active, weight*val);
}
}
}
@@ -177,4 +219,7 @@ ccl_device_inline void kernel_filter_nlm_normalize(float *out_image,
}
}
+#undef load4_a
+#undef load4_u
+
CCL_NAMESPACE_END
diff --git a/intern/cycles/kernel/geom/geom_curve_intersect.h b/intern/cycles/kernel/geom/geom_curve_intersect.h
index 4cfbe21685c..b6b58b52a29 100644
--- a/intern/cycles/kernel/geom/geom_curve_intersect.h
+++ b/intern/cycles/kernel/geom/geom_curve_intersect.h
@@ -379,7 +379,7 @@ ccl_device_forceinline bool cardinal_curve_intersect(
float inv_mw_extension = 1.0f/mw_extension;
if(d0 >= 0)
coverage = (min(d1 * inv_mw_extension, 1.0f) - min(d0 * inv_mw_extension, 1.0f)) * 0.5f;
- else // inside
+ else // inside
coverage = (min(d1 * inv_mw_extension, 1.0f) + min(-d0 * inv_mw_extension, 1.0f)) * 0.5f;
}
@@ -817,16 +817,24 @@ ccl_device_inline float3 curve_refine(KernelGlobals *kg,
sd->Ng = normalize(-(D - tg * (dot(tg, D))));
}
else {
- /* direction from inside to surface of curve */
- float3 p_curr = curvepoint(isect->u, p[0], p[1], p[2], p[3]);
- sd->Ng = normalize(P - p_curr);
+#ifdef __EMBREE__
+ if(kernel_data.bvh.scene) {
+ sd->Ng = normalize(isect->Ng);
+ }
+ else
+#endif
+ {
+ /* direction from inside to surface of curve */
+ float3 p_curr = curvepoint(isect->u, p[0], p[1], p[2], p[3]);
+ sd->Ng = normalize(P - p_curr);
- /* adjustment for changing radius */
- float gd = isect->v;
+ /* adjustment for changing radius */
+ float gd = isect->v;
- if(gd != 0.0f) {
- sd->Ng = sd->Ng - gd * tg;
- sd->Ng = normalize(sd->Ng);
+ if(gd != 0.0f) {
+ sd->Ng = sd->Ng - gd * tg;
+ sd->Ng = normalize(sd->Ng);
+ }
}
}
diff --git a/intern/cycles/kernel/geom/geom_object.h b/intern/cycles/kernel/geom/geom_object.h
index cfe17e63627..669c932d720 100644
--- a/intern/cycles/kernel/geom/geom_object.h
+++ b/intern/cycles/kernel/geom/geom_object.h
@@ -78,6 +78,12 @@ ccl_device_inline Transform object_fetch_transform_motion(KernelGlobals *kg, int
const uint num_steps = kernel_tex_fetch(__objects, object).numsteps * 2 + 1;
Transform tfm;
+#ifdef __EMBREE__
+ if(kernel_data.bvh.scene) {
+ transform_motion_array_interpolate_straight(&tfm, motion, num_steps, time);
+ }
+ else
+#endif
transform_motion_array_interpolate(&tfm, motion, num_steps, time);
return tfm;
@@ -304,6 +310,24 @@ ccl_device int shader_pass_id(KernelGlobals *kg, const ShaderData *sd)
return kernel_tex_fetch(__shaders, (sd->shader & SHADER_MASK)).pass_id;
}
+/* Cryptomatte ID */
+
+ccl_device_inline float object_cryptomatte_id(KernelGlobals *kg, int object)
+{
+ if(object == OBJECT_NONE)
+ return 0.0f;
+
+ return kernel_tex_fetch(__objects, object).cryptomatte_object;
+}
+
+ccl_device_inline float object_cryptomatte_asset_id(KernelGlobals *kg, int object)
+{
+ if(object == OBJECT_NONE)
+ return 0;
+
+ return kernel_tex_fetch(__objects, object).cryptomatte_asset;
+}
+
/* Particle data from which object was instanced */
ccl_device_inline uint particle_index(KernelGlobals *kg, int particle)
diff --git a/intern/cycles/kernel/geom/geom_subd_triangle.h b/intern/cycles/kernel/geom/geom_subd_triangle.h
index 00ce89ae567..8c0d0a9770e 100644
--- a/intern/cycles/kernel/geom/geom_subd_triangle.h
+++ b/intern/cycles/kernel/geom/geom_subd_triangle.h
@@ -146,7 +146,7 @@ ccl_device_noinline float subd_triangle_attribute_float(KernelGlobals *kg, const
return a;
}
else
-#endif /* __PATCH_EVAL__ */
+#endif /* __PATCH_EVAL__ */
if(desc.element == ATTR_ELEMENT_FACE) {
if(dx) *dx = 0.0f;
if(dy) *dy = 0.0f;
@@ -271,7 +271,7 @@ ccl_device_noinline float3 subd_triangle_attribute_float3(KernelGlobals *kg, con
return a;
}
else
-#endif /* __PATCH_EVAL__ */
+#endif /* __PATCH_EVAL__ */
if(desc.element == ATTR_ELEMENT_FACE) {
if(dx) *dx = make_float3(0.0f, 0.0f, 0.0f);
if(dy) *dy = make_float3(0.0f, 0.0f, 0.0f);
diff --git a/intern/cycles/kernel/geom/geom_triangle_intersect.h b/intern/cycles/kernel/geom/geom_triangle_intersect.h
index aa6b102a0f3..57f4c86d403 100644
--- a/intern/cycles/kernel/geom/geom_triangle_intersect.h
+++ b/intern/cycles/kernel/geom/geom_triangle_intersect.h
@@ -71,28 +71,23 @@ ccl_device_inline bool triangle_intersect(KernelGlobals *kg,
}
#ifdef __KERNEL_AVX2__
-
#define cross256(A,B, C,D) _mm256_fmsub_ps(A,B, _mm256_mul_ps(C,D))
-#if defined(__KERNEL_CUDA__) && __CUDA_ARCH__ < 300
-ccl_device_inline
-#else
-ccl_device_forceinline
-#endif
-int ray_triangle_intersect8(KernelGlobals *kg,
- float3 ray_P,
- float3 ray_dir,
- Intersection **isect,
- uint visibility,
- int object,
- __m256 *triA,
- __m256 *triB,
- __m256 *triC,
- int prim_addr,
- int prim_num,
- uint *num_hits,
- uint max_hits,
- int *num_hits_in_instance,
- float isec_t)
+ccl_device_inline int ray_triangle_intersect8(
+ KernelGlobals *kg,
+ float3 ray_P,
+ float3 ray_dir,
+ Intersection **isect,
+ uint visibility,
+ int object,
+ __m256 *triA,
+ __m256 *triB,
+ __m256 *triC,
+ int prim_addr,
+ int prim_num,
+ uint *num_hits,
+ uint max_hits,
+ int *num_hits_in_instance,
+ float isect_t)
{
const unsigned char prim_num_mask = (1 << prim_num) - 1;
@@ -108,10 +103,6 @@ int ray_triangle_intersect8(KernelGlobals *kg,
const __m256 dirz256 = _mm256_set1_ps(ray_dir.z);
/* Calculate vertices relative to ray origin. */
- /* const float3 v0 = tri_c - P;
- const float3 v1 = tri_a - P;
- const float3 v2 = tri_b - P; */
-
__m256 v0_x_256 = _mm256_sub_ps(triC[0], Px256);
__m256 v0_y_256 = _mm256_sub_ps(triC[1], Py256);
__m256 v0_z_256 = _mm256_sub_ps(triC[2], Pz256);
@@ -136,11 +127,7 @@ int ray_triangle_intersect8(KernelGlobals *kg,
__m256 v1_v2_y_256 = _mm256_add_ps(v1_y_256, v2_y_256);
__m256 v1_v2_z_256 = _mm256_add_ps(v1_z_256, v2_z_256);
- /* Calculate triangle edges.
- const float3 e0 = v2 - v0;
- const float3 e1 = v0 - v1;
- const float3 e2 = v1 - v2;*/
-
+ /* Calculate triangle edges. */
__m256 e0_x_256 = _mm256_sub_ps(v2_x_256, v0_x_256);
__m256 e0_y_256 = _mm256_sub_ps(v2_y_256, v0_y_256);
__m256 e0_z_256 = _mm256_sub_ps(v2_z_256, v0_z_256);
@@ -153,48 +140,32 @@ int ray_triangle_intersect8(KernelGlobals *kg,
__m256 e2_y_256 = _mm256_sub_ps(v1_y_256, v2_y_256);
__m256 e2_z_256 = _mm256_sub_ps(v1_z_256, v2_z_256);
- /* Perform edge tests.
- const float U = dot(cross(v2 + v0, e0), ray_dir);
- const float V = dot(cross(v0 + v1, e1), ray_dir);
- const float W = dot(cross(v1 + v2, e2), ray_dir);*/
-
- //cross (AyBz - AzBy, AzBx -AxBz, AxBy - AyBx)
+ /* Perform edge tests. */
+ /* cross (AyBz - AzBy, AzBx -AxBz, AxBy - AyBx) */
__m256 U_x_256 = cross256(v0_v2_y_256, e0_z_256, v0_v2_z_256, e0_y_256);
__m256 U_y_256 = cross256(v0_v2_z_256, e0_x_256, v0_v2_x_256, e0_z_256);
__m256 U_z_256 = cross256(v0_v2_x_256, e0_y_256, v0_v2_y_256, e0_x_256);
- //vertical dot
+ /* vertical dot */
__m256 U_256 = _mm256_mul_ps(U_x_256, dirx256);
- U_256 = _mm256_fmadd_ps(U_y_256, diry256, U_256); //_mm256_add_ps(U_256, _mm256_mul_ps(U_y_256, diry256));
- U_256 = _mm256_fmadd_ps(U_z_256, dirz256, U_256); //_mm256_add_ps(U_256, _mm256_mul_ps(U_z_256, dirz256));
+ U_256 = _mm256_fmadd_ps(U_y_256, diry256, U_256);
+ U_256 = _mm256_fmadd_ps(U_z_256, dirz256, U_256);
__m256 V_x_256 = cross256(v0_v1_y_256, e1_z_256, v0_v1_z_256, e1_y_256);
__m256 V_y_256 = cross256(v0_v1_z_256, e1_x_256, v0_v1_x_256, e1_z_256);
__m256 V_z_256 = cross256(v0_v1_x_256, e1_y_256, v0_v1_y_256, e1_x_256);
- //vertical dot
+ /* vertical dot */
__m256 V_256 = _mm256_mul_ps(V_x_256, dirx256);
- V_256 = _mm256_fmadd_ps(V_y_256, diry256, V_256);// _mm256_add_ps(V_256, _mm256_mul_ps(V_y_256, diry256));
- V_256 = _mm256_fmadd_ps(V_z_256, dirz256, V_256);// _mm256_add_ps(V_256, _mm256_mul_ps(V_z_256, dirz256));
+ V_256 = _mm256_fmadd_ps(V_y_256, diry256, V_256);
+ V_256 = _mm256_fmadd_ps(V_z_256, dirz256, V_256);
__m256 W_x_256 = cross256(v1_v2_y_256, e2_z_256, v1_v2_z_256, e2_y_256);
__m256 W_y_256 = cross256(v1_v2_z_256, e2_x_256, v1_v2_x_256, e2_z_256);
__m256 W_z_256 = cross256(v1_v2_x_256, e2_y_256, v1_v2_y_256, e2_x_256);
- //vertical dot
+ /* vertical dot */
__m256 W_256 = _mm256_mul_ps(W_x_256, dirx256);
- W_256 = _mm256_fmadd_ps(W_y_256, diry256,W_256);//_mm256_add_ps(W_256, _mm256_mul_ps(W_y_256, diry256));
- W_256 = _mm256_fmadd_ps(W_z_256, dirz256,W_256);//_mm256_add_ps(W_256, _mm256_mul_ps(W_z_256, dirz256));
-
- //const float minUVW = min(U, min(V, W));
- //const float maxUVW = max(U, max(V, W));
-#if 0
- __m256 minUVW_256 = _mm256_min_ps(U_256, _mm256_min_ps(V_256, W_256));
- __m256 maxUVW_256 = _mm256_max_ps(U_256, _mm256_max_ps(V_256, W_256));
-
- //if(minUVW < 0.0f && maxUVW > 0.0f)
- __m256i mask_minmaxUVW_256 = _mm256_and_si256(
- _mm256_cmpgt_epi32(zero256, _mm256_castps_si256(minUVW_256)),
- //_mm256_castps_si256(minUVW_256),
- _mm256_cmpgt_epi32(_mm256_castps_si256(maxUVW_256), zero256));
-#else
+ W_256 = _mm256_fmadd_ps(W_y_256, diry256,W_256);
+ W_256 = _mm256_fmadd_ps(W_z_256, dirz256,W_256);
+
__m256i U_256_1 = _mm256_srli_epi32(_mm256_castps_si256(U_256), 31);
__m256i V_256_1 = _mm256_srli_epi32(_mm256_castps_si256(V_256), 31);
__m256i W_256_1 = _mm256_srli_epi32(_mm256_castps_si256(W_256), 31);
@@ -204,9 +175,8 @@ int ray_triangle_intersect8(KernelGlobals *kg,
const __m256i two256 = _mm256_set1_epi32(2);
__m256i mask_minmaxUVW_256 = _mm256_or_si256(
- _mm256_cmpeq_epi32(one256, UVW_256_1),
- _mm256_cmpeq_epi32(two256, UVW_256_1) );
-#endif
+ _mm256_cmpeq_epi32(one256, UVW_256_1),
+ _mm256_cmpeq_epi32(two256, UVW_256_1));
unsigned char mask_minmaxUVW_pos = _mm256_movemask_ps(_mm256_castsi256_ps(mask_minmaxUVW_256));
if((mask_minmaxUVW_pos & prim_num_mask) == prim_num_mask) { //all bits set
@@ -214,231 +184,187 @@ int ray_triangle_intersect8(KernelGlobals *kg,
}
/* Calculate geometry normal and denominator. */
- // const float3 Ng1 = cross(e1, e0);
- //const Vec3vfM Ng1 = stable_triangle_normal(e2,e1,e0);
-
__m256 Ng1_x_256 = cross256(e1_y_256, e0_z_256, e1_z_256, e0_y_256);
__m256 Ng1_y_256 = cross256(e1_z_256, e0_x_256, e1_x_256, e0_z_256);
__m256 Ng1_z_256 = cross256(e1_x_256, e0_y_256, e1_y_256, e0_x_256);
- //const float3 Ng = Ng1 + Ng1;
Ng1_x_256 = _mm256_add_ps(Ng1_x_256, Ng1_x_256);
Ng1_y_256 = _mm256_add_ps(Ng1_y_256, Ng1_y_256);
Ng1_z_256 = _mm256_add_ps(Ng1_z_256, Ng1_z_256);
- //const float den = dot3(Ng, dir);
- //vertical dot
+ /* vertical dot */
__m256 den_256 = _mm256_mul_ps(Ng1_x_256, dirx256);
- den_256 = _mm256_fmadd_ps(Ng1_y_256, diry256,den_256);//_mm256_add_ps(den_256, _mm256_mul_ps(Ng1_y_256, diry256));
- den_256 = _mm256_fmadd_ps(Ng1_z_256, dirz256,den_256);//_mm256_add_ps(den_256, _mm256_mul_ps(Ng1_z_256, dirz256));
-
- // __m256i maskden256 = _mm256_cmpeq_epi32(_mm256_castps_si256(den_256), zero256);
+ den_256 = _mm256_fmadd_ps(Ng1_y_256, diry256,den_256);
+ den_256 = _mm256_fmadd_ps(Ng1_z_256, dirz256,den_256);
/* Perform depth test. */
- //const float T = dot3(v0, Ng);
__m256 T_256 = _mm256_mul_ps(Ng1_x_256, v0_x_256);
- T_256 = _mm256_fmadd_ps(Ng1_y_256, v0_y_256,T_256);//_mm256_add_ps(T_256, _mm256_mul_ps(Ng1_y_256, v0_y_256));
- T_256 = _mm256_fmadd_ps(Ng1_z_256, v0_z_256,T_256);//_mm256_add_ps(T_256, _mm256_mul_ps(Ng1_z_256, v0_z_256));
+ T_256 = _mm256_fmadd_ps(Ng1_y_256, v0_y_256,T_256);
+ T_256 = _mm256_fmadd_ps(Ng1_z_256, v0_z_256,T_256);
- //const int sign_den = (__float_as_int(den) & 0x80000000);
const __m256i c0x80000000 = _mm256_set1_epi32(0x80000000);
__m256i sign_den_256 = _mm256_and_si256(_mm256_castps_si256(den_256), c0x80000000);
- //const float sign_T = xor_signmask(T, sign_den);
__m256 sign_T_256 = _mm256_castsi256_ps(_mm256_xor_si256(_mm256_castps_si256(T_256), sign_den_256));
- /*if((sign_T < 0.0f) || mask_minmaxUVW_pos { return false;} */
unsigned char mask_sign_T = _mm256_movemask_ps(sign_T_256);
if(((mask_minmaxUVW_pos | mask_sign_T) & prim_num_mask) == prim_num_mask) {
return false;
- } /**/
+ }
__m256 xor_signmask_256 = _mm256_castsi256_ps(_mm256_xor_si256(_mm256_castps_si256(den_256), sign_den_256));
-
ccl_align(32) float den8[8], U8[8], V8[8], T8[8], sign_T8[8], xor_signmask8[8];
ccl_align(32) unsigned int mask_minmaxUVW8[8];
- if(visibility == PATH_RAY_SHADOW_OPAQUE){
- __m256i mask_final_256 = _mm256_cmpeq_epi32(mask_minmaxUVW_256, zero256);//~mask_minmaxUVW_256
-
- __m256i maskden256 = _mm256_cmpeq_epi32(_mm256_castps_si256(den_256), zero256);
-
- __m256i mask0 = _mm256_cmpgt_epi32(zero256, _mm256_castps_si256(sign_T_256));
- __m256 rayt_256 = _mm256_set1_ps((*isect)->t);
-
- __m256i mask1 = _mm256_cmpgt_epi32(_mm256_castps_si256(sign_T_256),
- _mm256_castps_si256(
- _mm256_mul_ps(_mm256_castsi256_ps(_mm256_xor_si256(_mm256_castps_si256(den_256), sign_den_256)), rayt_256)
- )
- );
- /* __m256i mask1 = _mm256_castps_si256(_mm256_cmp_ps(sign_T_256,
- _mm256_mul_ps(_mm256_castsi256_ps(_mm256_xor_si256(_mm256_castps_si256(den_256), sign_den_256)), rayt_256),
- _CMP_GT_OS
- ) );*/
-
- mask0 = _mm256_or_si256(mask1, mask0);
- //unsigned char mask = _mm256_movemask_ps(_mm256_castsi256_ps(mask0));
- //unsigned char maskden = _mm256_movemask_ps(_mm256_castsi256_ps(maskden256));
- //unsigned char mask_final = ((~mask) & (~maskden) & (~mask_minmaxUVW_pos));
- mask_final_256 = _mm256_andnot_si256(mask0, mask_final_256); //(~mask_minmaxUVW_pos) &(~mask)
- mask_final_256 = _mm256_andnot_si256(maskden256, mask_final_256); //(~mask_minmaxUVW_pos) &(~mask) & (~maskden)
-
- unsigned char mask_final = _mm256_movemask_ps(_mm256_castsi256_ps(mask_final_256));
- if((mask_final & prim_num_mask) == 0) { //all bits NOT set
- return false;
- } /**/
-
- unsigned long i = 0;
-#if defined(_MSC_VER)
- unsigned char res = _BitScanForward(&i, (unsigned long)mask_final);
-#else
- i = __builtin_ffs(mask_final)-1;
-#endif
-
- den_256 = _mm256_rcp_ps(den_256); //inv_den
- U_256 = _mm256_mul_ps(U_256, den_256); //*inv_den
- V_256 = _mm256_mul_ps(V_256, den_256); //*inv_den
- T_256 = _mm256_mul_ps(T_256, den_256); //*inv_den
-
- _mm256_store_ps(U8, U_256);
- _mm256_store_ps(V8, V_256);
- _mm256_store_ps(T8, T_256);
-
-
- //here we assume (kernel_tex_fetch(__prim_visibility, (prim_addr +i)) & visibility) is always true
-
- (*isect)->u = U8[i];
- (*isect)->v = V8[i];
- (*isect)->t = T8[i];
-
- (*isect)->prim = (prim_addr + i);
- (*isect)->object = object;
- (*isect)->type = PRIMITIVE_TRIANGLE;
-
- return true;
+ if(visibility == PATH_RAY_SHADOW_OPAQUE) {
+ __m256i mask_final_256 = _mm256_cmpeq_epi32(mask_minmaxUVW_256, zero256);
+ __m256i maskden256 = _mm256_cmpeq_epi32(_mm256_castps_si256(den_256), zero256);
+ __m256i mask0 = _mm256_cmpgt_epi32(zero256, _mm256_castps_si256(sign_T_256));
+ __m256 rayt_256 = _mm256_set1_ps((*isect)->t);
+ __m256i mask1 = _mm256_cmpgt_epi32(_mm256_castps_si256(sign_T_256),
+ _mm256_castps_si256(
+ _mm256_mul_ps(_mm256_castsi256_ps(_mm256_xor_si256(_mm256_castps_si256(den_256), sign_den_256)), rayt_256)
+ )
+ );
+ mask0 = _mm256_or_si256(mask1, mask0);
+ mask_final_256 = _mm256_andnot_si256(mask0, mask_final_256); //(~mask_minmaxUVW_pos) &(~mask)
+ mask_final_256 = _mm256_andnot_si256(maskden256, mask_final_256); //(~mask_minmaxUVW_pos) &(~mask) & (~maskden)
+ unsigned char mask_final = _mm256_movemask_ps(_mm256_castsi256_ps(mask_final_256));
+ if((mask_final & prim_num_mask) == 0) {
+ return false;
}
+ const int i = __bsf(mask_final);
+ __m256 inv_den_256 = _mm256_rcp_ps(den_256);
+ U_256 = _mm256_mul_ps(U_256, inv_den_256);
+ V_256 = _mm256_mul_ps(V_256, inv_den_256);
+ T_256 = _mm256_mul_ps(T_256, inv_den_256);
+ _mm256_store_ps(U8, U_256);
+ _mm256_store_ps(V8, V_256);
+ _mm256_store_ps(T8, T_256);
+ /* NOTE: Here we assume visibility for all triangles in the node is
+ * the same. */
+ (*isect)->u = U8[i];
+ (*isect)->v = V8[i];
+ (*isect)->t = T8[i];
+ (*isect)->prim = (prim_addr + i);
+ (*isect)->object = object;
+ (*isect)->type = PRIMITIVE_TRIANGLE;
+ return true;
+ }
else {
- _mm256_store_ps(den8, den_256);
- _mm256_store_ps(U8, U_256);
- _mm256_store_ps(V8, V_256);
- _mm256_store_ps(T8, T_256);
+ _mm256_store_ps(den8, den_256);
+ _mm256_store_ps(U8, U_256);
+ _mm256_store_ps(V8, V_256);
+ _mm256_store_ps(T8, T_256);
- _mm256_store_ps(sign_T8, sign_T_256);
- _mm256_store_ps(xor_signmask8, xor_signmask_256);
- _mm256_store_si256((__m256i*)mask_minmaxUVW8, mask_minmaxUVW_256);
+ _mm256_store_ps(sign_T8, sign_T_256);
+ _mm256_store_ps(xor_signmask8, xor_signmask_256);
+ _mm256_store_si256((__m256i*)mask_minmaxUVW8, mask_minmaxUVW_256);
- int ret = false;
+ int ret = false;
- if(visibility == PATH_RAY_SHADOW) {
- for(int i = 0; i < prim_num; i++) {
- if(!mask_minmaxUVW8[i]) {
+ if(visibility == PATH_RAY_SHADOW) {
+ for(int i = 0; i < prim_num; i++) {
+ if(mask_minmaxUVW8[i]) {
+ continue;
+ }
#ifdef __VISIBILITY_FLAG__
- if(kernel_tex_fetch(__prim_visibility, (prim_addr + i)) & visibility)
+ if((kernel_tex_fetch(__prim_visibility, (prim_addr + i)) & visibility) == 0) {
+ continue;
+ }
#endif
- {
- if((sign_T8[i] >= 0.0f) &&
- (sign_T8[i] <= (*isect)->t * xor_signmask8[i]))
- {
- if(den8[i]) {
- const float inv_den = 1.0f / den8[i];
-
- (*isect)->u = U8[i] * inv_den;
- (*isect)->v = V8[i] * inv_den;
- (*isect)->t = T8[i] * inv_den;
-
- (*isect)->prim = (prim_addr + i);
- (*isect)->object = object;
- (*isect)->type = PRIMITIVE_TRIANGLE;
-
- int prim = kernel_tex_fetch(__prim_index, (*isect)->prim);
- int shader = 0;
-
+ if((sign_T8[i] < 0.0f) ||
+ (sign_T8[i] > (*isect)->t * xor_signmask8[i]))
+ {
+ continue;
+ }
+ if(!den8[i]) {
+ continue;
+ }
+ const float inv_den = 1.0f / den8[i];
+ (*isect)->u = U8[i] * inv_den;
+ (*isect)->v = V8[i] * inv_den;
+ (*isect)->t = T8[i] * inv_den;
+ (*isect)->prim = (prim_addr + i);
+ (*isect)->object = object;
+ (*isect)->type = PRIMITIVE_TRIANGLE;
+ const int prim = kernel_tex_fetch(__prim_index, (*isect)->prim);
+ int shader = 0;
#ifdef __HAIR__
- if(kernel_tex_fetch(__prim_type, (*isect)->prim) & PRIMITIVE_ALL_TRIANGLE)
+ if(kernel_tex_fetch(__prim_type, (*isect)->prim) & PRIMITIVE_ALL_TRIANGLE)
#endif
- {
- shader = kernel_tex_fetch(__tri_shader, prim);
- }
+ {
+ shader = kernel_tex_fetch(__tri_shader, prim);
+ }
#ifdef __HAIR__
- else {
- float4 str = kernel_tex_fetch(__curves, prim);
- shader = __float_as_int(str.z);
- }
+ else {
+ float4 str = kernel_tex_fetch(__curves, prim);
+ shader = __float_as_int(str.z);
+ }
#endif
- int flag = kernel_tex_fetch(__shaders, (shader & SHADER_MASK)).flags;
-
- /* if no transparent shadows, all light is blocked */
- if(!(flag & SD_HAS_TRANSPARENT_SHADOW)) {
- return 2;
- }
- /* if maximum number of hits reached, block all light */
- else if(*num_hits == max_hits) {
- return 2;
- }
- /* move on to next entry in intersections array */
- ret = true;
-
- (*isect)++;
- (*num_hits)++;
-
- (*num_hits_in_instance)++;
-
- (*isect)->t = isec_t;
-
- } //den
- } //if sign
- } //vis
- }//if mask
- } //for
+ const int flag = kernel_tex_fetch(__shaders, (shader & SHADER_MASK)).flags;
+ /* If no transparent shadows, all light is blocked. */
+ if(!(flag & SD_HAS_TRANSPARENT_SHADOW)) {
+ return 2;
+ }
+ /* If maximum number of hits reached, block all light. */
+ else if(num_hits == NULL || *num_hits == max_hits) {
+ return 2;
+ }
+ /* Move on to next entry in intersections array. */
+ ret = true;
+ (*isect)++;
+ (*num_hits)++;
+ (*num_hits_in_instance)++;
+ (*isect)->t = isect_t;
+ }
}
- else { //default case
+ else {
for(int i = 0; i < prim_num; i++) {
- if(!mask_minmaxUVW8[i]) {
+ if(mask_minmaxUVW8[i]) {
+ continue;
+ }
#ifdef __VISIBILITY_FLAG__
- if(kernel_tex_fetch(__prim_visibility, (prim_addr + i)) & visibility)
+ if((kernel_tex_fetch(__prim_visibility, (prim_addr + i)) & visibility) == 0) {
+ continue;
+ }
#endif
- {
- if((sign_T8[i] >= 0.0f) &&
- (sign_T8[i] <= (*isect)->t * xor_signmask8[i]))
- {
- if(den8[i]) {
- const float inv_den = 1.0f / den8[i];
-
- (*isect)->u = U8[i] * inv_den;
- (*isect)->v = V8[i] * inv_den;
- (*isect)->t = T8[i] * inv_den;
-
- (*isect)->prim = (prim_addr + i);
- (*isect)->object = object;
- (*isect)->type = PRIMITIVE_TRIANGLE;
-
- ret = true;
- } //den
- } //if sign
- } //vis
- }//if mask
- } //for
- } //default
- return ret;
-}// else PATH_RAY_SHADOW_OPAQUE
-
+ if((sign_T8[i] < 0.0f) ||
+ (sign_T8[i] > (*isect)->t * xor_signmask8[i]))
+ {
+ continue;
+ }
+ if(!den8[i]) {
+ continue;
+ }
+ const float inv_den = 1.0f / den8[i];
+ (*isect)->u = U8[i] * inv_den;
+ (*isect)->v = V8[i] * inv_den;
+ (*isect)->t = T8[i] * inv_den;
+ (*isect)->prim = (prim_addr + i);
+ (*isect)->object = object;
+ (*isect)->type = PRIMITIVE_TRIANGLE;
+ ret = true;
+ }
+ }
+ return ret;
+ }
}
-//vz static
-ccl_device_inline
-int triangle_intersect8(KernelGlobals *kg,
- Intersection **isect,
- float3 P,
- float3 dir,
- uint visibility,
- int object,
- int prim_addr,
- int prim_num,
- uint *num_hits,
- uint max_hits,
- int *num_hits_in_instance,
- float isec_t)
+ccl_device_inline int triangle_intersect8(
+ KernelGlobals *kg,
+ Intersection **isect,
+ float3 P,
+ float3 dir,
+ uint visibility,
+ int object,
+ int prim_addr,
+ int prim_num,
+ uint *num_hits,
+ uint max_hits,
+ int *num_hits_in_instance,
+ float isect_t)
{
__m128 tri_a[8], tri_b[8], tri_c[8];
__m256 tritmp[12], tri[12];
@@ -540,11 +466,11 @@ int triangle_intersect8(KernelGlobals *kg,
num_hits,
max_hits,
num_hits_in_instance,
- isec_t);
+ isect_t);
return result;
}
-#endif /* __KERNEL_AVX2__ */
+#endif /* __KERNEL_AVX2__ */
/* Special ray intersection routines for subsurface scattering. In that case we
* only want to intersect with primitives in the same object, and if case of
diff --git a/intern/cycles/kernel/kernel.h b/intern/cycles/kernel/kernel.h
index 373324afb01..1c8c91d15e6 100644
--- a/intern/cycles/kernel/kernel.h
+++ b/intern/cycles/kernel/kernel.h
@@ -63,4 +63,4 @@ void kernel_tex_copy(KernelGlobals *kg,
CCL_NAMESPACE_END
-#endif /* __KERNEL_H__ */
+#endif /* __KERNEL_H__ */
diff --git a/intern/cycles/kernel/kernel_color.h b/intern/cycles/kernel/kernel_color.h
index 990e798543a..ea478a8a5d3 100644
--- a/intern/cycles/kernel/kernel_color.h
+++ b/intern/cycles/kernel/kernel_color.h
@@ -35,4 +35,4 @@ ccl_device float linear_rgb_to_gray(KernelGlobals *kg, float3 c)
CCL_NAMESPACE_END
-#endif /* __KERNEL_COLOR_H__ */
+#endif /* __KERNEL_COLOR_H__ */
diff --git a/intern/cycles/kernel/kernel_compat_cpu.h b/intern/cycles/kernel/kernel_compat_cpu.h
index aa7a16afa1d..4ee80850402 100644
--- a/intern/cycles/kernel/kernel_compat_cpu.h
+++ b/intern/cycles/kernel/kernel_compat_cpu.h
@@ -153,4 +153,4 @@ typedef vector3<avxf> avx3f;
CCL_NAMESPACE_END
-#endif /* __KERNEL_COMPAT_CPU_H__ */
+#endif /* __KERNEL_COMPAT_CPU_H__ */
diff --git a/intern/cycles/kernel/kernel_compat_cuda.h b/intern/cycles/kernel/kernel_compat_cuda.h
index ac63bcf7ac9..8ed96bbae64 100644
--- a/intern/cycles/kernel/kernel_compat_cuda.h
+++ b/intern/cycles/kernel/kernel_compat_cuda.h
@@ -150,4 +150,4 @@ ccl_device_inline uint ccl_num_groups(uint d)
#define logf(x) __logf(((float)(x)))
#define expf(x) __expf(((float)(x)))
-#endif /* __KERNEL_COMPAT_CUDA_H__ */
+#endif /* __KERNEL_COMPAT_CUDA_H__ */
diff --git a/intern/cycles/kernel/kernel_compat_opencl.h b/intern/cycles/kernel/kernel_compat_opencl.h
index 3f7e264fbee..21a95098894 100644
--- a/intern/cycles/kernel/kernel_compat_opencl.h
+++ b/intern/cycles/kernel/kernel_compat_opencl.h
@@ -159,4 +159,4 @@
#include "util/util_half.h"
#include "util/util_types.h"
-#endif /* __KERNEL_COMPAT_OPENCL_H__ */
+#endif /* __KERNEL_COMPAT_OPENCL_H__ */
diff --git a/intern/cycles/kernel/kernel_globals.h b/intern/cycles/kernel/kernel_globals.h
index 74cfacb5bc1..37402f42863 100644
--- a/intern/cycles/kernel/kernel_globals.h
+++ b/intern/cycles/kernel/kernel_globals.h
@@ -21,6 +21,7 @@
#ifdef __KERNEL_CPU__
# include "util/util_vector.h"
+# include "util/util_map.h"
#endif
#ifdef __KERNEL_OPENCL__
@@ -42,6 +43,8 @@ struct OSLThreadData;
struct OSLShadingSystem;
# endif
+typedef unordered_map<float, float> CoverageMap;
+
struct Intersection;
struct VolumeStep;
@@ -68,6 +71,11 @@ typedef struct KernelGlobals {
VolumeStep *decoupled_volume_steps[2];
int decoupled_volume_steps_index;
+ /* A buffer for storing per-pixel coverage for Cryptomatte. */
+ CoverageMap *coverage_object;
+ CoverageMap *coverage_material;
+ CoverageMap *coverage_asset;
+
/* split kernel */
SplitData split_data;
SplitParams split_param_data;
diff --git a/intern/cycles/kernel/kernel_id_passes.h b/intern/cycles/kernel/kernel_id_passes.h
new file mode 100644
index 00000000000..ee3b8b8abfb
--- /dev/null
+++ b/intern/cycles/kernel/kernel_id_passes.h
@@ -0,0 +1,94 @@
+/*
+* Copyright 2018 Blender Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+CCL_NAMESPACE_BEGIN
+
+ccl_device_inline void kernel_write_id_slots(ccl_global float *buffer, int num_slots, float id, float weight)
+{
+ kernel_assert(id != ID_NONE);
+ if(weight == 0.0f) {
+ return;
+ }
+
+ for(int slot = 0; slot < num_slots; slot++) {
+ ccl_global float2 *id_buffer = (ccl_global float2*)buffer;
+#ifdef __ATOMIC_PASS_WRITE__
+ /* If the loop reaches an empty slot, the ID isn't in any slot yet - so add it! */
+ if(id_buffer[slot].x == ID_NONE) {
+ /* Use an atomic to claim this slot.
+ * If a different thread got here first, try again from this slot on. */
+ float old_id = atomic_compare_and_swap_float(buffer+slot*2, ID_NONE, id);
+ if(old_id != ID_NONE && old_id != id) {
+ continue;
+ }
+ atomic_add_and_fetch_float(buffer+slot*2+1, weight);
+ break;
+ }
+ /* If there already is a slot for that ID, add the weight.
+ * If no slot was found, add it to the last. */
+ else if(id_buffer[slot].x == id || slot == num_slots - 1) {
+ atomic_add_and_fetch_float(buffer+slot*2+1, weight);
+ break;
+ }
+#else /* __ATOMIC_PASS_WRITE__ */
+ /* If the loop reaches an empty slot, the ID isn't in any slot yet - so add it! */
+ if(id_buffer[slot].x == ID_NONE) {
+ id_buffer[slot].x = id;
+ id_buffer[slot].y = weight;
+ break;
+ }
+ /* If there already is a slot for that ID, add the weight.
+ * If no slot was found, add it to the last. */
+ else if(id_buffer[slot].x == id || slot == num_slots - 1) {
+ id_buffer[slot].y += weight;
+ break;
+ }
+#endif /* __ATOMIC_PASS_WRITE__ */
+ }
+}
+
+ccl_device_inline void kernel_sort_id_slots(ccl_global float *buffer, int num_slots)
+{
+ ccl_global float2 *id_buffer = (ccl_global float2*)buffer;
+ for(int slot = 1; slot < num_slots; ++slot) {
+ if(id_buffer[slot].x == ID_NONE) {
+ return;
+ }
+ /* Since we're dealing with a tiny number of elements, insertion sort should be fine. */
+ int i = slot;
+ while(i > 0 && id_buffer[i].y > id_buffer[i - 1].y) {
+ float2 swap = id_buffer[i];
+ id_buffer[i] = id_buffer[i - 1];
+ id_buffer[i - 1] = swap;
+ --i;
+ }
+ }
+}
+
+#ifdef __KERNEL_GPU__
+/* post-sorting for Cryptomatte */
+ccl_device void kernel_cryptomatte_post(KernelGlobals *kg, ccl_global float *buffer, uint sample, int x, int y, int offset, int stride)
+{
+ if(sample - 1 == kernel_data.integrator.aa_samples) {
+ int index = offset + x + y * stride;
+ int pass_stride = kernel_data.film.pass_stride;
+ ccl_global float *cryptomatte_buffer = buffer + index * pass_stride + kernel_data.film.pass_cryptomatte;
+ kernel_sort_id_slots(cryptomatte_buffer, 2 * kernel_data.film.cryptomatte_depth);
+ }
+}
+#endif
+
+CCL_NAMESPACE_END
diff --git a/intern/cycles/kernel/kernel_math.h b/intern/cycles/kernel/kernel_math.h
index 96391db7649..a8a43f3ea4a 100644
--- a/intern/cycles/kernel/kernel_math.h
+++ b/intern/cycles/kernel/kernel_math.h
@@ -25,4 +25,4 @@
#include "util/util_texture.h"
#include "util/util_transform.h"
-#endif /* __KERNEL_MATH_H__ */
+#endif /* __KERNEL_MATH_H__ */
diff --git a/intern/cycles/kernel/kernel_montecarlo.h b/intern/cycles/kernel/kernel_montecarlo.h
index 9b96bb80c32..dde93844dd3 100644
--- a/intern/cycles/kernel/kernel_montecarlo.h
+++ b/intern/cycles/kernel/kernel_montecarlo.h
@@ -187,7 +187,10 @@ ccl_device float2 regular_polygon_sample(float corners, float rotation, float u,
ccl_device float3 ensure_valid_reflection(float3 Ng, float3 I, float3 N)
{
float3 R = 2*dot(N, I)*N - I;
- if(dot(Ng, R) >= 0.05f) {
+
+ /* Reflection rays may always be at least as shallow as the incoming ray. */
+ float threshold = min(0.9f*dot(Ng, I), 0.01f);
+ if(dot(Ng, R) >= threshold) {
return N;
}
@@ -195,24 +198,88 @@ ccl_device float3 ensure_valid_reflection(float3 Ng, float3 I, float3 N)
* The X axis is found by normalizing the component of N that's orthogonal to Ng.
* The Y axis isn't actually needed.
*/
- float3 X = normalize(N - dot(N, Ng)*Ng);
-
- /* Calculate N.z and N.x in the local coordinate system. */
- float Iz = dot(I, Ng);
- float Ix2 = sqr(dot(I, X)), Iz2 = sqr(Iz);
- float Ix2Iz2 = Ix2 + Iz2;
-
- float a = safe_sqrtf(Ix2*(Ix2Iz2 - sqr(0.05f)));
- float b = Iz*0.05f + Ix2Iz2;
- float c = (a + b > 0.0f)? (a + b) : (-a + b);
+ float NdotNg = dot(N, Ng);
+ float3 X = normalize(N - NdotNg*Ng);
+
+ /* Calculate N.z and N.x in the local coordinate system.
+ *
+ * The goal of this computation is to find a N' that is rotated towards Ng just enough
+ * to lift R' above the threshold (here called t), therefore dot(R', Ng) = t.
+ *
+ * According to the standard reflection equation, this means that we want dot(2*dot(N', I)*N' - I, Ng) = t.
+ *
+ * Since the Z axis of our local coordinate system is Ng, dot(x, Ng) is just x.z, so we get 2*dot(N', I)*N'.z - I.z = t.
+ *
+ * The rotation is simple to express in the coordinate system we formed - since N lies in the X-Z-plane, we know that
+ * N' will also lie in the X-Z-plane, so N'.y = 0 and therefore dot(N', I) = N'.x*I.x + N'.z*I.z .
+ *
+ * Furthermore, we want N' to be normalized, so N'.x = sqrt(1 - N'.z^2).
+ *
+ * With these simplifications, we get the final equation 2*(sqrt(1 - N'.z^2)*I.x + N'.z*I.z)*N'.z - I.z = t.
+ *
+ * The only unknown here is N'.z, so we can solve for that.
+ *
+ * The equation has four solutions in general:
+ *
+ * N'.z = +-sqrt(0.5*(+-sqrt(I.x^2*(I.x^2 + I.z^2 - t^2)) + t*I.z + I.x^2 + I.z^2)/(I.x^2 + I.z^2))
+ * We can simplify this expression a bit by grouping terms:
+ *
+ * a = I.x^2 + I.z^2
+ * b = sqrt(I.x^2 * (a - t^2))
+ * c = I.z*t + a
+ * N'.z = +-sqrt(0.5*(+-b + c)/a)
+ *
+ * Two solutions can immediately be discarded because they're negative so N' would lie in the lower hemisphere.
+ */
+ float Ix = dot(I, X), Iz = dot(I, Ng);
+ float Ix2 = sqr(Ix), Iz2 = sqr(Iz);
+ float a = Ix2 + Iz2;
+
+ float b = safe_sqrtf(Ix2*(a - sqr(threshold)));
+ float c = Iz*threshold + a;
+
+ /* Evaluate both solutions.
+ * In many cases one can be immediately discarded (if N'.z would be imaginary or larger than one), so check for that first.
+ * If no option is viable (might happen in extreme cases like N being in the wrong hemisphere), give up and return Ng. */
+ float fac = 0.5f/a;
+ float N1_z2 = fac*(b+c), N2_z2 = fac*(-b+c);
+ bool valid1 = (N1_z2 > 1e-5f) && (N1_z2 <= (1.0f + 1e-5f));
+ bool valid2 = (N2_z2 > 1e-5f) && (N2_z2 <= (1.0f + 1e-5f));
+
+ float2 N_new;
+ if(valid1 && valid2) {
+ /* If both are possible, do the expensive reflection-based check. */
+ float2 N1 = make_float2(safe_sqrtf(1.0f - N1_z2), safe_sqrtf(N1_z2));
+ float2 N2 = make_float2(safe_sqrtf(1.0f - N2_z2), safe_sqrtf(N2_z2));
+
+ float R1 = 2*(N1.x*Ix + N1.y*Iz)*N1.y - Iz;
+ float R2 = 2*(N2.x*Ix + N2.y*Iz)*N2.y - Iz;
+
+ valid1 = (R1 >= 1e-5f);
+ valid2 = (R2 >= 1e-5f);
+ if(valid1 && valid2) {
+ /* If both solutions are valid, return the one with the shallower reflection since it will be closer to the input
+ * (if the original reflection wasn't shallow, we would not be in this part of the function). */
+ N_new = (R1 < R2)? N1 : N2;
+ }
+ else {
+ /* If only one reflection is valid (= positive), pick that one. */
+ N_new = (R1 > R2)? N1 : N2;
+ }
- float Nz = safe_sqrtf(0.5f * c * (1.0f / Ix2Iz2));
- float Nx = safe_sqrtf(1.0f - sqr(Nz));
+ }
+ else if(valid1 || valid2) {
+ /* Only one solution passes the N'.z criterium, so pick that one. */
+ float Nz2 = valid1? N1_z2 : N2_z2;
+ N_new = make_float2(safe_sqrtf(1.0f - Nz2), safe_sqrtf(Nz2));
+ }
+ else {
+ return Ng;
+ }
- /* Transform back into global coordinates. */
- return Nx*X + Nz*Ng;
+ return N_new.x*X + N_new.y*Ng;
}
CCL_NAMESPACE_END
-#endif /* __KERNEL_MONTECARLO_CL__ */
+#endif /* __KERNEL_MONTECARLO_CL__ */
diff --git a/intern/cycles/kernel/kernel_passes.h b/intern/cycles/kernel/kernel_passes.h
index 458aa6c2a97..80477f921ea 100644
--- a/intern/cycles/kernel/kernel_passes.h
+++ b/intern/cycles/kernel/kernel_passes.h
@@ -14,12 +14,14 @@
* limitations under the License.
*/
-CCL_NAMESPACE_BEGIN
-
#if defined(__SPLIT_KERNEL__) || defined(__KERNEL_CUDA__)
#define __ATOMIC_PASS_WRITE__
#endif
+#include "kernel/kernel_id_passes.h"
+
+CCL_NAMESPACE_BEGIN
+
ccl_device_inline void kernel_write_pass_float(ccl_global float *buffer, float value)
{
ccl_global float *buf = buffer;
@@ -108,7 +110,7 @@ ccl_device_inline void kernel_write_denoising_shadow(KernelGlobals *kg, ccl_glob
float value = path_total_shaded / max(path_total, 1e-7f);
kernel_write_pass_float(buffer+2, value*value);
}
-#endif /* __DENOISING_FEATURES__ */
+#endif /* __DENOISING_FEATURES__ */
ccl_device_inline void kernel_update_denoising_features(KernelGlobals *kg,
ShaderData *sd,
@@ -187,7 +189,24 @@ ccl_device_inline void kernel_write_debug_passes(KernelGlobals *kg,
L->debug_data.num_ray_bounces);
}
}
-#endif /* __KERNEL_DEBUG__ */
+#endif /* __KERNEL_DEBUG__ */
+
+#ifdef __KERNEL_CPU__
+#define WRITE_ID_SLOT(buffer, depth, id, matte_weight, name) kernel_write_id_pass_cpu(buffer, depth * 2, id, matte_weight, kg->coverage_##name)
+ccl_device_inline size_t kernel_write_id_pass_cpu(float *buffer, size_t depth, float id, float matte_weight, CoverageMap *map)
+{
+ if(map) {
+ (*map)[id] += matte_weight;
+ return 0;
+ }
+#else /* __KERNEL_CPU__ */
+#define WRITE_ID_SLOT(buffer, depth, id, matte_weight, name) kernel_write_id_slots_gpu(buffer, depth * 2, id, matte_weight)
+ccl_device_inline size_t kernel_write_id_slots_gpu(ccl_global float *buffer, size_t depth, float id, float matte_weight)
+{
+#endif /* __KERNEL_CPU__ */
+ kernel_write_id_slots(buffer, depth, id, matte_weight);
+ return depth * 2;
+}
ccl_device_inline void kernel_write_data_passes(KernelGlobals *kg, ccl_global float *buffer, PathRadiance *L,
ShaderData *sd, ccl_addr_space PathState *state, float3 throughput)
@@ -242,6 +261,26 @@ ccl_device_inline void kernel_write_data_passes(KernelGlobals *kg, ccl_global fl
}
}
+ if(kernel_data.film.cryptomatte_passes) {
+ const float matte_weight = average(throughput) * (1.0f - average(shader_bsdf_transparency(kg, sd)));
+ if(matte_weight > 0.0f) {
+ ccl_global float *cryptomatte_buffer = buffer + kernel_data.film.pass_cryptomatte;
+ if(kernel_data.film.cryptomatte_passes & CRYPT_OBJECT) {
+ float id = object_cryptomatte_id(kg, sd->object);
+ cryptomatte_buffer += WRITE_ID_SLOT(cryptomatte_buffer, kernel_data.film.cryptomatte_depth, id, matte_weight, object);
+ }
+ if(kernel_data.film.cryptomatte_passes & CRYPT_MATERIAL) {
+ float id = shader_cryptomatte_id(kg, sd->shader);
+ cryptomatte_buffer += WRITE_ID_SLOT(cryptomatte_buffer, kernel_data.film.cryptomatte_depth, id, matte_weight, material);
+ }
+ if(kernel_data.film.cryptomatte_passes & CRYPT_ASSET) {
+ float id = object_cryptomatte_asset_id(kg, sd->object);
+ cryptomatte_buffer += WRITE_ID_SLOT(cryptomatte_buffer, kernel_data.film.cryptomatte_depth, id, matte_weight, asset);
+ }
+ }
+ }
+
+
if(light_flag & PASSMASK_COMPONENT(DIFFUSE))
L->color_diffuse += shader_bsdf_diffuse(kg, sd)*throughput;
if(light_flag & PASSMASK_COMPONENT(GLOSSY))
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h
index 5745762e183..cb1f410b09f 100644
--- a/intern/cycles/kernel/kernel_path.h
+++ b/intern/cycles/kernel/kernel_path.h
@@ -266,7 +266,7 @@ ccl_device_forceinline VolumeIntegrateResult kernel_path_volume(
}
#endif /* __VOLUME__ */
-#endif /* __SPLIT_KERNEL__ */
+#endif /* __SPLIT_KERNEL__ */
ccl_device_forceinline bool kernel_path_shader_apply(
KernelGlobals *kg,
@@ -434,7 +434,7 @@ ccl_device void kernel_path_indirect(KernelGlobals *kg,
else if(result == VOLUME_PATH_MISSED) {
break;
}
-#endif /* __VOLUME__*/
+#endif /* __VOLUME__*/
/* Shade background. */
if(!hit) {
@@ -557,7 +557,7 @@ ccl_device void kernel_path_indirect(KernelGlobals *kg,
#endif /* __SUBSURFACE__ */
}
-#endif /* defined(__BRANCHED_PATH__) || defined(__BAKING__) */
+#endif /* defined(__BRANCHED_PATH__) || defined(__BAKING__) */
ccl_device_forceinline void kernel_path_integrate(
KernelGlobals *kg,
@@ -605,7 +605,7 @@ ccl_device_forceinline void kernel_path_integrate(
else if(result == VOLUME_PATH_MISSED) {
break;
}
-#endif /* __VOLUME__*/
+#endif /* __VOLUME__*/
/* Shade background. */
if(!hit) {
diff --git a/intern/cycles/kernel/kernel_path_volume.h b/intern/cycles/kernel/kernel_path_volume.h
index feaea15d3c4..d2506fc1e7e 100644
--- a/intern/cycles/kernel/kernel_path_volume.h
+++ b/intern/cycles/kernel/kernel_path_volume.h
@@ -55,7 +55,7 @@ ccl_device_inline void kernel_path_volume_connect_light(
}
}
}
-#endif /* __EMISSION__ */
+#endif /* __EMISSION__ */
}
#ifdef __KERNEL_GPU__
@@ -277,10 +277,10 @@ ccl_device void kernel_branched_path_volume_connect_light(
}
}
}
-#endif /* __EMISSION__ */
+#endif /* __EMISSION__ */
}
-#endif /* __SPLIT_KERNEL__ */
+#endif /* __SPLIT_KERNEL__ */
-#endif /* __VOLUME_SCATTER__ */
+#endif /* __VOLUME_SCATTER__ */
CCL_NAMESPACE_END
diff --git a/intern/cycles/kernel/kernel_queues.h b/intern/cycles/kernel/kernel_queues.h
index e32d4bbbc1b..de8cc4a0cef 100644
--- a/intern/cycles/kernel/kernel_queues.h
+++ b/intern/cycles/kernel/kernel_queues.h
@@ -145,4 +145,4 @@ ccl_device int dequeue_ray_index(
CCL_NAMESPACE_END
-#endif // __KERNEL_QUEUE_H__
+#endif // __KERNEL_QUEUE_H__
diff --git a/intern/cycles/kernel/kernel_random.h b/intern/cycles/kernel/kernel_random.h
index b33e4eba8a4..61ddf4a4f81 100644
--- a/intern/cycles/kernel/kernel_random.h
+++ b/intern/cycles/kernel/kernel_random.h
@@ -50,7 +50,7 @@ ccl_device uint sobol_dimension(KernelGlobals *kg, int index, int dimension)
return result;
}
-#endif /* __SOBOL__ */
+#endif /* __SOBOL__ */
ccl_device_forceinline float path_rng_1D(KernelGlobals *kg,
diff --git a/intern/cycles/kernel/kernel_shader.h b/intern/cycles/kernel/kernel_shader.h
index e834b701f96..af883aa715b 100644
--- a/intern/cycles/kernel/kernel_shader.h
+++ b/intern/cycles/kernel/kernel_shader.h
@@ -1276,4 +1276,9 @@ ccl_device bool shader_transparent_shadow(KernelGlobals *kg, Intersection *isect
}
#endif /* __TRANSPARENT_SHADOWS__ */
+ccl_device float shader_cryptomatte_id(KernelGlobals *kg, int shader)
+{
+ return kernel_tex_fetch(__shaders, (shader & SHADER_MASK)).cryptomatte_id;
+}
+
CCL_NAMESPACE_END
diff --git a/intern/cycles/kernel/kernel_shadow.h b/intern/cycles/kernel/kernel_shadow.h
index 8a0da6c3b13..fafa3ad4bfa 100644
--- a/intern/cycles/kernel/kernel_shadow.h
+++ b/intern/cycles/kernel/kernel_shadow.h
@@ -446,7 +446,7 @@ ccl_device bool shadow_blocked_transparent_stepped(
}
# endif /* __KERNEL_GPU__ || !__SHADOW_RECORD_ALL__ */
-#endif /* __TRANSPARENT_SHADOWS__ */
+#endif /* __TRANSPARENT_SHADOWS__ */
ccl_device_inline bool shadow_blocked(KernelGlobals *kg,
ShaderData *sd,
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h
index e93100a6442..864aa7c470a 100644
--- a/intern/cycles/kernel/kernel_types.h
+++ b/intern/cycles/kernel/kernel_types.h
@@ -17,6 +17,12 @@
#ifndef __KERNEL_TYPES_H__
#define __KERNEL_TYPES_H__
+#if !defined(__KERNEL_GPU__) && defined(WITH_EMBREE)
+# include <embree3/rtcore.h>
+# include <embree3/rtcore_scene.h>
+# define __EMBREE__
+#endif
+
#include "kernel/kernel_math.h"
#include "kernel/svm/svm_types.h"
#include "util/util_static_assert.h"
@@ -53,6 +59,7 @@ CCL_NAMESPACE_BEGIN
#define OBJECT_NONE (~0)
#define PRIM_NONE (~0)
#define LAMP_NONE (~0)
+#define ID_NONE (0.0f)
#define VOLUME_STACK_SIZE 32
@@ -415,6 +422,7 @@ typedef enum PassType {
PASS_RAY_BOUNCES,
#endif
PASS_RENDER_TIME,
+ PASS_CRYPTOMATTE,
PASS_CATEGORY_MAIN_END = 31,
PASS_MIST = 32,
@@ -443,6 +451,14 @@ typedef enum PassType {
#define PASS_ANY (~0)
+typedef enum CryptomatteType {
+ CRYPT_NONE = 0,
+ CRYPT_OBJECT = (1 << 0),
+ CRYPT_MATERIAL = (1 << 1),
+ CRYPT_ASSET = (1 << 2),
+ CRYPT_ACCURATE = (1 << 3),
+} CryptomatteType;
+
typedef enum DenoisingPassOffsets {
DENOISING_PASS_NORMAL = 0,
DENOISING_PASS_NORMAL_VAR = 3,
@@ -599,7 +615,7 @@ typedef ccl_addr_space struct PathRadiance {
#ifdef __KERNEL_DEBUG__
DebugData debug_data;
-#endif /* __KERNEL_DEBUG__ */
+#endif /* __KERNEL_DEBUG__ */
} PathRadiance;
typedef struct BsdfEval {
@@ -712,6 +728,9 @@ typedef struct Ray {
/* Intersection */
typedef struct Intersection {
+#ifdef __EMBREE__
+ float3 Ng;
+#endif
float t, u, v;
int prim;
int object;
@@ -1260,6 +1279,9 @@ typedef struct KernelFilm {
int pass_shadow;
float pass_shadow_scale;
int filter_table_offset;
+ int cryptomatte_passes;
+ int cryptomatte_depth;
+ int pass_cryptomatte;
int pass_mist;
float mist_start;
@@ -1270,8 +1292,6 @@ typedef struct KernelFilm {
int pass_denoising_clean;
int denoising_flags;
- int pad1, pad2, pad3;
-
/* XYZ to rendering color space transform. float4 instead of float3 to
* ensure consistent padding/alignment across devices. */
float4 xyz_to_r;
@@ -1385,20 +1405,29 @@ typedef enum KernelBVHLayout {
BVH_LAYOUT_BVH2 = (1 << 0),
BVH_LAYOUT_BVH4 = (1 << 1),
BVH_LAYOUT_BVH8 = (1 << 2),
-
+ BVH_LAYOUT_EMBREE = (1 << 3),
BVH_LAYOUT_DEFAULT = BVH_LAYOUT_BVH8,
BVH_LAYOUT_ALL = (unsigned int)(-1),
} KernelBVHLayout;
typedef struct KernelBVH {
- /* root node */
+ /* Own BVH */
int root;
int have_motion;
int have_curves;
int have_instancing;
int bvh_layout;
int use_bvh_steps;
+
+ /* Embree */
+#ifdef __EMBREE__
+ RTCScene scene;
+# ifndef __KERNEL_64_BIT__
+ int pad1;
+# endif
+#else
int pad1, pad2;
+#endif
} KernelBVH;
static_assert_align(KernelBVH, 16);
@@ -1460,7 +1489,11 @@ typedef struct KernelObject {
uint patch_map_offset;
uint attribute_map_offset;
uint motion_offset;
- uint pad;
+ uint pad1;
+
+ float cryptomatte_object;
+ float cryptomatte_asset;
+ float pad2, pad3;
} KernelObject;
static_assert_align(KernelObject, 16);
@@ -1540,7 +1573,7 @@ static_assert_align(KernelParticle, 16);
typedef struct KernelShader {
float constant_emission[3];
- float pad1;
+ float cryptomatte_id;
int flags;
int pass_id;
int pad2, pad3;
@@ -1672,4 +1705,4 @@ typedef struct WorkTile {
CCL_NAMESPACE_END
-#endif /* __KERNEL_TYPES_H__ */
+#endif /* __KERNEL_TYPES_H__ */
diff --git a/intern/cycles/kernel/kernel_volume.h b/intern/cycles/kernel/kernel_volume.h
index d71761a97bc..d6d283c42c5 100644
--- a/intern/cycles/kernel/kernel_volume.h
+++ b/intern/cycles/kernel/kernel_volume.h
@@ -87,7 +87,7 @@ ccl_device_inline bool volume_shader_sample(KernelGlobals *kg,
return true;
}
-#endif /* __VOLUME__ */
+#endif /* __VOLUME__ */
ccl_device float3 volume_color_transmittance(float3 sigma, float t)
{
@@ -270,7 +270,7 @@ ccl_device_noinline void kernel_volume_shadow(KernelGlobals *kg,
kernel_volume_shadow_homogeneous(kg, state, ray, shadow_sd, throughput);
}
-#endif /* __VOLUME__ */
+#endif /* __VOLUME__ */
/* Equi-angular sampling as in:
* "Importance Sampling Techniques for Path Tracing in Participating Media" */
@@ -1075,7 +1075,7 @@ ccl_device VolumeIntegrateResult kernel_volume_decoupled_scatter(
return VOLUME_PATH_SCATTERED;
}
-#endif /* __SPLIT_KERNEL */
+#endif /* __SPLIT_KERNEL */
/* decide if we need to use decoupled or not */
ccl_device bool kernel_volume_use_decoupled(KernelGlobals *kg, bool heterogeneous, bool direct, int sampling_method)
@@ -1377,6 +1377,6 @@ ccl_device_inline void kernel_volume_clean_stack(KernelGlobals *kg,
}
}
-#endif /* __VOLUME__ */
+#endif /* __VOLUME__ */
CCL_NAMESPACE_END
diff --git a/intern/cycles/kernel/kernels/cpu/filter_cpu.h b/intern/cycles/kernel/kernels/cpu/filter_cpu.h
index b62aa9663ec..e036b53b810 100644
--- a/intern/cycles/kernel/kernels/cpu/filter_cpu.h
+++ b/intern/cycles/kernel/kernels/cpu/filter_cpu.h
@@ -95,6 +95,7 @@ void KERNEL_FUNCTION_FULL_NAME(filter_nlm_update_output)(int dx,
int dy,
float *difference_image,
float *image,
+ float *temp_image,
float *out_image,
float *accum_image,
int* rect,
diff --git a/intern/cycles/kernel/kernels/cpu/filter_cpu_impl.h b/intern/cycles/kernel/kernels/cpu/filter_cpu_impl.h
index 26777fdabb2..4c758711481 100644
--- a/intern/cycles/kernel/kernels/cpu/filter_cpu_impl.h
+++ b/intern/cycles/kernel/kernels/cpu/filter_cpu_impl.h
@@ -191,6 +191,7 @@ void KERNEL_FUNCTION_FULL_NAME(filter_nlm_update_output)(int dx,
int dy,
float *difference_image,
float *image,
+ float *temp_image,
float *out_image,
float *accum_image,
int *rect,
@@ -200,7 +201,7 @@ void KERNEL_FUNCTION_FULL_NAME(filter_nlm_update_output)(int dx,
#ifdef KERNEL_STUB
STUB_ASSERT(KERNEL_ARCH, filter_nlm_update_output);
#else
- kernel_filter_nlm_update_output(dx, dy, difference_image, image, out_image, accum_image, load_int4(rect), stride, f);
+ kernel_filter_nlm_update_output(dx, dy, difference_image, image, temp_image, out_image, accum_image, load_int4(rect), stride, f);
#endif
}
diff --git a/intern/cycles/kernel/kernels/cpu/kernel_cpu_image.h b/intern/cycles/kernel/kernels/cpu/kernel_cpu_image.h
index b77b7350d86..ae4fd85780d 100644
--- a/intern/cycles/kernel/kernels/cpu/kernel_cpu_image.h
+++ b/intern/cycles/kernel/kernels/cpu/kernel_cpu_image.h
@@ -26,7 +26,7 @@ template<typename T> struct TextureInterpolator {
u[1] = (( 0.5f * t - 1.0f) * t ) * t + (2.0f/3.0f); \
u[2] = (( -0.5f * t + 0.5f) * t + 0.5f) * t + (1.0f/6.0f); \
u[3] = (1.0f / 6.0f) * t * t * t; \
- } (void)0
+ } (void) 0
static ccl_always_inline float4 read(float4 r)
{
@@ -540,4 +540,4 @@ ccl_device float4 kernel_tex_image_interp_3d(KernelGlobals *kg, int id, float x,
CCL_NAMESPACE_END
-#endif // __KERNEL_CPU_IMAGE_H__
+#endif // __KERNEL_CPU_IMAGE_H__
diff --git a/intern/cycles/kernel/kernels/cpu/kernel_cpu_impl.h b/intern/cycles/kernel/kernels/cpu/kernel_cpu_impl.h
index 5ec1655ab05..759b7e4c20d 100644
--- a/intern/cycles/kernel/kernels/cpu/kernel_cpu_impl.h
+++ b/intern/cycles/kernel/kernels/cpu/kernel_cpu_impl.h
@@ -97,7 +97,7 @@ void KERNEL_FUNCTION_FULL_NAME(path_trace)(KernelGlobals *kg,
{
kernel_path_trace(kg, buffer, sample, x, y, offset, stride);
}
-#endif /* KERNEL_STUB */
+#endif /* KERNEL_STUB */
}
/* Film */
@@ -120,7 +120,7 @@ void KERNEL_FUNCTION_FULL_NAME(convert_to_byte)(KernelGlobals *kg,
x, y,
offset,
stride);
-#endif /* KERNEL_STUB */
+#endif /* KERNEL_STUB */
}
void KERNEL_FUNCTION_FULL_NAME(convert_to_half_float)(KernelGlobals *kg,
@@ -141,7 +141,7 @@ void KERNEL_FUNCTION_FULL_NAME(convert_to_half_float)(KernelGlobals *kg,
x, y,
offset,
stride);
-#endif /* KERNEL_STUB */
+#endif /* KERNEL_STUB */
}
/* Shader Evaluate */
@@ -176,7 +176,7 @@ void KERNEL_FUNCTION_FULL_NAME(shader)(KernelGlobals *kg,
else {
kernel_background_evaluate(kg, input, output, i);
}
-#endif /* KERNEL_STUB */
+#endif /* KERNEL_STUB */
}
#else /* __SPLIT_KERNEL__ */
@@ -208,7 +208,7 @@ void KERNEL_FUNCTION_FULL_NAME(shader)(KernelGlobals *kg,
ccl_local type locals; \
kernel_##name(kg, &locals); \
}
-#endif /* KERNEL_STUB */
+#endif /* KERNEL_STUB */
DEFINE_SPLIT_KERNEL_FUNCTION(path_init)
DEFINE_SPLIT_KERNEL_FUNCTION(scene_intersect)
diff --git a/intern/cycles/kernel/kernels/cuda/filter.cu b/intern/cycles/kernel/kernels/cuda/filter.cu
index 0561c40e6b1..b856cbde45c 100644
--- a/intern/cycles/kernel/kernels/cuda/filter.cu
+++ b/intern/cycles/kernel/kernels/cuda/filter.cu
@@ -140,7 +140,7 @@ kernel_cuda_filter_nlm_calc_difference(const float *ccl_restrict weight_image,
int w,
int h,
int stride,
- int shift_stride,
+ int pass_stride,
int r,
int channel_offset,
float a,
@@ -148,7 +148,7 @@ kernel_cuda_filter_nlm_calc_difference(const float *ccl_restrict weight_image,
{
int4 co, rect;
int ofs;
- if(get_nlm_coords(w, h, r, shift_stride, &rect, &co, &ofs)) {
+ if(get_nlm_coords(w, h, r, pass_stride, &rect, &co, &ofs)) {
kernel_filter_nlm_calc_difference(co.x, co.y, co.z, co.w,
weight_image,
variance_image,
@@ -165,13 +165,13 @@ kernel_cuda_filter_nlm_blur(const float *ccl_restrict difference_image,
int w,
int h,
int stride,
- int shift_stride,
+ int pass_stride,
int r,
int f)
{
int4 co, rect;
int ofs;
- if(get_nlm_coords(w, h, r, shift_stride, &rect, &co, &ofs)) {
+ if(get_nlm_coords(w, h, r, pass_stride, &rect, &co, &ofs)) {
kernel_filter_nlm_blur(co.x, co.y,
difference_image + ofs,
out_image + ofs,
@@ -186,13 +186,13 @@ kernel_cuda_filter_nlm_calc_weight(const float *ccl_restrict difference_image,
int w,
int h,
int stride,
- int shift_stride,
+ int pass_stride,
int r,
int f)
{
int4 co, rect;
int ofs;
- if(get_nlm_coords(w, h, r, shift_stride, &rect, &co, &ofs)) {
+ if(get_nlm_coords(w, h, r, pass_stride, &rect, &co, &ofs)) {
kernel_filter_nlm_calc_weight(co.x, co.y,
difference_image + ofs,
out_image + ofs,
@@ -209,13 +209,13 @@ kernel_cuda_filter_nlm_update_output(const float *ccl_restrict difference_image,
int w,
int h,
int stride,
- int shift_stride,
+ int pass_stride,
int r,
int f)
{
int4 co, rect;
int ofs;
- if(get_nlm_coords(w, h, r, shift_stride, &rect, &co, &ofs)) {
+ if(get_nlm_coords(w, h, r, pass_stride, &rect, &co, &ofs)) {
kernel_filter_nlm_update_output(co.x, co.y, co.z, co.w,
difference_image + ofs,
image,
@@ -252,14 +252,13 @@ kernel_cuda_filter_nlm_construct_gramian(const float *ccl_restrict difference_im
int w,
int h,
int stride,
- int shift_stride,
+ int pass_stride,
int r,
- int f,
- int pass_stride)
+ int f)
{
int4 co, rect;
int ofs;
- if(get_nlm_coords_window(w, h, r, shift_stride, &rect, &co, &ofs, filter_window)) {
+ if(get_nlm_coords_window(w, h, r, pass_stride, &rect, &co, &ofs, filter_window)) {
kernel_filter_nlm_construct_gramian(co.x, co.y,
co.z, co.w,
difference_image + ofs,
diff --git a/intern/cycles/kernel/kernels/cuda/kernel.cu b/intern/cycles/kernel/kernels/cuda/kernel.cu
index 8a180a509e8..af311027f78 100644
--- a/intern/cycles/kernel/kernels/cuda/kernel.cu
+++ b/intern/cycles/kernel/kernels/cuda/kernel.cu
@@ -40,14 +40,21 @@ CUDA_LAUNCH_BOUNDS(CUDA_THREADS_BLOCK_WIDTH, CUDA_KERNEL_MAX_REGISTERS)
kernel_cuda_path_trace(WorkTile *tile, uint total_work_size)
{
int work_index = ccl_global_id(0);
-
- if(work_index < total_work_size) {
- uint x, y, sample;
+ bool thread_is_active = work_index < total_work_size;
+ uint x, y, sample;
+ KernelGlobals kg;
+ if(thread_is_active) {
get_work_pixel(tile, work_index, &x, &y, &sample);
- KernelGlobals kg;
kernel_path_trace(&kg, tile->buffer, sample, x, y, tile->offset, tile->stride);
}
+
+ if(kernel_data.film.cryptomatte_passes) {
+ __syncthreads();
+ if(thread_is_active) {
+ kernel_cryptomatte_post(&kg, tile->buffer, sample, x, y, tile->offset, tile->stride);
+ }
+ }
}
#ifdef __BRANCHED_PATH__
@@ -56,14 +63,21 @@ CUDA_LAUNCH_BOUNDS(CUDA_THREADS_BLOCK_WIDTH, CUDA_KERNEL_BRANCHED_MAX_REGISTERS)
kernel_cuda_branched_path_trace(WorkTile *tile, uint total_work_size)
{
int work_index = ccl_global_id(0);
-
- if(work_index < total_work_size) {
- uint x, y, sample;
+ bool thread_is_active = work_index < total_work_size;
+ uint x, y, sample;
+ KernelGlobals kg;
+ if(thread_is_active) {
get_work_pixel(tile, work_index, &x, &y, &sample);
- KernelGlobals kg;
kernel_branched_path_trace(&kg, tile->buffer, sample, x, y, tile->offset, tile->stride);
}
+
+ if(kernel_data.film.cryptomatte_passes) {
+ __syncthreads();
+ if(thread_is_active) {
+ kernel_cryptomatte_post(&kg, tile->buffer, sample, x, y, tile->offset, tile->stride);
+ }
+ }
}
#endif
diff --git a/intern/cycles/kernel/kernels/opencl/filter.cl b/intern/cycles/kernel/kernels/opencl/filter.cl
index 3c75754fb39..a550f97f4eb 100644
--- a/intern/cycles/kernel/kernels/opencl/filter.cl
+++ b/intern/cycles/kernel/kernels/opencl/filter.cl
@@ -132,7 +132,7 @@ __kernel void kernel_ocl_filter_nlm_calc_difference(const ccl_global float *ccl_
int w,
int h,
int stride,
- int shift_stride,
+ int pass_stride,
int r,
int channel_offset,
float a,
@@ -140,7 +140,7 @@ __kernel void kernel_ocl_filter_nlm_calc_difference(const ccl_global float *ccl_
{
int4 co, rect;
int ofs;
- if(get_nlm_coords(w, h, r, shift_stride, &rect, &co, &ofs)) {
+ if(get_nlm_coords(w, h, r, pass_stride, &rect, &co, &ofs)) {
kernel_filter_nlm_calc_difference(co.x, co.y, co.z, co.w,
weight_image,
variance_image,
@@ -155,13 +155,13 @@ __kernel void kernel_ocl_filter_nlm_blur(const ccl_global float *ccl_restrict di
int w,
int h,
int stride,
- int shift_stride,
+ int pass_stride,
int r,
int f)
{
int4 co, rect;
int ofs;
- if(get_nlm_coords(w, h, r, shift_stride, &rect, &co, &ofs)) {
+ if(get_nlm_coords(w, h, r, pass_stride, &rect, &co, &ofs)) {
kernel_filter_nlm_blur(co.x, co.y,
difference_image + ofs,
out_image + ofs,
@@ -174,13 +174,13 @@ __kernel void kernel_ocl_filter_nlm_calc_weight(const ccl_global float *ccl_rest
int w,
int h,
int stride,
- int shift_stride,
+ int pass_stride,
int r,
int f)
{
int4 co, rect;
int ofs;
- if(get_nlm_coords(w, h, r, shift_stride, &rect, &co, &ofs)) {
+ if(get_nlm_coords(w, h, r, pass_stride, &rect, &co, &ofs)) {
kernel_filter_nlm_calc_weight(co.x, co.y,
difference_image + ofs,
out_image + ofs,
@@ -195,13 +195,13 @@ __kernel void kernel_ocl_filter_nlm_update_output(const ccl_global float *ccl_re
int w,
int h,
int stride,
- int shift_stride,
+ int pass_stride,
int r,
int f)
{
int4 co, rect;
int ofs;
- if(get_nlm_coords(w, h, r, shift_stride, &rect, &co, &ofs)) {
+ if(get_nlm_coords(w, h, r, pass_stride, &rect, &co, &ofs)) {
kernel_filter_nlm_update_output(co.x, co.y, co.z, co.w,
difference_image + ofs,
image,
@@ -234,14 +234,13 @@ __kernel void kernel_ocl_filter_nlm_construct_gramian(const ccl_global float *cc
int w,
int h,
int stride,
- int shift_stride,
+ int pass_stride,
int r,
- int f,
- int pass_stride)
+ int f)
{
int4 co, rect;
int ofs;
- if(get_nlm_coords_window(w, h, r, shift_stride, &rect, &co, &ofs, filter_window)) {
+ if(get_nlm_coords_window(w, h, r, pass_stride, &rect, &co, &ofs, filter_window)) {
kernel_filter_nlm_construct_gramian(co.x, co.y,
co.z, co.w,
difference_image + ofs,
diff --git a/intern/cycles/kernel/kernels/opencl/kernel.cl b/intern/cycles/kernel/kernels/opencl/kernel.cl
index 63128d0aecf..de1f5088629 100644
--- a/intern/cycles/kernel/kernels/opencl/kernel.cl
+++ b/intern/cycles/kernel/kernels/opencl/kernel.cl
@@ -66,9 +66,17 @@ __kernel void kernel_ocl_path_trace(
int x = sx + ccl_global_id(0);
int y = sy + ccl_global_id(1);
-
- if(x < sx + sw && y < sy + sh)
+ bool thread_is_active = x < sx + sw && y < sy + sh;
+ if(thread_is_active) {
kernel_path_trace(kg, buffer, sample, x, y, offset, stride);
+ }
+ if(kernel_data.film.cryptomatte_passes) {
+ /* Make sure no thread is writing to the buffers. */
+ ccl_barrier(CCL_LOCAL_MEM_FENCE);
+ if(thread_is_active) {
+ kernel_cryptomatte_post(kg, buffer, sample, x, y, offset, stride);
+ }
+ }
}
#else /* __COMPILE_ONLY_MEGAKERNEL__ */
diff --git a/intern/cycles/kernel/kernels/opencl/kernel_opencl_image.h b/intern/cycles/kernel/kernels/opencl/kernel_opencl_image.h
index dd9d683e030..79af831c2fb 100644
--- a/intern/cycles/kernel/kernels/opencl/kernel_opencl_image.h
+++ b/intern/cycles/kernel/kernels/opencl/kernel_opencl_image.h
@@ -142,7 +142,7 @@ ccl_device_inline float svm_image_texture_frac(float x, int *ix)
u[1] = (( 0.5f * t - 1.0f) * t ) * t + (2.0f/3.0f); \
u[2] = (( -0.5f * t + 0.5f) * t + 0.5f) * t + (1.0f/6.0f); \
u[3] = (1.0f / 6.0f) * t * t * t; \
- } (void)0
+ } (void) 0
ccl_device float4 kernel_tex_image_interp(KernelGlobals *kg, int id, float x, float y)
{
diff --git a/intern/cycles/kernel/osl/osl_closures.h b/intern/cycles/kernel/osl/osl_closures.h
index d9aeb9ab9fb..2a50704b569 100644
--- a/intern/cycles/kernel/osl/osl_closures.h
+++ b/intern/cycles/kernel/osl/osl_closures.h
@@ -146,4 +146,4 @@ CCLOSURE_PREPARE_STATIC(bsdf_##lower##_prepare, Upper##Closure)
CCL_NAMESPACE_END
-#endif /* __OSL_CLOSURES_H__ */
+#endif /* __OSL_CLOSURES_H__ */
diff --git a/intern/cycles/kernel/osl/osl_globals.h b/intern/cycles/kernel/osl/osl_globals.h
index 30b29793e2d..88192fbcccb 100644
--- a/intern/cycles/kernel/osl/osl_globals.h
+++ b/intern/cycles/kernel/osl/osl_globals.h
@@ -94,4 +94,4 @@ CCL_NAMESPACE_END
#endif
-#endif /* __OSL_GLOBALS_H__ */
+#endif /* __OSL_GLOBALS_H__ */
diff --git a/intern/cycles/kernel/osl/osl_services.cpp b/intern/cycles/kernel/osl/osl_services.cpp
index 7902381440b..97f97a4887e 100644
--- a/intern/cycles/kernel/osl/osl_services.cpp
+++ b/intern/cycles/kernel/osl/osl_services.cpp
@@ -884,6 +884,23 @@ bool OSLRenderServices::has_userdata(ustring name, TypeDesc type, OSL::ShaderGlo
return false; /* never called by OSL */
}
+TextureSystem::TextureHandle *OSLRenderServices::get_texture_handle(ustring filename)
+{
+ if(filename.length() && filename[0] == '@') {
+ /* Dummy, we don't use texture handles for builtin textures but need
+ * to tell the OSL runtime optimizer that this is a valid texture. */
+ return NULL;
+ }
+ else {
+ return texturesys()->get_texture_handle(filename);
+ }
+}
+
+bool OSLRenderServices::good(TextureSystem::TextureHandle *texture_handle)
+{
+ return texturesys()->good(texture_handle);
+}
+
bool OSLRenderServices::texture(ustring filename,
TextureHandle *texture_handle,
TexturePerthread *texture_thread_info,
@@ -894,7 +911,8 @@ bool OSLRenderServices::texture(ustring filename,
int nchannels,
float *result,
float *dresultds,
- float *dresultdt)
+ float *dresultdt,
+ ustring *errormessage)
{
OSL::TextureSystem *ts = osl_ts;
ShaderData *sd = (ShaderData *)(sg->renderstate);
@@ -1035,7 +1053,7 @@ bool OSLRenderServices::texture(ustring filename,
* other nasty stuff happening.
*/
string err = ts->geterror();
- (void)err;
+ (void) err;
}
return status;
@@ -1114,7 +1132,7 @@ bool OSLRenderServices::texture3d(ustring filename,
* other nasty stuff happening.
*/
string err = ts->geterror();
- (void)err;
+ (void) err;
}
return status;
@@ -1156,7 +1174,13 @@ bool OSLRenderServices::get_texture_info(OSL::ShaderGlobals *sg, ustring filenam
TypeDesc datatype, void *data)
{
OSL::TextureSystem *ts = osl_ts;
- return ts->get_texture_info(filename, subimage, dataname, datatype, data);
+ if(filename.length() && filename[0] == '@') {
+ /* Special builtin textures. */
+ return false;
+ }
+ else {
+ return ts->get_texture_info(filename, subimage, dataname, datatype, data);
+ }
}
int OSLRenderServices::pointcloud_search(OSL::ShaderGlobals *sg, ustring filename, const OSL::Vec3 &center,
diff --git a/intern/cycles/kernel/osl/osl_services.h b/intern/cycles/kernel/osl/osl_services.h
index 50044746fd1..712b06b41b8 100644
--- a/intern/cycles/kernel/osl/osl_services.h
+++ b/intern/cycles/kernel/osl/osl_services.h
@@ -93,6 +93,10 @@ public:
bool getmessage(OSL::ShaderGlobals *sg, ustring source, ustring name,
TypeDesc type, void *val, bool derivatives);
+ TextureSystem::TextureHandle *get_texture_handle(ustring filename);
+
+ bool good(TextureSystem::TextureHandle *texture_handle);
+
bool texture(ustring filename,
TextureSystem::TextureHandle *texture_handle,
TexturePerthread *texture_thread_info,
@@ -103,7 +107,8 @@ public:
int nchannels,
float *result,
float *dresultds,
- float *dresultdt);
+ float *dresultdt,
+ ustring *errormessage);
bool texture3d(ustring filename,
TextureHandle *texture_handle,
@@ -194,4 +199,4 @@ private:
CCL_NAMESPACE_END
-#endif /* __OSL_SERVICES_H__ */
+#endif /* __OSL_SERVICES_H__ */
diff --git a/intern/cycles/kernel/osl/osl_shader.cpp b/intern/cycles/kernel/osl/osl_shader.cpp
index 6a690e880ad..a89bb3fd1a3 100644
--- a/intern/cycles/kernel/osl/osl_shader.cpp
+++ b/intern/cycles/kernel/osl/osl_shader.cpp
@@ -193,7 +193,7 @@ void OSLShader::eval_surface(KernelGlobals *kg, ShaderData *sd, PathState *state
float data[9];
bool found = kg->osl->services->get_attribute(sd, true, OSLRenderServices::u_empty, TypeDesc::TypeVector,
OSLRenderServices::u_geom_undisplaced, data);
- (void)found;
+ (void) found;
assert(found);
memcpy(&sd->P, data, sizeof(float)*3);
diff --git a/intern/cycles/kernel/osl/osl_shader.h b/intern/cycles/kernel/osl/osl_shader.h
index 571a3f502be..9824f966a44 100644
--- a/intern/cycles/kernel/osl/osl_shader.h
+++ b/intern/cycles/kernel/osl/osl_shader.h
@@ -66,4 +66,4 @@ CCL_NAMESPACE_END
#endif
-#endif /* __OSL_SHADER_H__ */
+#endif /* __OSL_SHADER_H__ */
diff --git a/intern/cycles/kernel/shaders/oslutil.h b/intern/cycles/kernel/shaders/oslutil.h
index 141e5d27e3a..592a8ad12d9 100644
--- a/intern/cycles/kernel/shaders/oslutil.h
+++ b/intern/cycles/kernel/shaders/oslutil.h
@@ -92,4 +92,4 @@ float wireframe(string edge_type, float line_width) { return wireframe(edge_type
float wireframe(string edge_type) { return wireframe(edge_type, 1.0, 1); }
float wireframe() { return wireframe("polygons", 1.0, 1); }
-#endif /* CCL_OSLUTIL_H */
+#endif /* CCL_OSLUTIL_H */
diff --git a/intern/cycles/kernel/shaders/stdosl.h b/intern/cycles/kernel/shaders/stdosl.h
index 4a8378796ba..7136c746321 100644
--- a/intern/cycles/kernel/shaders/stdosl.h
+++ b/intern/cycles/kernel/shaders/stdosl.h
@@ -284,33 +284,63 @@ point rotate (point p, float angle, point a, point b)
normal ensure_valid_reflection(normal Ng, vector I, normal N)
{
+ /* The implementation here mirrors the one in kernel_montecarlo.h,
+ * check there for an explanation of the algorithm. */
+
float sqr(float x) { return x*x; }
vector R = 2*dot(N, I)*N - I;
- if (dot(Ng, R) >= 0.05) {
+
+ float threshold = min(0.9*dot(Ng, I), 0.01);
+ if(dot(Ng, R) >= threshold) {
return N;
}
- /* Form coordinate system with Ng as the Z axis and N inside the X-Z-plane.
- * The X axis is found by normalizing the component of N that's orthogonal to Ng.
- * The Y axis isn't actually needed.
- */
- vector X = normalize(N - dot(N, Ng)*Ng);
+ float NdotNg = dot(N, Ng);
+ vector X = normalize(N - NdotNg*Ng);
- /* Calculate N.z and N.x in the local coordinate system. */
float Ix = dot(I, X), Iz = dot(I, Ng);
- float Ix2 = sqr(dot(I, X)), Iz2 = sqr(dot(I, Ng));
- float Ix2Iz2 = Ix2 + Iz2;
-
- float a = sqrt(Ix2*(Ix2Iz2 - sqr(0.05)));
- float b = Iz*0.05 + Ix2Iz2;
- float c = (a + b > 0.0)? (a + b) : (-a + b);
+ float Ix2 = sqr(Ix), Iz2 = sqr(Iz);
+ float a = Ix2 + Iz2;
+
+ float b = sqrt(Ix2*(a - sqr(threshold)));
+ float c = Iz*threshold + a;
+
+ float fac = 0.5/a;
+ float N1_z2 = fac*(b+c), N2_z2 = fac*(-b+c);
+ int valid1 = (N1_z2 > 1e-5) && (N1_z2 <= (1.0 + 1e-5));
+ int valid2 = (N2_z2 > 1e-5) && (N2_z2 <= (1.0 + 1e-5));
+
+ float N_new_x, N_new_z;
+ if(valid1 && valid2) {
+ float N1_x = sqrt(1.0 - N1_z2), N1_z = sqrt(N1_z2);
+ float N2_x = sqrt(1.0 - N2_z2), N2_z = sqrt(N2_z2);
+
+ float R1 = 2*(N1_x*Ix + N1_z*Iz)*N1_z - Iz;
+ float R2 = 2*(N2_x*Ix + N2_z*Iz)*N2_z - Iz;
+
+ valid1 = (R1 >= 1e-5);
+ valid2 = (R2 >= 1e-5);
+ if(valid1 && valid2) {
+ N_new_x = (R1 < R2)? N1_x : N2_x;
+ N_new_z = (R1 < R2)? N1_z : N2_z;
+ }
+ else {
+ N_new_x = (R1 > R2)? N1_x : N2_x;
+ N_new_z = (R1 > R2)? N1_z : N2_z;
+ }
- float Nz = sqrt(0.5 * c * (1.0 / Ix2Iz2));
- float Nx = sqrt(1.0 - sqr(Nz));
+ }
+ else if(valid1 || valid2) {
+ float Nz2 = valid1? N1_z2 : N2_z2;
+ N_new_x = sqrt(1.0 - Nz2);
+ N_new_z = sqrt(Nz2);
+ }
+ else {
+ return Ng;
+ }
- /* Transform back into global coordinates. */
- return Nx*X + Nz*Ng;
+ return N_new_x*X + N_new_z*Ng;
}
@@ -485,7 +515,7 @@ float smooth_linearstep (float edge0, float edge1, float x_, float eps_) {
else if (x >= eps && x <= 1.0-eps) result = x;
else if (x >= 1.0+eps) result = 1;
else if (x < eps) result = rampup (x+eps, 2.0*eps);
- else /* if (x < 1.0+eps) */ result = 1.0 - rampup (1.0+eps - x, 2.0*eps);
+ else /* if (x < 1.0+eps) */ result = 1.0 - rampup (1.0+eps - x, 2.0*eps);
} else {
result = step (edge0, x_);
}
@@ -656,4 +686,4 @@ int getmatrix (string fromspace, output matrix M) {
#undef PERCOMP2
#undef PERCOMP2F
-#endif /* CCL_STDOSL_H */
+#endif /* CCL_STDOSL_H */
diff --git a/intern/cycles/kernel/split/kernel_buffer_update.h b/intern/cycles/kernel/split/kernel_buffer_update.h
index 180c0b57077..18eec6372f1 100644
--- a/intern/cycles/kernel/split/kernel_buffer_update.h
+++ b/intern/cycles/kernel/split/kernel_buffer_update.h
@@ -80,8 +80,10 @@ ccl_device void kernel_buffer_update(KernelGlobals *kg,
PathRadiance *L = &kernel_split_state.path_radiance[ray_index];
ccl_global Ray *ray = &kernel_split_state.ray[ray_index];
ccl_global float3 *throughput = &kernel_split_state.throughput[ray_index];
+ bool ray_was_updated = false;
if(IS_STATE(ray_state, ray_index, RAY_UPDATE_BUFFER)) {
+ ray_was_updated = true;
uint sample = state->sample;
uint buffer_offset = kernel_split_state.buffer_offset[ray_index];
ccl_global float *buffer = kernel_split_params.tile.buffer + buffer_offset;
@@ -92,6 +94,17 @@ ccl_device void kernel_buffer_update(KernelGlobals *kg,
ASSIGN_RAY_STATE(ray_state, ray_index, RAY_TO_REGENERATE);
}
+ if(kernel_data.film.cryptomatte_passes) {
+ /* Make sure no thread is writing to the buffers. */
+ ccl_barrier(CCL_LOCAL_MEM_FENCE);
+ if(ray_was_updated && state->sample - 1 == kernel_data.integrator.aa_samples) {
+ uint buffer_offset = kernel_split_state.buffer_offset[ray_index];
+ ccl_global float *buffer = kernel_split_params.tile.buffer + buffer_offset;
+ ccl_global float *cryptomatte_buffer = buffer + kernel_data.film.pass_cryptomatte;
+ kernel_sort_id_slots(cryptomatte_buffer, 2 * kernel_data.film.cryptomatte_depth);
+ }
+ }
+
if(IS_STATE(ray_state, ray_index, RAY_TO_REGENERATE)) {
/* We have completed current work; So get next work */
ccl_global uint *work_pools = kernel_split_params.work_pools;
diff --git a/intern/cycles/kernel/split/kernel_shader_sort.h b/intern/cycles/kernel/split/kernel_shader_sort.h
index 2132c42220f..666355de334 100644
--- a/intern/cycles/kernel/split/kernel_shader_sort.h
+++ b/intern/cycles/kernel/split/kernel_shader_sort.h
@@ -78,7 +78,7 @@ ccl_device void kernel_shader_sort(KernelGlobals *kg,
}
}
}
-# endif /* __KERNEL_OPENCL__ */
+# endif /* __KERNEL_OPENCL__ */
/* copy to destination */
for(uint i = 0; i < SHADER_SORT_BLOCK_SIZE; i += SHADER_SORT_LOCAL_SIZE) {
@@ -91,7 +91,7 @@ ccl_device void kernel_shader_sort(KernelGlobals *kg,
kernel_split_state.queue_data[outi] = (value == (~0)) ? QUEUE_EMPTY_SLOT : kernel_split_state.queue_data[ini];
}
}
-#endif /* __KERNEL_CUDA__ */
+#endif /* __KERNEL_CUDA__ */
}
CCL_NAMESPACE_END
diff --git a/intern/cycles/kernel/split/kernel_split_data.h b/intern/cycles/kernel/split/kernel_split_data.h
index 9297e1e0ad5..3f6b3977d79 100644
--- a/intern/cycles/kernel/split/kernel_split_data.h
+++ b/intern/cycles/kernel/split/kernel_split_data.h
@@ -24,7 +24,7 @@ CCL_NAMESPACE_BEGIN
ccl_device_inline uint64_t split_data_buffer_size(KernelGlobals *kg, size_t num_elements)
{
- (void)kg; /* Unused on CPU. */
+ (void) kg; /* Unused on CPU. */
uint64_t size = 0;
#define SPLIT_DATA_ENTRY(type, name, num) + align_up(num_elements * num * sizeof(type), 16)
@@ -48,7 +48,7 @@ ccl_device_inline void split_data_init(KernelGlobals *kg,
ccl_global void *data,
ccl_global char *ray_state)
{
- (void)kg; /* Unused on CPU. */
+ (void) kg; /* Unused on CPU. */
ccl_global char *p = (ccl_global char*)data;
diff --git a/intern/cycles/kernel/split/kernel_split_data_types.h b/intern/cycles/kernel/split/kernel_split_data_types.h
index 56194d9f857..83df1e2a0a6 100644
--- a/intern/cycles/kernel/split/kernel_split_data_types.h
+++ b/intern/cycles/kernel/split/kernel_split_data_types.h
@@ -86,14 +86,14 @@ typedef ccl_global struct SplitBranchedState {
SPLIT_DATA_ENTRY(ccl_global SubsurfaceIndirectRays, ss_rays, 1)
#else
# define SPLIT_DATA_SUBSURFACE_ENTRIES
-#endif /* __SUBSURFACE__ */
+#endif /* __SUBSURFACE__ */
#ifdef __VOLUME__
# define SPLIT_DATA_VOLUME_ENTRIES \
SPLIT_DATA_ENTRY(ccl_global PathState, state_shadow, 1)
#else
# define SPLIT_DATA_VOLUME_ENTRIES
-#endif /* __VOLUME__ */
+#endif /* __VOLUME__ */
#define SPLIT_DATA_ENTRIES \
SPLIT_DATA_ENTRY(ccl_global float3, throughput, 1) \
diff --git a/intern/cycles/kernel/svm/svm.h b/intern/cycles/kernel/svm/svm.h
index ab69afa051e..ccb9aef7a5b 100644
--- a/intern/cycles/kernel/svm/svm.h
+++ b/intern/cycles/kernel/svm/svm.h
@@ -313,7 +313,7 @@ ccl_device_noinline void svm_eval_nodes(KernelGlobals *kg, ShaderData *sd, ccl_a
case NODE_LEAVE_BUMP_EVAL:
svm_node_leave_bump_eval(kg, sd, stack, node.y);
break;
-# endif /* NODES_FEATURE(NODE_FEATURE_BUMP_STATE) */
+# endif /* NODES_FEATURE(NODE_FEATURE_BUMP_STATE) */
# endif /* NODES_FEATURE(NODE_FEATURE_BUMP) */
case NODE_HSV:
svm_node_hsv(kg, sd, stack, node, &offset);
@@ -497,4 +497,4 @@ ccl_device_noinline void svm_eval_nodes(KernelGlobals *kg, ShaderData *sd, ccl_a
CCL_NAMESPACE_END
-#endif /* __SVM_H__ */
+#endif /* __SVM_H__ */
diff --git a/intern/cycles/kernel/svm/svm_closure.h b/intern/cycles/kernel/svm/svm_closure.h
index 64bf8244999..3cf33f4d431 100644
--- a/intern/cycles/kernel/svm/svm_closure.h
+++ b/intern/cycles/kernel/svm/svm_closure.h
@@ -262,7 +262,7 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *
? (MicrofacetExtra*)closure_alloc_extra(sd, sizeof(MicrofacetExtra))
: NULL;
- if (bsdf && extra) {
+ if(bsdf && extra) {
bsdf->N = N;
bsdf->ior = (2.0f / (1.0f - safe_sqrtf(0.08f * specular))) - 1.0f;
bsdf->T = T;
@@ -285,7 +285,7 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *
/* setup bsdf */
if(distribution == CLOSURE_BSDF_MICROFACET_GGX_GLASS_ID || roughness <= 0.075f) /* use single-scatter GGX */
sd->flag |= bsdf_microfacet_ggx_aniso_fresnel_setup(bsdf, sd);
- else /* use multi-scatter GGX */
+ else /* use multi-scatter GGX */
sd->flag |= bsdf_microfacet_multi_ggx_aniso_fresnel_setup(bsdf, sd);
}
}
@@ -314,7 +314,7 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *
? (MicrofacetExtra*)closure_alloc_extra(sd, sizeof(MicrofacetExtra))
: NULL;
- if (bsdf && extra) {
+ if(bsdf && extra) {
bsdf->N = N;
bsdf->T = make_float3(0.0f, 0.0f, 0.0f);
bsdf->extra = extra;
diff --git a/intern/cycles/kernel/svm/svm_hsv.h b/intern/cycles/kernel/svm/svm_hsv.h
index 27127b85323..41538d1138d 100644
--- a/intern/cycles/kernel/svm/svm_hsv.h
+++ b/intern/cycles/kernel/svm/svm_hsv.h
@@ -59,4 +59,4 @@ ccl_device void svm_node_hsv(KernelGlobals *kg, ShaderData *sd, float *stack, ui
CCL_NAMESPACE_END
-#endif /* __SVM_HSV_H__ */
+#endif /* __SVM_HSV_H__ */
diff --git a/intern/cycles/kernel/svm/svm_ramp.h b/intern/cycles/kernel/svm/svm_ramp.h
index a3e4b6e87cd..6f39391057e 100644
--- a/intern/cycles/kernel/svm/svm_ramp.h
+++ b/intern/cycles/kernel/svm/svm_ramp.h
@@ -108,4 +108,4 @@ ccl_device void svm_node_curves(KernelGlobals *kg, ShaderData *sd, float *stack,
CCL_NAMESPACE_END
-#endif /* __SVM_RAMP_H__ */
+#endif /* __SVM_RAMP_H__ */
diff --git a/intern/cycles/kernel/svm/svm_ramp_util.h b/intern/cycles/kernel/svm/svm_ramp_util.h
index a67689ff9d1..847108ff1c2 100644
--- a/intern/cycles/kernel/svm/svm_ramp_util.h
+++ b/intern/cycles/kernel/svm/svm_ramp_util.h
@@ -95,4 +95,4 @@ ccl_device float float_ramp_lookup(const float *ramp,
CCL_NAMESPACE_END
-#endif /* __SVM_RAMP_UTIL_H__ */
+#endif /* __SVM_RAMP_UTIL_H__ */
diff --git a/intern/cycles/kernel/svm/svm_types.h b/intern/cycles/kernel/svm/svm_types.h
index 910537a2539..0f1dfa4936b 100644
--- a/intern/cycles/kernel/svm/svm_types.h
+++ b/intern/cycles/kernel/svm/svm_types.h
@@ -531,4 +531,4 @@ typedef enum ClosureType {
CCL_NAMESPACE_END
-#endif /* __SVM_TYPES_H__ */
+#endif /* __SVM_TYPES_H__ */
diff --git a/intern/cycles/kernel/svm/svm_wave.h b/intern/cycles/kernel/svm/svm_wave.h
index 7b60ab6e6ae..80b63dc80cd 100644
--- a/intern/cycles/kernel/svm/svm_wave.h
+++ b/intern/cycles/kernel/svm/svm_wave.h
@@ -24,7 +24,7 @@ ccl_device_noinline float svm_wave(NodeWaveType type, NodeWaveProfile profile, f
if(type == NODE_WAVE_BANDS)
n = (p.x + p.y + p.z) * 10.0f;
- else /* NODE_WAVE_RINGS */
+ else /* NODE_WAVE_RINGS */
n = len(p) * 20.0f;
if(distortion != 0.0f)
diff --git a/intern/cycles/render/CMakeLists.txt b/intern/cycles/render/CMakeLists.txt
index 7d2220f37f9..c0ce7368771 100644
--- a/intern/cycles/render/CMakeLists.txt
+++ b/intern/cycles/render/CMakeLists.txt
@@ -15,6 +15,7 @@ set(SRC
buffers.cpp
camera.cpp
constant_fold.cpp
+ coverage.cpp
film.cpp
graph.cpp
image.cpp
@@ -46,6 +47,7 @@ set(SRC_HEADERS
buffers.h
camera.h
constant_fold.h
+ coverage.h
film.h
graph.h
image.h
diff --git a/intern/cycles/render/attribute.h b/intern/cycles/render/attribute.h
index 40e5be2e1b2..e7438f4513d 100644
--- a/intern/cycles/render/attribute.h
+++ b/intern/cycles/render/attribute.h
@@ -172,4 +172,4 @@ public:
CCL_NAMESPACE_END
-#endif /* __ATTRIBUTE_H__ */
+#endif /* __ATTRIBUTE_H__ */
diff --git a/intern/cycles/render/background.h b/intern/cycles/render/background.h
index 3f56dedb2c8..17c3eaaaaf5 100644
--- a/intern/cycles/render/background.h
+++ b/intern/cycles/render/background.h
@@ -59,4 +59,4 @@ public:
CCL_NAMESPACE_END
-#endif /* __BACKGROUND_H__ */
+#endif /* __BACKGROUND_H__ */
diff --git a/intern/cycles/render/bake.h b/intern/cycles/render/bake.h
index a811eac3327..fce8f2fa606 100644
--- a/intern/cycles/render/bake.h
+++ b/intern/cycles/render/bake.h
@@ -83,4 +83,4 @@ private:
CCL_NAMESPACE_END
-#endif /* __BAKE_H__ */
+#endif /* __BAKE_H__ */
diff --git a/intern/cycles/render/buffers.cpp b/intern/cycles/render/buffers.cpp
index 4cd8b3726d3..f901885e679 100644
--- a/intern/cycles/render/buffers.cpp
+++ b/intern/cycles/render/buffers.cpp
@@ -147,7 +147,7 @@ bool RenderBuffers::copy_from_device()
return true;
}
-bool RenderBuffers::get_denoising_pass_rect(int offset, float exposure, int sample, int components, float *pixels)
+bool RenderBuffers::get_denoising_pass_rect(int type, float exposure, int sample, int components, float *pixels)
{
if(buffer.data() == NULL) {
return false;
@@ -155,19 +155,20 @@ bool RenderBuffers::get_denoising_pass_rect(int offset, float exposure, int samp
float invsample = 1.0f/sample;
float scale = invsample;
- bool variance = (offset == DENOISING_PASS_NORMAL_VAR) ||
- (offset == DENOISING_PASS_ALBEDO_VAR) ||
- (offset == DENOISING_PASS_DEPTH_VAR) ||
- (offset == DENOISING_PASS_COLOR_VAR);
-
- if(offset == DENOISING_PASS_COLOR || offset == DENOISING_PASS_CLEAN) {
- scale *= exposure;
+ bool variance = (type == DENOISING_PASS_NORMAL_VAR) ||
+ (type == DENOISING_PASS_ALBEDO_VAR) ||
+ (type == DENOISING_PASS_DEPTH_VAR) ||
+ (type == DENOISING_PASS_COLOR_VAR);
+
+ float scale_exposure = scale;
+ if(type == DENOISING_PASS_COLOR || type == DENOISING_PASS_CLEAN) {
+ scale_exposure *= exposure;
}
- else if(offset == DENOISING_PASS_COLOR_VAR) {
- scale *= exposure*exposure;
+ else if(type == DENOISING_PASS_COLOR_VAR) {
+ scale_exposure *= exposure*exposure;
}
- offset += params.get_denoising_offset();
+ int offset = type + params.get_denoising_offset();
int pass_stride = params.get_passes_size();
int size = params.width*params.height;
@@ -181,14 +182,14 @@ bool RenderBuffers::get_denoising_pass_rect(int offset, float exposure, int samp
if(components == 1) {
for(int i = 0; i < size; i++, mean += pass_stride, var += pass_stride, pixels++) {
- pixels[0] = max(0.0f, var[0] - mean[0]*mean[0]*invsample)*scale;
+ pixels[0] = max(0.0f, var[0] - mean[0]*mean[0]*invsample)*scale_exposure;
}
}
else if(components == 3) {
for(int i = 0; i < size; i++, mean += pass_stride, var += pass_stride, pixels += 3) {
- pixels[0] = max(0.0f, var[0] - mean[0]*mean[0]*invsample)*scale;
- pixels[1] = max(0.0f, var[1] - mean[1]*mean[1]*invsample)*scale;
- pixels[2] = max(0.0f, var[2] - mean[2]*mean[2]*invsample)*scale;
+ pixels[0] = max(0.0f, var[0] - mean[0]*mean[0]*invsample)*scale_exposure;
+ pixels[1] = max(0.0f, var[1] - mean[1]*mean[1]*invsample)*scale_exposure;
+ pixels[2] = max(0.0f, var[2] - mean[2]*mean[2]*invsample)*scale_exposure;
}
}
else {
@@ -200,14 +201,28 @@ bool RenderBuffers::get_denoising_pass_rect(int offset, float exposure, int samp
if(components == 1) {
for(int i = 0; i < size; i++, in += pass_stride, pixels++) {
- pixels[0] = in[0]*scale;
+ pixels[0] = in[0]*scale_exposure;
}
}
else if(components == 3) {
for(int i = 0; i < size; i++, in += pass_stride, pixels += 3) {
- pixels[0] = in[0]*scale;
- pixels[1] = in[1]*scale;
- pixels[2] = in[2]*scale;
+ pixels[0] = in[0]*scale_exposure;
+ pixels[1] = in[1]*scale_exposure;
+ pixels[2] = in[2]*scale_exposure;
+ }
+ }
+ else if(components == 4) {
+ assert(type == DENOISING_PASS_COLOR);
+
+ /* Since the alpha channel is not involved in denoising, output the Combined alpha channel. */
+ assert(params.passes[0].type == PASS_COMBINED);
+ float *in_combined = buffer.data();
+
+ for(int i = 0; i < size; i++, in += pass_stride, in_combined += pass_stride, pixels += 4) {
+ pixels[0] = in[0]*scale_exposure;
+ pixels[1] = in[1]*scale_exposure;
+ pixels[2] = in[2]*scale_exposure;
+ pixels[3] = saturate(in_combined[3]*scale);
}
}
else {
@@ -218,7 +233,7 @@ bool RenderBuffers::get_denoising_pass_rect(int offset, float exposure, int samp
return true;
}
-bool RenderBuffers::get_pass_rect(PassType type, float exposure, int sample, int components, float *pixels)
+bool RenderBuffers::get_pass_rect(PassType type, float exposure, int sample, int components, float *pixels, const string &name)
{
if(buffer.data() == NULL) {
return false;
@@ -234,6 +249,14 @@ bool RenderBuffers::get_pass_rect(PassType type, float exposure, int sample, int
continue;
}
+ /* Tell Cryptomatte passes apart by their name. */
+ if(pass.type == PASS_CRYPTOMATTE) {
+ if(pass.name != name) {
+ pass_offset += pass.components;
+ continue;
+ }
+ }
+
float *in = buffer.data() + pass_offset;
int pass_stride = params.get_passes_size();
@@ -370,6 +393,17 @@ bool RenderBuffers::get_pass_rect(PassType type, float exposure, int sample, int
pixels[3] = f.w*invw;
}
}
+ else if(type == PASS_CRYPTOMATTE) {
+ for(int i = 0; i < size; i++, in += pass_stride, pixels += 4) {
+ float4 f = make_float4(in[0], in[1], in[2], in[3]);
+ /* x and z contain integer IDs, don't rescale them.
+ y and w contain matte weights, they get scaled. */
+ pixels[0] = f.x;
+ pixels[1] = f.y * scale;
+ pixels[2] = f.z;
+ pixels[3] = f.w * scale;
+ }
+ }
else {
for(int i = 0; i < size; i++, in += pass_stride, pixels += 4) {
float4 f = make_float4(in[0], in[1], in[2], in[3]);
diff --git a/intern/cycles/render/buffers.h b/intern/cycles/render/buffers.h
index 1b06ffe33a6..46c3b89bd84 100644
--- a/intern/cycles/render/buffers.h
+++ b/intern/cycles/render/buffers.h
@@ -50,7 +50,7 @@ public:
int full_height;
/* passes */
- array<Pass> passes;
+ vector<Pass> passes;
bool denoising_data_pass;
/* If only some light path types should be denoised, an additional pass is needed. */
bool denoising_clean_pass;
@@ -84,7 +84,7 @@ public:
void zero();
bool copy_from_device();
- bool get_pass_rect(PassType type, float exposure, int sample, int components, float *pixels);
+ bool get_pass_rect(PassType type, float exposure, int sample, int components, float *pixels, const string &name);
bool get_denoising_pass_rect(int offset, float exposure, int sample, int components, float *pixels);
};
@@ -146,4 +146,4 @@ public:
CCL_NAMESPACE_END
-#endif /* __BUFFERS_H__ */
+#endif /* __BUFFERS_H__ */
diff --git a/intern/cycles/render/camera.cpp b/intern/cycles/render/camera.cpp
index ec3c56e820a..34066e1b024 100644
--- a/intern/cycles/render/camera.cpp
+++ b/intern/cycles/render/camera.cpp
@@ -716,7 +716,7 @@ float Camera::world_to_raster_size(float3 P)
float3 D = transform_point(&worldtocamera, P);
float dist = len(D);
- Ray ray = {0};
+ Ray ray = {{0}};
/* Distortion can become so great that the results become meaningless, there
* may be a better way to do this, but calculating differentials from the
diff --git a/intern/cycles/render/camera.h b/intern/cycles/render/camera.h
index 323f2c61ca4..37f5dea624f 100644
--- a/intern/cycles/render/camera.h
+++ b/intern/cycles/render/camera.h
@@ -21,6 +21,7 @@
#include "graph/node.h"
+#include "util/util_array.h"
#include "util/util_boundbox.h"
#include "util/util_projection.h"
#include "util/util_transform.h"
@@ -212,4 +213,4 @@ private:
CCL_NAMESPACE_END
-#endif /* __CAMERA_H__ */
+#endif /* __CAMERA_H__ */
diff --git a/intern/cycles/render/constant_fold.h b/intern/cycles/render/constant_fold.h
index 26fa4e8b1c8..6ec94b055e3 100644
--- a/intern/cycles/render/constant_fold.h
+++ b/intern/cycles/render/constant_fold.h
@@ -70,4 +70,4 @@ public:
CCL_NAMESPACE_END
-#endif /* __CONSTANT_FOLD_H__ */
+#endif /* __CONSTANT_FOLD_H__ */
diff --git a/intern/cycles/render/coverage.cpp b/intern/cycles/render/coverage.cpp
new file mode 100644
index 00000000000..72ef4cda3ff
--- /dev/null
+++ b/intern/cycles/render/coverage.cpp
@@ -0,0 +1,143 @@
+/*
+ * Copyright 2018 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.
+ */
+
+#include "render/coverage.h"
+#include "kernel/kernel_compat_cpu.h"
+#include "kernel/split/kernel_split_data.h"
+#include "kernel/kernel_globals.h"
+#include "kernel/kernel_id_passes.h"
+#include "kernel/kernel_types.h"
+#include "util/util_map.h"
+#include "util/util_vector.h"
+
+CCL_NAMESPACE_BEGIN
+
+static bool crypomatte_comp(const pair<float, float>& i, const pair<float, float> j) { return i.first > j.first; }
+
+void Coverage::finalize()
+{
+ int pass_offset = 0;
+ if(kernel_data.film.cryptomatte_passes & CRYPT_OBJECT) {
+ finalize_buffer(coverage_object, pass_offset);
+ pass_offset += kernel_data.film.cryptomatte_depth * 4;
+ }
+ if(kernel_data.film.cryptomatte_passes & CRYPT_MATERIAL) {
+ finalize_buffer(coverage_material, pass_offset);
+ pass_offset += kernel_data.film.cryptomatte_depth * 4;
+ }
+ if(kernel_data.film.cryptomatte_passes & CRYPT_ASSET) {
+ finalize_buffer(coverage_asset, pass_offset);
+ }
+}
+
+void Coverage::init_path_trace()
+{
+ kg->coverage_object = kg->coverage_material = kg->coverage_asset = NULL;
+
+ if(kernel_data.film.cryptomatte_passes & CRYPT_ACCURATE) {
+ if(kernel_data.film.cryptomatte_passes & CRYPT_OBJECT) {
+ coverage_object.clear();
+ coverage_object.resize(tile.w * tile.h);
+ }
+ if(kernel_data.film.cryptomatte_passes & CRYPT_MATERIAL) {
+ coverage_material.clear();
+ coverage_material.resize(tile.w * tile.h);
+ }
+ if(kernel_data.film.cryptomatte_passes & CRYPT_ASSET) {
+ coverage_asset.clear();
+ coverage_asset.resize(tile.w * tile.h);
+ }
+ }
+}
+
+void Coverage::init_pixel(int x, int y)
+{
+ if(kernel_data.film.cryptomatte_passes & CRYPT_ACCURATE) {
+ const int pixel_index = tile.w * (y - tile.y) + x - tile.x;
+ if(kernel_data.film.cryptomatte_passes & CRYPT_OBJECT) {
+ kg->coverage_object = &coverage_object[pixel_index];
+ }
+ if(kernel_data.film.cryptomatte_passes & CRYPT_MATERIAL) {
+ kg->coverage_material = &coverage_material[pixel_index];
+ }
+ if(kernel_data.film.cryptomatte_passes & CRYPT_ASSET) {
+ kg->coverage_asset = &coverage_asset[pixel_index];
+ }
+ }
+}
+
+void Coverage::finalize_buffer(vector<CoverageMap> & coverage, const int pass_offset)
+{
+ if(kernel_data.film.cryptomatte_passes & CRYPT_ACCURATE) {
+ flatten_buffer(coverage, pass_offset);
+ }
+ else {
+ sort_buffer(pass_offset);
+ }
+}
+
+void Coverage::flatten_buffer(vector<CoverageMap> &coverage, const int pass_offset)
+{
+ /* Sort the coverage map and write it to the output */
+ int pixel_index = 0;
+ int pass_stride = tile.buffers->params.get_passes_size();
+ for(int y = 0; y < tile.h; ++y) {
+ for(int x = 0; x < tile.w; ++x) {
+ const CoverageMap& pixel = coverage[pixel_index];
+ if(!pixel.empty()) {
+ /* buffer offset */
+ int index = x + y * tile.stride;
+ float *buffer = (float*)tile.buffer + index*pass_stride;
+
+ /* sort the cryptomatte pixel */
+ vector<pair<float, float> > sorted_pixel;
+ for(CoverageMap::const_iterator it = pixel.begin(); it != pixel.end(); ++it) {
+ sorted_pixel.push_back(std::make_pair(it->second, it->first));
+ }
+ sort(sorted_pixel.begin(), sorted_pixel.end(), crypomatte_comp);
+ int num_slots = 2 * (kernel_data.film.cryptomatte_depth);
+ if(sorted_pixel.size() > num_slots) {
+ float leftover = 0.0f;
+ for(vector<pair<float, float> >::iterator it = sorted_pixel.begin()+num_slots; it != sorted_pixel.end(); ++it) {
+ leftover += it->first;
+ }
+ sorted_pixel[num_slots-1].first += leftover;
+ }
+ int limit = min(num_slots, sorted_pixel.size());
+ for(int i = 0; i < limit; ++i) {
+ kernel_write_id_slots(buffer + kernel_data.film.pass_cryptomatte + pass_offset, 2 * (kernel_data.film.cryptomatte_depth), sorted_pixel[i].second, sorted_pixel[i].first);
+ }
+ }
+ ++pixel_index;
+ }
+ }
+}
+
+void Coverage::sort_buffer(const int pass_offset)
+{
+ /* Sort the coverage map and write it to the output */
+ int pass_stride = tile.buffers->params.get_passes_size();
+ for(int y = 0; y < tile.h; ++y) {
+ for(int x = 0; x < tile.w; ++x) {
+ /* buffer offset */
+ int index = x + y*tile.stride;
+ float *buffer = (float*)tile.buffer + index*pass_stride;
+ kernel_sort_id_slots(buffer + kernel_data.film.pass_cryptomatte + pass_offset, 2 * (kernel_data.film.cryptomatte_depth));
+ }
+ }
+}
+
+CCL_NAMESPACE_END
diff --git a/intern/cycles/render/coverage.h b/intern/cycles/render/coverage.h
new file mode 100644
index 00000000000..9ee0bce7517
--- /dev/null
+++ b/intern/cycles/render/coverage.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2018 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.
+ */
+
+#include "render/buffers.h"
+#include "kernel/kernel_compat_cpu.h"
+#include "kernel/split/kernel_split_data.h"
+#include "kernel/kernel_globals.h"
+#include "util/util_map.h"
+#include "util/util_vector.h"
+
+#ifndef __COVERAGE_H__
+#define __COVERAGE_H__
+
+CCL_NAMESPACE_BEGIN
+
+class Coverage {
+public:
+ Coverage(KernelGlobals *kg_, RenderTile &tile_) : kg(kg_), tile(tile_) { }
+ void init_path_trace();
+ void init_pixel(int x, int y);
+ void finalize();
+private:
+ vector<CoverageMap>coverage_object;
+ vector<CoverageMap>coverage_material;
+ vector<CoverageMap>coverage_asset;
+ KernelGlobals *kg;
+ RenderTile &tile;
+ void finalize_buffer(vector<CoverageMap>&coverage, const int pass_offset);
+ void flatten_buffer(vector<CoverageMap>&coverage, const int pass_offset);
+ void sort_buffer(const int pass_offset);
+};
+
+
+CCL_NAMESPACE_END
+
+#endif /* __COVERAGE_H__ */
diff --git a/intern/cycles/render/curves.h b/intern/cycles/render/curves.h
index 62066d8a809..cf75751c58f 100644
--- a/intern/cycles/render/curves.h
+++ b/intern/cycles/render/curves.h
@@ -17,8 +17,8 @@
#ifndef __CURVES_H__
#define __CURVES_H__
+#include "util/util_array.h"
#include "util/util_types.h"
-#include "util/util_vector.h"
CCL_NAMESPACE_BEGIN
@@ -119,4 +119,4 @@ public:
CCL_NAMESPACE_END
-#endif /* __CURVES_H__ */
+#endif /* __CURVES_H__ */
diff --git a/intern/cycles/render/film.cpp b/intern/cycles/render/film.cpp
index 8f3596ade58..d0f15496e50 100644
--- a/intern/cycles/render/film.cpp
+++ b/intern/cycles/render/film.cpp
@@ -38,11 +38,14 @@ static bool compare_pass_order(const Pass& a, const Pass& b)
return (a.components > b.components);
}
-void Pass::add(PassType type, array<Pass>& passes)
+void Pass::add(PassType type, vector<Pass>& passes, const char *name)
{
- for(size_t i = 0; i < passes.size(); i++)
- if(passes[i].type == type)
+ for(size_t i = 0; i < passes.size(); i++) {
+ if(passes[i].type == type &&
+ (name ? (passes[i].name == name) : passes[i].name.empty())) {
return;
+ }
+ }
Pass pass;
@@ -50,6 +53,9 @@ void Pass::add(PassType type, array<Pass>& passes)
pass.filter = true;
pass.exposure = false;
pass.divide_type = PASS_NONE;
+ if(name) {
+ pass.name = name;
+ }
switch(type) {
case PASS_NONE:
@@ -155,13 +161,15 @@ void Pass::add(PassType type, array<Pass>& passes)
pass.components = 4;
pass.exposure = true;
break;
-
+ case PASS_CRYPTOMATTE:
+ pass.components = 4;
+ break;
default:
assert(false);
break;
}
- passes.push_back_slow(pass);
+ passes.push_back(pass);
/* order from by components, to ensure alignment so passes with size 4
* come first and then passes with size 1 */
@@ -171,19 +179,19 @@ void Pass::add(PassType type, array<Pass>& passes)
Pass::add(pass.divide_type, passes);
}
-bool Pass::equals(const array<Pass>& A, const array<Pass>& B)
+bool Pass::equals(const vector<Pass>& A, const vector<Pass>& B)
{
if(A.size() != B.size())
return false;
for(int i = 0; i < A.size(); i++)
- if(A[i].type != B[i].type)
+ if(A[i].type != B[i].type || A[i].name != B[i].name)
return false;
return true;
}
-bool Pass::contains(const array<Pass>& passes, PassType type)
+bool Pass::contains(const vector<Pass>& passes, PassType type)
{
for(size_t i = 0; i < passes.size(); i++)
if(passes[i].type == type)
@@ -290,6 +298,7 @@ Film::Film()
use_light_visibility = false;
filter_table_offset = TABLE_OFFSET_INVALID;
+ cryptomatte_passes = CRYPT_NONE;
need_update = true;
}
@@ -314,6 +323,8 @@ void Film::device_update(Device *device, DeviceScene *dscene, Scene *scene)
kfilm->pass_stride = 0;
kfilm->use_light_pass = use_light_visibility || use_sample_clamp;
+ bool have_cryptomatte = false;
+
for(size_t i = 0; i < passes.size(); i++) {
Pass& pass = passes[i];
@@ -434,7 +445,10 @@ void Film::device_update(Device *device, DeviceScene *dscene, Scene *scene)
#endif
case PASS_RENDER_TIME:
break;
-
+ case PASS_CRYPTOMATTE:
+ kfilm->pass_cryptomatte = have_cryptomatte ? min(kfilm->pass_cryptomatte, kfilm->pass_stride) : kfilm->pass_stride;
+ have_cryptomatte = true;
+ break;
default:
assert(false);
break;
@@ -471,6 +485,9 @@ void Film::device_update(Device *device, DeviceScene *dscene, Scene *scene)
kfilm->mist_inv_depth = (mist_depth > 0.0f)? 1.0f/mist_depth: 0.0f;
kfilm->mist_falloff = mist_falloff;
+ kfilm->cryptomatte_passes = cryptomatte_passes;
+ kfilm->cryptomatte_depth = cryptomatte_depth;
+
pass_stride = kfilm->pass_stride;
denoising_data_offset = kfilm->pass_denoising_data;
denoising_clean_offset = kfilm->pass_denoising_clean;
@@ -490,7 +507,7 @@ bool Film::modified(const Film& film)
return !Node::equals(film) || !Pass::equals(passes, film.passes);
}
-void Film::tag_passes_update(Scene *scene, const array<Pass>& passes_)
+void Film::tag_passes_update(Scene *scene, const vector<Pass>& passes_)
{
if(Pass::contains(passes, PASS_UV) != Pass::contains(passes_, PASS_UV)) {
scene->mesh_manager->tag_update(scene);
diff --git a/intern/cycles/render/film.h b/intern/cycles/render/film.h
index 6ab2eea79b8..c597db4e4c5 100644
--- a/intern/cycles/render/film.h
+++ b/intern/cycles/render/film.h
@@ -45,10 +45,11 @@ public:
bool filter;
bool exposure;
PassType divide_type;
+ string name;
- static void add(PassType type, array<Pass>& passes);
- static bool equals(const array<Pass>& A, const array<Pass>& B);
- static bool contains(const array<Pass>& passes, PassType);
+ static void add(PassType type, vector<Pass>& passes, const char* name = NULL);
+ static bool equals(const vector<Pass>& A, const vector<Pass>& B);
+ static bool contains(const vector<Pass>& passes, PassType);
};
class Film : public Node {
@@ -56,7 +57,7 @@ public:
NODE_DECLARE
float exposure;
- array<Pass> passes;
+ vector<Pass> passes;
bool denoising_data_pass;
bool denoising_clean_pass;
int denoising_flags;
@@ -76,6 +77,8 @@ public:
bool use_light_visibility;
bool use_sample_clamp;
+ CryptomatteType cryptomatte_passes;
+ int cryptomatte_depth;
bool need_update;
@@ -86,10 +89,10 @@ public:
void device_free(Device *device, DeviceScene *dscene, Scene *scene);
bool modified(const Film& film);
- void tag_passes_update(Scene *scene, const array<Pass>& passes_);
+ void tag_passes_update(Scene *scene, const vector<Pass>& passes_);
void tag_update(Scene *scene);
};
CCL_NAMESPACE_END
-#endif /* __FILM_H__ */
+#endif /* __FILM_H__ */
diff --git a/intern/cycles/render/graph.h b/intern/cycles/render/graph.h
index 426522066b3..d14a59b4900 100644
--- a/intern/cycles/render/graph.h
+++ b/intern/cycles/render/graph.h
@@ -293,4 +293,4 @@ protected:
CCL_NAMESPACE_END
-#endif /* __GRAPH_H__ */
+#endif /* __GRAPH_H__ */
diff --git a/intern/cycles/render/image.h b/intern/cycles/render/image.h
index d94ebe564e3..8367a6811bd 100644
--- a/intern/cycles/render/image.h
+++ b/intern/cycles/render/image.h
@@ -164,4 +164,4 @@ private:
CCL_NAMESPACE_END
-#endif /* __IMAGE_H__ */
+#endif /* __IMAGE_H__ */
diff --git a/intern/cycles/render/integrator.h b/intern/cycles/render/integrator.h
index f68400ac416..6a7e2056851 100644
--- a/intern/cycles/render/integrator.h
+++ b/intern/cycles/render/integrator.h
@@ -94,4 +94,4 @@ public:
CCL_NAMESPACE_END
-#endif /* __INTEGRATOR_H__ */
+#endif /* __INTEGRATOR_H__ */
diff --git a/intern/cycles/render/light.h b/intern/cycles/render/light.h
index 32a911dc256..f4dfe0cadbf 100644
--- a/intern/cycles/render/light.h
+++ b/intern/cycles/render/light.h
@@ -139,4 +139,4 @@ protected:
CCL_NAMESPACE_END
-#endif /* __LIGHT_H__ */
+#endif /* __LIGHT_H__ */
diff --git a/intern/cycles/render/mesh.cpp b/intern/cycles/render/mesh.cpp
index 8a00b88af12..5f884a3f871 100644
--- a/intern/cycles/render/mesh.cpp
+++ b/intern/cycles/render/mesh.cpp
@@ -39,6 +39,10 @@
#include "util/util_progress.h"
#include "util/util_set.h"
+#ifdef WITH_EMBREE
+# include "bvh/bvh_embree.h"
+#endif
+
CCL_NAMESPACE_BEGIN
/* Triangle */
@@ -1068,11 +1072,14 @@ void Mesh::compute_bvh(Device *device,
bparams.use_spatial_split = params->use_bvh_spatial_split;
bparams.bvh_layout = BVHParams::best_bvh_layout(
params->bvh_layout,
- device->info.bvh_layout_mask);
+ device->get_bvh_layout_mask());
bparams.use_unaligned_nodes = dscene->data.bvh.have_curves &&
params->use_bvh_unaligned_nodes;
bparams.num_motion_triangle_steps = params->num_bvh_time_steps;
bparams.num_motion_curve_steps = params->num_bvh_time_steps;
+ bparams.bvh_type = params->bvh_type;
+ bparams.curve_flags = dscene->data.curve.curveflags;
+ bparams.curve_subdivisions = dscene->data.curve.subdivisions;
delete bvh;
bvh = BVH::create(bparams, objects);
@@ -1284,9 +1291,9 @@ void MeshManager::update_osl_attributes(Device *device, Scene *scene, vector<Att
}
}
#else
- (void)device;
- (void)scene;
- (void)mesh_attributes;
+ (void) device;
+ (void) scene;
+ (void) mesh_attributes;
#endif
}
@@ -1855,20 +1862,38 @@ void MeshManager::device_update_bvh(Device *device, DeviceScene *dscene, Scene *
bparams.top_level = true;
bparams.bvh_layout = BVHParams::best_bvh_layout(
scene->params.bvh_layout,
- device->info.bvh_layout_mask);
+ device->get_bvh_layout_mask());
bparams.use_spatial_split = scene->params.use_bvh_spatial_split;
bparams.use_unaligned_nodes = dscene->data.bvh.have_curves &&
scene->params.use_bvh_unaligned_nodes;
bparams.num_motion_triangle_steps = scene->params.num_bvh_time_steps;
bparams.num_motion_curve_steps = scene->params.num_bvh_time_steps;
+ bparams.bvh_type = scene->params.bvh_type;
+ bparams.curve_flags = dscene->data.curve.curveflags;
+ bparams.curve_subdivisions = dscene->data.curve.subdivisions;
VLOG(1) << "Using " << bvh_layout_name(bparams.bvh_layout)
<< " layout.";
+#ifdef WITH_EMBREE
+ if(bparams.bvh_layout == BVH_LAYOUT_EMBREE) {
+ if(dscene->data.bvh.scene) {
+ BVHEmbree::destroy(dscene->data.bvh.scene);
+ }
+ }
+#endif
+
BVH *bvh = BVH::create(bparams, scene->objects);
- bvh->build(progress);
+ bvh->build(progress, &device->stats);
if(progress.get_cancel()) {
+#ifdef WITH_EMBREE
+ if(bparams.bvh_layout == BVH_LAYOUT_EMBREE) {
+ if(dscene->data.bvh.scene) {
+ BVHEmbree::destroy(dscene->data.bvh.scene);
+ }
+ }
+#endif
delete bvh;
return;
}
@@ -1923,6 +1948,16 @@ void MeshManager::device_update_bvh(Device *device, DeviceScene *dscene, Scene *
dscene->data.bvh.bvh_layout = bparams.bvh_layout;
dscene->data.bvh.use_bvh_steps = (scene->params.num_bvh_time_steps != 0);
+
+#ifdef WITH_EMBREE
+ if(bparams.bvh_layout == BVH_LAYOUT_EMBREE) {
+ dscene->data.bvh.scene = ((BVHEmbree*)bvh)->scene;
+ }
+ else {
+ dscene->data.bvh.scene = NULL;
+ }
+#endif
+
delete bvh;
}
@@ -2266,7 +2301,7 @@ void MeshManager::device_free(Device *device, DeviceScene *dscene)
og->object_names.clear();
}
#else
- (void)device;
+ (void) device;
#endif
}
diff --git a/intern/cycles/render/mesh.h b/intern/cycles/render/mesh.h
index 444f03a3664..7d36b2cd7ca 100644
--- a/intern/cycles/render/mesh.h
+++ b/intern/cycles/render/mesh.h
@@ -22,6 +22,7 @@
#include "render/attribute.h"
#include "render/shader.h"
+#include "util/util_array.h"
#include "util/util_boundbox.h"
#include "util/util_list.h"
#include "util/util_map.h"
@@ -390,4 +391,4 @@ protected:
CCL_NAMESPACE_END
-#endif /* __MESH_H__ */
+#endif /* __MESH_H__ */
diff --git a/intern/cycles/render/nodes.h b/intern/cycles/render/nodes.h
index 28bbe2de05a..048f0fcaa24 100644
--- a/intern/cycles/render/nodes.h
+++ b/intern/cycles/render/nodes.h
@@ -20,6 +20,7 @@
#include "render/graph.h"
#include "graph/node.h"
+#include "util/util_array.h"
#include "util/util_string.h"
CCL_NAMESPACE_BEGIN
@@ -1161,4 +1162,4 @@ public:
CCL_NAMESPACE_END
-#endif /* __NODES_H__ */
+#endif /* __NODES_H__ */
diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp
index e3f35c366d6..dc7a1043208 100644
--- a/intern/cycles/render/object.cpp
+++ b/intern/cycles/render/object.cpp
@@ -27,7 +27,9 @@
#include "util/util_logging.h"
#include "util/util_map.h"
#include "util/util_progress.h"
+#include "util/util_set.h"
#include "util/util_vector.h"
+#include "util/util_murmurhash.h"
#include "subd/subd_patch_table.h"
@@ -483,6 +485,10 @@ void ObjectManager::device_update_object_transform(UpdateObjectTransformState *s
kobject.numverts = mesh->verts.size();
kobject.patch_map_offset = 0;
kobject.attribute_map_offset = 0;
+ uint32_t hash_name = util_murmur_hash3(ob->name.c_str(), ob->name.length(), 0);
+ uint32_t hash_asset = util_murmur_hash3(ob->asset_name.c_str(), ob->asset_name.length(), 0);
+ kobject.cryptomatte_object = util_hash_to_float(hash_name);
+ kobject.cryptomatte_asset = util_hash_to_float(hash_asset);
/* Object flag. */
if(ob->use_holdout) {
@@ -839,4 +845,37 @@ void ObjectManager::tag_update(Scene *scene)
scene->light_manager->need_update = true;
}
+string ObjectManager::get_cryptomatte_objects(Scene *scene)
+{
+ string manifest = "{";
+
+ unordered_set<ustring, ustringHash> objects;
+ foreach(Object *object, scene->objects) {
+ if(objects.count(object->name)) {
+ continue;
+ }
+ objects.insert(object->name);
+ uint32_t hash_name = util_murmur_hash3(object->name.c_str(), object->name.length(), 0);
+ manifest += string_printf("\"%s\":\"%08x\",", object->name.c_str(), hash_name);
+ }
+ manifest[manifest.size()-1] = '}';
+ return manifest;
+}
+
+string ObjectManager::get_cryptomatte_assets(Scene *scene)
+{
+ string manifest = "{";
+ unordered_set<ustring, ustringHash> assets;
+ foreach(Object *ob, scene->objects) {
+ if(assets.count(ob->asset_name)) {
+ continue;
+ }
+ assets.insert(ob->asset_name);
+ uint32_t hash_asset = util_murmur_hash3(ob->asset_name.c_str(), ob->asset_name.length(), 0);
+ manifest += string_printf("\"%s\":\"%08x\",", ob->asset_name.c_str(), hash_asset);
+ }
+ manifest[manifest.size()-1] = '}';
+ return manifest;
+}
+
CCL_NAMESPACE_END
diff --git a/intern/cycles/render/object.h b/intern/cycles/render/object.h
index b80c4aef70b..87e6e6652ad 100644
--- a/intern/cycles/render/object.h
+++ b/intern/cycles/render/object.h
@@ -20,11 +20,13 @@
#include "graph/node.h"
#include "render/scene.h"
+#include "util/util_array.h"
#include "util/util_boundbox.h"
#include "util/util_param.h"
#include "util/util_transform.h"
#include "util/util_thread.h"
#include "util/util_types.h"
+#include "util/util_vector.h"
CCL_NAMESPACE_BEGIN
@@ -48,6 +50,7 @@ public:
BoundBox bounds;
uint random_id;
int pass_id;
+ ustring asset_name;
vector<ParamValue> attributes;
uint visibility;
array<Transform> motion;
@@ -115,6 +118,9 @@ public:
void apply_static_transforms(DeviceScene *dscene, Scene *scene, Progress& progress);
+ string get_cryptomatte_objects(Scene *scene);
+ string get_cryptomatte_assets(Scene *scene);
+
protected:
void device_update_object_transform(UpdateObjectTransformState *state,
Object *ob,
@@ -128,4 +134,4 @@ protected:
CCL_NAMESPACE_END
-#endif /* __OBJECT_H__ */
+#endif /* __OBJECT_H__ */
diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp
index 496e9d9491a..3fbc7d33a74 100644
--- a/intern/cycles/render/osl.cpp
+++ b/intern/cycles/render/osl.cpp
@@ -1255,6 +1255,6 @@ void OSLCompiler::parameter_color_array(const char * /*name*/, const array<float
{
}
-#endif /* WITH_OSL */
+#endif /* WITH_OSL */
CCL_NAMESPACE_END
diff --git a/intern/cycles/render/osl.h b/intern/cycles/render/osl.h
index 966fc1965d7..e196e0be787 100644
--- a/intern/cycles/render/osl.h
+++ b/intern/cycles/render/osl.h
@@ -17,6 +17,7 @@
#ifndef __OSL_H__
#define __OSL_H__
+#include "util/util_array.h"
#include "util/util_set.h"
#include "util/util_string.h"
#include "util/util_thread.h"
@@ -171,4 +172,4 @@ private:
CCL_NAMESPACE_END
-#endif /* __OSL_H__ */
+#endif /* __OSL_H__ */
diff --git a/intern/cycles/render/particles.h b/intern/cycles/render/particles.h
index 7e7afd5d054..27821907af0 100644
--- a/intern/cycles/render/particles.h
+++ b/intern/cycles/render/particles.h
@@ -17,8 +17,8 @@
#ifndef __PARTICLES_H__
#define __PARTICLES_H__
+#include "util/util_array.h"
#include "util/util_types.h"
-#include "util/util_vector.h"
CCL_NAMESPACE_BEGIN
@@ -68,4 +68,4 @@ public:
CCL_NAMESPACE_END
-#endif /* __PARTICLES_H__ */
+#endif /* __PARTICLES_H__ */
diff --git a/intern/cycles/render/scene.cpp b/intern/cycles/render/scene.cpp
index 9f93fed139c..ccaca8707c8 100644
--- a/intern/cycles/render/scene.cpp
+++ b/intern/cycles/render/scene.cpp
@@ -215,6 +215,11 @@ void Scene::device_update(Device *device_, Progress& progress)
object_manager->device_update(device, &dscene, this, progress);
if(progress.get_cancel() || device->have_error()) return;
+
+ progress.set_status("Updating Hair Systems");
+ curve_system_manager->device_update(device, &dscene, this, progress);
+
+ if(progress.get_cancel() || device->have_error()) return;
progress.set_status("Updating Particle Systems");
particle_system_manager->device_update(device, &dscene, this, progress);
@@ -240,12 +245,7 @@ void Scene::device_update(Device *device_, Progress& progress)
camera->device_update_volume(device, &dscene, this);
if(progress.get_cancel() || device->have_error()) return;
-
- progress.set_status("Updating Hair Systems");
- curve_system_manager->device_update(device, &dscene, this, progress);
-
- if(progress.get_cancel() || device->have_error()) return;
-
+
progress.set_status("Updating Lookup Tables");
lookup_tables->device_update(device, &dscene);
diff --git a/intern/cycles/render/scene.h b/intern/cycles/render/scene.h
index dd8069537eb..57ea1d471e8 100644
--- a/intern/cycles/render/scene.h
+++ b/intern/cycles/render/scene.h
@@ -166,7 +166,6 @@ public:
bool use_bvh_spatial_split;
bool use_bvh_unaligned_nodes;
int num_bvh_time_steps;
-
bool persistent_data;
int texture_limit;
@@ -269,4 +268,4 @@ protected:
CCL_NAMESPACE_END
-#endif /* __SCENE_H__ */
+#endif /* __SCENE_H__ */
diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp
index d0aa985b035..d6ecafa19b7 100644
--- a/intern/cycles/render/session.cpp
+++ b/intern/cycles/render/session.cpp
@@ -682,7 +682,10 @@ DeviceRequestedFeatures Session::get_requested_device_features()
BakeManager *bake_manager = scene->bake_manager;
requested_features.use_baking = bake_manager->get_baking();
requested_features.use_integrator_branched = (scene->integrator->method == Integrator::BRANCHED_PATH);
- requested_features.use_denoising = params.use_denoising;
+ if(params.denoising_passes) {
+ requested_features.use_denoising = true;
+ requested_features.use_shadow_tricks = true;
+ }
return requested_features;
}
diff --git a/intern/cycles/render/session.h b/intern/cycles/render/session.h
index 61f62f8e712..56a69919a7a 100644
--- a/intern/cycles/render/session.h
+++ b/intern/cycles/render/session.h
@@ -58,6 +58,7 @@ public:
bool display_buffer_linear;
bool use_denoising;
+ bool denoising_passes;
int denoising_radius;
float denoising_strength;
float denoising_feature_strength;
@@ -89,6 +90,7 @@ public:
threads = 0;
use_denoising = false;
+ denoising_passes = false;
denoising_radius = 8;
denoising_strength = 0.0f;
denoising_feature_strength = 0.0f;
@@ -236,4 +238,4 @@ protected:
CCL_NAMESPACE_END
-#endif /* __SESSION_H__ */
+#endif /* __SESSION_H__ */
diff --git a/intern/cycles/render/shader.cpp b/intern/cycles/render/shader.cpp
index ac605305b94..d6c2d7502f2 100644
--- a/intern/cycles/render/shader.cpp
+++ b/intern/cycles/render/shader.cpp
@@ -30,6 +30,7 @@
#include "render/tables.h"
#include "util/util_foreach.h"
+#include "util/util_murmurhash.h"
#ifdef WITH_OCIO
# include <OpenColorIO/OpenColorIO.h>
@@ -387,7 +388,7 @@ ShaderManager *ShaderManager::create(Scene *scene, int shadingsystem)
{
ShaderManager *manager;
- (void)shadingsystem; /* Ignored when built without OSL. */
+ (void) shadingsystem; /* Ignored when built without OSL. */
#ifdef WITH_OSL
if(shadingsystem == SHADINGSYSTEM_OSL) {
@@ -523,12 +524,15 @@ void ShaderManager::device_update_common(Device *device,
if(shader->is_constant_emission(&constant_emission))
flag |= SD_HAS_CONSTANT_EMISSION;
+ uint32_t cryptomatte_id = util_murmur_hash3(shader->name.c_str(), shader->name.length(), 0);
+
/* regular shader */
kshader->flags = flag;
kshader->pass_id = shader->pass_id;
kshader->constant_emission[0] = constant_emission.x;
kshader->constant_emission[1] = constant_emission.y;
kshader->constant_emission[2] = constant_emission.z;
+ kshader->cryptomatte_id = util_hash_to_float(cryptomatte_id);
kshader++;
has_transparent_shadow |= (flag & SD_HAS_TRANSPARENT_SHADOW) != 0;
@@ -695,4 +699,20 @@ float ShaderManager::linear_rgb_to_gray(float3 c)
return dot(c, rgb_to_y);
}
+string ShaderManager::get_cryptomatte_materials(Scene *scene)
+{
+ string manifest = "{";
+ unordered_set<ustring, ustringHash> materials;
+ foreach(Shader *shader, scene->shaders) {
+ if(materials.count(shader->name)) {
+ continue;
+ }
+ materials.insert(shader->name);
+ uint32_t cryptomatte_id = util_murmur_hash3(shader->name.c_str(), shader->name.length(), 0);
+ manifest += string_printf("\"%s\":\"%08x\",", shader->name.c_str(), cryptomatte_id);
+ }
+ manifest[manifest.size()-1] = '}';
+ return manifest;
+}
+
CCL_NAMESPACE_END
diff --git a/intern/cycles/render/shader.h b/intern/cycles/render/shader.h
index 58314a1e310..4c7b2fd433b 100644
--- a/intern/cycles/render/shader.h
+++ b/intern/cycles/render/shader.h
@@ -197,6 +197,8 @@ public:
float linear_rgb_to_gray(float3 c);
+ string get_cryptomatte_materials(Scene *scene);
+
protected:
ShaderManager();
@@ -222,4 +224,4 @@ protected:
CCL_NAMESPACE_END
-#endif /* __SHADER_H__ */
+#endif /* __SHADER_H__ */
diff --git a/intern/cycles/render/sobol.h b/intern/cycles/render/sobol.h
index d38857d2b35..ce7a28587f2 100644
--- a/intern/cycles/render/sobol.h
+++ b/intern/cycles/render/sobol.h
@@ -28,4 +28,4 @@ void sobol_generate_direction_vectors(uint vectors[][SOBOL_BITS], int dimensions
CCL_NAMESPACE_END
-#endif /* __SOBOL_H__ */
+#endif /* __SOBOL_H__ */
diff --git a/intern/cycles/render/stats.h b/intern/cycles/render/stats.h
index 72d5f1dd93d..2ff0ec3e0e9 100644
--- a/intern/cycles/render/stats.h
+++ b/intern/cycles/render/stats.h
@@ -101,4 +101,4 @@ public:
CCL_NAMESPACE_END
-#endif /* __RENDER_STATS_H__ */
+#endif /* __RENDER_STATS_H__ */
diff --git a/intern/cycles/render/svm.cpp b/intern/cycles/render/svm.cpp
index 44b7eeec6db..b380117e729 100644
--- a/intern/cycles/render/svm.cpp
+++ b/intern/cycles/render/svm.cpp
@@ -266,7 +266,7 @@ int SVMCompiler::stack_assign(ShaderInput *input)
add_node(NODE_VALUE_V, input->stack_offset);
add_node(NODE_VALUE_V, node->get_float3(input->socket_type));
}
- else /* should not get called for closure */
+ else /* should not get called for closure */
assert(0);
}
}
diff --git a/intern/cycles/render/svm.h b/intern/cycles/render/svm.h
index 1d0613bbfdc..af97a490a87 100644
--- a/intern/cycles/render/svm.h
+++ b/intern/cycles/render/svm.h
@@ -21,6 +21,7 @@
#include "render/graph.h"
#include "render/shader.h"
+#include "util/util_array.h"
#include "util/util_set.h"
#include "util/util_string.h"
#include "util/util_thread.h"
@@ -223,4 +224,4 @@ protected:
CCL_NAMESPACE_END
-#endif /* __SVM_H__ */
+#endif /* __SVM_H__ */
diff --git a/intern/cycles/render/tables.h b/intern/cycles/render/tables.h
index 09d961a9c3c..709333cb1b6 100644
--- a/intern/cycles/render/tables.h
+++ b/intern/cycles/render/tables.h
@@ -50,4 +50,4 @@ public:
CCL_NAMESPACE_END
-#endif /* __TABLES_H__ */
+#endif /* __TABLES_H__ */
diff --git a/intern/cycles/render/tile.h b/intern/cycles/render/tile.h
index f72f653f4c2..2835c793073 100644
--- a/intern/cycles/render/tile.h
+++ b/intern/cycles/render/tile.h
@@ -154,4 +154,4 @@ protected:
CCL_NAMESPACE_END
-#endif /* __TILE_H__ */
+#endif /* __TILE_H__ */
diff --git a/intern/cycles/subd/subd_dice.h b/intern/cycles/subd/subd_dice.h
index 4617c782b3a..2bef8d4cf8d 100644
--- a/intern/cycles/subd/subd_dice.h
+++ b/intern/cycles/subd/subd_dice.h
@@ -134,4 +134,4 @@ public:
CCL_NAMESPACE_END
-#endif /* __SUBD_DICE_H__ */
+#endif /* __SUBD_DICE_H__ */
diff --git a/intern/cycles/subd/subd_patch.h b/intern/cycles/subd/subd_patch.h
index 64ec8f70951..84100139f2c 100644
--- a/intern/cycles/subd/subd_patch.h
+++ b/intern/cycles/subd/subd_patch.h
@@ -56,4 +56,4 @@ public:
CCL_NAMESPACE_END
-#endif /* __SUBD_PATCH_H__ */
+#endif /* __SUBD_PATCH_H__ */
diff --git a/intern/cycles/subd/subd_patch_table.cpp b/intern/cycles/subd/subd_patch_table.cpp
index 13a6f284542..0e9d3f37af4 100644
--- a/intern/cycles/subd/subd_patch_table.cpp
+++ b/intern/cycles/subd/subd_patch_table.cpp
@@ -252,8 +252,8 @@ void PackedPatchTable::pack(Far::PatchTable* patch_table, int offset)
build_patch_map(*this, patch_table, offset);
#else
- (void)patch_table;
- (void)offset;
+ (void) patch_table;
+ (void) offset;
#endif
}
diff --git a/intern/cycles/subd/subd_patch_table.h b/intern/cycles/subd/subd_patch_table.h
index 45be7051992..1765578c42e 100644
--- a/intern/cycles/subd/subd_patch_table.h
+++ b/intern/cycles/subd/subd_patch_table.h
@@ -17,8 +17,8 @@
#ifndef __SUBD_PATCH_TABLE_H__
#define __SUBD_PATCH_TABLE_H__
+#include "util/util_array.h"
#include "util/util_types.h"
-#include "util/util_vector.h"
#ifdef WITH_OPENSUBDIV
#ifdef _MSC_VER
@@ -59,4 +59,4 @@ struct PackedPatchTable {
CCL_NAMESPACE_END
-#endif /* __SUBD_PATCH_TABLE_H__ */
+#endif /* __SUBD_PATCH_TABLE_H__ */
diff --git a/intern/cycles/subd/subd_split.h b/intern/cycles/subd/subd_split.h
index 7a276b35382..3368c93944b 100644
--- a/intern/cycles/subd/subd_split.h
+++ b/intern/cycles/subd/subd_split.h
@@ -56,4 +56,4 @@ public:
CCL_NAMESPACE_END
-#endif /* __SUBD_SPLIT_H__ */
+#endif /* __SUBD_SPLIT_H__ */
diff --git a/intern/cycles/test/render_graph_finalize_test.cpp b/intern/cycles/test/render_graph_finalize_test.cpp
index b66a91adbda..cfdab7a6433 100644
--- a/intern/cycles/test/render_graph_finalize_test.cpp
+++ b/intern/cycles/test/render_graph_finalize_test.cpp
@@ -20,6 +20,7 @@
#include "render/graph.h"
#include "render/scene.h"
#include "render/nodes.h"
+#include "util/util_array.h"
#include "util/util_logging.h"
#include "util/util_string.h"
#include "util/util_vector.h"
diff --git a/intern/cycles/test/util_path_test.cpp b/intern/cycles/test/util_path_test.cpp
index c2f400c105d..1df568493d8 100644
--- a/intern/cycles/test/util_path_test.cpp
+++ b/intern/cycles/test/util_path_test.cpp
@@ -370,7 +370,7 @@ TEST(util_path_is_relative, relative_windir_on_unix)
bool is_relative = path_is_relative("tmp\\foo.txt");
EXPECT_TRUE(is_relative);
}
-#endif /* !_WIN32 */
+#endif /* !_WIN32 */
#ifdef _WIN32
TEST(util_path_is_relative, absolute_windows)
@@ -396,6 +396,6 @@ TEST(util_path_is_relative, relative_unixdir_on_windows)
bool is_relative = path_is_relative("tmp/foo.txt");
EXPECT_TRUE(is_relative);
}
-#endif /* _WIN32 */
+#endif /* _WIN32 */
CCL_NAMESPACE_END
diff --git a/intern/cycles/util/CMakeLists.txt b/intern/cycles/util/CMakeLists.txt
index 291f9a9fcae..77d47984ee7 100644
--- a/intern/cycles/util/CMakeLists.txt
+++ b/intern/cycles/util/CMakeLists.txt
@@ -15,6 +15,7 @@ set(SRC
util_logging.cpp
util_math_cdf.cpp
util_md5.cpp
+ util_murmurhash.cpp
util_path.cpp
util_string.cpp
util_simd.cpp
@@ -36,6 +37,7 @@ set(SRC_HEADERS
util_algorithm.h
util_aligned_malloc.h
util_args.h
+ util_array.h
util_atomic.h
util_boundbox.h
util_debug.h
@@ -64,6 +66,7 @@ set(SRC_HEADERS
util_math_int4.h
util_math_matrix.h
util_md5.h
+ util_murmurhash.h
util_opengl.h
util_optimization.h
util_param.h
diff --git a/intern/cycles/util/util_algorithm.h b/intern/cycles/util/util_algorithm.h
index eb874713d43..f9e6476cc52 100644
--- a/intern/cycles/util/util_algorithm.h
+++ b/intern/cycles/util/util_algorithm.h
@@ -29,4 +29,4 @@ using std::remove;
CCL_NAMESPACE_END
-#endif /* __UTIL_ALGORITHM_H__ */
+#endif /* __UTIL_ALGORITHM_H__ */
diff --git a/intern/cycles/util/util_args.h b/intern/cycles/util/util_args.h
index be6f2c2b9f1..9fe54b14d77 100644
--- a/intern/cycles/util/util_args.h
+++ b/intern/cycles/util/util_args.h
@@ -28,4 +28,4 @@ OIIO_NAMESPACE_USING
CCL_NAMESPACE_END
-#endif /* __UTIL_ARGS_H__ */
+#endif /* __UTIL_ARGS_H__ */
diff --git a/intern/cycles/util/util_array.h b/intern/cycles/util/util_array.h
new file mode 100644
index 00000000000..5f18d434c31
--- /dev/null
+++ b/intern/cycles/util/util_array.h
@@ -0,0 +1,289 @@
+/*
+ * Copyright 2011-2018 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.
+ */
+
+#ifndef __UTIL_ARRAY_H__
+#define __UTIL_ARRAY_H__
+
+#include <cassert>
+#include <cstring>
+
+#include "util/util_aligned_malloc.h"
+#include "util/util_guarded_allocator.h"
+#include "util/util_types.h"
+#include "util/util_vector.h"
+
+CCL_NAMESPACE_BEGIN
+
+/* Simplified version of vector, serving multiple purposes:
+ * - somewhat faster in that it does not clear memory on resize/alloc,
+ * this was actually showing up in profiles quite significantly. it
+ * also does not run any constructors/destructors
+ * - if this is used, we are not tempted to use inefficient operations
+ * - aligned allocation for CPU native data types */
+
+template<typename T, size_t alignment = MIN_ALIGNMENT_CPU_DATA_TYPES>
+class array
+{
+public:
+ array()
+ : data_(NULL),
+ datasize_(0),
+ capacity_(0)
+ {}
+
+ explicit array(size_t newsize)
+ {
+ if(newsize == 0) {
+ data_ = NULL;
+ datasize_ = 0;
+ capacity_ = 0;
+ }
+ else {
+ data_ = mem_allocate(newsize);
+ datasize_ = newsize;
+ capacity_ = datasize_;
+ }
+ }
+
+ array(const array& from)
+ {
+ if(from.datasize_ == 0) {
+ data_ = NULL;
+ datasize_ = 0;
+ capacity_ = 0;
+ }
+ else {
+ data_ = mem_allocate(from.datasize_);
+ memcpy(data_, from.data_, from.datasize_*sizeof(T));
+ datasize_ = from.datasize_;
+ capacity_ = datasize_;
+ }
+ }
+
+ array& operator=(const array& from)
+ {
+ if(this != &from) {
+ resize(from.size());
+ memcpy((void*)data_, from.data_, datasize_*sizeof(T));
+ }
+
+ return *this;
+ }
+
+ array& operator=(const vector<T>& from)
+ {
+ resize(from.size());
+
+ if(from.size() > 0) {
+ memcpy(data_, &from[0], datasize_*sizeof(T));
+ }
+
+ return *this;
+ }
+
+ ~array()
+ {
+ mem_free(data_, capacity_);
+ }
+
+ bool operator==(const array<T>& other) const
+ {
+ if(datasize_ != other.datasize_) {
+ return false;
+ }
+
+ return memcmp(data_, other.data_, datasize_*sizeof(T)) == 0;
+ }
+
+ bool operator!=(const array<T>& other) const
+ {
+ return !(*this == other);
+ }
+
+ void steal_data(array& from)
+ {
+ if(this != &from) {
+ clear();
+
+ data_ = from.data_;
+ datasize_ = from.datasize_;
+ capacity_ = from.capacity_;
+
+ from.data_ = NULL;
+ from.datasize_ = 0;
+ from.capacity_ = 0;
+ }
+ }
+
+ T *steal_pointer()
+ {
+ T *ptr = data_;
+ data_ = NULL;
+ clear();
+ return ptr;
+ }
+
+ T* resize(size_t newsize)
+ {
+ if(newsize == 0) {
+ clear();
+ }
+ else if(newsize != datasize_) {
+ if(newsize > capacity_) {
+ T *newdata = mem_allocate(newsize);
+ if(newdata == NULL) {
+ /* Allocation failed, likely out of memory. */
+ clear();
+ return NULL;
+ }
+ else if(data_ != NULL) {
+ memcpy((void *)newdata,
+ data_,
+ ((datasize_ < newsize)? datasize_: newsize)*sizeof(T));
+ mem_free(data_, capacity_);
+ }
+ data_ = newdata;
+ capacity_ = newsize;
+ }
+ datasize_ = newsize;
+ }
+ return data_;
+ }
+
+ T* resize(size_t newsize, const T& value)
+ {
+ size_t oldsize = size();
+ resize(newsize);
+
+ for(size_t i = oldsize; i < size(); i++) {
+ data_[i] = value;
+ }
+
+ return data_;
+ }
+
+ void clear()
+ {
+ if(data_ != NULL) {
+ mem_free(data_, capacity_);
+ data_ = NULL;
+ }
+ datasize_ = 0;
+ capacity_ = 0;
+ }
+
+ size_t empty() const
+ {
+ return datasize_ == 0;
+ }
+
+ size_t size() const
+ {
+ return datasize_;
+ }
+
+ T* data()
+ {
+ return data_;
+ }
+
+ const T* data() const
+ {
+ return data_;
+ }
+
+ T& operator[](size_t i) const
+ {
+ assert(i < datasize_);
+ return data_[i];
+ }
+
+ void reserve(size_t newcapacity)
+ {
+ if(newcapacity > capacity_) {
+ T *newdata = mem_allocate(newcapacity);
+ if(data_ != NULL) {
+ memcpy(newdata, data_, ((datasize_ < newcapacity)? datasize_: newcapacity)*sizeof(T));
+ mem_free(data_, capacity_);
+ }
+ data_ = newdata;
+ capacity_ = newcapacity;
+ }
+ }
+
+ size_t capacity() const
+ {
+ return capacity_;
+ }
+
+ // do not use this method unless you are sure the code is not performance critical
+ void push_back_slow(const T& t)
+ {
+ if(capacity_ == datasize_)
+ {
+ reserve(datasize_ == 0 ? 1 : (size_t)((datasize_ + 1) * 1.2));
+ }
+
+ data_[datasize_++] = t;
+ }
+
+ void push_back_reserved(const T& t)
+ {
+ assert(datasize_ < capacity_);
+ push_back_slow(t);
+ }
+
+ void append(const array<T>& from)
+ {
+ if(from.size()) {
+ size_t old_size = size();
+ resize(old_size + from.size());
+ memcpy(data_ + old_size, from.data(), sizeof(T) * from.size());
+ }
+ }
+
+protected:
+ inline T* mem_allocate(size_t N)
+ {
+ if(N == 0) {
+ return NULL;
+ }
+ T *mem = (T*)util_aligned_malloc(sizeof(T)*N, alignment);
+ if(mem != NULL) {
+ util_guarded_mem_alloc(sizeof(T)*N);
+ }
+ else {
+ throw std::bad_alloc();
+ }
+ return mem;
+ }
+
+ inline void mem_free(T *mem, size_t N)
+ {
+ if(mem != NULL) {
+ util_guarded_mem_free(sizeof(T)*N);
+ util_aligned_free(mem);
+ }
+ }
+
+ T *data_;
+ size_t datasize_;
+ size_t capacity_;
+};
+
+CCL_NAMESPACE_END
+
+#endif /* __UTIL_ARRAY_H__ */
diff --git a/intern/cycles/util/util_atomic.h b/intern/cycles/util/util_atomic.h
index f3c7ae546a0..477b667a6fe 100644
--- a/intern/cycles/util/util_atomic.h
+++ b/intern/cycles/util/util_atomic.h
@@ -23,12 +23,13 @@
#include "atomic_ops.h"
#define atomic_add_and_fetch_float(p, x) atomic_add_and_fetch_fl((p), (x))
+#define atomic_compare_and_swap_float(p, old_val, new_val) atomic_cas_float((p), (old_val), (new_val))
#define atomic_fetch_and_inc_uint32(p) atomic_fetch_and_add_uint32((p), 1)
#define atomic_fetch_and_dec_uint32(p) atomic_fetch_and_add_uint32((p), -1)
#define CCL_LOCAL_MEM_FENCE 0
-#define ccl_barrier(flags) (void)0
+#define ccl_barrier(flags) ((void) 0)
#else /* __KERNEL_GPU__ */
@@ -57,6 +58,20 @@ ccl_device_inline float atomic_add_and_fetch_float(volatile ccl_global float *so
return new_value.float_value;
}
+ccl_device_inline float atomic_compare_and_swap_float(volatile ccl_global float *dest,
+ const float old_val, const float new_val)
+{
+ union {
+ unsigned int int_value;
+ float float_value;
+ } new_value, prev_value, result;
+ prev_value.float_value = old_val;
+ new_value.float_value = new_val;
+ result.int_value = atomic_cmpxchg((volatile ccl_global unsigned int *)dest,
+ prev_value.int_value, new_value.int_value);
+ return result.float_value;
+}
+
#define atomic_fetch_and_add_uint32(p, x) atomic_add((p), (x))
#define atomic_fetch_and_inc_uint32(p) atomic_inc((p))
#define atomic_fetch_and_dec_uint32(p) atomic_dec((p))
@@ -75,6 +90,19 @@ ccl_device_inline float atomic_add_and_fetch_float(volatile ccl_global float *so
#define atomic_fetch_and_inc_uint32(p) atomic_fetch_and_add_uint32((p), 1)
#define atomic_fetch_and_dec_uint32(p) atomic_fetch_and_sub_uint32((p), 1)
+ccl_device_inline float atomic_compare_and_swap_float(volatile float *dest,
+ const float old_val, const float new_val)
+{
+ union {
+ unsigned int int_value;
+ float float_value;
+ } new_value, prev_value, result;
+ prev_value.float_value = old_val;
+ new_value.float_value = new_val;
+ result.int_value = atomicCAS((unsigned int *)dest, prev_value.int_value,new_value.int_value);
+ return result.float_value;
+}
+
#define CCL_LOCAL_MEM_FENCE
#define ccl_barrier(flags) __syncthreads()
@@ -82,4 +110,4 @@ ccl_device_inline float atomic_add_and_fetch_float(volatile ccl_global float *so
#endif /* __KERNEL_GPU__ */
-#endif /* __UTIL_ATOMIC_H__ */
+#endif /* __UTIL_ATOMIC_H__ */
diff --git a/intern/cycles/util/util_avxb.h b/intern/cycles/util/util_avxb.h
index 60d9bb44256..25ef39d39ae 100644
--- a/intern/cycles/util/util_avxb.h
+++ b/intern/cycles/util/util_avxb.h
@@ -44,23 +44,12 @@ struct avxb
__forceinline operator const __m256i( void ) const { return _mm256_castps_si256(m256); }
__forceinline operator const __m256d( void ) const { return _mm256_castps_pd(m256); }
- //__forceinline avxb ( bool a )
- // : m256(_mm_lookupmask_ps[(size_t(a) << 3) | (size_t(a) << 2) | (size_t(a) << 1) | size_t(a)]) {}
- //__forceinline avxb ( bool a, bool b)
- // : m256(_mm_lookupmask_ps[(size_t(b) << 3) | (size_t(a) << 2) | (size_t(b) << 1) | size_t(a)]) {}
- //__forceinline avxb ( bool a, bool b, bool c, bool d)
- // : m256(_mm_lookupmask_ps[(size_t(d) << 3) | (size_t(c) << 2) | (size_t(b) << 1) | size_t(a)]) {}
- //__forceinline avxb(int mask) {
- // assert(mask >= 0 && mask < 16);
- // m128 = _mm_lookupmask_ps[mask];
- //}
-
////////////////////////////////////////////////////////////////////////////////
/// Constants
////////////////////////////////////////////////////////////////////////////////
__forceinline avxb( FalseTy ) : m256(_mm256_setzero_ps()) {}
- __forceinline avxb( TrueTy ) : m256(_mm256_castsi256_ps(_mm256_cmpeq_epi32(_mm256_setzero_si256(), _mm256_setzero_si256()))) {}
+ __forceinline avxb( TrueTy ) : m256(_mm256_castsi256_ps(_mm256_set1_epi32(-1))) {}
////////////////////////////////////////////////////////////////////////////////
/// Array Access
@@ -97,7 +86,21 @@ __forceinline const avxb operator ^=( avxb& a, const avxb& b ) { return a = a ^
////////////////////////////////////////////////////////////////////////////////
__forceinline const avxb operator !=( const avxb& a, const avxb& b ) { return _mm256_xor_ps(a, b); }
-__forceinline const avxb operator ==( const avxb& a, const avxb& b ) { return _mm256_castsi256_ps(_mm256_cmpeq_epi32(a, b)); }
+__forceinline const avxb operator ==( const avxb& a, const avxb& b )
+{
+#ifdef __KERNEL_AVX2__
+ return _mm256_castsi256_ps(_mm256_cmpeq_epi32(a, b));
+#else
+ __m128i a_lo = _mm_castps_si128(_mm256_extractf128_ps(a, 0));
+ __m128i a_hi = _mm_castps_si128(_mm256_extractf128_ps(a, 1));
+ __m128i b_lo = _mm_castps_si128(_mm256_extractf128_ps(b, 0));
+ __m128i b_hi = _mm_castps_si128(_mm256_extractf128_ps(b, 1));
+ __m128i c_lo = _mm_cmpeq_epi32(a_lo, b_lo);
+ __m128i c_hi = _mm_cmpeq_epi32(a_hi, b_hi);
+ __m256i result = _mm256_insertf128_si256(_mm256_castsi128_si256(c_lo), c_hi, 1);
+ return _mm256_castsi256_ps(result);
+#endif
+}
__forceinline const avxb select( const avxb& m, const avxb& t, const avxb& f ) {
#if defined(__KERNEL_SSE41__)
@@ -114,47 +117,6 @@ __forceinline const avxb select( const avxb& m, const avxb& t, const avxb& f ) {
__forceinline const avxb unpacklo( const avxb& a, const avxb& b ) { return _mm256_unpacklo_ps(a, b); }
__forceinline const avxb unpackhi( const avxb& a, const avxb& b ) { return _mm256_unpackhi_ps(a, b); }
-#define _MM256_SHUFFLE(fp7,fp6,fp5,fp4,fp3,fp2,fp1,fp0) (((fp7) << 14) | ((fp6) << 12) | ((fp5) << 10) | ((fp4) << 8) | \
- ((fp3) << 6) | ((fp2) << 4) | ((fp1) << 2) | ((fp0)))
-
-template<size_t i0, size_t i1, size_t i2, size_t i3, size_t i4, size_t i5, size_t i6, size_t i7>
-__forceinline const avxb shuffle( const avxb& a ) {
- return _mm256_cvtepi32_ps(_mm256_shuffle_epi32(a, _MM256_SHUFFLE(i7, i6, i5, i4, i3, i2, i1, i0)));
-}
-
-/*
-template<> __forceinline const avxb shuffle<0, 1, 0, 1, 0, 1, 0, 1>( const avxb& a ) {
- return _mm_movelh_ps(a, a);
-}
-
-template<> __forceinline const sseb shuffle<2, 3, 2, 3>( const sseb& a ) {
- return _mm_movehl_ps(a, a);
-}
-
-template<size_t i0, size_t i1, size_t i2, size_t i3> __forceinline const sseb shuffle( const sseb& a, const sseb& b ) {
- return _mm_shuffle_ps(a, b, _MM_SHUFFLE(i3, i2, i1, i0));
-}
-
-template<> __forceinline const sseb shuffle<0, 1, 0, 1>( const sseb& a, const sseb& b ) {
- return _mm_movelh_ps(a, b);
-}
-
-template<> __forceinline const sseb shuffle<2, 3, 2, 3>( const sseb& a, const sseb& b ) {
- return _mm_movehl_ps(b, a);
-}
-
-#if defined(__KERNEL_SSE3__)
-template<> __forceinline const sseb shuffle<0, 0, 2, 2>( const sseb& a ) { return _mm_moveldup_ps(a); }
-template<> __forceinline const sseb shuffle<1, 1, 3, 3>( const sseb& a ) { return _mm_movehdup_ps(a); }
-#endif
-
-#if defined(__KERNEL_SSE41__)
-template<size_t dst, size_t src, size_t clr> __forceinline const sseb insert( const sseb& a, const sseb& b ) { return _mm_insert_ps(a, b, (dst << 4) | (src << 6) | clr); }
-template<size_t dst, size_t src> __forceinline const sseb insert( const sseb& a, const sseb& b ) { return insert<dst, src, 0>(a, b); }
-template<size_t dst> __forceinline const sseb insert( const sseb& a, const bool b ) { return insert<dst,0>(a, sseb(b)); }
-#endif
-*/
-
////////////////////////////////////////////////////////////////////////////////
/// Reduction Operations
////////////////////////////////////////////////////////////////////////////////
@@ -180,7 +142,7 @@ __forceinline size_t movemask( const avxb& a ) { return _mm256_movemask_ps(a); }
ccl_device_inline void print_avxb(const char *label, const avxb &a)
{
- printf("%s: %df %df %df %df %df %df %df %d\n",
+ printf("%s: %d %d %d %d %d %d %d %d\n",
label, a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7]);
}
diff --git a/intern/cycles/util/util_avxf.h b/intern/cycles/util/util_avxf.h
index 5596702ca20..f00c722f25b 100644
--- a/intern/cycles/util/util_avxf.h
+++ b/intern/cycles/util/util_avxf.h
@@ -40,8 +40,8 @@ struct avxf
__forceinline avxf(const __m256 a) : m256(a) {}
__forceinline avxf(const __m256i a) : m256(_mm256_castsi256_ps (a)) {}
- __forceinline operator const __m256&(void) const { return m256; }
- __forceinline operator __m256&(void) { return m256; }
+ __forceinline operator const __m256&() const { return m256; }
+ __forceinline operator __m256&() { return m256; }
__forceinline avxf (float a) : m256(_mm256_set1_ps(a)) {}
@@ -214,17 +214,19 @@ __forceinline const avxf nmadd(const avxf& a, const avxf& b, const avxf& c) {
#endif
}
__forceinline const avxf msub(const avxf& a, const avxf& b, const avxf& c) {
+#ifdef __KERNEL_AVX2__
return _mm256_fmsub_ps(a, b, c);
+#else
+ return (a*b) - c;
+#endif
}
////////////////////////////////////////////////////////////////////////////////
/// Comparison Operators
////////////////////////////////////////////////////////////////////////////////
-#ifdef __KERNEL_AVX2__
__forceinline const avxb operator <=(const avxf& a, const avxf& b) {
return _mm256_cmp_ps(a.m256, b.m256, _CMP_LE_OS);
}
-#endif
#endif
diff --git a/intern/cycles/util/util_boundbox.h b/intern/cycles/util/util_boundbox.h
index b1bd5be0df3..fe89e398840 100644
--- a/intern/cycles/util/util_boundbox.h
+++ b/intern/cycles/util/util_boundbox.h
@@ -282,4 +282,4 @@ public:
CCL_NAMESPACE_END
-#endif /* __UTIL_BOUNDBOX_H__ */
+#endif /* __UTIL_BOUNDBOX_H__ */
diff --git a/intern/cycles/util/util_color.h b/intern/cycles/util/util_color.h
index 826db469d25..e6efc7d73fc 100644
--- a/intern/cycles/util/util_color.h
+++ b/intern/cycles/util/util_color.h
@@ -240,4 +240,4 @@ ccl_device float4 color_srgb_to_linear_v4(float4 c)
CCL_NAMESPACE_END
-#endif /* __UTIL_COLOR_H__ */
+#endif /* __UTIL_COLOR_H__ */
diff --git a/intern/cycles/util/util_debug.h b/intern/cycles/util/util_debug.h
index f17f8a560ee..864089bb118 100644
--- a/intern/cycles/util/util_debug.h
+++ b/intern/cycles/util/util_debug.h
@@ -182,4 +182,4 @@ std::ostream& operator <<(std::ostream &os,
CCL_NAMESPACE_END
-#endif /* __UTIL_DEBUG_H__ */
+#endif /* __UTIL_DEBUG_H__ */
diff --git a/intern/cycles/util/util_defines.h b/intern/cycles/util/util_defines.h
index 8bce4aca699..429cfe647ef 100644
--- a/intern/cycles/util/util_defines.h
+++ b/intern/cycles/util/util_defines.h
@@ -72,7 +72,7 @@
# if defined(__GNUC__) && (__GNUC__ >= 7) /* gcc7.0+ only */
# define ATTR_FALLTHROUGH __attribute__((fallthrough))
# else
-# define ATTR_FALLTHROUGH ((void)0)
+# define ATTR_FALLTHROUGH ((void) 0)
# endif
#endif /* __KERNEL_GPU__ */
@@ -104,14 +104,14 @@ template<typename T> static inline T decltype_helper(T x) { return x; }
#define CHECK_TYPE(var, type) { \
TYPEOF(var) *__tmp; \
__tmp = (type *)NULL; \
- (void)__tmp; \
-} (void)0
+ (void) __tmp; \
+} (void) 0
#define CHECK_TYPE_PAIR(var_a, var_b) { \
TYPEOF(var_a) *__tmp; \
__tmp = (typeof(var_b) *)NULL; \
- (void)__tmp; \
-} (void)0
+ (void) __tmp; \
+} (void) 0
#else
# define CHECK_TYPE(var, type)
# define CHECK_TYPE_PAIR(var_a, var_b)
@@ -128,4 +128,4 @@ template<typename T> static inline T decltype_helper(T x) { return x; }
# define util_assert(statement)
#endif
-#endif /* __UTIL_DEFINES_H__ */
+#endif /* __UTIL_DEFINES_H__ */
diff --git a/intern/cycles/util/util_foreach.h b/intern/cycles/util/util_foreach.h
index 2a74ff0a55d..fd106d58b43 100644
--- a/intern/cycles/util/util_foreach.h
+++ b/intern/cycles/util/util_foreach.h
@@ -21,4 +21,4 @@
#define foreach(x, y) for(x : y)
-#endif /* __UTIL_FOREACH_H__ */
+#endif /* __UTIL_FOREACH_H__ */
diff --git a/intern/cycles/util/util_function.h b/intern/cycles/util/util_function.h
index f3cc00329ad..72c7ce43073 100644
--- a/intern/cycles/util/util_function.h
+++ b/intern/cycles/util/util_function.h
@@ -36,4 +36,4 @@ using std::placeholders::_9;
CCL_NAMESPACE_END
-#endif /* __UTIL_FUNCTION_H__ */
+#endif /* __UTIL_FUNCTION_H__ */
diff --git a/intern/cycles/util/util_guarded_allocator.cpp b/intern/cycles/util/util_guarded_allocator.cpp
index 54fa6a80df5..ae1d217c54f 100644
--- a/intern/cycles/util/util_guarded_allocator.cpp
+++ b/intern/cycles/util/util_guarded_allocator.cpp
@@ -35,12 +35,12 @@ void util_guarded_mem_free(size_t n)
/* Public API. */
-size_t util_guarded_get_mem_used(void)
+size_t util_guarded_get_mem_used()
{
return global_stats.mem_used;
}
-size_t util_guarded_get_mem_peak(void)
+size_t util_guarded_get_mem_peak()
{
return global_stats.mem_peak;
}
diff --git a/intern/cycles/util/util_guarded_allocator.h b/intern/cycles/util/util_guarded_allocator.h
index 87c1526dee4..2c6f1790fd0 100644
--- a/intern/cycles/util/util_guarded_allocator.h
+++ b/intern/cycles/util/util_guarded_allocator.h
@@ -47,7 +47,7 @@ public:
T *allocate(size_t n, const void *hint = 0)
{
- (void)hint;
+ (void) hint;
size_t size = n * sizeof(T);
util_guarded_mem_alloc(size);
if(n == 0) {
@@ -158,8 +158,8 @@ public:
};
/* Get memory usage and peak from the guarded STL allocator. */
-size_t util_guarded_get_mem_used(void);
-size_t util_guarded_get_mem_peak(void);
+size_t util_guarded_get_mem_used();
+size_t util_guarded_get_mem_peak();
/* Call given function and keep track if it runs out of memory.
*
diff --git a/intern/cycles/util/util_half.h b/intern/cycles/util/util_half.h
index 53b7f2472bd..3868509c21b 100644
--- a/intern/cycles/util/util_half.h
+++ b/intern/cycles/util/util_half.h
@@ -148,4 +148,4 @@ ccl_device_inline half float_to_half(float f)
CCL_NAMESPACE_END
-#endif /* __UTIL_HALF_H__ */
+#endif /* __UTIL_HALF_H__ */
diff --git a/intern/cycles/util/util_hash.h b/intern/cycles/util/util_hash.h
index a8a5076fbb3..f343252eaca 100644
--- a/intern/cycles/util/util_hash.h
+++ b/intern/cycles/util/util_hash.h
@@ -68,4 +68,4 @@ ccl_device_inline float hash_int_01(uint k)
CCL_NAMESPACE_END
-#endif /* __UTIL_HASH_H__ */
+#endif /* __UTIL_HASH_H__ */
diff --git a/intern/cycles/util/util_ies.cpp b/intern/cycles/util/util_ies.cpp
index e068957325b..e1de2e0c6e4 100644
--- a/intern/cycles/util/util_ies.cpp
+++ b/intern/cycles/util/util_ies.cpp
@@ -21,6 +21,13 @@
CCL_NAMESPACE_BEGIN
+// NOTE: For some reason gcc-7.2 does not instantiate this versio of allocator
+// gere (used in IESTextParser). Works fine for gcc-6, gcc-7.3 and gcc-8.
+//
+// TODO(sergey): Get to the root of this issue, or confirm this i a compiler
+// issue.
+template class GuardedAllocator<char>;
+
bool IESFile::load(ustring ies)
{
clear();
diff --git a/intern/cycles/util/util_ies.h b/intern/cycles/util/util_ies.h
index 5933cb3962a..663ad649a9c 100644
--- a/intern/cycles/util/util_ies.h
+++ b/intern/cycles/util/util_ies.h
@@ -58,4 +58,4 @@ protected:
CCL_NAMESPACE_END
-#endif /* __UTIL_IES_H__ */
+#endif /* __UTIL_IES_H__ */
diff --git a/intern/cycles/util/util_image.h b/intern/cycles/util/util_image.h
index 85bdb0d8050..da5f56271c8 100644
--- a/intern/cycles/util/util_image.h
+++ b/intern/cycles/util/util_image.h
@@ -102,6 +102,6 @@ inline half util_image_cast_from_float(float value)
CCL_NAMESPACE_END
-#endif /* __UTIL_IMAGE_H__ */
+#endif /* __UTIL_IMAGE_H__ */
#include "util/util_image_impl.h"
diff --git a/intern/cycles/util/util_list.h b/intern/cycles/util/util_list.h
index f555b001186..fcf8e4f5c74 100644
--- a/intern/cycles/util/util_list.h
+++ b/intern/cycles/util/util_list.h
@@ -25,4 +25,4 @@ using std::list;
CCL_NAMESPACE_END
-#endif /* __UTIL_LIST_H__ */
+#endif /* __UTIL_LIST_H__ */
diff --git a/intern/cycles/util/util_logging.cpp b/intern/cycles/util/util_logging.cpp
index f38683bf7de..b0922db32fb 100644
--- a/intern/cycles/util/util_logging.cpp
+++ b/intern/cycles/util/util_logging.cpp
@@ -45,7 +45,7 @@ void util_logging_init(const char *argv0)
#endif
}
-void util_logging_start(void)
+void util_logging_start()
{
#ifdef WITH_CYCLES_LOGGING
using CYCLES_GFLAGS_NAMESPACE::SetCommandLineOption;
diff --git a/intern/cycles/util/util_logging.h b/intern/cycles/util/util_logging.h
index 5c84b6593d3..f66d7c92dcc 100644
--- a/intern/cycles/util/util_logging.h
+++ b/intern/cycles/util/util_logging.h
@@ -41,7 +41,7 @@ public:
void operator&(StubStream&) { }
};
-# define LOG_SUPPRESS() (true) ? (void) 0 : LogMessageVoidify() & StubStream()
+# define LOG_SUPPRESS() (true) ? ((void) 0) : LogMessageVoidify() & StubStream()
# define LOG(severity) LOG_SUPPRESS()
# define VLOG(severity) LOG_SUPPRESS()
#endif
@@ -52,7 +52,7 @@ struct int2;
struct float3;
void util_logging_init(const char *argv0);
-void util_logging_start(void);
+void util_logging_start();
void util_logging_verbosity_set(int verbosity);
std::ostream& operator <<(std::ostream &os,
@@ -62,4 +62,4 @@ std::ostream& operator <<(std::ostream &os,
CCL_NAMESPACE_END
-#endif /* __UTIL_LOGGING_H__ */
+#endif /* __UTIL_LOGGING_H__ */
diff --git a/intern/cycles/util/util_map.h b/intern/cycles/util/util_map.h
index 3c9288417cf..1952d33ada8 100644
--- a/intern/cycles/util/util_map.h
+++ b/intern/cycles/util/util_map.h
@@ -28,4 +28,4 @@ using std::unordered_map;
CCL_NAMESPACE_END
-#endif /* __UTIL_MAP_H__ */
+#endif /* __UTIL_MAP_H__ */
diff --git a/intern/cycles/util/util_math.h b/intern/cycles/util/util_math.h
index 52aeb8d8599..6167119f873 100644
--- a/intern/cycles/util/util_math.h
+++ b/intern/cycles/util/util_math.h
@@ -157,7 +157,7 @@ ccl_device_inline T max4(const T& a, const T& b, const T& c, const T& d)
{
return max(max(a,b),max(c,d));
}
-#endif /* __KERNEL_GPU__ */
+#endif /* __KERNEL_GPU__ */
ccl_device_inline float min4(float a, float b, float c, float d)
{
@@ -220,7 +220,31 @@ ccl_device_inline float __uint_as_float(uint i)
u.i = i;
return u.f;
}
-#endif /* __KERNEL_OPENCL__ */
+
+ccl_device_inline int4 __float4_as_int4(float4 f)
+{
+#ifdef __KERNEL_SSE__
+ return int4(_mm_castps_si128(f.m128));
+ #else
+ return make_int4(__float_as_int(f.x),
+ __float_as_int(f.y),
+ __float_as_int(f.z),
+ __float_as_int(f.w));
+#endif
+}
+
+ccl_device_inline float4 __int4_as_float4(int4 i)
+{
+#ifdef __KERNEL_SSE__
+ return float4(_mm_castsi128_ps(i.m128));
+#else
+ return make_float4(__int_as_float(i.x),
+ __int_as_float(i.y),
+ __int_as_float(i.z),
+ __int_as_float(i.w));
+#endif
+}
+#endif /* __KERNEL_OPENCL__ */
/* Versions of functions which are safe for fast math. */
ccl_device_inline bool isnan_safe(float f)
@@ -615,4 +639,4 @@ ccl_device_inline float2 map_to_sphere(const float3 co)
CCL_NAMESPACE_END
-#endif /* __UTIL_MATH_H__ */
+#endif /* __UTIL_MATH_H__ */
diff --git a/intern/cycles/util/util_math_cdf.h b/intern/cycles/util/util_math_cdf.h
index 79643fe26e3..983855e3e9b 100644
--- a/intern/cycles/util/util_math_cdf.h
+++ b/intern/cycles/util/util_math_cdf.h
@@ -75,4 +75,4 @@ void util_cdf_inverted(const int resolution,
CCL_NAMESPACE_END
-#endif /* __UTIL_MATH_H_CDF__ */
+#endif /* __UTIL_MATH_H_CDF__ */
diff --git a/intern/cycles/util/util_math_fast.h b/intern/cycles/util/util_math_fast.h
index d3960deb3b4..323d40058e5 100644
--- a/intern/cycles/util/util_math_fast.h
+++ b/intern/cycles/util/util_math_fast.h
@@ -58,6 +58,11 @@ ccl_device_inline float madd(const float a, const float b, const float c)
return a * b + c;
}
+ccl_device_inline float4 madd4(const float4 a, const float4 b, const float4 c)
+{
+ return a * b + c;
+}
+
/*
* FAST & APPROXIMATE MATH
*
@@ -438,6 +443,29 @@ ccl_device_inline float fast_expf(float x)
return fast_exp2f(x / M_LN2_F);
}
+#ifndef __KERNEL_GPU__
+ccl_device float4 fast_exp2f4(float4 x)
+{
+ const float4 one = make_float4(1.0f);
+ const float4 limit = make_float4(126.0f);
+ x = clamp(x, -limit, limit);
+ int4 m = make_int4(x);
+ x = one - (one - (x - make_float4(m)));
+ float4 r = make_float4(1.33336498402e-3f);
+ r = madd4(x, r, make_float4(9.810352697968e-3f));
+ r = madd4(x, r, make_float4(5.551834031939e-2f));
+ r = madd4(x, r, make_float4(0.2401793301105f));
+ r = madd4(x, r, make_float4(0.693144857883f));
+ r = madd4(x, r, make_float4(1.0f));
+ return __int4_as_float4(__float4_as_int4(r) + (m << 23));
+}
+
+ccl_device_inline float4 fast_expf4(float4 x)
+{
+ return fast_exp2f4(x / M_LN2_F);
+}
+#endif
+
ccl_device_inline float fast_exp10(float x)
{
/* Examined 2217701018 values of exp10 on [-37.9290009,37.9290009]:
diff --git a/intern/cycles/util/util_math_float2.h b/intern/cycles/util/util_math_float2.h
index 6f9d0855d50..e937509367f 100644
--- a/intern/cycles/util/util_math_float2.h
+++ b/intern/cycles/util/util_math_float2.h
@@ -224,4 +224,4 @@ ccl_device_inline float2 interp(const float2& a, const float2& b, float t)
CCL_NAMESPACE_END
-#endif /* __UTIL_MATH_FLOAT2_H__ */
+#endif /* __UTIL_MATH_FLOAT2_H__ */
diff --git a/intern/cycles/util/util_math_float3.h b/intern/cycles/util/util_math_float3.h
index 75265c1c9a2..a54a3f3087c 100644
--- a/intern/cycles/util/util_math_float3.h
+++ b/intern/cycles/util/util_math_float3.h
@@ -419,4 +419,4 @@ ccl_device_inline float3 ensure_finite3(float3 v)
CCL_NAMESPACE_END
-#endif /* __UTIL_MATH_FLOAT3_H__ */
+#endif /* __UTIL_MATH_FLOAT3_H__ */
diff --git a/intern/cycles/util/util_math_float4.h b/intern/cycles/util/util_math_float4.h
index aa7e56fefe9..479ccf202ba 100644
--- a/intern/cycles/util/util_math_float4.h
+++ b/intern/cycles/util/util_math_float4.h
@@ -38,6 +38,7 @@ ccl_device_inline float4 operator+(const float4& a, const float4& b);
ccl_device_inline float4 operator-(const float4& a, const float4& b);
ccl_device_inline float4 operator+=(float4& a, const float4& b);
ccl_device_inline float4 operator*=(float4& a, const float4& b);
+ccl_device_inline float4 operator*=(float4& a, float f);
ccl_device_inline float4 operator/=(float4& a, float f);
ccl_device_inline int4 operator<(const float4& a, const float4& b);
@@ -58,6 +59,7 @@ ccl_device_inline float4 normalize(const float4& a);
ccl_device_inline float4 safe_normalize(const float4& a);
ccl_device_inline float4 min(const float4& a, const float4& b);
ccl_device_inline float4 max(const float4& a, const float4& b);
+ccl_device_inline float4 clamp(const float4& a, const float4& mn, const float4& mx);
ccl_device_inline float4 fabs(const float4& a);
#endif /* !__KERNEL_OPENCL__*/
@@ -168,6 +170,11 @@ ccl_device_inline float4 operator*=(float4& a, const float4& b)
return a = a * b;
}
+ccl_device_inline float4 operator*=(float4& a, float f)
+{
+ return a = a * f;
+}
+
ccl_device_inline float4 operator/=(float4& a, float f)
{
return a = a / f;
@@ -333,6 +340,11 @@ ccl_device_inline float4 max(const float4& a, const float4& b)
#endif
}
+ccl_device_inline float4 clamp(const float4& a, const float4& mn, const float4& mx)
+{
+ return min(max(a, mn), mx);
+}
+
ccl_device_inline float4 fabs(const float4& a)
{
#ifdef __KERNEL_SSE__
@@ -445,4 +457,4 @@ ccl_device_inline float4 load_float4(const float *v)
CCL_NAMESPACE_END
-#endif /* __UTIL_MATH_FLOAT4_H__ */
+#endif /* __UTIL_MATH_FLOAT4_H__ */
diff --git a/intern/cycles/util/util_math_int2.h b/intern/cycles/util/util_math_int2.h
index 828c49a131c..dd401d9a091 100644
--- a/intern/cycles/util/util_math_int2.h
+++ b/intern/cycles/util/util_math_int2.h
@@ -74,4 +74,4 @@ ccl_device_inline int2 operator/(const int2 &a, const int2 &b)
CCL_NAMESPACE_END
-#endif /* __UTIL_MATH_INT2_H__ */
+#endif /* __UTIL_MATH_INT2_H__ */
diff --git a/intern/cycles/util/util_math_int3.h b/intern/cycles/util/util_math_int3.h
index 81b10f31f4a..2f4752f90f1 100644
--- a/intern/cycles/util/util_math_int3.h
+++ b/intern/cycles/util/util_math_int3.h
@@ -113,4 +113,4 @@ ccl_device_inline int3 operator-(const int3 &a, const int3 &b)
CCL_NAMESPACE_END
-#endif /* __UTIL_MATH_INT3_H__ */
+#endif /* __UTIL_MATH_INT3_H__ */
diff --git a/intern/cycles/util/util_math_int4.h b/intern/cycles/util/util_math_int4.h
index 79a8c0841e7..763c42318d5 100644
--- a/intern/cycles/util/util_math_int4.h
+++ b/intern/cycles/util/util_math_int4.h
@@ -31,6 +31,10 @@ CCL_NAMESPACE_BEGIN
ccl_device_inline int4 operator+(const int4& a, const int4& b);
ccl_device_inline int4 operator+=(int4& a, const int4& b);
ccl_device_inline int4 operator>>(const int4& a, int i);
+ccl_device_inline int4 operator<<(const int4& a, int i);
+ccl_device_inline int4 operator<(const int4& a, const int4& b);
+ccl_device_inline int4 operator>=(const int4& a, const int4& b);
+ccl_device_inline int4 operator&(const int4& a, const int4& b);
ccl_device_inline int4 min(int4 a, int4 b);
ccl_device_inline int4 max(int4 a, int4 b);
ccl_device_inline int4 clamp(const int4& a, const int4& mn, const int4& mx);
@@ -65,6 +69,42 @@ ccl_device_inline int4 operator>>(const int4& a, int i)
#endif
}
+ccl_device_inline int4 operator<<(const int4& a, int i)
+{
+#ifdef __KERNEL_SSE__
+ return int4(_mm_slli_epi32(a.m128, i));
+#else
+ return make_int4(a.x << i, a.y << i, a.z << i, a.w << i);
+#endif
+}
+
+ccl_device_inline int4 operator<(const int4& a, const int4& b)
+{
+#ifdef __KERNEL_SSE__
+ return int4(_mm_cmplt_epi32(a.m128, b.m128));
+#else
+ return make_int4(a.x < b.x, a.y < b.y, a.z < b.z, a.w < b.w);
+#endif
+}
+
+ccl_device_inline int4 operator>=(const int4& a, const int4& b)
+{
+#ifdef __KERNEL_SSE__
+ return int4(_mm_xor_si128(_mm_set1_epi32(0xffffffff), _mm_cmplt_epi32(a.m128, b.m128)));
+#else
+ return make_int4(a.x >= b.x, a.y >= b.y, a.z >= b.z, a.w >= b.w);
+#endif
+}
+
+ccl_device_inline int4 operator&(const int4& a, const int4& b)
+{
+#ifdef __KERNEL_SSE__
+ return int4(_mm_and_si128(a.m128, b.m128));
+#else
+ return make_int4(a.x & b.x, a.y & b.y, a.z & b.z, a.w & b.w);
+#endif
+}
+
ccl_device_inline int4 min(int4 a, int4 b)
{
#if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE41__)
@@ -116,4 +156,4 @@ ccl_device_inline int4 load_int4(const int *v)
CCL_NAMESPACE_END
-#endif /* __UTIL_MATH_INT4_H__ */
+#endif /* __UTIL_MATH_INT4_H__ */
diff --git a/intern/cycles/util/util_math_intersect.h b/intern/cycles/util/util_math_intersect.h
index b5fbb24091f..190c2f5d6b0 100644
--- a/intern/cycles/util/util_math_intersect.h
+++ b/intern/cycles/util/util_math_intersect.h
@@ -219,4 +219,4 @@ ccl_device bool ray_quad_intersect(float3 ray_P, float3 ray_D,
CCL_NAMESPACE_END
-#endif /* __UTIL_MATH_INTERSECT_H__ */
+#endif /* __UTIL_MATH_INTERSECT_H__ */
diff --git a/intern/cycles/util/util_md5.h b/intern/cycles/util/util_md5.h
index 9023ccee4c2..f8c0115d8ce 100644
--- a/intern/cycles/util/util_md5.h
+++ b/intern/cycles/util/util_md5.h
@@ -58,4 +58,4 @@ string util_md5_string(const string& str);
CCL_NAMESPACE_END
-#endif /* __UTIL_MD5_H__ */
+#endif /* __UTIL_MD5_H__ */
diff --git a/intern/cycles/util/util_murmurhash.cpp b/intern/cycles/util/util_murmurhash.cpp
new file mode 100644
index 00000000000..68b2f2031be
--- /dev/null
+++ b/intern/cycles/util/util_murmurhash.cpp
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2018 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 taken from alShaders/Cryptomatte/MurmurHash3.h:
+ *
+ * MurmurHash3 was written by Austin Appleby, and is placed in the public
+ * domain. The author hereby disclaims copyright to this source code.
+ *
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "util/util_algorithm.h"
+#include "util/util_murmurhash.h"
+
+#if defined(_MSC_VER)
+# define ROTL32(x,y) _rotl(x,y)
+# define ROTL64(x,y) _rotl64(x,y)
+# define BIG_CONSTANT(x) (x)
+#else
+ccl_device_inline uint32_t rotl32(uint32_t x, int8_t r)
+{
+ return (x << r) | (x >> (32 - r));
+}
+# define ROTL32(x,y) rotl32(x,y)
+# define BIG_CONSTANT(x) (x##LLU)
+#endif
+
+CCL_NAMESPACE_BEGIN
+
+/* Block read - if your platform needs to do endian-swapping or can only
+ * handle aligned reads, do the conversion here. */
+ccl_device_inline uint32_t mm_hash_getblock32(const uint32_t *p, int i)
+{
+ return p[i];
+}
+
+/* Finalization mix - force all bits of a hash block to avalanche */
+ccl_device_inline uint32_t mm_hash_fmix32 ( uint32_t h )
+{
+ h ^= h >> 16;
+ h *= 0x85ebca6b;
+ h ^= h >> 13;
+ h *= 0xc2b2ae35;
+ h ^= h >> 16;
+ return h;
+}
+
+uint32_t util_murmur_hash3(const void *key, int len, uint32_t seed)
+{
+ const uint8_t * data = (const uint8_t*)key;
+ const int nblocks = len / 4;
+
+ uint32_t h1 = seed;
+
+ const uint32_t c1 = 0xcc9e2d51;
+ const uint32_t c2 = 0x1b873593;
+
+ const uint32_t * blocks = (const uint32_t *)(data + nblocks*4);
+
+ for(int i = -nblocks; i; i++) {
+ uint32_t k1 = mm_hash_getblock32(blocks,i);
+
+ k1 *= c1;
+ k1 = ROTL32(k1,15);
+ k1 *= c2;
+
+ h1 ^= k1;
+ h1 = ROTL32(h1,13);
+ h1 = h1 * 5 + 0xe6546b64;
+ }
+
+ const uint8_t *tail = (const uint8_t*)(data + nblocks*4);
+
+ uint32_t k1 = 0;
+
+ switch(len & 3) {
+ case 3:
+ k1 ^= tail[2] << 16;
+ ATTR_FALLTHROUGH;
+ case 2:
+ k1 ^= tail[1] << 8;
+ ATTR_FALLTHROUGH;
+ case 1:
+ k1 ^= tail[0];
+ k1 *= c1;
+ k1 = ROTL32(k1,15);
+ k1 *= c2;
+ h1 ^= k1;
+ }
+
+ h1 ^= len;
+ h1 = mm_hash_fmix32(h1);
+ return h1;
+}
+
+/* This is taken from the cryptomatte specification 1.0 */
+float util_hash_to_float(uint32_t hash)
+{
+ uint32_t mantissa = hash & (( 1 << 23) - 1);
+ uint32_t exponent = (hash >> 23) & ((1 << 8) - 1);
+ exponent = max(exponent, (uint32_t) 1);
+ exponent = min(exponent, (uint32_t) 254);
+ exponent = exponent << 23;
+ uint32_t sign = (hash >> 31);
+ sign = sign << 31;
+ uint32_t float_bits = sign | exponent | mantissa;
+ float f;
+ memcpy(&f, &float_bits, sizeof(uint32_t));
+ return f;
+}
+
+CCL_NAMESPACE_END
diff --git a/intern/cycles/util/util_murmurhash.h b/intern/cycles/util/util_murmurhash.h
new file mode 100644
index 00000000000..3e7897d3ae6
--- /dev/null
+++ b/intern/cycles/util/util_murmurhash.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2018 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.
+ */
+
+
+#ifndef __UTIL_MURMURHASH_H__
+#define __UTIL_MURMURHASH_H__
+
+#include "util/util_types.h"
+
+CCL_NAMESPACE_BEGIN
+
+uint32_t util_murmur_hash3(const void *key, int len, uint32_t seed);
+float util_hash_to_float(uint32_t hash);
+
+CCL_NAMESPACE_END
+
+#endif /* __UTIL_MURMURHASH_H__ */
diff --git a/intern/cycles/util/util_opengl.h b/intern/cycles/util/util_opengl.h
index 0b5462e0a09..2ca7b7e4c87 100644
--- a/intern/cycles/util/util_opengl.h
+++ b/intern/cycles/util/util_opengl.h
@@ -28,4 +28,4 @@
# define mxMakeCurrentContext(x) (x)
#endif
-#endif /* __UTIL_OPENGL_H__ */
+#endif /* __UTIL_OPENGL_H__ */
diff --git a/intern/cycles/util/util_optimization.h b/intern/cycles/util/util_optimization.h
index 3b3627242d5..5267bd9a97a 100644
--- a/intern/cycles/util/util_optimization.h
+++ b/intern/cycles/util/util_optimization.h
@@ -68,4 +68,4 @@
#endif
-#endif /* __UTIL_OPTIMIZATION_H__ */
+#endif /* __UTIL_OPTIMIZATION_H__ */
diff --git a/intern/cycles/util/util_param.h b/intern/cycles/util/util_param.h
index 246b5cb7d63..4453c66aae2 100644
--- a/intern/cycles/util/util_param.h
+++ b/intern/cycles/util/util_param.h
@@ -30,4 +30,4 @@ OIIO_NAMESPACE_USING
CCL_NAMESPACE_END
-#endif /* __UTIL_PARAM_H__ */
+#endif /* __UTIL_PARAM_H__ */
diff --git a/intern/cycles/util/util_path.cpp b/intern/cycles/util/util_path.cpp
index 51b7944705e..93080a6c80c 100644
--- a/intern/cycles/util/util_path.cpp
+++ b/intern/cycles/util/util_path.cpp
@@ -614,7 +614,7 @@ bool path_exists(const string& path)
return 0;
}
return st.st_mode != 0;
-#endif /* _WIN32 */
+#endif /* _WIN32 */
}
bool path_is_directory(const string& path)
diff --git a/intern/cycles/util/util_progress.h b/intern/cycles/util/util_progress.h
index 3ef15c5c09a..4ed9ebd60ff 100644
--- a/intern/cycles/util/util_progress.h
+++ b/intern/cycles/util/util_progress.h
@@ -114,7 +114,7 @@ public:
return cancel_message;
}
- void set_cancel_callback(function<void(void)> function)
+ void set_cancel_callback(function<void()> function)
{
cancel_cb = function;
}
@@ -323,7 +323,7 @@ public:
}
}
- void set_update_callback(function<void(void)> function)
+ void set_update_callback(function<void()> function)
{
update_cb = function;
}
@@ -331,8 +331,8 @@ public:
protected:
thread_mutex progress_mutex;
thread_mutex update_mutex;
- function<void(void)> update_cb;
- function<void(void)> cancel_cb;
+ function<void()> update_cb;
+ function<void()> cancel_cb;
/* pixel_samples counts how many samples have been rendered over all pixel, not just per pixel.
* This makes the progress estimate more accurate when tiles with different sizes are used.
@@ -365,4 +365,4 @@ protected:
CCL_NAMESPACE_END
-#endif /* __UTIL_PROGRESS_H__ */
+#endif /* __UTIL_PROGRESS_H__ */
diff --git a/intern/cycles/util/util_projection.h b/intern/cycles/util/util_projection.h
index 26b4843928c..d1af013ae3a 100644
--- a/intern/cycles/util/util_projection.h
+++ b/intern/cycles/util/util_projection.h
@@ -169,8 +169,8 @@ ccl_device_inline ProjectionTransform projection_orthographic(float znear, float
return ProjectionTransform(t);
}
-#endif /* __KERNEL_GPU__ */
+#endif /* __KERNEL_GPU__ */
CCL_NAMESPACE_END
-#endif /* __UTIL_PROJECTION_H__ */
+#endif /* __UTIL_PROJECTION_H__ */
diff --git a/intern/cycles/util/util_queue.h b/intern/cycles/util/util_queue.h
index 622f4fe3e47..0a2b7718f57 100644
--- a/intern/cycles/util/util_queue.h
+++ b/intern/cycles/util/util_queue.h
@@ -25,4 +25,4 @@ using std::queue;
CCL_NAMESPACE_END
-#endif /* __UTIL_LIST_H__ */
+#endif /* __UTIL_LIST_H__ */
diff --git a/intern/cycles/util/util_rect.h b/intern/cycles/util/util_rect.h
index d13baefe85e..389669acf2e 100644
--- a/intern/cycles/util/util_rect.h
+++ b/intern/cycles/util/util_rect.h
@@ -69,4 +69,4 @@ ccl_device_inline int rect_size(int4 rect)
CCL_NAMESPACE_END
-#endif /* __UTIL_RECT_H__ */
+#endif /* __UTIL_RECT_H__ */
diff --git a/intern/cycles/util/util_set.h b/intern/cycles/util/util_set.h
index 298e1f7729a..a9c56bb4919 100644
--- a/intern/cycles/util/util_set.h
+++ b/intern/cycles/util/util_set.h
@@ -31,4 +31,4 @@ using std::unordered_set;
CCL_NAMESPACE_END
-#endif /* __UTIL_SET_H__ */
+#endif /* __UTIL_SET_H__ */
diff --git a/intern/cycles/util/util_simd.h b/intern/cycles/util/util_simd.h
index cc7f436c8fe..565ea768089 100644
--- a/intern/cycles/util/util_simd.h
+++ b/intern/cycles/util/util_simd.h
@@ -219,9 +219,9 @@ __forceinline size_t __bscf(size_t& v)
return i;
}
-#endif /* __KERNEL_64_BIT__ */
+#endif /* __KERNEL_64_BIT__ */
-#else /* _WIN32 */
+#else /* _WIN32 */
__forceinline unsigned int __popcnt(unsigned int in) {
int r = 0; asm ("popcnt %1,%0" : "=r"(r) : "r"(in)); return r;
@@ -344,7 +344,7 @@ __forceinline size_t __bscf(size_t& v)
}
#endif
-#endif /* _WIN32 */
+#endif /* _WIN32 */
/* Test __KERNEL_SSE41__ for MSVC which does not define __SSE4_1__, and test
* __SSE4_1__ to avoid OpenImageIO conflicts with our emulation macros on other
@@ -442,7 +442,7 @@ __forceinline __m128 _mm_round_ps_emu( __m128 value, const int flags)
return value;
}
-#endif /* !(defined(__KERNEL_SSE41__) || defined(__SSE4_1__) || defined(__SSE4_2__)) */
+#endif /* !(defined(__KERNEL_SSE41__) || defined(__SSE4_1__) || defined(__SSE4_2__)) */
#else /* __KERNEL_SSE2__ */
@@ -470,7 +470,7 @@ ccl_device_inline int __bsr(int value)
return bit;
}
-#endif /* __KERNEL_SSE2__ */
+#endif /* __KERNEL_SSE2__ */
/* quiet unused define warnings */
#if defined(__KERNEL_SSE2__) || \
@@ -484,6 +484,6 @@ ccl_device_inline int __bsr(int value)
CCL_NAMESPACE_END
-#endif /* __KERNEL_GPU__ */
+#endif /* __KERNEL_GPU__ */
-#endif /* __UTIL_SIMD_TYPES_H__ */
+#endif /* __UTIL_SIMD_TYPES_H__ */
diff --git a/intern/cycles/util/util_sky_model.h b/intern/cycles/util/util_sky_model.h
index 237e4e61bf5..2e593f58c39 100644
--- a/intern/cycles/util/util_sky_model.h
+++ b/intern/cycles/util/util_sky_model.h
@@ -437,6 +437,6 @@ double arhosekskymodel_solar_radiance(ArHosekSkyModelState* state,
double wavelength);
-#endif // _SKY_MODEL_H_
+#endif // _SKY_MODEL_H_
CCL_NAMESPACE_END
diff --git a/intern/cycles/util/util_sseb.h b/intern/cycles/util/util_sseb.h
index 115b133c662..f6810505126 100644
--- a/intern/cycles/util/util_sseb.h
+++ b/intern/cycles/util/util_sseb.h
@@ -177,7 +177,7 @@ __forceinline size_t movemask( const sseb& a ) { return _mm_movemask_ps(a); }
ccl_device_inline void print_sseb(const char *label, const sseb &a)
{
- printf("%s: %df %df %df %d\n",
+ printf("%s: %d %d %d %d\n",
label, a[0], a[1], a[2], a[3]);
}
diff --git a/intern/cycles/util/util_ssef.h b/intern/cycles/util/util_ssef.h
index b5623860e33..66670c9a779 100644
--- a/intern/cycles/util/util_ssef.h
+++ b/intern/cycles/util/util_ssef.h
@@ -44,8 +44,8 @@ struct ssef
__forceinline ssef& operator=(const ssef& other) { m128 = other.m128; return *this; }
__forceinline ssef(const __m128 a) : m128(a) {}
- __forceinline operator const __m128&(void) const { return m128; }
- __forceinline operator __m128&(void) { return m128; }
+ __forceinline operator const __m128&() const { return m128; }
+ __forceinline operator __m128&() { return m128; }
__forceinline ssef (float a) : m128(_mm_set1_ps(a)) {}
__forceinline ssef (float a, float b, float c, float d) : m128(_mm_setr_ps(a, b, c, d)) {}
@@ -517,12 +517,12 @@ ccl_device_inline float len3(const ssef& a)
/* faster version for SSSE3 */
typedef ssei shuffle_swap_t;
-ccl_device_inline shuffle_swap_t shuffle_swap_identity(void)
+ccl_device_inline shuffle_swap_t shuffle_swap_identity()
{
return _mm_set_epi8(15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0);
}
-ccl_device_inline shuffle_swap_t shuffle_swap_swap(void)
+ccl_device_inline shuffle_swap_t shuffle_swap_swap()
{
return _mm_set_epi8(7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8);
}
@@ -537,12 +537,12 @@ ccl_device_inline const ssef shuffle_swap(const ssef& a, const shuffle_swap_t& s
/* somewhat slower version for SSE2 */
typedef int shuffle_swap_t;
-ccl_device_inline shuffle_swap_t shuffle_swap_identity(void)
+ccl_device_inline shuffle_swap_t shuffle_swap_identity()
{
return 0;
}
-ccl_device_inline shuffle_swap_t shuffle_swap_swap(void)
+ccl_device_inline shuffle_swap_t shuffle_swap_swap()
{
return 1;
}
diff --git a/intern/cycles/util/util_stack_allocator.h b/intern/cycles/util/util_stack_allocator.h
index 79a535bd170..4e978e18bee 100644
--- a/intern/cycles/util/util_stack_allocator.h
+++ b/intern/cycles/util/util_stack_allocator.h
@@ -53,7 +53,7 @@ public:
T *allocate(size_t n, const void *hint = 0)
{
- (void)hint;
+ (void) hint;
if(n == 0) {
return NULL;
}
@@ -164,4 +164,4 @@ private:
CCL_NAMESPACE_END
-#endif /* __UTIL_GUARDED_ALLOCATOR_H__ */
+#endif /* __UTIL_STACK_ALLOCATOR_H__ */
diff --git a/intern/cycles/util/util_static_assert.h b/intern/cycles/util/util_static_assert.h
index dc3cb3f6ecc..b1c6c374693 100644
--- a/intern/cycles/util/util_static_assert.h
+++ b/intern/cycles/util/util_static_assert.h
@@ -47,4 +47,4 @@ CCL_NAMESPACE_BEGIN
CCL_NAMESPACE_END
-#endif /* __UTIL_STATIC_ASSERT_H__ */
+#endif /* __UTIL_STATIC_ASSERT_H__ */
diff --git a/intern/cycles/util/util_stats.h b/intern/cycles/util/util_stats.h
index 7667f58eb7d..0ba58422a67 100644
--- a/intern/cycles/util/util_stats.h
+++ b/intern/cycles/util/util_stats.h
@@ -44,4 +44,4 @@ public:
CCL_NAMESPACE_END
-#endif /* __UTIL_STATS_H__ */
+#endif /* __UTIL_STATS_H__ */
diff --git a/intern/cycles/util/util_string.h b/intern/cycles/util/util_string.h
index 3a4f4398158..f17112c30d2 100644
--- a/intern/cycles/util/util_string.h
+++ b/intern/cycles/util/util_string.h
@@ -74,4 +74,4 @@ string string_human_readable_number(size_t num);
CCL_NAMESPACE_END
-#endif /* __UTIL_STRING_H__ */
+#endif /* __UTIL_STRING_H__ */
diff --git a/intern/cycles/util/util_system.cpp b/intern/cycles/util/util_system.cpp
index 1b039888452..34f428f111c 100644
--- a/intern/cycles/util/util_system.cpp
+++ b/intern/cycles/util/util_system.cpp
@@ -52,14 +52,14 @@ int system_cpu_group_thread_count(int group)
util_windows_init_numa_groups();
return GetActiveProcessorCount(group);
#elif defined(__APPLE__)
- (void)group;
+ (void) group;
int count;
size_t len = sizeof(count);
int mib[2] = { CTL_HW, HW_NCPU };
sysctl(mib, 2, &count, &len, NULL, 0);
return count;
#else
- (void)group;
+ (void) group;
return sysconf(_SC_NPROCESSORS_ONLN);
#endif
}
diff --git a/intern/cycles/util/util_system.h b/intern/cycles/util/util_system.h
index 42ad72356b9..241ac897157 100644
--- a/intern/cycles/util/util_system.h
+++ b/intern/cycles/util/util_system.h
@@ -46,4 +46,4 @@ size_t system_physical_ram();
CCL_NAMESPACE_END
-#endif /* __UTIL_SYSTEM_H__ */
+#endif /* __UTIL_SYSTEM_H__ */
diff --git a/intern/cycles/util/util_texture.h b/intern/cycles/util/util_texture.h
index f752e81128d..233cfe33305 100644
--- a/intern/cycles/util/util_texture.h
+++ b/intern/cycles/util/util_texture.h
@@ -89,4 +89,4 @@ typedef struct TextureInfo {
CCL_NAMESPACE_END
-#endif /* __UTIL_TEXTURE_H__ */
+#endif /* __UTIL_TEXTURE_H__ */
diff --git a/intern/cycles/util/util_thread.cpp b/intern/cycles/util/util_thread.cpp
index 16a8591a8a9..37d8bdbd4b0 100644
--- a/intern/cycles/util/util_thread.cpp
+++ b/intern/cycles/util/util_thread.cpp
@@ -21,7 +21,7 @@
CCL_NAMESPACE_BEGIN
-thread::thread(function<void(void)> run_cb, int group)
+thread::thread(function<void()> run_cb, int group)
: run_cb_(run_cb),
joined_(false),
group_(group)
diff --git a/intern/cycles/util/util_thread.h b/intern/cycles/util/util_thread.h
index f39fcfb4279..6250bb95dcf 100644
--- a/intern/cycles/util/util_thread.h
+++ b/intern/cycles/util/util_thread.h
@@ -46,14 +46,14 @@ typedef std::condition_variable thread_condition_variable;
class thread {
public:
- thread(function<void(void)> run_cb, int group = -1);
+ thread(function<void()> run_cb, int group = -1);
~thread();
static void *run(void *arg);
bool join();
protected:
- function<void(void)> run_cb_;
+ function<void()> run_cb_;
std::thread thread_;
bool joined_;
int group_;
@@ -138,4 +138,4 @@ protected:
CCL_NAMESPACE_END
-#endif /* __UTIL_THREAD_H__ */
+#endif /* __UTIL_THREAD_H__ */
diff --git a/intern/cycles/util/util_transform.h b/intern/cycles/util/util_transform.h
index e781f85dded..e4cadd3e81a 100644
--- a/intern/cycles/util/util_transform.h
+++ b/intern/cycles/util/util_transform.h
@@ -424,6 +424,31 @@ ccl_device void transform_motion_array_interpolate(Transform *tfm,
#ifndef __KERNEL_GPU__
+#ifdef WITH_EMBREE
+ccl_device void transform_motion_array_interpolate_straight(Transform *tfm,
+ const ccl_global DecomposedTransform *motion,
+ uint numsteps,
+ float time)
+{
+ /* Figure out which steps we need to interpolate. */
+ int maxstep = numsteps - 1;
+ int step = min((int)(time*maxstep), maxstep - 1);
+ float t = time * maxstep - step;
+
+ const ccl_global DecomposedTransform *a = motion + step;
+ const ccl_global DecomposedTransform *b = motion + step + 1;
+ Transform step1, step2;
+
+ transform_compose(&step1, a);
+ transform_compose(&step2, b);
+
+ /* matrix lerp */
+ tfm->x = (1.0f - t) * step1.x + t * step2.x;
+ tfm->y = (1.0f - t) * step1.y + t * step2.y;
+ tfm->z = (1.0f - t) * step1.z + t * step2.z;
+}
+#endif
+
class BoundBox2D;
ccl_device_inline bool operator==(const DecomposedTransform& A, const DecomposedTransform& B)
@@ -470,4 +495,4 @@ OPENCL_TRANSFORM_ADDRSPACE_DECLARE(transform_direction_transposed)
CCL_NAMESPACE_END
-#endif /* __UTIL_TRANSFORM_H__ */
+#endif /* __UTIL_TRANSFORM_H__ */
diff --git a/intern/cycles/util/util_types.h b/intern/cycles/util/util_types.h
index 96c549b9be5..535048d8f8c 100644
--- a/intern/cycles/util/util_types.h
+++ b/intern/cycles/util/util_types.h
@@ -156,4 +156,4 @@ CCL_NAMESPACE_END
#endif
#endif
-#endif /* __UTIL_TYPES_H__ */
+#endif /* __UTIL_TYPES_H__ */
diff --git a/intern/cycles/util/util_types_float3.h b/intern/cycles/util/util_types_float3.h
index 28146ad04f7..ed2300e7996 100644
--- a/intern/cycles/util/util_types_float3.h
+++ b/intern/cycles/util/util_types_float3.h
@@ -35,8 +35,8 @@ struct ccl_try_align(16) float3 {
__forceinline float3(const float3& a);
__forceinline explicit float3(const __m128& a);
- __forceinline operator const __m128&(void) const;
- __forceinline operator __m128&(void);
+ __forceinline operator const __m128&() const;
+ __forceinline operator __m128&();
__forceinline float3& operator =(const float3& a);
#else /* __KERNEL_SSE__ */
diff --git a/intern/cycles/util/util_types_float3_impl.h b/intern/cycles/util/util_types_float3_impl.h
index 45f61767d3f..2e840a5c399 100644
--- a/intern/cycles/util/util_types_float3_impl.h
+++ b/intern/cycles/util/util_types_float3_impl.h
@@ -43,12 +43,12 @@ __forceinline float3::float3(const __m128& a)
{
}
-__forceinline float3::operator const __m128&(void) const
+__forceinline float3::operator const __m128&() const
{
return m128;
}
-__forceinline float3::operator __m128&(void)
+__forceinline float3::operator __m128&()
{
return m128;
}
diff --git a/intern/cycles/util/util_types_float4.h b/intern/cycles/util/util_types_float4.h
index 154391f6881..5c10d483c2e 100644
--- a/intern/cycles/util/util_types_float4.h
+++ b/intern/cycles/util/util_types_float4.h
@@ -36,8 +36,8 @@ struct ccl_try_align(16) float4 {
__forceinline float4();
__forceinline explicit float4(const __m128& a);
- __forceinline operator const __m128&(void) const;
- __forceinline operator __m128&(void);
+ __forceinline operator const __m128&() const;
+ __forceinline operator __m128&();
__forceinline float4& operator =(const float4& a);
diff --git a/intern/cycles/util/util_types_float4_impl.h b/intern/cycles/util/util_types_float4_impl.h
index a49fac65b10..a83148031f1 100644
--- a/intern/cycles/util/util_types_float4_impl.h
+++ b/intern/cycles/util/util_types_float4_impl.h
@@ -38,12 +38,12 @@ __forceinline float4::float4(const __m128& a)
{
}
-__forceinline float4::operator const __m128&(void) const
+__forceinline float4::operator const __m128&() const
{
return m128;
}
-__forceinline float4::operator __m128&(void)
+__forceinline float4::operator __m128&()
{
return m128;
}
diff --git a/intern/cycles/util/util_types_float8.h b/intern/cycles/util/util_types_float8.h
index 64ec5a71355..08720b8ff48 100644
--- a/intern/cycles/util/util_types_float8.h
+++ b/intern/cycles/util/util_types_float8.h
@@ -37,7 +37,7 @@ CCL_NAMESPACE_BEGIN
#ifndef __KERNEL_GPU__
-struct ccl_try_align(16) float8 {
+struct ccl_try_align(32) float8 {
#ifdef __KERNEL_AVX2__
union {
__m256 m256;
@@ -48,8 +48,8 @@ struct ccl_try_align(16) float8 {
__forceinline float8(const float8& a);
__forceinline explicit float8(const __m256& a);
- __forceinline operator const __m256&(void) const;
- __forceinline operator __m256&(void);
+ __forceinline operator const __m256&() const;
+ __forceinline operator __m256&();
__forceinline float8& operator =(const float8& a);
diff --git a/intern/cycles/util/util_types_float8_impl.h b/intern/cycles/util/util_types_float8_impl.h
index ebf8260bc7c..84fe233c334 100644
--- a/intern/cycles/util/util_types_float8_impl.h
+++ b/intern/cycles/util/util_types_float8_impl.h
@@ -55,12 +55,12 @@ __forceinline float8::float8(const __m256& f)
{
}
-__forceinline float8::operator const __m256&(void) const
+__forceinline float8::operator const __m256&() const
{
return m256;
}
-__forceinline float8::operator __m256&(void)
+__forceinline float8::operator __m256&()
{
return m256;
}
diff --git a/intern/cycles/util/util_types_int3.h b/intern/cycles/util/util_types_int3.h
index 9d43b201c02..f68074b982b 100644
--- a/intern/cycles/util/util_types_int3.h
+++ b/intern/cycles/util/util_types_int3.h
@@ -35,8 +35,8 @@ struct ccl_try_align(16) int3 {
__forceinline int3(const int3& a);
__forceinline explicit int3(const __m128i& a);
- __forceinline operator const __m128i&(void) const;
- __forceinline operator __m128i&(void);
+ __forceinline operator const __m128i&() const;
+ __forceinline operator __m128i&();
__forceinline int3& operator =(const int3& a);
#else /* __KERNEL_SSE__ */
diff --git a/intern/cycles/util/util_types_int3_impl.h b/intern/cycles/util/util_types_int3_impl.h
index ada50c4812c..1b195ca753f 100644
--- a/intern/cycles/util/util_types_int3_impl.h
+++ b/intern/cycles/util/util_types_int3_impl.h
@@ -43,12 +43,12 @@ __forceinline int3::int3(const int3& a)
{
}
-__forceinline int3::operator const __m128i&(void) const
+__forceinline int3::operator const __m128i&() const
{
return m128;
}
-__forceinline int3::operator __m128i&(void)
+__forceinline int3::operator __m128i&()
{
return m128;
}
diff --git a/intern/cycles/util/util_types_int4.h b/intern/cycles/util/util_types_int4.h
index cdd0ecbdae5..52e6fed8c14 100644
--- a/intern/cycles/util/util_types_int4.h
+++ b/intern/cycles/util/util_types_int4.h
@@ -26,6 +26,7 @@ CCL_NAMESPACE_BEGIN
#ifndef __KERNEL_GPU__
struct float3;
+struct float4;
struct ccl_try_align(16) int4 {
#ifdef __KERNEL_SSE__
@@ -38,8 +39,8 @@ struct ccl_try_align(16) int4 {
__forceinline int4(const int4& a);
__forceinline explicit int4(const __m128i& a);
- __forceinline operator const __m128i&(void) const;
- __forceinline operator __m128i&(void);
+ __forceinline operator const __m128i&() const;
+ __forceinline operator __m128i&();
__forceinline int4& operator=(const int4& a);
#else /* __KERNEL_SSE__ */
@@ -53,6 +54,7 @@ struct ccl_try_align(16) int4 {
ccl_device_inline int4 make_int4(int i);
ccl_device_inline int4 make_int4(int x, int y, int z, int w);
ccl_device_inline int4 make_int4(const float3& f);
+ccl_device_inline int4 make_int4(const float4& f);
ccl_device_inline void print_int4(const char *label, const int4& a);
#endif /* __KERNEL_GPU__ */
diff --git a/intern/cycles/util/util_types_int4_impl.h b/intern/cycles/util/util_types_int4_impl.h
index 07cdc88f2dc..c058f86c400 100644
--- a/intern/cycles/util/util_types_int4_impl.h
+++ b/intern/cycles/util/util_types_int4_impl.h
@@ -43,12 +43,12 @@ __forceinline int4::int4(const __m128i& a)
{
}
-__forceinline int4::operator const __m128i&(void) const
+__forceinline int4::operator const __m128i&() const
{
return m128;
}
-__forceinline int4::operator __m128i&(void)
+__forceinline int4::operator __m128i&()
{
return m128;
}
@@ -104,6 +104,16 @@ ccl_device_inline int4 make_int4(const float3& f)
return a;
}
+ccl_device_inline int4 make_int4(const float4& f)
+{
+#ifdef __KERNEL_SSE__
+ int4 a(_mm_cvtps_epi32(f.m128));
+#else
+ int4 a = {(int)f.x, (int)f.y, (int)f.z, (int)f.w};
+#endif
+ return a;
+}
+
ccl_device_inline void print_int4(const char *label, const int4& a)
{
printf("%s: %d %d %d %d\n", label, a.x, a.y, a.z, a.w);
diff --git a/intern/cycles/util/util_vector.h b/intern/cycles/util/util_vector.h
index 0b33221ad4d..18fa231d6e7 100644
--- a/intern/cycles/util/util_vector.h
+++ b/intern/cycles/util/util_vector.h
@@ -17,8 +17,6 @@
#ifndef __UTIL_VECTOR_H__
#define __UTIL_VECTOR_H__
-/* Vector */
-
#include <cassert>
#include <cstring>
#include <vector>
@@ -29,12 +27,9 @@
CCL_NAMESPACE_BEGIN
-/* Vector
- *
- * Own subclass-ed vestion of std::vector. Subclass is needed because:
+/* Own subclass-ed vestion of std::vector. Subclass is needed because:
*
* - Use own allocator which keeps track of used/peak memory.
- *
* - Have method to ensure capacity is re-set to 0.
*/
template<typename value_type,
@@ -42,30 +37,16 @@ template<typename value_type,
class vector : public std::vector<value_type, allocator_type>
{
public:
- /* Default constructor. */
- explicit vector() : std::vector<value_type, allocator_type>() { }
-
- /* Fill constructor. */
- explicit vector(size_t n, const value_type& val = value_type())
- : std::vector<value_type, allocator_type>(n, val) { }
-
- /* Range constructor. */
- template <class InputIterator>
- vector(InputIterator first, InputIterator last)
- : std::vector<value_type, allocator_type>(first, last) { }
-
- /* Copy constructor. */
- vector(const vector &x) : std::vector<value_type, allocator_type>(x) { }
+ typedef std::vector<value_type, allocator_type> BaseClass;
- void shrink_to_fit(void)
- {
- std::vector<value_type, allocator_type>::shrink_to_fit();
- }
+ /* Inherit all constructors from base class. */
+ using BaseClass::vector;
- void free_memory(void)
+ /* Try as hard as possible to use zero memory. */
+ void free_memory()
{
- std::vector<value_type, allocator_type>::resize(0);
- shrink_to_fit();
+ BaseClass::resize(0);
+ BaseClass::shrink_to_fit();
}
/* Some external API might demand working with std::vector. */
@@ -75,265 +56,6 @@ public:
}
};
-/* Array
- *
- * Simplified version of vector, serving multiple purposes:
- * - somewhat faster in that it does not clear memory on resize/alloc,
- * this was actually showing up in profiles quite significantly. it
- * also does not run any constructors/destructors
- * - if this is used, we are not tempted to use inefficient operations
- * - aligned allocation for CPU native data types */
-
-template<typename T, size_t alignment = MIN_ALIGNMENT_CPU_DATA_TYPES>
-class array
-{
-public:
- array()
- : data_(NULL),
- datasize_(0),
- capacity_(0)
- {}
-
- explicit array(size_t newsize)
- {
- if(newsize == 0) {
- data_ = NULL;
- datasize_ = 0;
- capacity_ = 0;
- }
- else {
- data_ = mem_allocate(newsize);
- datasize_ = newsize;
- capacity_ = datasize_;
- }
- }
-
- array(const array& from)
- {
- if(from.datasize_ == 0) {
- data_ = NULL;
- datasize_ = 0;
- capacity_ = 0;
- }
- else {
- data_ = mem_allocate(from.datasize_);
- memcpy(data_, from.data_, from.datasize_*sizeof(T));
- datasize_ = from.datasize_;
- capacity_ = datasize_;
- }
- }
-
- array& operator=(const array& from)
- {
- if(this != &from) {
- resize(from.size());
- memcpy((void*)data_, from.data_, datasize_*sizeof(T));
- }
-
- return *this;
- }
-
- array& operator=(const vector<T>& from)
- {
- resize(from.size());
-
- if(from.size() > 0) {
- memcpy(data_, &from[0], datasize_*sizeof(T));
- }
-
- return *this;
- }
-
- ~array()
- {
- mem_free(data_, capacity_);
- }
-
- bool operator==(const array<T>& other) const
- {
- if(datasize_ != other.datasize_) {
- return false;
- }
-
- return memcmp(data_, other.data_, datasize_*sizeof(T)) == 0;
- }
-
- bool operator!=(const array<T>& other) const
- {
- return !(*this == other);
- }
-
- void steal_data(array& from)
- {
- if(this != &from) {
- clear();
-
- data_ = from.data_;
- datasize_ = from.datasize_;
- capacity_ = from.capacity_;
-
- from.data_ = NULL;
- from.datasize_ = 0;
- from.capacity_ = 0;
- }
- }
-
- T *steal_pointer()
- {
- T *ptr = data_;
- data_ = NULL;
- clear();
- return ptr;
- }
-
- T* resize(size_t newsize)
- {
- if(newsize == 0) {
- clear();
- }
- else if(newsize != datasize_) {
- if(newsize > capacity_) {
- T *newdata = mem_allocate(newsize);
- if(newdata == NULL) {
- /* Allocation failed, likely out of memory. */
- clear();
- return NULL;
- }
- else if(data_ != NULL) {
- memcpy((void *)newdata,
- data_,
- ((datasize_ < newsize)? datasize_: newsize)*sizeof(T));
- mem_free(data_, capacity_);
- }
- data_ = newdata;
- capacity_ = newsize;
- }
- datasize_ = newsize;
- }
- return data_;
- }
-
- T* resize(size_t newsize, const T& value)
- {
- size_t oldsize = size();
- resize(newsize);
-
- for(size_t i = oldsize; i < size(); i++) {
- data_[i] = value;
- }
-
- return data_;
- }
-
- void clear()
- {
- if(data_ != NULL) {
- mem_free(data_, capacity_);
- data_ = NULL;
- }
- datasize_ = 0;
- capacity_ = 0;
- }
-
- size_t empty() const
- {
- return datasize_ == 0;
- }
-
- size_t size() const
- {
- return datasize_;
- }
-
- T* data()
- {
- return data_;
- }
-
- const T* data() const
- {
- return data_;
- }
-
- T& operator[](size_t i) const
- {
- assert(i < datasize_);
- return data_[i];
- }
-
- void reserve(size_t newcapacity)
- {
- if(newcapacity > capacity_) {
- T *newdata = mem_allocate(newcapacity);
- if(data_ != NULL) {
- memcpy(newdata, data_, ((datasize_ < newcapacity)? datasize_: newcapacity)*sizeof(T));
- mem_free(data_, capacity_);
- }
- data_ = newdata;
- capacity_ = newcapacity;
- }
- }
-
- size_t capacity() const
- {
- return capacity_;
- }
-
- // do not use this method unless you are sure the code is not performance critical
- void push_back_slow(const T& t)
- {
- if(capacity_ == datasize_)
- {
- reserve(datasize_ == 0 ? 1 : (size_t)((datasize_ + 1) * 1.2));
- }
-
- data_[datasize_++] = t;
- }
-
- void push_back_reserved(const T& t)
- {
- assert(datasize_ < capacity_);
- push_back_slow(t);
- }
-
- void append(const array<T>& from)
- {
- if(from.size()) {
- size_t old_size = size();
- resize(old_size + from.size());
- memcpy(data_ + old_size, from.data(), sizeof(T) * from.size());
- }
- }
-
-protected:
- inline T* mem_allocate(size_t N)
- {
- if(N == 0) {
- return NULL;
- }
- T *mem = (T*)util_aligned_malloc(sizeof(T)*N, alignment);
- if(mem != NULL) {
- util_guarded_mem_alloc(sizeof(T)*N);
- }
- else {
- throw std::bad_alloc();
- }
- return mem;
- }
-
- inline void mem_free(T *mem, size_t N)
- {
- if(mem != NULL) {
- util_guarded_mem_free(sizeof(T)*N);
- util_aligned_free(mem);
- }
- }
-
- T *data_;
- size_t datasize_;
- size_t capacity_;
-};
-
CCL_NAMESPACE_END
-#endif /* __UTIL_VECTOR_H__ */
+#endif /* __UTIL_VECTOR_H__ */
diff --git a/intern/cycles/util/util_version.h b/intern/cycles/util/util_version.h
index 112255f447b..980c5a269e6 100644
--- a/intern/cycles/util/util_version.h
+++ b/intern/cycles/util/util_version.h
@@ -34,4 +34,4 @@ CCL_NAMESPACE_BEGIN
CCL_NAMESPACE_END
-#endif /* __UTIL_VERSION_H__ */
+#endif /* __UTIL_VERSION_H__ */
diff --git a/intern/cycles/util/util_view.cpp b/intern/cycles/util/util_view.cpp
index 3836cc86ee0..9dffd7a80bd 100644
--- a/intern/cycles/util/util_view.cpp
+++ b/intern/cycles/util/util_view.cpp
@@ -215,7 +215,7 @@ static void view_motion(int x, int y)
V.mouseY = y;
}
-static void view_idle(void)
+static void view_idle()
{
if(V.redraw) {
V.redraw = false;
diff --git a/intern/cycles/util/util_view.h b/intern/cycles/util/util_view.h
index e603e605776..ae50b098b39 100644
--- a/intern/cycles/util/util_view.h
+++ b/intern/cycles/util/util_view.h
@@ -22,10 +22,10 @@
CCL_NAMESPACE_BEGIN
-typedef void (*ViewInitFunc)(void);
-typedef void (*ViewExitFunc)(void);
+typedef void (*ViewInitFunc)();
+typedef void (*ViewExitFunc)();
typedef void (*ViewResizeFunc)(int width, int height);
-typedef void (*ViewDisplayFunc)(void);
+typedef void (*ViewDisplayFunc)();
typedef void (*ViewKeyboardFunc)(unsigned char key);
typedef void (*ViewMotionFunc)(int x, int y, int button);
@@ -40,4 +40,4 @@ void view_redraw();
CCL_NAMESPACE_END
-#endif /*__UTIL_VIEW_H__*/
+#endif /*__UTIL_VIEW_H__*/
diff --git a/intern/cycles/util/util_windows.h b/intern/cycles/util/util_windows.h
index 3b23ce8a3cb..9b9268fed7a 100644
--- a/intern/cycles/util/util_windows.h
+++ b/intern/cycles/util/util_windows.h
@@ -56,4 +56,4 @@ CCL_NAMESPACE_END
#endif /* WIN32 */
-#endif /* __UTIL_WINDOWS_H__ */
+#endif /* __UTIL_WINDOWS_H__ */
diff --git a/intern/cycles/util/util_xml.h b/intern/cycles/util/util_xml.h
index 6f06f17937b..c8a3a495f30 100644
--- a/intern/cycles/util/util_xml.h
+++ b/intern/cycles/util/util_xml.h
@@ -38,4 +38,4 @@ using PUGIXML_NAMESPACE::xml_parse_result;
CCL_NAMESPACE_END
-#endif /* __UTIL_XML_H__ */
+#endif /* __UTIL_XML_H__ */
diff --git a/intern/elbeem/extern/LBM_fluidsim.h b/intern/elbeem/extern/LBM_fluidsim.h
index 374e11d1c06..05ac143c7a1 100644
--- a/intern/elbeem/extern/LBM_fluidsim.h
+++ b/intern/elbeem/extern/LBM_fluidsim.h
@@ -1,7 +1,4 @@
/*
- * BKE_fluidsim.h
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -44,5 +41,3 @@ int performElbeemSimulation(char *cfgfilename);
#endif
-
-
diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h
index 86e64b7eeb0..bc5c67f4bed 100644
--- a/intern/ghost/GHOST_C-api.h
+++ b/intern/ghost/GHOST_C-api.h
@@ -908,6 +908,11 @@ extern int GHOST_SupportsNativeDialogs(void);
extern int GHOST_UseNativePixels(void);
/**
+ * Focus window after opening, or put them in the background.
+ */
+extern void GHOST_UseWindowFocus(int use_focus);
+
+/**
* If window was opened using native pixel size, it returns scaling factor.
*/
extern float GHOST_GetNativePixelSize(GHOST_WindowHandle windowhandle);
diff --git a/intern/ghost/GHOST_ISystem.h b/intern/ghost/GHOST_ISystem.h
index be2a94bd508..9b017c2da38 100644
--- a/intern/ghost/GHOST_ISystem.h
+++ b/intern/ghost/GHOST_ISystem.h
@@ -306,6 +306,11 @@ public:
*/
virtual bool useNativePixel(void) = 0;
+ /**
+ * Focus window after opening, or put them in the background.
+ */
+ virtual void useWindowFocus(const bool use_focus) = 0;
+
/***************************************************************************************
* Event management functionality
***************************************************************************************/
diff --git a/intern/ghost/intern/GHOST_C-api.cpp b/intern/ghost/intern/GHOST_C-api.cpp
index 797fb16dd6f..e60a8a9d3f3 100644
--- a/intern/ghost/intern/GHOST_C-api.cpp
+++ b/intern/ghost/intern/GHOST_C-api.cpp
@@ -911,6 +911,12 @@ int GHOST_UseNativePixels(void)
return system->useNativePixel();
}
+void GHOST_UseWindowFocus(int use_focus)
+{
+ GHOST_ISystem *system = GHOST_ISystem::getSystem();
+ return system->useWindowFocus(use_focus);
+}
+
float GHOST_GetNativePixelSize(GHOST_WindowHandle windowhandle)
{
GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;
diff --git a/intern/ghost/intern/GHOST_DropTargetWin32.h b/intern/ghost/intern/GHOST_DropTargetWin32.h
index 3d7be45799f..5dcefcaf25e 100644
--- a/intern/ghost/intern/GHOST_DropTargetWin32.h
+++ b/intern/ghost/intern/GHOST_DropTargetWin32.h
@@ -60,7 +60,7 @@ public:
* - Determining the effect of the drop on the target application.
* - Incorporating any valid dropped data when the drop occurs.
* - Communicating target feedback to the source so the source application
- * can provide appropriate visual feedback such as setting the cursor.
+ * can provide appropriate visual feedback such as setting the cursor.
* - Implementing drag scrolling.
* - Registering and revoking its application windows as drop targets.
*
diff --git a/intern/ghost/intern/GHOST_EventTrackpad.h b/intern/ghost/intern/GHOST_EventTrackpad.h
index faf0f1697d0..25988090c01 100644
--- a/intern/ghost/intern/GHOST_EventTrackpad.h
+++ b/intern/ghost/intern/GHOST_EventTrackpad.h
@@ -20,8 +20,8 @@
*
* The Original Code is: all of this file.
*
- * Contributor(s): James Deery 11/2009
- * Damien Plisson 12/2009
+ * Contributor(s): James Deery 11/2009
+ * Damien Plisson 12/2009
*
* ***** END GPL LICENSE BLOCK *****
*/
diff --git a/intern/ghost/intern/GHOST_System.cpp b/intern/ghost/intern/GHOST_System.cpp
index 0629eacc3ff..39f915bb0c2 100644
--- a/intern/ghost/intern/GHOST_System.cpp
+++ b/intern/ghost/intern/GHOST_System.cpp
@@ -48,6 +48,7 @@
GHOST_System::GHOST_System()
: m_nativePixel(false),
+ m_windowFocus(true),
m_displayManager(NULL),
m_timerManager(NULL),
m_windowManager(NULL),
@@ -390,3 +391,8 @@ bool GHOST_System::useNativePixel(void)
m_nativePixel = true;
return 1;
}
+
+void GHOST_System::useWindowFocus(const bool use_focus)
+{
+ m_windowFocus = use_focus;
+}
diff --git a/intern/ghost/intern/GHOST_System.h b/intern/ghost/intern/GHOST_System.h
index 464d9269f28..ee3c30c35b4 100644
--- a/intern/ghost/intern/GHOST_System.h
+++ b/intern/ghost/intern/GHOST_System.h
@@ -177,6 +177,12 @@ public:
bool useNativePixel(void);
bool m_nativePixel;
+ /**
+ * Focus window after opening, or put them in the background.
+ */
+ void useWindowFocus(const bool use_focus);
+ bool m_windowFocus;
+
/***************************************************************************************
* Event management functionality
***************************************************************************************/
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.h b/intern/ghost/intern/GHOST_SystemCocoa.h
index d31df79bc2b..146fa841555 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.h
+++ b/intern/ghost/intern/GHOST_SystemCocoa.h
@@ -20,8 +20,8 @@
*
* The Original Code is: all of this file.
*
- * Contributor(s): Maarten Gribnau 05/2001
- * Damien Plisson 09/2009
+ * Contributor(s): Maarten Gribnau 05/2001
+ * Damien Plisson 09/2009
*
* ***** END GPL LICENSE BLOCK *****
*/
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
index 916da546669..697c0fae809 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -304,11 +304,13 @@ extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG])
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
- // raise application to front, convenient when starting from the terminal
- // and important for launching the animation player. we call this after the
- // application finishes launching, as doing it earlier can make us end up
- // with a frontmost window but an inactive application
- [NSApp activateIgnoringOtherApps:YES];
+ if (systemCocoa->m_windowFocus) {
+ // Raise application to front, convenient when starting from the terminal
+ // and important for launching the animation player. we call this after the
+ // application finishes launching, as doing it earlier can make us end up
+ // with a frontmost window but an inactive application.
+ [NSApp activateIgnoringOtherApps:YES];
+ }
}
- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
diff --git a/intern/ghost/intern/GHOST_SystemX11.h b/intern/ghost/intern/GHOST_SystemX11.h
index 3a65ff2a843..e9312ceb683 100644
--- a/intern/ghost/intern/GHOST_SystemX11.h
+++ b/intern/ghost/intern/GHOST_SystemX11.h
@@ -149,16 +149,16 @@ public:
* Create a new window.
* The new window is added to the list of windows managed.
* Never explicitly delete the window, use disposeWindow() instead.
- * \param title The name of the window (displayed in the title bar of the window if the OS supports it).
- * \param left The coordinate of the left edge of the window.
- * \param top The coordinate of the top edge of the window.
- * \param width The width the window.
- * \param height The height the window.
- * \param state The state of the window when opened.
- * \param type The type of drawing context installed in this window.
- * \param stereoVisual Create a stereo visual for quad buffered stereo.
- * \param exclusive Use to show the window ontop and ignore others
- * (used fullscreen).
+ * \param title The name of the window (displayed in the title bar of the window if the OS supports it).
+ * \param left The coordinate of the left edge of the window.
+ * \param top The coordinate of the top edge of the window.
+ * \param width The width the window.
+ * \param height The height the window.
+ * \param state The state of the window when opened.
+ * \param type The type of drawing context installed in this window.
+ * \param stereoVisual Create a stereo visual for quad buffered stereo.
+ * \param exclusive Use to show the window ontop and ignore others
+ * (used fullscreen).
* \param parentWindow Parent (embedder) window
* \return The new window (or 0 if creation failed).
*/
diff --git a/intern/ghost/intern/GHOST_Window.h b/intern/ghost/intern/GHOST_Window.h
index 59d3123b9de..2fa30049eca 100644
--- a/intern/ghost/intern/GHOST_Window.h
+++ b/intern/ghost/intern/GHOST_Window.h
@@ -55,14 +55,14 @@ public:
* Constructor.
* Creates a new window and opens it.
* To check if the window was created properly, use the getValid() method.
- * \param width The width the window.
- * \param heigh The height the window.
- * \param state The state the window is initially opened with.
- * \param type The type of drawing context installed in this window.
- * \param stereoVisual Stereo visual for quad buffered stereo.
- * \param exclusive Use to show the window ontop and ignore others
- * (used fullscreen).
- * \param numOfAASamples Number of samples used for AA (zero if no AA)
+ * \param width The width the window.
+ * \param heigh The height the window.
+ * \param state The state the window is initially opened with.
+ * \param type The type of drawing context installed in this window.
+ * \param stereoVisual Stereo visual for quad buffered stereo.
+ * \param exclusive Use to show the window ontop and ignore others
+ * (used fullscreen).
+ * \param numOfAASamples Number of samples used for AA (zero if no AA)
*/
GHOST_Window(
GHOST_TUns32 width,
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm
index 20060ac1267..79d2f304e60 100644
--- a/intern/ghost/intern/GHOST_WindowCocoa.mm
+++ b/intern/ghost/intern/GHOST_WindowCocoa.mm
@@ -551,7 +551,15 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(
//Creates the OpenGL View inside the window
m_openGLView = [[CocoaOpenGLView alloc] initWithFrame:rect];
-
+
+ if (m_systemCocoa->m_nativePixel) {
+ // Needs to happen early when building with the 10.14 SDK, otherwise
+ // has no effect until resizeing the window.
+ if ([m_openGLView respondsToSelector:@selector(setWantsBestResolutionOpenGLSurface:)]) {
+ [m_openGLView setWantsBestResolutionOpenGLSurface:YES];
+ }
+ }
+
[m_openGLView setSystemAndWindowCocoa:systemCocoa windowCocoa:this];
[m_window setContentView:m_openGLView];
@@ -563,14 +571,9 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(
updateDrawingContext();
activateDrawingContext();
- // XXX jwilkins: This seems like it belongs in GHOST_ContextCGL, but probably not GHOST_ContextEGL
if (m_systemCocoa->m_nativePixel) {
- if ([m_openGLView respondsToSelector:@selector(setWantsBestResolutionOpenGLSurface:)]) {
- [m_openGLView setWantsBestResolutionOpenGLSurface:YES];
-
- NSRect backingBounds = [m_openGLView convertRectToBacking:[m_openGLView bounds]];
- m_nativePixelSize = (float)backingBounds.size.width / (float)rect.size.width;
- }
+ NSRect backingBounds = [m_openGLView convertRectToBacking:[m_openGLView bounds]];
+ m_nativePixelSize = (float)backingBounds.size.width / (float)rect.size.width;
}
setTitle(title);
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index 92de41a859b..983fffc10e6 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -201,6 +201,11 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system,
// Store a pointer to this class in the window structure
::SetWindowLongPtr(m_hWnd, GWLP_USERDATA, (LONG_PTR) this);
+ if (!m_system->m_windowFocus) {
+ // Lower to bottom and don't activate if we don't want focus
+ ::SetWindowPos(m_hWnd, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
+ }
+
// Store the device context
m_hDC = ::GetDC(m_hWnd);
@@ -214,11 +219,11 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system,
nCmdShow = SW_SHOWMAXIMIZED;
break;
case GHOST_kWindowStateMinimized:
- nCmdShow = SW_SHOWMINIMIZED;
+ nCmdShow = (m_system->m_windowFocus) ? SW_SHOWMINIMIZED : SW_SHOWMINNOACTIVE;
break;
case GHOST_kWindowStateNormal:
default:
- nCmdShow = SW_SHOWNORMAL;
+ nCmdShow = (m_system->m_windowFocus) ? SW_SHOWNORMAL : SW_SHOWNOACTIVATE;
break;
}
@@ -1105,12 +1110,12 @@ GHOST_TSuccess GHOST_WindowWin32::endProgressBar()
#ifdef WITH_INPUT_IME
void GHOST_WindowWin32::beginIME(GHOST_TInt32 x, GHOST_TInt32 y, GHOST_TInt32 w, GHOST_TInt32 h, int completed)
{
- m_imeImput.BeginIME(m_hWnd, GHOST_Rect(x, y - h, x, y), (bool)completed);
+ m_imeInput.BeginIME(m_hWnd, GHOST_Rect(x, y - h, x, y), (bool)completed);
}
void GHOST_WindowWin32::endIME()
{
- m_imeImput.EndIME(m_hWnd);
+ m_imeInput.EndIME(m_hWnd);
}
#endif /* WITH_INPUT_IME */
diff --git a/intern/ghost/intern/GHOST_WindowWin32.h b/intern/ghost/intern/GHOST_WindowWin32.h
index c72669ed898..8b0ba2f1934 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.h
+++ b/intern/ghost/intern/GHOST_WindowWin32.h
@@ -225,10 +225,10 @@ public:
* capturing).
*
* \param press
- * 0 - mouse pressed
- * 1 - mouse released
- * 2 - operator grab
- * 3 - operator ungrab
+ * 0 - mouse pressed
+ * 1 - mouse released
+ * 2 - operator grab
+ * 3 - operator ungrab
*/
void registerMouseClickEvent(int press);
@@ -265,7 +265,7 @@ public:
bool m_inLiveResize;
#ifdef WITH_INPUT_IME
- GHOST_ImeWin32 *getImeInput() {return &m_imeImput;}
+ GHOST_ImeWin32 *getImeInput() {return &m_imeInput;}
void beginIME(
GHOST_TInt32 x, GHOST_TInt32 y,
@@ -369,7 +369,7 @@ private:
#ifdef WITH_INPUT_IME
/** Handle input method editors event */
- GHOST_ImeWin32 m_imeImput;
+ GHOST_ImeWin32 m_imeInput;
#endif
bool m_debug_context;
};
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index 623d57705b2..a4ccdef3788 100644
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -517,7 +517,7 @@ GHOST_WindowX11(GHOST_SystemX11 *system,
natom++;
}
- if (m_system->m_atom.WM_TAKE_FOCUS) {
+ if (m_system->m_atom.WM_TAKE_FOCUS && m_system->m_windowFocus) {
atoms[natom] = m_system->m_atom.WM_TAKE_FOCUS;
natom++;
}
@@ -532,7 +532,7 @@ GHOST_WindowX11(GHOST_SystemX11 *system,
{
XWMHints *xwmhints = XAllocWMHints();
xwmhints->initial_state = NormalState;
- xwmhints->input = True;
+ xwmhints->input = (m_system->m_windowFocus) ? True : False;
xwmhints->flags = InputHint | StateHint;
XSetWMHints(display, m_window, xwmhints);
XFree(xwmhints);
@@ -586,11 +586,15 @@ GHOST_WindowX11(GHOST_SystemX11 *system,
setTitle(title);
- if (exclusive) {
+ if (exclusive && system->m_windowFocus) {
XMapRaised(m_display, m_window);
}
else {
XMapWindow(m_display, m_window);
+
+ if (!system->m_windowFocus) {
+ XLowerWindow(m_display, m_window);
+ }
}
GHOST_PRINT("Mapped window\n");
diff --git a/intern/guardedalloc/CMakeLists.txt b/intern/guardedalloc/CMakeLists.txt
index 10ed4287185..3cec2fd1016 100644
--- a/intern/guardedalloc/CMakeLists.txt
+++ b/intern/guardedalloc/CMakeLists.txt
@@ -53,6 +53,11 @@ if(WIN32 AND NOT UNIX)
)
endif()
+# Jemalloc 5.0.0+ needs extra configuration.
+if(WITH_MEM_JEMALLOC AND NOT ("${JEMALLOC_VERSION}" VERSION_LESS "5.0.0"))
+ add_definitions(-DWITH_JEMALLOC_CONF)
+endif()
+
blender_add_lib(bf_intern_guardedalloc "${SRC}" "${INC}" "${INC_SYS}")
# Override C++ alloc, optional.
diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c
index a95cc9163c4..8c17da853e5 100644
--- a/intern/guardedalloc/intern/mallocn.c
+++ b/intern/guardedalloc/intern/mallocn.c
@@ -37,6 +37,13 @@
#include "mallocn_intern.h"
+#ifdef WITH_JEMALLOC_CONF
+/* If jemalloc is used, it reads this global variable and enables background
+ * threads to purge dirty pages. Otherwise we release memory too slowly or not
+ * at all if the thread that did the allocation stays inactive. */
+const char *malloc_conf = "background_thread:true,dirty_decay_ms:4000";
+#endif
+
size_t (*MEM_allocN_len)(const void *vmemh) = MEM_lockfree_allocN_len;
void (*MEM_freeN)(void *vmemh) = MEM_lockfree_freeN;
void *(*MEM_dupallocN)(const void *vmemh) = MEM_lockfree_dupallocN;
diff --git a/intern/locale/boost_locale_wrapper.cpp b/intern/locale/boost_locale_wrapper.cpp
index 0707c0dd3e3..3fd8f146aa3 100644
--- a/intern/locale/boost_locale_wrapper.cpp
+++ b/intern/locale/boost_locale_wrapper.cpp
@@ -112,13 +112,17 @@ const char *bl_locale_pgettext(const char *msgctxt, const char *msgid)
return r;
return msgid;
}
- catch(std::bad_cast const &e) { /* if std::has_facet<char_message_facet>(l) == false, LC_ALL = "C" case */
-// std::cout << "bl_locale_pgettext(" << msgid << "): " << e.what() << " \n";
+ catch(const std::bad_cast &e) { /* if std::has_facet<char_message_facet>(l) == false, LC_ALL = "C" case */
+#ifndef NDEBUG
+ std::cout << "bl_locale_pgettext(" << msgid << "): " << e.what() << " \n";
+#endif
(void)e;
return msgid;
}
- catch(std::exception const &e) {
-// std::cout << "bl_locale_pgettext(" << msgctxt << ", " << msgid << "): " << e.what() << " \n";
+ catch(const std::exception &e) {
+#ifndef NDEBUG
+ std::cout << "bl_locale_pgettext(" << msgctxt << ", " << msgid << "): " << e.what() << " \n";
+#endif
(void)e;
return msgid;
}
diff --git a/intern/smoke/intern/FLUID_3D.cpp b/intern/smoke/intern/FLUID_3D.cpp
index 8a27818ff36..fd0a7e2005f 100644
--- a/intern/smoke/intern/FLUID_3D.cpp
+++ b/intern/smoke/intern/FLUID_3D.cpp
@@ -38,7 +38,7 @@
#if PARALLEL==1
#include <omp.h>
-#endif // PARALLEL
+#endif // PARALLEL
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
@@ -51,13 +51,13 @@ FLUID_3D::FLUID_3D(int *res, float dx, float dtdef, int init_heat, int init_fire
_dt = dtdef; // just in case. set in step from a RNA factor
_iterations = 100;
- _tempAmb = 0;
+ _tempAmb = 0;
_heatDiffusion = 1e-3;
_totalTime = 0.0f;
_totalSteps = 0;
_res = Vec3Int(_xRes,_yRes,_zRes);
_maxRes = MAX3(_xRes, _yRes, _zRes);
-
+
// initialize wavelet turbulence
/*
if(amplify)
@@ -65,7 +65,7 @@ FLUID_3D::FLUID_3D(int *res, float dx, float dtdef, int init_heat, int init_fire
else
_wTurbulence = NULL;
*/
-
+
// scale the constants according to the refinement of the grid
if (!dx)
_dx = 1.0f / (float)_maxRes;
@@ -218,7 +218,7 @@ void FLUID_3D::initColors(float init_r, float init_g, float init_b)
void FLUID_3D::setBorderObstacles()
{
-
+
// set side obstacles
unsigned int index;
for (int y = 0; y < _yRes; y++)
@@ -331,7 +331,7 @@ void FLUID_3D::step(float dt, float gravity[3])
// If border rules have been changed
if (_colloPrev != *_borderColli) {
printf("Border collisions changed\n");
-
+
// DG TODO: Need to check that no animated obstacle flags are overwritten
setBorderCollisions();
}
@@ -490,7 +490,7 @@ void FLUID_3D::step(float dt, float gravity[3])
for (int i=1; i<stepParts; i++)
{
int zPos=(int)((float)i*partSize + 0.5f);
-
+
artificialDampingExactSL(zPos);
}
@@ -620,7 +620,7 @@ void FLUID_3D::artificialDampingSL(int zBegin, int zEnd) {
void FLUID_3D::artificialDampingExactSL(int pos) {
const float w = 0.9;
int index, x,y,z;
-
+
size_t posslab;
@@ -650,7 +650,7 @@ void FLUID_3D::artificialDampingExactSL(int pos) {
_zVelocityTemp[index+1] + _zVelocityTemp[index-1] +
_zVelocityTemp[index+_res[0]] + _zVelocityTemp[index-_res[0]] +
_zVelocityTemp[index+_slabSize] + _zVelocityTemp[index-_slabSize] );
-
+
}
}
@@ -677,7 +677,7 @@ void FLUID_3D::artificialDampingExactSL(int pos) {
_zVelocityTemp[index+1] + _zVelocityTemp[index-1] +
_zVelocityTemp[index+_res[0]] + _zVelocityTemp[index-_res[0]] +
_zVelocityTemp[index+_slabSize] + _zVelocityTemp[index-_slabSize] );
-
+
}
}
@@ -759,7 +759,7 @@ void FLUID_3D::wipeBoundaries(int zBegin, int zEnd)
void FLUID_3D::wipeBoundariesSL(int zBegin, int zEnd)
{
-
+
/////////////////////////////////////
// setZeroBorder to all:
/////////////////////////////////////
@@ -933,16 +933,16 @@ void FLUID_3D::project()
memset(_pressure, 0, sizeof(float)*_totalCells);
memset(_divergence, 0, sizeof(float)*_totalCells);
-
+
// set velocity and pressure inside of obstacles to zero
setObstacleBoundaries(_pressure, 0, _zRes);
-
+
// copy out the boundaries
if(!_domainBcLeft) setNeumannX(_xVelocity, _res, 0, _zRes);
- else setZeroX(_xVelocity, _res, 0, _zRes);
+ else setZeroX(_xVelocity, _res, 0, _zRes);
if(!_domainBcFront) setNeumannY(_yVelocity, _res, 0, _zRes);
- else setZeroY(_yVelocity, _res, 0, _zRes);
+ else setZeroY(_yVelocity, _res, 0, _zRes);
if(!_domainBcTop) setNeumannZ(_zVelocity, _res, 0, _zRes);
else setZeroZ(_zVelocity, _res, 0, _zRes);
@@ -953,13 +953,13 @@ void FLUID_3D::project()
for (y = 1; y < _yRes - 1; y++, index += 2)
for (x = 1; x < _xRes - 1; x++, index++)
{
-
+
if(_obstacles[index])
{
_divergence[index] = 0.0f;
continue;
}
-
+
float xright = _xVelocity[index + 1];
float xleft = _xVelocity[index - 1];
@@ -1058,7 +1058,7 @@ void FLUID_3D::project()
//////////////////////////////////////////////////////////////////////
void FLUID_3D::setObstacleVelocity(int zBegin, int zEnd)
{
-
+
// completely TODO <-- who wrote this and what is here TODO? DG
const size_t index_ = _slabSize + _xRes + 1;
@@ -1082,7 +1082,7 @@ void FLUID_3D::setObstacleVelocity(int zBegin, int zEnd)
{
if (!_obstacles[index])
{
- // if(_obstacles[index+1]) xright = - _xVelocityOb[index];
+ // if(_obstacles[index+1]) xright = - _xVelocityOb[index];
if((_obstacles[index - 1] & 8) && abs(_xVelocityOb[index - 1]) > FLT_EPSILON )
{
// printf("velocity x!\n");
@@ -1221,7 +1221,7 @@ void FLUID_3D::setObstaclePressure(float *_pressure, int zBegin, int zEnd)
_pressure[index] += _pressure[index + _slabSize];
pcnt += 1.0f;
}
-
+
if(pcnt > 0.000001f)
_pressure[index] /= pcnt;
@@ -1254,7 +1254,7 @@ void FLUID_3D::setObstacleBoundaries(float *_pressure, int zBegin, int zEnd)
for (int z = zBegin + bb; z < zEnd - bt; z++)
{
size_t index = index_ +(z-1)*_slabSize;
-
+
for (int y = 1; y < _yRes - 1; y++, index += 2)
{
for (int x = 1; x < _xRes - 1; x++, index++)
@@ -1563,7 +1563,7 @@ void FLUID_3D::addVorticity(int zBegin, int zEnd)
// calculate normalized vorticity vectors
float eps = _vorticityEps;
-
+
//index = _slabSize + _xRes + 1;
vIndex=_slabSize + _xRes + 1;
@@ -1618,7 +1618,7 @@ void FLUID_3D::addVorticity(int zBegin, int zEnd)
} // y loop
//vIndex+=2*_xRes;
} // z loop
-
+
if (_xVorticity) delete[] _xVorticity;
if (_yVorticity) delete[] _yVorticity;
if (_zVorticity) delete[] _zVorticity;
@@ -1704,10 +1704,10 @@ void FLUID_3D::advectMacCormackEnd2(int zBegin, int zEnd)
/* set boundary conditions for velocity */
if(!_domainBcLeft) copyBorderX(_xVelocityTemp, res, zBegin, zEnd);
- else setZeroX(_xVelocityTemp, res, zBegin, zEnd);
+ else setZeroX(_xVelocityTemp, res, zBegin, zEnd);
if(!_domainBcFront) copyBorderY(_yVelocityTemp, res, zBegin, zEnd);
- else setZeroY(_yVelocityTemp, res, zBegin, zEnd);
+ else setZeroY(_yVelocityTemp, res, zBegin, zEnd);
if(!_domainBcTop) copyBorderZ(_zVelocityTemp, res, zBegin, zEnd);
else setZeroZ(_zVelocityTemp, res, zBegin, zEnd);
@@ -1778,9 +1778,9 @@ void FLUID_3D::updateFlame(float *react, float *flame, int total_cells)
for (int index = 0; index < total_cells; index++)
{
/* model flame temperature curve from the reaction coordinate (fuel)
- * TODO: Would probably be best to get rid of whole "flame" data field.
- * Currently it's just sqrt mirror of reaction coordinate, and therefore
- * basically just waste of memory and disk space...
+ * TODO: Would probably be best to get rid of whole "flame" data field.
+ * Currently it's just sqrt mirror of reaction coordinate, and therefore
+ * basically just waste of memory and disk space...
*/
if (react[index]>0.0f) {
/* do a smooth falloff for rest of the values */
diff --git a/release/datafiles/colormanagement/config.ocio b/release/datafiles/colormanagement/config.ocio
index ce79dfeb540..6c934cfbe44 100644
--- a/release/datafiles/colormanagement/config.ocio
+++ b/release/datafiles/colormanagement/config.ocio
@@ -82,7 +82,7 @@ colorspaces:
Rec. 709 (Full Range), Blender native linear space
isdata: false
allocation: lg2
- allocationvars: [-15, 6]
+ allocationvars: [-12.473931188, 12.526068812]
- !<ColorSpace>
name: Raw
diff --git a/release/scripts/modules/addon_utils.py b/release/scripts/modules/addon_utils.py
index dc7f4053a01..713a11362c6 100644
--- a/release/scripts/modules/addon_utils.py
+++ b/release/scripts/modules/addon_utils.py
@@ -472,7 +472,12 @@ def reset_all(*, reload_scripts=False):
def disable_all():
import sys
- for mod_name, mod in sys.modules.items():
+ # Collect modules to disable first because dict can be modified as we disable.
+ addon_modules = [
+ item for item in sys.modules.items()
+ if getattr(item[1], "__addon_enabled__", False)
+ ]
+ for mod_name, mod in addon_modules:
if getattr(mod, "__addon_enabled__", False):
disable(mod_name)
diff --git a/release/scripts/modules/bl_i18n_utils/settings.py b/release/scripts/modules/bl_i18n_utils/settings.py
index 7d5b33c50ac..150c2c36623 100644
--- a/release/scripts/modules/bl_i18n_utils/settings.py
+++ b/release/scripts/modules/bl_i18n_utils/settings.py
@@ -38,22 +38,22 @@ import bpy
# The languages defined in Blender.
LANGUAGES_CATEGORIES = (
# Min completeness level, UI english label.
- ( 0.95, "Complete"),
- ( 0.33, "In Progress"),
- ( -1.0, "Starting"),
+ (0.95, "Complete"),
+ (0.33, "In Progress"),
+ (-1.0, "Starting"),
)
LANGUAGES = (
# ID, UI english label, ISO code.
- ( 0, "Default (Default)", "DEFAULT"),
- ( 1, "English (English)", "en_US"),
- ( 2, "Japanese (日本語)", "ja_JP"),
- ( 3, "Dutch (Nederlandse taal)", "nl_NL"),
- ( 4, "Italian (Italiano)", "it_IT"),
- ( 5, "German (Deutsch)", "de_DE"),
- ( 6, "Finnish (Suomi)", "fi_FI"),
- ( 7, "Swedish (Svenska)", "sv_SE"),
- ( 8, "French (Français)", "fr_FR"),
- ( 9, "Spanish (Español)", "es"),
+ (0, "Default (Default)", "DEFAULT"),
+ (1, "English (English)", "en_US"),
+ (2, "Japanese (日本語)", "ja_JP"),
+ (3, "Dutch (Nederlandse taal)", "nl_NL"),
+ (4, "Italian (Italiano)", "it_IT"),
+ (5, "German (Deutsch)", "de_DE"),
+ (6, "Finnish (Suomi)", "fi_FI"),
+ (7, "Swedish (Svenska)", "sv_SE"),
+ (8, "French (Français)", "fr_FR"),
+ (9, "Spanish (Español)", "es"),
(10, "Catalan (Català)", "ca_AD"),
(11, "Czech (Český)", "cs_CZ"),
(12, "Portuguese (Português)", "pt_PT"),
@@ -514,6 +514,7 @@ def _do_set(ref, path):
def _gen_get_set_path(ref, name):
def _get(self):
return _do_get(getattr(self, ref), getattr(self, name))
+
def _set(self, value):
setattr(self, name, _do_set(getattr(self, ref), value))
return _get, _set
@@ -579,6 +580,7 @@ class I18nSettings:
def _get_py_sys_paths(self):
return self.INTERN_PY_SYS_PATHS
+
def _set_py_sys_paths(self, val):
old_paths = set(self.INTERN_PY_SYS_PATHS.split(";")) - {""}
new_paths = set(val.split(";")) - {""}
diff --git a/release/scripts/modules/progress_report.py b/release/scripts/modules/bpy_extras/wm_utils/progress_report.py
index bcce44aab9f..bcce44aab9f 100644
--- a/release/scripts/modules/progress_report.py
+++ b/release/scripts/modules/bpy_extras/wm_utils/progress_report.py
diff --git a/release/scripts/modules/console/complete_namespace.py b/release/scripts/modules/console/complete_namespace.py
index 3f223ba93dc..862f1a21260 100644
--- a/release/scripts/modules/console/complete_namespace.py
+++ b/release/scripts/modules/console/complete_namespace.py
@@ -26,7 +26,7 @@ import re
import rlcompleter
-RE_INCOMPLETE_INDEX = re.compile('(.*?)\[[^\]]+$')
+RE_INCOMPLETE_INDEX = re.compile(r'(.*?)\[[^\]]+$')
TEMP = '__tEmP__' # only \w characters are allowed!
TEMP_N = len(TEMP)
diff --git a/release/scripts/startup/bl_operators/object_randomize_transform.py b/release/scripts/startup/bl_operators/object_randomize_transform.py
index dbc9461ad5a..1aa1f2e1d0e 100644
--- a/release/scripts/startup/bl_operators/object_randomize_transform.py
+++ b/release/scripts/startup/bl_operators/object_randomize_transform.py
@@ -155,7 +155,7 @@ class RandomizeLocRotSize(Operator):
)
'''scale_min = FloatProperty(
- name="Minimun Scale Factor",
+ name="Minimum Scale Factor",
description="Lowest scale percentage possible",
min=-1.0, max=1.0, precision=3,
default=0.15,
diff --git a/release/scripts/startup/bl_operators/uvcalc_lightmap.py b/release/scripts/startup/bl_operators/uvcalc_lightmap.py
index d1774205aee..11eb7e1eb88 100644
--- a/release/scripts/startup/bl_operators/uvcalc_lightmap.py
+++ b/release/scripts/startup/bl_operators/uvcalc_lightmap.py
@@ -77,9 +77,9 @@ class prettyface:
# f, (len_min, len_mid, len_max)
self.uv = data
- f1, lens1, lens1ord = data[0]
+ _f1, lens1, lens1ord = data[0]
if data[1]:
- f2, lens2, lens2ord = data[1]
+ _f2, lens2, lens2ord = data[1]
self.width = (lens1[lens1ord[0]] + lens2[lens2ord[0]]) / 2.0
self.height = (lens1[lens1ord[1]] + lens2[lens2ord[1]]) / 2.0
else: # 1 tri :/
@@ -205,12 +205,12 @@ class prettyface:
fuv[I[0]][:] = p2
fuv[I[1]][:] = p3
- f, lens, lensord = uv[0]
+ f = uv[0][0]
set_uv(f, (x1, y1), (x1, y2 - margin_h), (x2 - margin_w, y1))
if uv[1]:
- f, lens, lensord = uv[1]
+ f = uv[1][0]
set_uv(f, (x2, y2), (x2, y1 + margin_h), (x1 + margin_w, y2))
else: # 1 QUAD
diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
index 318012d57ab..ec6a9fc92e3 100644
--- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py
+++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
@@ -143,9 +143,9 @@ def island2Edge(island):
unique_points = {}
for f in island:
- f_uvkey = map(tuple, f.uv)
+ f_uvkey = list(map(tuple, f.uv))
- for vIdx, edkey in enumerate(f.edge_keys):
+ for vIdx in range(len(f_uvkey)):
unique_points[f_uvkey[vIdx]] = f.uv[vIdx]
if f.v[vIdx].index > f.v[vIdx - 1].index:
@@ -158,18 +158,14 @@ def island2Edge(island):
try:
edges[f_uvkey[i1], f_uvkey[i2]] *= 0 # sets any edge with more than 1 user to 0 are not returned.
except:
- edges[f_uvkey[i1], f_uvkey[i2]] = (f.uv[i1] - f.uv[i2]).length,
+ edges[f_uvkey[i1], f_uvkey[i2]] = (f.uv[i1] - f.uv[i2]).length
# If 2 are the same then they will be together, but full [a,b] order is not correct.
# Sort by length
-
length_sorted_edges = [(Vector(key[0]), Vector(key[1]), value) for key, value in edges.items() if value != 0]
- try:
- length_sorted_edges.sort(key=lambda A: -A[2]) # largest first
- except:
- length_sorted_edges.sort(lambda A, B: cmp(B[2], A[2]))
+ length_sorted_edges.sort(key=lambda a: -a[2]) # largest first
# Its okay to leave the length in there.
# for e in length_sorted_edges:
@@ -898,7 +894,7 @@ def main(context,
projectVecs.append(averageVec.normalized())
# Get the next vec!
- # Pick the face thats most different to all existing angles :)
+ # Pick the face that's most different to all existing angles :)
mostUniqueAngle = 1.0 # 1.0 is 0d. no difference.
mostUniqueIndex = 0 # dummy
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 381e98c2940..53735ed3ece 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -1417,10 +1417,10 @@ class WM_OT_appconfig_activate(Operator):
def execute(self, context):
import os
- bpy.utils.keyconfig_set(self.filepath)
-
- filepath = self.filepath.replace("keyconfig", "interaction")
-
+ filepath = self.filepath
+ bpy.utils.keyconfig_set(filepath)
+ dirname, filename = os.path.split(filepath)
+ filepath = os.path.normpath(os.path.join(dirname, os.pardir, "interaction", filename))
if os.path.exists(filepath):
bpy.ops.script.execute_preset(
filepath=filepath,
diff --git a/release/scripts/startup/bl_ui/properties_data_metaball.py b/release/scripts/startup/bl_ui/properties_data_metaball.py
index dd62c4523b1..6ed5bb3c763 100644
--- a/release/scripts/startup/bl_ui/properties_data_metaball.py
+++ b/release/scripts/startup/bl_ui/properties_data_metaball.py
@@ -109,6 +109,7 @@ class DATA_PT_metaball_element(DataButtonsPanel, Panel):
col = split.column(align=True)
col.label(text="Settings:")
col.prop(metaelem, "stiffness", text="Stiffness")
+ col.prop(metaelem, "radius", text="Radius")
col.prop(metaelem, "use_negative", text="Negative")
col.prop(metaelem, "hide", text="Hide")
@@ -120,7 +121,7 @@ class DATA_PT_metaball_element(DataButtonsPanel, Panel):
col.prop(metaelem, "size_y", text="Y")
col.prop(metaelem, "size_z", text="Z")
- elif metaelem.type == 'TUBE':
+ elif metaelem.type == 'CAPSULE':
col.label(text="Size:")
col.prop(metaelem, "size_x", text="X")
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 1a80a160ea5..23ab644cba1 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -523,6 +523,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
sub.active = bool(md.vertex_group)
sub.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
+ col = layout.column()
+ col.prop(md, "threshold")
+
def MESH_DEFORM(self, layout, ob, md):
split = layout.split()
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index 50cef9124ab..f7688aa3aa2 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -207,7 +207,7 @@ class OBJECT_PT_groups(ObjectButtonsPanel, Panel):
obj_name = obj.name
for group in bpy.data.groups:
- # XXX this is slow and stupid!, we need 2 checks, one thats fast
+ # XXX this is slow and stupid!, we need 2 checks, one that's fast
# and another that we can be sure its not a name collision
# from linked library data
group_objects = group.objects
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 26facd25174..56bcd2870c2 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -1371,8 +1371,13 @@ class USERPREF_PT_addons(Panel):
userpref = context.user_preferences
used_ext = {ext.module for ext in userpref.addons}
- userpref_addons_folder = os.path.join(userpref.filepaths.script_directory, "addons")
- scripts_addons_folder = bpy.utils.user_resource('SCRIPTS', "addons")
+ addon_user_dirs = tuple(
+ p for p in (
+ os.path.join(userpref.filepaths.script_directory, "addons"),
+ bpy.utils.user_resource('SCRIPTS', "addons"),
+ )
+ if p
+ )
# collect the categories that can be filtered on
addons = [
@@ -1429,12 +1434,13 @@ class USERPREF_PT_addons(Panel):
continue
# check if addon should be visible with current filters
- if ((filter == "All") or
- (filter == info["category"]) or
- (filter == "Enabled" and is_enabled) or
+ if (
+ (filter == "All") or
+ (filter == info["category"]) or
+ (filter == "Enabled" and is_enabled) or
(filter == "Disabled" and not is_enabled) or
- (filter == "User" and (mod.__file__.startswith((scripts_addons_folder, userpref_addons_folder))))
- ):
+ (filter == "User" and (mod.__file__.startswith(addon_user_dirs)))
+ ):
if search and search not in info["name"].lower():
if info["author"]:
if search not in info["author"].lower():
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 818c218a362..2381309bc3d 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -960,7 +960,7 @@ class VIEW3D_MT_select_edit_surface(Menu):
class VIEW3D_MT_select_edit_text(Menu):
- # intentional name mis-match
+ # intentional name mismatch
# select menu for 3d-text doesn't make sense
bl_label = "Edit"
diff --git a/release/text/readme.html b/release/text/readme.html
index 45bff37b025..43807ff2836 100644
--- a/release/text/readme.html
+++ b/release/text/readme.html
@@ -24,7 +24,7 @@
<p class="p4">
Welcome to Blender, the free, open source 3D application for modeling, animation, rendering,
compositing, video editing and game creation.
-Blender is available for Linux, Mac OS X and Windows and has a large world-wide community.
+Blender is available for Linux, macOS and Windows and has a large world-wide community.
</p>
<p class="p4">
Blender can be used freely for any purpose, including commercial use and distribution.
@@ -66,7 +66,7 @@ To launch Blender, double-click on Blender.exe.
<b>Linux: </b>Unpack the archive, then run the Blender executable.
</p>
<p class="p4">
-<b>Mac OS X: </b>The downloaded package includes blender.app.
+<b>macOS: </b>The downloaded package includes blender.app.
Optionally copy this to your Applications folder, and add it to the dock by dragging it from there to the dock.
</p>
<p class="p2"><br></p>
diff --git a/source/blender/alembic/intern/abc_customdata.cc b/source/blender/alembic/intern/abc_customdata.cc
index f2ae1c831d1..424475dc61b 100644
--- a/source/blender/alembic/intern/abc_customdata.cc
+++ b/source/blender/alembic/intern/abc_customdata.cc
@@ -185,7 +185,11 @@ static void write_mcol(const OCompoundProperty &prop, const CDStreamConfig &conf
MLoop *mloops = config.mloop;
MCol *cfaces = static_cast<MCol *>(data);
- std::vector<Imath::C4f> buffer(config.totvert);
+ std::vector<Imath::C4f> buffer;
+ std::vector<uint32_t> indices;
+
+ buffer.reserve(config.totvert);
+ indices.reserve(config.totvert);
Imath::C4f col;
@@ -203,7 +207,8 @@ static void write_mcol(const OCompoundProperty &prop, const CDStreamConfig &conf
col[2] = cface->g * cscale;
col[3] = cface->b * cscale;
- buffer[mloop->v] = col;
+ buffer.push_back(col);
+ indices.push_back(buffer.size() - 1);
}
}
@@ -211,6 +216,7 @@ static void write_mcol(const OCompoundProperty &prop, const CDStreamConfig &conf
OC4fGeomParam::Sample sample(
C4fArraySample(&buffer.front(), buffer.size()),
+ UInt32ArraySample(&indices.front(), indices.size()),
kVertexScope);
param.set(sample);
diff --git a/source/blender/alembic/intern/abc_exporter.cc b/source/blender/alembic/intern/abc_exporter.cc
index 6c1eeb9854f..9ffed421302 100644
--- a/source/blender/alembic/intern/abc_exporter.cc
+++ b/source/blender/alembic/intern/abc_exporter.cc
@@ -415,7 +415,7 @@ void AbcExporter::exploreTransform(EvaluationContext *eval_ctx, Object *ob, Obje
}
}
-AbcTransformWriter * AbcExporter::createTransformWriter(Object *ob, Object *parent, Object *dupliObParent)
+AbcTransformWriter *AbcExporter::createTransformWriter(Object *ob, Object *parent, Object *dupliObParent)
{
/* An object should not be its own parent, or we'll get infinite loops. */
BLI_assert(ob != parent);
diff --git a/source/blender/alembic/intern/abc_exporter.h b/source/blender/alembic/intern/abc_exporter.h
index 280682b2896..ae30b4589ee 100644
--- a/source/blender/alembic/intern/abc_exporter.h
+++ b/source/blender/alembic/intern/abc_exporter.h
@@ -114,7 +114,7 @@ private:
Alembic::Abc::TimeSamplingPtr createTimeSampling(double step);
void createTransformWritersHierarchy(EvaluationContext *eval_ctx);
- AbcTransformWriter * createTransformWriter(Object *ob, Object *parent, Object *dupliObParent);
+ AbcTransformWriter *createTransformWriter(Object *ob, Object *parent, Object *dupliObParent);
void exploreTransform(EvaluationContext *eval_ctx, Object *ob, Object *parent, Object *dupliObParent = NULL);
void exploreObject(EvaluationContext *eval_ctx, Object *ob, Object *dupliObParent);
void createShapeWriters(EvaluationContext *eval_ctx);
diff --git a/source/blender/alembic/intern/abc_hair.cc b/source/blender/alembic/intern/abc_hair.cc
index 0208da8a6d7..ed70d36dbee 100644
--- a/source/blender/alembic/intern/abc_hair.cc
+++ b/source/blender/alembic/intern/abc_hair.cc
@@ -139,7 +139,7 @@ void AbcHairWriter::write_hair_sample(DerivedMesh *dm,
m_uv_warning_shown = true;
}
- ParticleData * pa = m_psys->particles;
+ ParticleData *pa = m_psys->particles;
int k;
ParticleCacheKey **cache = m_psys->pathcache;
diff --git a/source/blender/alembic/intern/abc_points.cc b/source/blender/alembic/intern/abc_points.cc
index 80567cd6bf0..738adb4cd3a 100644
--- a/source/blender/alembic/intern/abc_points.cc
+++ b/source/blender/alembic/intern/abc_points.cc
@@ -60,10 +60,10 @@ using Alembic::AbcGeom::OPointsSchema;
AbcPointsWriter::AbcPointsWriter(Scene *scene,
Object *ob,
- AbcTransformWriter *parent,
- uint32_t time_sampling,
- ExportSettings &settings,
- ParticleSystem *psys)
+ AbcTransformWriter *parent,
+ uint32_t time_sampling,
+ ExportSettings &settings,
+ ParticleSystem *psys)
: AbcObjectWriter(scene, ob, time_sampling, settings, parent)
{
m_psys = psys;
diff --git a/source/blender/avi/intern/avi.c b/source/blender/avi/intern/avi.c
index 2d8a0b0038f..6e798a6244e 100644
--- a/source/blender/avi/intern/avi.c
+++ b/source/blender/avi/intern/avi.c
@@ -64,7 +64,7 @@ char *tcc_to_char(unsigned int tcc);
-/* implemetation */
+/* implementation */
unsigned int GET_FCC(FILE *fp)
{
@@ -286,7 +286,7 @@ bool AVI_is_avi(const char *name)
fseek(movie.fp, movie.header->size - 14 * 4, SEEK_CUR);
/* Limit number of streams to some reasonable amount to prevent
- * buffer oveflow vulnerabilities. */
+ * buffer overflow vulnerabilities. */
if (movie.header->Streams < 1 || movie.header->Streams > 65536) {
DEBUG_PRINT("Number of streams should be in range 1-65536\n");
fclose(movie.fp);
@@ -489,7 +489,7 @@ AviError AVI_open_movie(const char *name, AviMovie *movie)
fseek(movie->fp, movie->header->size - 14 * 4, SEEK_CUR);
/* Limit number of streams to some reasonable amount to prevent
- * buffer oveflow vulnerabilities. */
+ * buffer overflow vulnerabilities. */
if (movie->header->Streams < 1 || movie->header->Streams > 65536) {
DEBUG_PRINT("Number of streams should be in range 1-65536\n");
return AVI_ERROR_FORMAT;
@@ -687,7 +687,7 @@ AviError AVI_open_movie(const char *name, AviMovie *movie)
movie->read_offset = 4;
}
- DEBUG_PRINT("movie succesfully opened\n");
+ DEBUG_PRINT("movie successfully opened\n");
return AVI_ERROR_NONE;
}
@@ -806,7 +806,7 @@ AviError AVI_open_compress(char *name, AviMovie *movie, int streams, ...)
movie->header->Reserved[3] = 0;
/* Limit number of streams to some reasonable amount to prevent
- * buffer oveflow vulnerabilities. */
+ * buffer overflow vulnerabilities. */
if (movie->header->Streams < 0 || movie->header->Streams > 65536) {
DEBUG_PRINT("Number of streams should be in range 0-65536\n");
return AVI_ERROR_FORMAT;
diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h
index 4e6fb89ba89..f1858fc18ed 100644
--- a/source/blender/blenkernel/BKE_action.h
+++ b/source/blender/blenkernel/BKE_action.h
@@ -19,7 +19,7 @@
* All rights reserved.
*
* Contributor(s): Full recode, Ton Roosendaal, Crete 2005
- * Full recode, Joshua Leung, 2009
+ * Full recode, Joshua Leung, 2009
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -70,7 +70,7 @@ void BKE_action_make_local(struct Main *bmain, struct bAction *act, const bool l
/* Action API ----------------- */
/* types of transforms applied to the given item
- * - these are the return falgs for action_get_item_transforms()
+ * - these are the return flags for action_get_item_transforms()
*/
typedef enum eAction_TransformFlags {
/* location */
@@ -94,8 +94,8 @@ typedef enum eAction_TransformFlags {
} eAction_TransformFlags;
/* Return flags indicating which transforms the given object/posechannel has
- * - if 'curves' is provided, a list of links to these curves are also returned
- * whose nodes WILL NEED FREEING
+ * - if 'curves' is provided, a list of links to these curves are also returned
+ * whose nodes WILL NEED FREEING
*/
short action_get_item_transforms(struct bAction *act, struct Object *ob, struct bPoseChannel *pchan, ListBase *curves);
diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h
index 5cce1e090a9..40b4bf8e7f5 100644
--- a/source/blender/blenkernel/BKE_animsys.h
+++ b/source/blender/blenkernel/BKE_animsys.h
@@ -190,7 +190,7 @@ bool BKE_animsys_execute_fcurve(struct PointerRNA *ptr, struct AnimMapper *remap
* for standard animation evaluation UNDER ANY CIRCUMSTANCES!
*
* i.e. Pose Library (PoseLib) uses some of these for selectively applying poses, but
- * Particles/Sequencer performing funky time manipulation is not ok.
+ * Particles/Sequencer performing funky time manipulation is not ok.
*/
/* Evaluate Action (F-Curve Bag) */
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h
index d0386c8b6ca..dea5afa1ac2 100644
--- a/source/blender/blenkernel/BKE_armature.h
+++ b/source/blender/blenkernel/BKE_armature.h
@@ -47,7 +47,7 @@ struct ListBase;
typedef struct PoseTarget {
struct PoseTarget *next, *prev;
- struct bConstraint *con; /* the constrait of this target */
+ struct bConstraint *con; /* the constraint of this target */
int tip; /* index of tip pchan in PoseTree */
} PoseTarget;
diff --git a/source/blender/blenkernel/BKE_blendfile.h b/source/blender/blenkernel/BKE_blendfile.h
index 9ff164f60be..74fdde93d9a 100644
--- a/source/blender/blenkernel/BKE_blendfile.h
+++ b/source/blender/blenkernel/BKE_blendfile.h
@@ -34,6 +34,7 @@ struct Main;
struct MemFile;
struct ReportList;
struct UserDef;
+struct BlendFileReadParams;
enum {
BKE_BLENDFILE_READ_FAIL = 0, /* no load */
@@ -43,13 +44,16 @@ enum {
int BKE_blendfile_read(
struct bContext *C, const char *filepath,
- struct ReportList *reports, int skip_flag);
+ const struct BlendFileReadParams *params,
+ struct ReportList *reports);
bool BKE_blendfile_read_from_memory(
- struct bContext *C, const void *filebuf, int filelength,
- struct ReportList *reports, int skip_flag, bool update_defaults);
+ struct bContext *C, const void *filebuf, int filelength, bool update_defaults,
+ const struct BlendFileReadParams *params,
+ struct ReportList *reports);
bool BKE_blendfile_read_from_memfile(
struct bContext *C, struct MemFile *memfile,
- struct ReportList *reports, int skip_flag);
+ const struct BlendFileReadParams *params,
+ struct ReportList *reports);
void BKE_blendfile_read_make_empty(struct bContext *C);
struct UserDef *BKE_blendfile_userdef_read(
diff --git a/source/blender/blenkernel/BKE_brush.h b/source/blender/blenkernel/BKE_brush.h
index eda1c51bbc2..9fc399c428f 100644
--- a/source/blender/blenkernel/BKE_brush.h
+++ b/source/blender/blenkernel/BKE_brush.h
@@ -69,7 +69,7 @@ float BKE_brush_curve_strength_clamped(struct Brush *br, float p, const float le
float BKE_brush_curve_strength(const struct Brush *br, float p, const float len);
/* sampling */
-float BKE_brush_sample_tex_3D(
+float BKE_brush_sample_tex_3d(
const struct Scene *scene, const struct Brush *br, const float point[3],
float rgba[4], const int thread, struct ImagePool *pool);
float BKE_brush_sample_masktex(
diff --git a/source/blender/blenkernel/BKE_bvhutils.h b/source/blender/blenkernel/BKE_bvhutils.h
index 1b4bb08756b..c6057442fec 100644
--- a/source/blender/blenkernel/BKE_bvhutils.h
+++ b/source/blender/blenkernel/BKE_bvhutils.h
@@ -35,7 +35,7 @@
#include "BLI_kdopbvh.h"
/**
- * This header encapsulates necessary code to buld a BVH
+ * This header encapsulates necessary code to build a BVH
*/
struct DerivedMesh;
diff --git a/source/blender/blenkernel/BKE_ccg.h b/source/blender/blenkernel/BKE_ccg.h
index 65d4688947e..4d0f6d53820 100644
--- a/source/blender/blenkernel/BKE_ccg.h
+++ b/source/blender/blenkernel/BKE_ccg.h
@@ -33,7 +33,7 @@
*/
/* defines BLI_INLINE */
-#include "BLI_utildefines.h"
+#include "BLI_compiler_compat.h"
/* declares fprintf() and abort(), needed for BLI_assert */
#include <stdio.h>
diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h
index 08cff0c369d..5b7e5f9eebb 100644
--- a/source/blender/blenkernel/BKE_curve.h
+++ b/source/blender/blenkernel/BKE_curve.h
@@ -154,7 +154,7 @@ void BKE_nurb_free(struct Nurb *nu);
struct Nurb *BKE_nurb_duplicate(const struct Nurb *nu);
struct Nurb *BKE_nurb_copy(struct Nurb *src, int pntsu, int pntsv);
-void BKE_nurb_test2D(struct Nurb *nu);
+void BKE_nurb_test_2d(struct Nurb *nu);
void BKE_nurb_minmax(struct Nurb *nu, bool use_radius, float min[3], float max[3]);
float BKE_nurb_calc_length(const struct Nurb *nu, int resolution);
diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h
index 95718fa0470..e75997cd394 100644
--- a/source/blender/blenkernel/BKE_customdata.h
+++ b/source/blender/blenkernel/BKE_customdata.h
@@ -472,7 +472,7 @@ typedef struct CustomDataTransferLayerMap {
size_t data_size; /* Size of actual data we transfer. */
size_t data_offset; /* Offset of actual data we transfer (in element contained in data_src/dst). */
- uint64_t data_flag; /* For bitflag transfer, flag(s) to affect in transfered data. */
+ uint64_t data_flag; /* For bitflag transfer, flag(s) to affect in transferred data. */
void *interp_data; /* Opaque pointer, to be used by specific interp callback (e.g. transformspace for normals). */
diff --git a/source/blender/blenkernel/BKE_dynamicpaint.h b/source/blender/blenkernel/BKE_dynamicpaint.h
index 937ed08a527..c265672da88 100644
--- a/source/blender/blenkernel/BKE_dynamicpaint.h
+++ b/source/blender/blenkernel/BKE_dynamicpaint.h
@@ -53,7 +53,7 @@ typedef struct PaintPoint {
float color[4];
} PaintPoint;
-/* heigh field waves */
+/* height field waves */
typedef struct PaintWavePoint {
float height;
diff --git a/source/blender/blenkernel/BKE_editmesh.h b/source/blender/blenkernel/BKE_editmesh.h
index 92e311bb53f..2cae86d4c3b 100644
--- a/source/blender/blenkernel/BKE_editmesh.h
+++ b/source/blender/blenkernel/BKE_editmesh.h
@@ -27,7 +27,7 @@
* \ingroup bke
*
* The \link edmesh EDBM module\endlink is for editmode bmesh stuff.
- * In contrast, the this module is for code shared with blenkernel thats
+ * In contrast, this module is for code shared with blenkernel that's
* only concerned with low level operations on the #BMEditMesh structure.
*/
diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h
index 1dfcfd5e54f..055a3d40aba 100644
--- a/source/blender/blenkernel/BKE_fcurve.h
+++ b/source/blender/blenkernel/BKE_fcurve.h
@@ -122,8 +122,8 @@ typedef struct GHash FModifierStackStorage;
* as some constraints don't define some of these.
*
* Warning: it is not too advisable to reorder order of members of this struct,
- * as you'll have to edit quite a few ($FMODIFIER_NUM_TYPES) of these
- * structs.
+ * as you'll have to edit quite a few ($FMODIFIER_NUM_TYPES) of these
+ * structs.
*/
typedef struct FModifierTypeInfo {
/* admin/ident */
@@ -230,7 +230,7 @@ struct FCurve *iter_step_fcurve(struct FCurve *fcu_iter, const char rna_path[]);
struct FCurve *id_data_find_fcurve(ID *id, void *data, struct StructRNA *type, const char *prop_name, int index, bool *r_driven);
/* Get list of LinkData's containing pointers to the F-Curves which control the types of data indicated
- * e.g. numMatches = list_find_data_fcurves(matches, &act->curves, "pose.bones[", "MyFancyBone");
+ * e.g. numMatches = list_find_data_fcurves(matches, &act->curves, "pose.bones[", "MyFancyBone");
*/
int list_find_data_fcurves(ListBase *dst, ListBase *src, const char *dataPrefix, const char *dataName);
@@ -291,8 +291,8 @@ float calculate_fcurve(struct PathResolvedRNA *anim_rna, struct FCurve *fcu, flo
/* -------- Defines -------- */
/* Basic signature for F-Curve sample-creation function
- * - fcu: the F-Curve being operated on
- * - data: pointer to some specific data that may be used by one of the callbacks
+ * - fcu: the F-Curve being operated on
+ * - data: pointer to some specific data that may be used by one of the callbacks
*/
typedef float (*FcuSampleFunc)(struct FCurve *fcu, void *data, float evaltime);
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h
index 0ce560532d5..6ed32fc43ac 100644
--- a/source/blender/blenkernel/BKE_global.h
+++ b/source/blender/blenkernel/BKE_global.h
@@ -121,14 +121,14 @@ typedef struct Global {
/* G.debug */
enum {
- G_DEBUG = (1 << 0), /* general debug flag, print more info in unexpected cases */
+ G_DEBUG = (1 << 0), /* general debug flag, print more info in unexpected cases */
G_DEBUG_FFMPEG = (1 << 1),
- G_DEBUG_PYTHON = (1 << 2), /* extra python info */
- G_DEBUG_EVENTS = (1 << 3), /* input/window/screen events */
- G_DEBUG_HANDLERS = (1 << 4), /* events handling */
- G_DEBUG_WM = (1 << 5), /* operator, undo */
- G_DEBUG_JOBS = (1 << 6), /* jobs time profiling */
- G_DEBUG_FREESTYLE = (1 << 7), /* freestyle messages */
+ G_DEBUG_PYTHON = (1 << 2), /* extra python info */
+ G_DEBUG_EVENTS = (1 << 3), /* input/window/screen events */
+ G_DEBUG_HANDLERS = (1 << 4), /* events handling */
+ G_DEBUG_WM = (1 << 5), /* operator, undo */
+ G_DEBUG_JOBS = (1 << 6), /* jobs time profiling */
+ G_DEBUG_FREESTYLE = (1 << 7), /* freestyle messages */
G_DEBUG_DEPSGRAPH_BUILD = (1 << 8), /* depsgraph construction messages */
G_DEBUG_DEPSGRAPH_EVAL = (1 << 9), /* depsgraph evaluation messages */
G_DEBUG_DEPSGRAPH_TAG = (1 << 10), /* depsgraph tagging messages */
@@ -139,11 +139,11 @@ enum {
G_DEBUG_DEPSGRAPH_EVAL |
G_DEBUG_DEPSGRAPH_TAG |
G_DEBUG_DEPSGRAPH_TIME),
- G_DEBUG_SIMDATA = (1 << 14), /* sim debug data display */
- G_DEBUG_GPU_MEM = (1 << 15), /* gpu memory in status bar */
- G_DEBUG_GPU = (1 << 16), /* gpu debug */
- G_DEBUG_IO = (1 << 17), /* IO Debugging (for Collada, ...)*/
- G_DEBUG_GPU_SHADERS = (1 << 18), /* GLSL shaders */
+ G_DEBUG_SIMDATA = (1 << 14), /* sim debug data display */
+ G_DEBUG_GPU_MEM = (1 << 15), /* gpu memory in status bar */
+ G_DEBUG_GPU = (1 << 16), /* gpu debug */
+ G_DEBUG_IO = (1 << 17), /* IO Debugging (for Collada, ...)*/
+ G_DEBUG_GPU_SHADERS = (1 << 18), /* GLSL shaders */
};
#define G_DEBUG_ALL (G_DEBUG | G_DEBUG_FFMPEG | G_DEBUG_PYTHON | G_DEBUG_EVENTS | G_DEBUG_WM | G_DEBUG_JOBS | \
diff --git a/source/blender/blenkernel/BKE_gpencil.h b/source/blender/blenkernel/BKE_gpencil.h
index 3a951b7860d..92e16f02e25 100644
--- a/source/blender/blenkernel/BKE_gpencil.h
+++ b/source/blender/blenkernel/BKE_gpencil.h
@@ -86,7 +86,7 @@ bool gpencil_layer_is_editable(const struct bGPDlayer *gpl);
* is no existing GP-Frame on the frame requested.
*/
typedef enum eGP_GetFrame_Mode {
- /* Use the preceeding gp-frame (i.e. don't add anything) */
+ /* Use the preceding gp-frame (i.e. don't add anything) */
GP_GETFRAME_USE_PREV = 0,
/* Add a new empty/blank frame */
diff --git a/source/blender/blenkernel/BKE_library_query.h b/source/blender/blenkernel/BKE_library_query.h
index d6e7d98f371..65fe9abaa65 100644
--- a/source/blender/blenkernel/BKE_library_query.h
+++ b/source/blender/blenkernel/BKE_library_query.h
@@ -67,7 +67,7 @@ enum {
enum {
IDWALK_RET_NOP = 0,
- IDWALK_RET_STOP_ITER = 1 << 0, /* Completly stop iteration. */
+ IDWALK_RET_STOP_ITER = 1 << 0, /* Completely stop iteration. */
IDWALK_RET_STOP_RECURSION = 1 << 1, /* Stop recursion, that is, do not loop over ID used by current one. */
};
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index 23ef45416f7..09860972802 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -32,7 +32,7 @@
* \ingroup bke
*/
-#include "BLI_utildefines.h"
+#include "BLI_compiler_compat.h"
#include "BLI_ghash.h"
#include "DNA_listBase.h"
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h
index abb9000b024..eedf5f7985e 100644
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@ -68,28 +68,34 @@ extern const char PAINT_CURSOR_WEIGHT_PAINT[3];
extern const char PAINT_CURSOR_TEXTURE_PAINT[3];
typedef enum ePaintMode {
- ePaintSculpt = 0,
- ePaintVertex = 1,
- ePaintWeight = 2,
- ePaintTextureProjective = 3,
- ePaintTexture2D = 4,
- ePaintSculptUV = 5,
- ePaintInvalid = 6
+ PAINT_MODE_SCULPT = 0,
+ /** Vertex color. */
+ PAINT_MODE_VERTEX = 1,
+ PAINT_MODE_WEIGHT = 2,
+ /** 3D view (projection painting). */
+ PAINT_MODE_TEXTURE_3D = 3,
+ /** Image space (2D painting). */
+ PAINT_MODE_TEXTURE_2D = 4,
+ PAINT_MODE_SCULPT_UV = 5,
+
+ /** Keep last. */
+ PAINT_MODE_INVALID = 6
} ePaintMode;
/* overlay invalidation */
typedef enum eOverlayControlFlags {
- PAINT_INVALID_OVERLAY_TEXTURE_PRIMARY = 1,
- PAINT_INVALID_OVERLAY_TEXTURE_SECONDARY = (1 << 2),
- PAINT_INVALID_OVERLAY_CURVE = (1 << 3),
+ PAINT_OVERLAY_INVALID_TEXTURE_PRIMARY = 1,
+ PAINT_OVERLAY_INVALID_TEXTURE_SECONDARY = (1 << 2),
+ PAINT_OVERLAY_INVALID_CURVE = (1 << 3),
PAINT_OVERLAY_OVERRIDE_CURSOR = (1 << 4),
PAINT_OVERLAY_OVERRIDE_PRIMARY = (1 << 5),
PAINT_OVERLAY_OVERRIDE_SECONDARY = (1 << 6)
} eOverlayControlFlags;
-#define PAINT_OVERRIDE_MASK (PAINT_OVERLAY_OVERRIDE_SECONDARY | \
- PAINT_OVERLAY_OVERRIDE_PRIMARY | \
- PAINT_OVERLAY_OVERRIDE_CURSOR)
+#define PAINT_OVERRIDE_MASK \
+ (PAINT_OVERLAY_OVERRIDE_SECONDARY | \
+ PAINT_OVERLAY_OVERRIDE_PRIMARY | \
+ PAINT_OVERLAY_OVERRIDE_CURSOR)
void BKE_paint_invalidate_overlay_tex(struct Scene *scene, const struct Tex *tex);
void BKE_paint_invalidate_cursor_overlay(struct Scene *scene, struct CurveMapping *curve);
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h
index ddbf4025596..54c927aaa99 100644
--- a/source/blender/blenkernel/BKE_particle.h
+++ b/source/blender/blenkernel/BKE_particle.h
@@ -65,7 +65,7 @@ struct EdgeHash;
#define PARTICLE_COLLISION_MAX_COLLISIONS 10
-#define PARTICLE_P ParticleData * pa; int p
+#define PARTICLE_P ParticleData *pa; int p
#define LOOP_PARTICLES for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++)
#define LOOP_EXISTING_PARTICLES for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++) if (!(pa->flag & PARS_UNEXIST))
#define LOOP_SHOWN_PARTICLES for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++) if (!(pa->flag & (PARS_UNEXIST | PARS_NO_DISP)))
@@ -73,7 +73,7 @@ struct EdgeHash;
#define LOOP_DYNAMIC_PARTICLES for (p = 0; p < psys->totpart; p++) if ((pa = psys->particles + p)->state.time > 0.0f)
/* fast but sure way to get the modifier*/
-#define PARTICLE_PSMD ParticleSystemModifierData * psmd = sim->psmd ? sim->psmd : psys_get_modifier(sim->ob, sim->psys)
+#define PARTICLE_PSMD ParticleSystemModifierData *psmd = sim->psmd ? sim->psmd : psys_get_modifier(sim->ob, sim->psys)
/* common stuff that many particle functions need */
typedef struct ParticleSimulationData {
diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h
index 88e5a25958d..e905a5efae4 100644
--- a/source/blender/blenkernel/BKE_pointcache.h
+++ b/source/blender/blenkernel/BKE_pointcache.h
@@ -294,7 +294,7 @@ void BKE_ptcache_update_info(PTCacheID *pid);
/* Size of cache data type. */
int BKE_ptcache_data_size(int data_type);
-/* Is point with indes in memory cache */
+/* Is point with index in memory cache */
int BKE_ptcache_mem_index_find(struct PTCacheMem *pm, unsigned int index);
/* Memory cache read/write helpers. */
diff --git a/source/blender/blenkernel/BKE_shrinkwrap.h b/source/blender/blenkernel/BKE_shrinkwrap.h
index 31b4b5cecc5..2dd42a9da1f 100644
--- a/source/blender/blenkernel/BKE_shrinkwrap.h
+++ b/source/blender/blenkernel/BKE_shrinkwrap.h
@@ -38,9 +38,9 @@
* Shrinkwrap is composed by a set of functions and options that define the type of shrink.
*
* 3 modes are available:
- * - Nearest vertex
- * - Nearest surface
- * - Normal projection
+ * - Nearest vertex
+ * - Nearest surface
+ * - Normal projection
*
* ShrinkwrapCalcData encapsulates all needed data for shrinkwrap functions.
* (So that you don't have to pass an enormous amount of arguments to functions)
diff --git a/source/blender/blenkernel/BKE_unit.h b/source/blender/blenkernel/BKE_unit.h
index 278b303a315..82a4659eec7 100644
--- a/source/blender/blenkernel/BKE_unit.h
+++ b/source/blender/blenkernel/BKE_unit.h
@@ -51,7 +51,7 @@ double bUnit_BaseScalar(int system, int type);
/* return true is the unit system exists */
bool bUnit_IsValid(int system, int type);
-/* loop over scales, coudl add names later */
+/* loop over scales, could add names later */
//double bUnit_Iter(void **unit, char **name, int system, int type);
void bUnit_GetSystem(int system, int type, void const **r_usys_pt, int *r_len);
diff --git a/source/blender/blenkernel/intern/CCGSubSurf_intern.h b/source/blender/blenkernel/intern/CCGSubSurf_intern.h
index 9df1c9021ef..50959d21425 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf_intern.h
+++ b/source/blender/blenkernel/intern/CCGSubSurf_intern.h
@@ -229,7 +229,7 @@ struct CCGSubSurf {
*/
bool osd_coarse_coords_invalid;
- /* GL mesh descriptor, used for refinment and draw. */
+ /* GL mesh descriptor, used for refinement and draw. */
struct OpenSubdiv_GLMesh *osd_mesh;
/* Refiner which is used to create GL mesh.
*
diff --git a/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c b/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c
index f568bb94ac5..65c6518cee4 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c
@@ -75,7 +75,7 @@ static bool compare_ccg_derivedmesh_topology(CCGSubSurf *ss, DerivedMesh *dm)
ccgFaceIterator_next(&ccg_face_iter))
{
/*const*/ CCGFace *ccg_face = ccgFaceIterator_getCurrent(&ccg_face_iter);
- const int poly_index = GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(ccg_face));
+ const int poly_index = POINTER_AS_INT(ccgSubSurf_getFaceFaceHandle(ccg_face));
const MPoly *mp = &mpoly[poly_index];
int corner;
if (ccg_face->numVerts != mp->totloop) {
@@ -83,7 +83,7 @@ static bool compare_ccg_derivedmesh_topology(CCGSubSurf *ss, DerivedMesh *dm)
}
for (corner = 0; corner < ccg_face->numVerts; corner++) {
/*const*/ CCGVert *ccg_vert = FACE_getVerts(ccg_face)[corner];
- const int vert_index = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(ccg_vert));
+ const int vert_index = POINTER_AS_INT(ccgSubSurf_getVertVertHandle(ccg_vert));
if (vert_index != mloop[mp->loopstart + corner].v) {
return false;
}
@@ -101,9 +101,9 @@ static bool compare_ccg_derivedmesh_topology(CCGSubSurf *ss, DerivedMesh *dm)
/* const */ CCGEdge *ccg_edge = ccgEdgeIterator_getCurrent(&ccg_edge_iter);
/* const */ CCGVert *ccg_vert1 = ccg_edge->v0;
/* const */ CCGVert *ccg_vert2 = ccg_edge->v1;
- const int ccg_vert1_index = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(ccg_vert1));
- const int ccg_vert2_index = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(ccg_vert2));
- const int edge_index = GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(ccg_edge));
+ const int ccg_vert1_index = POINTER_AS_INT(ccgSubSurf_getVertVertHandle(ccg_vert1));
+ const int ccg_vert2_index = POINTER_AS_INT(ccgSubSurf_getVertVertHandle(ccg_vert2));
+ const int edge_index = POINTER_AS_INT(ccgSubSurf_getEdgeEdgeHandle(ccg_edge));
const MEdge *me = &medge[edge_index];
if (me->v1 != ccg_vert1_index || me->v2 != ccg_vert2_index) {
return false;
@@ -119,7 +119,7 @@ static bool compare_ccg_derivedmesh_topology(CCGSubSurf *ss, DerivedMesh *dm)
ccgEdgeIterator_next(&ccg_edge_iter))
{
/* const */ CCGEdge *ccg_edge = ccgEdgeIterator_getCurrent(&ccg_edge_iter);
- const int edge_index = GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(ccg_edge));
+ const int edge_index = POINTER_AS_INT(ccgSubSurf_getEdgeEdgeHandle(ccg_edge));
if (ccg_edge->crease != medge[edge_index].crease) {
return false;
}
diff --git a/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv_converter.c b/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv_converter.c
index 8c1ba0c3782..d6b15148ed1 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv_converter.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv_converter.c
@@ -562,7 +562,7 @@ static int conv_ccg_get_num_face_verts(const OpenSubdiv_Converter *converter,
int face)
{
CCGSubSurf *ss = converter->user_data;
- CCGFace *ccg_face = ccgSubSurf_getFace(ss, SET_INT_IN_POINTER(face));
+ CCGFace *ccg_face = ccgSubSurf_getFace(ss, POINTER_FROM_INT(face));
return ccgSubSurf_getFaceNumVerts(ccg_face);
}
@@ -571,12 +571,12 @@ static void conv_ccg_get_face_verts(const OpenSubdiv_Converter *converter,
int *face_verts)
{
CCGSubSurf *ss = converter->user_data;
- CCGFace *ccg_face = ccgSubSurf_getFace(ss, SET_INT_IN_POINTER(face));
+ CCGFace *ccg_face = ccgSubSurf_getFace(ss, POINTER_FROM_INT(face));
int num_face_verts = ccgSubSurf_getFaceNumVerts(ccg_face);
int loop;
for (loop = 0; loop < num_face_verts; loop++) {
CCGVert *ccg_vert = ccgSubSurf_getFaceVert(ccg_face, loop);
- face_verts[loop] = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(ccg_vert));
+ face_verts[loop] = POINTER_AS_INT(ccgSubSurf_getVertVertHandle(ccg_vert));
}
}
@@ -585,12 +585,12 @@ static void conv_ccg_get_face_edges(const OpenSubdiv_Converter *converter,
int *face_edges)
{
CCGSubSurf *ss = converter->user_data;
- CCGFace *ccg_face = ccgSubSurf_getFace(ss, SET_INT_IN_POINTER(face));
+ CCGFace *ccg_face = ccgSubSurf_getFace(ss, POINTER_FROM_INT(face));
int num_face_verts = ccgSubSurf_getFaceNumVerts(ccg_face);
int loop;
for (loop = 0; loop < num_face_verts; loop++) {
CCGEdge *ccg_edge = ccgSubSurf_getFaceEdge(ccg_face, loop);
- face_edges[loop] = GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(ccg_edge));
+ face_edges[loop] = POINTER_AS_INT(ccgSubSurf_getEdgeEdgeHandle(ccg_edge));
}
}
@@ -599,18 +599,18 @@ static void conv_ccg_get_edge_verts(const OpenSubdiv_Converter *converter,
int *edge_verts)
{
CCGSubSurf *ss = converter->user_data;
- CCGEdge *ccg_edge = ccgSubSurf_getEdge(ss, SET_INT_IN_POINTER(edge));
+ CCGEdge *ccg_edge = ccgSubSurf_getEdge(ss, POINTER_FROM_INT(edge));
CCGVert *ccg_vert0 = ccgSubSurf_getEdgeVert0(ccg_edge);
CCGVert *ccg_vert1 = ccgSubSurf_getEdgeVert1(ccg_edge);
- edge_verts[0] = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(ccg_vert0));
- edge_verts[1] = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(ccg_vert1));
+ edge_verts[0] = POINTER_AS_INT(ccgSubSurf_getVertVertHandle(ccg_vert0));
+ edge_verts[1] = POINTER_AS_INT(ccgSubSurf_getVertVertHandle(ccg_vert1));
}
static int conv_ccg_get_num_edge_faces(const OpenSubdiv_Converter *converter,
int edge)
{
CCGSubSurf *ss = converter->user_data;
- CCGEdge *ccg_edge = ccgSubSurf_getEdge(ss, SET_INT_IN_POINTER(edge));
+ CCGEdge *ccg_edge = ccgSubSurf_getEdge(ss, POINTER_FROM_INT(edge));
return ccgSubSurf_getEdgeNumFaces(ccg_edge);
}
@@ -619,12 +619,12 @@ static void conv_ccg_get_edge_faces(const OpenSubdiv_Converter *converter,
int *edge_faces)
{
CCGSubSurf *ss = converter->user_data;
- CCGEdge *ccg_edge = ccgSubSurf_getEdge(ss, SET_INT_IN_POINTER(edge));
+ CCGEdge *ccg_edge = ccgSubSurf_getEdge(ss, POINTER_FROM_INT(edge));
int num_edge_faces = ccgSubSurf_getEdgeNumFaces(ccg_edge);
int face;
for (face = 0; face < num_edge_faces; face++) {
CCGFace *ccg_face = ccgSubSurf_getEdgeFace(ccg_edge, face);
- edge_faces[face] = GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(ccg_face));
+ edge_faces[face] = POINTER_AS_INT(ccgSubSurf_getFaceFaceHandle(ccg_face));
}
}
@@ -632,7 +632,7 @@ static float conv_ccg_get_edge_sharpness(const OpenSubdiv_Converter *converter,
int edge)
{
CCGSubSurf *ss = converter->user_data;
- CCGEdge *ccg_edge = ccgSubSurf_getEdge(ss, SET_INT_IN_POINTER(edge));
+ CCGEdge *ccg_edge = ccgSubSurf_getEdge(ss, POINTER_FROM_INT(edge));
/* TODO(sergey): Multiply by subdivision level once CPU evaluator
* is switched to uniform subdivision type.
*/
@@ -643,7 +643,7 @@ static int conv_ccg_get_num_vert_edges(const OpenSubdiv_Converter *converter,
int vert)
{
CCGSubSurf *ss = converter->user_data;
- CCGVert *ccg_vert = ccgSubSurf_getVert(ss, SET_INT_IN_POINTER(vert));
+ CCGVert *ccg_vert = ccgSubSurf_getVert(ss, POINTER_FROM_INT(vert));
return ccgSubSurf_getVertNumEdges(ccg_vert);
}
@@ -652,12 +652,12 @@ static void conv_ccg_get_vert_edges(const OpenSubdiv_Converter *converter,
int *vert_edges)
{
CCGSubSurf *ss = converter->user_data;
- CCGVert *ccg_vert = ccgSubSurf_getVert(ss, SET_INT_IN_POINTER(vert));
+ CCGVert *ccg_vert = ccgSubSurf_getVert(ss, POINTER_FROM_INT(vert));
int num_vert_edges = ccgSubSurf_getVertNumEdges(ccg_vert);
int edge;
for (edge = 0; edge < num_vert_edges; edge++) {
CCGEdge *ccg_edge = ccgSubSurf_getVertEdge(ccg_vert, edge);
- vert_edges[edge] = GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(ccg_edge));
+ vert_edges[edge] = POINTER_AS_INT(ccgSubSurf_getEdgeEdgeHandle(ccg_edge));
}
}
@@ -665,7 +665,7 @@ static int conv_ccg_get_num_vert_faces(const OpenSubdiv_Converter *converter,
int vert)
{
CCGSubSurf *ss = converter->user_data;
- CCGVert *ccg_vert = ccgSubSurf_getVert(ss, SET_INT_IN_POINTER(vert));
+ CCGVert *ccg_vert = ccgSubSurf_getVert(ss, POINTER_FROM_INT(vert));
return ccgSubSurf_getVertNumFaces(ccg_vert);
}
@@ -674,12 +674,12 @@ static void conv_ccg_get_vert_faces(const OpenSubdiv_Converter *converter,
int *vert_faces)
{
CCGSubSurf *ss = converter->user_data;
- CCGVert *ccg_vert = ccgSubSurf_getVert(ss, SET_INT_IN_POINTER(vert));
+ CCGVert *ccg_vert = ccgSubSurf_getVert(ss, POINTER_FROM_INT(vert));
int num_vert_faces = ccgSubSurf_getVertNumFaces(ccg_vert);
int face;
for (face = 0; face < num_vert_faces; face++) {
CCGFace *ccg_face = ccgSubSurf_getVertFace(ccg_vert, face);
- vert_faces[face] = GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(ccg_face));
+ vert_faces[face] = POINTER_AS_INT(ccgSubSurf_getFaceFaceHandle(ccg_face));
}
}
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 9c0fc79a358..e099ceaea53 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -561,7 +561,7 @@ void DM_update_tessface_data(DerivedMesh *dm)
int *polyindex = CustomData_get_layer(fdata, CD_ORIGINDEX);
unsigned int (*loopindex)[4];
- /* Should never occure, but better abort than segfault! */
+ /* Should never occur, but better abort than segfault! */
if (!polyindex)
return;
@@ -624,7 +624,7 @@ void DM_generate_tangent_tessface_data(DerivedMesh *dm, bool generate)
int *polyindex = CustomData_get_layer(fdata, CD_ORIGINDEX);
unsigned int (*loopindex)[4] = NULL;
- /* Should never occure, but better abort than segfault! */
+ /* Should never occur, but better abort than segfault! */
if (!polyindex)
return;
@@ -4182,7 +4182,7 @@ void DM_init_origspace(DerivedMesh *dm)
scale[1] = 1e-9f;
invert_v2(scale);
- /* Finally, transform all vcos_2d into ((0, 0), (1, 1)) square and assing them as origspace. */
+ /* Finally, transform all vcos_2d into ((0, 0), (1, 1)) square and assign them as origspace. */
for (j = 0; j < mp->totloop; j++, lof++) {
add_v2_v2v2(lof->uv, vcos_2d[j], translate);
mul_v2_v2(lof->uv, scale);
@@ -4210,7 +4210,7 @@ static void dm_debug_info_layers(
for (type = 0; type < CD_NUMTYPES; type++) {
if (CustomData_has_layer(cd, type)) {
- /* note: doesnt account for multiple layers */
+ /* note: doesn't account for multiple layers */
const char *name = CustomData_layertype_name(type);
const int size = CustomData_sizeof(type);
const void *pt = getElemDataArray(dm, type);
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index e6848876425..7612e9a3fdb 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -19,7 +19,7 @@
* All rights reserved.
*
* Contributor(s): Full recode, Ton Roosendaal, Crete 2005
- * Full recode, Joshua Leung, 2009
+ * Full recode, Joshua Leung, 2009
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -198,7 +198,7 @@ void set_active_action_group(bAction *act, bActionGroup *agrp, short select)
if (act == NULL)
return;
- /* Deactive all others */
+ /* Deactivate all others */
for (grp = act->groups.first; grp; grp = grp->next) {
if ((grp == agrp) && (select))
grp->flag |= AGRP_ACTIVE;
@@ -263,8 +263,8 @@ bActionGroup *action_groups_add_new(bAction *act, const char name[])
}
/* Add given channel into (active) group
- * - assumes that channel is not linked to anything anymore
- * - always adds at the end of the group
+ * - assumes that channel is not linked to anything anymore
+ * - always adds at the end of the group
*/
void action_groups_add_channel(bAction *act, bActionGroup *agrp, FCurve *fcurve)
{
@@ -309,8 +309,8 @@ void action_groups_add_channel(bAction *act, bActionGroup *agrp, FCurve *fcurve)
for (grp = agrp->prev; grp; grp = grp->prev) {
/* if this group has F-Curves, we want weave the given one in right after the last channel there,
* but via the Action's list not this group's list
- * - this is so that the F-Curve is in the right place in the Action,
- * but won't be included in the previous group
+ * - this is so that the F-Curve is in the right place in the Action,
+ * but won't be included in the previous group
*/
if (grp->channels.last) {
/* once we've added, break here since we don't need to search any further... */
@@ -1063,8 +1063,8 @@ void BKE_pose_remove_group(bPose *pose, bActionGroup *grp, const int index)
BLI_assert(idx > 0);
/* adjust group references (the trouble of using indices!):
- * - firstly, make sure nothing references it
- * - also, make sure that those after this item get corrected
+ * - firstly, make sure nothing references it
+ * - also, make sure that those after this item get corrected
*/
for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
if (pchan->agrp_index == idx)
@@ -1147,7 +1147,7 @@ void calc_action_range(const bAction *act, float *start, float *end, short incl_
}
/* if incl_modifiers is enabled, need to consider modifiers too
- * - only really care about the last modifier
+ * - only really care about the last modifier
*/
if ((incl_modifiers) && (fcu->modifiers.last)) {
FModifier *fcm = fcu->modifiers.last;
@@ -1203,7 +1203,7 @@ void calc_action_range(const bAction *act, float *start, float *end, short incl_
}
/* Return flags indicating which transforms the given object/posechannel has
- * - if 'curves' is provided, a list of links to these curves are also returned
+ * - if 'curves' is provided, a list of links to these curves are also returned
*/
short action_get_item_transforms(bAction *act, Object *ob, bPoseChannel *pchan, ListBase *curves)
{
@@ -1226,7 +1226,7 @@ short action_get_item_transforms(bAction *act, Object *ob, bPoseChannel *pchan,
return 0;
/* search F-Curves for the given properties
- * - we cannot use the groups, since they may not be grouped in that way...
+ * - we cannot use the groups, since they may not be grouped in that way...
*/
for (fcu = act->curves.first; fcu; fcu = fcu->next) {
const char *bPtr = NULL, *pPtr = NULL;
@@ -1249,11 +1249,11 @@ short action_get_item_transforms(bAction *act, Object *ob, bPoseChannel *pchan,
bPtr += strlen(basePath);
/* step 2: check for some property with transforms
- * - to speed things up, only check for the ones not yet found
- * unless we're getting the curves too
- * - if we're getting the curves, the BLI_genericNodeN() creates a LinkData
- * node wrapping the F-Curve, which then gets added to the list
- * - once a match has been found, the curve cannot possibly be any other one
+ * - to speed things up, only check for the ones not yet found
+ * unless we're getting the curves too
+ * - if we're getting the curves, the BLI_genericNodeN() creates a LinkData
+ * node wrapping the F-Curve, which then gets added to the list
+ * - once a match has been found, the curve cannot possibly be any other one
*/
if ((curves) || (flags & ACT_TRANS_LOC) == 0) {
pPtr = strstr(bPtr, "location");
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index b3c6fb4f3a9..d5f269b82a8 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -235,7 +235,7 @@ typedef struct MPathTarget {
/* ........ */
/* get list of motion paths to be baked for the given object
- * - assumes the given list is ready to be used
+ * - assumes the given list is ready to be used
*/
/* TODO: it would be nice in future to be able to update objects dependent on these bones too? */
void animviz_get_object_motionpaths(Object *ob, ListBase *targets)
@@ -349,9 +349,9 @@ static void motionpaths_calc_update_scene(Main *bmain, Scene *scene)
}
#else // original, 'always correct' version
/* do all updates
- * - if this is too slow, resort to using a more efficient way
- * that doesn't force complete update, but for now, this is the
- * most accurate way!
+ * - if this is too slow, resort to using a more efficient way
+ * that doesn't force complete update, but for now, this is the
+ * most accurate way!
*/
BKE_scene_update_for_newframe(bmain->eval_ctx, bmain, scene, scene->lay); /* XXX this is the best way we can get anything moving */
#endif
@@ -370,7 +370,7 @@ static void motionpaths_calc_bake_targets(Scene *scene, ListBase *targets)
bMotionPathVert *mpv;
/* current frame must be within the range the cache works for
- * - is inclusive of the first frame, but not the last otherwise we get buffer overruns
+ * - is inclusive of the first frame, but not the last otherwise we get buffer overruns
*/
if ((CFRA < mpath->start_frame) || (CFRA >= mpath->end_frame))
continue;
@@ -399,9 +399,9 @@ static void motionpaths_calc_bake_targets(Scene *scene, ListBase *targets)
}
/* Perform baking of the given object's and/or its bones' transforms to motion paths
- * - scene: current scene
- * - ob: object whose flagged motionpaths should get calculated
- * - recalc: whether we need to
+ * - scene: current scene
+ * - ob: object whose flagged motionpaths should get calculated
+ * - recalc: whether we need to
*/
/* TODO: include reports pointer? */
void animviz_calc_motionpaths(Main *bmain, Scene *scene, ListBase *targets)
@@ -474,7 +474,7 @@ void free_path(Path *path)
}
/* calculate a curve-deform path for a curve
- * - only called from displist.c -> do_makeDispListCurveTypes
+ * - only called from displist.c -> do_makeDispListCurveTypes
*/
void calc_curvepath(Object *ob, ListBase *nurbs)
{
@@ -643,7 +643,7 @@ int where_on_path(Object *ob, float ctime, float vec[4], float dir[3], float qua
s1 = (int)floor(ctime);
fac = (float)(s1 + 1) - ctime;
- /* path->len is corected for cyclic */
+ /* path->len is corrected for cyclic */
s0 = interval_test(0, path->len - 1 - cycl, s1 - 1, cycl);
s1 = interval_test(0, path->len - 1 - cycl, s1, cycl);
s2 = interval_test(0, path->len - 1 - cycl, s1 + 1, cycl);
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 05cb10ab7a4..b17bc70c51a 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -422,8 +422,8 @@ static bool animpath_matches_basepath(const char path[], const char basepath[])
/* Move F-Curves in src action to dst action, setting up all the necessary groups
* for this to happen, but only if the F-Curves being moved have the appropriate
* "base path".
- * - This is used when data moves from one datablock to another, causing the
- * F-Curves to need to be moved over too
+ * - This is used when data moves from one datablock to another, causing the
+ * F-Curves to need to be moved over too
*/
void action_move_fcurves_by_basepath(bAction *srcAct, bAction *dstAct, const char basepath[])
{
@@ -449,7 +449,7 @@ void action_move_fcurves_by_basepath(bAction *srcAct, bAction *dstAct, const cha
fcn = fcu->next;
/* should F-Curve be moved over?
- * - we only need the start of the path to match basepath
+ * - we only need the start of the path to match basepath
*/
if (animpath_matches_basepath(fcu->rna_path, basepath)) {
bActionGroup *agrp = NULL;
@@ -1188,8 +1188,8 @@ void BKE_animdata_fix_paths_rename_all(ID *ref_id, const char *prefix, const cha
ID *id;
/* macro for less typing
- * - whether animdata exists is checked for by the main renaming callback, though taking
- * this outside of the function may make things slightly faster?
+ * - whether animdata exists is checked for by the main renaming callback, though taking
+ * this outside of the function may make things slightly faster?
*/
#define RENAMEFIX_ANIM_IDS(first) \
for (id = first; id; id = id->next) { \
@@ -1465,7 +1465,7 @@ void BKE_keyingsets_free(ListBase *list)
return;
/* loop over KeyingSets freeing them
- * - BKE_keyingset_free() doesn't free the set itself, but it frees its sub-data
+ * - BKE_keyingset_free() doesn't free the set itself, but it frees its sub-data
*/
for (ks = list->first; ks; ks = ksn) {
ksn = ks->next;
@@ -1481,9 +1481,9 @@ void BKE_keyingsets_free(ListBase *list)
* It returns whether the string needs to be freed (i.e. if it was a temp remapped one)
* // FIXME: maybe it would be faster if we didn't have to alloc/free strings like this all the time, but for now it's safer
*
- * - remap: remapping table to use
- * - path: original path string (as stored in F-Curve data)
- * - dst: destination string to write data to
+ * - remap: remapping table to use
+ * - path: original path string (as stored in F-Curve data)
+ * - dst: destination string to write data to
*/
static bool animsys_remap_path(AnimMapper *UNUSED(remap), char *path, char **dst)
{
@@ -1781,8 +1781,8 @@ static void action_idcode_patch_check(ID *id, bAction *act)
/* the actual checks... hopefully not too much of a performance hit in the long run... */
if (act->idroot == 0) {
/* use the current root if not set already (i.e. newly created actions and actions from 2.50-2.57 builds)
- * - this has problems if there are 2 users, and the first one encountered is the invalid one
- * in which case, the user will need to manually fix this (?)
+ * - this has problems if there are 2 users, and the first one encountered is the invalid one
+ * in which case, the user will need to manually fix this (?)
*/
act->idroot = idcode;
}
@@ -1878,8 +1878,8 @@ static void nlastrip_evaluate_controls(NlaStrip *strip, float ctime)
}
/* analytically generate values for influence and time (if applicable)
- * - we do this after the F-Curves have been evaluated to override the effects of those
- * in case the override has been turned off.
+ * - we do this after the F-Curves have been evaluated to override the effects of those
+ * in case the override has been turned off.
*/
if ((strip->flag & NLASTRIP_FLAG_USR_TIME) == 0)
strip->strip_time = nlastrip_get_frame(strip, ctime, NLATIME_CONVERT_EVAL);
@@ -1925,8 +1925,8 @@ NlaEvalStrip *nlastrips_ctime_get_strip(ListBase *list, ListBase *strips, short
else {
/* before next strip - previous strip has ended, but next hasn't begun,
* so blending mode depends on whether strip is being held or not...
- * - only occurs when no transition strip added, otherwise the transition would have
- * been picked up above...
+ * - only occurs when no transition strip added, otherwise the transition would have
+ * been picked up above...
*/
strip = strip->prev;
@@ -1953,7 +1953,7 @@ NlaEvalStrip *nlastrips_ctime_get_strip(ListBase *list, ListBase *strips, short
}
/* check if a valid strip was found
- * - must not be muted (i.e. will have contribution
+ * - must not be muted (i.e. will have contribution
*/
if ((estrip == NULL) || (estrip->flag & NLASTRIP_FLAG_MUTED))
return NULL;
@@ -1969,8 +1969,8 @@ NlaEvalStrip *nlastrips_ctime_get_strip(ListBase *list, ListBase *strips, short
}
/* evaluate strip's evaluation controls
- * - skip if no influence (i.e. same effect as muting the strip)
- * - negative influence is not supported yet... how would that be defined?
+ * - skip if no influence (i.e. same effect as muting the strip)
+ * - negative influence is not supported yet... how would that be defined?
*/
/* TODO: this sounds a bit hacky having a few isolated F-Curves stuck on some data it operates on... */
nlastrip_evaluate_controls(estrip, ctime);
@@ -2014,7 +2014,7 @@ NlaEvalStrip *nlastrips_ctime_get_strip(ListBase *list, ListBase *strips, short
/* ---------------------- */
/* find an NlaEvalChannel that matches the given criteria
- * - ptr and prop are the RNA data to find a match for
+ * - ptr and prop are the RNA data to find a match for
*/
static NlaEvalChannel *nlaevalchan_find_match(ListBase *channels, PointerRNA *ptr, PropertyRNA *prop, int array_index)
{
@@ -2029,7 +2029,7 @@ static NlaEvalChannel *nlaevalchan_find_match(ListBase *channels, PointerRNA *pt
/* - comparing the PointerRNA's is done by comparing the pointers
* to the actual struct the property resides in, since that all the
* other data stored in PointerRNA cannot allow us to definitively
- * identify the data
+ * identify the data
*/
if ((nec->ptr.data == ptr->data) && (nec->prop == prop) && (nec->index == array_index))
return nec;
@@ -2176,8 +2176,8 @@ static void nlaevalchan_accumulate(NlaEvalChannel *nec, NlaEvalStrip *nes, float
case NLASTRIP_MODE_REPLACE:
default: /* TODO: do we really want to blend by default? it seems more uses might prefer add... */
/* do linear interpolation
- * - the influence of the accumulated data (elsewhere, that is called dstweight)
- * is 1 - influence, since the strip's influence is srcweight
+ * - the influence of the accumulated data (elsewhere, that is called dstweight)
+ * is 1 - influence, since the strip's influence is srcweight
*/
nec->value = nec->value * (1.0f - inf) + (value * inf);
break;
@@ -2238,7 +2238,7 @@ static void nlaeval_fmodifiers_join_stacks(ListBase *result, ListBase *list1, Li
}
else {
/* list1 should be added first, and list2 second, with the endpoints of these being the endpoints for result
- * - the original lists must be left unchanged though, as we need that fact for restoring
+ * - the original lists must be left unchanged though, as we need that fact for restoring
*/
result->first = list1->first;
result->last = list2->last;
@@ -2350,11 +2350,11 @@ static void nlastrip_evaluate_transition(PointerRNA *ptr, ListBase *channels, Li
nlaeval_fmodifiers_join_stacks(&tmp_modifiers, &nes->strip->modifiers, modifiers);
/* get the two strips to operate on
- * - we use the endpoints of the strips directly flanking our strip
- * using these as the endpoints of the transition (destination and source)
- * - these should have already been determined to be valid...
- * - if this strip is being played in reverse, we need to swap these endpoints
- * otherwise they will be interpolated wrong
+ * - we use the endpoints of the strips directly flanking our strip
+ * using these as the endpoints of the transition (destination and source)
+ * - these should have already been determined to be valid...
+ * - if this strip is being played in reverse, we need to swap these endpoints
+ * otherwise they will be interpolated wrong
*/
if (nes->strip->flag & NLASTRIP_FLAG_REVERSE) {
s1 = nes->strip->next;
@@ -2366,11 +2366,11 @@ static void nlastrip_evaluate_transition(PointerRNA *ptr, ListBase *channels, Li
}
/* prepare template for 'evaluation strip'
- * - based on the transition strip's evaluation strip data
- * - strip_mode is NES_TIME_TRANSITION_* based on which endpoint
- * - strip_time is the 'normalized' (i.e. in-strip) time for evaluation,
- * which doubles up as an additional weighting factor for the strip influences
- * which allows us to appear to be 'interpolating' between the two extremes
+ * - based on the transition strip's evaluation strip data
+ * - strip_mode is NES_TIME_TRANSITION_* based on which endpoint
+ * - strip_time is the 'normalized' (i.e. in-strip) time for evaluation,
+ * which doubles up as an additional weighting factor for the strip influences
+ * which allows us to appear to be 'interpolating' between the two extremes
*/
tmp_nes = *nes;
@@ -2551,7 +2551,7 @@ static void animsys_evaluate_nla(ListBase *echannels, PointerRNA *ptr, AnimData
}
/* if this track has strips (but maybe they won't be suitable), set has_strips
- * - used for mainly for still allowing normal action evaluation...
+ * - used for mainly for still allowing normal action evaluation...
*/
if (nlt->strips.first)
has_strips = true;
@@ -2562,9 +2562,9 @@ static void animsys_evaluate_nla(ListBase *echannels, PointerRNA *ptr, AnimData
}
/* add 'active' Action (may be tweaking track) as last strip to evaluate in NLA stack
- * - only do this if we're not exclusively evaluating the 'solo' NLA-track
- * - however, if the 'solo' track houses the current 'tweaking' strip,
- * then we should allow this to play, otherwise nothing happens
+ * - only do this if we're not exclusively evaluating the 'solo' NLA-track
+ * - however, if the 'solo' track houses the current 'tweaking' strip,
+ * then we should allow this to play, otherwise nothing happens
*/
if ((adt->action) && ((adt->flag & ADT_NLA_SOLO_TRACK) == 0 || (adt->flag & ADT_NLA_EDIT_ON))) {
/* if there are strips, evaluate action as per NLA rules */
@@ -2636,8 +2636,8 @@ static void animsys_evaluate_nla(ListBase *echannels, PointerRNA *ptr, AnimData
}
/* NLA Evaluation function (mostly for use through do_animdata)
- * - All channels that will be affected are not cleared anymore. Instead, we just evaluate into
- * some temp channels, where values can be accumulated in one go.
+ * - All channels that will be affected are not cleared anymore. Instead, we just evaluate into
+ * some temp channels, where values can be accumulated in one go.
*/
static void animsys_calculate_nla(PointerRNA *ptr, AnimData *adt, float ctime)
{
@@ -2690,34 +2690,34 @@ static void animsys_evaluate_overrides(PointerRNA *ptr, AnimData *adt)
/* Evaluation System - Public API */
/* Overview of how this system works:
- * 1) Depsgraph sorts data as necessary, so that data is in an order that means
- * that all dependencies are resolved before dependents.
- * 2) All normal animation is evaluated, so that drivers have some basis values to
- * work with
- * a. NLA stacks are done first, as the Active Actions act as 'tweaking' tracks
- * which modify the effects of the NLA-stacks
- * b. Active Action is evaluated as per normal, on top of the results of the NLA tracks
+ * 1) Depsgraph sorts data as necessary, so that data is in an order that means
+ * that all dependencies are resolved before dependents.
+ * 2) All normal animation is evaluated, so that drivers have some basis values to
+ * work with
+ * a. NLA stacks are done first, as the Active Actions act as 'tweaking' tracks
+ * which modify the effects of the NLA-stacks
+ * b. Active Action is evaluated as per normal, on top of the results of the NLA tracks
*
* --------------< often in a separate phase... >------------------
*
- * 3) Drivers/expressions are evaluated on top of this, in an order where dependencies are
- * resolved nicely.
- * Note: it may be necessary to have some tools to handle the cases where some higher-level
- * drivers are added and cause some problematic dependencies that didn't exist in the local levels...
+ * 3) Drivers/expressions are evaluated on top of this, in an order where dependencies are
+ * resolved nicely.
+ * Note: it may be necessary to have some tools to handle the cases where some higher-level
+ * drivers are added and cause some problematic dependencies that didn't exist in the local levels...
*
* --------------< always executed >------------------
*
* Maintenance of editability of settings (XXX):
- * In order to ensure that settings that are animated can still be manipulated in the UI without requiring
- * that keyframes are added to prevent these values from being overwritten, we use 'overrides'.
+ * In order to ensure that settings that are animated can still be manipulated in the UI without requiring
+ * that keyframes are added to prevent these values from being overwritten, we use 'overrides'.
*
* Unresolved things:
- * - Handling of multi-user settings (i.e. time-offset, group-instancing) -> big cache grids or nodal system? but stored where?
- * - Multiple-block dependencies (i.e. drivers for settings are in both local and higher levels) -> split into separate lists?
+ * - Handling of multi-user settings (i.e. time-offset, group-instancing) -> big cache grids or nodal system? but stored where?
+ * - Multiple-block dependencies (i.e. drivers for settings are in both local and higher levels) -> split into separate lists?
*
* Current Status:
- * - Currently (as of September 2009), overrides we haven't needed to (fully) implement overrides.
- * However, the code for this is relatively harmless, so is left in the code for now.
+ * - Currently (as of September 2009), overrides we haven't needed to (fully) implement overrides.
+ * However, the code for this is relatively harmless, so is left in the code for now.
*/
/* Evaluation loop for evaluation animation data
@@ -2738,15 +2738,15 @@ void BKE_animsys_evaluate_animdata(Scene *scene, ID *id, AnimData *adt, float ct
RNA_id_pointer_create(id, &id_ptr);
/* recalculate keyframe data:
- * - NLA before Active Action, as Active Action behaves as 'tweaking track'
- * that overrides 'rough' work in NLA
+ * - NLA before Active Action, as Active Action behaves as 'tweaking track'
+ * that overrides 'rough' work in NLA
*/
/* TODO: need to double check that this all works correctly */
if ((recalc & ADT_RECALC_ANIM) || (adt->recalc & ADT_RECALC_ANIM)) {
/* evaluate NLA data */
if ((adt->nla_tracks.first) && !(adt->flag & ADT_NLA_EVAL_OFF)) {
/* evaluate NLA-stack
- * - active action is evaluated as part of the NLA stack as the last item
+ * - active action is evaluated as part of the NLA stack as the last item
*/
animsys_calculate_nla(&id_ptr, adt, ctime);
}
@@ -2759,9 +2759,9 @@ void BKE_animsys_evaluate_animdata(Scene *scene, ID *id, AnimData *adt, float ct
}
/* recalculate drivers
- * - Drivers need to be evaluated afterwards, as they can either override
- * or be layered on top of existing animation data.
- * - Drivers should be in the appropriate order to be evaluated without problems...
+ * - Drivers need to be evaluated afterwards, as they can either override
+ * or be layered on top of existing animation data.
+ * - Drivers should be in the appropriate order to be evaluated without problems...
*/
if ((recalc & ADT_RECALC_DRIVERS)
/* XXX for now, don't check yet, as depsgraph hasn't been updated */
@@ -2771,10 +2771,10 @@ void BKE_animsys_evaluate_animdata(Scene *scene, ID *id, AnimData *adt, float ct
}
/* always execute 'overrides'
- * - Overrides allow editing, by overwriting the value(s) set from animation-data, with the
- * value last set by the user (and not keyframed yet).
- * - Overrides are cleared upon frame change and/or keyframing
- * - It is best that we execute this every time, so that no errors are likely to occur.
+ * - Overrides allow editing, by overwriting the value(s) set from animation-data, with the
+ * value last set by the user (and not keyframed yet).
+ * - Overrides are cleared upon frame change and/or keyframing
+ * - It is best that we execute this every time, so that no errors are likely to occur.
*/
animsys_evaluate_overrides(&id_ptr, adt);
@@ -2804,9 +2804,9 @@ void BKE_animsys_evaluate_all_animation(Main *main, Scene *scene, float ctime)
printf("Evaluate all animation - %f\n", ctime);
/* macros for less typing
- * - only evaluate animation data for id if it has users (and not just fake ones)
- * - whether animdata exists is checked for by the evaluation function, though taking
- * this outside of the function may make things slightly faster?
+ * - only evaluate animation data for id if it has users (and not just fake ones)
+ * - whether animdata exists is checked for by the evaluation function, though taking
+ * this outside of the function may make things slightly faster?
*/
#define EVAL_ANIM_IDS(first, aflag) \
for (id = first; id; id = id->next) { \
@@ -2817,10 +2817,10 @@ void BKE_animsys_evaluate_all_animation(Main *main, Scene *scene, float ctime)
} (void)0
/* another macro for the "embedded" nodetree cases
- * - this is like EVAL_ANIM_IDS, but this handles the case "embedded nodetrees"
- * (i.e. scene/material/texture->nodetree) which we need a special exception
- * for, otherwise they'd get skipped
- * - ntp = "node tree parent" = datablock where node tree stuff resides
+ * - this is like EVAL_ANIM_IDS, but this handles the case "embedded nodetrees"
+ * (i.e. scene/material/texture->nodetree) which we need a special exception
+ * for, otherwise they'd get skipped
+ * - ntp = "node tree parent" = datablock where node tree stuff resides
*/
#define EVAL_ANIM_NODETREE_IDS(first, NtId_Type, aflag) \
for (id = first; id; id = id->next) { \
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index b7a811b7574..4ad9e9c8205 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -295,12 +295,12 @@ int bone_autoside_name(char name[MAXBONENAME], int UNUSED(strip_number), short a
BLI_strncpy(basename, name, sizeof(basename));
/* Figure out extension to append:
- * - The extension to append is based upon the axis that we are working on.
- * - If head happens to be on 0, then we must consider the tail position as well to decide
- * which side the bone is on
- * -> If tail is 0, then it's bone is considered to be on axis, so no extension should be added
- * -> Otherwise, extension is added from perspective of object based on which side tail goes to
- * - If head is non-zero, extension is added from perspective of object based on side head is on
+ * - The extension to append is based upon the axis that we are working on.
+ * - If head happens to be on 0, then we must consider the tail position as well to decide
+ * which side the bone is on
+ * -> If tail is 0, then it's bone is considered to be on axis, so no extension should be added
+ * -> Otherwise, extension is added from perspective of object based on which side tail goes to
+ * - If head is non-zero, extension is added from perspective of object based on side head is on
*/
if (axis == 2) {
/* z-axis - vertical (top/bottom) */
@@ -350,8 +350,8 @@ int bone_autoside_name(char name[MAXBONENAME], int UNUSED(strip_number), short a
}
/* Simple name truncation
- * - truncate if there is an extension and it wouldn't be able to fit
- * - otherwise, just append to end
+ * - truncate if there is an extension and it wouldn't be able to fit
+ * - otherwise, just append to end
*/
if (extension[0]) {
bool changed = true;
@@ -1068,7 +1068,7 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, float
GHash *idx_hash = BLI_ghash_ptr_new("pose channel index by name");
int pchan_index = 0;
for (pchan = armOb->pose->chanbase.first; pchan != NULL; pchan = pchan->next, ++pchan_index) {
- BLI_ghash_insert(idx_hash, pchan, SET_INT_IN_POINTER(pchan_index));
+ BLI_ghash_insert(idx_hash, pchan, POINTER_FROM_INT(pchan_index));
}
for (i = 0, dg = target->defbase.first; dg; i++, dg = dg->next) {
defnrToPC[i] = BKE_pose_channel_find_name(armOb->pose, dg->name);
@@ -1078,7 +1078,7 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, float
defnrToPC[i] = NULL;
}
else {
- defnrToPCIndex[i] = GET_INT_FROM_POINTER(BLI_ghash_lookup(idx_hash, defnrToPC[i]));
+ defnrToPCIndex[i] = POINTER_AS_INT(BLI_ghash_lookup(idx_hash, defnrToPC[i]));
}
}
}
@@ -2314,8 +2314,8 @@ void BKE_pose_where_is(Scene *scene, Object *ob)
BIK_initialize_tree(scene, ob, ctime);
/* 2b. construct the Spline IK trees
- * - this is not integrated as an IK plugin, since it should be able
- * to function in conjunction with standard IK
+ * - this is not integrated as an IK plugin, since it should be able
+ * to function in conjunction with standard IK
*/
BKE_pose_splineik_init_tree(scene, ob, ctime);
diff --git a/source/blender/blenkernel/intern/armature_update.c b/source/blender/blenkernel/intern/armature_update.c
index cb4237f51b4..241a842d73f 100644
--- a/source/blender/blenkernel/intern/armature_update.c
+++ b/source/blender/blenkernel/intern/armature_update.c
@@ -160,7 +160,7 @@ static void splineik_init_tree_from_pchan(Scene *scene, Object *UNUSED(ob), bPos
*/
for (i = 0; i < segcount; i++) {
/* 'head' joints, traveling towards the root of the chain
- * - 2 methods; the one chosen depends on whether we've got usable lengths
+ * - 2 methods; the one chosen depends on whether we've got usable lengths
*/
if ((ikData->flag & CONSTRAINT_SPLINEIK_EVENSPLITS) || (totLength == 0.0f)) {
/* 1) equi-spaced joints */
@@ -363,7 +363,7 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o
rangle *= tree->con->enforce;
/* construct rotation matrix from the axis-angle rotation found above
- * - this call takes care to make sure that the axis provided is a unit vector first
+ * - this call takes care to make sure that the axis provided is a unit vector first
*/
axis_angle_to_mat3(dmat, raxis, rangle);
@@ -486,8 +486,8 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o
}
else if (tree->con->enforce < 1.0f) {
/* when the influence is too low
- * - blend the positions for the 'root' bone
- * - stick to the parent for any other
+ * - blend the positions for the 'root' bone
+ * - stick to the parent for any other
*/
if (pchan->parent) {
copy_v3_v3(poseHead, pchan->pose_head);
@@ -604,8 +604,8 @@ void BKE_pose_eval_init_ik(EvaluationContext *UNUSED(eval_ctx),
/* construct the IK tree (standard IK) */
BIK_initialize_tree(scene, ob, ctime);
/* construct the Spline IK trees
- * - this is not integrated as an IK plugin, since it should be able
- * to function in conjunction with standard IK
+ * - this is not integrated as an IK plugin, since it should be able
+ * to function in conjunction with standard IK
*/
BKE_pose_splineik_init_tree(scene, ob, ctime);
}
diff --git a/source/blender/blenkernel/intern/blender_undo.c b/source/blender/blenkernel/intern/blender_undo.c
index df2caba0208..441687c1c01 100644
--- a/source/blender/blenkernel/intern/blender_undo.c
+++ b/source/blender/blenkernel/intern/blender_undo.c
@@ -55,6 +55,7 @@
#include "BKE_main.h"
#include "BLO_undofile.h"
+#include "BLO_readfile.h"
#include "BLO_writefile.h"
/* -------------------------------------------------------------------- */
@@ -79,7 +80,10 @@ bool BKE_memfile_undo_decode(MemFileUndoData *mfu, bContext *C)
success = (BKE_blendfile_read(C, mfu->filename, NULL, 0) != BKE_BLENDFILE_READ_FAIL);
}
else {
- success = BKE_blendfile_read_from_memfile(C, &mfu->memfile, NULL, 0);
+ success = BKE_blendfile_read_from_memfile(
+ C, &mfu->memfile,
+ &(const struct BlendFileReadParams){0},
+ NULL);
}
/* Restore, bmain has been re-allocated. */
diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c
index aa5530704c6..c6cb8a412fe 100644
--- a/source/blender/blenkernel/intern/blendfile.c
+++ b/source/blender/blenkernel/intern/blendfile.c
@@ -111,11 +111,12 @@ static bool wm_scene_is_visible(wmWindowManager *wm, Scene *scene)
*/
static void setup_app_data(
bContext *C, BlendFileData *bfd,
- const char *filepath, ReportList *reports)
+ const char *filepath,
+ const bool is_startup,
+ ReportList *reports)
{
Main *bmain = G_MAIN;
Scene *curscene = NULL;
- const bool is_startup = (bfd->filename[0] == '\0');
const bool recover = (G.fileflags & G_FILE_RECOVER) != 0;
enum {
LOAD_UI = 1,
@@ -296,7 +297,7 @@ static void setup_app_data(
bmain->recovered = 0;
/* startup.blend or recovered startup */
- if (bfd->filename[0] == 0) {
+ if (is_startup) {
bmain->name[0] = '\0';
}
else if (recover && G.relbase_valid) {
@@ -351,7 +352,8 @@ static int handle_subversion_warning(Main *main, ReportList *reports)
int BKE_blendfile_read(
bContext *C, const char *filepath,
- ReportList *reports, int skip_flags)
+ const struct BlendFileReadParams *params,
+ ReportList *reports)
{
BlendFileData *bfd;
int retval = BKE_BLENDFILE_READ_OK;
@@ -361,7 +363,7 @@ int BKE_blendfile_read(
printf("Read blend: %s\n", filepath);
}
- bfd = BLO_read_from_file(filepath, reports, skip_flags);
+ bfd = BLO_read_from_file(filepath, params->skip_flags, reports);
if (bfd) {
if (bfd->user) {
retval = BKE_BLENDFILE_READ_OK_USERPREFS;
@@ -374,7 +376,7 @@ int BKE_blendfile_read(
retval = BKE_BLENDFILE_READ_FAIL;
}
else {
- setup_app_data(C, bfd, filepath, reports);
+ setup_app_data(C, bfd, filepath, params->is_startup, reports);
}
}
else
@@ -384,16 +386,17 @@ int BKE_blendfile_read(
}
bool BKE_blendfile_read_from_memory(
- bContext *C, const void *filebuf, int filelength,
- ReportList *reports, int skip_flags, bool update_defaults)
+ bContext *C, const void *filebuf, int filelength, bool update_defaults,
+ const struct BlendFileReadParams *params,
+ ReportList *reports)
{
BlendFileData *bfd;
- bfd = BLO_read_from_memory(filebuf, filelength, reports, skip_flags);
+ bfd = BLO_read_from_memory(filebuf, filelength, params->skip_flags, reports);
if (bfd) {
if (update_defaults)
BLO_update_defaults_startup_blend(bfd->main);
- setup_app_data(C, bfd, "<memory2>", reports);
+ setup_app_data(C, bfd, "<memory2>", params->is_startup, reports);
}
else {
BKE_reports_prepend(reports, "Loading failed: ");
@@ -405,12 +408,13 @@ bool BKE_blendfile_read_from_memory(
/* memfile is the undo buffer */
bool BKE_blendfile_read_from_memfile(
bContext *C, struct MemFile *memfile,
- ReportList *reports, int skip_flags)
+ const struct BlendFileReadParams *params,
+ ReportList *reports)
{
Main *bmain = CTX_data_main(C);
BlendFileData *bfd;
- bfd = BLO_read_from_memfile(bmain, BKE_main_blendfile_path(bmain), memfile, reports, skip_flags);
+ bfd = BLO_read_from_memfile(bmain, BKE_main_blendfile_path(bmain), memfile, params->skip_flags, reports);
if (bfd) {
/* remove the unused screens and wm */
while (bfd->main->wm.first)
@@ -418,7 +422,7 @@ bool BKE_blendfile_read_from_memfile(
while (bfd->main->screen.first)
BKE_libblock_free(bfd->main, bfd->main->screen.first);
- setup_app_data(C, bfd, "<memory1>", reports);
+ setup_app_data(C, bfd, "<memory1>", params->is_startup, reports);
}
else {
BKE_reports_prepend(reports, "Loading failed: ");
@@ -459,7 +463,7 @@ UserDef *BKE_blendfile_userdef_read(const char *filepath, ReportList *reports)
BlendFileData *bfd;
UserDef *userdef = NULL;
- bfd = BLO_read_from_file(filepath, reports, BLO_READ_SKIP_ALL & ~BLO_READ_SKIP_USERDEF);
+ bfd = BLO_read_from_file(filepath, BLO_READ_SKIP_ALL & ~BLO_READ_SKIP_USERDEF, reports);
if (bfd) {
if (bfd->user) {
userdef = bfd->user;
@@ -479,7 +483,10 @@ UserDef *BKE_blendfile_userdef_read_from_memory(
BlendFileData *bfd;
UserDef *userdef = NULL;
- bfd = BLO_read_from_memory(filebuf, filelength, reports, BLO_READ_SKIP_ALL & ~BLO_READ_SKIP_USERDEF);
+ bfd = BLO_read_from_memory(
+ filebuf, filelength,
+ BLO_READ_SKIP_ALL & ~BLO_READ_SKIP_USERDEF,
+ reports);
if (bfd) {
if (bfd->user) {
userdef = bfd->user;
@@ -590,10 +597,6 @@ bool BKE_blendfile_write_partial(
* (otherwise main->name will not be set at read time). */
BLI_strncpy(bmain_dst->name, bmain_src->name, sizeof(bmain_dst->name));
- if (write_flags & G_FILE_RELATIVE_REMAP) {
- path_list_backup = BKE_bpath_list_backup(bmain_src, path_list_flag);
- }
-
BLO_main_expander(blendfile_write_partial_cb);
BLO_expand_main(NULL, bmain_src);
@@ -613,10 +616,27 @@ bool BKE_blendfile_write_partial(
}
}
+ /* Backup paths because remap relative will overwrite them.
+ *
+ * NOTE: we do this only on the list of datablocks that we are writing
+ * because the restored full list is not guaranteed to be in the same
+ * order as before, as expected by BKE_bpath_list_restore.
+ *
+ * This happens because id_sort_by_name does not take into account
+ * string case or the library name, so the order is not strictly
+ * defined for two linked datablocks with the same name! */
+ if (write_flags & G_FILE_RELATIVE_REMAP) {
+ path_list_backup = BKE_bpath_list_backup(bmain_dst, path_list_flag);
+ }
/* save the buffer */
retval = BLO_write_file(bmain_dst, filepath, write_flags, reports, NULL);
+ if (path_list_backup) {
+ BKE_bpath_list_restore(bmain_dst, path_list_flag, path_list_backup);
+ BKE_bpath_list_free(path_list_backup);
+ }
+
/* move back the main, now sorted again */
set_listbasepointers(bmain_src, lbarray_dst);
a = set_listbasepointers(bmain_dst, lbarray_src);
@@ -632,11 +652,6 @@ bool BKE_blendfile_write_partial(
MEM_freeN(bmain_dst);
- if (path_list_backup) {
- BKE_bpath_list_restore(bmain_src, path_list_flag, path_list_backup);
- BKE_bpath_list_free(path_list_backup);
- }
-
return retval;
}
diff --git a/source/blender/blenkernel/intern/bmfont.c b/source/blender/blenkernel/intern/bmfont.c
index c99894bfbaf..b33b07e3a4f 100644
--- a/source/blender/blenkernel/intern/bmfont.c
+++ b/source/blender/blenkernel/intern/bmfont.c
@@ -85,7 +85,7 @@ void readBitmapFontVersion0(ImBuf *ibuf, unsigned char *rect, int step)
{
int glyphcount, bytes, i, index, linelength, ysize;
unsigned char *buffer;
- bmFont * bmfont;
+ bmFont *bmfont;
linelength = ibuf->x * step;
diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c
index 18b2a5b2fcc..810056f8fc7 100644
--- a/source/blender/blenkernel/intern/boids.c
+++ b/source/blender/blenkernel/intern/boids.c
@@ -1282,8 +1282,8 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
/* integrate new location & velocity */
- /* by regarding the acceleration as a force at this stage we*/
- /* can get better control allthough it's a bit unphysical */
+ /* by regarding the acceleration as a force at this stage we
+ * can get better control although it's a bit unphysical */
mul_v3_fl(acc, 1.0f/pa_mass);
copy_v3_v3(dvec, acc);
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 42cd7968321..5b76d75f261 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -461,7 +461,7 @@ void BKE_brush_curve_preset(Brush *b, eCurveMappingPreset preset)
* region space mouse coordinates, or 3d world coordinates for 3D mapping.
*
* rgba outputs straight alpha. */
-float BKE_brush_sample_tex_3D(const Scene *scene, const Brush *br,
+float BKE_brush_sample_tex_3d(const Scene *scene, const Brush *br,
const float point[3],
float rgba[4], const int thread,
struct ImagePool *pool)
@@ -954,7 +954,7 @@ unsigned int *BKE_brush_gen_texture_cache(Brush *br, int half_side, bool use_sec
texcache = MEM_callocN(sizeof(int) * side * side, "Brush texture cache");
- /* do normalized cannonical view coords for texture */
+ /* do normalized canonical view coords for texture */
for (y = -1.0, iy = 0; iy < side; iy++, y += step) {
for (x = -1.0, ix = 0; ix < side; ix++, x += step) {
co[0] = x;
@@ -962,7 +962,7 @@ unsigned int *BKE_brush_gen_texture_cache(Brush *br, int half_side, bool use_sec
co[2] = 0.0f;
/* This is copied from displace modifier code */
- /* TODO(sergey): brush are always cacheing with CM enabled for now. */
+ /* TODO(sergey): brush are always caching with CM enabled for now. */
externtex(mtex, co, &intensity,
rgba, rgba + 1, rgba + 2, rgba + 3, 0, NULL, false, false);
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 1c5b1ca242c..ed2b8cddc14 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -2735,7 +2735,7 @@ void CDDM_calc_loop_normals_spacearr(
r_lnors_spacearr->lspacearr[i]->ref_beta, r_lnors_spacearr->lspacearr[i]->loops);
printf("\t\t(shared with loops");
while (loops) {
- printf(" %d", GET_INT_FROM_POINTER(loops->link));
+ printf(" %d", POINTER_AS_INT(loops->link));
loops = loops->next;
}
printf(")\n");
@@ -3067,13 +3067,13 @@ DerivedMesh *CDDM_merge_verts(DerivedMesh *dm, const int *vtargetmap, const int
void **val_p;
if (BLI_edgehash_ensure_p(ehash, v1, v2, &val_p)) {
- newe[i] = GET_INT_FROM_POINTER(*val_p);
+ newe[i] = POINTER_AS_INT(*val_p);
}
else {
STACK_PUSH(olde, i);
STACK_PUSH(medge, *med);
newe[i] = c;
- *val_p = SET_INT_IN_POINTER(c);
+ *val_p = POINTER_FROM_INT(c);
c++;
}
}
@@ -3235,7 +3235,7 @@ DerivedMesh *CDDM_merge_verts(DerivedMesh *dm, const int *vtargetmap, const int
uint v2 = mlv;
BLI_assert(v1 != v2);
if (BLI_edgehash_ensure_p(ehash, v1, v2, &val_p)) {
- last_valid_ml->e = GET_INT_FROM_POINTER(*val_p);
+ last_valid_ml->e = POINTER_AS_INT(*val_p);
}
else {
const int new_eidx = STACK_SIZE(medge);
@@ -3244,7 +3244,7 @@ DerivedMesh *CDDM_merge_verts(DerivedMesh *dm, const int *vtargetmap, const int
medge[new_eidx].v1 = last_valid_ml->v;
medge[new_eidx].v2 = ml->v;
/* DO NOT change newe mapping, could break actual values due to some deleted original edges. */
- *val_p = SET_INT_IN_POINTER(new_eidx);
+ *val_p = POINTER_FROM_INT(new_eidx);
created_edges++;
last_valid_ml->e = new_eidx;
@@ -3287,7 +3287,7 @@ DerivedMesh *CDDM_merge_verts(DerivedMesh *dm, const int *vtargetmap, const int
uint v2 = (vtargetmap[first_valid_ml->v] != -1) ? vtargetmap[first_valid_ml->v] : first_valid_ml->v;
BLI_assert(v1 != v2);
if (BLI_edgehash_ensure_p(ehash, v1, v2, &val_p)) {
- last_valid_ml->e = GET_INT_FROM_POINTER(*val_p);
+ last_valid_ml->e = POINTER_AS_INT(*val_p);
}
else {
const int new_eidx = STACK_SIZE(medge);
@@ -3296,7 +3296,7 @@ DerivedMesh *CDDM_merge_verts(DerivedMesh *dm, const int *vtargetmap, const int
medge[new_eidx].v1 = last_valid_ml->v;
medge[new_eidx].v2 = first_valid_ml->v;
/* DO NOT change newe mapping, could break actual values due to some deleted original edges. */
- *val_p = SET_INT_IN_POINTER(new_eidx);
+ *val_p = POINTER_FROM_INT(new_eidx);
created_edges++;
last_valid_ml->e = new_eidx;
@@ -3491,7 +3491,7 @@ void CDDM_calc_edges(DerivedMesh *dm)
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));
+ BLI_edgehash_insert(eh, med->v1, med->v2, POINTER_FROM_INT(i + 1));
}
}
@@ -3520,7 +3520,7 @@ void CDDM_calc_edges(DerivedMesh *dm)
BLI_edgehashIterator_step(ehi), ++i, ++med, ++index)
{
BLI_edgehashIterator_getKey(ehi, &med->v1, &med->v2);
- j = GET_INT_FROM_POINTER(BLI_edgehashIterator_getValue(ehi));
+ j = POINTER_AS_INT(BLI_edgehashIterator_getValue(ehi));
if (j == 0 || !eindex) {
med->flag = ME_EDGEDRAW | ME_EDGERENDER;
@@ -3531,7 +3531,7 @@ void CDDM_calc_edges(DerivedMesh *dm)
*index = eindex[j - 1];
}
- BLI_edgehashIterator_setValue(ehi, SET_INT_IN_POINTER(i));
+ BLI_edgehashIterator_setValue(ehi, POINTER_FROM_INT(i));
}
BLI_edgehashIterator_free(ehi);
@@ -3548,7 +3548,7 @@ void CDDM_calc_edges(DerivedMesh *dm)
for (j = 0; j < mp->totloop; j++, ml++) {
v1 = ml->v;
v2 = ME_POLY_LOOP_NEXT(cddm->mloop, mp, j)->v;
- ml->e = GET_INT_FROM_POINTER(BLI_edgehash_lookup(eh, v1, v2));
+ ml->e = POINTER_AS_INT(BLI_edgehash_lookup(eh, v1, v2));
}
}
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index 4597eb9b114..88d4766048f 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -1439,13 +1439,13 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
}
}
else {
- /* bending springs for hair strands */
- /* The current algorightm only goes through the edges in order of the mesh edges list */
- /* and makes springs between the outer vert of edges sharing a vertice. This works just */
- /* fine for hair, but not for user generated string meshes. This could/should be later */
- /* extended to work with non-ordered edges so that it can be used for general "rope */
- /* dynamics" without the need for the vertices or edges to be ordered through the length*/
- /* of the strands. -jahka */
+ /* bending springs for hair strands
+ * The current algorithm only goes through the edges in order of the mesh edges list
+ * and makes springs between the outer vert of edges sharing a vertice. This works just
+ * fine for hair, but not for user generated string meshes. This could/should be later
+ * extended to work with non-ordered edges so that it can be used for general "rope
+ * dynamics" without the need for the vertices or edges to be ordered through the length
+ * of the strands. -jahka */
search = cloth->springs;
search2 = search->next;
while (search && search2) {
diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c
index 1df749ee842..84490ba3ee2 100644
--- a/source/blender/blenkernel/intern/collision.c
+++ b/source/blender/blenkernel/intern/collision.c
@@ -1062,9 +1062,11 @@ BLI_INLINE bool cloth_point_face_collision_params(const float p1[3], const float
*r_lambda = f * dot_v3v3(edge2, q);
/* don't care about 0..1 lambda range here */
- /*if ((*r_lambda < 0.0f) || (*r_lambda > 1.0f))
- * return 0;
- */
+#if 0
+ if ((*r_lambda < 0.0f) || (*r_lambda > 1.0f)) {
+ return 0;
+ }
+#endif
r_w[0] = 1.0f - u - v;
r_w[1] = u;
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 7d861658993..66147c44352 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -452,10 +452,10 @@ static void contarget_get_mesh_mat(Object *ob, const char *substring, float mat[
/* derive the rotation from the average normal:
- * - code taken from transform_manipulator.c,
- * calc_manipulator_stats, V3D_MANIP_NORMAL case
+ * - code taken from transform_manipulator.c,
+ * calc_manipulator_stats, V3D_MANIP_NORMAL case
*/
- /* we need the transpose of the inverse for a normal... */
+ /* we need the transpose of the inverse for a normal... */
copy_m3_m4(imat, ob->obmat);
invert_m3_m3(tmat, imat);
@@ -543,7 +543,7 @@ static void contarget_get_lattice_mat(Object *ob, const char *substring, float m
/* The cases where the target can be object data have not been implemented */
static void constraint_target_to_mat4(Object *ob, const char *substring, float mat[4][4], short from, short to, short flag, float headtail)
{
- /* Case OBJECT */
+ /* Case OBJECT */
if (substring[0] == '\0') {
copy_m4_m4(mat, ob->obmat);
BKE_constraint_mat_convertspace(ob, NULL, mat, from, to, false);
@@ -555,7 +555,7 @@ static void constraint_target_to_mat4(Object *ob, const char *substring, float m
* 'average' vertex normal, and deriving the rotation from that.
*
* NOTE: EditMode is not currently supported, and will most likely remain that
- * way as constraints can only really affect things on object/bone level.
+ * way as constraints can only really affect things on object/bone level.
*/
else if (ob->type == OB_MESH) {
contarget_get_mesh_mat(ob, substring, mat);
@@ -565,7 +565,7 @@ static void constraint_target_to_mat4(Object *ob, const char *substring, float m
contarget_get_lattice_mat(ob, substring, mat);
BKE_constraint_mat_convertspace(ob, NULL, mat, from, to, false);
}
- /* Case BONE */
+ /* Case BONE */
else {
bPoseChannel *pchan;
@@ -659,15 +659,15 @@ static void constraint_target_to_mat4(Object *ob, const char *substring, float m
*/
/* Template for type-info data:
- * - make a copy of this when creating new constraints, and just change the functions
- * pointed to as necessary
- * - although the naming of functions doesn't matter, it would help for code
- * readability, to follow the same naming convention as is presented here
- * - any functions that a constraint doesn't need to define, don't define
- * for such cases, just use NULL
- * - these should be defined after all the functions have been defined, so that
- * forward-definitions/prototypes don't need to be used!
- * - keep this copy #if-def'd so that future constraints can get based off this
+ * - make a copy of this when creating new constraints, and just change the functions
+ * pointed to as necessary
+ * - although the naming of functions doesn't matter, it would help for code
+ * readability, to follow the same naming convention as is presented here
+ * - any functions that a constraint doesn't need to define, don't define
+ * for such cases, just use NULL
+ * - these should be defined after all the functions have been defined, so that
+ * forward-definitions/prototypes don't need to be used!
+ * - keep this copy #if-def'd so that future constraints can get based off this
*/
#if 0
static bConstraintTypeInfo CTI_CONSTRNAME = {
@@ -1257,7 +1257,7 @@ static void followpath_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra
unit_m4(ct->matrix);
/* 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)
+ * currently for paths to work it needs to go through the bevlist/displist system (ton)
*/
#ifdef CYCLIC_DEPENDENCY_WORKAROUND
@@ -2163,9 +2163,9 @@ static void actcon_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstraintT
/* determine where in transform range target is */
/* data->type is mapped as follows for backwards compatibility:
- * 00,01,02 - rotation (it used to be like this)
- * 10,11,12 - scaling
- * 20,21,22 - location
+ * 00,01,02 - rotation (it used to be like this)
+ * 10,11,12 - scaling
+ * 20,21,22 - location
*/
if (data->type < 10) {
/* extract rotation (is in whatever space target should be in) */
@@ -2209,7 +2209,7 @@ static void actcon_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstraintT
bPoseChannel *pchan, *tchan;
/* make a copy of the bone of interest in the temp pose before evaluating action, so that it can get set
- * - we need to manually copy over a few settings, including rotation order, otherwise this fails
+ * - we need to manually copy over a few settings, including rotation order, otherwise this fails
*/
pchan = cob->pchan;
@@ -2551,7 +2551,7 @@ static void locktrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
unit_m3(totmat);
}
- /* apply out transformaton to the object */
+ /* apply out transformation to the object */
mul_m4_m3m4(cob->matrix, totmat, cob->matrix);
}
}
@@ -2764,12 +2764,14 @@ static void stretchto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
normalize_v3_v3(zz, cob->matrix[2]);
/* XXX That makes the constraint buggy with asymmetrically scaled objects, see #29940. */
-/* sub_v3_v3v3(vec, cob->matrix[3], ct->matrix[3]);*/
-/* vec[0] /= size[0];*/
-/* vec[1] /= size[1];*/
-/* vec[2] /= size[2];*/
+#if 0
+ sub_v3_v3v3(vec, cob->matrix[3], ct->matrix[3]);
+ vec[0] /= size[0];
+ vec[1] /= size[1];
+ vec[2] /= size[2];
-/* dist = normalize_v3(vec);*/
+ dist = normalize_v3(vec);
+#endif
dist = len_v3v3(cob->matrix[3], ct->matrix[3]);
/* Only Y constrained object axis scale should be used, to keep same length when scaling it. */
@@ -3678,9 +3680,9 @@ static void damptrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
float rmat[3][3], tmat[4][4];
/* find the (unit) direction that the axis we're interested in currently points
- * - mul_mat3_m4_v3() only takes the 3x3 (rotation+scaling) components of the 4x4 matrix
- * - the normalization step at the end should take care of any unwanted scaling
- * left over in the 3x3 matrix we used
+ * - mul_mat3_m4_v3() only takes the 3x3 (rotation+scaling) components of the 4x4 matrix
+ * - the normalization step at the end should take care of any unwanted scaling
+ * left over in the 3x3 matrix we used
*/
copy_v3_v3(obvec, track_dir_vecs[data->trackflag]);
mul_mat3_m4_v3(cob->matrix, obvec);
@@ -3703,11 +3705,11 @@ static void damptrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
/* determine the axis-angle rotation, which represents the smallest possible rotation
* between the two rotation vectors (i.e. the 'damping' referred to in the name)
- * - we take this to be the rotation around the normal axis/vector to the plane defined
- * by the current and destination vectors, which will 'map' the current axis to the
- * destination vector
- * - the min/max wrappers around (obvec . tarvec) result (stored temporarily in rangle)
- * are used to ensure that the smallest angle is chosen
+ * - we take this to be the rotation around the normal axis/vector to the plane defined
+ * by the current and destination vectors, which will 'map' the current axis to the
+ * destination vector
+ * - the min/max wrappers around (obvec . tarvec) result (stored temporarily in rangle)
+ * are used to ensure that the smallest angle is chosen
*/
cross_v3_v3v3_hi_prec(raxis, obvec, tarvec);
@@ -3715,15 +3717,15 @@ static void damptrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
rangle = acosf(max_ff(-1.0f, min_ff(1.0f, rangle)));
/* construct rotation matrix from the axis-angle rotation found above
- * - this call takes care to make sure that the axis provided is a unit vector first
+ * - this call takes care to make sure that the axis provided is a unit vector first
*/
float norm = normalize_v3(raxis);
if (norm < FLT_EPSILON) {
/* if dot product is nonzero, while cross is zero, we have two opposite vectors!
- * - this is an ambiguity in the math that needs to be resolved arbitrarily,
- * or there will be a case where damped track strangely does nothing
- * - to do that, rotate around a different local axis
+ * - this is an ambiguity in the math that needs to be resolved arbitrarily,
+ * or there will be a case where damped track strangely does nothing
+ * - to do that, rotate around a different local axis
*/
float tmpvec[3];
@@ -4970,13 +4972,13 @@ void BKE_constraint_targets_for_solving_get(bConstraint *con, bConstraintOb *cob
bConstraintTarget *ct;
/* get targets
- * - constraints should use ct->matrix, not directly accessing values
- * - ct->matrix members have not yet been calculated here!
+ * - constraints should use ct->matrix, not directly accessing values
+ * - ct->matrix members have not yet been calculated here!
*/
cti->get_constraint_targets(con, targets);
/* set matrices
- * - calculate if possible, otherwise just initialize as identity matrix
+ * - calculate if possible, otherwise just initialize as identity matrix
*/
if (cti->get_target_matrix) {
for (ct = targets->first; ct; ct = ct->next)
@@ -5021,7 +5023,7 @@ void BKE_constraints_solve(ListBase *conlist, bConstraintOb *cob, float ctime)
if (con->enforce == 0.0f) continue;
/* influence of constraint
- * - value should have been set from animation data already
+ * - value should have been set from animation data already
*/
enf = con->enforce;
@@ -5038,8 +5040,8 @@ void BKE_constraints_solve(ListBase *conlist, bConstraintOb *cob, float ctime)
cti->evaluate_constraint(con, cob, &targets);
/* clear targets after use
- * - this should free temp targets but no data should be copied back
- * as constraints may have done some nasty things to it...
+ * - this should free temp targets but no data should be copied back
+ * as constraints may have done some nasty things to it...
*/
if (cti->flush_constraint_targets) {
cti->flush_constraint_targets(con, &targets, 1);
@@ -5050,9 +5052,9 @@ void BKE_constraints_solve(ListBase *conlist, bConstraintOb *cob, float ctime)
BKE_constraint_mat_convertspace(cob->ob, cob->pchan, cob->matrix, con->ownspace, CONSTRAINT_SPACE_WORLD, false);
/* Interpolate the enforcement, to blend result of constraint into final owner transform
- * - all this happens in worldspace to prevent any weirdness creeping in ([#26014] and [#25725]),
- * since some constraints may not convert the solution back to the input space before blending
- * but all are guaranteed to end up in good "worldspace" result
+ * - all this happens in worldspace to prevent any weirdness creeping in ([#26014] and [#25725]),
+ * since some constraints may not convert the solution back to the input space before blending
+ * but all are guaranteed to end up in good "worldspace" result
*/
/* Note: all kind of stuff here before (caused trouble), much easier to just interpolate,
* or did I miss something? -jahka (r.32105) */
diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c
index 517d2ebe10e..c9468c7d95c 100644
--- a/source/blender/blenkernel/intern/context.c
+++ b/source/blender/blenkernel/intern/context.c
@@ -206,7 +206,7 @@ void CTX_store_free_list(ListBase *contexts)
}
}
-/* is python initialied? */
+/* is python initialized? */
int CTX_py_init_get(bContext *C)
{
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 792ba08358e..b395df49061 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -275,7 +275,7 @@ void BKE_curve_curve_dimension_update(Curve *cu)
else {
for (; nu; nu = nu->next) {
nu->flag |= CU_2D;
- BKE_nurb_test2D(nu);
+ BKE_nurb_test_2d(nu);
/* since the handles are moved they need to be auto-located again */
if (nu->type == CU_BEZIER)
@@ -547,7 +547,7 @@ void BKE_nurbList_duplicate(ListBase *lb1, const ListBase *lb2)
}
}
-void BKE_nurb_test2D(Nurb *nu)
+void BKE_nurb_test_2d(Nurb *nu)
{
BezTriple *bezt;
BPoint *bp;
@@ -2077,7 +2077,7 @@ static bool bevelinside(BevList *bl1, BevList *bl2)
copy_v3_v3(hvec2, hvec1);
hvec2[0] += 1000;
- /* test it with all edges of potential surounding poly */
+ /* test it with all edges of potential surrounding poly */
/* count number of transitions left-right */
bevp = bl1->bevpoints;
@@ -2640,7 +2640,7 @@ static void make_bevel_list_segment_2D(BevList *bl)
static void make_bevel_list_2D(BevList *bl)
{
/* note: bevp->dir and bevp->quat are not needed for beveling but are
- * used when making a path from a 2D curve, therefor they need to be set - Campbell */
+ * used when making a path from a 2D curve, therefore they need to be set - Campbell */
BevPoint *bevp0, *bevp1, *bevp2;
int nr;
@@ -3938,7 +3938,7 @@ static void bezier_handle_calc_smooth_fcurve(BezTriple *bezt, int total, int sta
float first_handle_adj = 0.0f, last_handle_adj = 0.0f;
if (full_cycle) {
- /* reduce the number of uknowns by one */
+ /* reduce the number of unknowns by one */
int i = solve_count = count - 1;
dx[0] = dx[i];
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 28280c45922..8fa117dfce1 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -2890,7 +2890,7 @@ void CustomData_bmesh_copy_data(const CustomData *source, CustomData *dest,
}
}
-/*Bmesh Custom Data Functions. Should replace editmesh ones with these as well, due to more effecient memory alloc*/
+/*Bmesh Custom Data Functions. Should replace editmesh ones with these as well, due to more efficient memory alloc*/
void *CustomData_bmesh_get(const CustomData *data, void *block, int type)
{
int layer_index;
diff --git a/source/blender/blenkernel/intern/data_transfer.c b/source/blender/blenkernel/intern/data_transfer.c
index 38340575e74..7407fc2051f 100644
--- a/source/blender/blenkernel/intern/data_transfer.c
+++ b/source/blender/blenkernel/intern/data_transfer.c
@@ -833,7 +833,7 @@ static bool data_transfer_layersmapping_generate(
return ret;
}
else if (cddata_type == CD_FAKE_SHAPEKEY) {
- /* TODO: leaving shapekeys asside for now, quite specific case, since we can't access them from MVert :/ */
+ /* TODO: leaving shapekeys aside for now, quite specific case, since we can't access them from MVert :/ */
return false;
}
}
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index ed4ee1f8b17..e129251157e 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -75,11 +75,11 @@
#include "BKE_pointcache.h"
#include "BKE_scene.h"
-/* for image output */
+/* for image output */
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
-/* to read material/texture color */
+/* to read material/texture color */
#include "RE_render_ext.h"
#include "RE_shader_ext.h"
@@ -90,7 +90,7 @@
//# pragma GCC diagnostic ignored "-Wdouble-promotion"
#endif
-/* precalculated gaussian factors for 5x super sampling */
+/* precalculated gaussian factors for 5x super sampling */
static const float gaussianFactors[5] = {
0.996849f,
0.596145f,
@@ -169,7 +169,7 @@ typedef struct BakeAdjPoint {
float dist; /* distance to */
} BakeAdjPoint;
-/* Surface data used while processing a frame */
+/* Surface data used while processing a frame */
typedef struct PaintBakeNormal {
float invNorm[3]; /* current pixel world-space inverted normal */
float normal_scale; /* normal directional scale for displace mapping */
@@ -201,7 +201,7 @@ typedef struct PaintBakeData {
int clear; /* flag to check if surface was cleared/reset -> have to redo velocity etc. */
} PaintBakeData;
-/* UV Image sequence format point */
+/* UV Image sequence format point */
typedef struct PaintUVPoint {
/* Pixel / mesh data */
unsigned int tri_index, pixel_index; /* tri index on domain derived mesh */
@@ -778,7 +778,7 @@ static void surfaceGenerateGrid(struct DynamicPaintSurface *surface)
error = 1;
if (!error) {
- /* calculate number of points withing each cell */
+ /* calculate number of points within each cell */
{
ParallelRangeSettings settings;
BLI_parallel_range_settings_defaults(&settings);
@@ -1132,7 +1132,7 @@ bool dynamicPaint_createType(struct DynamicPaintModifierData *pmd, int type, str
if (!brush->paint_ramp)
return false;
ramp = brush->paint_ramp->data;
- /* Add default smooth-falloff ramp. */
+ /* Add default smooth-falloff ramp. */
ramp[0].r = ramp[0].g = ramp[0].b = ramp[0].a = 1.0f;
ramp[0].pos = 0.0f;
ramp[1].r = ramp[1].g = ramp[1].b = ramp[1].pos = 1.0f;
@@ -1163,14 +1163,14 @@ bool dynamicPaint_createType(struct DynamicPaintModifierData *pmd, int type, str
void dynamicPaint_Modifier_copy(const struct DynamicPaintModifierData *pmd, struct DynamicPaintModifierData *tpmd)
{
- /* Init modifier */
+ /* Init modifier */
tpmd->type = pmd->type;
if (pmd->canvas)
dynamicPaint_createType(tpmd, MOD_DYNAMICPAINT_TYPE_CANVAS, NULL);
if (pmd->brush)
dynamicPaint_createType(tpmd, MOD_DYNAMICPAINT_TYPE_BRUSH, NULL);
- /* Copy data */
+ /* Copy data */
if (tpmd->canvas) {
DynamicPaintSurface *surface;
tpmd->canvas->pmd = tpmd;
@@ -1880,7 +1880,7 @@ static void dynamic_paint_apply_surface_wave_cb(
}
/*
- * Apply canvas data to the object derived mesh
+ * Apply canvas data to the object derived mesh
*/
static DerivedMesh *dynamicPaint_Modifier_apply(
DynamicPaintModifierData *pmd, Object *ob, DerivedMesh *dm)
@@ -1988,7 +1988,7 @@ static DerivedMesh *dynamicPaint_Modifier_apply(
DM_update_weight_mcol(ob, result, 0, weight, 0, NULL);
}
- /* apply weights into a vertex group, if doesnt exists add a new layer */
+ /* apply weights into a vertex group, if doesn't exists add a new layer */
if (defgrp_index != -1 && !dvert && (surface->output_name[0] != '\0')) {
dvert = CustomData_add_layer(&result->vertData, CD_MDEFORMVERT, CD_CALLOC,
NULL, sData->total_points);
@@ -2070,7 +2070,7 @@ static void canvas_copyDerivedMesh(DynamicPaintCanvasSettings *canvas, DerivedMe
}
/*
- * Updates derived mesh copy and processes dynamic paint step / caches.
+ * Updates derived mesh copy and processes dynamic paint step / caches.
*/
static void dynamicPaint_frameUpdate(
Main *bmain, EvaluationContext *eval_ctx, DynamicPaintModifierData *pmd, Scene *scene, Object *ob, DerivedMesh *dm)
@@ -2182,7 +2182,7 @@ DerivedMesh *dynamicPaint_Modifier_do(Main *bmain,
/***************************** Image Sequence / UV Image Surface Calls ******************************/
/*
- * Create a surface for uv image sequence format
+ * Create a surface for uv image sequence format
*/
#define JITTER_SAMPLES { \
0.0f, 0.0f, \
@@ -2240,7 +2240,7 @@ static void dynamic_paint_create_uv_surface_direct_cb(
tPoint->neighbour_pixel = -1;
tPoint->pixel_index = index;
- /* Actual pixel center, used when collision is found */
+ /* Actual pixel center, used when collision is found */
point[0][0] = ((float)tx + 0.5f) / w;
point[0][1] = ((float)ty + 0.5f) / h;
@@ -2261,12 +2261,12 @@ static void dynamic_paint_create_uv_surface_direct_cb(
point[4][1] = ((float)ty + 1) / h;
- /* Loop through samples, starting from middle point */
+ /* Loop through samples, starting from middle point */
for (int sample = 0; sample < 5; sample++) {
- /* Loop through every face in the mesh */
+ /* Loop through every face in the mesh */
/* XXX TODO This is *horrible* with big meshes, should use a 2D BVHTree over UV tris here! */
for (int i = 0; i < tottri; i++) {
- /* Check uv bb */
+ /* Check uv bb */
if ((faceBB[i].min[0] > point[sample][0]) ||
(faceBB[i].min[1] > point[sample][1]) ||
(faceBB[i].max[0] < point[sample][0]) ||
@@ -2283,7 +2283,7 @@ static void dynamic_paint_create_uv_surface_direct_cb(
if (isect_point_tri_v2(point[sample], uv1, uv2, uv3) != 0) {
float uv[2];
- /* Add b-weights per anti-aliasing sample */
+ /* Add b-weights per anti-aliasing sample */
for (int j = 0; j < aa_samples; j++) {
uv[0] = point[0][0] + jitter5sample[j * 2] / w;
uv[1] = point[0][1] + jitter5sample[j * 2 + 1] / h;
@@ -2291,10 +2291,10 @@ static void dynamic_paint_create_uv_surface_direct_cb(
barycentric_weights_v2(uv1, uv2, uv3, uv, tempWeights[index * aa_samples + j].v);
}
- /* Set surface point face values */
+ /* Set surface point face values */
tPoint->tri_index = i;
- /* save vertex indexes */
+ /* save vertex indexes */
tPoint->v1 = mloop[mlooptri[i].tri[0]].v;
tPoint->v2 = mloop[mlooptri[i].tri[1]].v;
tPoint->v3 = mloop[mlooptri[i].tri[2]].v;
@@ -2333,11 +2333,11 @@ static void dynamic_paint_create_uv_surface_neighbor_cb(
const int index = tx + w * ty;
PaintUVPoint *tPoint = &tempPoints[index];
- /* If point isn't on canvas mesh */
+ /* If point isn't on canvas mesh */
if (tPoint->tri_index == -1) {
float point[2];
- /* get loop area */
+ /* get loop area */
const int u_min = (tx > 0) ? -1 : 0;
const int u_max = (tx < (w - 1)) ? 1 : 0;
const int v_min = (ty > 0) ? -1 : 0;
@@ -2352,7 +2352,7 @@ static void dynamic_paint_create_uv_surface_neighbor_cb(
int v = neighStraightY[ni];
if (u >= u_min && u <= u_max && v >= v_min && v <= v_max) {
- /* if not this pixel itself */
+ /* if not this pixel itself */
if (u != 0 || v != 0) {
const int ind = (tx + u) + w * (ty + v);
@@ -2377,14 +2377,14 @@ static void dynamic_paint_create_uv_surface_neighbor_cb(
tPoint->tri_index = i;
/* Now calculate pixel data for this pixel as it was on polygon surface */
- /* Add b-weights per anti-aliasing sample */
+ /* Add b-weights per anti-aliasing sample */
for (int j = 0; j < aa_samples; j++) {
uv[0] = point[0] + jitter5sample[j * 2] / w;
uv[1] = point[1] + jitter5sample[j * 2 + 1] / h;
barycentric_weights_v2(uv1, uv2, uv3, uv, tempWeights[index * aa_samples + j].v);
}
- /* save vertex indexes */
+ /* save vertex indexes */
tPoint->v1 = mloop[mlooptri[i].tri[0]].v;
tPoint->v2 = mloop[mlooptri[i].tri[1]].v;
tPoint->v3 = mloop[mlooptri[i].tri[2]].v;
@@ -2609,8 +2609,8 @@ static void dynamic_paint_find_island_border(
continue;
/*
- * Find a point that is relatively at same edge position
- * on this other face UV
+ * Find a point that is relatively at same edge position
+ * on this other face UV
*/
float closest_point[2], dir_vec[2], tgt_pixel[2];
@@ -2624,7 +2624,7 @@ static void dynamic_paint_find_island_border(
int final_pixel[2] = { (int)floorf(tgt_pixel[0] * w), (int)floorf(tgt_pixel[1] * h) };
- /* If current pixel uv is outside of texture */
+ /* If current pixel uv is outside of texture */
if (final_pixel[0] < 0 || final_pixel[0] >= w || final_pixel[1] < 0 || final_pixel[1] >= h) {
if (bdata->best_index == NOT_FOUND)
bdata->best_index = OUT_OF_TEXTURE;
@@ -2635,7 +2635,7 @@ static void dynamic_paint_find_island_border(
const PaintUVPoint *tempPoints = data->tempPoints;
int final_index = final_pixel[0] + w * final_pixel[1];
- /* If we ended up to our origin point ( mesh has smaller than pixel sized faces) */
+ /* If we ended up to our origin point ( mesh has smaller than pixel sized faces) */
if (final_index == (px + w * py))
continue;
@@ -2648,7 +2648,7 @@ static void dynamic_paint_find_island_border(
continue;
}
- /* If found pixel still lies on wrong face ( mesh has smaller than pixel sized faces) */
+ /* If found pixel still lies on wrong face ( mesh has smaller than pixel sized faces) */
if (tempPoints[final_index].tri_index != target_tri) {
/* Check if it's close enough to likely touch the intended triangle. Any triangle
* becomes thinner than a pixel at its vertices, so robustness requires some margin. */
@@ -2768,7 +2768,7 @@ static bool dynamicPaint_symmetrizeAdjData(PaintAdjData *ed, int active_points)
int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface, float *progress, short *do_update)
{
- /* Antialias jitter point relative coords */
+ /* Antialias jitter point relative coords */
const int aa_samples = (surface->flags & MOD_DPAINT_ANTIALIAS) ? 5 : 1;
char uvname[MAX_CUSTOMDATA_LAYER_NAME];
uint32_t active_points = 0;
@@ -2805,7 +2805,7 @@ int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface, flo
mloopuv = CustomData_get_layer_named(&dm->loopData, CD_MLOOPUV, uvname);
}
- /* Check for validity */
+ /* Check for validity */
if (!mloopuv)
return setError(canvas, N_("No UV data on canvas"));
if (surface->image_resolution < 16 || surface->image_resolution > 8192)
@@ -2815,7 +2815,7 @@ int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface, flo
const int h = w;
/*
- * Start generating the surface
+ * Start generating the surface
*/
printf("DynamicPaint: Preparing UV surface of %ix%i pixels and %i tris.\n", w, h, tottri);
@@ -2839,8 +2839,8 @@ int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface, flo
error = true;
/*
- * Generate a temporary bounding box array for UV faces to optimize
- * the pixel-inside-a-face search.
+ * Generate a temporary bounding box array for UV faces to optimize
+ * the pixel-inside-a-face search.
*/
if (!error) {
faceBB = MEM_mallocN(tottri * sizeof(*faceBB), "MPCanvasFaceBB");
@@ -2884,10 +2884,10 @@ int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface, flo
*do_update = true;
/*
- * Now loop through every pixel that was left without index
- * and find if they have neighboring pixels that have an index.
- * If so use that polygon as pixel surface.
- * (To avoid seams on uv island edges)
+ * Now loop through every pixel that was left without index
+ * and find if they have neighboring pixels that have an index.
+ * If so use that polygon as pixel surface.
+ * (To avoid seams on uv island edges)
*/
data.active_points = &active_points;
{
@@ -2903,7 +2903,7 @@ int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface, flo
*progress = 0.06f;
*do_update = true;
- /* Generate surface adjacency data. */
+ /* Generate surface adjacency data. */
{
int cursor = 0;
@@ -2987,9 +2987,9 @@ int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface, flo
}
#if 0
- /* -----------------------------------------------------------------
- * For debug, write a dump of adjacency data to a file.
- * -----------------------------------------------------------------*/
+ /* -----------------------------------------------------------------
+ * For debug, write a dump of adjacency data to a file.
+ * -----------------------------------------------------------------*/
FILE *dump_file = fopen("dynpaint-adj-data.txt", "w");
int *tmp = MEM_callocN(sizeof(int) * active_points, "tmp");
for (int ty = 0; ty < h; ty++) {
@@ -3080,20 +3080,20 @@ int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface, flo
dynamicPaint_allocateSurfaceType(surface);
#if 0
- /* -----------------------------------------------------------------
- * For debug, output pixel statuses to the color map
- * -----------------------------------------------------------------*/
+ /* -----------------------------------------------------------------
+ * For debug, output pixel statuses to the color map
+ * -----------------------------------------------------------------*/
for (index = 0; index < sData->total_points; index++) {
ImgSeqFormatData *f_data = (ImgSeqFormatData *)sData->format_data;
PaintUVPoint *uvPoint = &((PaintUVPoint *)f_data->uv_p)[index];
PaintPoint *pPoint = &((PaintPoint *)sData->type_data)[index];
pPoint->alpha = 1.0f;
- /* Every pixel that is assigned as "edge pixel" gets blue color */
+ /* Every pixel that is assigned as "edge pixel" gets blue color */
if (uvPoint->neighbour_pixel != -1)
pPoint->color[2] = 1.0f;
- /* and every pixel that finally got an polygon gets red color */
- /* green color shows pixel face index hash */
+ /* and every pixel that finally got an polygon gets red color */
+ /* green color shows pixel face index hash */
if (uvPoint->tri_index != -1) {
pPoint->color[0] = 1.0f;
pPoint->color[1] = (float)(uvPoint->tri_index % 255) / 256.0f;
@@ -3111,7 +3111,7 @@ int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface, flo
}
/*
- * Outputs an image file from uv surface data.
+ * Outputs an image file from uv surface data.
*/
typedef struct DynamicPaintOutputSurfaceImageData {
const DynamicPaintSurface *surface;
@@ -3135,7 +3135,7 @@ static void dynamic_paint_output_surface_image_paint_cb(
/* blend wet and dry layers */
blendColors(point->color, point->color[3], point->e_color, point->e_color[3], &ibuf->rect_float[pos]);
- /* Multiply color by alpha if enabled */
+ /* Multiply color by alpha if enabled */
if (surface->flags & MOD_DPAINT_MULALPHA) {
mul_v3_fl(&ibuf->rect_float[pos], ibuf->rect_float[pos + 3]);
}
@@ -3215,7 +3215,7 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface, char *filenam
{
ImBuf *ibuf = NULL;
PaintSurfaceData *sData = surface->data;
- /* OpenEXR or PNG */
+ /* OpenEXR or PNG */
int format = (surface->image_fileformat & MOD_DPAINT_IMGFORMAT_OPENEXR) ? R_IMF_IMTYPE_OPENEXR : R_IMF_IMTYPE_PNG;
char output_file[FILE_MAX];
@@ -3223,7 +3223,7 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface, char *filenam
setError(surface->canvas, N_("Image save failed: invalid surface"));
return;
}
- /* if selected format is openexr, but current build doesnt support one */
+ /* if selected format is openexr, but current build doesn't support one */
#ifndef WITH_OPENEXR
if (format == R_IMF_IMTYPE_OPENEXR)
format = R_IMF_IMTYPE_PNG;
@@ -3231,11 +3231,11 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface, char *filenam
BLI_strncpy(output_file, filename, sizeof(output_file));
BKE_image_path_ensure_ext_from_imtype(output_file, format);
- /* Validate output file path */
+ /* Validate output file path */
BLI_path_abs(output_file, BKE_main_blendfile_path_from_global());
BLI_make_existing_file(output_file);
- /* Init image buffer */
+ /* Init image buffer */
ibuf = IMB_allocImBuf(surface->image_resolution, surface->image_resolution, 32, IB_rectfloat);
if (ibuf == NULL) {
setError(surface->canvas, N_("Image save failed: not enough free memory"));
@@ -3396,7 +3396,7 @@ static void dynamicPaint_freeBrushMaterials(BrushMaterials *bMats)
}
/*
- * Get material diffuse color and alpha (including linked textures) in given coordinates
+ * Get material diffuse color and alpha (including linked textures) in given coordinates
*/
static void dynamicPaint_doMaterialTex(
const BrushMaterials *bMats, float color[3], float *alpha, Object *brushOb,
@@ -3432,7 +3432,7 @@ static void dynamicPaint_doMaterialTex(
/* A modified callback to bvh tree raycast. The tree must have been built using bvhtree_from_mesh_looptri.
* userdata must be a BVHMeshCallbackUserdata built from the same mesh as the tree.
*
- * To optimize brush detection speed this doesn't calculate hit coordinates or normal.
+ * To optimize brush detection speed this doesn't calculate hit coordinates or normal.
*/
static void mesh_tris_spherecast_dp(void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit)
{
@@ -3505,7 +3505,7 @@ static void dynamicPaint_mixPaintColors(
{
PaintPoint *pPoint = &((PaintPoint *)surface->data->type_data)[index];
- /* Add paint */
+ /* Add paint */
if (!(paintFlags & MOD_DPAINT_ERASE)) {
float mix[4];
float temp_alpha = paintAlpha * ((paintFlags & MOD_DPAINT_ABS_ALPHA) ? 1.0f : timescale);
@@ -3516,7 +3516,7 @@ static void dynamicPaint_mixPaintColors(
/* mix wetness and alpha depending on selected alpha mode */
if (paintFlags & MOD_DPAINT_ABS_ALPHA) {
- /* update values to the brush level unless theyre higher already */
+ /* update values to the brush level unless they're higher already */
CLAMP_MIN(pPoint->e_color[3], paintAlpha);
CLAMP_MIN(pPoint->wetness, paintWetness);
}
@@ -3531,15 +3531,15 @@ static void dynamicPaint_mixPaintColors(
pPoint->state = DPAINT_PAINT_NEW;
}
- /* Erase paint */
+ /* Erase paint */
else {
float a_ratio, a_highest;
float wetness;
float invFact = 1.0f - paintAlpha;
/*
- * Make highest alpha to match erased value
- * but maintain alpha ratio
+ * Make highest alpha to match erased value
+ * but maintain alpha ratio
*/
if (paintFlags & MOD_DPAINT_ABS_ALPHA) {
a_highest = max_ff(pPoint->color[3], pPoint->e_color[3]);
@@ -3607,7 +3607,7 @@ static void dynamicPaint_mixWaveHeight(
}
/*
- * add brush results to the surface data depending on surface type
+ * add brush results to the surface data depending on surface type
*/
static void dynamicPaint_updatePointData(
const DynamicPaintSurface *surface, const int index, const DynamicPaintBrushSettings *brush,
@@ -3874,7 +3874,7 @@ typedef struct DynamicPaintPaintData {
} DynamicPaintPaintData;
/*
- * Paint a brush object mesh to the surface
+ * Paint a brush object mesh to the surface
*/
static void dynamic_paint_paint_mesh_cell_point_cb_ex(
void *__restrict userdata,
@@ -3921,7 +3921,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
if (samples > 1 && surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ)
total_sample = gaussianTotal;
- /* Supersampling */
+ /* Supersampling */
for (ss = 0; ss < samples; ss++) {
float ray_start[3], ray_dir[3];
float sample_factor = 0.0f;
@@ -3938,17 +3938,17 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
const bool inner_proximity = (brush->flags & MOD_DPAINT_INVERSE_PROX &&
brush->collision == MOD_DPAINT_COL_VOLDIST);
- /* hit data */
+ /* hit data */
float hitCoord[3];
int hitTri = -1;
- /* Supersampling factor */
+ /* Supersampling factor */
if (samples > 1 && surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ)
sample_factor = gaussianFactors[ss];
else
sample_factor = 1.0f;
- /* Get current sample position in world coordinates */
+ /* Get current sample position in world coordinates */
copy_v3_v3(ray_start, bData->realCoord[bData->s_pos[index] + ss].v);
copy_v3_v3(ray_dir, bData->bNormal[index].invNorm);
@@ -3960,13 +3960,13 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
nearest.index = -1;
nearest.dist_sq = brush_radius * brush_radius; /* find_nearest uses squared distance */
- /* Check volume collision */
+ /* Check volume collision */
if (ELEM(brush->collision, MOD_DPAINT_COL_VOLUME, MOD_DPAINT_COL_VOLDIST)) {
BLI_bvhtree_ray_cast(treeData->tree, ray_start, ray_dir, 0.0f, &hit, mesh_tris_spherecast_dp, treeData);
if (hit.index != -1) {
- /* We hit a triangle, now check if collision point normal is facing the point */
+ /* We hit a triangle, now check if collision point normal is facing the point */
- /* For optimization sake, hit point normal isn't calculated in ray cast loop */
+ /* For optimization sake, hit point normal isn't calculated in ray cast loop */
const int vtri[3] = {
mloop[mlooptri[hit.index].tri[0]].v,
mloop[mlooptri[hit.index].tri[1]].v,
@@ -3977,8 +3977,8 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
normal_tri_v3(hit.no, mvert[vtri[0]].co, mvert[vtri[1]].co, mvert[vtri[2]].co);
dot = dot_v3v3(ray_dir, hit.no);
- /* If ray and hit face normal are facing same direction
- * hit point is inside a closed mesh. */
+ /* If ray and hit face normal are facing same direction
+ * hit point is inside a closed mesh. */
if (dot >= 0.0f) {
const float dist = hit.dist;
const int f_index = hit.index;
@@ -3993,7 +3993,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
treeData->tree, ray_start, ray_dir, 0.0f, &hit, mesh_tris_spherecast_dp, treeData);
if (hit.index != -1) {
- /* Add factor on supersample filter */
+ /* Add factor on supersample filter */
volume_factor = 1.0f;
hit_found = HIT_VOLUME;
@@ -4006,7 +4006,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
}
}
- /* Check proximity collision */
+ /* Check proximity collision */
if (ELEM(brush->collision, MOD_DPAINT_COL_DIST, MOD_DPAINT_COL_VOLDIST) &&
(!hit_found || (brush->flags & MOD_DPAINT_INVERSE_PROX)))
{
@@ -4043,7 +4043,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
hit.index = -1;
hit.dist = brush_radius;
- /* Do a face normal directional raycast, and use that distance */
+ /* Do a face normal directional raycast, and use that distance */
BLI_bvhtree_ray_cast(
treeData->tree, ray_start, proj_ray, 0.0f, &hit, mesh_tris_spherecast_dp, treeData);
if (hit.index != -1) {
@@ -4053,7 +4053,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
}
}
- /* If a hit was found, calculate required values */
+ /* If a hit was found, calculate required values */
if (proxDist >= 0.0f && proxDist <= brush_radius) {
proximity_factor = proxDist / brush_radius;
CLAMP(proximity_factor, 0.0f, 1.0f);
@@ -4146,7 +4146,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
}
/*
- * Process hit color and alpha
+ * Process hit color and alpha
*/
if (surface->type == MOD_DPAINT_SURFACE_T_PAINT) {
float sampleColor[3];
@@ -4156,14 +4156,14 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
sampleColor[1] = brush->g;
sampleColor[2] = brush->b;
- /* Get material+textures color on hit point if required */
+ /* Get material+textures color on hit point if required */
if (brush_usesMaterial(brush, scene)) {
dynamicPaint_doMaterialTex(bMats, sampleColor, &alpha_factor, brushOb,
bData->realCoord[bData->s_pos[index] + ss].v,
hitCoord, hitTri, dm);
}
- /* Sample proximity colorband if required */
+ /* Sample proximity colorband if required */
if ((hit_found == HIT_PROXIMITY) &&
(brush->proximity_falloff == MOD_DPAINT_PRFALL_RAMP))
{
@@ -4187,16 +4187,16 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
} // end supersampling
- /* if any sample was inside paint range */
+ /* if any sample was inside paint range */
if (brushStrength > 0.0f || depth > 0.0f) {
- /* apply supersampling results */
+ /* apply supersampling results */
if (samples > 1) {
brushStrength /= total_sample;
}
CLAMP(brushStrength, 0.0f, 1.0f);
if (surface->type == MOD_DPAINT_SURFACE_T_PAINT) {
- /* Get final pixel color and alpha */
+ /* Get final pixel color and alpha */
paintColor[0] /= numOfHits;
paintColor[1] /= numOfHits;
paintColor[2] /= numOfHits;
@@ -4248,9 +4248,9 @@ static int dynamicPaint_paintMesh(Main *bmain,
mloop = dm->getLoopArray(dm);
numOfVerts = dm->getNumVerts(dm);
- /* Transform collider vertices to global space
- * (Faster than transforming per surface point
- * coordinates and normals to object space) */
+ /* Transform collider vertices to global space
+ * (Faster than transforming per surface point
+ * coordinates and normals to object space) */
for (ii = 0; ii < numOfVerts; ii++) {
mul_m4_v3(brushOb->obmat, mvert[ii].co);
boundInsert(&mesh_bb, mvert[ii].co);
@@ -4276,7 +4276,7 @@ static int dynamicPaint_paintMesh(Main *bmain,
/* check bounding box collision */
if (grid && meshBrush_boundsIntersect(&grid->grid_bounds, &mesh_bb, brush, brush_radius)) {
- /* Build a bvh tree from transformed vertices */
+ /* Build a bvh tree from transformed vertices */
if (bvhtree_from_mesh_get(&treeData, dm, BVHTREE_FROM_LOOPTRI, 4)) {
int c_index;
int total_cells = grid->dim[0] * grid->dim[1] * grid->dim[2];
@@ -4323,7 +4323,7 @@ static int dynamicPaint_paintMesh(Main *bmain,
}
/*
- * Paint a particle system to the surface
+ * Paint a particle system to the surface
*/
static void dynamic_paint_paint_particle_cell_point_cb_ex(
void *__restrict userdata,
@@ -4358,14 +4358,14 @@ static void dynamic_paint_paint_particle_cell_point_cb_ex(
int part_index = -1;
/*
- * With predefined radius, there is no variation between particles.
- * It's enough to just find the nearest one.
+ * With predefined radius, there is no variation between particles.
+ * It's enough to just find the nearest one.
*/
{
KDTreeNearest nearest;
float smooth_range, part_solidradius;
- /* Find nearest particle and get distance to it */
+ /* Find nearest particle and get distance to it */
BLI_kdtree_find_nearest(tree, bData->realCoord[bData->s_pos[index]].v, &nearest);
/* if outside maximum range, no other particle can influence either */
if (nearest.dist > range)
@@ -4381,9 +4381,9 @@ static void dynamic_paint_paint_particle_cell_point_cb_ex(
}
radius = part_solidradius + smooth;
if (nearest.dist < radius) {
- /* distances inside solid radius has maximum influence -> dist = 0 */
+ /* distances inside solid radius has maximum influence -> dist = 0 */
smooth_range = max_ff(0.0f, (nearest.dist - part_solidradius));
- /* do smoothness if enabled */
+ /* do smoothness if enabled */
if (smooth)
smooth_range /= smooth;
@@ -4392,11 +4392,11 @@ static void dynamic_paint_paint_particle_cell_point_cb_ex(
part_index = nearest.index;
}
}
- /* If using random per particle radius and closest particle didn't give max influence */
+ /* If using random per particle radius and closest particle didn't give max influence */
if (brush->flags & MOD_DPAINT_PART_RAD && strength < 1.0f && psys->part->randsize > 0.0f) {
/*
- * If we use per particle radius, we have to sample all particles
- * within max radius range
+ * If we use per particle radius, we have to sample all particles
+ * within max radius range
*/
KDTreeNearest *nearest;
@@ -4444,13 +4444,13 @@ static void dynamic_paint_paint_particle_cell_point_cb_ex(
radius = rad;
}
- /* do smoothness if enabled */
+ /* do smoothness if enabled */
CLAMP_MIN(smooth_range, 0.0f);
if (smooth)
smooth_range /= smooth;
const float str = 1.0f - smooth_range;
- /* if influence is greater, use this one */
+ /* if influence is greater, use this one */
if (str > strength)
strength = str;
}
@@ -4485,7 +4485,7 @@ static void dynamic_paint_paint_particle_cell_point_cb_ex(
copy_v3_v3(paintColor, &brush->r);
}
else if (ELEM(surface->type, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_WAVE)) {
- /* get displace depth */
+ /* get displace depth */
disp_intersect = (1.0f - sqrtf(disp_intersect / radius)) * radius;
depth = max_ff(0.0f, (radius - disp_intersect) / bData->bNormal[index].normal_scale);
}
@@ -4521,14 +4521,14 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
return 1;
/*
- * Build a kd-tree to optimize distance search
+ * Build a kd-tree to optimize distance search
*/
tree = BLI_kdtree_new(psys->totpart);
/* loop through particles and insert valid ones to the tree */
p = 0;
for (ParticleData *pa = psys->particles; p < psys->totpart; p++, pa++) {
- /* Proceed only if particle is active */
+ /* Proceed only if particle is active */
if ((pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN) == 0) ||
(pa->alive == PARS_DEAD && (part->flag & PART_DIED) == 0) ||
(pa->flag & PARS_UNEXIST))
@@ -4536,8 +4536,8 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
continue;
}
- /* for debug purposes check if any NAN particle proceeds
- * For some reason they get past activity check, this should rule most of them out */
+ /* for debug purposes check if any NAN particle proceeds
+ * For some reason they get past activity check, this should rule most of them out */
if (isnan(pa->state.co[0]) || isnan(pa->state.co[1]) || isnan(pa->state.co[2])) {
invalidParticles++;
continue;
@@ -4557,7 +4557,7 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
if (invalidParticles)
printf("Warning: Invalid particle(s) found!\n");
- /* If no suitable particles were found, exit */
+ /* If no suitable particles were found, exit */
if (particlesAdded < 1) {
BLI_kdtree_free(tree);
return 1;
@@ -4571,7 +4571,7 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
int c_index;
int total_cells = grid->dim[0] * grid->dim[1] * grid->dim[2];
- /* balance tree */
+ /* balance tree */
BLI_kdtree_balance(tree);
/* loop through space partitioning grid */
@@ -4637,7 +4637,7 @@ static void dynamic_paint_paint_single_point_cb_ex(
if (distance > brush_radius)
return;
- /* Smooth range or color ramp */
+ /* Smooth range or color ramp */
if (brush->proximity_falloff == MOD_DPAINT_PRFALL_SMOOTH ||
brush->proximity_falloff == MOD_DPAINT_PRFALL_RAMP)
{
@@ -4709,7 +4709,7 @@ static void dynamic_paint_paint_single_point_cb_ex(
}
}
else if (ELEM(surface->type, MOD_DPAINT_SURFACE_T_DISPLACE, MOD_DPAINT_SURFACE_T_WAVE)) {
- /* get displace depth */
+ /* get displace depth */
const float disp_intersect = (1.0f - sqrtf((brush_radius - distance) / brush_radius)) * brush_radius;
depth = max_ff(0.0f, (brush_radius - disp_intersect) / bData->bNormal[index].normal_scale);
}
@@ -4731,7 +4731,7 @@ static int dynamicPaint_paintSinglePoint(
const MVert *mvert = brush->dm->getVertArray(brush->dm);
/*
- * Loop through every surface point
+ * Loop through every surface point
*/
DynamicPaintPaintData data = {
.surface = surface,
@@ -4756,7 +4756,7 @@ static int dynamicPaint_paintSinglePoint(
/***************************** Dynamic Paint Step / Baking ******************************/
/*
- * Calculate current frame distances and directions for adjacency data
+ * Calculate current frame distances and directions for adjacency data
*/
static void dynamic_paint_prepare_adjacency_cb(
@@ -4991,8 +4991,8 @@ typedef struct DynamicPaintEffectData {
} DynamicPaintEffectData;
/*
- * Prepare data required by effects for current frame.
- * Returns number of steps required
+ * Prepare data required by effects for current frame.
+ * Returns number of steps required
*/
static void dynamic_paint_prepare_effect_cb(
void *__restrict userdata,
@@ -5105,7 +5105,7 @@ static int dynamicPaint_prepareEffectStep(
}
/**
- * Processes active effect step.
+ * Processes active effect step.
*/
static void dynamic_paint_effect_spread_cb(
void *__restrict userdata,
@@ -5129,7 +5129,7 @@ static void dynamic_paint_effect_spread_cb(
const int *n_index = sData->adj_data->n_index;
const int *n_target = sData->adj_data->n_target;
- /* Loop through neighboring points */
+ /* Loop through neighboring points */
for (int i = 0; i < numOfNeighs; i++) {
const int n_idx = n_index[index] + i;
float w_factor;
@@ -5178,7 +5178,7 @@ static void dynamic_paint_effect_shrink_cb(
const int *n_index = sData->adj_data->n_index;
const int *n_target = sData->adj_data->n_target;
- /* Loop through neighboring points */
+ /* Loop through neighboring points */
for (int i = 0; i < numOfNeighs; i++) {
const int n_idx = n_index[index] + i;
const float speed_scale = (bNeighs[n_idx].dist < eff_scale) ? 1.0f : eff_scale / bNeighs[n_idx].dist;
@@ -5333,12 +5333,12 @@ static void dynamicPaint_doEffectStep(
return;
/*
- * Spread Effect
+ * Spread Effect
*/
if (surface->effect & MOD_DPAINT_EFFECT_DO_SPREAD) {
const float eff_scale = distance_scale * EFF_MOVEMENT_PER_FRAME * surface->spread_speed * timescale;
- /* Copy current surface to the previous points array to read unmodified values */
+ /* Copy current surface to the previous points array to read unmodified values */
memcpy(prevPoint, sData->type_data, sData->total_points * sizeof(struct PaintPoint));
DynamicPaintEffectData data = {
@@ -5354,12 +5354,12 @@ static void dynamicPaint_doEffectStep(
}
/*
- * Shrink Effect
+ * Shrink Effect
*/
if (surface->effect & MOD_DPAINT_EFFECT_DO_SHRINK) {
const float eff_scale = distance_scale * EFF_MOVEMENT_PER_FRAME * surface->shrink_speed * timescale;
- /* Copy current surface to the previous points array to read unmodified values */
+ /* Copy current surface to the previous points array to read unmodified values */
memcpy(prevPoint, sData->type_data, sData->total_points * sizeof(struct PaintPoint));
DynamicPaintEffectData data = {
@@ -5375,7 +5375,7 @@ static void dynamicPaint_doEffectStep(
}
/*
- * Drip Effect
+ * Drip Effect
*/
if (surface->effect & MOD_DPAINT_EFFECT_DO_DRIP && force) {
const float eff_scale = distance_scale * EFF_MOVEMENT_PER_FRAME * timescale / 2.0f;
@@ -5384,7 +5384,7 @@ static void dynamicPaint_doEffectStep(
const size_t point_locks_size = (sData->total_points / 8) + 1;
uint8_t *point_locks = MEM_callocN(sizeof(*point_locks) * point_locks_size, __func__);
- /* Copy current surface to the previous points array to read unmodified values */
+ /* Copy current surface to the previous points array to read unmodified values */
memcpy(prevPoint, sData->type_data, sData->total_points * sizeof(struct PaintPoint));
DynamicPaintEffectData data = {
@@ -5573,7 +5573,7 @@ static void dynamic_paint_wave_step_cb(
}
if (data->reset_wave) {
- /* if there wasnt any brush intersection, clear isect height */
+ /* if there wasn't any brush intersection, clear isect height */
if (wPoint->state == DPAINT_WAVE_NONE) {
wPoint->brush_isect = 0.0f;
}
@@ -5685,7 +5685,7 @@ static void dynamic_paint_surface_pre_step_cb(
dry_ratio = pPoint->wetness / p_wetness;
/*
- * Slowly "shift" paint from wet layer to dry layer as it drys:
+ * Slowly "shift" paint from wet layer to dry layer as it drys:
*/
/* make sure alpha values are within proper range */
CLAMP(pPoint->color[3], 0.0f, 1.0f);
@@ -5699,7 +5699,7 @@ static void dynamic_paint_surface_pre_step_cb(
/* now calculate new alpha for dry layer that keeps final blended color unchanged */
pPoint->color[3] = (f_color[3] - pPoint->e_color[3]) / (1.0f - pPoint->e_color[3]);
/* for each rgb component, calculate a new dry layer color that keeps the final blend color
- * with these new alpha values. (wet layer color doesnt change)*/
+ * with these new alpha values. (wet layer color doesn't change)*/
if (pPoint->color[3]) {
for (i = 0; i < 3; i++) {
pPoint->color[i] = (f_color[i] * f_color[3] - pPoint->e_color[i] * pPoint->e_color[3]) /
@@ -5810,7 +5810,7 @@ static void dynamic_paint_generate_bake_data_cb(
}
/*
- * Calculate current 3D-position and normal of each surface point
+ * Calculate current 3D-position and normal of each surface point
*/
if (surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ) {
float n1[3], n2[3], n3[3];
@@ -5829,7 +5829,7 @@ static void dynamic_paint_generate_bake_data_cb(
f_data->barycentricWeights[index * bData->s_num[index] + ss].v);
}
- /* Calculate current pixel surface normal */
+ /* Calculate current pixel surface normal */
normal_short_to_float_v3(n1, mvert[tPoint->v1].no);
normal_short_to_float_v3(n2, mvert[tPoint->v2].no);
normal_short_to_float_v3(n3, mvert[tPoint->v3].no);
@@ -5972,7 +5972,7 @@ static int dynamicPaint_generateBakeData(DynamicPaintSurface *surface, const Sce
}
/*
- * Make a transformed copy of canvas derived mesh vertices to avoid recalculation.
+ * Make a transformed copy of canvas derived mesh vertices to avoid recalculation.
*/
bData->mesh_bounds.valid = false;
for (index = 0; index < canvasNumOfVerts; index++) {
@@ -5982,7 +5982,7 @@ static int dynamicPaint_generateBakeData(DynamicPaintSurface *surface, const Sce
}
/*
- * Prepare each surface point for a new step
+ * Prepare each surface point for a new step
*/
DynamicPaintGenerateBakeData data = {
.surface = surface, .ob = ob,
@@ -6079,11 +6079,11 @@ static int dynamicPaint_doStep(
continue;
}
- /* check if target has an active dp modifier */
+ /* check if target has an active dp modifier */
md = modifiers_findByType(brushObj, eModifierType_DynamicPaint);
if (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render)) {
DynamicPaintModifierData *pmd2 = (DynamicPaintModifierData *)md;
- /* make sure we're dealing with a brush */
+ /* make sure we're dealing with a brush */
if (pmd2->brush) {
DynamicPaintBrushSettings *brush = pmd2->brush;
BrushMaterials bMats = {NULL};
@@ -6104,7 +6104,7 @@ static int dynamicPaint_doStep(
BKE_object_modifier_update_subframe(bmain, eval_ctx, scene, brushObj, true, SUBFRAME_RECURSION,
BKE_scene_frame_get(scene), eModifierType_DynamicPaint);
}
- /* Prepare materials if required */
+ /* Prepare materials if required */
if (brush_usesMaterial(brush, scene))
dynamicPaint_updateBrushMaterials(brushObj, brush->mat, scene, &bMats);
@@ -6167,7 +6167,7 @@ static int dynamicPaint_doStep(
PaintPoint *prevPoint;
float *force = NULL;
- /* Allocate memory for surface previous points to read unchanged values from */
+ /* Allocate memory for surface previous points to read unchanged values from */
prevPoint = MEM_mallocN(sData->total_points * sizeof(struct PaintPoint), "PaintSurfaceDataCopy");
if (!prevPoint)
return setError(canvas, N_("Not enough free memory"));
@@ -6178,7 +6178,7 @@ static int dynamicPaint_doStep(
dynamicPaint_doEffectStep(surface, force, prevPoint, timescale, (float)steps);
}
- /* Free temporary effect data */
+ /* Free temporary effect data */
if (prevPoint)
MEM_freeN(prevPoint);
if (force)
diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c
index fa4e4372273..db9ce6c9b7d 100644
--- a/source/blender/blenkernel/intern/editderivedmesh.c
+++ b/source/blender/blenkernel/intern/editderivedmesh.c
@@ -229,7 +229,7 @@ static void emDM_calcLoopNormalsSpaceArray(
r_lnors_spacearr->lspacearr[i]->ref_beta, r_lnors_spacearr->lspacearr[i]->loops);
printf("\t\t(shared with loops");
while (loops) {
- printf(" %d", GET_INT_FROM_POINTER(loops->link));
+ printf(" %d", POINTER_AS_INT(loops->link));
loops = loops->next;
}
printf(")\n");
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index 89f85530439..82bf65993a8 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -56,7 +56,7 @@
#include "PIL_time.h"
-#include "BKE_anim.h" /* needed for where_on_path */
+#include "BKE_anim.h" /* needed for where_on_path */
#include "BKE_collision.h"
#include "BKE_curve.h"
#include "BKE_displist.h"
@@ -87,8 +87,9 @@ EffectorWeights *BKE_add_effector_weights(Group *group)
EffectorWeights *weights = MEM_callocN(sizeof(EffectorWeights), "EffectorWeights");
int i;
- for (i=0; i<NUM_PFIELD_TYPES; i++)
+ for (i = 0; i < NUM_PFIELD_TYPES; i++) {
weights->weight[i] = 1.0f;
+ }
weights->global_gravity = 1.0f;
@@ -100,13 +101,13 @@ PartDeflect *object_add_collision_fields(int type)
{
PartDeflect *pd;
- pd= MEM_callocN(sizeof(PartDeflect), "PartDeflect");
+ pd = MEM_callocN(sizeof(PartDeflect), "PartDeflect");
pd->forcefield = type;
pd->pdef_sbdamp = 0.1f;
pd->pdef_sbift = 0.2f;
pd->pdef_sboft = 0.02f;
- pd->seed = ((unsigned int)(ceil(PIL_check_seconds_timer()))+1) % 128;
+ pd->seed = ((uint)(ceil(PIL_check_seconds_timer())) + 1) % 128;
pd->f_strength = 1.0f;
pd->f_damp = 1.0f;
@@ -126,7 +127,7 @@ PartDeflect *object_add_collision_fields(int type)
pd->f_flow = 1.0f;
break;
}
- pd->flag = PFIELD_DO_LOCATION|PFIELD_DO_ROTATION;
+ pd->flag = PFIELD_DO_LOCATION | PFIELD_DO_ROTATION;
return pd;
}
@@ -136,12 +137,12 @@ PartDeflect *object_add_collision_fields(int type)
/* -------------------------- Effectors ------------------ */
void free_partdeflect(PartDeflect *pd)
{
- if (!pd)
+ if (!pd) {
return;
-
- if (pd->rng)
+ }
+ if (pd->rng) {
BLI_rng_free(pd->rng);
-
+ }
MEM_freeN(pd);
}
@@ -159,15 +160,18 @@ static void add_object_to_effectors(ListBase **effectors, Scene *scene, Effector
{
EffectorCache *eff = NULL;
- if ( ob == ob_src )
+ if (ob == ob_src) {
return;
+ }
if (for_simulation) {
- if (weights->weight[ob->pd->forcefield] == 0.0f )
+ if (weights->weight[ob->pd->forcefield] == 0.0f) {
return;
+ }
- if (ob->pd->shape == PFIELD_SHAPE_POINTS && !ob->derivedFinal )
+ if (ob->pd->shape == PFIELD_SHAPE_POINTS && !ob->derivedFinal) {
return;
+ }
}
if (*effectors == NULL)
@@ -182,72 +186,70 @@ static void add_object_to_effectors(ListBase **effectors, Scene *scene, Effector
}
static void add_particles_to_effectors(ListBase **effectors, Scene *scene, EffectorWeights *weights, Object *ob, ParticleSystem *psys, ParticleSystem *psys_src, bool for_simulation)
{
- ParticleSettings *part= psys->part;
+ ParticleSettings *part = psys->part;
- if ( !psys_check_enabled(ob, psys, G.is_rendering) )
+ if (!psys_check_enabled(ob, psys, G.is_rendering)) {
return;
-
- if ( psys == psys_src && (part->flag & PART_SELF_EFFECT) == 0)
+ }
+ if (psys == psys_src && (part->flag & PART_SELF_EFFECT) == 0) {
return;
-
- if ( part->pd && part->pd->forcefield && (!for_simulation || weights->weight[part->pd->forcefield] != 0.0f)) {
- if (*effectors == NULL)
+ }
+ if (part->pd && part->pd->forcefield && (!for_simulation || weights->weight[part->pd->forcefield] != 0.0f)) {
+ if (*effectors == NULL) {
*effectors = MEM_callocN(sizeof(ListBase), "effectors list");
-
+ }
BLI_addtail(*effectors, new_effector_cache(scene, ob, psys, part->pd));
}
if (part->pd2 && part->pd2->forcefield && (!for_simulation || weights->weight[part->pd2->forcefield] != 0.0f)) {
- if (*effectors == NULL)
+ if (*effectors == NULL) {
*effectors = MEM_callocN(sizeof(ListBase), "effectors list");
-
+ }
BLI_addtail(*effectors, new_effector_cache(scene, ob, psys, part->pd2));
}
}
/* returns ListBase handle with objects taking part in the effecting */
-ListBase *pdInitEffectors(Scene *scene, Object *ob_src, ParticleSystem *psys_src,
- EffectorWeights *weights, bool for_simulation)
+ListBase *pdInitEffectors(
+ Scene *scene, Object *ob_src, ParticleSystem *psys_src,
+ EffectorWeights *weights, bool for_simulation)
{
- Base *base;
- unsigned int layer= ob_src->lay;
+ const uint layer = ob_src->lay;
ListBase *effectors = NULL;
if (weights->group) {
- GroupObject *go;
-
- for (go= weights->group->gobject.first; go; go= go->next) {
- if ( (go->ob->lay & layer) ) {
- if ( go->ob->pd && go->ob->pd->forcefield )
+ for (GroupObject *go = weights->group->gobject.first; go; go = go->next) {
+ if ((go->ob->lay & layer)) {
+ if (go->ob->pd && go->ob->pd->forcefield) {
add_object_to_effectors(&effectors, scene, weights, go->ob, ob_src, for_simulation);
+ }
- if ( go->ob->particlesystem.first ) {
- ParticleSystem *psys= go->ob->particlesystem.first;
-
- for ( ; psys; psys=psys->next )
+ if (go->ob->particlesystem.first) {
+ for (ParticleSystem *psys = go->ob->particlesystem.first; psys; psys = psys->next) {
add_particles_to_effectors(&effectors, scene, weights, go->ob, psys, psys_src, for_simulation);
+ }
}
}
}
}
else {
- for (base = scene->base.first; base; base= base->next) {
- if ( (base->lay & layer) ) {
- if ( base->object->pd && base->object->pd->forcefield )
+ for (Base *base = scene->base.first; base; base = base->next) {
+ if ((base->lay & layer)) {
+ if (base->object->pd && base->object->pd->forcefield) {
add_object_to_effectors(&effectors, scene, weights, base->object, ob_src, for_simulation);
-
- if ( base->object->particlesystem.first ) {
- ParticleSystem *psys= base->object->particlesystem.first;
-
- for ( ; psys; psys=psys->next )
+ }
+ if (base->object->particlesystem.first) {
+ for (ParticleSystem *psys = base->object->particlesystem.first; psys; psys = psys->next) {
add_particles_to_effectors(&effectors, scene, weights, base->object, psys, psys_src, for_simulation);
+ }
}
}
}
}
- if (for_simulation)
+ if (for_simulation) {
pdPrecalculateEffectors(effectors);
+ }
return effectors;
}
@@ -255,11 +257,10 @@ ListBase *pdInitEffectors(Scene *scene, Object *ob_src, ParticleSystem *psys_src
void pdEndEffectors(ListBase **effectors)
{
if (*effectors) {
- EffectorCache *eff = (*effectors)->first;
-
- for (; eff; eff=eff->next) {
- if (eff->guide_data)
+ for (EffectorCache *eff = (*effectors)->first; eff; eff = eff->next) {
+ if (eff->guide_data) {
MEM_freeN(eff->guide_data);
+ }
}
BLI_freelistN(*effectors);
@@ -270,17 +271,23 @@ void pdEndEffectors(ListBase **effectors)
static void precalculate_effector(EffectorCache *eff)
{
- unsigned int cfra = (unsigned int)(eff->scene->r.cfra >= 0 ? eff->scene->r.cfra : -eff->scene->r.cfra);
- if (!eff->pd->rng)
+ uint cfra = (uint)(eff->scene->r.cfra >= 0 ? eff->scene->r.cfra : -eff->scene->r.cfra);
+ if (!eff->pd->rng) {
eff->pd->rng = BLI_rng_new(eff->pd->seed + cfra);
- else
+ }
+ else {
BLI_rng_srandom(eff->pd->rng, eff->pd->seed + cfra);
+ }
- if (eff->pd->forcefield == PFIELD_GUIDE && eff->ob->type==OB_CURVE) {
- Curve *cu= eff->ob->data;
+ if (eff->pd->forcefield == PFIELD_GUIDE && eff->ob->type == OB_CURVE) {
+ Curve *cu = eff->ob->data;
if (cu->flag & CU_PATH) {
- if (eff->ob->curve_cache == NULL || eff->ob->curve_cache->path==NULL || eff->ob->curve_cache->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 (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);
@@ -290,12 +297,14 @@ static void precalculate_effector(EffectorCache *eff)
}
}
else if (eff->pd->shape == PFIELD_SHAPE_SURFACE) {
- eff->surmd = (SurfaceModifierData *)modifiers_findByType( eff->ob, eModifierType_Surface );
- if (eff->ob->type == OB_CURVE)
+ eff->surmd = (SurfaceModifierData *)modifiers_findByType(eff->ob, eModifierType_Surface);
+ if (eff->ob->type == OB_CURVE) {
eff->flag |= PE_USE_NORMAL_DATA;
+ }
}
- else if (eff->psys)
+ else if (eff->psys) {
psys_update_particle_tree(eff->psys, eff->scene->r.cfra);
+ }
/* Store object velocity */
if (eff->ob) {
@@ -311,9 +320,9 @@ static void precalculate_effector(EffectorCache *eff)
void pdPrecalculateEffectors(ListBase *effectors)
{
if (effectors) {
- EffectorCache *eff = effectors->first;
- for (; eff; eff=eff->next)
+ for (EffectorCache *eff = effectors->first; eff; eff = eff->next) {
precalculate_effector(eff);
+ }
}
}
@@ -400,14 +409,15 @@ static float eff_calc_visibility(ListBase *colliders, EffectorCache *eff, Effect
float norm[3], len = 0.0;
float visibility = 1.0, absorption = 0.0;
- if (!(eff->pd->flag & PFIELD_VISIBILITY))
+ if (!(eff->pd->flag & PFIELD_VISIBILITY)) {
return visibility;
-
- if (!colls)
+ }
+ if (!colls) {
colls = get_collider_cache(eff->scene, eff->ob, NULL);
-
- if (!colls)
+ }
+ if (!colls) {
return visibility;
+ }
negate_v3_v3(norm, efd->vec_to_point);
len = normalize_v3(norm);
@@ -416,9 +426,9 @@ static float eff_calc_visibility(ListBase *colliders, EffectorCache *eff, Effect
for (col = colls->first; col; col = col->next) {
CollisionModifierData *collmd = col->collmd;
- if (col->ob == eff->ob)
+ if (col->ob == eff->ob) {
continue;
-
+ }
if (collmd->bvhtree) {
BVHTreeRayHit hit;
@@ -430,13 +440,14 @@ static float eff_calc_visibility(ListBase *colliders, EffectorCache *eff, Effect
collmd->bvhtree, point->loc, norm, 0.0f, &hit,
eff_tri_ray_hit, NULL, raycast_flag) != -1)
{
- absorption= col->ob->pd->absorption;
+ absorption = col->ob->pd->absorption;
/* visibility is only between 0 and 1, calculated from 1-absorption */
- visibility *= CLAMPIS(1.0f-absorption, 0.0f, 1.0f);
+ visibility *= CLAMPIS(1.0f - absorption, 0.0f, 1.0f);
- if (visibility <= 0.0f)
+ if (visibility <= 0.0f) {
break;
+ }
}
}
}
@@ -450,14 +461,15 @@ static float eff_calc_visibility(ListBase *colliders, EffectorCache *eff, Effect
// noise function for wind e.g.
static float wind_func(struct RNG *rng, float strength)
{
- int random = (BLI_rng_get_int(rng)+1) % 128; // max 2357
+ int random = (BLI_rng_get_int(rng) + 1) % 128; /* max 2357 */
float force = BLI_rng_get_float(rng) + 1.0f;
float ret;
float sign = 0;
- sign = ((float)random > 64.0f) ? 1.0f: -1.0f; // dividing by 2 is not giving equal sign distribution
+ /* Dividing by 2 is not giving equal sign distribution. */
+ sign = ((float)random > 64.0f) ? 1.0f : -1.0f;
- ret = sign*((float)random / force)*strength/128.0f;
+ ret = sign * ((float)random / force) * strength / 128.0f;
return ret;
}
@@ -477,17 +489,17 @@ static float falloff_func(float fac, int usemin, float mindist, int usemax, floa
if (!usemin)
mindist = 0.0;
- return pow((double)(1.0f+fac-mindist), (double)(-power));
+ return pow((double)(1.0f + fac - mindist), (double)(-power));
}
static float falloff_func_dist(PartDeflect *pd, float fac)
{
- return falloff_func(fac, pd->flag&PFIELD_USEMIN, pd->mindist, pd->flag&PFIELD_USEMAX, pd->maxdist, pd->f_power);
+ return falloff_func(fac, pd->flag & PFIELD_USEMIN, pd->mindist, pd->flag & PFIELD_USEMAX, pd->maxdist, pd->f_power);
}
static float falloff_func_rad(PartDeflect *pd, float fac)
{
- return falloff_func(fac, pd->flag&PFIELD_USEMINR, pd->minrad, pd->flag&PFIELD_USEMAXR, pd->maxrad, pd->f_power_r);
+ return falloff_func(fac, pd->flag & PFIELD_USEMINR, pd->minrad, pd->flag & PFIELD_USEMAXR, pd->maxrad, pd->f_power_r);
}
float effector_falloff(EffectorCache *eff, EffectorData *efd, EffectedPoint *UNUSED(point), EffectorWeights *weights)
@@ -499,31 +511,31 @@ float effector_falloff(EffectorCache *eff, EffectorData *efd, EffectedPoint *UNU
fac = dot_v3v3(efd->nor, efd->vec_to_point2);
if (eff->pd->zdir == PFIELD_Z_POS && fac < 0.0f)
- falloff=0.0f;
+ falloff = 0.0f;
else if (eff->pd->zdir == PFIELD_Z_NEG && fac > 0.0f)
- falloff=0.0f;
+ falloff = 0.0f;
else {
switch (eff->pd->falloff) {
case PFIELD_FALL_SPHERE:
- falloff*= falloff_func_dist(eff->pd, efd->distance);
+ falloff *= falloff_func_dist(eff->pd, efd->distance);
break;
case PFIELD_FALL_TUBE:
- falloff*= falloff_func_dist(eff->pd, ABS(fac));
+ falloff *= falloff_func_dist(eff->pd, ABS(fac));
if (falloff == 0.0f)
break;
madd_v3_v3v3fl(temp, efd->vec_to_point2, efd->nor, -fac);
- r_fac= len_v3(temp);
- falloff*= falloff_func_rad(eff->pd, r_fac);
+ r_fac = len_v3(temp);
+ falloff *= falloff_func_rad(eff->pd, r_fac);
break;
case PFIELD_FALL_CONE:
- falloff*= falloff_func_dist(eff->pd, ABS(fac));
+ falloff *= falloff_func_dist(eff->pd, ABS(fac));
if (falloff == 0.0f)
break;
- r_fac= RAD2DEGF(saacos(fac/len_v3(efd->vec_to_point)));
- falloff*= falloff_func_rad(eff->pd, r_fac);
+ r_fac = RAD2DEGF(saacos(fac / len_v3(efd->vec_to_point)));
+ falloff *= falloff_func_rad(eff->pd, r_fac);
break;
}
@@ -570,7 +582,7 @@ int get_effector_data(EffectorCache *eff, EffectorData *efd, EffectedPoint *poin
/* In case surface object is in Edit mode when loading the .blend, surface modifier is never executed
* and bvhtree never built, see T48415. */
- if (eff->pd && eff->pd->shape==PFIELD_SHAPE_SURFACE && eff->surmd && eff->surmd->bvhtree) {
+ if (eff->pd && eff->pd->shape == PFIELD_SHAPE_SURFACE && eff->surmd && eff->surmd->bvhtree) {
/* closest point in the object surface is an effector */
float vec[3];
@@ -583,7 +595,7 @@ int get_effector_data(EffectorCache *eff, EffectorData *efd, EffectedPoint *poin
efd->size = 0.0f;
}
- else if (eff->pd && eff->pd->shape==PFIELD_SHAPE_POINTS) {
+ else if (eff->pd && eff->pd->shape == PFIELD_SHAPE_POINTS) {
if (eff->ob->derivedFinal) {
DerivedMesh *dm = eff->ob->derivedFinal;
@@ -611,10 +623,10 @@ int get_effector_data(EffectorCache *eff, EffectorData *efd, EffectedPoint *poin
/* pass */
}
else {
- ParticleSimulationData sim= {NULL};
- sim.scene= eff->scene;
- sim.ob= eff->ob;
- sim.psys= eff->psys;
+ ParticleSimulationData sim = {NULL};
+ sim.scene = eff->scene;
+ sim.ob = eff->ob;
+ sim.psys = eff->psys;
/* TODO: time from actual previous calculated frame (step might not be 1) */
state.time = cfra - 1.0f;
@@ -633,9 +645,9 @@ int get_effector_data(EffectorCache *eff, EffectorData *efd, EffectedPoint *poin
efd->nor[1] = efd->nor[2] = 0.f;
mul_qt_v3(state.rot, efd->nor);
- if (real_velocity)
+ if (real_velocity) {
copy_v3_v3(efd->vel, state.vel);
-
+ }
efd->size = pa->size;
}
}
@@ -652,18 +664,20 @@ int get_effector_data(EffectorCache *eff, EffectorData *efd, EffectedPoint *poin
project_v3_v3v3(translate, temp, efd->nor);
/* for vortex the shape chooses between old / new force */
- if (eff->pd->forcefield == PFIELD_VORTEX)
+ if (eff->pd->forcefield == PFIELD_VORTEX) {
add_v3_v3v3(efd->loc, ob->obmat[3], translate);
- else /* normally efd->loc is closest point on effector xy-plane */
+ }
+ else { /* normally efd->loc is closest point on effector xy-plane */
sub_v3_v3v3(efd->loc, point->loc, translate);
+ }
}
else {
copy_v3_v3(efd->loc, ob->obmat[3]);
}
- if (real_velocity)
+ if (real_velocity) {
copy_v3_v3(efd->vel, eff->velocity);
-
+ }
efd->size = 0.0f;
ret = 1;
@@ -675,7 +689,7 @@ int get_effector_data(EffectorCache *eff, EffectorData *efd, EffectedPoint *poin
/* rest length for harmonic effector, will have to see later if this could be extended to other effectors */
if (eff->pd && eff->pd->forcefield == PFIELD_HARMONIC && eff->pd->f_size)
- mul_v3_fl(efd->vec_to_point, (efd->distance-eff->pd->f_size)/efd->distance);
+ mul_v3_fl(efd->vec_to_point, (efd->distance - eff->pd->f_size) / efd->distance);
if (eff->flag & PE_USE_NORMAL_DATA) {
copy_v3_v3(efd->vec_to_point2, efd->vec_to_point);
@@ -700,7 +714,7 @@ static void get_effector_tot(EffectorCache *eff, EffectorData *efd, EffectedPoin
if (*tot && eff->pd->forcefield == PFIELD_HARMONIC && point->index >= 0) {
*p = point->index % *tot;
- *tot = *p+1;
+ *tot = *p + 1;
}
}
else if (eff->psys) {
@@ -715,17 +729,17 @@ static void get_effector_tot(EffectorCache *eff, EffectorData *efd, EffectedPoin
*/
efd->charge = eff->pd->f_strength;
}
- else if (eff->pd->forcefield == PFIELD_HARMONIC && (eff->pd->flag & PFIELD_MULTIPLE_SPRINGS)==0) {
+ else if (eff->pd->forcefield == PFIELD_HARMONIC && (eff->pd->flag & PFIELD_MULTIPLE_SPRINGS) == 0) {
/* every particle is mapped to only one harmonic effector particle */
- *p= point->index % eff->psys->totpart;
- *tot= *p + 1;
+ *p = point->index % eff->psys->totpart;
+ *tot = *p + 1;
}
if (eff->psys->part->effector_amount) {
int totpart = eff->psys->totpart;
int amount = eff->psys->part->effector_amount;
- *step = (totpart > amount) ? totpart/amount : 1;
+ *step = (totpart > amount) ? totpart / amount : 1;
}
}
else {
@@ -746,7 +760,7 @@ static void do_texture_effector(EffectorCache *eff, EffectorData *efd, EffectedP
result[0].nor = result[1].nor = result[2].nor = result[3].nor = NULL;
- strength= eff->pd->f_strength * efd->falloff;
+ strength = eff->pd->f_strength * efd->falloff;
copy_v3_v3(tex_co, point->loc);
@@ -757,7 +771,7 @@ static void do_texture_effector(EffectorCache *eff, EffectorData *efd, EffectedP
tex_co[2] = 0.0f;
}
else if (eff->pd->flag & PFIELD_TEX_2D) {
- float fac=-dot_v3v3(tex_co, efd->nor);
+ float fac = -dot_v3v3(tex_co, efd->nor);
madd_v3_v3fl(tex_co, efd->nor, fac);
}
@@ -765,31 +779,31 @@ static void do_texture_effector(EffectorCache *eff, EffectorData *efd, EffectedP
hasrgb = multitex_ext(eff->pd->tex, tex_co, NULL, NULL, 0, result, 0, NULL, scene_color_manage, false);
- if (hasrgb && mode==PFIELD_TEX_RGB) {
+ if (hasrgb && mode == PFIELD_TEX_RGB) {
force[0] = (0.5f - result->tr) * strength;
force[1] = (0.5f - result->tg) * strength;
force[2] = (0.5f - result->tb) * strength;
}
else if (nabla != 0) {
- strength/=nabla;
+ strength /= nabla;
tex_co[0] += nabla;
- multitex_ext(eff->pd->tex, tex_co, NULL, NULL, 0, result+1, 0, NULL, scene_color_manage, false);
+ multitex_ext(eff->pd->tex, tex_co, NULL, NULL, 0, result + 1, 0, NULL, scene_color_manage, false);
tex_co[0] -= nabla;
tex_co[1] += nabla;
- multitex_ext(eff->pd->tex, tex_co, NULL, NULL, 0, result+2, 0, NULL, scene_color_manage, false);
+ multitex_ext(eff->pd->tex, tex_co, NULL, NULL, 0, result + 2, 0, NULL, scene_color_manage, false);
tex_co[1] -= nabla;
tex_co[2] += nabla;
- multitex_ext(eff->pd->tex, tex_co, NULL, NULL, 0, result+3, 0, NULL, scene_color_manage, false);
+ multitex_ext(eff->pd->tex, tex_co, NULL, NULL, 0, result + 3, 0, NULL, scene_color_manage, false);
if (mode == PFIELD_TEX_GRAD || !hasrgb) { /* if we don't have rgb fall back to grad */
/* generate intensity if texture only has rgb value */
if (hasrgb & TEX_RGB) {
- int i;
- for (i=0; i<4; i++)
+ for (int i = 0; i < 4; i++) {
result[i].tin = (1.0f / 3.0f) * (result[i].tr + result[i].tg + result[i].tb);
+ }
}
force[0] = (result[0].tin - result[1].tin) * strength;
force[1] = (result[0].tin - result[2].tin) * strength;
@@ -835,8 +849,9 @@ static void do_physical_effector(EffectorCache *eff, EffectorData *efd, Effected
if (noise_factor > 0.0f) {
strength += wind_func(rng, noise_factor);
- if (ELEM(pd->forcefield, PFIELD_HARMONIC, PFIELD_DRAG))
+ if (ELEM(pd->forcefield, PFIELD_HARMONIC, PFIELD_DRAG)) {
damp += wind_func(rng, noise_factor);
+ }
}
copy_v3_v3(force, efd->vec_to_point);
@@ -848,8 +863,8 @@ static void do_physical_effector(EffectorCache *eff, EffectorData *efd, Effected
break;
case PFIELD_FORCE:
normalize_v3(force);
- if (pd->flag & PFIELD_GRAVITATION){ /* Option: Multiply by 1/distance^2 */
- if (efd->distance < FLT_EPSILON){
+ if (pd->flag & PFIELD_GRAVITATION) { /* Option: Multiply by 1/distance^2 */
+ if (efd->distance < FLT_EPSILON) {
strength = 0.0f;
}
else {
@@ -901,10 +916,10 @@ static void do_physical_effector(EffectorCache *eff, EffectorData *efd, Effected
case PFIELD_LENNARDJ:
fac = pow((efd->size + point->size) / efd->distance, 6.0);
- fac = - fac * (1.0f - fac) / efd->distance;
+ fac = -fac * (1.0f - fac) / efd->distance;
/* limit the repulsive term drastically to avoid huge forces */
- fac = ((fac>2.0f) ? 2.0f : fac);
+ fac = ((fac > 2.0f) ? 2.0f : fac);
mul_v3_fl(force, strength * fac);
break;
@@ -938,8 +953,9 @@ static void do_physical_effector(EffectorCache *eff, EffectorData *efd, Effected
float density;
if ((density = smoke_get_velocity_at(pd->f_source, point->loc, force)) >= 0.0f) {
float influence = strength * efd->falloff;
- if (pd->flag & PFIELD_SMOKE_DENSITY)
+ if (pd->flag & PFIELD_SMOKE_DENSITY) {
influence *= density;
+ }
mul_v3_fl(force, influence);
/* apply flow */
madd_v3_v3fl(total_force, point->vel, -pd->f_flow * influence);
@@ -950,15 +966,16 @@ static void do_physical_effector(EffectorCache *eff, EffectorData *efd, Effected
}
if (pd->flag & PFIELD_DO_LOCATION) {
- madd_v3_v3fl(total_force, force, 1.0f/point->vel_to_sec);
+ madd_v3_v3fl(total_force, force, 1.0f / point->vel_to_sec);
- if (ELEM(pd->forcefield, PFIELD_HARMONIC, PFIELD_DRAG, PFIELD_SMOKEFLOW)==0 && pd->f_flow != 0.0f) {
+ if (ELEM(pd->forcefield, PFIELD_HARMONIC, PFIELD_DRAG, PFIELD_SMOKEFLOW) == 0 && pd->f_flow != 0.0f) {
madd_v3_v3fl(total_force, point->vel, -pd->f_flow * efd->falloff);
}
}
- if (point->ave)
+ if (point->ave) {
zero_v3(point->ave);
+ }
if (pd->flag & PFIELD_DO_ROTATION && point->ave && point->rot) {
float xvec[3] = {1.0f, 0.0f, 0.0f};
float dave[3];
@@ -1001,45 +1018,47 @@ void pdDoEffectors(ListBase *effectors, ListBase *colliders, EffectorWeights *we
*/
EffectorCache *eff;
EffectorData efd;
- int p=0, tot = 1, step = 1;
+ int p = 0, tot = 1, step = 1;
/* Cycle through collected objects, get total of (1/(gravity_strength * dist^gravity_power)) */
/* Check for min distance here? (yes would be cool to add that, ton) */
- if (effectors) for (eff = effectors->first; eff; eff=eff->next) {
- /* object effectors were fully checked to be OK to evaluate! */
-
- get_effector_tot(eff, &efd, point, &tot, &p, &step);
+ if (effectors) {
+ for (eff = effectors->first; eff; eff = eff->next) {
+ /* object effectors were fully checked to be OK to evaluate! */
- for (; p<tot; p+=step) {
- if (get_effector_data(eff, &efd, point, 0)) {
- efd.falloff= effector_falloff(eff, &efd, point, weights);
+ get_effector_tot(eff, &efd, point, &tot, &p, &step);
- if (efd.falloff > 0.0f)
- efd.falloff *= eff_calc_visibility(colliders, eff, &efd, point);
+ for (; p < tot; p += step) {
+ if (get_effector_data(eff, &efd, point, 0)) {
+ efd.falloff = effector_falloff(eff, &efd, point, weights);
- if (efd.falloff <= 0.0f) {
- /* don't do anything */
- }
- else if (eff->pd->forcefield == PFIELD_TEXTURE) {
- do_texture_effector(eff, &efd, point, force);
- }
- else {
- float temp1[3] = {0, 0, 0}, temp2[3];
- copy_v3_v3(temp1, force);
+ if (efd.falloff > 0.0f) {
+ efd.falloff *= eff_calc_visibility(colliders, eff, &efd, point);
+ }
+ if (efd.falloff <= 0.0f) {
+ /* don't do anything */
+ }
+ else if (eff->pd->forcefield == PFIELD_TEXTURE) {
+ do_texture_effector(eff, &efd, point, force);
+ }
+ else {
+ float temp1[3] = {0, 0, 0}, temp2[3];
+ copy_v3_v3(temp1, force);
- do_physical_effector(eff, &efd, point, force);
+ do_physical_effector(eff, &efd, point, force);
- /* for softbody backward compatibility */
- if (point->flag & PE_WIND_AS_SPEED && impulse) {
- sub_v3_v3v3(temp2, force, temp1);
- sub_v3_v3v3(impulse, impulse, temp2);
+ /* for softbody backward compatibility */
+ if (point->flag & PE_WIND_AS_SPEED && impulse) {
+ sub_v3_v3v3(temp2, force, temp1);
+ sub_v3_v3v3(impulse, impulse, temp2);
+ }
}
}
- }
- else if (eff->flag & PE_VELOCITY_TO_IMPULSE && impulse) {
- /* special case for harmonic effector */
- add_v3_v3v3(impulse, impulse, efd.vel);
+ else if (eff->flag & PE_VELOCITY_TO_IMPULSE && impulse) {
+ /* special case for harmonic effector */
+ add_v3_v3v3(impulse, impulse, efd.vel);
+ }
}
}
}
@@ -1049,35 +1068,35 @@ void pdDoEffectors(ListBase *effectors, ListBase *colliders, EffectorWeights *we
SimDebugData *_sim_debug_data = NULL;
-unsigned int BKE_sim_debug_data_hash(int i)
+uint BKE_sim_debug_data_hash(int i)
{
- return BLI_ghashutil_uinthash((unsigned int)i);
+ return BLI_ghashutil_uinthash((uint)i);
}
-unsigned int BKE_sim_debug_data_hash_combine(unsigned int kx, unsigned int ky)
+uint BKE_sim_debug_data_hash_combine(uint kx, uint ky)
{
-#define rot(x,k) (((x)<<(k)) | ((x)>>(32-(k))))
+#define rot(x, k) (((x) << (k)) | ((x) >> (32 - (k))))
- unsigned int a, b, c;
+ uint a, b, c;
a = b = c = 0xdeadbeef + (2 << 2) + 13;
a += kx;
b += ky;
- c ^= b; c -= rot(b,14);
- a ^= c; a -= rot(c,11);
- b ^= a; b -= rot(a,25);
- c ^= b; c -= rot(b,16);
- a ^= c; a -= rot(c,4);
- b ^= a; b -= rot(a,14);
- c ^= b; c -= rot(b,24);
+ c ^= b; c -= rot(b, 14);
+ a ^= c; a -= rot(c, 11);
+ b ^= a; b -= rot(a, 25);
+ c ^= b; c -= rot(b, 16);
+ a ^= c; a -= rot(c, 4);
+ b ^= a; b -= rot(a, 14);
+ c ^= b; c -= rot(b, 24);
return c;
#undef rot
}
-static unsigned int debug_element_hash(const void *key)
+static uint debug_element_hash(const void *key)
{
const SimDebugElement *elem = key;
return elem->hash;
@@ -1121,8 +1140,9 @@ bool BKE_sim_debug_data_get_enabled(void)
void BKE_sim_debug_data_free(void)
{
if (_sim_debug_data) {
- if (_sim_debug_data->gh)
+ if (_sim_debug_data->gh) {
BLI_ghash_free(_sim_debug_data->gh, NULL, debug_element_free);
+ }
MEM_freeN(_sim_debug_data);
}
}
@@ -1134,20 +1154,23 @@ static void debug_data_insert(SimDebugData *debug_data, SimDebugElement *elem)
*old_elem = *elem;
MEM_freeN(elem);
}
- else
+ else {
BLI_ghash_insert(debug_data->gh, elem, elem);
+ }
}
-void BKE_sim_debug_data_add_element(int type, const float v1[3], const float v2[3], const char *str, float r, float g, float b, const char *category, unsigned int hash)
+void BKE_sim_debug_data_add_element(int type, const float v1[3], const float v2[3], const char *str, float r, float g, float b, const char *category, uint hash)
{
- unsigned int category_hash = BLI_ghashutil_strhash_p(category);
+ uint category_hash = BLI_ghashutil_strhash_p(category);
SimDebugElement *elem;
if (!_sim_debug_data) {
- if (G.debug & G_DEBUG_SIMDATA)
+ if (G.debug & G_DEBUG_SIMDATA) {
BKE_sim_debug_data_set_enabled(true);
- else
+ }
+ else {
return;
+ }
}
elem = MEM_callocN(sizeof(SimDebugElement), "sim debug data element");
@@ -1157,47 +1180,55 @@ void BKE_sim_debug_data_add_element(int type, const float v1[3], const float v2[
elem->color[0] = r;
elem->color[1] = g;
elem->color[2] = b;
- if (v1)
+ if (v1) {
copy_v3_v3(elem->v1, v1);
- else
+ }
+ else {
zero_v3(elem->v1);
- if (v2)
+ }
+ if (v2) {
copy_v3_v3(elem->v2, v2);
- else
+ }
+ else {
zero_v3(elem->v2);
- if (str)
+ }
+ if (str) {
BLI_strncpy(elem->str, str, sizeof(elem->str));
- else
+ }
+ else {
elem->str[0] = '\0';
+ }
debug_data_insert(_sim_debug_data, elem);
}
-void BKE_sim_debug_data_remove_element(unsigned int hash)
+void BKE_sim_debug_data_remove_element(uint hash)
{
SimDebugElement dummy;
- if (!_sim_debug_data)
+ if (!_sim_debug_data) {
return;
-
+ }
dummy.hash = hash;
BLI_ghash_remove(_sim_debug_data->gh, &dummy, NULL, debug_element_free);
}
void BKE_sim_debug_data_clear(void)
{
- if (!_sim_debug_data)
+ if (!_sim_debug_data) {
return;
-
- if (_sim_debug_data->gh)
+ }
+ if (_sim_debug_data->gh) {
BLI_ghash_clear(_sim_debug_data->gh, NULL, debug_element_free);
+ }
}
void BKE_sim_debug_data_clear_category(const char *category)
{
int category_hash = (int)BLI_ghashutil_strhash_p(category);
- if (!_sim_debug_data)
+ if (!_sim_debug_data) {
return;
+ }
if (_sim_debug_data->gh) {
GHashIterator iter;
@@ -1206,8 +1237,9 @@ void BKE_sim_debug_data_clear_category(const char *category)
const SimDebugElement *elem = BLI_ghashIterator_getValue(&iter);
BLI_ghashIterator_step(&iter); /* removing invalidates the current iterator, so step before removing */
- if (elem->category_hash == category_hash)
+ if (elem->category_hash == category_hash) {
BLI_ghash_remove(_sim_debug_data->gh, elem, NULL, debug_element_free);
+ }
}
}
}
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 6ee6d877b9c..d4e69ad06ac 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -270,12 +270,12 @@ FCurve *iter_step_fcurve(FCurve *fcu_iter, const char rna_path[])
/* Get list of LinkData's containing pointers to the F-Curves which control the types of data indicated
* Lists...
- * - dst: list of LinkData's matching the criteria returned.
- * List must be freed after use, and is assumed to be empty when passed.
- * - src: list of F-Curves to search through
+ * - dst: list of LinkData's matching the criteria returned.
+ * List must be freed after use, and is assumed to be empty when passed.
+ * - src: list of F-Curves to search through
* Filters...
- * - dataPrefix: i.e. 'pose.bones[' or 'nodes['
- * - dataName: name of entity within "" immediately following the prefix
+ * - dataPrefix: i.e. 'pose.bones[' or 'nodes['
+ * - dataName: name of entity within "" immediately following the prefix
*/
int list_find_data_fcurves(ListBase *dst, ListBase *src, const char *dataPrefix, const char *dataName)
{
@@ -428,8 +428,8 @@ static int binarysearch_bezt_index_ex(BezTriple array[], float frame, int arrayl
*r_replace = false;
/* sneaky optimizations (don't go through searching process if...):
- * - keyframe to be added is to be added out of current bounds
- * - keyframe to be added would replace one of the existing ones on bounds
+ * - keyframe to be added is to be added out of current bounds
+ * - keyframe to be added would replace one of the existing ones on bounds
*/
if ((arraylen <= 0) || (array == NULL)) {
printf("Warning: binarysearch_bezt_index() encountered invalid array\n");
@@ -829,7 +829,7 @@ void bezt_add_to_cfra_elem(ListBase *lb, BezTriple *bezt)
/* Basic sampling callback which acts as a wrapper for evaluate_fcurve()
- * 'data' arg here is unneeded here...
+ * 'data' arg here is unneeded here...
*/
float fcurve_samplingcb_evalcurve(FCurve *fcu, void *UNUSED(data), float evaltime)
{
@@ -931,9 +931,9 @@ void calchandles_fcurve(FCurve *fcu)
int a = fcu->totvert;
/* Error checking:
- * - need at least two points
- * - need bezier keys
- * - only bezier-interpolation has handles (for now)
+ * - need at least two points
+ * - need bezier keys
+ * - only bezier-interpolation has handles (for now)
*/
if (ELEM(NULL, fcu, fcu->bezt) || (a < 2) /*|| ELEM(fcu->ipo, BEZT_IPO_CONST, BEZT_IPO_LIN)*/)
return;
@@ -1527,10 +1527,10 @@ static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar)
pchan = BKE_pose_channel_find_name(ob->pose, dtar->pchan_name);
/* check if object or bone, and get transform matrix accordingly
- * - "useEulers" code is used to prevent the problems associated with non-uniqueness
- * of euler decomposition from matrices [#20870]
- * - localspace is for [#21384], where parent results are not wanted
- * but local-consts is for all the common "corrective-shapes-for-limbs" situations
+ * - "useEulers" code is used to prevent the problems associated with non-uniqueness
+ * of euler decomposition from matrices [#20870]
+ * - localspace is for [#21384], where parent results are not wanted
+ * but local-consts is for all the common "corrective-shapes-for-limbs" situations
*/
if (pchan) {
/* bone */
@@ -1596,12 +1596,12 @@ static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar)
}
else if (dtar->transChan >= DTAR_TRANSCHAN_ROTX) {
/* extract rotation as eulers (if needed)
- * - definitely if rotation order isn't eulers already
- * - if eulers, then we have 2 options:
- * a) decompose transform matrix as required, then try to make eulers from
- * there compatible with original values
- * b) [NOT USED] directly use the original values (no decomposition)
- * - only an option for "transform space", if quality is really bad with a)
+ * - definitely if rotation order isn't eulers already
+ * - if eulers, then we have 2 options:
+ * a) decompose transform matrix as required, then try to make eulers from
+ * there compatible with original values
+ * b) [NOT USED] directly use the original values (no decomposition)
+ * - only an option for "transform space", if quality is really bad with a)
*/
float eul[3];
@@ -1672,9 +1672,9 @@ void driver_free_variable(ListBase *variables, DriverVar *dvar)
return;
/* free target vars
- * - need to go over all of them, not just up to the ones that are used
- * currently, since there may be some lingering RNA paths from
- * previous users needing freeing
+ * - need to go over all of them, not just up to the ones that are used
+ * currently, since there may be some lingering RNA paths from
+ * previous users needing freeing
*/
DRIVER_TARGETS_LOOPER(dvar)
{
@@ -1920,8 +1920,8 @@ float driver_get_variable_value(ChannelDriver *driver, DriverVar *dvar)
}
/* Evaluate an Channel-Driver to get a 'time' value to use instead of "evaltime"
- * - "evaltime" is the frame at which F-Curve is being evaluated
- * - has to return a float value
+ * - "evaltime" is the frame at which F-Curve is being evaluated
+ * - has to return a float value
*/
float evaluate_driver(PathResolvedRNA *anim_rna, ChannelDriver *driver, const float evaltime)
{
@@ -2005,7 +2005,7 @@ float evaluate_driver(PathResolvedRNA *anim_rna, ChannelDriver *driver, const fl
}
else {
/* this evaluates the expression using Python, and returns its result:
- * - on errors it reports, then returns 0.0f
+ * - on errors it reports, then returns 0.0f
*/
BLI_mutex_lock(&python_driver_lock);
@@ -2050,9 +2050,9 @@ void correct_bezpart(float v1[2], float v2[2], float v3[2], float v4[2])
h2[1] = v4[1] - v3[1];
/* calculate distances:
- * - len = span of time between keyframes
- * - len1 = length of handle of start key
- * - len2 = length of handle of end key
+ * - len = span of time between keyframes
+ * - len1 = length of handle of start key
+ * - len2 = length of handle of end key
*/
len = v4[0] - v1[0];
len1 = fabsf(h1[0]);
@@ -2675,8 +2675,8 @@ static float evaluate_fcurve_ex(FCurve *fcu, float evaltime, float cvalue)
devaltime = evaluate_time_fmodifiers(storage, &fcu->modifiers, fcu, cvalue, evaltime);
/* evaluate curve-data
- * - 'devaltime' instead of 'evaltime', as this is the time that the last time-modifying
- * F-Curve modifier on the stack requested the curve to be evaluated at
+ * - 'devaltime' instead of 'evaltime', as this is the time that the last time-modifying
+ * F-Curve modifier on the stack requested the curve to be evaluated at
*/
if (fcu->bezt)
cvalue = fcurve_eval_keyframes(fcu, fcu->bezt, devaltime);
diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c
index 5911d155278..f5915e1ddb9 100644
--- a/source/blender/blenkernel/intern/fmodifier.c
+++ b/source/blender/blenkernel/intern/fmodifier.c
@@ -69,15 +69,15 @@ void *fmodifiers_storage_get(FModifierStackStorage *storage, FModifier *fcm);
*/
/* Template for type-info data:
- * - make a copy of this when creating new modifiers, and just change the functions
- * pointed to as necessary
- * - although the naming of functions doesn't matter, it would help for code
- * readability, to follow the same naming convention as is presented here
- * - any functions that a constraint doesn't need to define, don't define
- * for such cases, just use NULL
- * - these should be defined after all the functions have been defined, so that
- * forward-definitions/prototypes don't need to be used!
- * - keep this copy #if-def'd so that future constraints can get based off this
+ * - make a copy of this when creating new modifiers, and just change the functions
+ * pointed to as necessary
+ * - although the naming of functions doesn't matter, it would help for code
+ * readability, to follow the same naming convention as is presented here
+ * - any functions that a constraint doesn't need to define, don't define
+ * for such cases, just use NULL
+ * - these should be defined after all the functions have been defined, so that
+ * forward-definitions/prototypes don't need to be used!
+ * - keep this copy #if-def'd so that future constraints can get based off this
*/
#if 0
static FModifierTypeInfo FMI_MODNAME = {
@@ -260,7 +260,7 @@ static FModifierTypeInfo FMI_GENERATOR = {
* x is the evaluation 'time', and 'y' is the resultant value
*
* Functions available are
- * sin, cos, tan, sinc (normalized sin), natural log, square root
+ * sin, cos, tan, sinc (normalized sin), natural log, square root
*/
static void fcm_fn_generator_new_data(void *mdata)
@@ -460,8 +460,8 @@ static void fcm_envelope_evaluate(FCurve *UNUSED(fcu), FModifier *fcm, float *cv
}
/* adjust *cvalue
- * - fac is the ratio of how the current y-value corresponds to the reference range
- * - thus, the new value is found by mapping the old range to the new!
+ * - fac is the ratio of how the current y-value corresponds to the reference range
+ * - thus, the new value is found by mapping the old range to the new!
*/
fac = (*cvalue - (env->midval + env->min)) / (env->max - env->min);
*cvalue = min + fac * (max - min);
@@ -638,8 +638,8 @@ static float fcm_cycles_time(FModifierStackStorage *storage, FCurve *fcu, FModif
return evaltime;
/* check if modifier will do anything
- * 1) if in data range, definitely don't do anything
- * 2) if before first frame or after last frame, make sure some cycling is in use
+ * 1) if in data range, definitely don't do anything
+ * 2) if before first frame or after last frame, make sure some cycling is in use
*/
if (evaltime < prevkey[0]) {
if (data->before_mode) {
@@ -711,8 +711,8 @@ static float fcm_cycles_time(FModifierStackStorage *storage, FCurve *fcu, FModif
/* calculate where in the cycle we are (overwrite evaltime to reflect this) */
else if ((mode == FCM_EXTRAPOLATE_MIRROR) && ((int)(cycle + 1) % 2)) {
/* when 'mirror' option is used and cycle number is odd, this cycle is played in reverse
- * - for 'before' extrapolation, we need to flip in a different way, otherwise values past
- * then end of the curve get referenced (result of fmod will be negative, and with different phase)
+ * - for 'before' extrapolation, we need to flip in a different way, otherwise values past
+ * then end of the curve get referenced (result of fmod will be negative, and with different phase)
*/
if (side < 0)
evaltime = prevkey[0] - cyct;
@@ -795,8 +795,8 @@ static void fcm_noise_evaluate(FCurve *UNUSED(fcu), FModifier *fcm, float *cvalu
float noise;
/* generate noise using good ol' Blender Noise
- * - 0.1 is passed as the 'z' value, otherwise evaluation fails for size = phase = 1
- * with evaltime being an integer (which happens when evaluating on frame by frame basis)
+ * - 0.1 is passed as the 'z' value, otherwise evaluation fails for size = phase = 1
+ * with evaltime being an integer (which happens when evaluating on frame by frame basis)
*/
noise = BLI_turbulence(data->size, evaltime - data->offset, data->phase, 0.1f, data->depth);
@@ -891,7 +891,7 @@ static void fcm_python_evaluate(FCurve *UNUSED(fcu), FModifier *UNUSED(fcm), flo
//FMod_Python *data = (FMod_Python *)fcm->data;
/* FIXME... need to implement this modifier...
- * It will need it execute a script using the custom properties
+ * It will need it execute a script using the custom properties
*/
#endif /* WITH_PYTHON */
}
@@ -986,7 +986,7 @@ static float fcm_stepped_time(FCurve *UNUSED(fcu), FModifier *fcm, float UNUSED(
/* we snap to the start of the previous closest block of 'step_size' frames
* after the start offset has been discarded
- * - i.e. round down
+ * - i.e. round down
*/
snapblock = (int)((evaltime - data->offset) / data->step_size);
@@ -1264,8 +1264,8 @@ void set_active_fmodifier(ListBase *modifiers, FModifier *fcm)
}
/* Do we have any modifiers which match certain criteria
- * - mtype - type of modifier (if 0, doesn't matter)
- * - acttype - type of action to perform (if -1, doesn't matter)
+ * - mtype - type of modifier (if 0, doesn't matter)
+ * - acttype - type of action to perform (if -1, doesn't matter)
*/
bool list_has_suitable_fmodifier(ListBase *modifiers, int mtype, short acttype)
{
@@ -1284,7 +1284,7 @@ bool list_has_suitable_fmodifier(ListBase *modifiers, int mtype, short acttype)
const FModifierTypeInfo *fmi = fmodifier_get_typeinfo(fcm);
short mOk = 1, aOk = 1; /* by default 1, so that when only one test, won't fail */
- /* check if applicable ones are fullfilled */
+ /* check if applicable ones are fulfilled */
if (mtype)
mOk = (fcm->type == mtype);
if (acttype > -1)
@@ -1397,13 +1397,13 @@ static float eval_fmodifier_influence(FModifier *fcm, float evaltime)
}
/* evaluate time modifications imposed by some F-Curve Modifiers
- * - this step acts as an optimization to prevent the F-Curve stack being evaluated
- * several times by modifiers requesting the time be modified, as the final result
- * would have required using the modified time
- * - modifiers only ever receive the unmodified time, as subsequent modifiers should be
- * working on the 'global' result of the modified curve, not some localised segment,
- * so nevaltime gets set to whatever the last time-modifying modifier likes...
- * - we start from the end of the stack, as only the last one matters for now
+ * - this step acts as an optimization to prevent the F-Curve stack being evaluated
+ * several times by modifiers requesting the time be modified, as the final result
+ * would have required using the modified time
+ * - modifiers only ever receive the unmodified time, as subsequent modifiers should be
+ * working on the 'global' result of the modified curve, not some localised segment,
+ * so nevaltime gets set to whatever the last time-modifying modifier likes...
+ * - we start from the end of the stack, as only the last one matters for now
*
* Note: *fcu might be NULL
*/
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index cf2521509b5..e51b10a97a4 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -360,7 +360,7 @@ VFont *BKE_vfont_builtin_get(void)
static VChar *find_vfont_char(VFontData *vfd, unsigned int character)
{
- return BLI_ghash_lookup(vfd->characters, SET_UINT_IN_POINTER(character));
+ return BLI_ghash_lookup(vfd->characters, POINTER_FROM_UINT(character));
}
static void build_underline(Curve *cu, ListBase *nubase, const rctf *rect,
@@ -605,7 +605,7 @@ void BKE_vfont_select_clamp(Object *ob)
static float char_width(Curve *cu, VChar *che, CharInfo *info)
{
- /* The character wasn't found, propably ascii = 0, then the width shall be 0 as well */
+ /* The character wasn't found, probably ascii = 0, then the width shall be 0 as well */
if (che == NULL) {
return 0.0f;
}
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index e89508fd6c0..a0d759118ec 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -907,8 +907,8 @@ bGPDframe *BKE_gpencil_layer_find_frame(bGPDlayer *gpl, int cframe)
}
/* get the appropriate gp-frame from a given layer
- * - this sets the layer's actframe var (if allowed to)
- * - extension beyond range (if first gp-frame is after all frame in interest and cannot add)
+ * - this sets the layer's actframe var (if allowed to)
+ * - extension beyond range (if first gp-frame is after all frame in interest and cannot add)
*/
bGPDframe *BKE_gpencil_layer_getframe(bGPDlayer *gpl, int cframe, eGP_GetFrame_Mode addnew)
{
diff --git a/source/blender/blenkernel/intern/icons.c b/source/blender/blenkernel/intern/icons.c
index 071c10acaa5..e49f24c8120 100644
--- a/source/blender/blenkernel/intern/icons.c
+++ b/source/blender/blenkernel/intern/icons.c
@@ -107,7 +107,7 @@ static int get_next_free_id(void)
return gNextIconId++;
/* now we try to find the smallest icon id not stored in the gIcons hash */
- while (BLI_ghash_lookup(gIcons, SET_INT_IN_POINTER(startId)) && startId >= gFirstIconId)
+ while (BLI_ghash_lookup(gIcons, POINTER_FROM_INT(startId)) && startId >= gFirstIconId)
startId++;
/* if we found a suitable one that isn't used yet, return it */
@@ -161,7 +161,7 @@ void BKE_icons_deferred_free(void)
node != NULL;
node = node->next)
{
- BLI_ghash_remove(gIcons, SET_INT_IN_POINTER(node->icon_id), NULL, icon_free);
+ BLI_ghash_remove(gIcons, POINTER_FROM_INT(node->icon_id), NULL, icon_free);
}
BLI_linklist_lockfree_clear(&g_icon_delete_queue, MEM_freeN);
}
@@ -471,7 +471,7 @@ void BKE_icon_changed(const int icon_id)
if (!icon_id || G.background) return;
- icon = BLI_ghash_lookup(gIcons, SET_INT_IN_POINTER(icon_id));
+ icon = BLI_ghash_lookup(gIcons, POINTER_FROM_INT(icon_id));
if (icon) {
/* We *only* expect ID-tied icons here, not non-ID icon/preview! */
@@ -507,7 +507,7 @@ static int icon_id_ensure_create_icon(struct ID *id)
new_icon->drawinfo = NULL;
new_icon->drawinfo_free = NULL;
- BLI_ghash_insert(gIcons, SET_INT_IN_POINTER(id->icon_id), new_icon);
+ BLI_ghash_insert(gIcons, POINTER_FROM_INT(id->icon_id), new_icon);
return id->icon_id;
}
@@ -587,7 +587,7 @@ int BKE_icon_preview_ensure(ID *id, PreviewImage *preview)
new_icon->drawinfo = NULL;
new_icon->drawinfo_free = NULL;
- BLI_ghash_insert(gIcons, SET_INT_IN_POINTER(preview->icon_id), new_icon);
+ BLI_ghash_insert(gIcons, POINTER_FROM_INT(preview->icon_id), new_icon);
return preview->icon_id;
}
@@ -598,7 +598,7 @@ Icon *BKE_icon_get(const int icon_id)
Icon *icon = NULL;
- icon = BLI_ghash_lookup(gIcons, SET_INT_IN_POINTER(icon_id));
+ icon = BLI_ghash_lookup(gIcons, POINTER_FROM_INT(icon_id));
if (!icon) {
printf("%s: Internal error, no icon for icon ID: %d\n", __func__, icon_id);
@@ -614,7 +614,7 @@ void BKE_icon_set(const int icon_id, struct Icon *icon)
void **val_p;
- if (BLI_ghash_ensure_p(gIcons, SET_INT_IN_POINTER(icon_id), &val_p)) {
+ if (BLI_ghash_ensure_p(gIcons, POINTER_FROM_INT(icon_id), &val_p)) {
printf("%s: Internal error, icon already set: %d\n", __func__, icon_id);
return;
}
@@ -643,7 +643,7 @@ void BKE_icon_id_delete(struct ID *id)
}
BKE_icons_deferred_free();
- BLI_ghash_remove(gIcons, SET_INT_IN_POINTER(icon_id), NULL, icon_free);
+ BLI_ghash_remove(gIcons, POINTER_FROM_INT(icon_id), NULL, icon_free);
}
/**
@@ -655,7 +655,7 @@ void BKE_icon_delete(const int icon_id)
if (!icon_id) return; /* no icon defined for library object */
- icon = BLI_ghash_popkey(gIcons, SET_INT_IN_POINTER(icon_id), NULL);
+ icon = BLI_ghash_popkey(gIcons, POINTER_FROM_INT(icon_id), NULL);
if (icon) {
if (icon->id_type != 0) {
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index c520714b076..1d209dec935 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -1612,7 +1612,7 @@ typedef struct StampDataCustomField {
struct StampDataCustomField *next, *prev;
/* TODO(sergey): Think of better size here, maybe dynamically allocated even. */
char key[512];
- char value[512];
+ char *value;
/* TODO(sergey): Support non-string values. */
} StampDataCustomField;
@@ -2177,12 +2177,9 @@ void BKE_stamp_info_callback(void *data, struct StampData *stamp_data, StampCall
CALL(rendertime, "RenderTime");
CALL(memory, "Memory");
- for (StampDataCustomField *custom_field = stamp_data->custom_fields.first;
- custom_field != NULL;
- custom_field = custom_field->next)
- {
+ LISTBASE_FOREACH(StampDataCustomField *, custom_field, &stamp_data->custom_fields) {
if (noskip || custom_field->value[0]) {
- callback(data, custom_field->key, custom_field->value, sizeof(custom_field->value));
+ callback(data, custom_field->key, custom_field->value, strlen(custom_field->value) + 1);
}
}
@@ -2199,7 +2196,7 @@ void BKE_render_result_stamp_data(RenderResult *rr, const char *key, const char
StampDataCustomField *field = MEM_mallocN(sizeof(StampDataCustomField),
"StampData Custom Field");
STRNCPY(field->key, key);
- STRNCPY(field->value, value);
+ field->value = BLI_strdup(value);
BLI_addtail(&stamp_data->custom_fields, field);
}
@@ -2208,6 +2205,9 @@ void BKE_stamp_data_free(struct StampData *stamp_data)
if (stamp_data == NULL) {
return;
}
+ LISTBASE_FOREACH(StampDataCustomField *, custom_field, &stamp_data->custom_fields) {
+ MEM_freeN(custom_field->value);
+ }
BLI_freelistN(&stamp_data->custom_fields);
MEM_freeN(stamp_data);
}
@@ -2898,7 +2898,7 @@ static RenderPass *image_render_pass_get(RenderLayer *rl, const int pass, const
}
/* if layer or pass changes, we need an index for the imbufs list */
-/* note it is called for rendered results, but it doesnt use the index! */
+/* note it is called for rendered results, but it doesn't use the index! */
/* and because rendered results use fake layer/passes, don't correct for wrong indices here */
RenderPass *BKE_image_multilayer_index(RenderResult *rr, ImageUser *iuser)
{
@@ -2950,7 +2950,7 @@ void BKE_image_multiview_index(Image *ima, ImageUser *iuser)
}
/* if layer or pass changes, we need an index for the imbufs list */
-/* note it is called for rendered results, but it doesnt use the index! */
+/* note it is called for rendered results, but it doesn't use the index! */
/* and because rendered results use fake layer/passes, don't correct for wrong indices here */
bool BKE_image_is_multilayer(Image *ima)
{
@@ -3784,7 +3784,7 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **r_loc
*
* This is mainly to make it so color management treats byte buffer
* from render result with Save Buffers enabled as final display buffer
- * and doesnt' apply any color management on it.
+ * and doesn't apply any color management on it.
*
* For other cases we need to be sure it stays to default byte buffer space.
*/
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index fd8cb6d6d98..c11f2368197 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -503,7 +503,7 @@ static const char *texture_adrcodes_to_paths(int adrcode, int *array_index)
case TE_BRIGHT:
return "brightness";
case TE_CONTRA:
- return "constrast";
+ return "contrast";
}
return NULL;
@@ -811,13 +811,13 @@ static const char *particle_adrcodes_to_paths(int adrcode, int *array_index)
/* ------- */
/* Allocate memory for RNA-path for some property given a blocktype, adrcode, and 'root' parts of path
- * Input:
- * - id - the datablock that the curve's IPO block is attached to and/or which the new paths will start from
- * - blocktype, adrcode - determines setting to get
- * - actname, constname,seq - used to build path
- * Output:
- * - array_index - index in property's array (if applicable) to use
- * - return - the allocated path...
+ * Input:
+ * - id - the datablock that the curve's IPO block is attached to and/or which the new paths will start from
+ * - blocktype, adrcode - determines setting to get
+ * - actname, constname,seq - used to build path
+ * Output:
+ * - array_index - index in property's array (if applicable) to use
+ * - return - the allocated path...
*/
static char *get_rna_access(ID *id, int blocktype, int adrcode, char actname[], char constname[], Sequence *seq, int *array_index)
{
@@ -913,7 +913,7 @@ static char *get_rna_access(ID *id, int blocktype, int adrcode, char actname[],
}
/* check if any property found
- * - blocktype < 0 is special case for a specific type of driver, where we don't need a property name...
+ * - blocktype < 0 is special case for a specific type of driver, where we don't need a property name...
*/
if ((propname == NULL) && (blocktype > 0)) {
/* nothing was found, so exit */
@@ -1095,7 +1095,7 @@ static ChannelDriver *idriver_to_cdriver(IpoDriver *idriver)
}
/* Add F-Curve to the correct list
- * - grpname is needed to be used as group name where relevant, and is usually derived from actname
+ * - grpname is needed to be used as group name where relevant, and is usually derived from actname
*/
static void fcurve_add_to_list(ListBase *groups, ListBase *list, FCurve *fcu, char *grpname, int muteipo)
{
@@ -1153,8 +1153,8 @@ static void fcurve_add_to_list(ListBase *groups, ListBase *list, FCurve *fcu, ch
/* Convert IPO-Curve to F-Curve (including Driver data), and free any of the old data that
* is not relevant, BUT do not free the IPO-Curve itself...
- * actname: name of Action-Channel (if applicable) that IPO-Curve's IPO-block belonged to
- * constname: name of Constraint-Channel (if applicable) that IPO-Curve's IPO-block belonged to
+ * actname: name of Action-Channel (if applicable) that IPO-Curve's IPO-block belonged to
+ * constname: name of Constraint-Channel (if applicable) that IPO-Curve's IPO-block belonged to
* seq: sequencer-strip (if applicable) that IPO-Curve's IPO-block belonged to
*/
static void icu_to_fcurves(ID *id, ListBase *groups, ListBase *list, IpoCurve *icu, char *actname, char *constname, Sequence *seq, int muteipo)
@@ -1237,8 +1237,8 @@ static void icu_to_fcurves(ID *id, ListBase *groups, ListBase *list, IpoCurve *i
fcurve->array_index = abp->array_index;
/* convert keyframes
- * - beztriples and bpoints are mutually exclusive, so we won't have both at the same time
- * - beztriples are more likely to be encountered as they are keyframes (the other type wasn't used yet)
+ * - beztriples and bpoints are mutually exclusive, so we won't have both at the same time
+ * - beztriples are more likely to be encountered as they are keyframes (the other type wasn't used yet)
*/
fcurve->totvert = icu->totvert;
@@ -1286,15 +1286,15 @@ static void icu_to_fcurves(ID *id, ListBase *groups, ListBase *list, IpoCurve *i
unsigned int i = 0;
/* get rna-path
- * - we will need to set the 'disabled' flag if no path is able to be made (for now)
+ * - we will need to set the 'disabled' flag if no path is able to be made (for now)
*/
fcu->rna_path = get_rna_access(id, icu->blocktype, icu->adrcode, actname, constname, seq, &fcu->array_index);
if (fcu->rna_path == NULL)
fcu->flag |= FCURVE_DISABLED;
/* convert keyframes
- * - beztriples and bpoints are mutually exclusive, so we won't have both at the same time
- * - beztriples are more likely to be encountered as they are keyframes (the other type wasn't used yet)
+ * - beztriples and bpoints are mutually exclusive, so we won't have both at the same time
+ * - beztriples are more likely to be encountered as they are keyframes (the other type wasn't used yet)
*/
fcu->totvert = icu->totvert;
@@ -1323,8 +1323,8 @@ static void icu_to_fcurves(ID *id, ListBase *groups, ListBase *list, IpoCurve *i
}
/* correct values for euler rotation curves
- * - they were degrees/10
- * - we need radians for RNA to do the right thing
+ * - they were degrees/10
+ * - we need radians for RNA to do the right thing
*/
if ( ((icu->blocktype == ID_OB) && ELEM(icu->adrcode, OB_ROT_X, OB_ROT_Y, OB_ROT_Z)) ||
((icu->blocktype == ID_PO) && ELEM(icu->adrcode, AC_EUL_X, AC_EUL_Y, AC_EUL_Z)) )
@@ -1337,8 +1337,8 @@ static void icu_to_fcurves(ID *id, ListBase *groups, ListBase *list, IpoCurve *i
}
/* correct values for path speed curves
- * - their values were 0-1
- * - we now need as 'frames'
+ * - their values were 0-1
+ * - we now need as 'frames'
*/
if ( (id) && (icu->blocktype == GS(id->name)) &&
(fcu->rna_path && STREQ(fcu->rna_path, "eval_time")) )
@@ -1351,9 +1351,9 @@ static void icu_to_fcurves(ID *id, ListBase *groups, ListBase *list, IpoCurve *i
}
/* correct times for rotation drivers
- * - need to go from degrees to radians...
- * - there's only really 1 target to worry about
- * - were also degrees/10
+ * - need to go from degrees to radians...
+ * - there's only really 1 target to worry about
+ * - were also degrees/10
*/
if (fcu->driver && fcu->driver->variables.first) {
DriverVar *dvar = fcu->driver->variables.first;
@@ -1412,10 +1412,10 @@ static void ipo_to_animato(ID *id, Ipo *ipo, char actname[], char constname[], S
if (G.debug & G_DEBUG) printf("ipo_to_animato\n");
/* validate actname and constname
- * - clear actname if it was one of the generic <builtin> ones (i.e. 'Object', or 'Shapes')
- * - actname can then be used to assign F-Curves in Action to Action Groups
- * (i.e. thus keeping the benefits that used to be provided by Action Channels for grouping
- * F-Curves for bones). This may be added later... for now let's just dump without them...
+ * - clear actname if it was one of the generic <builtin> ones (i.e. 'Object', or 'Shapes')
+ * - actname can then be used to assign F-Curves in Action to Action Groups
+ * (i.e. thus keeping the benefits that used to be provided by Action Channels for grouping
+ * F-Curves for bones). This may be added later... for now let's just dump without them...
*/
if (actname) {
if ((ipo->blocktype == ID_OB) && STREQ(actname, "Object"))
@@ -1623,8 +1623,8 @@ static void nlastrips_to_animdata(ID *id, ListBase *strips)
/* create a new-style NLA-strip which references this Action, then copy over relevant settings */
{
/* init a new strip, and assign the action to it
- * - no need to muck around with the user-counts, since this is just
- * passing over the ref to the new owner, not creating an additional ref
+ * - no need to muck around with the user-counts, since this is just
+ * passing over the ref to the new owner, not creating an additional ref
*/
strip = MEM_callocN(sizeof(NlaStrip), "NlaStrip");
strip->act = as->act;
diff --git a/source/blender/blenkernel/intern/lamp.c b/source/blender/blenkernel/intern/lamp.c
index b8ebdd9cda5..84a8e11bdc8 100644
--- a/source/blender/blenkernel/intern/lamp.c
+++ b/source/blender/blenkernel/intern/lamp.c
@@ -157,12 +157,15 @@ Lamp *BKE_lamp_copy(Main *bmain, const Lamp *la)
Lamp *BKE_lamp_localize(Lamp *la)
{
- /* TODO replace with something like
- * Lamp *la_copy;
- * BKE_id_copy_ex(bmain, &la->id, (ID **)&la_copy, LIB_ID_COPY_NO_MAIN | LIB_ID_COPY_NO_PREVIEW | LIB_ID_COPY_NO_USER_REFCOUNT, false);
- * return la_copy;
+ /* TODO(bastien): Replace with something like:
*
- * ... Once f*** nodes are fully converted to that too :( */
+ * Lamp *la_copy;
+ * BKE_id_copy_ex(bmain, &la->id, (ID **)&la_copy,
+ * LIB_ID_COPY_NO_MAIN | LIB_ID_COPY_NO_PREVIEW | LIB_ID_COPY_NO_USER_REFCOUNT,
+ * false);
+ * return la_copy;
+ *
+ * NOTE: Only possible once nested node trees are fully converted to that too. */
Lamp *lan;
int a;
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 0eb943cc15b..a6cee54d81f 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -286,7 +286,7 @@ static int id_expand_local_callback(
return IDWALK_RET_NOP;
}
- /* Can hapen that we get unlinkable ID here, e.g. with shapekey referring to itself (through drivers)...
+ /* Can happen that we get unlinkable ID here, e.g. with shapekey referring to itself (through drivers)...
* Just skip it, shape key can only be either indirectly linked, or fully local, period.
* And let's curse one more time that stupid useless shapekey ID type! */
if (*id_pointer && *id_pointer != id_self && BKE_idcode_is_linkable(GS((*id_pointer)->name))) {
diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c
index 2819b0312aa..f791d9a6591 100644
--- a/source/blender/blenkernel/intern/library_remap.c
+++ b/source/blender/blenkernel/intern/library_remap.c
@@ -499,7 +499,7 @@ ATTR_NONNULL(1) static void libblock_remap_data(
}
#ifdef DEBUG_PRINT
- printf("%s: %d occurences skipped (%d direct and %d indirect ones)\n", __func__,
+ printf("%s: %d occurrences skipped (%d direct and %d indirect ones)\n", __func__,
r_id_remap_data->skipped_direct + r_id_remap_data->skipped_indirect,
r_id_remap_data->skipped_direct, r_id_remap_data->skipped_indirect);
#endif
diff --git a/source/blender/blenkernel/intern/mask_rasterize.c b/source/blender/blenkernel/intern/mask_rasterize.c
index 76d16334630..2f2b82a00eb 100644
--- a/source/blender/blenkernel/intern/mask_rasterize.c
+++ b/source/blender/blenkernel/intern/mask_rasterize.c
@@ -35,7 +35,7 @@
* - free the handle.
*
* This file is admittedly a bit confusticated, in quite few areas speed was chosen over readability,
- * though it is commented - so shouldn't be so hard to see whats going on.
+ * though it is commented - so shouldn't be so hard to see what's going on.
*
*
* Implementation:
@@ -486,7 +486,7 @@ static void layer_bucket_init(MaskRasterLayer *layer, const float pixel_size)
unsigned int xi_max = (unsigned int) ((xmax - layer->bounds.xmin) * layer->buckets_xy_scalar[0]);
unsigned int yi_min = (unsigned int) ((ymin - layer->bounds.ymin) * layer->buckets_xy_scalar[1]);
unsigned int yi_max = (unsigned int) ((ymax - layer->bounds.ymin) * layer->buckets_xy_scalar[1]);
- void *face_index_void = SET_UINT_IN_POINTER(face_index);
+ void *face_index_void = POINTER_FROM_UINT(face_index);
unsigned int xi, yi;
@@ -538,7 +538,7 @@ static void layer_bucket_init(MaskRasterLayer *layer, const float pixel_size)
buckets_face[bucket_index] = bucket;
for (bucket_node = bucketstore[bucket_index]; bucket_node; bucket_node = bucket_node->next) {
- *bucket = GET_UINT_FROM_POINTER(bucket_node->link);
+ *bucket = POINTER_AS_UINT(bucket_node->link);
bucket++;
}
*bucket = TRI_TERMINATOR_ID;
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 91658a140f0..3414d08b8e7 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -273,12 +273,15 @@ Material *BKE_material_copy(Main *bmain, const Material *ma)
/* XXX (see above) material copy without adding to main dbase */
Material *BKE_material_localize(Material *ma)
{
- /* TODO replace with something like
- * Material *ma_copy;
- * BKE_id_copy_ex(bmain, &ma->id, (ID **)&ma_copy, LIB_ID_COPY_NO_MAIN | LIB_ID_COPY_NO_PREVIEW | LIB_ID_COPY_NO_USER_REFCOUNT, false);
- * return ma_copy;
+ /* TODO(bastien): Replace with something like:
*
- * ... Once f*** nodes are fully converted to that too :( */
+ * Material *ma_copy;
+ * BKE_id_copy_ex(bmain, &ma->id, (ID **)&ma_copy,
+ * LIB_ID_COPY_NO_MAIN | LIB_ID_COPY_NO_PREVIEW | LIB_ID_COPY_NO_USER_REFCOUNT,
+ * false);
+ * return ma_copy;
+ *
+ * NOTE: Only possible once nested node trees are fully converted to that too. */
Material *man;
int a;
@@ -844,7 +847,7 @@ void BKE_material_remap_object_calc(
for (int i = 0; i < ob_dst->totcol; i++) {
Material *ma_src = give_current_material(ob_dst, i + 1);
- BLI_ghash_reinsert(gh_mat_map, ma_src, SET_INT_IN_POINTER(i), NULL, NULL);
+ BLI_ghash_reinsert(gh_mat_map, ma_src, POINTER_FROM_INT(i), NULL, NULL);
}
/* setup default mapping (when materials don't match) */
@@ -874,7 +877,7 @@ void BKE_material_remap_object_calc(
else {
void **index_src_p = BLI_ghash_lookup_p(gh_mat_map, ma_src);
if (index_src_p) {
- remap_src_to_dst[i] = GET_INT_FROM_POINTER(*index_src_p);
+ remap_src_to_dst[i] = POINTER_AS_INT(*index_src_p);
}
}
}
diff --git a/source/blender/blenkernel/intern/mball_tessellate.c b/source/blender/blenkernel/intern/mball_tessellate.c
index cc82d12a776..840062df3a3 100644
--- a/source/blender/blenkernel/intern/mball_tessellate.c
+++ b/source/blender/blenkernel/intern/mball_tessellate.c
@@ -447,18 +447,18 @@ static void freepolygonize(PROCESS *process)
/**** Cubical Polygonization (optional) ****/
-#define LB 0 /* left bottom edge */
-#define LT 1 /* left top edge */
-#define LN 2 /* left near edge */
-#define LF 3 /* left far edge */
+#define LB 0 /* left bottom edge */
+#define LT 1 /* left top edge */
+#define LN 2 /* left near edge */
+#define LF 3 /* left far edge */
#define RB 4 /* right bottom edge */
-#define RT 5 /* right top edge */
-#define RN 6 /* right near edge */
-#define RF 7 /* right far edge */
-#define BN 8 /* bottom near edge */
-#define BF 9 /* bottom far edge */
-#define TN 10 /* top near edge */
-#define TF 11 /* top far edge */
+#define RT 5 /* right top edge */
+#define RN 6 /* right near edge */
+#define RF 7 /* right far edge */
+#define BN 8 /* bottom near edge */
+#define BF 9 /* bottom far edge */
+#define TN 10 /* top near edge */
+#define TF 11 /* top far edge */
static INTLISTS *cubetable[256];
static char faces[256];
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index 6d481472074..5758e00a28d 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -152,7 +152,7 @@ static int customdata_compare(CustomData *c1, CustomData *c2, Mesh *m1, Mesh *m2
for (j = 0; j < vtot; j++, v1++, v2++) {
if (len_squared_v3v3(v1->co, v2->co) > thresh_sq)
return MESHCMP_VERTCOMISMATCH;
- /* I don't care about normals, let's just do coodinates */
+ /* I don't care about normals, let's just do coordinates */
}
}
@@ -1445,7 +1445,7 @@ static int split_faces_prepare_new_verts(
if ((*lnor_space)->flags & MLNOR_SPACE_IS_SINGLE) {
/* Single loop in this fan... */
- BLI_assert(GET_INT_FROM_POINTER((*lnor_space)->loops) == loop_idx);
+ BLI_assert(POINTER_AS_INT((*lnor_space)->loops) == loop_idx);
BLI_BITMAP_ENABLE(done_loops, loop_idx);
if (vert_used) {
ml->v = new_vert_idx;
@@ -1453,7 +1453,7 @@ static int split_faces_prepare_new_verts(
}
else {
for (LinkNode *lnode = (*lnor_space)->loops; lnode; lnode = lnode->next) {
- const int ml_fan_idx = GET_INT_FROM_POINTER(lnode->link);
+ const int ml_fan_idx = POINTER_AS_INT(lnode->link);
BLI_BITMAP_ENABLE(done_loops, ml_fan_idx);
if (vert_used) {
mloop[ml_fan_idx].v = new_vert_idx;
@@ -1514,7 +1514,7 @@ static int split_faces_prepare_new_edges(
if (BLI_BITMAP_TEST(edges_used, edge_idx)) {
/* Original edge has already been used, we need to define a new one. */
const int new_edge_idx = num_edges++;
- *eval = SET_INT_IN_POINTER(new_edge_idx);
+ *eval = POINTER_FROM_INT(new_edge_idx);
ml_prev->e = new_edge_idx;
SplitFaceNewEdge *new_edge = BLI_memarena_alloc(memarena, sizeof(*new_edge));
@@ -1529,13 +1529,13 @@ static int split_faces_prepare_new_edges(
/* We can re-use original edge. */
medge[edge_idx].v1 = ml_prev->v;
medge[edge_idx].v2 = ml->v;
- *eval = SET_INT_IN_POINTER(edge_idx);
+ *eval = POINTER_FROM_INT(edge_idx);
BLI_BITMAP_ENABLE(edges_used, edge_idx);
}
}
else {
/* Edge already known, just update loop's edge index. */
- ml_prev->e = GET_INT_FROM_POINTER(*eval);
+ ml_prev->e = POINTER_AS_INT(*eval);
}
ml_prev = ml;
diff --git a/source/blender/blenkernel/intern/mesh_convert.c b/source/blender/blenkernel/intern/mesh_convert.c
index c801c5dcb01..bfee7f3924c 100644
--- a/source/blender/blenkernel/intern/mesh_convert.c
+++ b/source/blender/blenkernel/intern/mesh_convert.c
@@ -145,7 +145,7 @@ static void make_edges_mdata_extend(
totedge_new = BLI_edgehash_len(eh);
#ifdef DEBUG
- /* ensure that theres no overlap! */
+ /* ensure that there's no overlap! */
if (totedge_new) {
MEdge *medge = *r_alledge;
for (i = 0; i < totedge; i++, medge++) {
@@ -171,7 +171,7 @@ static void make_edges_mdata_extend(
BLI_edgehashIterator_step(ehi), ++medge, e_index++)
{
BLI_edgehashIterator_getKey(ehi, &medge->v1, &medge->v2);
- BLI_edgehashIterator_setValue(ehi, SET_UINT_IN_POINTER(e_index));
+ BLI_edgehashIterator_setValue(ehi, POINTER_FROM_UINT(e_index));
medge->crease = medge->bweight = 0;
medge->flag = ME_EDGEDRAW | ME_EDGERENDER;
@@ -187,7 +187,7 @@ static void make_edges_mdata_extend(
int j;
for (j = 0; j < mp->totloop; j++, l++) {
/* lookup hashed edge index */
- l_prev->e = GET_UINT_FROM_POINTER(BLI_edgehash_lookup(eh, l_prev->v, l->v));
+ l_prev->e = POINTER_AS_UINT(BLI_edgehash_lookup(eh, l_prev->v, l->v));
l_prev = l;
}
}
diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c
index 279ab777529..e3b1f20e583 100644
--- a/source/blender/blenkernel/intern/mesh_evaluate.c
+++ b/source/blender/blenkernel/intern/mesh_evaluate.c
@@ -569,7 +569,7 @@ void BKE_lnor_space_add_loop(
lnors_spacearr->lspacearr[ml_index] = lnor_space;
if (bm_loop == NULL) {
- bm_loop = SET_INT_IN_POINTER(ml_index);
+ bm_loop = POINTER_FROM_INT(ml_index);
}
if (is_single) {
BLI_assert(lnor_space->loops == NULL);
@@ -1658,7 +1658,7 @@ static void mesh_normals_loop_custom_set(
const float *org_nor = NULL;
while (loops) {
- const int lidx = GET_INT_FROM_POINTER(loops->link);
+ const int lidx = POINTER_AS_INT(loops->link);
MLoop *ml = &mloops[lidx];
const int nidx = lidx;
float *nor = r_custom_loopnors[nidx];
@@ -1689,7 +1689,7 @@ static void mesh_normals_loop_custom_set(
* See T45984. */
loops = lnors_spacearr.lspacearr[i]->loops;
if (loops && org_nor) {
- const int lidx = GET_INT_FROM_POINTER(loops->link);
+ const int lidx = POINTER_AS_INT(loops->link);
MLoop *ml = &mloops[lidx];
const int nidx = lidx;
float *nor = r_custom_loopnors[nidx];
@@ -1731,7 +1731,7 @@ static void mesh_normals_loop_custom_set(
*/
LinkNode *loops = lnors_spacearr.lspacearr[i]->loops;
if (lnors_spacearr.lspacearr[i]->flags & MLNOR_SPACE_IS_SINGLE) {
- BLI_assert(GET_INT_FROM_POINTER(loops) == i);
+ BLI_assert(POINTER_AS_INT(loops) == i);
const int nidx = use_vertices ? (int)mloops[i].v : i;
float *nor = r_custom_loopnors[nidx];
@@ -1745,7 +1745,7 @@ static void mesh_normals_loop_custom_set(
zero_v3(avg_nor);
while (loops) {
- const int lidx = GET_INT_FROM_POINTER(loops->link);
+ const int lidx = POINTER_AS_INT(loops->link);
const int nidx = use_vertices ? (int)mloops[lidx].v : lidx;
float *nor = r_custom_loopnors[nidx];
@@ -2424,7 +2424,7 @@ bool BKE_mesh_center_of_volume(const Mesh *me, float r_cent[3])
}
/* otherwise we get NAN for 0 polys */
if (total_volume != 0.0f) {
- /* multipy by 0.25 to get the correct centroid */
+ /* multiply by 0.25 to get the correct centroid */
/* no need to divide volume by 6 as the centroid is weighted by 6x the volume, so it all cancels out */
mul_v3_fl(r_cent, 0.25f / total_volume);
}
@@ -3356,7 +3356,7 @@ void BKE_mesh_convert_mfaces_to_mpolys_ex(
/* build edge hash */
me = medge;
for (i = 0; i < totedge_i; i++, me++) {
- BLI_edgehash_insert(eh, me->v1, me->v2, SET_UINT_IN_POINTER(i));
+ BLI_edgehash_insert(eh, me->v1, me->v2, POINTER_FROM_UINT(i));
/* unrelated but avoid having the FGON flag enabled, so we can reuse it later for something else */
me->flag &= ~ME_FGON;
@@ -3378,7 +3378,7 @@ void BKE_mesh_convert_mfaces_to_mpolys_ex(
# define ML(v1, v2) { \
ml->v = mf->v1; \
- ml->e = GET_UINT_FROM_POINTER(BLI_edgehash_lookup(eh, mf->v1, mf->v2)); \
+ ml->e = POINTER_AS_UINT(BLI_edgehash_lookup(eh, mf->v1, mf->v2)); \
ml++; j++; \
} (void)0
diff --git a/source/blender/blenkernel/intern/mesh_mapping.c b/source/blender/blenkernel/intern/mesh_mapping.c
index 5c9849f6b74..2d82a5102b0 100644
--- a/source/blender/blenkernel/intern/mesh_mapping.c
+++ b/source/blender/blenkernel/intern/mesh_mapping.c
@@ -1109,7 +1109,7 @@ bool BKE_mesh_calc_islands_loop_poly_edgeseam(
*
* \note If no MLoopUV layer is passed, we only consider edges tagged as seams as UV boundaries.
* This has the advantages of simplicity, and being valid/common to all UV maps.
- * However, it means actual UV islands whithout matching UV seams will not be handled correctly...
+ * However, it means actual UV islands without matching UV seams will not be handled correctly...
* If a valid UV layer is passed as \a luvs parameter, UV coordinates are also used to detect islands boundaries.
*
* \note All this could be optimized...
diff --git a/source/blender/blenkernel/intern/mesh_remap.c b/source/blender/blenkernel/intern/mesh_remap.c
index 77aefc04f5f..62c81bf8cba 100644
--- a/source/blender/blenkernel/intern/mesh_remap.c
+++ b/source/blender/blenkernel/intern/mesh_remap.c
@@ -281,7 +281,7 @@ void BKE_mesh_remap_find_best_match_from_dm(
best_match = match;
copy_m4_m4(best_mat_dst, mat_dst);
- /* And now, we have to check the otehr sixth possible mirrored versions... */
+ /* And now, we have to check the other sixth possible mirrored versions... */
for (mirr = mirrors; (*mirr)[0]; mirr++) {
mul_v3_fl(mat_dst[0], (*mirr)[0]);
mul_v3_fl(mat_dst[1], (*mirr)[1]);
@@ -972,7 +972,7 @@ static void mesh_island_to_astar_graph_edge_process(
const int pidx = edge_to_poly_map[edge_idx].indices[i];
MPoly *mp = &polys[pidx];
const int pidx_isld = islands ? poly_island_index_map[pidx] : pidx;
- void *custom_data = is_edge_innercut ? SET_INT_IN_POINTER(edge_idx) : SET_INT_IN_POINTER(-1);
+ void *custom_data = is_edge_innercut ? POINTER_FROM_INT(edge_idx) : POINTER_FROM_INT(-1);
if (UNLIKELY(islands && (islands->items_to_islands[mp->loopstart] != island_index))) {
/* poly not in current island, happens with border edges... */
@@ -1088,12 +1088,12 @@ static float mesh_remap_calc_loops_astar_f_cost(
{
float *co_next, *co_dest;
- if (link && (GET_INT_FROM_POINTER(link->custom_data) != -1)) {
+ if (link && (POINTER_AS_INT(link->custom_data) != -1)) {
/* An innercut edge... We tag our solution as potentially crossing innercuts.
* Note it might not be the case in the end (AStar will explore around optimal path), but helps
* trimming off some processing later... */
- if (!GET_INT_FROM_POINTER(as_solution->custom_data)) {
- as_solution->custom_data = SET_INT_IN_POINTER(true);
+ if (!POINTER_AS_INT(as_solution->custom_data)) {
+ as_solution->custom_data = POINTER_FROM_INT(true);
}
}
@@ -1691,7 +1691,7 @@ void BKE_mesh_remap_calc_loops_from_dm(
continue;
}
- as_solution.custom_data = SET_INT_IN_POINTER(false);
+ as_solution.custom_data = POINTER_FROM_INT(false);
isld_res = &islands_res[best_island_index][plidx_dst];
if (use_from_vert) {
@@ -1714,7 +1714,7 @@ void BKE_mesh_remap_calc_loops_from_dm(
BLI_astar_graph_solve(
as_graph, pidx_isld_src_prev, pidx_isld_src,
mesh_remap_calc_loops_astar_f_cost, &as_solution, isld_steps_src);
- if (GET_INT_FROM_POINTER(as_solution.custom_data) && (as_solution.steps > 0)) {
+ if (POINTER_AS_INT(as_solution.custom_data) && (as_solution.steps > 0)) {
/* Find first 'cutting edge' on path, and bring back lidx_src on poly just
* before that edge.
* Note we could try to be much smarter (like e.g. storing a whole poly's indices,
@@ -1726,7 +1726,7 @@ void BKE_mesh_remap_calc_loops_from_dm(
/* Note we go backward here, from dest to src poly. */
for (i = as_solution.steps - 1; i--;) {
BLI_AStarGNLink *as_link = as_solution.prev_links[pidx_isld_src];
- const int eidx = GET_INT_FROM_POINTER(as_link->custom_data);
+ const int eidx = POINTER_AS_INT(as_link->custom_data);
pidx_isld_src = as_solution.prev_nodes[pidx_isld_src];
BLI_assert(pidx_isld_src != -1);
if (eidx != -1) {
@@ -1799,7 +1799,7 @@ void BKE_mesh_remap_calc_loops_from_dm(
BLI_astar_graph_solve(
as_graph, pidx_isld_src_prev, pidx_isld_src,
mesh_remap_calc_loops_astar_f_cost, &as_solution, isld_steps_src);
- if (GET_INT_FROM_POINTER(as_solution.custom_data) && (as_solution.steps > 0)) {
+ if (POINTER_AS_INT(as_solution.custom_data) && (as_solution.steps > 0)) {
/* Find first 'cutting edge' on path, and bring back lidx_src on poly just
* before that edge.
* Note we could try to be much smarter (like e.g. storing a whole poly's indices,
@@ -1811,7 +1811,7 @@ void BKE_mesh_remap_calc_loops_from_dm(
/* Note we go backward here, from dest to src poly. */
for (i = as_solution.steps - 1; i--;) {
BLI_AStarGNLink *as_link = as_solution.prev_links[pidx_isld_src];
- int eidx = GET_INT_FROM_POINTER(as_link->custom_data);
+ int eidx = POINTER_AS_INT(as_link->custom_data);
pidx_isld_src = as_solution.prev_nodes[pidx_isld_src];
BLI_assert(pidx_isld_src != -1);
diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c
index 5c835bbf0fa..82b3edb5b49 100644
--- a/source/blender/blenkernel/intern/mesh_validate.c
+++ b/source/blender/blenkernel/intern/mesh_validate.c
@@ -326,13 +326,13 @@ bool BKE_mesh_validate_arrays(
if ((me->v1 != me->v2) && BLI_edgehash_haskey(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)));
+ POINTER_AS_INT(BLI_edgehash_lookup(edge_hash, me->v1, me->v2)));
remove = do_fixes;
}
if (remove == false) {
if (me->v1 != me->v2) {
- BLI_edgehash_insert(edge_hash, me->v1, me->v2, SET_INT_IN_POINTER(i));
+ BLI_edgehash_insert(edge_hash, me->v1, me->v2, POINTER_FROM_INT(i));
}
}
else {
@@ -362,7 +362,7 @@ bool BKE_mesh_validate_arrays(
SortFace *sf_prev;
unsigned int totsortface = 0;
- PRINT_ERR("No Polys, only tesselated Faces\n");
+ PRINT_ERR("No Polys, only tessellated Faces\n");
for (i = 0, mf = mfaces, sf = sort_faces; i < totface; i++, mf++) {
bool remove = false;
@@ -566,7 +566,7 @@ bool BKE_mesh_validate_arrays(
* We already know from previous text that a valid edge exists, use it (if allowed)! */
if (do_fixes) {
int prev_e = ml->e;
- ml->e = GET_INT_FROM_POINTER(BLI_edgehash_lookup(edge_hash, v1, v2));
+ ml->e = POINTER_AS_INT(BLI_edgehash_lookup(edge_hash, v1, v2));
fix_flag.loops_edge = true;
PRINT_ERR("\tLoop %u has invalid edge reference (%d), fixed using edge %u\n",
sp->loopstart + j, prev_e, ml->e);
@@ -583,7 +583,7 @@ bool BKE_mesh_validate_arrays(
* and we already know from previous test that a valid one exists, use it (if allowed)! */
if (do_fixes) {
int prev_e = ml->e;
- ml->e = GET_INT_FROM_POINTER(BLI_edgehash_lookup(edge_hash, v1, v2));
+ ml->e = POINTER_AS_INT(BLI_edgehash_lookup(edge_hash, v1, v2));
fix_flag.loops_edge = true;
PRINT_ERR("\tPoly %u has invalid edge reference (%d, is_removed: %d), fixed using edge %u\n",
sp->index, prev_e, IS_REMOVED_EDGE(me), ml->e);
@@ -1390,7 +1390,7 @@ static void mesh_calc_edges_mdata(
/* 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));
+ BLI_edgehash_insert(hash, med->v1, med->v2, POINTER_FROM_UINT(edge_index));
}
mpoly = allpoly;
@@ -1402,7 +1402,7 @@ static void mesh_calc_edges_mdata(
ml = &ml_next[i - 1]; /* last loop */
while (i-- != 0) {
- ml->e = GET_UINT_FROM_POINTER(BLI_edgehash_lookup(hash, ml->v, ml_next->v));
+ ml->e = POINTER_AS_UINT(BLI_edgehash_lookup(hash, ml->v, ml_next->v));
ml = ml_next;
ml_next++;
}
@@ -1511,7 +1511,7 @@ void BKE_mesh_calc_edges(Mesh *mesh, bool update, const bool select)
}
/* store the new edge index in the hash value */
- BLI_edgehashIterator_setValue(ehi, SET_INT_IN_POINTER(i));
+ BLI_edgehashIterator_setValue(ehi, POINTER_FROM_INT(i));
}
BLI_edgehashIterator_free(ehi);
@@ -1524,7 +1524,7 @@ void BKE_mesh_calc_edges(Mesh *mesh, bool update, const bool select)
int j;
for (j = 0; j < mp->totloop; j++, l++) {
/* lookup hashed edge index */
- med_index = GET_INT_FROM_POINTER(BLI_edgehash_lookup(eh, l_prev->v, l->v));
+ med_index = POINTER_AS_INT(BLI_edgehash_lookup(eh, l_prev->v, l->v));
l_prev->e = med_index;
l_prev = l;
}
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index 9fc3fc4ba64..723b4a5aa97 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -287,7 +287,7 @@ void modifier_copyData_generic(const ModifierData *md_src, ModifierData *md_dst)
{
const ModifierTypeInfo *mti = modifierType_getInfo(md_src->type);
- /* md_dst may have alredy be fully initialized with some extra allocated data,
+ /* md_dst may have already be fully initialized with some extra allocated data,
* we need to free it now to avoid memleak. */
if (mti->freeData) {
mti->freeData(md_dst);
@@ -754,7 +754,7 @@ void test_object_modifiers(Object *ob)
}
}
-/* where should this go?, it doesnt fit well anywhere :S - campbell */
+/* where should this go?, it doesn't fit well anywhere :S - campbell */
/* elubie: changed this to default to the same dir as the render output
* to prevent saving to C:\ on Windows */
diff --git a/source/blender/blenkernel/intern/modifiers_bmesh.c b/source/blender/blenkernel/intern/modifiers_bmesh.c
index a1172d3f110..4de876f1060 100644
--- a/source/blender/blenkernel/intern/modifiers_bmesh.c
+++ b/source/blender/blenkernel/intern/modifiers_bmesh.c
@@ -106,7 +106,7 @@ void DM_to_bmesh_ex(DerivedMesh *dm, BMesh *bm, const bool calc_face_normal)
/*do verts*/
bool vert_allocated;
- mv = mvert = DM_get_vert_array(dm, &vert_allocated);;
+ mv = mvert = DM_get_vert_array(dm, &vert_allocated);
for (i = 0; i < totvert; i++, mv++) {
v = BM_vert_create(bm, mv->co, NULL, BM_CREATE_SKIP_CD);
normal_short_to_float_v3(v->no, mv->no);
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index f91d88a8a4a..2f0af028abd 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -254,7 +254,7 @@ void BKE_nla_tracks_copy(Main *bmain, ListBase *dst, ListBase *src)
/* Adding ------------------------------------------- */
/* Add a NLA Track to the given AnimData
- * - prev: NLA-Track to add the new one after
+ * - prev: NLA-Track to add the new one after
*/
NlaTrack *BKE_nlatrack_add(AnimData *adt, NlaTrack *prev)
{
@@ -299,11 +299,11 @@ NlaStrip *BKE_nlastrip_new(bAction *act)
strip = MEM_callocN(sizeof(NlaStrip), "NlaStrip");
/* generic settings
- * - selected flag to highlight this to the user
- * - (XXX) disabled Auto-Blends, as this was often causing some unwanted effects
- * - (XXX) synchronization of strip-length in accordance with changes to action-length
- * is not done though, since this should only really happens in editmode for strips now
- * though this decision is still subject to further review...
+ * - selected flag to highlight this to the user
+ * - (XXX) disabled Auto-Blends, as this was often causing some unwanted effects
+ * - (XXX) synchronization of strip-length in accordance with changes to action-length
+ * is not done though, since this should only really happens in editmode for strips now
+ * though this decision is still subject to further review...
*/
strip->flag = NLASTRIP_FLAG_SELECT;
@@ -312,7 +312,7 @@ NlaStrip *BKE_nlastrip_new(bAction *act)
id_us_plus(&act->id);
/* determine initial range
- * - strip length cannot be 0... ever...
+ * - strip length cannot be 0... ever...
*/
calc_action_range(strip->act, &strip->actstart, &strip->actend, 0);
@@ -401,7 +401,7 @@ NlaStrip *BKE_nla_add_soundstrip(Scene *scene, Speaker *speaker)
/* Strip Mapping ------------------------------------- */
/* non clipped mapping for strip-time <-> global time (for Action-Clips)
- * invert = convert action-strip time to global time
+ * invert = convert action-strip time to global time
*/
static float nlastrip_get_frame_actionclip(NlaStrip *strip, float cframe, short mode)
{
@@ -471,7 +471,7 @@ static float nlastrip_get_frame_actionclip(NlaStrip *strip, float cframe, short
}
/* non clipped mapping for strip-time <-> global time (for Transitions)
- * invert = convert action-strip time to global time
+ * invert = convert action-strip time to global time
*/
static float nlastrip_get_frame_transition(NlaStrip *strip, float cframe, short mode)
{
@@ -516,7 +516,7 @@ float nlastrip_get_frame(NlaStrip *strip, float cframe, short mode)
/* Non clipped mapping for strip-time <-> global time
- * mode = eNlaTime_ConvertModes -> NLATIME_CONVERT_*
+ * mode = eNlaTime_ConvertModes -> NLATIME_CONVERT_*
*
* Public API method - perform this mapping using the given AnimData block
* and perform any necessary sanity checks on the value
@@ -526,9 +526,9 @@ float BKE_nla_tweakedit_remap(AnimData *adt, float cframe, short mode)
NlaStrip *strip;
/* sanity checks
- * - obviously we've got to have some starting data
- * - when not in tweakmode, the active Action does not have any scaling applied :)
- * - when in tweakmode, if the no-mapping flag is set, do not map
+ * - obviously we've got to have some starting data
+ * - when not in tweakmode, the active Action does not have any scaling applied :)
+ * - when in tweakmode, if the no-mapping flag is set, do not map
*/
if ((adt == NULL) || (adt->flag & ADT_NLA_EDIT_ON) == 0 || (adt->flag & ADT_NLA_EDIT_NOMAP))
return cframe;
@@ -548,9 +548,9 @@ float BKE_nla_tweakedit_remap(AnimData *adt, float cframe, short mode)
strip = adt->actstrip;
/* sanity checks
- * - in rare cases, we may not be able to find this strip for some reason (internal error)
- * - for now, if the user has defined a curve to control the time, this correction cannot be performed
- * reliably...
+ * - in rare cases, we may not be able to find this strip for some reason (internal error)
+ * - for now, if the user has defined a curve to control the time, this correction cannot be performed
+ * reliably...
*/
if ((strip == NULL) || (strip->flag & NLASTRIP_FLAG_USR_TIME))
return cframe;
@@ -680,7 +680,7 @@ bool BKE_nlastrips_add_strip(ListBase *strips, NlaStrip *strip)
/* Convert 'islands' (i.e. continuous string of) selected strips to be
* contained within 'Meta-Strips' which act as strips which contain strips.
- * temp: are the meta-strips to be created 'temporary' ones used for transforms?
+ * temp: are the meta-strips to be created 'temporary' ones used for transforms?
*/
void BKE_nlastrips_make_metas(ListBase *strips, bool is_temp)
{
@@ -756,8 +756,8 @@ void BKE_nlastrips_clear_metastrip(ListBase *strips, NlaStrip *strip)
}
/* Remove meta-strips (i.e. flatten the list of strips) from the top-level of the list of strips
- * sel: only consider selected meta-strips, otherwise all meta-strips are removed
- * onlyTemp: only remove the 'temporary' meta-strips used for transforms
+ * sel: only consider selected meta-strips, otherwise all meta-strips are removed
+ * onlyTemp: only remove the 'temporary' meta-strips used for transforms
*/
void BKE_nlastrips_clear_metas(ListBase *strips, bool only_sel, bool only_temp)
{
@@ -844,8 +844,8 @@ void BKE_nlameta_flush_transforms(NlaStrip *mstrip)
short scaleChanged = 0;
/* sanity checks
- * - strip must exist
- * - strip must be a meta-strip with some contents
+ * - strip must exist
+ * - strip must be a meta-strip with some contents
*/
if (ELEM(NULL, mstrip, mstrip->strips.first))
return;
@@ -853,8 +853,8 @@ void BKE_nlameta_flush_transforms(NlaStrip *mstrip)
return;
/* get the original start/end points, and calculate the start-frame offset
- * - these are simply the start/end frames of the child strips,
- * since we assume they weren't transformed yet
+ * - these are simply the start/end frames of the child strips,
+ * since we assume they weren't transformed yet
*/
oStart = ((NlaStrip *)mstrip->strips.first)->start;
oEnd = ((NlaStrip *)mstrip->strips.last)->end;
@@ -862,7 +862,7 @@ void BKE_nlameta_flush_transforms(NlaStrip *mstrip)
/* optimization:
* don't flush if nothing changed yet
- * TODO: maybe we need a flag to say always flush?
+ * TODO: maybe we need a flag to say always flush?
*/
if (IS_EQF(oStart, mstrip->start) && IS_EQF(oEnd, mstrip->end))
return;
@@ -1008,7 +1008,7 @@ void BKE_nlatrack_set_active(ListBase *tracks, NlaTrack *nlt_a)
if (ELEM(NULL, tracks, tracks->first))
return;
- /* deactive all the rest */
+ /* deactivate all the rest */
for (nlt = tracks->first; nlt; nlt = nlt->next)
nlt->flag &= ~NLATRACK_ACTIVE;
@@ -1021,9 +1021,9 @@ void BKE_nlatrack_set_active(ListBase *tracks, NlaTrack *nlt_a)
bool BKE_nlatrack_has_space(NlaTrack *nlt, float start, float end)
{
/* sanity checks
- * - track must exist
- * - track must be editable
- * - bounds cannot be equal (0-length is nasty)
+ * - track must exist
+ * - track must be editable
+ * - bounds cannot be equal (0-length is nasty)
*/
if ((nlt == NULL) || (nlt->flag & NLATRACK_PROTECTED) || IS_EQF(start, end))
return false;
@@ -1150,8 +1150,8 @@ bool BKE_nlastrip_within_bounds(NlaStrip *strip, float min, float max)
return false;
/* only ok if at least part of the strip is within the bounding window
- * - first 2 cases cover when the strip length is less than the bounding area
- * - second 2 cases cover when the strip length is greater than the bounding area
+ * - first 2 cases cover when the strip length is less than the bounding area
+ * - second 2 cases cover when the strip length is greater than the bounding area
*/
if ((stripLen < boundsLen) &&
!(IN_RANGE(strip->start, min, max) ||
@@ -1180,7 +1180,7 @@ static void nlastrip_fix_resize_overlaps(NlaStrip *strip)
float offset = 0.0f;
if (nls->type == NLASTRIP_TYPE_TRANSITION) {
- /* transition strips should grow/shrink to accomodate the resized strip,
+ /* transition strips should grow/shrink to accommodate the resized strip,
* but if the strip's bounds now exceed the transition, we're forced to
* offset everything to maintain the balance
*/
@@ -1227,7 +1227,7 @@ static void nlastrip_fix_resize_overlaps(NlaStrip *strip)
float offset = 0.0f;
if (nls->type == NLASTRIP_TYPE_TRANSITION) {
- /* transition strips should grow/shrink to accomodate the resized strip,
+ /* transition strips should grow/shrink to accommodate the resized strip,
* but if the strip's bounds now exceed the transition, we're forced to
* offset everything to maintain the balance
*/
@@ -1276,8 +1276,8 @@ void BKE_nlastrip_recalculate_bounds(NlaStrip *strip)
float actlen, mapping;
/* sanity checks
- * - must have a strip
- * - can only be done for action clips
+ * - must have a strip
+ * - can only be done for action clips
*/
if ((strip == NULL) || (strip->type != NLASTRIP_TYPE_CLIP))
return;
@@ -1297,7 +1297,7 @@ void BKE_nlastrip_recalculate_bounds(NlaStrip *strip)
}
/* Is the given NLA-strip the first one to occur for the given AnimData block */
-// TODO: make this an api method if necesary, but need to add prefix first
+// TODO: make this an api method if necessary, but need to add prefix first
static bool nlastrip_is_first(AnimData *adt, NlaStrip *strip)
{
NlaTrack *nlt;
@@ -1500,8 +1500,8 @@ void BKE_nlastrip_validate_name(AnimData *adt, NlaStrip *strip)
}
/* build a hash-table of all the strips in the tracks
- * - this is easier than iterating over all the tracks+strips hierarchy every time
- * (and probably faster)
+ * - this is easier than iterating over all the tracks+strips hierarchy every time
+ * (and probably faster)
*/
gh = BLI_ghash_str_new("nlastrip_validate_name gh");
@@ -1517,7 +1517,7 @@ void BKE_nlastrip_validate_name(AnimData *adt, NlaStrip *strip)
}
/* if the hash-table has a match for this name, try other names...
- * - in an extreme case, it might not be able to find a name, but then everything else in Blender would fail too :)
+ * - in an extreme case, it might not be able to find a name, but then everything else in Blender would fail too :)
*/
BLI_uniquename_cb(nla_editbone_name_check, (void *)gh, DATA_("NlaStrip"), '.', strip->name, sizeof(strip->name));
@@ -1528,9 +1528,9 @@ void BKE_nlastrip_validate_name(AnimData *adt, NlaStrip *strip)
/* ---- */
/* Get strips which overlap the given one at the start/end of its range
- * - strip: strip that we're finding overlaps for
- * - track: nla-track that the overlapping strips should be found from
- * - start, end: frames for the offending endpoints
+ * - strip: strip that we're finding overlaps for
+ * - track: nla-track that the overlapping strips should be found from
+ * - start, end: frames for the offending endpoints
*/
static void nlastrip_get_endpoint_overlaps(NlaStrip *strip, NlaTrack *track, float **start, float **end)
{
@@ -1555,7 +1555,7 @@ static void nlastrip_get_endpoint_overlaps(NlaStrip *strip, NlaTrack *track, flo
return; /* the range we're after has already passed */
/* if this strip is not part of an island of continuous strips, it can be used
- * - this check needs to be done for each end of the strip we try and use...
+ * - this check needs to be done for each end of the strip we try and use...
*/
if ((nls->next == NULL) || IS_EQF(nls->next->start, nls->end) == 0) {
if ((nls->end > strip->start) && (nls->end < strip->end))
@@ -1589,9 +1589,9 @@ static void BKE_nlastrip_validate_autoblends(NlaTrack *nlt, NlaStrip *nls)
nlastrip_get_endpoint_overlaps(nls, nlt->next, &ns, &ne);
/* set overlaps for this strip
- * - don't use the values obtained though if the end in question
- * is directly followed/preceded by another strip, forming an
- * 'island' of continuous strips
+ * - don't use the values obtained though if the end in question
+ * is directly followed/preceded by another strip, forming an
+ * 'island' of continuous strips
*/
if ((ps || ns) && ((nls->prev == NULL) || IS_EQF(nls->prev->end, nls->start) == 0)) {
/* start overlaps - pick the largest overlap */
@@ -1809,7 +1809,7 @@ void BKE_nla_action_pushdown(AnimData *adt)
* NOTE: An alternative way would have been to instead hack the influence
* to not get always get reset to full strength if NLASTRIP_FLAG_USR_INFLUENCE
* is disabled but auto-blending isn't being used. However, that approach
- * is a bit hacky/hard to discover, and may cause backwards compatability issues,
+ * is a bit hacky/hard to discover, and may cause backwards compatibility issues,
* so it's better to just do it this way.
*/
strip->flag |= NLASTRIP_FLAG_USR_INFLUENCE;
@@ -1854,7 +1854,7 @@ bool BKE_nla_tweakmode_enter(AnimData *adt)
return true;
/* go over the tracks, finding the active one, and its active strip
- * - if we cannot find both, then there's nothing to do
+ * - if we cannot find both, then there's nothing to do
*/
for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next) {
/* check if active */
@@ -1924,16 +1924,16 @@ bool BKE_nla_tweakmode_enter(AnimData *adt)
}
/* go over all the tracks after AND INCLUDING the active one, tagging them as being disabled
- * - the active track needs to also be tagged, otherwise, it'll overlap with the tweaks going on
+ * - the active track needs to also be tagged, otherwise, it'll overlap with the tweaks going on
*/
for (nlt = activeTrack; nlt; nlt = nlt->next)
nlt->flag |= NLATRACK_DISABLED;
/* handle AnimData level changes:
- * - 'real' active action to temp storage (no need to change user-counts)
- * - action of active strip set to be the 'active action', and have its usercount incremented
- * - editing-flag for this AnimData block should also get turned on (for more efficient restoring)
- * - take note of the active strip for mapping-correction of keyframes in the action being edited
+ * - 'real' active action to temp storage (no need to change user-counts)
+ * - action of active strip set to be the 'active action', and have its usercount incremented
+ * - editing-flag for this AnimData block should also get turned on (for more efficient restoring)
+ * - take note of the active strip for mapping-correction of keyframes in the action being edited
*/
adt->tmpact = adt->action;
adt->action = activeStrip->act;
@@ -1999,11 +1999,11 @@ void BKE_nla_tweakmode_exit(AnimData *adt)
}
/* handle AnimData level changes:
- * - 'temporary' active action needs its usercount decreased, since we're removing this reference
- * - 'real' active action is restored from storage
- * - storage pointer gets cleared (to avoid having bad notes hanging around)
- * - editing-flag for this AnimData block should also get turned off
- * - clear pointer to active strip
+ * - 'temporary' active action needs its usercount decreased, since we're removing this reference
+ * - 'real' active action is restored from storage
+ * - storage pointer gets cleared (to avoid having bad notes hanging around)
+ * - editing-flag for this AnimData block should also get turned off
+ * - clear pointer to active strip
*/
if (adt->action)
id_us_min(&adt->action->id);
@@ -2020,8 +2020,8 @@ static void UNUSED_FUNCTION(BKE_nla_bake) (Scene *scene, ID *UNUSED(id), AnimDat
{
/* verify that data is valid
- * 1) Scene and AnimData must be provided
- * 2) there must be tracks to merge...
+ * 1) Scene and AnimData must be provided
+ * 2) there must be tracks to merge...
*/
if (ELEM(NULL, scene, adt, adt->nla_tracks.first))
return;
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index c830917a547..b3f210dfba5 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -2067,7 +2067,7 @@ bNodeTree *ntreeLocalize(bNodeTree *ntree)
/* sync local composite with real tree */
/* local tree is supposed to be running, be careful moving previews! */
-/* is called by jobs manager, outside threads, so it doesnt happen during draw */
+/* is called by jobs manager, outside threads, so it doesn't happen during draw */
void ntreeLocalSync(bNodeTree *localtree, bNodeTree *ntree)
{
if (localtree && ntree) {
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 9f635966ee7..add7c1fd992 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1785,7 +1785,7 @@ static void ob_parbone(Object *ob, Object *par, float mat[4][4])
/* get bone transform */
if (pchan->bone->flag & BONE_RELATIVE_PARENTING) {
- /* the new option uses the root - expected bahaviour, but differs from old... */
+ /* the new option uses the root - expected behaviour, but differs from old... */
/* XXX check on version patching? */
copy_m4_m4(mat, pchan->chan_mat);
}
@@ -1855,7 +1855,7 @@ static void give_parvert(Object *par, int nr, float vec[3])
if (use_special_ss_case) {
/* Special case if the last modifier is SS and no constructive modifier are in front of it. */
CCGDerivedMesh *ccgdm = (CCGDerivedMesh *)dm;
- CCGVert *ccg_vert = ccgSubSurf_getVert(ccgdm->ss, SET_INT_IN_POINTER(nr));
+ CCGVert *ccg_vert = ccgSubSurf_getVert(ccgdm->ss, POINTER_FROM_INT(nr));
/* In case we deleted some verts, nr may refer to inexistent one now, see T42557. */
if (ccg_vert) {
float *co = ccgSubSurf_getVertData(ccgdm->ss, ccg_vert);
@@ -2770,7 +2770,7 @@ int BKE_object_obdata_texspace_get(Object *ob, short **r_texflag, float **r_loc,
static int pc_cmp(const void *a, const void *b)
{
const LinkData *ad = a, *bd = b;
- if (GET_INT_FROM_POINTER(ad->data) > GET_INT_FROM_POINTER(bd->data))
+ if (POINTER_AS_INT(ad->data) > POINTER_AS_INT(bd->data))
return 1;
else return 0;
}
@@ -2783,14 +2783,14 @@ int BKE_object_insert_ptcache(Object *ob)
BLI_listbase_sort(&ob->pc_ids, pc_cmp);
for (link = ob->pc_ids.first, i = 0; link; link = link->next, i++) {
- int index = GET_INT_FROM_POINTER(link->data);
+ int index = POINTER_AS_INT(link->data);
if (i < index)
break;
}
link = MEM_callocN(sizeof(LinkData), "PCLink");
- link->data = SET_INT_IN_POINTER(i);
+ link->data = POINTER_FROM_INT(i);
BLI_addtail(&ob->pc_ids, link);
return i;
@@ -2805,7 +2805,7 @@ static int pc_findindex(ListBase *listbase, int index)
link = listbase->first;
while (link) {
- if (GET_INT_FROM_POINTER(link->data) == index)
+ if (POINTER_AS_INT(link->data) == index)
return number;
number++;
@@ -3089,7 +3089,7 @@ int BKE_object_is_modified(Scene *scene, Object *ob)
* This makes it possible to give some degree of false-positives here,
* but it's currently an acceptable tradeoff between complexity and check
* speed. In combination with checks of modifier stack and real life usage
- * percentage of false-positives shouldn't be that hight.
+ * percentage of false-positives shouldn't be that height.
*/
static bool object_moves_in_time(Object *object)
{
diff --git a/source/blender/blenkernel/intern/object_deform.c b/source/blender/blenkernel/intern/object_deform.c
index dc36f2ed202..47f86c28dfc 100644
--- a/source/blender/blenkernel/intern/object_deform.c
+++ b/source/blender/blenkernel/intern/object_deform.c
@@ -624,7 +624,7 @@ bool *BKE_object_defgroup_validmap_get(Object *ob, const int defbase_tot)
val_p = BLI_ghash_lookup_p(gh, chan->name);
if (val_p) {
- *val_p = SET_INT_IN_POINTER(1);
+ *val_p = POINTER_FROM_INT(1);
}
}
}
diff --git a/source/blender/blenkernel/intern/object_dupli.c b/source/blender/blenkernel/intern/object_dupli.c
index 589c4468000..1406a7dd66b 100644
--- a/source/blender/blenkernel/intern/object_dupli.c
+++ b/source/blender/blenkernel/intern/object_dupli.c
@@ -254,7 +254,7 @@ static void make_child_duplis(const DupliContext *ctx, void *userdata, MakeChild
/* mballs have a different dupli handling */
if (ob->type != OB_MBALL)
- ob->flag |= OB_DONE; /* doesnt render */
+ ob->flag |= OB_DONE; /* doesn't render */
make_child_duplis_cb(&pctx, userdata, ob);
}
@@ -373,8 +373,8 @@ static void make_duplis_frames(const DupliContext *ctx)
/* make a copy of the object's original data (before any dupli-data overwrites it)
* as we'll need this to keep track of unkeyed data
- * - this doesn't take into account other data that can be reached from the object,
- * for example it's shapekeys or bones, hence the need for an update flush at the end
+ * - this doesn't take into account other data that can be reached from the object,
+ * for example it's shapekeys or bones, hence the need for an update flush at the end
*/
copyob = *ob;
@@ -585,7 +585,7 @@ static Object *find_family_object(Main *bmain, const char *family, size_t family
{
Object **ob_pt;
Object *ob;
- void *ch_key = SET_UINT_IN_POINTER(ch);
+ void *ch_key = POINTER_FROM_UINT(ch);
if ((ob_pt = (Object **)BLI_ghash_lookup_p(family_gh, ch_key))) {
ob = *ob_pt;
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c
index da455faaa86..0637fc4f00c 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -268,7 +268,7 @@ void packAll(Main *bmain, ReportList *reports, bool verbose)
#if 0
// attempt to create a function that generates an unique filename
-// this will work when all funtions in fileops.c understand relative filenames...
+// this will work when all functions in fileops.c understand relative filenames...
static char *find_new_name(char *name)
{
@@ -362,7 +362,7 @@ int writePackedFile(
*
* - PF_EQUAL: the packed file and original file are identical
* - PF_DIFFERENT: the packed file and original file differ
- * - PF_NOFILE: the original file doens't exist
+ * - PF_NOFILE: the original file doesn't exist
*/
int checkPackedFile(const char *ref_file_name, const char *filename, PackedFile *pf)
{
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index 2c17fa44229..dd5d801d2ac 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -83,9 +83,9 @@ void BKE_paint_invalidate_overlay_tex(Scene *scene, const Tex *tex)
return;
if (br->mtex.tex == tex)
- overlay_flags |= PAINT_INVALID_OVERLAY_TEXTURE_PRIMARY;
+ overlay_flags |= PAINT_OVERLAY_INVALID_TEXTURE_PRIMARY;
if (br->mask_mtex.tex == tex)
- overlay_flags |= PAINT_INVALID_OVERLAY_TEXTURE_SECONDARY;
+ overlay_flags |= PAINT_OVERLAY_INVALID_TEXTURE_SECONDARY;
}
void BKE_paint_invalidate_cursor_overlay(Scene *scene, CurveMapping *curve)
@@ -94,14 +94,14 @@ void BKE_paint_invalidate_cursor_overlay(Scene *scene, CurveMapping *curve)
Brush *br = p->brush;
if (br && br->curve == curve)
- overlay_flags |= PAINT_INVALID_OVERLAY_CURVE;
+ overlay_flags |= PAINT_OVERLAY_INVALID_CURVE;
}
void BKE_paint_invalidate_overlay_all(void)
{
- overlay_flags |= (PAINT_INVALID_OVERLAY_TEXTURE_SECONDARY |
- PAINT_INVALID_OVERLAY_TEXTURE_PRIMARY |
- PAINT_INVALID_OVERLAY_CURVE);
+ overlay_flags |= (PAINT_OVERLAY_INVALID_TEXTURE_SECONDARY |
+ PAINT_OVERLAY_INVALID_TEXTURE_PRIMARY |
+ PAINT_OVERLAY_INVALID_CURVE);
}
eOverlayControlFlags BKE_paint_get_overlay_flags(void)
@@ -135,18 +135,18 @@ Paint *BKE_paint_get_active_from_paintmode(Scene *sce, ePaintMode mode)
ToolSettings *ts = sce->toolsettings;
switch (mode) {
- case ePaintSculpt:
+ case PAINT_MODE_SCULPT:
return &ts->sculpt->paint;
- case ePaintVertex:
+ case PAINT_MODE_VERTEX:
return &ts->vpaint->paint;
- case ePaintWeight:
+ case PAINT_MODE_WEIGHT:
return &ts->wpaint->paint;
- case ePaintTexture2D:
- case ePaintTextureProjective:
+ case PAINT_MODE_TEXTURE_2D:
+ case PAINT_MODE_TEXTURE_3D:
return &ts->imapaint.paint;
- case ePaintSculptUV:
+ case PAINT_MODE_SCULPT_UV:
return &ts->uvsculpt->paint;
- case ePaintInvalid:
+ case PAINT_MODE_INVALID:
return NULL;
default:
return &ts->imapaint.paint;
@@ -231,39 +231,39 @@ ePaintMode BKE_paintmode_get_active_from_context(const bContext *C)
if ((sima = CTX_wm_space_image(C)) != NULL) {
if (obact && obact->mode == OB_MODE_EDIT) {
if (sima->mode == SI_MODE_PAINT)
- return ePaintTexture2D;
+ return PAINT_MODE_TEXTURE_2D;
else if (ts->use_uv_sculpt)
- return ePaintSculptUV;
+ return PAINT_MODE_SCULPT_UV;
}
else {
- return ePaintTexture2D;
+ return PAINT_MODE_TEXTURE_2D;
}
}
else if (obact) {
switch (obact->mode) {
case OB_MODE_SCULPT:
- return ePaintSculpt;
+ return PAINT_MODE_SCULPT;
case OB_MODE_VERTEX_PAINT:
- return ePaintVertex;
+ return PAINT_MODE_VERTEX;
case OB_MODE_WEIGHT_PAINT:
- return ePaintWeight;
+ return PAINT_MODE_WEIGHT;
case OB_MODE_TEXTURE_PAINT:
- return ePaintTextureProjective;
+ return PAINT_MODE_TEXTURE_3D;
case OB_MODE_EDIT:
if (ts->use_uv_sculpt)
- return ePaintSculptUV;
- return ePaintTexture2D;
+ return PAINT_MODE_SCULPT_UV;
+ return PAINT_MODE_TEXTURE_2D;
default:
- return ePaintTexture2D;
+ return PAINT_MODE_TEXTURE_2D;
}
}
else {
/* default to image paint */
- return ePaintTexture2D;
+ return PAINT_MODE_TEXTURE_2D;
}
}
- return ePaintInvalid;
+ return PAINT_MODE_INVALID;
}
Brush *BKE_paint_brush(Paint *p)
@@ -480,19 +480,19 @@ void BKE_paint_cavity_curve_preset(Paint *p, int preset)
eObjectMode BKE_paint_object_mode_from_paint_mode(ePaintMode mode)
{
switch (mode) {
- case ePaintSculpt:
+ case PAINT_MODE_SCULPT:
return OB_MODE_SCULPT;
- case ePaintVertex:
+ case PAINT_MODE_VERTEX:
return OB_MODE_VERTEX_PAINT;
- case ePaintWeight:
+ case PAINT_MODE_WEIGHT:
return OB_MODE_WEIGHT_PAINT;
- case ePaintTextureProjective:
+ case PAINT_MODE_TEXTURE_3D:
return OB_MODE_TEXTURE_PAINT;
- case ePaintTexture2D:
+ case PAINT_MODE_TEXTURE_2D:
return OB_MODE_TEXTURE_PAINT;
- case ePaintSculptUV:
+ case PAINT_MODE_SCULPT_UV:
return OB_MODE_EDIT;
- case ePaintInvalid:
+ case PAINT_MODE_INVALID:
default:
return 0;
}
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index b43c5376af4..40c0e1f8184 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -1507,7 +1507,7 @@ int psys_particle_dm_face_lookup(
LinkNode *tessface_node = poly_nodes[pindex_orig];
for (; tessface_node; tessface_node = tessface_node->next) {
- int findex_dst = GET_INT_FROM_POINTER(tessface_node->link);
+ int findex_dst = POINTER_AS_INT(tessface_node->link);
faceuv = osface_final[findex_dst].uv;
/* check that this intersects - Its possible this misses :/ -
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 353c75d63c6..cc6e28b2a82 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -366,7 +366,7 @@ void psys_calc_dmcache(Object *ob, DerivedMesh *dm_final, DerivedMesh *dm_deform
for (i=0, node=nodedmelem; i<totdmelem; i++, node++) {
int origindex_final;
- node->link = SET_INT_IN_POINTER(i);
+ node->link = POINTER_FROM_INT(i);
/* may be vertex or face origindex */
if (use_modifier_stack) {
@@ -409,7 +409,7 @@ void psys_calc_dmcache(Object *ob, DerivedMesh *dm_final, DerivedMesh *dm_deform
else {
if (psys->part->from == PART_FROM_VERT) {
if (pa->num < totelem && nodearray[pa->num])
- pa->num_dmcache= GET_INT_FROM_POINTER(nodearray[pa->num]->link);
+ pa->num_dmcache= POINTER_AS_INT(nodearray[pa->num]->link);
else
pa->num_dmcache = DMCACHE_NOTFOUND;
}
@@ -1546,7 +1546,7 @@ static EdgeHash *sph_springhash_build(ParticleSystem *psys)
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));
+ BLI_edgehash_insert(springhash, spring->particle_index[0], spring->particle_index[1], POINTER_FROM_INT(i+1));
return springhash;
}
@@ -1610,9 +1610,9 @@ static void sph_density_accum_cb(void *userdata, int index, const float co[3], f
/* Ugh! One particle has too many neighbors! If some aren't taken into
* account, the forces will be biased by the tree search order. This
- * effectively adds enery to the system, and results in a churning motion.
+ * effectively adds energy to the system, and results in a churning motion.
* But, we have to stop somewhere, and it's not the end of the world.
- * - jahka and z0r
+ * - jahka and z0r
*/
if (pfr->tot_neighbors >= SPH_NEIGHBORS)
return;
@@ -1748,7 +1748,7 @@ static void sph_force_cb(void *sphdata_v, ParticleKey *state, float *force, floa
/* Viscoelastic spring force */
if (pfn->psys == psys[0] && fluid->flag & SPH_VISCOELASTIC_SPRINGS && springhash) {
/* BLI_edgehash_lookup appears to be thread-safe. - z0r */
- spring_index = GET_INT_FROM_POINTER(BLI_edgehash_lookup(springhash, index, pfn->index));
+ spring_index = POINTER_AS_INT(BLI_edgehash_lookup(springhash, index, pfn->index));
if (spring_index) {
spring = psys[0]->fluid_springs + spring_index - 1;
@@ -2187,7 +2187,7 @@ static void basic_rotate(ParticleSettings *part, ParticleData *pa, float dfra, f
}
/************************************************
- * Collisions
+ * Collisions
*
* The algorithm is roughly:
* 1. Use a BVH tree to search for faces that a particle may collide with.
@@ -4335,7 +4335,7 @@ void particle_system_update(Main *bmain, Scene *scene, Object *ob, ParticleSyste
pa->flag &= ~PARS_NO_DISP;
}
- /* free unexisting after reseting particles */
+ /* free unexisting after resetting particles */
if (free_unexisting)
free_unexisting_particles(&sim);
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c
index 772cda7266e..746e8b63a18 100644
--- a/source/blender/blenkernel/intern/pbvh.c
+++ b/source/blender/blenkernel/intern/pbvh.c
@@ -246,7 +246,7 @@ static int map_insert_vert(PBVH *bvh, GHash *map,
{
void *key, **value_p;
- key = SET_INT_IN_POINTER(vertex);
+ key = POINTER_FROM_INT(vertex);
if (!BLI_ghash_ensure_p(map, key, &value_p)) {
int value_i;
if (BLI_BITMAP_TEST(bvh->vert_bitmap, vertex) == 0) {
@@ -258,11 +258,11 @@ static int map_insert_vert(PBVH *bvh, GHash *map,
value_i = ~(*face_verts);
(*face_verts)++;
}
- *value_p = SET_INT_IN_POINTER(value_i);
+ *value_p = POINTER_FROM_INT(value_i);
return value_i;
}
else {
- return GET_INT_FROM_POINTER(*value_p);
+ return POINTER_AS_INT(*value_p);
}
}
@@ -303,13 +303,13 @@ static void build_mesh_leaf_node(PBVH *bvh, PBVHNode *node)
GHashIterator gh_iter;
GHASH_ITER (gh_iter, map) {
void *value = BLI_ghashIterator_getValue(&gh_iter);
- int ndx = GET_INT_FROM_POINTER(value);
+ int ndx = POINTER_AS_INT(value);
if (ndx < 0)
ndx = -ndx + node->uniq_verts - 1;
vert_indices[ndx] =
- GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(&gh_iter));
+ POINTER_AS_INT(BLI_ghashIterator_getKey(&gh_iter));
}
for (int i = 0; i < totface; ++i) {
@@ -915,7 +915,7 @@ static void BKE_pbvh_search_callback_occluded(PBVH *bvh,
static bool update_search_cb(PBVHNode *node, void *data_v)
{
- int flag = GET_INT_FROM_POINTER(data_v);
+ int flag = POINTER_AS_INT(data_v);
if (node->flag & PBVH_Leaf)
return (node->flag & flag) != 0;
@@ -1232,7 +1232,7 @@ void BKE_pbvh_update(PBVH *bvh, int flag, float (*fnors)[3])
PBVHNode **nodes;
int totnode;
- BKE_pbvh_search_gather(bvh, update_search_cb, SET_INT_IN_POINTER(flag),
+ BKE_pbvh_search_gather(bvh, update_search_cb, POINTER_FROM_INT(flag),
&nodes, &totnode);
if (flag & PBVH_UpdateNormals)
@@ -2122,7 +2122,7 @@ void BKE_pbvh_draw(PBVH *bvh, float (*planes)[4], float (*fnors)[3],
pbvh_node_check_mask_changed(bvh, &bvh->nodes[a]);
}
- BKE_pbvh_search_gather(bvh, update_search_cb, SET_INT_IN_POINTER(PBVH_UpdateNormals | PBVH_UpdateDrawBuffers),
+ BKE_pbvh_search_gather(bvh, update_search_cb, POINTER_FROM_INT(PBVH_UpdateNormals | PBVH_UpdateDrawBuffers),
&nodes, &totnode);
pbvh_update_normals(bvh, nodes, totnode, fnors);
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 7311b17134d..f611e7a94cd 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -137,7 +137,7 @@ static int ptcache_extra_datasize[] = {
sizeof(ParticleSpring)
};
-/* forward declerations */
+/* forward declarations */
static int ptcache_file_compressed_read(PTCacheFile *pf, unsigned char *result, unsigned int len);
static int ptcache_file_compressed_write(PTCacheFile *pf, unsigned char *in, unsigned int in_len, unsigned char *out, int mode);
static int ptcache_file_write(PTCacheFile *pf, const void *f, unsigned int tot, unsigned int size);
diff --git a/source/blender/blenkernel/intern/report.c b/source/blender/blenkernel/intern/report.c
index a9b36a85602..9204bc69ee9 100644
--- a/source/blender/blenkernel/intern/report.c
+++ b/source/blender/blenkernel/intern/report.c
@@ -140,7 +140,7 @@ void BKE_reportf(ReportList *reports, ReportType type, const char *_format, ...)
va_start(args, _format);
vprintf(format, args);
va_end(args);
- fprintf(stdout, "\n"); /* otherise each report needs to include a \n */
+ fprintf(stdout, "\n"); /* otherwise each report needs to include a \n */
fflush(stdout); /* this ensures the message is printed before a crash */
}
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index bfc61794935..7fb313c838f 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -385,9 +385,9 @@ static void rigidbody_validate_sim_shape(Object *ob, bool rebuild)
return;
/* if automatically determining dimensions, use the Object's boundbox
- * - assume that all quadrics are standing upright on local z-axis
- * - assume even distribution of mass around the Object's pivot
- * (i.e. Object pivot is centralized in boundbox)
+ * - assume that all quadrics are standing upright on local z-axis
+ * - assume even distribution of mass around the Object's pivot
+ * (i.e. Object pivot is centralized in boundbox)
*/
// XXX: all dimensions are auto-determined now... later can add stored settings for this
/* get object dimensions without scaling */
@@ -472,10 +472,10 @@ void BKE_rigidbody_calc_volume(Object *ob, float *r_vol)
float volume = 0.0f;
/* if automatically determining dimensions, use the Object's boundbox
- * - assume that all quadrics are standing upright on local z-axis
- * - assume even distribution of mass around the Object's pivot
- * (i.e. Object pivot is centralized in boundbox)
- * - boundbox gives full width
+ * - assume that all quadrics are standing upright on local z-axis
+ * - assume even distribution of mass around the Object's pivot
+ * (i.e. Object pivot is centralized in boundbox)
+ * - boundbox gives full width
*/
// XXX: all dimensions are auto-determined now... later can add stored settings for this
BKE_object_dimensions_get(ob, size);
@@ -568,10 +568,10 @@ void BKE_rigidbody_calc_center_of_mass(Object *ob, float r_center[3])
zero_v3(r_center);
/* if automatically determining dimensions, use the Object's boundbox
- * - assume that all quadrics are standing upright on local z-axis
- * - assume even distribution of mass around the Object's pivot
- * (i.e. Object pivot is centralized in boundbox)
- * - boundbox gives full width
+ * - assume that all quadrics are standing upright on local z-axis
+ * - assume even distribution of mass around the Object's pivot
+ * (i.e. Object pivot is centralized in boundbox)
+ * - boundbox gives full width
*/
// XXX: all dimensions are auto-determined now... later can add stored settings for this
BKE_object_dimensions_get(ob, size);
@@ -647,7 +647,7 @@ static void rigidbody_validate_sim_object(RigidBodyWorld *rbw, Object *ob, bool
float rot[4];
/* sanity checks:
- * - object doesn't have RigidBody info already: then why is it here?
+ * - object doesn't have RigidBody info already: then why is it here?
*/
if (rbo == NULL)
return;
@@ -778,8 +778,8 @@ static void rigidbody_validate_sim_constraint(RigidBodyWorld *rbw, Object *ob, b
float ang_upper;
/* sanity checks:
- * - object should have a rigid body constraint
- * - rigid body constraint should have at least one constrained object
+ * - object should have a rigid body constraint
+ * - rigid body constraint should have at least one constrained object
*/
if (rbc == NULL) {
return;
@@ -939,8 +939,8 @@ RigidBodyWorld *BKE_rigidbody_create_world(Scene *scene)
RigidBodyWorld *rbw;
/* sanity checks
- * - there must be a valid scene to add world to
- * - there mustn't be a sim world using this group already
+ * - there must be a valid scene to add world to
+ * - there mustn't be a sim world using this group already
*/
if (scene == NULL)
return NULL;
@@ -1015,9 +1015,9 @@ RigidBodyOb *BKE_rigidbody_create_object(Scene *scene, Object *ob, short type)
RigidBodyWorld *rbw = scene->rigidbody_world;
/* sanity checks
- * - rigidbody world must exist
- * - object must exist
- * - cannot add rigid body if it already exists
+ * - rigidbody world must exist
+ * - object must exist
+ * - cannot add rigid body if it already exists
*/
if (ob == NULL || (ob->rigidbody_object != NULL))
return NULL;
@@ -1070,9 +1070,9 @@ RigidBodyCon *BKE_rigidbody_create_constraint(Scene *scene, Object *ob, short ty
RigidBodyWorld *rbw = scene->rigidbody_world;
/* sanity checks
- * - rigidbody world must exist
- * - object must exist
- * - cannot add constraint if it already exists
+ * - rigidbody world must exist
+ * - object must exist
+ * - cannot add constraint if it already exists
*/
if (ob == NULL || (ob->rigidbody_constraint != NULL))
return NULL;
@@ -1312,7 +1312,7 @@ static void rigidbody_update_sim_ob(Scene *scene, RigidBodyWorld *rbw, Object *o
pd_point_from_loc(scene, eff_loc, eff_vel, 0, &epoint);
/* calculate net force of effectors, and apply to sim object
- * - we use 'central force' since apply force requires a "relative position" which we don't have...
+ * - we use 'central force' since apply force requires a "relative position" which we don't have...
*/
pdDoEffectors(effectors, NULL, effector_weights, &epoint, eff_force, NULL);
if (G.f & G_DEBUG)
@@ -1382,7 +1382,7 @@ static void rigidbody_update_simulation(Scene *scene, RigidBodyWorld *rbw, bool
if (rbo == NULL) {
/* Since this object is included in the sim group but doesn't have
* rigid body settings (perhaps it was added manually), add!
- * - assume object to be active? That is the default for newly added settings...
+ * - assume object to be active? That is the default for newly added settings...
*/
ob->rigidbody_object = BKE_rigidbody_create_object(scene, ob, RBO_TYPE_ACTIVE);
rigidbody_validate_sim_object(rbw, ob, true);
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 1eb65519596..9689ab173a8 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -402,6 +402,7 @@ Scene *BKE_scene_copy(Main *bmain, Scene *sce, int type)
for (SceneRenderLayer *srl_dst = sce_copy->r.layers.first; srl_dst; srl_dst = srl_dst->next) {
for (FreestyleLineSet *lineset = srl_dst->freestyleConfig.linesets.first; lineset; lineset = lineset->next) {
if (lineset->linestyle) {
+ id_us_min(&lineset->linestyle->id);
/* XXX Not copying anim/actions here? */
BKE_id_copy_ex(bmain, (ID *)lineset->linestyle, (ID **)&lineset->linestyle, 0, false);
}
@@ -410,12 +411,14 @@ Scene *BKE_scene_copy(Main *bmain, Scene *sce, int type)
/* Full copy of world (included animations) */
if (sce_copy->world) {
+ id_us_min(&sce_copy->world->id);
BKE_id_copy_ex(bmain, (ID *)sce_copy->world, (ID **)&sce_copy->world, LIB_ID_COPY_ACTIONS, false);
}
/* Full copy of GreasePencil. */
/* XXX Not copying anim/actions here? */
if (sce_copy->gpd) {
+ id_us_min(&sce_copy->gpd->id);
BKE_id_copy_ex(bmain, (ID *)sce_copy->gpd, (ID **)&sce_copy->gpd, 0, false);
}
}
@@ -430,6 +433,7 @@ Scene *BKE_scene_copy(Main *bmain, Scene *sce, int type)
* are done outside of blenkernel with ED_objects_single_users! */
/* camera */
+ /* XXX This is most certainly useless? Object have not yet been duplicated... */
if (ELEM(type, SCE_COPY_LINK_DATA, SCE_COPY_FULL)) {
ID_NEW_REMAP(sce_copy->camera);
}
@@ -1310,10 +1314,10 @@ void BKE_scene_frame_set(struct Scene *scene, double cfra)
#ifdef WITH_LEGACY_DEPSGRAPH
/* drivers support/hacks
- * - this method is called from scene_update_tagged_recursive(), so gets included in viewport + render
- * - these are always run since the depsgraph can't handle non-object data
- * - these happen after objects are all done so that we can read in their final transform values,
- * though this means that objects can't refer to scene info for guidance...
+ * - this method is called from scene_update_tagged_recursive(), so gets included in viewport + render
+ * - these are always run since the depsgraph can't handle non-object data
+ * - these happen after objects are all done so that we can read in their final transform values,
+ * though this means that objects can't refer to scene info for guidance...
*/
static void scene_update_drivers(Main *UNUSED(bmain), Scene *scene)
{
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c
index 1a0e3958dc0..c69f8ff074f 100644
--- a/source/blender/blenkernel/intern/seqeffects.c
+++ b/source/blender/blenkernel/intern/seqeffects.c
@@ -1202,8 +1202,8 @@ static void do_mul_effect_byte(
fac3 = (int)(256.0f * facf1);
/* formula:
- * fac * (a * b) + (1 - fac) * a => fac * a * (b - 1) + axaux = c * px + py * s; //+centx
- * yaux = -s * px + c * py; //+centy
+ * fac * (a * b) + (1 - fac) * a => fac * a * (b - 1) + axaux = c * px + py * s; //+centx
+ * yaux = -s * px + c * py; //+centy
*/
while (y--) {
@@ -2175,7 +2175,7 @@ static ImBuf *do_transform_effect(
static void RVBlurBitmap2_float(float *map, int width, int height, float blur, int quality)
/* MUUUCCH better than the previous blur. */
/* We do the blurring in two passes which is a whole lot faster. */
-/* I changed the math arount to implement an actual Gaussian */
+/* I changed the math around to implement an actual Gaussian */
/* distribution. */
/* */
/* Watch out though, it tends to misbehaven with large blur values on */
@@ -3021,7 +3021,7 @@ static void do_gaussian_blur_effect_byte_x(
const int size_x = (int) (data->size_x + 0.5f);
int i, j;
- /* Make gaussian weight tabke. */
+ /* Make gaussian weight table. */
float *gausstab_x;
gausstab_x = make_gaussian_blur_kernel(data->size_x, size_x);
@@ -3074,7 +3074,7 @@ static void do_gaussian_blur_effect_byte_y(
const int size_y = (int) (data->size_y + 0.5f);
int i, j;
- /* Make gaussian weight tabke. */
+ /* Make gaussian weight table. */
float *gausstab_y;
gausstab_y = make_gaussian_blur_kernel(data->size_y, size_y);
@@ -3127,7 +3127,7 @@ static void do_gaussian_blur_effect_float_x(
const int size_x = (int) (data->size_x + 0.5f);
int i, j;
- /* Make gaussian weight tabke. */
+ /* Make gaussian weight table. */
float *gausstab_x;
gausstab_x = make_gaussian_blur_kernel(data->size_x, size_x);
@@ -3171,7 +3171,7 @@ static void do_gaussian_blur_effect_float_y(
const int size_y = (int) (data->size_y + 0.5f);
int i, j;
- /* Make gaussian weight tabke. */
+ /* Make gaussian weight table. */
float *gausstab_y;
gausstab_y = make_gaussian_blur_kernel(data->size_y, size_y);
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 0768fba3e0b..c2a96d4f1ff 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -413,7 +413,7 @@ void BKE_sequence_clipboard_pointers_restore(Sequence *seq, Main *bmain)
seqclipboard_ptr_restore(bmain, (ID **)&seq->sound);
}
-/* recursive versions of funcions above */
+/* recursive versions of functions above */
void BKE_sequencer_base_clipboard_pointers_free(ListBase *seqbase)
{
Sequence *seq;
@@ -1060,7 +1060,7 @@ void BKE_sequencer_sort(Scene *scene)
*(ed->seqbasep) = seqbase;
}
-/** Comparision function suitable to be used with BLI_listbase_sort()... */
+/** Comparison function suitable to be used with BLI_listbase_sort()... */
int BKE_sequencer_cmp_time_startdisp(const void *a, const void *b)
{
const Sequence *seq_a = a;
@@ -4507,7 +4507,7 @@ Sequence *BKE_sequencer_foreground_frame_get(Scene *scene, int frame)
return best_seq;
}
-/* return 0 if there werent enough space */
+/* return 0 if there weren't enough space */
bool BKE_sequence_base_shuffle_ex(ListBase *seqbasep, Sequence *test, Scene *evil_scene, int channel_delta)
{
const int orig_machine = test->machine;
diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c
index e28b4ccc23d..65d42467f67 100644
--- a/source/blender/blenkernel/intern/shrinkwrap.c
+++ b/source/blender/blenkernel/intern/shrinkwrap.c
@@ -187,8 +187,8 @@ static void shrinkwrap_calc_nearest_vertex(ShrinkwrapCalcData *calc)
* Returns true if "hit" was updated.
* Opts control whether an hit is valid or not
* Supported options are:
- * MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE (front faces hits are ignored)
- * MOD_SHRINKWRAP_CULL_TARGET_BACKFACE (back faces hits are ignored)
+ * - MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE (front faces hits are ignored)
+ * - MOD_SHRINKWRAP_CULL_TARGET_BACKFACE (back faces hits are ignored)
*/
bool BKE_shrinkwrap_project_normal(
char options, const float vert[3], const float dir[3],
@@ -384,7 +384,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc, bool for
SpaceTransform local2aux;
/* If the user doesn't allows to project in any direction of projection axis
- * then theres nothing todo. */
+ * then there's nothing todo. */
if ((calc->smd->shrinkOpts & (MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR | MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR)) == 0)
return;
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index 12bc40e62a0..ccc991ed24a 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -724,7 +724,7 @@ static int get_lamp(Scene *scene, float *light)
}
/**********************************************************
- * Obstacles
+ * Obstacles
**********************************************************/
typedef struct ObstaclesFromDMData {
@@ -982,7 +982,7 @@ static void update_obstacles(Scene *scene, Object *ob, SmokeDomainSettings *sds,
}
/**********************************************************
- * Flow emission code
+ * Flow emission code
**********************************************************/
typedef struct EmissionMap {
@@ -1460,8 +1460,8 @@ static void sample_derivedmesh(
if (sfs->volume_density) {
if (BLI_bvhtree_ray_cast(treeData->tree, ray_start, ray_dir, 0.0f, &hit, treeData->raycast_callback, treeData) != -1) {
float dot = ray_dir[0] * hit.no[0] + ray_dir[1] * hit.no[1] + ray_dir[2] * hit.no[2];
- /* If ray and hit face normal are facing same direction
- * hit point is inside a closed mesh. */
+ /* If ray and hit face normal are facing same direction
+ * hit point is inside a closed mesh. */
if (dot >= 0) {
/* Also cast a ray in opposite direction to make sure
* point is at least surrounded by two faces */
@@ -1508,7 +1508,7 @@ static void sample_derivedmesh(
interp_v3_v3v3v3(hit_normal, n1, n2, n3, weights);
normalize_v3(hit_normal);
/* apply normal directional and random velocity
- * - TODO: random disabled for now since it doesnt really work well as pressure calc smoothens it out... */
+ * - TODO: random disabled for now since it doesn't really work well as pressure calc smoothens it out... */
velocity_map[index * 3] += hit_normal[0] * sfs->vel_normal * 0.25f;
velocity_map[index * 3 + 1] += hit_normal[1] * sfs->vel_normal * 0.25f;
velocity_map[index * 3 + 2] += hit_normal[2] * sfs->vel_normal * 0.25f;
@@ -1691,8 +1691,8 @@ static void emit_from_derivedmesh(Object *flow_ob, SmokeDomainSettings *sds, Smo
}
}
- /* Transform dm vertices to
- * domain grid space for fast lookups */
+ /* Transform dm vertices to
+ * domain grid space for fast lookups */
for (i = 0; i < numOfVerts; i++) {
float n[3];
/* vert pos */
@@ -1775,7 +1775,7 @@ static void emit_from_derivedmesh(Object *flow_ob, SmokeDomainSettings *sds, Smo
}
/**********************************************************
- * Smoke step
+ * Smoke step
**********************************************************/
static void adjustDomainResolution(SmokeDomainSettings *sds, int new_shift[3], EmissionMap *emaps, unsigned int numflowobj, float dt)
@@ -2140,7 +2140,7 @@ static void update_flowsfluids(
VECSUB(new_shift, total_shift, sds->shift);
copy_v3_v3_int(sds->shift, total_shift);
- /* calculate new domain boundary points so that smoke doesnt slide on sub-cell movement */
+ /* calculate new domain boundary points so that smoke doesn't slide on sub-cell movement */
sds->p0[0] = sds->dp0[0] - sds->cell_size[0] * (sds->shift_f[0] - total_shift[0] - 0.5f);
sds->p0[1] = sds->dp0[1] - sds->cell_size[1] * (sds->shift_f[1] - total_shift[1] - 0.5f);
sds->p0[2] = sds->dp0[2] - sds->cell_size[2] * (sds->shift_f[2] - total_shift[2] - 0.5f);
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index 93039bdace6..940f7f72d62 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -110,7 +110,7 @@ typedef struct ReferenceVert {
typedef struct ReferenceState {
float com[3]; /* center of mass*/
- ReferenceVert *ivert; /* list of intial values */
+ ReferenceVert *ivert; /* list of initial values */
} ReferenceState;
@@ -211,7 +211,7 @@ static float sb_time_scale(Object *ob)
* will cause unwanted responses of the softbody system (which does inter frame calculations )
* so first 'cure' would be: interpolate linear in time ..
* Q: why do i write this?
- * A: because it happend once, that some eger coder 'streamlined' code to fail.
+ * A: because it happened once, that some eger coder 'streamlined' code to fail.
* We DO linear interpolation for goals .. and i think we should do on animated properties as well
*/
@@ -952,7 +952,7 @@ static void free_softbody_intern(SoftBody *sb)
*
* it actually checks if the particle intrudes a short range force field generated
* by the faces of the target object and returns a force to drive the particel out
- * the strenght of the field grows exponetially if the particle is on the 'wrong' side of the face
+ * the strength of the field grows exponetially if the particle is on the 'wrong' side of the face
* 'wrong' side : projection to the face normal is negative (all referred to a vertex in the face)
*
* flaw of this: 'fast' particles as well as 'fast' colliding faces
@@ -1977,7 +1977,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
SoftBody *sb= ob->soft; /* is supposed to be there */
BodyPoint *bp;
- /* intitialize */
+ /* initialize */
if (sb) {
/* check conditions for various options */
/* +++ could be done on object level to squeeze out the last bits of it */
@@ -2019,7 +2019,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
for (c=sb->totpoint, obp= sb->bpoint; c>0; c--, obp++) {
compare = (obp->colball + bp->colball);
sub_v3_v3v3(def, bp->pos, obp->pos);
- /* rather check the AABBoxes before ever calulating the real distance */
+ /* rather check the AABBoxes before ever calculating the real distance */
/* mathematically it is completely nuts, but performance is pretty much (3) times faster */
if ((ABS(def[0]) > compare) || (ABS(def[1]) > compare) || (ABS(def[2]) > compare)) continue;
distance = normalize_v3(def);
@@ -2061,7 +2061,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
bp->force[1]+= -ks*(auxvect[1]);
bp->force[2]+= -ks*(auxvect[2]);
- /* calulate damping forces generated by goals*/
+ /* calculate damping forces generated by goals*/
sub_v3_v3v3(velgoal, bp->origS, bp->origE);
kd = sb->goalfrict * sb_fric_force_scale(ob);
add_v3_v3v3(auxvect, velgoal, bp->vec);
@@ -2162,7 +2162,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
}/* existing spring list */
}/*any edges*/
/* ---springs */
- }/*omit on snap */
+ }/*omit on snap */
}/*loop all bp's*/
return 0; /*done fine*/
}
@@ -2348,7 +2348,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
compare = (obp->colball + bp->colball);
sub_v3_v3v3(def, bp->pos, obp->pos);
- /* rather check the AABBoxes before ever calulating the real distance */
+ /* rather check the AABBoxes before ever calculating the real distance */
/* mathematically it is completely nuts, but performance is pretty much (3) times faster */
if ((ABS(def[0]) > compare) || (ABS(def[1]) > compare) || (ABS(def[2]) > compare)) continue;
@@ -2397,7 +2397,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
bp->force[1]+= -ks*(auxvect[1]);
bp->force[2]+= -ks*(auxvect[2]);
- /* calulate damping forces generated by goals*/
+ /* calculate damping forces generated by goals*/
sub_v3_v3v3(velgoal, bp->origS, bp->origE);
kd = sb->goalfrict * sb_fric_force_scale(ob);
add_v3_v3v3(auxvect, velgoal, bp->vec);
@@ -2514,7 +2514,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
}/* existing spring list */
}/*any edges*/
/* ---springs */
- }/*omit on snap */
+ }/*omit on snap */
}/*loop all bp's*/
@@ -2827,7 +2827,7 @@ static void springs_from_mesh(Object *ob)
sb= ob->soft;
if (me && sb) {
- /* using bp->origS as a container for spring calcualtions here
+ /* using bp->origS as a container for spring calculations here
* will be overwritten sbObjectStep() to receive
* actual modifier stack positions
*/
@@ -3402,7 +3402,7 @@ static void softbody_update_positions(Object *ob, SoftBody *sb, float (*vertexCo
* that is:
* a precise position vector denoting the motion of the center of mass
* give a rotation/scale matrix using averaging method, that's why estimate and not calculate
- * see: this is kind of reverse engineering: having to states of a point cloud and recover what happend
+ * see: this is kind of reverse engineering: having to states of a point cloud and recover what happened
* our advantage here we know the identity of the vertex
* there are others methods giving other results.
* lloc, lrot, lscale are allowed to be NULL, just in case you don't need it.
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index 221c600f502..3c4e1f92344 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -89,7 +89,7 @@
# include "opensubdiv_capi.h"
#endif
-/* assumes MLoop's are layed out 4 for each poly, in order */
+/* assumes MLoop's are laid out 4 for each poly, in order */
#define USE_LOOP_LAYOUT_FAST
static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
@@ -289,7 +289,7 @@ static void get_face_uv_map_vert(UvVertMap *vmap, struct MPoly *mpoly, struct ML
break;
}
- fverts[j] = SET_UINT_IN_POINTER(mpoly[nv->poly_index].loopstart + nv->loop_of_poly_index);
+ fverts[j] = POINTER_FROM_UINT(mpoly[nv->poly_index].loopstart + nv->loop_of_poly_index);
}
}
@@ -336,7 +336,7 @@ static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm,
if (v->separate) {
CCGVert *ssv;
int loopid = mpoly[v->poly_index].loopstart + v->loop_of_poly_index;
- CCGVertHDL vhdl = SET_INT_IN_POINTER(loopid);
+ CCGVertHDL vhdl = POINTER_FROM_INT(loopid);
copy_v2_v2(uv, mloopuv[loopid].uv);
@@ -352,7 +352,7 @@ static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm,
MPoly *mp = &mpoly[i];
int nverts = mp->totloop;
int j, j_next;
- CCGFace *origf = ccgSubSurf_getFace(origss, SET_INT_IN_POINTER(i));
+ CCGFace *origf = ccgSubSurf_getFace(origss, POINTER_FROM_INT(i));
/* unsigned int *fv = &mp->v1; */
MLoop *ml = mloop + mp->loopstart;
@@ -366,12 +366,12 @@ static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm,
get_face_uv_map_vert(vmap, mpoly, ml, i, fverts);
for (j = 0, j_next = nverts - 1; j < nverts; j_next = j++) {
- unsigned int v0 = GET_UINT_FROM_POINTER(fverts[j_next]);
- unsigned int v1 = GET_UINT_FROM_POINTER(fverts[j]);
+ unsigned int v0 = POINTER_AS_UINT(fverts[j_next]);
+ unsigned int v1 = POINTER_AS_UINT(fverts[j]);
if (BLI_edgeset_add(eset, v0, v1)) {
CCGEdge *e, *orige = ccgSubSurf_getFaceEdge(origf, j_next);
- CCGEdgeHDL ehdl = SET_INT_IN_POINTER(mp->loopstart + j_next);
+ CCGEdgeHDL ehdl = POINTER_FROM_INT(mp->loopstart + j_next);
float crease = ccgSubSurf_getEdgeCrease(orige);
ccgSubSurf_syncEdge(ss, ehdl, fverts[j_next], fverts[j], crease, &e);
@@ -396,7 +396,7 @@ static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm,
#endif
get_face_uv_map_vert(vmap, mpoly, ml, i, fverts);
- ccgSubSurf_syncFace(ss, SET_INT_IN_POINTER(i), nverts, fverts, &f);
+ ccgSubSurf_syncFace(ss, POINTER_FROM_INT(i), nverts, fverts, &f);
}
#ifndef USE_DYNSIZE
@@ -441,7 +441,7 @@ static void UNUSED_FUNCTION(set_subsurf_osd_ccg_uv)(CCGSubSurf *ss,
faceMap = MEM_mallocN(totface * sizeof(*faceMap), "facemapuv");
for (ccgSubSurf_initFaceIterator(ss, &fi); !ccgFaceIterator_isStopped(&fi); ccgFaceIterator_next(&fi)) {
CCGFace *f = ccgFaceIterator_getCurrent(&fi);
- faceMap[GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(f))] = f;
+ faceMap[POINTER_AS_INT(ccgSubSurf_getFaceFaceHandle(f))] = f;
}
/* load coordinates from uvss into tface */
@@ -527,7 +527,7 @@ static void set_subsurf_legacy_uv(CCGSubSurf *ss, DerivedMesh *dm, DerivedMesh *
faceMap = MEM_mallocN(totface * sizeof(*faceMap), "facemapuv");
for (ccgSubSurf_initFaceIterator(uvss, &fi); !ccgFaceIterator_isStopped(&fi); ccgFaceIterator_next(&fi)) {
CCGFace *f = ccgFaceIterator_getCurrent(&fi);
- faceMap[GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(f))] = f;
+ faceMap[POINTER_AS_INT(ccgSubSurf_getFaceFaceHandle(f))] = f;
}
/* load coordinates from uvss into tface */
@@ -703,10 +703,10 @@ static void ss_sync_ccg_from_derivedmesh(CCGSubSurf *ss,
CCGVert *v;
if (vertexCos) {
- ccgSubSurf_syncVert(ss, SET_INT_IN_POINTER(i), vertexCos[i], 0, &v);
+ ccgSubSurf_syncVert(ss, POINTER_FROM_INT(i), vertexCos[i], 0, &v);
}
else {
- ccgSubSurf_syncVert(ss, SET_INT_IN_POINTER(i), mv->co, 0, &v);
+ ccgSubSurf_syncVert(ss, POINTER_FROM_INT(i), mv->co, 0, &v);
}
((int *)ccgSubSurf_getVertUserData(ss, v))[1] = (index) ? *index++ : i;
@@ -721,8 +721,8 @@ static void ss_sync_ccg_from_derivedmesh(CCGSubSurf *ss,
crease = useFlatSubdiv ? creaseFactor :
me->crease * creaseFactor / 255.0f;
- ccgSubSurf_syncEdge(ss, SET_INT_IN_POINTER(i), SET_UINT_IN_POINTER(me->v1),
- SET_UINT_IN_POINTER(me->v2), crease, &e);
+ ccgSubSurf_syncEdge(ss, POINTER_FROM_INT(i), POINTER_FROM_UINT(me->v1),
+ POINTER_FROM_UINT(me->v2), crease, &e);
((int *)ccgSubSurf_getEdgeUserData(ss, e))[1] = (index) ? *index++ : i;
}
@@ -741,14 +741,14 @@ static void ss_sync_ccg_from_derivedmesh(CCGSubSurf *ss,
ml = mloop + mp->loopstart;
for (j = 0; j < mp->totloop; j++, ml++) {
- fVerts[j] = SET_UINT_IN_POINTER(ml->v);
+ fVerts[j] = POINTER_FROM_UINT(ml->v);
}
/* this is very bad, means mesh is internally inconsistent.
* it is not really possible to continue without modifying
* other parts of code significantly to handle missing faces.
* since this really shouldn't even be possible we just bail.*/
- if (ccgSubSurf_syncFace(ss, SET_INT_IN_POINTER(i), mp->totloop,
+ if (ccgSubSurf_syncFace(ss, POINTER_FROM_INT(i), mp->totloop,
fVerts, &f) == eCCGError_InvalidValue)
{
static int hasGivenError = 0;
@@ -1276,7 +1276,7 @@ void subsurf_copy_grid_paint_mask(DerivedMesh *dm, const MPoly *mpoly,
}
}
-/* utility functon */
+/* utility function */
BLI_INLINE void ccgDM_to_MVert(MVert *mv, const CCGKey *key, CCGElem *elem)
{
copy_v3_v3(mv->co, CCG_elem_co(key, elem));
@@ -1349,7 +1349,7 @@ static void ccgDM_copyFinalVertArray(DerivedMesh *dm, MVert *mvert)
}
-/* utility functon */
+/* utility function */
BLI_INLINE void ccgDM_to_MEdge(MEdge *med, const int v1, const int v2, const short flag)
{
med->v1 = v1;
@@ -1403,7 +1403,7 @@ static void ccgDM_copyFinalEdgeArray(DerivedMesh *dm, MEdge *medge)
CCGEdge *e = ccgdm->edgeMap[index].edge;
short ed_flag = 0;
int x;
- int edgeIdx = GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(e));
+ int edgeIdx = POINTER_AS_INT(ccgSubSurf_getEdgeEdgeHandle(e));
if (!ccgSubSurf_getEdgeNumFaces(e)) {
ed_flag |= ME_LOOSEEDGE;
@@ -1507,19 +1507,19 @@ static void copyFinalLoopArray_task_cb(
edge_size, grid_size);
ml->v = v1;
- ml->e = GET_UINT_FROM_POINTER(BLI_edgehash_lookup(ccgdm->ehash, v1, v2));
+ ml->e = POINTER_AS_UINT(BLI_edgehash_lookup(ccgdm->ehash, v1, v2));
ml++;
ml->v = v2;
- ml->e = GET_UINT_FROM_POINTER(BLI_edgehash_lookup(ccgdm->ehash, v2, v3));
+ ml->e = POINTER_AS_UINT(BLI_edgehash_lookup(ccgdm->ehash, v2, v3));
ml++;
ml->v = v3;
- ml->e = GET_UINT_FROM_POINTER(BLI_edgehash_lookup(ccgdm->ehash, v3, v4));
+ ml->e = POINTER_AS_UINT(BLI_edgehash_lookup(ccgdm->ehash, v3, v4));
ml++;
ml->v = v4;
- ml->e = GET_UINT_FROM_POINTER(BLI_edgehash_lookup(ccgdm->ehash, v4, v1));
+ ml->e = POINTER_AS_UINT(BLI_edgehash_lookup(ccgdm->ehash, v4, v1));
ml++;
}
}
@@ -1541,7 +1541,7 @@ static void ccgDM_copyFinalLoopArray(DerivedMesh *dm, MLoop *mloop)
medge = ccgdm->dm.getEdgeArray((DerivedMesh *)ccgdm);
for (int i = 0; i < ccgdm->dm.numEdgeData; i++) {
- BLI_edgehash_insert(ehash, medge[i].v1, medge[i].v2, SET_INT_IN_POINTER(i));
+ BLI_edgehash_insert(ehash, medge[i].v1, medge[i].v2, POINTER_FROM_INT(i));
}
atomic_cas_ptr((void **)&ccgdm->ehash, ccgdm->ehash, ehash);
@@ -1628,7 +1628,7 @@ static void ccgdm_getVertCos(DerivedMesh *dm, float (*cos)[3])
for (ccgSubSurf_initVertIterator(ss, &vi); !ccgVertIterator_isStopped(&vi); ccgVertIterator_next(&vi)) {
CCGVert *v = ccgVertIterator_getCurrent(&vi);
- vertMap2[GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(v))] = v;
+ vertMap2[POINTER_AS_INT(ccgSubSurf_getVertVertHandle(v))] = v;
}
totedge = ccgSubSurf_getNumEdges(ss);
@@ -1636,7 +1636,7 @@ static void ccgdm_getVertCos(DerivedMesh *dm, float (*cos)[3])
for (ccgSubSurf_initEdgeIterator(ss, &ei), i = 0; !ccgEdgeIterator_isStopped(&ei); i++, ccgEdgeIterator_next(&ei)) {
CCGEdge *e = ccgEdgeIterator_getCurrent(&ei);
- edgeMap2[GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(e))] = e;
+ edgeMap2[POINTER_AS_INT(ccgSubSurf_getEdgeEdgeHandle(e))] = e;
}
totface = ccgSubSurf_getNumFaces(ss);
@@ -1644,7 +1644,7 @@ static void ccgdm_getVertCos(DerivedMesh *dm, float (*cos)[3])
for (ccgSubSurf_initFaceIterator(ss, &fi); !ccgFaceIterator_isStopped(&fi); ccgFaceIterator_next(&fi)) {
CCGFace *f = ccgFaceIterator_getCurrent(&fi);
- faceMap2[GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(f))] = f;
+ faceMap2[POINTER_AS_INT(ccgSubSurf_getFaceFaceHandle(f))] = f;
}
i = 0;
@@ -1951,7 +1951,7 @@ static void ccgDM_buffer_copy_normal(
for (i = 0; i < totface; i++) {
CCGFace *f = ccgdm->faceMap[i].face;
int S, x, y, numVerts = ccgSubSurf_getFaceNumVerts(f);
- int index = GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(f));
+ int index = POINTER_AS_INT(ccgSubSurf_getFaceFaceHandle(f));
const float (*ln)[3] = NULL;
if (faceFlags) {
@@ -2067,7 +2067,7 @@ static void ccgDM_buffer_copy_triangles(
for (i = 0; i < totface; i++) {
CCGFace *f = ccgdm->faceMap[i].face;
int S, x, y, numVerts = ccgSubSurf_getFaceNumVerts(f);
- int index = GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(f));
+ int index = POINTER_AS_INT(ccgSubSurf_getFaceFaceHandle(f));
bool is_hidden;
int mati;
@@ -2300,7 +2300,7 @@ static void ccgDM_buffer_copy_uv_texpaint(
for (i = 0; i < totface; i++) {
CCGFace *f = ccgdm->faceMap[i].face;
int S, x, y, numVerts = ccgSubSurf_getFaceNumVerts(f);
- int index = GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(f));
+ int index = POINTER_AS_INT(ccgSubSurf_getFaceFaceHandle(f));
int matnr;
if (faceFlags) {
@@ -2431,7 +2431,7 @@ static void ccgDM_buffer_copy_edge(
CCGVert *ev2 = ccgSubSurf_getEdgeVert1(e);
f = ccgSubSurf_getEdgeFace(e, 0);
- fhandle = GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(f));
+ fhandle = POINTER_AS_INT(ccgSubSurf_getFaceFaceHandle(f));
totvert = ccgSubSurf_getFaceNumVerts(f);
/* find the index of vertices in the face */
@@ -2594,7 +2594,7 @@ static GPUDrawObject *ccgDM_GPUObjectNew(DerivedMesh *dm)
for (i = 0; i < totface; i++) {
CCGFace *f = ccgdm->faceMap[i].face;
int numVerts = ccgSubSurf_getFaceNumVerts(f);
- int index = GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(f));
+ int index = POINTER_AS_INT(ccgSubSurf_getFaceFaceHandle(f));
const short new_matnr = ME_MAT_NR_TEST(faceFlags[index].mat_nr, dm_totmat);
matinfo[new_matnr].totelements += numVerts * gridFaces * gridFaces * 6;
matinfo[new_matnr].totloops += numVerts * gridFaces * gridFaces * 4;
@@ -2856,7 +2856,7 @@ static void ccgDM_drawMappedFacesGLSL(DerivedMesh *dm,
CCGFace *f = ccgdm->faceMap[i].face;
const float (*ln)[3] = NULL;
int S, x, y, drawSmooth;
- int index = GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(f));
+ int index = POINTER_AS_INT(ccgSubSurf_getFaceFaceHandle(f));
int origIndex = ccgDM_getFaceMapIndex(ss, f);
int numVerts = ccgSubSurf_getFaceNumVerts(f);
@@ -3079,7 +3079,7 @@ static void ccgDM_drawMappedFacesGLSL(DerivedMesh *dm,
for (a = 0; a < totpoly; a++) {
CCGFace *f = ccgdm->faceMap[a].face;
- int orig_index = GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(f));
+ int orig_index = POINTER_AS_INT(ccgSubSurf_getFaceFaceHandle(f));
int S, x, y, numVerts = ccgSubSurf_getFaceNumVerts(f);
int i;
@@ -3297,7 +3297,7 @@ static void ccgDM_drawMappedFacesMat(DerivedMesh *dm,
CCGFace *f = ccgdm->faceMap[i].face;
const float (*ln)[3] = NULL;
int S, x, y, drawSmooth;
- int index = GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(f));
+ int index = POINTER_AS_INT(ccgSubSurf_getFaceFaceHandle(f));
int origIndex = ccgDM_getFaceMapIndex(ss, f);
int new_matnr;
@@ -3577,7 +3577,7 @@ static void ccgDM_drawFacesTex_common(DerivedMesh *dm,
CCGFace *f = ccgdm->faceMap[polyindex].face;
int numVerts = ccgSubSurf_getFaceNumVerts(f);
int index = ccgDM_getFaceMapIndex(ss, f);
- int orig_index = GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(f));
+ int orig_index = POINTER_AS_INT(ccgSubSurf_getFaceFaceHandle(f));
int mat_nr;
int facequads = numVerts * gridFaces * gridFaces;
int actualFace = ccgdm->faceMap[polyindex].startFace;
@@ -3770,7 +3770,7 @@ static void ccgDM_drawMappedFaces(DerivedMesh *dm,
unsigned char *cp = NULL;
const float (*ln)[3] = NULL;
- origIndex = GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(f));
+ origIndex = POINTER_AS_INT(ccgSubSurf_getFaceFaceHandle(f));
if (flag & DM_DRAW_ALWAYS_SMOOTH) drawSmooth = 1;
else if (faceFlags) drawSmooth = (lnors || (faceFlags[origIndex].flag & ME_SMOOTH));
@@ -4707,7 +4707,7 @@ static void create_ccgdm_maps(CCGDerivedMesh *ccgdm,
{
CCGVert *v = ccgVertIterator_getCurrent(&vi);
- ccgdm->vertMap[GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(v))].vert = v;
+ ccgdm->vertMap[POINTER_AS_INT(ccgSubSurf_getVertVertHandle(v))].vert = v;
}
totedge = ccgSubSurf_getNumEdges(ss);
@@ -4718,7 +4718,7 @@ static void create_ccgdm_maps(CCGDerivedMesh *ccgdm,
{
CCGEdge *e = ccgEdgeIterator_getCurrent(&ei);
- ccgdm->edgeMap[GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(e))].edge = e;
+ ccgdm->edgeMap[POINTER_AS_INT(ccgSubSurf_getEdgeEdgeHandle(e))].edge = e;
}
totface = ccgSubSurf_getNumFaces(ss);
@@ -4729,7 +4729,7 @@ static void create_ccgdm_maps(CCGDerivedMesh *ccgdm,
{
CCGFace *f = ccgFaceIterator_getCurrent(&fi);
- ccgdm->faceMap[GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(f))].face = f;
+ ccgdm->faceMap[POINTER_AS_INT(ccgSubSurf_getFaceFaceHandle(f))].face = f;
}
}
@@ -4803,7 +4803,7 @@ static void set_ccgdm_all_geometry(CCGDerivedMesh *ccgdm,
CCGFace *f = ccgdm->faceMap[index].face;
int numVerts = ccgSubSurf_getFaceNumVerts(f);
int numFinalEdges = numVerts * (gridSideEdges + gridInternalEdges);
- int origIndex = GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(f));
+ int origIndex = POINTER_AS_INT(ccgSubSurf_getFaceFaceHandle(f));
int g2_wid = gridCuts + 2;
float *w, *w2;
int s, x, y;
@@ -4837,7 +4837,7 @@ static void set_ccgdm_all_geometry(CCGDerivedMesh *ccgdm,
#endif
for (s = 0; s < numVerts; s++) {
CCGVert *v = ccgSubSurf_getFaceVert(f, s);
- vertidx[s] = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(v));
+ vertidx[s] = POINTER_AS_INT(ccgSubSurf_getVertVertHandle(v));
}
/*I think this is for interpolating the center vert?*/
@@ -4950,13 +4950,13 @@ static void set_ccgdm_all_geometry(CCGDerivedMesh *ccgdm,
int mapIndex = ccgDM_getEdgeMapIndex(ss, e);
int x;
int vertIdx[2];
- int edgeIdx = GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(e));
+ int edgeIdx = POINTER_AS_INT(ccgSubSurf_getEdgeEdgeHandle(e));
CCGVert *v;
v = ccgSubSurf_getEdgeVert0(e);
- vertIdx[0] = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(v));
+ vertIdx[0] = POINTER_AS_INT(ccgSubSurf_getVertVertHandle(v));
v = ccgSubSurf_getEdgeVert1(e);
- vertIdx[1] = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(v));
+ vertIdx[1] = POINTER_AS_INT(ccgSubSurf_getVertVertHandle(v));
ccgdm->edgeMap[index].startVert = vertNum;
ccgdm->edgeMap[index].startEdge = edgeNum;
@@ -5010,7 +5010,7 @@ static void set_ccgdm_all_geometry(CCGDerivedMesh *ccgdm,
int mapIndex = ccgDM_getVertMapIndex(ccgdm->ss, v);
int vertIdx;
- vertIdx = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(v));
+ vertIdx = POINTER_AS_INT(ccgSubSurf_getVertVertHandle(v));
ccgdm->vertMap[index].startVert = vertNum;
@@ -5134,7 +5134,7 @@ static bool subsurf_use_gpu_backend(SubsurfFlags flags)
{
#ifdef WITH_OPENSUBDIV
/* Use GPU backend if it's a last modifier in the stack
- * and user choosed to use any of the OSD compute devices,
+ * and user chose to use any of the OSD compute devices,
* but also check if GPU has all needed features.
*/
return
@@ -5234,7 +5234,7 @@ struct DerivedMesh *subsurf_make_derived_from_derived(
if (smd->mCache && (flags & SUBSURF_IS_FINAL_CALC)) {
#ifdef WITH_OPENSUBDIV
- /* With OpenSubdiv enabled we always tries to re-use previos
+ /* With OpenSubdiv enabled we always tries to re-use previous
* subsurf structure in order to save computation time since
* re-creation is rather a complicated business.
*
@@ -5295,7 +5295,7 @@ void subsurf_calculate_limit_positions(Mesh *me, float (*r_positions)[3])
for (ccgSubSurf_initVertIterator(ss, &vi); !ccgVertIterator_isStopped(&vi); ccgVertIterator_next(&vi)) {
CCGVert *v = ccgVertIterator_getCurrent(&vi);
- int idx = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(v));
+ int idx = POINTER_AS_INT(ccgSubSurf_getVertVertHandle(v));
int N = ccgSubSurf_getVertNumEdges(v);
int numFaces = ccgSubSurf_getVertNumFaces(v);
float *co;
diff --git a/source/blender/blenkernel/intern/suggestions.c b/source/blender/blenkernel/intern/suggestions.c
index 043fc813b95..2e48599a113 100644
--- a/source/blender/blenkernel/intern/suggestions.c
+++ b/source/blender/blenkernel/intern/suggestions.c
@@ -246,12 +246,12 @@ void texttool_docs_show(const char *docs)
/* Ensure documentation ends with a '\n' */
if (docs[len - 1] != '\n') {
documentation = MEM_mallocN(len + 2, "Documentation");
- BLI_strncpy(documentation, docs, len);
+ memcpy(documentation, docs, len);
documentation[len++] = '\n';
}
else {
documentation = MEM_mallocN(len + 1, "Documentation");
- BLI_strncpy(documentation, docs, len);
+ memcpy(documentation, docs, len);
}
documentation[len] = '\0';
}
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index 76df163ee3a..63b9f838632 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -355,7 +355,7 @@ static void text_from_buf(Text *text, const unsigned char *buffer, const int len
* - rest of line (if last line in file hasn't got \n terminator).
* in this case content of such line would be used to fill text line buffer
* - file is empty. in this case new line is needed to start editing from.
- * - last characted in buffer is \n. in this case new line is needed to
+ * - last character in buffer is \n. in this case new line is needed to
* deal with newline at end of file. (see [#28087]) (sergey) */
if (llen != 0 || text->nlines == 0 || buffer[len - 1] == '\n') {
TextLine *tmp;
@@ -1705,7 +1705,7 @@ static void txt_undo_add_blockop(Text *text, TextUndoBuf *utxt, int op, const ch
/* 4 bytes */
txt_undo_store_uint32(utxt->buf, &utxt->pos, length);
/* 'length' bytes */
- BLI_strncpy(utxt->buf + utxt->pos, buf, length);
+ memcpy(utxt->buf + utxt->pos, buf, length);
utxt->pos += length;
/* 4 bytes */
txt_undo_store_uint32(utxt->buf, &utxt->pos, length);
@@ -2968,9 +2968,9 @@ int txt_setcurr_tab_spaces(Text *text, int space)
}
if (strstr(text->curl->line, word)) {
/* if we find a ':' on this line, then add a tab but not if it is:
- * 1) in a comment
- * 2) within an identifier
- * 3) after the cursor (text->curc), i.e. when creating space before a function def [#25414]
+ * 1) in a comment
+ * 2) within an identifier
+ * 3) after the cursor (text->curc), i.e. when creating space before a function def [#25414]
*/
int a;
bool is_indent = false;
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index a0399c74be1..bd6199d91b4 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -548,12 +548,15 @@ Tex *BKE_texture_copy(Main *bmain, const Tex *tex)
/* texture copy without adding to main dbase */
Tex *BKE_texture_localize(Tex *tex)
{
- /* TODO replace with something like
- * Tex *tex_copy;
- * BKE_id_copy_ex(bmain, &tex->id, (ID **)&tex_copy, LIB_ID_COPY_NO_MAIN | LIB_ID_COPY_NO_PREVIEW | LIB_ID_COPY_NO_USER_REFCOUNT, false);
- * return tex_copy;
+ /* TODO(bastien): Replace with something like:
*
- * ... Once f*** nodes are fully converted to that too :( */
+ * Tex *tex_copy;
+ * BKE_id_copy_ex(bmain, &tex->id, (ID **)&tex_copy,
+ * LIB_ID_COPY_NO_MAIN | LIB_ID_COPY_NO_PREVIEW | LIB_ID_COPY_NO_USER_REFCOUNT,
+ * false);
+ * return tex_copy;
+ *
+ * NOTE: Only possible once nested node trees are fully converted to that too. */
Tex *texn;
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c
index 830732f4ce2..a3536cd0d68 100644
--- a/source/blender/blenkernel/intern/tracking.c
+++ b/source/blender/blenkernel/intern/tracking.c
@@ -1606,7 +1606,7 @@ MovieTrackingPlaneMarker *BKE_tracking_plane_marker_insert(MovieTrackingPlaneTra
int a = plane_track->markersnr;
/* Find position in array where to add new marker. */
- /* TODO(sergey): we coud use bisect to speed things up. */
+ /* TODO(sergey): we could use bisect to speed things up. */
while (a--) {
if (plane_track->markers[a].framenr < plane_marker->framenr) {
break;
@@ -1992,10 +1992,10 @@ void BKE_tracking_camera_to_blender(MovieTracking *tracking, Scene *scene, Camer
camera->sensor_fit = CAMERA_SENSOR_FIT_AUTO;
camera->lens = focal * camera->sensor_x / width;
- scene->r.xsch = width * tracking->camera.pixel_aspect;
+ scene->r.xsch = width;
scene->r.ysch = height;
- scene->r.xasp = 1.0f;
+ scene->r.xasp = tracking->camera.pixel_aspect;
scene->r.yasp = 1.0f;
BKE_tracking_camera_shift_get(tracking, width, height, &camera->shiftx, &camera->shifty);
diff --git a/source/blender/blenkernel/intern/tracking_region_tracker.c b/source/blender/blenkernel/intern/tracking_region_tracker.c
index 106dd125575..dcc61f409fc 100644
--- a/source/blender/blenkernel/intern/tracking_region_tracker.c
+++ b/source/blender/blenkernel/intern/tracking_region_tracker.c
@@ -149,7 +149,7 @@ static ImBuf *tracking_context_get_keyframed_ibuf(MovieClip *clip, MovieClipUser
return tracking_context_get_frame_ibuf(clip, user, clip_flag, keyed_framenr);
}
-/* Get image buffer which si used as referece for track. */
+/* Get image buffer which si used as reference for track. */
static ImBuf *tracking_context_get_reference_ibuf(MovieClip *clip, MovieClipUser *user, int clip_flag,
MovieTrackingTrack *track, int curfra, bool backwards,
MovieTrackingMarker **reference_marker)
diff --git a/source/blender/blenkernel/intern/tracking_stabilize.c b/source/blender/blenkernel/intern/tracking_stabilize.c
index cbf1a02a46c..331db5b6ff0 100644
--- a/source/blender/blenkernel/intern/tracking_stabilize.c
+++ b/source/blender/blenkernel/intern/tracking_stabilize.c
@@ -992,7 +992,7 @@ static void initialize_all_tracks(StabContext *ctx, float aspect)
* By definition, offset contribution is zero there.
*/
int reference_frame = tracking->stabilization.anchor_frame;
- float average_angle=0, average_scale_step=0;
+ float average_angle = 0, average_scale_step = 0;
float average_translation[2], average_pos[2], pivot[2];
zero_v2(average_translation);
zero_v2(pivot);
diff --git a/source/blender/blenkernel/intern/tracking_util.c b/source/blender/blenkernel/intern/tracking_util.c
index 8c1b846db84..621e0cc6a2e 100644
--- a/source/blender/blenkernel/intern/tracking_util.c
+++ b/source/blender/blenkernel/intern/tracking_util.c
@@ -853,17 +853,17 @@ static ImBuf *accessor_get_ibuf(TrackingImageAccessor *accessor,
}
static libmv_CacheKey accessor_get_image_callback(
- struct libmv_FrameAccessorUserData *user_data,
- int clip_index,
- int frame,
- libmv_InputMode input_mode,
- int downscale,
- const libmv_Region *region,
- const libmv_FrameTransform *transform,
- float **destination,
- int *width,
- int *height,
- int *channels)
+ struct libmv_FrameAccessorUserData *user_data,
+ int clip_index,
+ int frame,
+ libmv_InputMode input_mode,
+ int downscale,
+ const libmv_Region *region,
+ const libmv_FrameTransform *transform,
+ float **destination,
+ int *width,
+ int *height,
+ int *channels)
{
TrackingImageAccessor *accessor = (TrackingImageAccessor *) user_data;
ImBuf *ibuf;
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c
index 8606da0743b..3a903eb31c1 100644
--- a/source/blender/blenkernel/intern/unit.c
+++ b/source/blender/blenkernel/intern/unit.c
@@ -321,7 +321,7 @@ static const bUnitDef *unit_best_fit(
if (suppress && (unit->flag & B_UNIT_DEF_SUPPRESS))
continue;
- /* scale down scalar so 1cm doesnt convert to 10mm because of float error */
+ /* scale down scalar so 1cm doesn't convert to 10mm because of float error */
if (UNLIKELY(unit->flag & B_UNIT_DEF_TENTH)) {
if (value_abs >= unit->scalar * (0.1 - EPS)) {
return unit;
@@ -418,7 +418,7 @@ static size_t unit_as_string(char *str, int len_max, double value, int prec, con
#endif
}
- /* terminate no matter whats done with padding above */
+ /* terminate no matter what's done with padding above */
if (i >= len_max)
i = len_max - 1;
diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c
index 545ca41c9c0..a44d717bbdd 100644
--- a/source/blender/blenkernel/intern/world.c
+++ b/source/blender/blenkernel/intern/world.c
@@ -159,12 +159,15 @@ World *BKE_world_copy(Main *bmain, const World *wrld)
World *BKE_world_localize(World *wrld)
{
- /* TODO replace with something like
- * World *wrld_copy;
- * BKE_id_copy_ex(bmain, &wrld->id, (ID **)&wrld_copy, LIB_ID_COPY_NO_MAIN | LIB_ID_COPY_NO_PREVIEW | LIB_ID_COPY_NO_USER_REFCOUNT, false);
- * return wrld_copy;
+ /* TODO(bastien): Replace with something like:
*
- * ... Once f*** nodes are fully converted to that too :( */
+ * World *wrld_copy;
+ * BKE_id_copy_ex(bmain, &wrld->id, (ID **)&wrld_copy,
+ * LIB_ID_COPY_NO_MAIN | LIB_ID_COPY_NO_PREVIEW | LIB_ID_COPY_NO_USER_REFCOUNT,
+ * false);
+ * return wrld_copy;
+ *
+ * NOTE: Only possible once nested node trees are fully converted to that too. */
World *wrldn;
int a;
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index 2bee16a30c8..68083b499f3 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -736,6 +736,26 @@ static AVStream *alloc_audio_stream(FFMpegContext *context, RenderData *rd, int
c->sample_fmt = AV_SAMPLE_FMT_S16;
c->channels = rd->ffcodecdata.audio_channels;
+#ifdef FFMPEG_HAVE_FRAME_CHANNEL_LAYOUT
+ switch (rd->ffcodecdata.audio_channels) {
+ case FFM_CHANNELS_MONO:
+ c->channel_layout = AV_CH_LAYOUT_MONO;
+ break;
+ case FFM_CHANNELS_STEREO:
+ c->channel_layout = AV_CH_LAYOUT_STEREO;
+ break;
+ case FFM_CHANNELS_SURROUND4:
+ c->channel_layout = AV_CH_LAYOUT_QUAD;
+ break;
+ case FFM_CHANNELS_SURROUND51:
+ c->channel_layout = AV_CH_LAYOUT_5POINT1_BACK;
+ break;
+ case FFM_CHANNELS_SURROUND71:
+ c->channel_layout = AV_CH_LAYOUT_7POINT1;
+ break;
+ }
+#endif
+
if (request_float_audio_buffer(codec_id)) {
/* mainly for AAC codec which is experimental */
c->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;
diff --git a/source/blender/blenlib/BLI_dlrbTree.h b/source/blender/blenlib/BLI_dlrbTree.h
index 6e47fd4ddb3..e776f594a84 100644
--- a/source/blender/blenlib/BLI_dlrbTree.h
+++ b/source/blender/blenlib/BLI_dlrbTree.h
@@ -76,19 +76,19 @@ typedef struct DLRBT_Tree {
/* Callback Types --------------------------------- */
/* return -1, 0, 1 for whether the given data is less than, equal to, or greater than the given node
- * - node: <DLRBT_Node> the node to compare to
- * - data: pointer to the relevant data or values stored in the bitpattern dependent on the function
+ * - node: <DLRBT_Node> the node to compare to
+ * - data: pointer to the relevant data or values stored in the bitpattern dependent on the function
*/
typedef short (*DLRBT_Comparator_FP)(void *node, void *data);
/* return a new node instance wrapping the given data
- * - data: pointer to the relevant data to create a subclass of node from
+ * - data: pointer to the relevant data to create a subclass of node from
*/
typedef DLRBT_Node *(*DLRBT_NAlloc_FP)(void *data);
/* update an existing node instance accordingly to be in sync with the given data *
- * - node: <DLRBT_Node> the node to update
- * - data: pointer to the relevant data or values stored in the bitpattern dependent on the function
+ * - node: <DLRBT_Node> the node to update
+ * - data: pointer to the relevant data or values stored in the bitpattern dependent on the function
*/
typedef void (*DLRBT_NUpdate_FP)(void *node, void *data);
diff --git a/source/blender/blenlib/BLI_math.h b/source/blender/blenlib/BLI_math.h
index ec3fbdc9bfc..5bdf8b7791f 100644
--- a/source/blender/blenlib/BLI_math.h
+++ b/source/blender/blenlib/BLI_math.h
@@ -28,23 +28,24 @@
/** \file BLI_math.h
* \ingroup bli
- * \section mathabbrev Abbreviations
*
- * - ``fl`` = float
- * - ``db`` = double
- * - ``v2`` = vec2 = vector 2
- * - ``v3`` = vec3 = vector 3
- * - ``v4`` = vec4 = vector 4
- * - ``vn`` = vec4 = vector N dimensions, *passed as an arg, after the vector*.
- * - ``qt`` = quat = quaternion
- * - ``dq`` = dquat = dual quaternion
- * - ``m2`` = mat2 = matrix 2x2
- * - ``m3`` = mat3 = matrix 3x3
- * - ``m4`` = mat4 = matrix 4x4
- * - ``eul`` = euler rotation
- * - ``eulO`` = euler with order
- * - ``plane`` = plane 4, (vec3, distance)
- * - ``plane3`` = plane 3 (same as a ``plane`` with a zero 4th component)
+ * \section mathabbrev Abbreviations
+ *
+ * - ``fl`` = float
+ * - ``db`` = double
+ * - ``v2`` = vec2 = vector 2
+ * - ``v3`` = vec3 = vector 3
+ * - ``v4`` = vec4 = vector 4
+ * - ``vn`` = vec4 = vector N dimensions, *passed as an arg, after the vector*.
+ * - ``qt`` = quat = quaternion
+ * - ``dq`` = dquat = dual quaternion
+ * - ``m2`` = mat2 = matrix 2x2
+ * - ``m3`` = mat3 = matrix 3x3
+ * - ``m4`` = mat4 = matrix 4x4
+ * - ``eul`` = euler rotation
+ * - ``eulO`` = euler with order
+ * - ``plane`` = plane 4, (vec3, distance)
+ * - ``plane3`` = plane 3 (same as a ``plane`` with a zero 4th component)
*
* \subsection mathabbrev_all Function Type Abbreviations
*
@@ -57,13 +58,13 @@
* - ``_char`` = char
* - ``_uchar`` = unsigned char
*
- * \section mathvarnames Variable Names
+ * \section mathvarnames Variable Names
*
- * - f = single value
- * - a, b, c = vectors
- * - r = result vector
- * - A, B, C = matrices
- * - R = result matrix
+ * - f = single value
+ * - a, b, c = vectors
+ * - r = result vector
+ * - A, B, C = matrices
+ * - R = result matrix
*/
#include "BLI_math_base.h"
diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h
index b3a95d65752..e4cf4839b45 100644
--- a/source/blender/blenlib/BLI_math_geom.h
+++ b/source/blender/blenlib/BLI_math_geom.h
@@ -186,6 +186,11 @@ void limit_dist_v3(float v1[3], float v2[3], const float dist);
#define ISECT_LINE_LINE_CROSS 2
int isect_seg_seg_v2(const float a1[2], const float a2[2], const float b1[2], const float b2[2]);
+void isect_seg_seg_v3(
+ const float a0[3], const float a1[3],
+ const float b0[3], const float b1[3],
+ float r_a[3], float r_b[3]);
+
int isect_seg_seg_v2_int(const int a1[2], const int a2[2], const int b1[2], const int b2[2]);
int isect_seg_seg_v2_point_ex(
const float v0[2], const float v1[2], const float v2[2], const float v3[2], const float endpoint_bias,
diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h
index 59c9341f75c..c23c0409f81 100644
--- a/source/blender/blenlib/BLI_math_vector.h
+++ b/source/blender/blenlib/BLI_math_vector.h
@@ -272,6 +272,7 @@ MINLINE bool compare_v4v4_relative(const float a[4], const float b[4], const flo
MINLINE bool compare_len_v3v3(const float a[3], const float b[3], const float limit) ATTR_WARN_UNUSED_RESULT;
MINLINE bool compare_len_squared_v3v3(const float a[3], const float b[3], const float limit) ATTR_WARN_UNUSED_RESULT;
+MINLINE bool compare_len_squared_v4v4(const float a[4], const float b[4], const float limit) ATTR_WARN_UNUSED_RESULT;
MINLINE float line_point_side_v2(const float l1[2], const float l2[2], const float pt[2]) ATTR_WARN_UNUSED_RESULT;
diff --git a/source/blender/blenlib/BLI_rect.h b/source/blender/blenlib/BLI_rect.h
index a6670266643..221d328dd9e 100644
--- a/source/blender/blenlib/BLI_rect.h
+++ b/source/blender/blenlib/BLI_rect.h
@@ -34,7 +34,8 @@
*/
#include "DNA_vec_types.h"
-#include "BLI_utildefines.h"
+#include "BLI_sys_types.h" /* bool */
+#include "BLI_compiler_compat.h"
struct rctf;
struct rcti;
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index 3d4b227ffa7..98c27bd053b 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -508,11 +508,11 @@ extern bool BLI_memory_is_zero(const void *arr, const size_t arr_size);
/* Warning-free macros for storing ints in pointers. Use these _only_
* for storing an int in a pointer, not a pointer in an int (64bit)! */
-#define SET_INT_IN_POINTER(i) ((void *)(intptr_t)(i))
-#define GET_INT_FROM_POINTER(i) ((void)0, ((int)(intptr_t)(i)))
+#define POINTER_FROM_INT(i) ((void *)(intptr_t)(i))
+#define POINTER_AS_INT(i) ((void)0, ((int)(intptr_t)(i)))
-#define SET_UINT_IN_POINTER(i) ((void *)(uintptr_t)(i))
-#define GET_UINT_FROM_POINTER(i) ((void)0, ((unsigned int)(uintptr_t)(i)))
+#define POINTER_FROM_UINT(i) ((void *)(uintptr_t)(i))
+#define POINTER_AS_UINT(i) ((void)0, ((unsigned int)(uintptr_t)(i)))
/* Set flag from a single test */
#define SET_FLAG_FROM_TEST(value, test, flag) \
diff --git a/source/blender/blenlib/intern/BLI_ghash_utils.c b/source/blender/blenlib/intern/BLI_ghash_utils.c
index 6554ee7c92f..a0d9fefe465 100644
--- a/source/blender/blenlib/intern/BLI_ghash_utils.c
+++ b/source/blender/blenlib/intern/BLI_ghash_utils.c
@@ -54,14 +54,16 @@ uint BLI_ghashutil_ptrhash(const void *key)
return (uint)(intptr_t)key;
}
#else
-/* based python3.3's pointer hashing function */
+/* Based Python3.7's pointer hashing function. */
uint 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 (uint)y;
+
+ /* Note: Unlike Python 'sizeof(uint)' is used instead of 'sizeof(void *)',
+ * Otherwise casting to 'uint' ignores the upper bits on 64bit platforms. */
+ return (uint)(y >> 4) | ((uint)y << (8 * sizeof(uint) - 4));
}
#endif
bool BLI_ghashutil_ptrcmp(const void *a, const void *b)
@@ -126,7 +128,7 @@ uint BLI_ghashutil_inthash_p_murmur(const void *ptr)
uint BLI_ghashutil_inthash_p_simple(const void *ptr)
{
- return GET_UINT_FROM_POINTER(ptr);
+ return POINTER_AS_UINT(ptr);
}
bool BLI_ghashutil_intcmp(const void *a, const void *b)
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index 1676bf5d779..467eed97a74 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -738,9 +738,9 @@ static int implicit_leafs_index(const BVHBuildHelper *data, const int depth, con
* All tree types >= 2 are supported.
*
* Advantages of the used trees include:
- * - No need to store child/parent relations (they are implicit);
- * - Any node child always has an index greater than the parent;
- * - Brother nodes are sequential in memory;
+ * - No need to store child/parent relations (they are implicit);
+ * - Any node child always has an index greater than the parent;
+ * - Brother nodes are sequential in memory;
*
*
* Some math relations derived for general implicit trees:
@@ -764,9 +764,9 @@ static int implicit_needed_branches(int tree_type, int leafs)
* This function handles the problem of "sorting" the leafs (along the split_axis).
*
* It arranges the elements in the given partitions such that:
- * - any element in partition N is less or equal to any element in partition N+1.
- * - if all elements are different all partition will get the same subset of elements
- * as if the array was sorted.
+ * - any element in partition N is less or equal to any element in partition N+1.
+ * - if all elements are different all partition will get the same subset of elements
+ * as if the array was sorted.
*
* partition P is described as the elements in the range ( nth[P], nth[P+1] ]
*
@@ -863,9 +863,9 @@ static void non_recursive_bvh_div_nodes_task_cb(
/**
* This functions builds an optimal implicit tree from the given leafs.
* Where optimal stands for:
- * - The resulting tree will have the smallest number of branches;
- * - At most only one branch will have NULL childs;
- * - All leafs will be stored at level N or N+1.
+ * - The resulting tree will have the smallest number of branches;
+ * - At most only one branch will have NULL childs;
+ * - All leafs will be stored at level N or N+1.
*
* This function creates an implicit tree on branches_array, the leafs are given on the leafs_array.
*
diff --git a/source/blender/blenlib/intern/DLRB_tree.c b/source/blender/blenlib/intern/DLRB_tree.c
index eb3a79502ae..e331e070a4a 100644
--- a/source/blender/blenlib/intern/DLRB_tree.c
+++ b/source/blender/blenlib/intern/DLRB_tree.c
@@ -102,8 +102,8 @@ static void linkedlist_sync_add_node(DLRBT_Tree *tree, DLRBT_Node *node)
linkedlist_sync_add_node(tree, node->left);
/* now add self
- * - must remove detach from other links first
- * (for now, only clear own pointers)
+ * - must remove detach from other links first
+ * (for now, only clear own pointers)
*/
node->prev = node->next = NULL;
BLI_addtail((ListBase *)tree, (Link *)node);
diff --git a/source/blender/blenlib/intern/array_store.c b/source/blender/blenlib/intern/array_store.c
index df93dad4c32..153ba3ea0d0 100644
--- a/source/blender/blenlib/intern/array_store.c
+++ b/source/blender/blenlib/intern/array_store.c
@@ -1760,7 +1760,7 @@ bool BLI_array_store_is_valid(
}
GHASH_ITER (gh_iter, chunk_list_map) {
const struct BChunkList *chunk_list = BLI_ghashIterator_getKey(&gh_iter);
- const int users = GET_INT_FROM_POINTER(BLI_ghashIterator_getValue(&gh_iter));
+ const int users = POINTER_AS_INT(BLI_ghashIterator_getValue(&gh_iter));
if (!(chunk_list->users == users)) {
ok = false;
goto user_finally;
@@ -1790,7 +1790,7 @@ bool BLI_array_store_is_valid(
GHASH_ITER (gh_iter, chunk_map) {
const struct BChunk *chunk = BLI_ghashIterator_getKey(&gh_iter);
- const int users = GET_INT_FROM_POINTER(BLI_ghashIterator_getValue(&gh_iter));
+ const int users = POINTER_AS_INT(BLI_ghashIterator_getValue(&gh_iter));
if (!(chunk->users == users)) {
ok = false;
goto user_finally;
diff --git a/source/blender/blenlib/intern/astar.c b/source/blender/blenlib/intern/astar.c
index 1b57dc5a683..86c1faad096 100644
--- a/source/blender/blenlib/intern/astar.c
+++ b/source/blender/blenlib/intern/astar.c
@@ -228,10 +228,10 @@ bool BLI_astar_graph_solve(
todo_nodes = BLI_heap_new();
BLI_heap_insert(todo_nodes,
f_cost_cb(as_graph, r_solution, NULL, -1, node_index_src, node_index_dst),
- SET_INT_IN_POINTER(node_index_src));
+ POINTER_FROM_INT(node_index_src));
while (!BLI_heap_is_empty(todo_nodes)) {
- const int node_curr_idx = GET_INT_FROM_POINTER(BLI_heap_pop_min(todo_nodes));
+ const int node_curr_idx = POINTER_AS_INT(BLI_heap_pop_min(todo_nodes));
BLI_AStarGNode *node_curr = &as_graph->nodes[node_curr_idx];
LinkData *ld;
@@ -271,7 +271,7 @@ bool BLI_astar_graph_solve(
* no problem. */
BLI_heap_insert(todo_nodes,
f_cost_cb(as_graph, r_solution, link, node_curr_idx, node_next_idx, node_index_dst),
- SET_INT_IN_POINTER(node_next_idx));
+ POINTER_FROM_INT(node_next_idx));
}
}
}
diff --git a/source/blender/blenlib/intern/freetypefont.c b/source/blender/blenlib/intern/freetypefont.c
index c7604b3cd6d..b493b97863c 100644
--- a/source/blender/blenlib/intern/freetypefont.c
+++ b/source/blender/blenlib/intern/freetypefont.c
@@ -99,7 +99,7 @@ static VChar *freetypechar_to_vchar(FT_Face face, FT_ULong charcode, VFontData *
che->index = charcode;
che->width = glyph->advance.x * scale;
- BLI_ghash_insert(vfd->characters, SET_UINT_IN_POINTER(che->index), che);
+ BLI_ghash_insert(vfd->characters, POINTER_FROM_UINT(che->index), che);
/* Start converting the FT data */
onpoints = (int *)MEM_callocN((ftoutline.n_contours) * sizeof(int), "onpoints");
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index e8ccef4d55e..dca9d4204c3 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -911,6 +911,70 @@ int isect_seg_seg_v2(const float v1[2], const float v2[2], const float v3[2], co
return ISECT_LINE_LINE_NONE;
}
+/* Returns a point on each segment that is closest to the other. */
+void isect_seg_seg_v3(
+ const float a0[3], const float a1[3],
+ const float b0[3], const float b1[3],
+ float r_a[3], float r_b[3])
+{
+ float fac_a, fac_b;
+ float a_dir[3], b_dir[3], a0b0[3], crs_ab[3];
+ sub_v3_v3v3(a_dir, a1, a0);
+ sub_v3_v3v3(b_dir, b1, b0);
+ sub_v3_v3v3(a0b0, b0, a0);
+ cross_v3_v3v3(crs_ab, b_dir, a_dir);
+ const float nlen = len_squared_v3(crs_ab);
+
+ if (nlen == 0.0f) {
+ /* Parallel Lines */
+ /* In this case return any point that
+ * is between the closest segments. */
+ float a0b1[3], a1b0[3], len_a, len_b, fac1, fac2;
+ sub_v3_v3v3(a0b1, b1, a0);
+ sub_v3_v3v3(a1b0, b0, a1);
+ len_a = len_squared_v3(a_dir);
+ len_b = len_squared_v3(b_dir);
+
+ if (len_a) {
+ fac1 = dot_v3v3(a0b0, a_dir);
+ fac2 = dot_v3v3(a0b1, a_dir);
+ CLAMP(fac1, 0.0f, len_a);
+ CLAMP(fac2, 0.0f, len_a);
+ fac_a = (fac1 + fac2) / (2 * len_a);
+ }
+ else {
+ fac_a = 0.0f;
+ }
+
+ if (len_b) {
+ fac1 = -dot_v3v3(a0b0, b_dir);
+ fac2 = -dot_v3v3(a1b0, b_dir);
+ CLAMP(fac1, 0.0f, len_b);
+ CLAMP(fac2, 0.0f, len_b);
+ fac_b = (fac1 + fac2) / (2 * len_b);
+ }
+ else {
+ fac_b = 0.0f;
+ }
+ }
+ else {
+ float c[3], cray[3];
+ sub_v3_v3v3(c, crs_ab, a0b0);
+
+ cross_v3_v3v3(cray, c, b_dir);
+ fac_a = dot_v3v3(cray, crs_ab) / nlen;
+
+ cross_v3_v3v3(cray, c, a_dir);
+ fac_b = dot_v3v3(cray, crs_ab) / nlen;
+
+ CLAMP(fac_a, 0.0f, 1.0f);
+ CLAMP(fac_b, 0.0f, 1.0f);
+ }
+
+ madd_v3_v3v3fl(r_a, a0, a_dir, fac_a);
+ madd_v3_v3v3fl(r_b, b0, b_dir, fac_b);
+}
+
/**
* Get intersection point of two 2D segments.
*
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c
index 311d963f64d..f117c815ee9 100644
--- a/source/blender/blenlib/intern/math_matrix.c
+++ b/source/blender/blenlib/intern/math_matrix.c
@@ -822,12 +822,11 @@ bool invert_m4(float m[4][4])
}
/*
- * invertmat -
- * computes the inverse of mat and puts it in inverse. Returns
- * true on success (i.e. can always find a pivot) and false on failure.
- * Uses Gaussian Elimination with partial (maximal column) pivoting.
+ * Computes the inverse of mat and puts it in inverse.
+ * Returns true on success (i.e. can always find a pivot) and false on failure.
+ * Uses Gaussian Elimination with partial (maximal column) pivoting.
*
- * Mark Segal - 1992
+ * Mark Segal - 1992
*/
bool invert_m4_m4(float inverse[4][4], float mat[4][4])
@@ -2188,11 +2187,11 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4])
* negligible elements in the s and e arrays. On
* completion the variables kase and k are set as follows.
*
- * kase = 1 if s(p) and e[k - 1] are negligible and k<p
- * kase = 2 if s(k) is negligible and k<p
- * kase = 3 if e[k - 1] is negligible, k<p, and
- * s(k), ..., s(p) are not negligible (qr step).
- * kase = 4 if e(p - 1) is negligible (convergence). */
+ * kase = 1: if s(p) and e[k - 1] are negligible and k<p
+ * kase = 2: if s(k) is negligible and k<p
+ * kase = 3: if e[k - 1] is negligible, k<p, and
+ * s(k), ..., s(p) are not negligible (qr step).
+ * kase = 4: if e(p - 1) is negligible (convergence). */
for (k = p - 2; k >= -1; k--) {
if (k == -1) {
diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c
index 29e7cf32ddc..f0c830d33c6 100644
--- a/source/blender/blenlib/intern/math_rotation.c
+++ b/source/blender/blenlib/intern/math_rotation.c
@@ -1477,7 +1477,7 @@ static const RotOrderInfo rotOrders[] = {
/* Get relevant pointer to rotation order set from the array
* NOTE: since we start at 1 for the values, but arrays index from 0,
- * there is -1 factor involved in this process...
+ * there is -1 factor involved in this process...
*/
static const RotOrderInfo *get_rotation_order_info(const short order)
{
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c
index 715e2e65c96..37eab44c6e8 100644
--- a/source/blender/blenlib/intern/math_vector_inline.c
+++ b/source/blender/blenlib/intern/math_vector_inline.c
@@ -1087,24 +1087,23 @@ MINLINE bool compare_v4v4_relative(const float v1[4], const float v2[4], const f
MINLINE bool compare_len_v3v3(const float v1[3], const float v2[3], const float limit)
{
- float x, y, z;
-
- x = v1[0] - v2[0];
- y = v1[1] - v2[1];
- z = v1[2] - v2[2];
-
- return ((x * x + y * y + z * z) <= (limit * limit));
+ float d[3];
+ sub_v3_v3v3(d, v1, v2);
+ return (dot_v3v3(d, d) <= (limit * limit));
}
MINLINE bool compare_len_squared_v3v3(const float v1[3], const float v2[3], const float limit_sq)
{
- float x, y, z;
-
- x = v1[0] - v2[0];
- y = v1[1] - v2[1];
- z = v1[2] - v2[2];
+ float d[3];
+ sub_v3_v3v3(d, v1, v2);
+ return (dot_v3v3(d, d) <= limit_sq);
+}
- return ((x * x + y * y + z * z) <= limit_sq);
+MINLINE bool compare_len_squared_v4v4(const float v1[4], const float v2[4], const float limit_sq)
+{
+ float d[4];
+ sub_v4_v4v4(d, v1, v2);
+ return (dot_v4v4(d, d) <= limit_sq);
}
/**
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index 10ca0fa6cbf..84c932db1c7 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -1160,12 +1160,12 @@ bool BLI_path_program_search(
do {
temp = strchr(path, separator);
if (temp) {
- strncpy(filename, path, temp - path);
+ memcpy(filename, path, temp - path);
filename[temp - path] = 0;
path = temp + 1;
}
else {
- strncpy(filename, path, sizeof(filename));
+ BLI_strncpy(filename, path, sizeof(filename));
}
BLI_path_append(filename, maxlen, name);
diff --git a/source/blender/blenlib/intern/rand.c b/source/blender/blenlib/intern/rand.c
index 110757ac3c0..23905be4ced 100644
--- a/source/blender/blenlib/intern/rand.c
+++ b/source/blender/blenlib/intern/rand.c
@@ -42,7 +42,7 @@
#include "BLI_math.h"
/* defines BLI_INLINE */
-#include "BLI_utildefines.h"
+#include "BLI_compiler_compat.h"
#include "BLI_sys_types.h"
#include "BLI_strict_flags.h"
diff --git a/source/blender/blenlib/intern/rct.c b/source/blender/blenlib/intern/rct.c
index e0d92e8a19f..5b1e378a2da 100644
--- a/source/blender/blenlib/intern/rct.c
+++ b/source/blender/blenlib/intern/rct.c
@@ -39,8 +39,10 @@
#include <limits.h>
#include <float.h>
-#include "DNA_vec_types.h"
#include "BLI_rect.h"
+#include "BLI_utildefines.h"
+
+#include "DNA_vec_types.h"
/* avoid including BLI_math */
static void unit_m4(float m[4][4]);
diff --git a/source/blender/blenlib/intern/task.c b/source/blender/blenlib/intern/task.c
index 2bb5d5397a9..b6d704d8d82 100644
--- a/source/blender/blenlib/intern/task.c
+++ b/source/blender/blenlib/intern/task.c
@@ -1221,6 +1221,31 @@ static void parallel_listbase_func(
}
}
+static void task_parallel_listbase_no_threads(
+ struct ListBase *listbase,
+ void *userdata,
+ TaskParallelListbaseFunc func)
+{
+ int i = 0;
+ for (Link *link = listbase->first; link != NULL; link = link->next, ++i) {
+ func(userdata, link, i);
+ }
+}
+
+/* NOTE: The idea here is to compensate for rather measurable threading
+ * overhead caused by fetching tasks. With too many CPU threads we are starting
+ * to spend too much time in those overheads. */
+BLI_INLINE int task_parallel_listbasecalc_chunk_size(const int num_threads)
+{
+ if (num_threads > 32) {
+ return 128;
+ }
+ else if (num_threads > 16) {
+ return 64;
+ }
+ return 32;
+}
+
/**
* This function allows to parallelize for loops over ListBase items.
*
@@ -1238,41 +1263,37 @@ void BLI_task_parallel_listbase(
TaskParallelListbaseFunc func,
const bool use_threading)
{
- TaskScheduler *task_scheduler;
- TaskPool *task_pool;
- ParallelListState state;
- int i, num_threads, num_tasks;
-
if (BLI_listbase_is_empty(listbase)) {
return;
}
-
if (!use_threading) {
- i = 0;
- for (Link *link = listbase->first; link != NULL; link = link->next, ++i) {
- func(userdata, link, i);
- }
+ task_parallel_listbase_no_threads(listbase, userdata, func);
+ return;
+ }
+ TaskScheduler *task_scheduler = BLI_task_scheduler_get();
+ const int num_threads = BLI_task_scheduler_num_threads(task_scheduler);
+ /* TODO(sergey): Consider making chunk size configurable. */
+ const int chunk_size = task_parallel_listbasecalc_chunk_size(num_threads);
+ const int num_tasks = min_ii(
+ num_threads,
+ BLI_listbase_count(listbase) / chunk_size);
+ if (num_tasks <= 1) {
+ task_parallel_listbase_no_threads(listbase, userdata, func);
return;
}
- task_scheduler = BLI_task_scheduler_get();
- task_pool = BLI_task_pool_create_suspended(task_scheduler, &state);
- num_threads = BLI_task_scheduler_num_threads(task_scheduler);
-
- /* The idea here is to prevent creating task for each of the loop iterations
- * and instead have tasks which are evenly distributed across CPU cores and
- * pull next iter to be crunched using the queue.
- */
- num_tasks = num_threads + 2;
+ ParallelListState state;
+ TaskPool *task_pool = BLI_task_pool_create_suspended(task_scheduler, &state);
state.index = 0;
state.link = listbase->first;
state.userdata = userdata;
state.func = func;
- state.chunk_size = 32;
+ state.chunk_size = chunk_size;
BLI_spin_init(&state.lock);
- for (i = 0; i < num_tasks; i++) {
+ BLI_assert(num_tasks > 0);
+ for (int i = 0; i < num_tasks; i++) {
/* Use this pool's pre-allocated tasks. */
BLI_task_pool_push_from_thread(task_pool,
parallel_listbase_func,
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h
index 11f34732cfc..5a1c479f450 100644
--- a/source/blender/blenloader/BLO_readfile.h
+++ b/source/blender/blenloader/BLO_readfile.h
@@ -48,6 +48,7 @@ struct View3D;
struct bContext;
struct BHead;
struct FileData;
+struct BlendFileReadParams;
typedef struct BlendHandle BlendHandle;
@@ -71,6 +72,10 @@ typedef struct BlendFileData {
eBlenFileType type;
} BlendFileData;
+struct BlendFileReadParams {
+ uint skip_flags : 2; /* eBLOReadSkip */
+ uint is_startup : 1;
+};
/* skip reading some data-block types (may want to skip screen data too). */
typedef enum eBLOReadSkip {
@@ -83,13 +88,16 @@ typedef enum eBLOReadSkip {
BlendFileData *BLO_read_from_file(
const char *filepath,
- struct ReportList *reports, eBLOReadSkip skip_flag);
+ eBLOReadSkip skip_flags,
+ struct ReportList *reports);
BlendFileData *BLO_read_from_memory(
const void *mem, int memsize,
- struct ReportList *reports, eBLOReadSkip skip_flag);
+ eBLOReadSkip skip_flags,
+ struct ReportList *reports);
BlendFileData *BLO_read_from_memfile(
struct Main *oldmain, const char *filename, struct MemFile *memfile,
- struct ReportList *reports, eBLOReadSkip skip_flag);
+ eBLOReadSkip skip_flags,
+ struct ReportList *reports);
void BLO_blendfiledata_free(BlendFileData *bfd);
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c
index 7488d62bb3c..b2bcf745eac 100644
--- a/source/blender/blenloader/intern/readblenentry.c
+++ b/source/blender/blenloader/intern/readblenentry.c
@@ -319,7 +319,8 @@ void BLO_blendhandle_close(BlendHandle *bh)
*/
BlendFileData *BLO_read_from_file(
const char *filepath,
- ReportList *reports, eBLOReadSkip skip_flags)
+ eBLOReadSkip skip_flags,
+ ReportList *reports)
{
BlendFileData *bfd = NULL;
FileData *fd;
@@ -346,7 +347,8 @@ BlendFileData *BLO_read_from_file(
*/
BlendFileData *BLO_read_from_memory(
const void *mem, int memsize,
- ReportList *reports, eBLOReadSkip skip_flags)
+ eBLOReadSkip skip_flags,
+ ReportList *reports)
{
BlendFileData *bfd = NULL;
FileData *fd;
@@ -370,7 +372,8 @@ BlendFileData *BLO_read_from_memory(
*/
BlendFileData *BLO_read_from_memfile(
Main *oldmain, const char *filename, MemFile *memfile,
- ReportList *reports, eBLOReadSkip skip_flags)
+ eBLOReadSkip skip_flags,
+ ReportList *reports)
{
BlendFileData *bfd = NULL;
FileData *fd;
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 08a45f367f4..657495e763e 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4517,12 +4517,12 @@ static void lib_link_mesh(FileData *fd, Main *main)
/*
* Re-tessellate, even if the polys were just created from tessfaces, this
* is important because it:
- * - fill the CD_ORIGINDEX layer
- * - gives consistency of tessface between loading from a file and
- * converting an edited BMesh back into a mesh (i.e. it replaces
- * quad tessfaces in a loaded mesh immediately, instead of lazily
- * waiting until edit mode has been entered/exited, making it easier
- * to recognize problems that would otherwise only show up after edits).
+ * - fill the CD_ORIGINDEX layer
+ * - gives consistency of tessface between loading from a file and
+ * converting an edited BMesh back into a mesh (i.e. it replaces
+ * quad tessfaces in a loaded mesh immediately, instead of lazily
+ * waiting until edit mode has been entered/exited, making it easier
+ * to recognize problems that would otherwise only show up after edits).
*/
#ifdef USE_TESSFACE_DEFAULT
BKE_mesh_tessface_calc(me);
@@ -5683,7 +5683,13 @@ static void direct_link_object(FileData *fd, Object *ob)
CLAMP(ob->rotmode, ROT_MODE_MIN, ROT_MODE_MAX);
if (ob->sculpt) {
- ob->sculpt = MEM_callocN(sizeof(SculptSession), "reload sculpt session");
+ if (ob->mode & OB_MODE_ALL_SCULPT) {
+ ob->sculpt = MEM_callocN(sizeof(SculptSession), "reload sculpt session");
+ ob->sculpt->mode_type = ob->mode;
+ }
+ else {
+ ob->sculpt = NULL;
+ }
}
link_list(fd, &ob->lodlevels);
diff --git a/source/blender/blenloader/intern/undofile.c b/source/blender/blenloader/intern/undofile.c
index 614a3be559b..37cd69b72f2 100644
--- a/source/blender/blenloader/intern/undofile.c
+++ b/source/blender/blenloader/intern/undofile.c
@@ -130,7 +130,7 @@ void memfile_chunk_add(
struct Main *BLO_memfile_main_get(struct MemFile *memfile, struct Main *oldmain, struct Scene **r_scene)
{
struct Main *bmain_undo = NULL;
- BlendFileData *bfd = BLO_read_from_memfile(oldmain, BKE_main_blendfile_path(oldmain), memfile, NULL, BLO_READ_SKIP_NONE);
+ BlendFileData *bfd = BLO_read_from_memfile(oldmain, BKE_main_blendfile_path(oldmain), memfile, BLO_READ_SKIP_NONE, NULL);
if (bfd) {
bmain_undo = bfd->main;
diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c
index 13b7b7c1559..c5062ed1e16 100644
--- a/source/blender/blenloader/intern/versioning_260.c
+++ b/source/blender/blenloader/intern/versioning_260.c
@@ -400,7 +400,7 @@ static void do_versions_nodetree_image_layer_2_64_5(bNodeTree *ntree)
NodeImageLayer *output = MEM_callocN(sizeof(NodeImageLayer), "node image layer");
/* take pass index both from current storage ptr (actually an int) */
- output->pass_index = GET_INT_FROM_POINTER(sock->storage);
+ output->pass_index = POINTER_AS_INT(sock->storage);
/* replace socket data pointer */
sock->storage = output;
diff --git a/source/blender/bmesh/bmesh.h b/source/blender/bmesh/bmesh.h
index 8b0b8a282f5..266b31aaeb3 100644
--- a/source/blender/bmesh/bmesh.h
+++ b/source/blender/bmesh/bmesh.h
@@ -84,7 +84,7 @@
* Edges and Vertices in BMesh are primitive structures.
*
* \note There can be more than one edge between two vertices in BMesh,
- * though the rest of Blender (e.g. DerivedMesh, CDDM, CCGSubSurf, etc) does not support this.
+ * though the rest of Blender (i.e. DerivedMesh, CDDM, CCGSubSurf, etc) does not support this.
* So it should only occur temporarily during editing operations.
*
*
diff --git a/source/blender/bmesh/intern/bmesh_callback_generic.c b/source/blender/bmesh/intern/bmesh_callback_generic.c
index e9304e8536f..90b2497aa80 100644
--- a/source/blender/bmesh/intern/bmesh_callback_generic.c
+++ b/source/blender/bmesh/intern/bmesh_callback_generic.c
@@ -32,7 +32,7 @@
bool BM_elem_cb_check_hflag_ex(BMElem *ele, void *user_data)
{
- const uint hflag_pair = GET_INT_FROM_POINTER(user_data);
+ const uint hflag_pair = POINTER_AS_INT(user_data);
const char hflag_p = (hflag_pair & 0xff);
const char hflag_n = (hflag_pair >> 8);
@@ -42,14 +42,14 @@ bool BM_elem_cb_check_hflag_ex(BMElem *ele, void *user_data)
bool BM_elem_cb_check_hflag_enabled(BMElem *ele, void *user_data)
{
- const char hflag = GET_INT_FROM_POINTER(user_data);
+ const char hflag = POINTER_AS_INT(user_data);
return (BM_elem_flag_test(ele, hflag) != 0);
}
bool BM_elem_cb_check_hflag_disabled(BMElem *ele, void *user_data)
{
- const char hflag = GET_INT_FROM_POINTER(user_data);
+ const char hflag = POINTER_AS_INT(user_data);
return (BM_elem_flag_test(ele, hflag) == 0);
}
diff --git a/source/blender/bmesh/intern/bmesh_callback_generic.h b/source/blender/bmesh/intern/bmesh_callback_generic.h
index 3cae01d417f..44495d54edd 100644
--- a/source/blender/bmesh/intern/bmesh_callback_generic.h
+++ b/source/blender/bmesh/intern/bmesh_callback_generic.h
@@ -32,14 +32,14 @@ bool BM_elem_cb_check_elem_not_equal(BMElem *ele, void *user_data);
#define BM_elem_cb_check_hflag_ex_simple(type, hflag_p, hflag_n) \
(bool (*)(type, void *))BM_elem_cb_check_hflag_ex, \
- SET_UINT_IN_POINTER(((hflag_p) | (hflag_n << 8)))
+ POINTER_FROM_UINT(((hflag_p) | (hflag_n << 8)))
#define BM_elem_cb_check_hflag_enabled_simple(type, hflag_p) \
(bool (*)(type, void *))BM_elem_cb_check_hflag_enabled, \
- SET_UINT_IN_POINTER((hflag_p))
+ POINTER_FROM_UINT((hflag_p))
#define BM_elem_cb_check_hflag_disabled_simple(type, hflag_n) \
(bool (*)(type, void *))BM_elem_cb_check_hflag_disabled, \
- SET_UINT_IN_POINTER(hflag_n)
+ POINTER_FROM_UINT(hflag_n)
#endif /* __BMESH_CALLBACK_GENERIC_H__ */
diff --git a/source/blender/bmesh/intern/bmesh_log.c b/source/blender/bmesh/intern/bmesh_log.c
index 30ab0dd9459..732647f83a7 100644
--- a/source/blender/bmesh/intern/bmesh_log.c
+++ b/source/blender/bmesh/intern/bmesh_log.c
@@ -134,13 +134,13 @@ typedef struct {
static uint bm_log_vert_id_get(BMLog *log, BMVert *v)
{
BLI_assert(BLI_ghash_haskey(log->elem_to_id, v));
- return GET_UINT_FROM_POINTER(BLI_ghash_lookup(log->elem_to_id, v));
+ return POINTER_AS_UINT(BLI_ghash_lookup(log->elem_to_id, v));
}
/* Set the vertex's unique ID in the log */
static void bm_log_vert_id_set(BMLog *log, BMVert *v, uint id)
{
- void *vid = SET_UINT_IN_POINTER(id);
+ void *vid = POINTER_FROM_UINT(id);
BLI_ghash_reinsert(log->id_to_elem, vid, v, NULL, NULL);
BLI_ghash_reinsert(log->elem_to_id, v, vid, NULL, NULL);
@@ -149,7 +149,7 @@ static void bm_log_vert_id_set(BMLog *log, BMVert *v, uint id)
/* Get a vertex from its unique ID */
static BMVert *bm_log_vert_from_id(BMLog *log, uint id)
{
- void *key = SET_UINT_IN_POINTER(id);
+ void *key = POINTER_FROM_UINT(id);
BLI_assert(BLI_ghash_haskey(log->id_to_elem, key));
return BLI_ghash_lookup(log->id_to_elem, key);
}
@@ -158,13 +158,13 @@ static BMVert *bm_log_vert_from_id(BMLog *log, uint id)
static uint bm_log_face_id_get(BMLog *log, BMFace *f)
{
BLI_assert(BLI_ghash_haskey(log->elem_to_id, f));
- return GET_UINT_FROM_POINTER(BLI_ghash_lookup(log->elem_to_id, f));
+ return POINTER_AS_UINT(BLI_ghash_lookup(log->elem_to_id, f));
}
/* Set the face's unique ID in the log */
static void bm_log_face_id_set(BMLog *log, BMFace *f, uint id)
{
- void *fid = SET_UINT_IN_POINTER(id);
+ void *fid = POINTER_FROM_UINT(id);
BLI_ghash_reinsert(log->id_to_elem, fid, f, NULL, NULL);
BLI_ghash_reinsert(log->elem_to_id, f, fid, NULL, NULL);
@@ -173,7 +173,7 @@ static void bm_log_face_id_set(BMLog *log, BMFace *f, uint id)
/* Get a face from its unique ID */
static BMFace *bm_log_face_from_id(BMLog *log, uint id)
{
- void *key = SET_UINT_IN_POINTER(id);
+ void *key = POINTER_FROM_UINT(id);
BLI_assert(BLI_ghash_haskey(log->id_to_elem, key));
return BLI_ghash_lookup(log->id_to_elem, key);
}
@@ -255,7 +255,7 @@ static void bm_log_verts_unmake(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);
- uint id = GET_UINT_FROM_POINTER(key);
+ uint id = POINTER_AS_UINT(key);
BMVert *v = bm_log_vert_from_id(log, id);
/* Ensure the log has the final values of the vertex before
@@ -271,7 +271,7 @@ static void bm_log_faces_unmake(BMesh *bm, BMLog *log, GHash *faces)
GHashIterator gh_iter;
GHASH_ITER (gh_iter, faces) {
void *key = BLI_ghashIterator_getKey(&gh_iter);
- uint id = GET_UINT_FROM_POINTER(key);
+ uint id = POINTER_AS_UINT(key);
BMFace *f = bm_log_face_from_id(log, id);
BMEdge *e_tri[3];
BMLoop *l_iter;
@@ -304,7 +304,7 @@ static void bm_log_verts_restore(BMesh *bm, BMLog *log, GHash *verts)
vert_mask_set(v, lv->mask, cd_vert_mask_offset);
v->head.hflag = lv->hflag;
normal_short_to_float_v3(v->no, lv->no);
- bm_log_vert_id_set(log, v, GET_UINT_FROM_POINTER(key));
+ bm_log_vert_id_set(log, v, POINTER_AS_UINT(key));
}
}
@@ -321,7 +321,7 @@ static void bm_log_faces_restore(BMesh *bm, BMLog *log, GHash *faces)
f = BM_face_create_verts(bm, v, 3, NULL, BM_CREATE_NOP, true);
f->head.hflag = lf->hflag;
- bm_log_face_id_set(log, f, GET_UINT_FROM_POINTER(key));
+ bm_log_face_id_set(log, f, POINTER_AS_UINT(key));
}
}
@@ -333,7 +333,7 @@ static void bm_log_vert_values_swap(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);
- uint id = GET_UINT_FROM_POINTER(key);
+ uint id = POINTER_AS_UINT(key);
BMVert *v = bm_log_vert_from_id(log, id);
float mask;
short normal[3];
@@ -355,7 +355,7 @@ static void bm_log_face_values_swap(BMLog *log, GHash *faces)
GHASH_ITER (gh_iter, faces) {
void *key = BLI_ghashIterator_getKey(&gh_iter);
BMLogFace *lf = BLI_ghashIterator_getValue(&gh_iter);
- uint id = GET_UINT_FROM_POINTER(key);
+ uint id = POINTER_AS_UINT(key);
BMFace *f = bm_log_face_from_id(log, id);
SWAP(char, f->head.hflag, lf->hflag);
@@ -425,7 +425,7 @@ static void bm_log_id_ghash_retake(RangeTreeUInt *unused_ids, GHash *id_ghash)
GHASH_ITER (gh_iter, id_ghash) {
void *key = BLI_ghashIterator_getKey(&gh_iter);
- uint id = GET_UINT_FROM_POINTER(key);
+ uint id = POINTER_AS_UINT(key);
range_tree_uint_retake(unused_ids, id);
}
@@ -454,8 +454,8 @@ static GHash *bm_log_compress_ids_to_indices(uint *ids, uint totid)
qsort(ids, totid, sizeof(*ids), uint_compare);
for (i = 0; i < totid; i++) {
- void *key = SET_UINT_IN_POINTER(ids[i]);
- void *val = SET_UINT_IN_POINTER(i);
+ void *key = POINTER_FROM_UINT(ids[i]);
+ void *val = POINTER_FROM_UINT(i);
BLI_ghash_insert(map, key, val);
}
@@ -469,7 +469,7 @@ static void bm_log_id_ghash_release(BMLog *log, GHash *id_ghash)
GHASH_ITER (gh_iter, id_ghash) {
void *key = BLI_ghashIterator_getKey(&gh_iter);
- uint id = GET_UINT_FROM_POINTER(key);
+ uint id = POINTER_AS_UINT(key);
range_tree_uint_release(log->unused_ids, id);
}
}
@@ -620,9 +620,9 @@ void BM_log_mesh_elems_reorder(BMesh *bm, BMLog *log)
id_to_idx = bm_log_compress_ids_to_indices(varr, (uint)bm->totvert);
BM_ITER_MESH_INDEX (v, &bm_iter, bm, BM_VERTS_OF_MESH, i) {
const unsigned id = bm_log_vert_id_get(log, v);
- const void *key = SET_UINT_IN_POINTER(id);
+ const void *key = POINTER_FROM_UINT(id);
const void *val = BLI_ghash_lookup(id_to_idx, key);
- varr[i] = GET_UINT_FROM_POINTER(val);
+ varr[i] = POINTER_AS_UINT(val);
}
BLI_ghash_free(id_to_idx, NULL, NULL);
@@ -630,9 +630,9 @@ void BM_log_mesh_elems_reorder(BMesh *bm, BMLog *log)
id_to_idx = bm_log_compress_ids_to_indices(farr, (uint)bm->totface);
BM_ITER_MESH_INDEX (f, &bm_iter, bm, BM_FACES_OF_MESH, i) {
const unsigned id = bm_log_face_id_get(log, f);
- const void *key = SET_UINT_IN_POINTER(id);
+ const void *key = POINTER_FROM_UINT(id);
const void *val = BLI_ghash_lookup(id_to_idx, key);
- farr[i] = GET_UINT_FROM_POINTER(val);
+ farr[i] = POINTER_AS_UINT(val);
}
BLI_ghash_free(id_to_idx, NULL, NULL);
@@ -840,7 +840,7 @@ void BM_log_vert_before_modified(BMLog *log, BMVert *v, const int cd_vert_mask_o
BMLogEntry *entry = log->current_entry;
BMLogVert *lv;
uint v_id = bm_log_vert_id_get(log, v);
- void *key = SET_UINT_IN_POINTER(v_id);
+ void *key = POINTER_FROM_UINT(v_id);
void **val_p;
/* Find or create the BMLogVert entry */
@@ -864,7 +864,7 @@ void BM_log_vert_added(BMLog *log, BMVert *v, const int cd_vert_mask_offset)
{
BMLogVert *lv;
uint v_id = range_tree_uint_take_any(log->unused_ids);
- void *key = SET_UINT_IN_POINTER(v_id);
+ void *key = POINTER_FROM_UINT(v_id);
bm_log_vert_id_set(log, v, v_id);
lv = bm_log_vert_alloc(log, v, cd_vert_mask_offset);
@@ -881,7 +881,7 @@ void BM_log_face_modified(BMLog *log, BMFace *f)
{
BMLogFace *lf;
uint f_id = bm_log_face_id_get(log, f);
- void *key = SET_UINT_IN_POINTER(f_id);
+ void *key = POINTER_FROM_UINT(f_id);
lf = bm_log_face_alloc(log, f);
BLI_ghash_insert(log->current_entry->modified_faces, key, lf);
@@ -897,7 +897,7 @@ void BM_log_face_added(BMLog *log, BMFace *f)
{
BMLogFace *lf;
uint f_id = range_tree_uint_take_any(log->unused_ids);
- void *key = SET_UINT_IN_POINTER(f_id);
+ void *key = POINTER_FROM_UINT(f_id);
/* Only triangles are supported for now */
BLI_assert(f->len == 3);
@@ -927,7 +927,7 @@ void BM_log_vert_removed(BMLog *log, BMVert *v, const int cd_vert_mask_offset)
{
BMLogEntry *entry = log->current_entry;
uint v_id = bm_log_vert_id_get(log, v);
- void *key = SET_UINT_IN_POINTER(v_id);
+ void *key = POINTER_FROM_UINT(v_id);
/* if it has a key, it shouldn't be NULL */
BLI_assert(!!BLI_ghash_lookup(entry->added_verts, key) ==
@@ -968,7 +968,7 @@ void BM_log_face_removed(BMLog *log, BMFace *f)
{
BMLogEntry *entry = log->current_entry;
uint f_id = bm_log_face_id_get(log, f);
- void *key = SET_UINT_IN_POINTER(f_id);
+ void *key = POINTER_FROM_UINT(f_id);
/* if it has a key, it shouldn't be NULL */
BLI_assert(!!BLI_ghash_lookup(entry->added_faces, key) ==
@@ -1040,7 +1040,7 @@ const float *BM_log_original_vert_co(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_UINT_IN_POINTER(v_id);
+ void *key = POINTER_FROM_UINT(v_id);
BLI_assert(entry);
@@ -1058,7 +1058,7 @@ 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_UINT_IN_POINTER(v_id);
+ void *key = POINTER_FROM_UINT(v_id);
BLI_assert(entry);
@@ -1076,7 +1076,7 @@ float BM_log_original_mask(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_UINT_IN_POINTER(v_id);
+ void *key = POINTER_FROM_UINT(v_id);
BLI_assert(entry);
@@ -1093,7 +1093,7 @@ void BM_log_original_vert_data(
BMLogEntry *entry = log->current_entry;
const BMLogVert *lv;
unsigned v_id = bm_log_vert_id_get(log, v);
- void *key = SET_UINT_IN_POINTER(v_id);
+ void *key = POINTER_FROM_UINT(v_id);
BLI_assert(entry);
diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c
index 10a03050d4b..1e53180396e 100644
--- a/source/blender/bmesh/intern/bmesh_marking.c
+++ b/source/blender/bmesh/intern/bmesh_marking.c
@@ -863,7 +863,7 @@ void BM_editselection_normal(BMEditSelection *ese, float r_normal[3])
/* Calculate a plane that is rightangles to the edge/vert/faces normal
* also make the plane run along an axis that is related to the geometry,
- * because this is used for the manipulators Y axis. */
+ * because this is used for the gizmos Y axis. */
void BM_editselection_plane(BMEditSelection *ese, float r_plane[3])
{
if (ese->htype == BM_VERT) {
@@ -895,7 +895,7 @@ void BM_editselection_plane(BMEditSelection *ese, float r_plane[3])
else {
/* the plane is simple, it runs along the edge
* however selecting different edges can swap the direction of the y axis.
- * this makes it less likely for the y axis of the manipulator
+ * this makes it less likely for the y axis of the gizmo
* (running along the edge).. to flip less often.
* at least its more predictable */
if (eed->v2->co[1] > eed->v1->co[1]) { /* check which to do first */
diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c
index 185e5412b3d..3fe54b7229a 100644
--- a/source/blender/bmesh/intern/bmesh_mesh.c
+++ b/source/blender/bmesh/intern/bmesh_mesh.c
@@ -188,7 +188,7 @@ BMesh *BM_mesh_create(
/**
* \brief BMesh Free Mesh Data
*
- * Frees a BMesh structure.
+ * Frees a BMesh structure.
*
* \note frees mesh, but not actual BMesh struct
*/
@@ -292,7 +292,7 @@ void BM_mesh_clear(BMesh *bm)
/**
* \brief BMesh Free Mesh
*
- * Frees a BMesh data and its structure.
+ * Frees a BMesh data and its structure.
*/
void BM_mesh_free(BMesh *bm)
{
@@ -363,6 +363,8 @@ typedef struct BMVertsCalcNormalsData {
static void mesh_verts_calc_normals_accum_cb(void *userdata, MempoolIterData *mp_f)
{
+#define FLT_EQ_NONAN(_fa, _fb) (*((const uint32_t *)&_fa) == *((const uint32_t *)&_fb))
+
BMVertsCalcNormalsData *data = userdata;
BMFace *f = (BMFace *)mp_f;
@@ -390,6 +392,11 @@ static void mesh_verts_calc_normals_accum_cb(void *userdata, MempoolIterData *mp
fac = saacos(-dotprod);
+ if (fac != fac) { /* NAN detection. */
+ /* Degenerated case, nothing to do here, just ignore that vertex. */
+ continue;
+ }
+
/* accumulate weighted face normal into the vertex's normal */
float *v_no = data->vnos ? data->vnos[BM_elem_index_get(l_iter->v)] : l_iter->v->no;
@@ -405,7 +412,7 @@ static void mesh_verts_calc_normals_accum_cb(void *userdata, MempoolIterData *mp
* - v_no[0] was not FLT_MAX, i.e. it was not locked by another thread.
*/
const float vl = atomic_cas_float(&v_no[0], virtual_lock, FLT_MAX);
- if (vl == virtual_lock && vl != FLT_MAX) {
+ if (FLT_EQ_NONAN(vl, virtual_lock) && vl != FLT_MAX) {
break;
}
virtual_lock = vl;
@@ -423,6 +430,8 @@ static void mesh_verts_calc_normals_accum_cb(void *userdata, MempoolIterData *mp
BLI_assert(virtual_lock == FLT_MAX);
} while ((l_iter = l_iter->next) != l_first);
+
+#undef FLT_EQ_NONAN
}
static void mesh_verts_calc_normals_normalize_cb(void *userdata, MempoolIterData *mp_v)
@@ -894,7 +903,10 @@ static void bm_mesh_loops_calc_normals(
clnors_avg[0] /= clnors_nbr;
clnors_avg[1] /= clnors_nbr;
/* Fix/update all clnors of this fan with computed average value. */
- printf("Invalid clnors in this fan!\n");
+
+ /* Prints continuously when merge custom normals, so commenting. */
+ /* printf("Invalid clnors in this fan!\n"); */
+
while ((clnor = BLI_SMALLSTACK_POP(clnors))) {
//print_v2("org clnor", clnor);
clnor[0] = (short)clnors_avg[0];
@@ -1009,7 +1021,8 @@ void BM_mesh_loop_normals_update(
void BM_loops_calc_normal_vcos(
BMesh *bm, const float (*vcos)[3], const float (*vnos)[3], const float (*fnos)[3],
const bool use_split_normals, const float split_angle, float (*r_lnos)[3],
- MLoopNorSpaceArray *r_lnors_spacearr, short (*clnors_data)[2], const int cd_loop_clnors_offset)
+ MLoopNorSpaceArray *r_lnors_spacearr, short (*clnors_data)[2],
+ const int cd_loop_clnors_offset)
{
const bool has_clnors = clnors_data || (cd_loop_clnors_offset != -1);
@@ -1019,7 +1032,8 @@ void BM_loops_calc_normal_vcos(
bm_mesh_edges_sharp_tag(bm, vnos, fnos, r_lnos, has_clnors ? (float)M_PI : split_angle, false);
/* Finish computing lnos by accumulating face normals in each fan of faces defined by sharp edges. */
- bm_mesh_loops_calc_normals(bm, vcos, fnos, r_lnos, r_lnors_spacearr, clnors_data, cd_loop_clnors_offset);
+ bm_mesh_loops_calc_normals(
+ bm, vcos, fnos, r_lnos, r_lnors_spacearr, clnors_data, cd_loop_clnors_offset);
}
else {
BLI_assert(!r_lnors_spacearr);
@@ -1455,28 +1469,6 @@ void BM_mesh_elem_table_free(BMesh *bm, const char htype)
}
}
-BMVert *BM_vert_at_index(BMesh *bm, const int index)
-{
- BLI_assert((index >= 0) && (index < bm->totvert));
- BLI_assert((bm->elem_table_dirty & BM_VERT) == 0);
- return bm->vtable[index];
-}
-
-BMEdge *BM_edge_at_index(BMesh *bm, const int index)
-{
- BLI_assert((index >= 0) && (index < bm->totedge));
- BLI_assert((bm->elem_table_dirty & BM_EDGE) == 0);
- return bm->etable[index];
-}
-
-BMFace *BM_face_at_index(BMesh *bm, const int index)
-{
- BLI_assert((index >= 0) && (index < bm->totface));
- BLI_assert((bm->elem_table_dirty & BM_FACE) == 0);
- return bm->ftable[index];
-}
-
-
BMVert *BM_vert_at_index_find(BMesh *bm, const int index)
{
return BLI_mempool_findelem(bm->vpool, index);
diff --git a/source/blender/bmesh/intern/bmesh_mesh.h b/source/blender/bmesh/intern/bmesh_mesh.h
index d449aac04f5..cc056e1fa19 100644
--- a/source/blender/bmesh/intern/bmesh_mesh.h
+++ b/source/blender/bmesh/intern/bmesh_mesh.h
@@ -48,9 +48,10 @@ void BM_mesh_clear(BMesh *bm);
void BM_mesh_normals_update(BMesh *bm);
void BM_verts_calc_normal_vcos(BMesh *bm, const float (*fnos)[3], const float (*vcos)[3], float (*vnos)[3]);
void BM_loops_calc_normal_vcos(
- BMesh *bm, const float (*vcos)[3], const float (*vnos)[3], const float (*pnos)[3],
- const bool use_split_normals, const float split_angle, float (*r_lnos)[3],
- struct MLoopNorSpaceArray *r_lnors_spacearr, short (*clnors_data)[2], const int cd_loop_clnors_offset);
+ BMesh *bm, const float(*vcos)[3], const float(*vnos)[3], const float(*pnos)[3],
+ const bool use_split_normals, const float split_angle, float(*r_lnos)[3],
+ struct MLoopNorSpaceArray *r_lnors_spacearr, short (*clnors_data)[2],
+ const int cd_loop_clnors_offset);
bool BM_loop_check_cyclic_smooth_fan(BMLoop *l_curr);
@@ -75,9 +76,24 @@ void BM_mesh_elem_table_ensure(BMesh *bm, const char htype);
void BM_mesh_elem_table_init(BMesh *bm, const char htype);
void BM_mesh_elem_table_free(BMesh *bm, const char htype);
-BMVert *BM_vert_at_index(BMesh *bm, const int index);
-BMEdge *BM_edge_at_index(BMesh *bm, const int index);
-BMFace *BM_face_at_index(BMesh *bm, const int index);
+BLI_INLINE BMVert *BM_vert_at_index(BMesh *bm, const int index)
+{
+ BLI_assert((index >= 0) && (index < bm->totvert));
+ BLI_assert((bm->elem_table_dirty & BM_VERT) == 0);
+ return bm->vtable[index];
+}
+BLI_INLINE BMEdge *BM_edge_at_index(BMesh *bm, const int index)
+{
+ BLI_assert((index >= 0) && (index < bm->totedge));
+ BLI_assert((bm->elem_table_dirty & BM_EDGE) == 0);
+ return bm->etable[index];
+}
+BLI_INLINE BMFace *BM_face_at_index(BMesh *bm, const int index)
+{
+ BLI_assert((index >= 0) && (index < bm->totface));
+ BLI_assert((bm->elem_table_dirty & BM_FACE) == 0);
+ return bm->ftable[index];
+}
BMVert *BM_vert_at_index_find(BMesh *bm, const int index);
BMEdge *BM_edge_at_index_find(BMesh *bm, const int index);
diff --git a/source/blender/bmesh/intern/bmesh_mesh_conv.c b/source/blender/bmesh/intern/bmesh_mesh_conv.c
index 340b0b70772..2259a7dfe09 100644
--- a/source/blender/bmesh/intern/bmesh_mesh_conv.c
+++ b/source/blender/bmesh/intern/bmesh_mesh_conv.c
@@ -592,7 +592,7 @@ BLI_INLINE void bmesh_quick_edgedraw_flag(MEdge *med, BMEdge *e)
/**
*
- * \param bmain May be NULL in case \a calc_object_remap parameter option is set.
+ * \param bmain May be NULL in case \a calc_object_remap parameter option is not set.
*/
void BM_mesh_bm_to_me(
Main *bmain, BMesh *bm, Mesh *me,
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c
index 450d49211ec..7abf05044dd 100644
--- a/source/blender/bmesh/intern/bmesh_opdefines.c
+++ b/source/blender/bmesh/intern/bmesh_opdefines.c
@@ -881,6 +881,7 @@ static BMOpDefine bmo_extrude_discrete_faces_def = {
"extrude_discrete_faces",
/* slots_in */
{{"faces", BMO_OP_SLOT_ELEMENT_BUF, {BM_FACE}}, /* input faces */
+ {"use_normal_flip", BMO_OP_SLOT_BOOL}, /* Create faces with reversed direction. */
{"use_select_history", BMO_OP_SLOT_BOOL}, /* pass to duplicate */
{{'\0'}},
},
@@ -902,6 +903,7 @@ static BMOpDefine bmo_extrude_edge_only_def = {
"extrude_edge_only",
/* slots_in */
{{"edges", BMO_OP_SLOT_ELEMENT_BUF, {BM_EDGE}}, /* input vertices */
+ {"use_normal_flip", BMO_OP_SLOT_BOOL}, /* Create faces with reversed direction. */
{"use_select_history", BMO_OP_SLOT_BOOL}, /* pass to duplicate */
{{'\0'}},
},
@@ -1037,6 +1039,7 @@ static BMOpDefine bmo_extrude_face_region_def = {
{{"geom", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT | BM_EDGE | BM_FACE}}, /* edges and faces */
{"edges_exclude", BMO_OP_SLOT_MAPPING, {(int)BMO_OP_SLOT_SUBTYPE_MAP_EMPTY}},
{"use_keep_orig", BMO_OP_SLOT_BOOL}, /* keep original geometry (requires ``geom`` to include edges). */
+ {"use_normal_flip", BMO_OP_SLOT_BOOL}, /* Create faces with reversed direction. */
{"use_select_history", BMO_OP_SLOT_BOOL}, /* pass to duplicate */
{{'\0'}},
},
@@ -1386,6 +1389,8 @@ static BMOpDefine bmo_spin_def = {
{"angle", BMO_OP_SLOT_FLT}, /* total rotation angle (radians) */
{"space", BMO_OP_SLOT_MAT}, /* matrix to define the space (typically object matrix) */
{"steps", BMO_OP_SLOT_INT}, /* number of steps */
+ {"use_merge", BMO_OP_SLOT_BOOL}, /* Merge first/last when the angle is a full revolution. */
+ {"use_normal_flip", BMO_OP_SLOT_BOOL}, /* Create faces with reversed direction. */
{"use_duplicate", BMO_OP_SLOT_BOOL}, /* duplicate or extrude? */
{{'\0'}},
},
diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c
index 3137725d6e7..5e3f5958a32 100644
--- a/source/blender/bmesh/intern/bmesh_polygon.c
+++ b/source/blender/bmesh/intern/bmesh_polygon.c
@@ -240,6 +240,28 @@ float BM_face_calc_area(const BMFace *f)
}
/**
+ * Get the area of the face in world space.
+ */
+float BM_face_calc_area_with_mat3(const BMFace *f, float mat3[3][3])
+{
+ /* inline 'area_poly_v3' logic, avoid creating a temp array */
+ const BMLoop *l_iter, *l_first;
+ float co[3];
+ float n[3];
+
+ zero_v3(n);
+ l_iter = l_first = BM_FACE_FIRST_LOOP(f);
+ mul_v3_m3v3(co, mat3, l_iter->v->co);
+ do {
+ float co_next[3];
+ mul_v3_m3v3(co_next, mat3, l_iter->next->v->co);
+ add_newell_cross_v3_v3v3(n, co, co_next);
+ copy_v3_v3(co, co_next);
+ } while ((l_iter = l_iter->next) != l_first);
+ return len_v3(n) * 0.5f;
+}
+
+/**
* compute the perimeter of an ngon
*/
float BM_face_calc_perimeter(const BMFace *f)
@@ -256,6 +278,27 @@ float BM_face_calc_perimeter(const BMFace *f)
}
/**
+ * Calculate the perimeter of a ngon in world space.
+ */
+float BM_face_calc_perimeter_with_mat3(const BMFace *f, float mat3[3][3])
+{
+ const BMLoop *l_iter, *l_first;
+ float co[3];
+ float perimeter = 0.0f;
+
+ l_iter = l_first = BM_FACE_FIRST_LOOP(f);
+ mul_v3_m3v3(co, mat3, l_iter->v->co);
+ do {
+ float co_next[3];
+ mul_v3_m3v3(co_next, mat3, l_iter->next->v->co);
+ perimeter += len_v3v3(co, co_next);
+ copy_v3_v3(co, co_next);
+ } while ((l_iter = l_iter->next) != l_first);
+
+ return perimeter;
+}
+
+/**
* Utility function to calculate the edge which is most different from the other two.
*
* \return The first edge index, where the second vertex is ``(index + 1) % 3``.
@@ -487,7 +530,7 @@ void BM_face_calc_tangent_vert_diagonal(const BMFace *f, float r_tangent[3])
}
/**
- * Compute a meaningful direction along the face (use for manipulator axis).
+ * Compute a meaningful direction along the face (use for gizmo axis).
*
* \note Callers shouldn't depend on the *exact* method used here.
*/
diff --git a/source/blender/bmesh/intern/bmesh_polygon.h b/source/blender/bmesh/intern/bmesh_polygon.h
index a40da2bfbfa..1d5fb2cc620 100644
--- a/source/blender/bmesh/intern/bmesh_polygon.h
+++ b/source/blender/bmesh/intern/bmesh_polygon.h
@@ -44,7 +44,9 @@ float BM_face_calc_normal_vcos(
float const (*vertexCos)[3]) ATTR_NONNULL();
float BM_face_calc_normal_subset(const BMLoop *l_first, const BMLoop *l_last, float r_no[3]) ATTR_NONNULL();
float BM_face_calc_area(const BMFace *f) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+float BM_face_calc_area_with_mat3(const BMFace *f, float mat3[3][3]) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
float BM_face_calc_perimeter(const BMFace *f) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+float BM_face_calc_perimeter_with_mat3(const BMFace *f, float mat3[3][3]) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
void BM_face_calc_tangent_edge(const BMFace *f, float r_plane[3]) ATTR_NONNULL();
void BM_face_calc_tangent_edge_pair(const BMFace *f, float r_plane[3]) ATTR_NONNULL();
void BM_face_calc_tangent_edge_diagonal(const BMFace *f, float r_plane[3]) ATTR_NONNULL();
diff --git a/source/blender/bmesh/intern/bmesh_query.c b/source/blender/bmesh/intern/bmesh_query.c
index 540888ac0b9..e1f16508b8b 100644
--- a/source/blender/bmesh/intern/bmesh_query.c
+++ b/source/blender/bmesh/intern/bmesh_query.c
@@ -792,7 +792,7 @@ bool BM_vert_edge_pair(BMVert *v, BMEdge **r_e_a, BMEdge **r_e_b)
}
/**
- * Returns the number of edges around this vertex.
+ * Returns the number of edges around this vertex.
*/
int BM_vert_edge_count(const BMVert *v)
{
@@ -817,7 +817,7 @@ int BM_vert_edge_count_nonwire(const BMVert *v)
return count;
}
/**
- * Returns the number of faces around this edge
+ * Returns the number of faces around this edge
*/
int BM_edge_face_count(const BMEdge *e)
{
@@ -1311,7 +1311,7 @@ bool BM_edge_share_face_check(BMEdge *e1, BMEdge *e2)
}
/**
- * Test if e1 shares any quad faces with e2
+ * Test if e1 shares any quad faces with e2
*/
bool BM_edge_share_quad_check(BMEdge *e1, BMEdge *e2)
{
@@ -1334,7 +1334,7 @@ bool BM_edge_share_quad_check(BMEdge *e1, BMEdge *e2)
}
/**
- * Tests to see if e1 shares a vertex with e2
+ * Tests to see if e1 shares a vertex with e2
*/
bool BM_edge_share_vert_check(BMEdge *e1, BMEdge *e2)
{
@@ -1345,7 +1345,7 @@ bool BM_edge_share_vert_check(BMEdge *e1, BMEdge *e2)
}
/**
- * Return the shared vertex between the two edges or NULL
+ * Return the shared vertex between the two edges or NULL
*/
BMVert *BM_edge_share_vert(BMEdge *e1, BMEdge *e2)
{
@@ -1678,6 +1678,40 @@ float BM_edge_calc_face_angle(const BMEdge *e)
}
/**
+* \brief BMESH EDGE/FACE ANGLE
+*
+* Calculates the angle between two faces in world space.
+* Assumes the face normals are correct.
+*
+* \return angle in radians
+*/
+float BM_edge_calc_face_angle_with_imat3_ex(const BMEdge *e, float imat3[3][3], const float fallback)
+{
+ if (BM_edge_is_manifold(e)) {
+ const BMLoop *l1 = e->l;
+ const BMLoop *l2 = e->l->radial_next;
+ float no1[3], no2[3];
+ copy_v3_v3(no1, l1->f->no);
+ copy_v3_v3(no2, l2->f->no);
+
+ mul_transposed_m3_v3(imat3, no1);
+ mul_transposed_m3_v3(imat3, no2);
+
+ normalize_v3(no1);
+ normalize_v3(no2);
+
+ return angle_normalized_v3v3(no1, no2);
+ }
+ else {
+ return fallback;
+ }
+}
+float BM_edge_calc_face_angle_with_imat3(const BMEdge *e, float imat3[3][3])
+{
+ return BM_edge_calc_face_angle_with_imat3_ex(e, imat3, DEG2RADF(90.0f));
+}
+
+/**
* \brief BMESH EDGE/FACE ANGLE
*
* Calculates the angle between two faces.
diff --git a/source/blender/bmesh/intern/bmesh_query.h b/source/blender/bmesh/intern/bmesh_query.h
index 51956761d8f..fb625c9acc8 100644
--- a/source/blender/bmesh/intern/bmesh_query.h
+++ b/source/blender/bmesh/intern/bmesh_query.h
@@ -123,6 +123,8 @@ void BM_loop_calc_face_tangent(const BMLoop *l, float r_tangent[3]);
float BM_edge_calc_face_angle_ex(const BMEdge *e, const float fallback) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
float BM_edge_calc_face_angle(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
float BM_edge_calc_face_angle_signed_ex(const BMEdge *e, const float fallback) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+float BM_edge_calc_face_angle_with_imat3_ex(const BMEdge *e, float imat3[3][3], const float fallback) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+float BM_edge_calc_face_angle_with_imat3(const BMEdge *e, float imat3[3][3]) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
float BM_edge_calc_face_angle_signed(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
void BM_edge_calc_face_tangent(const BMEdge *e, const BMLoop *e_loop, float r_tangent[3]) ATTR_NONNULL();
diff --git a/source/blender/bmesh/intern/bmesh_structure.c b/source/blender/bmesh/intern/bmesh_structure.c
index ff744ae1a42..8f9b4274336 100644
--- a/source/blender/bmesh/intern/bmesh_structure.c
+++ b/source/blender/bmesh/intern/bmesh_structure.c
@@ -37,7 +37,7 @@
#include "intern/bmesh_private.h"
/**
- * MISC utility functions.
+ * MISC utility functions.
*/
void bmesh_disk_vert_swap(BMEdge *e, BMVert *v_dst, BMVert *v_src)
diff --git a/source/blender/bmesh/intern/bmesh_walkers.c b/source/blender/bmesh/intern/bmesh_walkers.c
index 77e9d441bbb..44692b760b6 100644
--- a/source/blender/bmesh/intern/bmesh_walkers.c
+++ b/source/blender/bmesh/intern/bmesh_walkers.c
@@ -190,10 +190,10 @@ void *BMW_current_state(BMWalker *walker)
if (currentstate) {
/* Automatic update of depth. For most walkers that
* follow the standard "Step" pattern of:
- * - read current state
- * - remove current state
- * - push new states
- * - return walk result from just-removed current state
+ * - read current state
+ * - remove current state
+ * - push new states
+ * - return walk result from just-removed current state
* this simple automatic update should keep track of depth
* just fine. Walkers that deviate from that pattern may
* need to manually update the depth if they care about
diff --git a/source/blender/bmesh/operators/bmo_bevel.c b/source/blender/bmesh/operators/bmo_bevel.c
index 2ae87b64286..9247c64d3fb 100644
--- a/source/blender/bmesh/operators/bmo_bevel.c
+++ b/source/blender/bmesh/operators/bmo_bevel.c
@@ -63,7 +63,9 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
}
}
- BM_mesh_bevel(bm, offset, offset_type, seg, profile, vonly, false, clamp_overlap, NULL, -1, material, loop_slide);
+ BM_mesh_bevel(
+ bm, offset, offset_type, seg, profile, vonly, false, clamp_overlap, NULL, -1, material,
+ loop_slide);
BMO_slot_buffer_from_enabled_hflag(bm, op, op->slots_out, "faces.out", BM_FACE, BM_ELEM_TAG);
BMO_slot_buffer_from_enabled_hflag(bm, op, op->slots_out, "edges.out", BM_EDGE, BM_ELEM_TAG);
diff --git a/source/blender/bmesh/operators/bmo_dupe.c b/source/blender/bmesh/operators/bmo_dupe.c
index eed87ed20af..c50c7657deb 100644
--- a/source/blender/bmesh/operators/bmo_dupe.c
+++ b/source/blender/bmesh/operators/bmo_dupe.c
@@ -26,6 +26,8 @@
* Duplicate, Split, Split operators.
*/
+#include "MEM_guardedalloc.h"
+
#include "BLI_math.h"
#include "BLI_alloca.h"
@@ -486,9 +488,29 @@ void bmo_spin_exec(BMesh *bm, BMOperator *op)
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");
+ const bool use_normal_flip = BMO_slot_bool_get(op->slots_in, "use_normal_flip");
+ /* Caller needs to perform other sanity checks (such as the spin being 360d). */
+ const bool use_merge = BMO_slot_bool_get(op->slots_in, "use_merge") && steps >= 3;
axis_angle_normalized_to_mat3(rmat, axis, phi);
+ BMVert **vtable = NULL;
+ if (use_merge) {
+ vtable = MEM_mallocN(sizeof(BMVert *) * bm->totvert, __func__);
+ int i = 0;
+ BMIter iter;
+ BMVert *v;
+ BM_ITER_MESH_INDEX (v, &iter, bm, BM_VERTS_OF_MESH, i) {
+ vtable[i] = v;
+ /* Evil! store original index in normal,
+ * this is duplicated into every other vertex.
+ * So we can read the original from the final.
+ *
+ * The normals must be recalculated anyway. */
+ *((int *)&v->no[0]) = i;
+ }
+ }
+
BMO_slot_copy(op, slots_in, "geom",
op, slots_out, "geom_last.out");
for (a = 0; a < steps; a++) {
@@ -503,14 +525,47 @@ void bmo_spin_exec(BMesh *bm, BMOperator *op)
BMO_op_finish(bm, &dupop);
}
else {
- BMO_op_initf(bm, &extop, op->flag, "extrude_face_region geom=%S",
- op, "geom_last.out");
+ BMO_op_initf(bm, &extop, op->flag, "extrude_face_region geom=%S use_normal_flip=%b",
+ op, "geom_last.out", use_normal_flip && (a == 0));
BMO_op_exec(bm, &extop);
- BMO_op_callf(bm, op->flag,
- "rotate cent=%v matrix=%m3 space=%s verts=%S",
- cent, rmat, op, "space", &extop, "geom.out");
- BMO_slot_copy(&extop, slots_out, "geom.out",
- op, slots_out, "geom_last.out");
+ if ((use_merge && (a == steps - 1)) == false) {
+ BMO_op_callf(bm, op->flag,
+ "rotate cent=%v matrix=%m3 space=%s verts=%S",
+ cent, rmat, op, "space", &extop, "geom.out");
+ BMO_slot_copy(&extop, slots_out, "geom.out",
+ op, slots_out, "geom_last.out");
+ }
+ else {
+ /* Merge first/last vertices and edges (maintaining 'geom.out' state). */
+ BMOpSlot *slot_geom_out = BMO_slot_get(extop.slots_out, "geom.out");
+ BMElem **elem_array = (BMElem **)slot_geom_out->data.buf;
+ int elem_array_len = slot_geom_out->len;
+ for (int i = 0; i < elem_array_len; ) {
+ if (elem_array[i]->head.htype == BM_VERT) {
+ BMVert *v_src = (BMVert *)elem_array[i];
+ BMVert *v_dst = vtable[*((const int *)&v_src->no[0])];
+ BM_vert_splice(bm, v_dst, v_src);
+ elem_array_len--;
+ elem_array[i] = elem_array[elem_array_len];
+ }
+ else {
+ i++;
+ }
+ }
+ for (int i = 0; i < elem_array_len; ) {
+ if (elem_array[i]->head.htype == BM_EDGE) {
+ BMEdge *e_src = (BMEdge *)elem_array[i];
+ BMEdge *e_dst = BM_edge_find_double(e_src);
+ BM_edge_splice(bm, e_dst, e_src);
+ elem_array_len--;
+ elem_array[i] = elem_array[elem_array_len];
+ }
+ else {
+ i++;
+ }
+ }
+ slot_geom_out->len = elem_array_len;
+ }
BMO_op_finish(bm, &extop);
}
@@ -521,4 +576,8 @@ void bmo_spin_exec(BMesh *bm, BMOperator *op)
dvec, op, "space", op, "geom_last.out");
}
}
+
+ if (vtable) {
+ MEM_freeN(vtable);
+ }
}
diff --git a/source/blender/bmesh/operators/bmo_extrude.c b/source/blender/bmesh/operators/bmo_extrude.c
index 3a6fbd419c1..8c1624740da 100644
--- a/source/blender/bmesh/operators/bmo_extrude.c
+++ b/source/blender/bmesh/operators/bmo_extrude.c
@@ -186,6 +186,7 @@ void bmo_extrude_edge_only_exec(BMesh *bm, BMOperator *op)
BMOperator dupeop;
BMFace *f;
BMEdge *e, *e_new;
+ const bool use_normal_flip = BMO_slot_bool_get(op->slots_in, "use_normal_flip");
BMO_ITER (e, &siter, op->slots_in, "edges", BM_EDGE) {
BMO_edge_flag_enable(bm, e, EXT_INPUT);
@@ -212,7 +213,9 @@ void bmo_extrude_edge_only_exec(BMesh *bm, BMOperator *op)
BMVert *f_verts[4];
e_new = BMO_iter_map_value_ptr(&siter);
- if (e->l && e->v1 != e->l->v) {
+
+ const bool edge_normal_flip = !(e->l && e->v1 != e->l->v);
+ if (edge_normal_flip == use_normal_flip) {
f_verts[0] = e->v1;
f_verts[1] = e->v2;
f_verts[2] = e_new->v2;
@@ -332,9 +335,10 @@ void bmo_extrude_face_region_exec(BMesh *bm, BMOperator *op)
BMEdge *e, *e_new;
BMVert *v;
BMFace *f;
- bool found, fwd, delorig = false;
+ bool found, delorig = false;
BMOpSlot *slot_facemap_out;
BMOpSlot *slot_edges_exclude;
+ const bool use_normal_flip = BMO_slot_bool_get(op->slots_in, "use_normal_flip");
/* initialize our sub-operators */
BMO_op_initf(
@@ -488,13 +492,11 @@ void bmo_extrude_face_region_exec(BMesh *bm, BMOperator *op)
/* orient loop to give same normal as a loop of newedge
* if it exists (will be an extruded face),
* else same normal as a loop of e, if it exists */
- if (!e_new->l)
- fwd = !e->l || !(e->l->v == e->v1);
- else
- fwd = (e_new->l->v == e_new->v1);
-
-
- if (fwd) {
+ const bool edge_normal_flip = !(
+ e_new->l ?
+ (e_new->l->v == e_new->v1) :
+ (!e->l || !(e->l->v == e->v1)));
+ if (edge_normal_flip == use_normal_flip) {
f_verts[0] = e->v1;
f_verts[1] = e->v2;
f_verts[2] = e_new->v2;
diff --git a/source/blender/bmesh/operators/bmo_subdivide.c b/source/blender/bmesh/operators/bmo_subdivide.c
index c8ba2134a73..66730f8c837 100644
--- a/source/blender/bmesh/operators/bmo_subdivide.c
+++ b/source/blender/bmesh/operators/bmo_subdivide.c
@@ -182,15 +182,12 @@ static void interp_slerp_co_no_v3(
/* calculate sphere 'center' */
{
/* use point on plane to */
- float plane_a[4], plane_b[4], plane_c[4];
float no_mid[3], no_ortho[3];
/* pass this as an arg instead */
#if 0
float no_dir[3];
#endif
- float v_a_no_ortho[3], v_b_no_ortho[3];
-
add_v3_v3v3(no_mid, no_a, no_b);
normalize_v3(no_mid);
@@ -200,24 +197,28 @@ static void interp_slerp_co_no_v3(
#endif
/* axis of slerp */
+ bool center_ok = false;
cross_v3_v3v3(no_ortho, no_mid, no_dir);
- normalize_v3(no_ortho);
-
- /* create planes */
- cross_v3_v3v3(v_a_no_ortho, no_ortho, no_a);
- cross_v3_v3v3(v_b_no_ortho, no_ortho, no_b);
- project_v3_plane(v_a_no_ortho, no_ortho, v_a_no_ortho);
- project_v3_plane(v_b_no_ortho, no_ortho, v_b_no_ortho);
-
- plane_from_point_normal_v3(plane_a, co_a, v_a_no_ortho);
- plane_from_point_normal_v3(plane_b, co_b, v_b_no_ortho);
- plane_from_point_normal_v3(plane_c, co_b, no_ortho);
-
- /* find the sphere center from 3 planes */
- if (isect_plane_plane_plane_v3(plane_a, plane_b, plane_c, center)) {
- /* pass */
+ if (normalize_v3(no_ortho) != 0.0f) {
+ float plane_a[4], plane_b[4], plane_c[4];
+ float v_a_no_ortho[3], v_b_no_ortho[3];
+
+ /* create planes */
+ cross_v3_v3v3(v_a_no_ortho, no_ortho, no_a);
+ cross_v3_v3v3(v_b_no_ortho, no_ortho, no_b);
+ project_v3_plane(v_a_no_ortho, no_ortho, v_a_no_ortho);
+ project_v3_plane(v_b_no_ortho, no_ortho, v_b_no_ortho);
+
+ plane_from_point_normal_v3(plane_a, co_a, v_a_no_ortho);
+ plane_from_point_normal_v3(plane_b, co_b, v_b_no_ortho);
+ plane_from_point_normal_v3(plane_c, co_b, no_ortho);
+
+ /* find the sphere center from 3 planes */
+ if (isect_plane_plane_plane_v3(plane_a, plane_b, plane_c, center)) {
+ center_ok = true;
+ }
}
- else {
+ if (center_ok == false) {
mid_v3_v3v3(center, co_a, co_b);
}
}
diff --git a/source/blender/bmesh/operators/bmo_subdivide_edgering.c b/source/blender/bmesh/operators/bmo_subdivide_edgering.c
index e6881f6d8b1..251a79e8ff5 100644
--- a/source/blender/bmesh/operators/bmo_subdivide_edgering.c
+++ b/source/blender/bmesh/operators/bmo_subdivide_edgering.c
@@ -505,7 +505,7 @@ static LoopPairStore *bm_edgering_pair_store_create(
for (v_iter = lb->first, i = 0; v_iter; v_iter = v_iter->next, i++) {
BMVert *v = v_iter->data;
bm_vert_calc_surface_tangent(bm, v, nor[i]);
- BLI_ghash_insert(nors_gh_iter, v, SET_UINT_IN_POINTER(i));
+ BLI_ghash_insert(nors_gh_iter, v, POINTER_FROM_UINT(i));
}
}
@@ -768,8 +768,8 @@ static void bm_edgering_pair_interpolate(
bm_vert_calc_surface_tangent(bm, v_b, no_b);
#else
{
- const uint index_a = GET_UINT_FROM_POINTER(BLI_ghash_lookup(lpair->nors_gh_a, v_a));
- const uint index_b = GET_UINT_FROM_POINTER(BLI_ghash_lookup(lpair->nors_gh_b, v_b));
+ const uint index_a = POINTER_AS_UINT(BLI_ghash_lookup(lpair->nors_gh_a, v_a));
+ const uint index_b = POINTER_AS_UINT(BLI_ghash_lookup(lpair->nors_gh_b, v_b));
BLI_assert(BLI_ghash_haskey(lpair->nors_gh_a, v_a));
BLI_assert(BLI_ghash_haskey(lpair->nors_gh_b, v_b));
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c
index 754db541548..e55e11e0bdb 100644
--- a/source/blender/bmesh/tools/bmesh_bevel.c
+++ b/source/blender/bmesh/tools/bmesh_bevel.c
@@ -32,7 +32,6 @@
#include "MEM_guardedalloc.h"
-#include "DNA_object_types.h"
#include "DNA_meshdata_types.h"
#include "BLI_array.h"
diff --git a/source/blender/bmesh/tools/bmesh_intersect.c b/source/blender/bmesh/tools/bmesh_intersect.c
index b1a8c3ccb86..49165b48668 100644
--- a/source/blender/bmesh/tools/bmesh_intersect.c
+++ b/source/blender/bmesh/tools/bmesh_intersect.c
@@ -232,7 +232,7 @@ static void face_edges_add(
BMEdge *e,
const bool use_test)
{
- void *f_index_key = SET_INT_IN_POINTER(f_index);
+ void *f_index_key = POINTER_FROM_INT(f_index);
BLI_assert(e->head.htype == BM_EDGE);
BLI_assert(BM_edge_in_face(e, s->bm->ftable[f_index]) == false);
BLI_assert(BM_elem_index_get(s->bm->ftable[f_index]) == f_index);
@@ -1488,7 +1488,7 @@ bool BM_mesh_intersect(
faces = bm->ftable;
GHASH_ITER (gh_iter, s.face_edges) {
- const int f_index = GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(&gh_iter));
+ const int f_index = POINTER_AS_INT(BLI_ghashIterator_getKey(&gh_iter));
BMFace *f;
struct LinkBase *e_ls_base = BLI_ghashIterator_getValue(&gh_iter);
diff --git a/source/blender/bmesh/tools/bmesh_wireframe.c b/source/blender/bmesh/tools/bmesh_wireframe.c
index c45e617dd39..57e0e0b44ca 100644
--- a/source/blender/bmesh/tools/bmesh_wireframe.c
+++ b/source/blender/bmesh/tools/bmesh_wireframe.c
@@ -28,7 +28,6 @@
#include "MEM_guardedalloc.h"
-#include "DNA_object_types.h"
#include "DNA_meshdata_types.h"
#include "BLI_math.h"
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp
index 6e4561809fd..e5c54fd9917 100644
--- a/source/blender/collada/AnimationExporter.cpp
+++ b/source/blender/collada/AnimationExporter.cpp
@@ -65,25 +65,26 @@ bool AnimationExporter::is_flat_line(std::vector<float> &values, int channel_cou
* <source>, <sampler>, and <channel> entries.
* This is is used for creating sampled Transformation Animations for either:
*
- * 1-axis animation:
- * times contains the time points in seconds from within the timeline
- * values contains the data (list of single floats)
- * channel_count = 1
- * axis_name = ['X' | 'Y' | 'Z']
- * is_rot indicates if the animation is a rotation
+ * 1-axis animation:
+ * times contains the time points in seconds from within the timeline
+ * values contains the data (list of single floats)
+ * channel_count = 1
+ * axis_name = ['X' | 'Y' | 'Z']
+ * is_rot indicates if the animation is a rotation
*
- * 3-axis animation:
- * times contains the time points in seconds from within the timeline
- * values contains the data (list of floats where each 3 entries are one vector)
- * channel_count = 3
- * axis_name = "" (actually not used)
- * is_rot = false (see xxx below)
+ * 3-axis animation:
+ * times contains the time points in seconds from within the timeline
+ * values contains the data (list of floats where each 3 entries are one vector)
+ * channel_count = 3
+ * axis_name = "" (actually not used)
+ * is_rot = false (see xxx below)
*
- * xxx: I tried to create a 3 axis rotation animation
- * like for translation or scale. But i could not
- * figure out how to setup the channel for this case.
- * So for now rotations are exported as 3 separate 1-axis collada animations
- * See export_sampled_animation() further down.
+ * xxx:
+ * I tried to create a 3 axis rotation animation
+ * like for translation or scale. But i could not
+ * figure out how to setup the channel for this case.
+ * So for now rotations are exported as 3 separate 1-axis collada animations
+ * See export_sampled_animation() further down.
*/
void AnimationExporter::create_sampled_animation(int channel_count,
std::vector<float> &times,
@@ -139,7 +140,7 @@ void AnimationExporter::create_sampled_animation(int channel_count,
* Export all animation FCurves of an Object.
*
* Note: This uses the keyframes as sample points,
- * and exports "baked keyframes" while keeping the tangent infromation
+ * and exports "baked keyframes" while keeping the tangent information
* of the FCurves intact. This works for simple cases, but breaks
* especially when negative scales are involved in the animation.
*
@@ -417,8 +418,8 @@ void AnimationExporter::make_anim_frames_from_targets(Object *ob, std::vector<fl
bConstraintTarget *ct;
Object *obtar;
/* get targets
- * - constraints should use ct->matrix, not directly accessing values
- * - ct->matrix members have not yet been calculated here!
+ * - constraints should use ct->matrix, not directly accessing values
+ * - ct->matrix members have not yet been calculated here!
*/
cti->get_constraint_targets(con, &targets);
diff --git a/source/blender/collada/AnimationImporter.h b/source/blender/collada/AnimationImporter.h
index f63329158f0..ff49bc369cf 100644
--- a/source/blender/collada/AnimationImporter.h
+++ b/source/blender/collada/AnimationImporter.h
@@ -181,11 +181,12 @@ public:
// prerequisites:
// animlist_map - map animlist id -> animlist
// curve_map - map anim id -> curve(s)
- Object * translate_animation_OLD(Main *bmain, COLLADAFW::Node *node,
- std::map<COLLADAFW::UniqueId, Object*>& object_map,
- std::map<COLLADAFW::UniqueId, COLLADAFW::Node*>& root_map,
- COLLADAFW::Transformation::TransformationType tm_type,
- Object *par_job = NULL);
+ Object *translate_animation_OLD(
+ Main *bmain, COLLADAFW::Node *node,
+ std::map<COLLADAFW::UniqueId, Object*>& object_map,
+ std::map<COLLADAFW::UniqueId, COLLADAFW::Node*>& root_map,
+ COLLADAFW::Transformation::TransformationType tm_type,
+ Object *par_job = NULL);
void find_frames( std::vector<float>* frames, std::vector<FCurve*>* curves );
void find_frames_old( std::vector<float>* frames, COLLADAFW::Node * node, COLLADAFW::Transformation::TransformationType tm_type );
diff --git a/source/blender/collada/ArmatureExporter.cpp b/source/blender/collada/ArmatureExporter.cpp
index 52f7c5627b9..432ce92b49d 100644
--- a/source/blender/collada/ArmatureExporter.cpp
+++ b/source/blender/collada/ArmatureExporter.cpp
@@ -69,7 +69,7 @@ void ArmatureExporter::add_armature_bones(bContext *C, Object *ob_arm, Scene *sc
Main *bmain = CTX_data_main(C);
// write bone nodes
- bArmature * armature = (bArmature *)ob_arm->data;
+ bArmature *armature = (bArmature *)ob_arm->data;
bool is_edited = armature->edbo != NULL;
if (!is_edited)
diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp
index e8b665b2020..a96d1e76a99 100644
--- a/source/blender/collada/ArmatureImporter.cpp
+++ b/source/blender/collada/ArmatureImporter.cpp
@@ -460,11 +460,11 @@ void ArmatureImporter::create_armature_bones(Main *bmain, std::vector<Object *>
if (!ob_arm)
continue;
- bArmature * armature = (bArmature *)ob_arm->data;
+ bArmature *armature = (bArmature *)ob_arm->data;
if (!armature)
continue;
- char * bone_name = (char *)bc_get_joint_name(*ri);
+ char *bone_name = (char *)bc_get_joint_name(*ri);
Bone *bone = BKE_armature_find_bone_name(armature, bone_name);
if (bone) {
fprintf(stderr, "Reuse of child bone [%s] as root bone in same Armature is not supported.\n", bone_name);
@@ -589,7 +589,7 @@ Object *ArmatureImporter::create_armature_bones(Main *bmain, SkinInfo& skin)
}
// enter armature edit mode
- bArmature * armature = (bArmature *)ob_arm->data;
+ bArmature *armature = (bArmature *)ob_arm->data;
ED_armature_to_edit(armature);
totbone = 0;
diff --git a/source/blender/collada/ControllerExporter.cpp b/source/blender/collada/ControllerExporter.cpp
index 5673d33fcbf..a5f96123fd4 100644
--- a/source/blender/collada/ControllerExporter.cpp
+++ b/source/blender/collada/ControllerExporter.cpp
@@ -398,13 +398,13 @@ std::string ControllerExporter::add_morph_weights(Key *key, Object *ob)
return source_id;
}
-//Added to implemente support for animations.
+//Added to implement support for animations.
void ControllerExporter::add_weight_extras(Key *key)
{
// can also try the base element and param alternative
COLLADASW::BaseExtraTechnique extra;
- KeyBlock * kb = (KeyBlock *)key->block.first;
+ KeyBlock *kb = (KeyBlock *)key->block.first;
//skip the basis
kb = kb->next;
for (; kb; kb = kb->next) {
diff --git a/source/blender/collada/GeometryExporter.cpp b/source/blender/collada/GeometryExporter.cpp
index 5f310c26da3..eb627b5c066 100644
--- a/source/blender/collada/GeometryExporter.cpp
+++ b/source/blender/collada/GeometryExporter.cpp
@@ -166,9 +166,9 @@ void GeometryExporter::operator()(Object *ob)
closeGeometry();
if (this->export_settings->include_shapekeys) {
- Key * key = BKE_key_from_object(ob);
+ Key *key = BKE_key_from_object(ob);
if (key) {
- KeyBlock * kb = (KeyBlock *)key->block.first;
+ KeyBlock *kb = (KeyBlock *)key->block.first;
//skip the basis
kb = kb->next;
for (; kb; kb = kb->next) {
diff --git a/source/blender/collada/GeometryExporter.h b/source/blender/collada/GeometryExporter.h
index dea97fc1286..fd9db7b1fd2 100644
--- a/source/blender/collada/GeometryExporter.h
+++ b/source/blender/collada/GeometryExporter.h
@@ -143,7 +143,7 @@ private:
const ExportSettings *export_settings;
- Mesh * get_mesh(Scene *sce, Object *ob, int apply_modifiers);
+ Mesh *get_mesh(Scene *sce, Object *ob, int apply_modifiers);
};
struct GeometryFunctor {
diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp
index d121268d8d9..1f24010b04e 100644
--- a/source/blender/collada/MeshImporter.cpp
+++ b/source/blender/collada/MeshImporter.cpp
@@ -183,7 +183,7 @@ void VCOLDataWrapper::get_vcol(int v_index, MLoopCol *mloopcol)
case COLLADAFW::MeshVertexData::DATA_TYPE_FLOAT:
{
COLLADAFW::ArrayPrimitiveType<float> *values = mVData->getFloatValues();
- if (values->empty() || values->getCount() <= (v_index * stride + 2)) return; // xxx need to create an eror instead
+ if (values->empty() || values->getCount() <= (v_index * stride + 2)) return; // xxx need to create an error instead
mloopcol->r = unit_float_to_uchar_clamp((*values)[v_index * stride]);
mloopcol->g = unit_float_to_uchar_clamp((*values)[v_index * stride + 1]);
@@ -194,7 +194,7 @@ void VCOLDataWrapper::get_vcol(int v_index, MLoopCol *mloopcol)
case COLLADAFW::MeshVertexData::DATA_TYPE_DOUBLE:
{
COLLADAFW::ArrayPrimitiveType<double> *values = mVData->getDoubleValues();
- if (values->empty() || values->getCount() <= (v_index * stride + 2)) return; // xxx need to create an eror instead
+ if (values->empty() || values->getCount() <= (v_index * stride + 2)) return; // xxx need to create an error instead
mloopcol->r = unit_float_to_uchar_clamp((*values)[v_index * stride]);
mloopcol->g = unit_float_to_uchar_clamp((*values)[v_index * stride + 1]);
@@ -546,7 +546,7 @@ unsigned int MeshImporter::get_loose_edge_count(COLLADAFW::Mesh *mesh) {
}
// =================================================================
-// This functin is copied from source/blender/editors/mesh/mesh_data.c
+// This function is copied from source/blender/editors/mesh/mesh_data.c
//
// TODO: (As discussed with sergey-) :
// Maybe move this function to blenderkernel/intern/mesh.c
@@ -585,7 +585,7 @@ void MeshImporter::mesh_add_edges(Mesh *mesh, int len)
// =================================================================
// Read all loose edges.
// Important: This function assumes that all edges from existing
-// faces have allready been generated and added to me->medge
+// faces have already been generated and added to me->medge
// So this function MUST be called after read_faces() (see below)
// =================================================================
void MeshImporter::read_lines(COLLADAFW::Mesh *mesh, Mesh *me)
@@ -679,7 +679,7 @@ void MeshImporter::read_polys(COLLADAFW::Mesh *collada_mesh, Mesh *me)
unsigned int vertex_count = mp->getGroupedVerticesVertexCount(group_index);
for (unsigned int vertex_index = 0; vertex_index < vertex_count - 2; vertex_index++) {
- // For each triangle store indeces of its 3 vertices
+ // For each triangle store indices of its 3 vertices
unsigned int triangle_vertex_indices[3] = {first_vertex, position_indices[1], position_indices[2]};
set_poly_indices(mpoly, mloop, loop_index, triangle_vertex_indices, 3);
@@ -944,7 +944,7 @@ static bool bc_has_same_material_configuration(Object *ob1, Object *ob2)
/**
*
- * Caution here: This code assumes tha all materials are assigned to Object
+ * Caution here: This code assumes that all materials are assigned to Object
* and no material is assigned to Data.
* That is true right after the objects have been imported.
*
@@ -1078,7 +1078,7 @@ MTFace *MeshImporter::assign_material_to_geom(COLLADAFW::MaterialBinding cmateri
Material *ma = uid_material_map[ma_uid];
- // Attention! This temporaly assigns material to object on purpose!
+ // Attention! This temporarily assigns material to object on purpose!
// See note above.
ob->actcol=0;
assign_material(m_bmain, ob, ma, mat_index + 1, BKE_MAT_ASSIGN_OBJECT);
@@ -1138,7 +1138,7 @@ Object *MeshImporter::create_mesh_object(COLLADAFW::Node *node, COLLADAFW::Insta
{
const COLLADAFW::UniqueId *geom_uid = &geom->getInstanciatedObjectId();
- // check if node instanciates controller or geometry
+ // check if node instantiates controller or geometry
if (isController) {
geom_uid = armature_importer->get_geometry_uid(*geom_uid);
@@ -1241,7 +1241,7 @@ bool MeshImporter::write_geometry(const COLLADAFW::Geometry *geom)
// BKE_mesh_calc_edges(me, false, false);
// read_lines() must be called after the face edges have been generated.
- // Oterwise the loose edges will be silently deleted again.
+ // Otherwise the loose edges will be silently deleted again.
read_lines(mesh, me);
return true;
diff --git a/source/blender/collada/SceneExporter.cpp b/source/blender/collada/SceneExporter.cpp
index a0d1b6b5333..b571b7503d5 100644
--- a/source/blender/collada/SceneExporter.cpp
+++ b/source/blender/collada/SceneExporter.cpp
@@ -59,7 +59,7 @@ void SceneExporter::exportHierarchy(bContext *C, Scene *sce)
ob->id.tag |= LIB_TAG_DOIT;
}
- // Now find all exportable base ojects (highest in export hierarchy)
+ // Now find all exportable base objects (highest in export hierarchy)
for (node = this->export_settings->export_set; node; node = node->next) {
Object *ob = (Object *) node->link;
if (bc_is_base_node(this->export_settings->export_set, ob)) {
diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp
index 07e2c834221..b25a35a5452 100644
--- a/source/blender/collada/collada_utils.cpp
+++ b/source/blender/collada/collada_utils.cpp
@@ -603,7 +603,7 @@ inline bool isInteger(const std::string & s)
{
if (s.empty() || ((!isdigit(s[0])) && (s[0] != '-') && (s[0] != '+'))) return false;
- char * p;
+ char *p;
strtol(s.c_str(), &p, 10);
return (*p == 0);
@@ -768,7 +768,7 @@ float bc_get_property(Bone *bone, std::string key, float def)
/**
* Read a custom bone property and convert to matrix
- * Return true if conversion was succesfull
+ * Return true if conversion was successful
*
* Return false if:
* - the property does not exist
diff --git a/source/blender/compositor/COM_compositor.h b/source/blender/compositor/COM_compositor.h
index f9fd0999acc..dbdcb8b4924 100644
--- a/source/blender/compositor/COM_compositor.h
+++ b/source/blender/compositor/COM_compositor.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_COMPOSITOR_H__
diff --git a/source/blender/compositor/COM_defines.h b/source/blender/compositor/COM_defines.h
index c8e924da6a2..34cbaf9db37 100644
--- a/source/blender/compositor/COM_defines.h
+++ b/source/blender/compositor/COM_defines.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_DEFINES_H__
diff --git a/source/blender/compositor/intern/COM_CPUDevice.cpp b/source/blender/compositor/intern/COM_CPUDevice.cpp
index d3991245c22..5a4f68bb9b8 100644
--- a/source/blender/compositor/intern/COM_CPUDevice.cpp
+++ b/source/blender/compositor/intern/COM_CPUDevice.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_CPUDevice.h"
diff --git a/source/blender/compositor/intern/COM_CPUDevice.h b/source/blender/compositor/intern/COM_CPUDevice.h
index 8d4d5f1c324..52dcbb3a168 100644
--- a/source/blender/compositor/intern/COM_CPUDevice.h
+++ b/source/blender/compositor/intern/COM_CPUDevice.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_CPUDEVICE_H__
diff --git a/source/blender/compositor/intern/COM_ChunkOrder.cpp b/source/blender/compositor/intern/COM_ChunkOrder.cpp
index 5ed183dbc08..f7e24b98800 100644
--- a/source/blender/compositor/intern/COM_ChunkOrder.cpp
+++ b/source/blender/compositor/intern/COM_ChunkOrder.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ChunkOrder.h"
diff --git a/source/blender/compositor/intern/COM_ChunkOrder.h b/source/blender/compositor/intern/COM_ChunkOrder.h
index f61816c6511..68099ea9516 100644
--- a/source/blender/compositor/intern/COM_ChunkOrder.h
+++ b/source/blender/compositor/intern/COM_ChunkOrder.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_CHUNKORDER_H__
diff --git a/source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp b/source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp
index 58e04f9fe7b..2a4c410c647 100644
--- a/source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp
+++ b/source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ChunkOrderHotspot.h"
diff --git a/source/blender/compositor/intern/COM_ChunkOrderHotspot.h b/source/blender/compositor/intern/COM_ChunkOrderHotspot.h
index 620980518ef..7fa21a6c3ac 100644
--- a/source/blender/compositor/intern/COM_ChunkOrderHotspot.h
+++ b/source/blender/compositor/intern/COM_ChunkOrderHotspot.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_CHUNKORDERHOTSPOT_H__
diff --git a/source/blender/compositor/intern/COM_CompositorContext.cpp b/source/blender/compositor/intern/COM_CompositorContext.cpp
index 8574a9ee6f0..dde0cf892dc 100644
--- a/source/blender/compositor/intern/COM_CompositorContext.cpp
+++ b/source/blender/compositor/intern/COM_CompositorContext.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_CompositorContext.h"
diff --git a/source/blender/compositor/intern/COM_CompositorContext.h b/source/blender/compositor/intern/COM_CompositorContext.h
index 6b153ff0161..e084d23f45e 100644
--- a/source/blender/compositor/intern/COM_CompositorContext.h
+++ b/source/blender/compositor/intern/COM_CompositorContext.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_COMPOSITORCONTEXT_H__
diff --git a/source/blender/compositor/intern/COM_Converter.cpp b/source/blender/compositor/intern/COM_Converter.cpp
index c9181905908..cd5f6977feb 100644
--- a/source/blender/compositor/intern/COM_Converter.cpp
+++ b/source/blender/compositor/intern/COM_Converter.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include <string.h>
@@ -394,7 +394,7 @@ Node *Converter::convert(bNode *b_node)
case CMP_NODE_TRACKPOS:
node = new TrackPositionNode(b_node);
break;
- /* not inplemented yet */
+ /* not implemented yet */
case CMP_NODE_PIXELATE:
node = new PixelateNode(b_node);
break;
diff --git a/source/blender/compositor/intern/COM_Converter.h b/source/blender/compositor/intern/COM_Converter.h
index 05d23eb3e7e..3aaf0545222 100644
--- a/source/blender/compositor/intern/COM_Converter.h
+++ b/source/blender/compositor/intern/COM_Converter.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_CONVERTER_H__
diff --git a/source/blender/compositor/intern/COM_Debug.cpp b/source/blender/compositor/intern/COM_Debug.cpp
index 45c51bf1c98..e97ac606118 100644
--- a/source/blender/compositor/intern/COM_Debug.cpp
+++ b/source/blender/compositor/intern/COM_Debug.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Lukas Toenne
+ * Lukas Toenne
*/
#include "COM_Debug.h"
diff --git a/source/blender/compositor/intern/COM_Debug.h b/source/blender/compositor/intern/COM_Debug.h
index 8a5014afb96..2afea7c3228 100644
--- a/source/blender/compositor/intern/COM_Debug.h
+++ b/source/blender/compositor/intern/COM_Debug.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Lukas Toenne
+ * Lukas Toenne
*/
#ifndef __COM_DEBUG_H__
diff --git a/source/blender/compositor/intern/COM_Device.cpp b/source/blender/compositor/intern/COM_Device.cpp
index 7d2045e3c7b..49e729b4cb9 100644
--- a/source/blender/compositor/intern/COM_Device.cpp
+++ b/source/blender/compositor/intern/COM_Device.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_Device.h"
diff --git a/source/blender/compositor/intern/COM_Device.h b/source/blender/compositor/intern/COM_Device.h
index 8cb1cbebf7f..4d6e1673aa1 100644
--- a/source/blender/compositor/intern/COM_Device.h
+++ b/source/blender/compositor/intern/COM_Device.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_DEVICE_H__
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
index c4ef21d1f13..680e3cac5f7 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include <algorithm>
@@ -437,7 +437,7 @@ void ExecutionGroup::determineChunkRect(rcti *rect, const unsigned int chunkNumb
MemoryBuffer *ExecutionGroup::allocateOutputBuffer(int /*chunkNumber*/,
rcti *rect)
{
- // we asume that this method is only called from complex execution groups.
+ // we assume that this method is only called from complex execution groups.
NodeOperation *operation = this->getOutputOperation();
if (operation->isWriteBufferOperation()) {
WriteBufferOperation *writeOperation = (WriteBufferOperation *)operation;
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.h b/source/blender/compositor/intern/COM_ExecutionGroup.h
index 2c79b2ba0a4..f85c1759d8f 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.h
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_EXECUTIONGROUP_H__
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.cpp b/source/blender/compositor/intern/COM_ExecutionSystem.cpp
index 07f7979629c..85e07850c0a 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystem.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionSystem.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ExecutionSystem.h"
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.h b/source/blender/compositor/intern/COM_ExecutionSystem.h
index 5b0d36ebacd..83c2918f480 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystem.h
+++ b/source/blender/compositor/intern/COM_ExecutionSystem.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
class ExecutionGroup;
@@ -163,9 +163,9 @@ public:
/**
* \brief execute this system
- * - initialize the NodeOperation's and ExecutionGroup's
- * - schedule the output ExecutionGroup's based on their priority
- * - deinitialize the ExecutionGroup's and NodeOperation's
+ * - initialize the NodeOperation's and ExecutionGroup's
+ * - schedule the output ExecutionGroup's based on their priority
+ * - deinitialize the ExecutionGroup's and NodeOperation's
*/
void execute();
diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.cpp b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
index f5045e6f3ab..43c8e7b2aa1 100644
--- a/source/blender/compositor/intern/COM_MemoryBuffer.cpp
+++ b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_MemoryBuffer.h"
diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.h b/source/blender/compositor/intern/COM_MemoryBuffer.h
index 7492113da34..085cf8708d7 100644
--- a/source/blender/compositor/intern/COM_MemoryBuffer.h
+++ b/source/blender/compositor/intern/COM_MemoryBuffer.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
class MemoryBuffer;
diff --git a/source/blender/compositor/intern/COM_MemoryProxy.cpp b/source/blender/compositor/intern/COM_MemoryProxy.cpp
index b995f556db2..ac71c14368a 100644
--- a/source/blender/compositor/intern/COM_MemoryProxy.cpp
+++ b/source/blender/compositor/intern/COM_MemoryProxy.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_MemoryProxy.h"
diff --git a/source/blender/compositor/intern/COM_MemoryProxy.h b/source/blender/compositor/intern/COM_MemoryProxy.h
index 884b32fd6ff..ee5dd684b38 100644
--- a/source/blender/compositor/intern/COM_MemoryProxy.h
+++ b/source/blender/compositor/intern/COM_MemoryProxy.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
class MemoryProxy;
@@ -39,7 +39,7 @@ class WriteBufferOperation;
class MemoryProxy {
private:
/**
- * \brief reference to the ouput operation of the executiongroup
+ * \brief reference to the output operation of the executiongroup
*/
WriteBufferOperation *m_writeBufferOperation;
diff --git a/source/blender/compositor/intern/COM_Node.cpp b/source/blender/compositor/intern/COM_Node.cpp
index 67b64baa26e..cc23b7dce47 100644
--- a/source/blender/compositor/intern/COM_Node.cpp
+++ b/source/blender/compositor/intern/COM_Node.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include <string.h>
diff --git a/source/blender/compositor/intern/COM_Node.h b/source/blender/compositor/intern/COM_Node.h
index 891845517d5..9dea9d715a8 100644
--- a/source/blender/compositor/intern/COM_Node.h
+++ b/source/blender/compositor/intern/COM_Node.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_NODE_H__
diff --git a/source/blender/compositor/intern/COM_NodeConverter.cpp b/source/blender/compositor/intern/COM_NodeConverter.cpp
index 1b62466f81f..997c9cbe8f1 100644
--- a/source/blender/compositor/intern/COM_NodeConverter.cpp
+++ b/source/blender/compositor/intern/COM_NodeConverter.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Lukas Toenne
+ * Lukas Toenne
*/
extern "C" {
diff --git a/source/blender/compositor/intern/COM_NodeConverter.h b/source/blender/compositor/intern/COM_NodeConverter.h
index 320646be50d..34e9dcd5abc 100644
--- a/source/blender/compositor/intern/COM_NodeConverter.h
+++ b/source/blender/compositor/intern/COM_NodeConverter.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Lukas Toenne
+ * Lukas Toenne
*/
#ifndef __COM_NODECONVERTER_H__
diff --git a/source/blender/compositor/intern/COM_NodeGraph.cpp b/source/blender/compositor/intern/COM_NodeGraph.cpp
index 94af8543eb0..a1959fdecc5 100644
--- a/source/blender/compositor/intern/COM_NodeGraph.cpp
+++ b/source/blender/compositor/intern/COM_NodeGraph.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Lukas Toenne
+ * Lukas Toenne
*/
#include <cstring>
diff --git a/source/blender/compositor/intern/COM_NodeGraph.h b/source/blender/compositor/intern/COM_NodeGraph.h
index 4513a7721d6..9df786bdf77 100644
--- a/source/blender/compositor/intern/COM_NodeGraph.h
+++ b/source/blender/compositor/intern/COM_NodeGraph.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Lukas Toenne
+ * Lukas Toenne
*/
#ifndef __COM_NODEGRAPH_H__
diff --git a/source/blender/compositor/intern/COM_NodeOperation.cpp b/source/blender/compositor/intern/COM_NodeOperation.cpp
index 1063386aa58..ff880ba3cdb 100644
--- a/source/blender/compositor/intern/COM_NodeOperation.cpp
+++ b/source/blender/compositor/intern/COM_NodeOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include <typeinfo>
@@ -171,7 +171,7 @@ bool NodeOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOper
rcti tempOutput;
bool first = true;
for (int i = 0; i < getNumberOfInputSockets(); i ++) {
- NodeOperation * inputOperation = this->getInputOperation(i);
+ NodeOperation *inputOperation = this->getInputOperation(i);
if (inputOperation && inputOperation->determineDependingAreaOfInterest(input, readOperation, &tempOutput)) {
if (first) {
output->xmin = tempOutput.xmin;
diff --git a/source/blender/compositor/intern/COM_NodeOperation.h b/source/blender/compositor/intern/COM_NodeOperation.h
index 95164d727e8..c0957d57040 100644
--- a/source/blender/compositor/intern/COM_NodeOperation.h
+++ b/source/blender/compositor/intern/COM_NodeOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_NODEOPERATION_H__
diff --git a/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp b/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp
index f282037823a..65e17d57925 100644
--- a/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp
+++ b/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Lukas Toenne
+ * Lukas Toenne
*/
extern "C" {
diff --git a/source/blender/compositor/intern/COM_NodeOperationBuilder.h b/source/blender/compositor/intern/COM_NodeOperationBuilder.h
index 71622b1e9bb..85cafc508fd 100644
--- a/source/blender/compositor/intern/COM_NodeOperationBuilder.h
+++ b/source/blender/compositor/intern/COM_NodeOperationBuilder.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Lukas Toenne
+ * Lukas Toenne
*/
#ifndef __COM_NODEOPERATIONBUILDER_H__
diff --git a/source/blender/compositor/intern/COM_OpenCLDevice.cpp b/source/blender/compositor/intern/COM_OpenCLDevice.cpp
index 881c7b8f49a..90711e6583a 100644
--- a/source/blender/compositor/intern/COM_OpenCLDevice.cpp
+++ b/source/blender/compositor/intern/COM_OpenCLDevice.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_OpenCLDevice.h"
diff --git a/source/blender/compositor/intern/COM_OpenCLDevice.h b/source/blender/compositor/intern/COM_OpenCLDevice.h
index f8dd3750d42..4f2c71e23e7 100644
--- a/source/blender/compositor/intern/COM_OpenCLDevice.h
+++ b/source/blender/compositor/intern/COM_OpenCLDevice.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
class OpenCLDevice;
diff --git a/source/blender/compositor/intern/COM_SingleThreadedOperation.cpp b/source/blender/compositor/intern/COM_SingleThreadedOperation.cpp
index 9ab67a40055..bf726e154e0 100644
--- a/source/blender/compositor/intern/COM_SingleThreadedOperation.cpp
+++ b/source/blender/compositor/intern/COM_SingleThreadedOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_SingleThreadedOperation.h"
diff --git a/source/blender/compositor/intern/COM_SingleThreadedOperation.h b/source/blender/compositor/intern/COM_SingleThreadedOperation.h
index b582e47dba7..f5b6565c07e 100644
--- a/source/blender/compositor/intern/COM_SingleThreadedOperation.h
+++ b/source/blender/compositor/intern/COM_SingleThreadedOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_SINGLETHREADEDOPERATION_H__
diff --git a/source/blender/compositor/intern/COM_SocketReader.cpp b/source/blender/compositor/intern/COM_SocketReader.cpp
index e28bd4c7d3d..079e93cf52b 100644
--- a/source/blender/compositor/intern/COM_SocketReader.cpp
+++ b/source/blender/compositor/intern/COM_SocketReader.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_SocketReader.h"
diff --git a/source/blender/compositor/intern/COM_SocketReader.h b/source/blender/compositor/intern/COM_SocketReader.h
index c8a8e1d3252..1e0629ae2b4 100644
--- a/source/blender/compositor/intern/COM_SocketReader.h
+++ b/source/blender/compositor/intern/COM_SocketReader.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_SOCKETREADER_H__
diff --git a/source/blender/compositor/intern/COM_WorkPackage.cpp b/source/blender/compositor/intern/COM_WorkPackage.cpp
index 0d8d71e9b08..1d0f952274a 100644
--- a/source/blender/compositor/intern/COM_WorkPackage.cpp
+++ b/source/blender/compositor/intern/COM_WorkPackage.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_WorkPackage.h"
diff --git a/source/blender/compositor/intern/COM_WorkPackage.h b/source/blender/compositor/intern/COM_WorkPackage.h
index 72677c4e112..9d8efa12ca5 100644
--- a/source/blender/compositor/intern/COM_WorkPackage.h
+++ b/source/blender/compositor/intern/COM_WorkPackage.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
class WorkPackage;
diff --git a/source/blender/compositor/intern/COM_WorkScheduler.cpp b/source/blender/compositor/intern/COM_WorkScheduler.cpp
index 5be76d84e33..75f5ab50014 100644
--- a/source/blender/compositor/intern/COM_WorkScheduler.cpp
+++ b/source/blender/compositor/intern/COM_WorkScheduler.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include <list>
diff --git a/source/blender/compositor/intern/COM_WorkScheduler.h b/source/blender/compositor/intern/COM_WorkScheduler.h
index a6de517983e..6b134c8a4c6 100644
--- a/source/blender/compositor/intern/COM_WorkScheduler.h
+++ b/source/blender/compositor/intern/COM_WorkScheduler.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_WORKSCHEDULER_H__
diff --git a/source/blender/compositor/intern/COM_compositor.cpp b/source/blender/compositor/intern/COM_compositor.cpp
index ae9defa786e..0c92608379d 100644
--- a/source/blender/compositor/intern/COM_compositor.cpp
+++ b/source/blender/compositor/intern/COM_compositor.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
diff --git a/source/blender/compositor/nodes/COM_AlphaOverNode.cpp b/source/blender/compositor/nodes/COM_AlphaOverNode.cpp
index 3481fd1addd..f6d81a6e473 100644
--- a/source/blender/compositor/nodes/COM_AlphaOverNode.cpp
+++ b/source/blender/compositor/nodes/COM_AlphaOverNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_AlphaOverNode.h"
diff --git a/source/blender/compositor/nodes/COM_AlphaOverNode.h b/source/blender/compositor/nodes/COM_AlphaOverNode.h
index 04155a9bad7..86287c42f3f 100644
--- a/source/blender/compositor/nodes/COM_AlphaOverNode.h
+++ b/source/blender/compositor/nodes/COM_AlphaOverNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_ALPHAOVERNODE_H__
diff --git a/source/blender/compositor/nodes/COM_BilateralBlurNode.cpp b/source/blender/compositor/nodes/COM_BilateralBlurNode.cpp
index dba1a009417..75b73ba09a8 100644
--- a/source/blender/compositor/nodes/COM_BilateralBlurNode.cpp
+++ b/source/blender/compositor/nodes/COM_BilateralBlurNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_BilateralBlurNode.h"
diff --git a/source/blender/compositor/nodes/COM_BilateralBlurNode.h b/source/blender/compositor/nodes/COM_BilateralBlurNode.h
index 928aff65f36..dc3732d4362 100644
--- a/source/blender/compositor/nodes/COM_BilateralBlurNode.h
+++ b/source/blender/compositor/nodes/COM_BilateralBlurNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_BILATERALBLURNODE_H__
diff --git a/source/blender/compositor/nodes/COM_BlurNode.cpp b/source/blender/compositor/nodes/COM_BlurNode.cpp
index ed1c15d15a2..b5d509a2db2 100644
--- a/source/blender/compositor/nodes/COM_BlurNode.cpp
+++ b/source/blender/compositor/nodes/COM_BlurNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_BlurNode.h"
diff --git a/source/blender/compositor/nodes/COM_BlurNode.h b/source/blender/compositor/nodes/COM_BlurNode.h
index 703e85c9bcc..800380ec2c1 100644
--- a/source/blender/compositor/nodes/COM_BlurNode.h
+++ b/source/blender/compositor/nodes/COM_BlurNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_BLURNODE_H__
diff --git a/source/blender/compositor/nodes/COM_BokehBlurNode.cpp b/source/blender/compositor/nodes/COM_BokehBlurNode.cpp
index b36e8cc4c53..77e66bb57a5 100644
--- a/source/blender/compositor/nodes/COM_BokehBlurNode.cpp
+++ b/source/blender/compositor/nodes/COM_BokehBlurNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_BokehBlurNode.h"
diff --git a/source/blender/compositor/nodes/COM_BokehBlurNode.h b/source/blender/compositor/nodes/COM_BokehBlurNode.h
index 299fe742dd2..7e82a3209a7 100644
--- a/source/blender/compositor/nodes/COM_BokehBlurNode.h
+++ b/source/blender/compositor/nodes/COM_BokehBlurNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_BOKEHBLURNODE_H__
diff --git a/source/blender/compositor/nodes/COM_BokehImageNode.cpp b/source/blender/compositor/nodes/COM_BokehImageNode.cpp
index 7a388f80def..957cb368cb0 100644
--- a/source/blender/compositor/nodes/COM_BokehImageNode.cpp
+++ b/source/blender/compositor/nodes/COM_BokehImageNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_BokehImageNode.h"
diff --git a/source/blender/compositor/nodes/COM_BokehImageNode.h b/source/blender/compositor/nodes/COM_BokehImageNode.h
index 810602ed5fb..6e677e8e757 100644
--- a/source/blender/compositor/nodes/COM_BokehImageNode.h
+++ b/source/blender/compositor/nodes/COM_BokehImageNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_BOKEHIMAGENODE_H__
diff --git a/source/blender/compositor/nodes/COM_BoxMaskNode.cpp b/source/blender/compositor/nodes/COM_BoxMaskNode.cpp
index f798c95b1b1..0b00e62e77d 100644
--- a/source/blender/compositor/nodes/COM_BoxMaskNode.cpp
+++ b/source/blender/compositor/nodes/COM_BoxMaskNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_BoxMaskNode.h"
diff --git a/source/blender/compositor/nodes/COM_BoxMaskNode.h b/source/blender/compositor/nodes/COM_BoxMaskNode.h
index f7ce0eed464..c4e91222fac 100644
--- a/source/blender/compositor/nodes/COM_BoxMaskNode.h
+++ b/source/blender/compositor/nodes/COM_BoxMaskNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_BOXMASKNODE_H__
diff --git a/source/blender/compositor/nodes/COM_BrightnessNode.cpp b/source/blender/compositor/nodes/COM_BrightnessNode.cpp
index b2422a230cd..fa2fbb85885 100644
--- a/source/blender/compositor/nodes/COM_BrightnessNode.cpp
+++ b/source/blender/compositor/nodes/COM_BrightnessNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_BrightnessNode.h"
diff --git a/source/blender/compositor/nodes/COM_BrightnessNode.h b/source/blender/compositor/nodes/COM_BrightnessNode.h
index 2625334800e..5e8cf7d10b8 100644
--- a/source/blender/compositor/nodes/COM_BrightnessNode.h
+++ b/source/blender/compositor/nodes/COM_BrightnessNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_BRIGHTNESSNODE_H__
diff --git a/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp b/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp
index d1cf7b66fd0..6cf6ff3a739 100644
--- a/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp
+++ b/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#include "COM_ChannelMatteNode.h"
diff --git a/source/blender/compositor/nodes/COM_ChannelMatteNode.h b/source/blender/compositor/nodes/COM_ChannelMatteNode.h
index 84f01c25ef3..f26e7f073ff 100644
--- a/source/blender/compositor/nodes/COM_ChannelMatteNode.h
+++ b/source/blender/compositor/nodes/COM_ChannelMatteNode.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#ifndef __COM_CHANNELMATTENODE_H__
diff --git a/source/blender/compositor/nodes/COM_ChromaMatteNode.cpp b/source/blender/compositor/nodes/COM_ChromaMatteNode.cpp
index d725ad135a5..80d7614f1d2 100644
--- a/source/blender/compositor/nodes/COM_ChromaMatteNode.cpp
+++ b/source/blender/compositor/nodes/COM_ChromaMatteNode.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#include "COM_ChromaMatteNode.h"
diff --git a/source/blender/compositor/nodes/COM_ChromaMatteNode.h b/source/blender/compositor/nodes/COM_ChromaMatteNode.h
index 48488a9be47..4b2c2c93308 100644
--- a/source/blender/compositor/nodes/COM_ChromaMatteNode.h
+++ b/source/blender/compositor/nodes/COM_ChromaMatteNode.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#ifndef __COM_CHROMAMATTENODE_H__
diff --git a/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp b/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp
index 28966beb4f4..ae0f0600533 100644
--- a/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp
+++ b/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ColorBalanceNode.h"
diff --git a/source/blender/compositor/nodes/COM_ColorBalanceNode.h b/source/blender/compositor/nodes/COM_ColorBalanceNode.h
index 120e745473e..b1023e4df7b 100644
--- a/source/blender/compositor/nodes/COM_ColorBalanceNode.h
+++ b/source/blender/compositor/nodes/COM_ColorBalanceNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_COLORBALANCENODE_H__
diff --git a/source/blender/compositor/nodes/COM_ColorCorrectionNode.cpp b/source/blender/compositor/nodes/COM_ColorCorrectionNode.cpp
index 72943f6b53f..d5ecf7094b7 100644
--- a/source/blender/compositor/nodes/COM_ColorCorrectionNode.cpp
+++ b/source/blender/compositor/nodes/COM_ColorCorrectionNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ColorCorrectionNode.h"
diff --git a/source/blender/compositor/nodes/COM_ColorCorrectionNode.h b/source/blender/compositor/nodes/COM_ColorCorrectionNode.h
index 2599983e76c..f55fc2b6c85 100644
--- a/source/blender/compositor/nodes/COM_ColorCorrectionNode.h
+++ b/source/blender/compositor/nodes/COM_ColorCorrectionNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_COLORCORRECTIONNODE_H__
diff --git a/source/blender/compositor/nodes/COM_ColorCurveNode.cpp b/source/blender/compositor/nodes/COM_ColorCurveNode.cpp
index fb8587adabb..96c22be924a 100644
--- a/source/blender/compositor/nodes/COM_ColorCurveNode.cpp
+++ b/source/blender/compositor/nodes/COM_ColorCurveNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ColorCurveNode.h"
diff --git a/source/blender/compositor/nodes/COM_ColorCurveNode.h b/source/blender/compositor/nodes/COM_ColorCurveNode.h
index eb8ff1ae787..71f3b3e2e88 100644
--- a/source/blender/compositor/nodes/COM_ColorCurveNode.h
+++ b/source/blender/compositor/nodes/COM_ColorCurveNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_COLORCURVENODE_H__
diff --git a/source/blender/compositor/nodes/COM_ColorMatteNode.cpp b/source/blender/compositor/nodes/COM_ColorMatteNode.cpp
index 477fdddff8a..85cd58c7831 100644
--- a/source/blender/compositor/nodes/COM_ColorMatteNode.cpp
+++ b/source/blender/compositor/nodes/COM_ColorMatteNode.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#include "COM_ColorMatteNode.h"
diff --git a/source/blender/compositor/nodes/COM_ColorMatteNode.h b/source/blender/compositor/nodes/COM_ColorMatteNode.h
index d2979ab022d..25d8ef92003 100644
--- a/source/blender/compositor/nodes/COM_ColorMatteNode.h
+++ b/source/blender/compositor/nodes/COM_ColorMatteNode.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#ifndef __COM_COLORMATTENODE_H__
diff --git a/source/blender/compositor/nodes/COM_ColorNode.cpp b/source/blender/compositor/nodes/COM_ColorNode.cpp
index c9254b30e8e..2d4e1eb7e3e 100644
--- a/source/blender/compositor/nodes/COM_ColorNode.cpp
+++ b/source/blender/compositor/nodes/COM_ColorNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ColorNode.h"
diff --git a/source/blender/compositor/nodes/COM_ColorNode.h b/source/blender/compositor/nodes/COM_ColorNode.h
index 139f50e3848..f3599f0a209 100644
--- a/source/blender/compositor/nodes/COM_ColorNode.h
+++ b/source/blender/compositor/nodes/COM_ColorNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_COLORNODE_H__
diff --git a/source/blender/compositor/nodes/COM_ColorRampNode.cpp b/source/blender/compositor/nodes/COM_ColorRampNode.cpp
index 3e5128fa0fa..f47f1715724 100644
--- a/source/blender/compositor/nodes/COM_ColorRampNode.cpp
+++ b/source/blender/compositor/nodes/COM_ColorRampNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ColorRampNode.h"
diff --git a/source/blender/compositor/nodes/COM_ColorRampNode.h b/source/blender/compositor/nodes/COM_ColorRampNode.h
index 6457828753a..84248e6eb40 100644
--- a/source/blender/compositor/nodes/COM_ColorRampNode.h
+++ b/source/blender/compositor/nodes/COM_ColorRampNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_COLORRAMPNODE_H__
diff --git a/source/blender/compositor/nodes/COM_ColorSpillNode.cpp b/source/blender/compositor/nodes/COM_ColorSpillNode.cpp
index bef518bb186..c282e14aa86 100644
--- a/source/blender/compositor/nodes/COM_ColorSpillNode.cpp
+++ b/source/blender/compositor/nodes/COM_ColorSpillNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ColorSpillNode.h"
diff --git a/source/blender/compositor/nodes/COM_ColorSpillNode.h b/source/blender/compositor/nodes/COM_ColorSpillNode.h
index a476163224b..ba1b3018919 100644
--- a/source/blender/compositor/nodes/COM_ColorSpillNode.h
+++ b/source/blender/compositor/nodes/COM_ColorSpillNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_COLORSPILLNODE_H__
diff --git a/source/blender/compositor/nodes/COM_ColorToBWNode.cpp b/source/blender/compositor/nodes/COM_ColorToBWNode.cpp
index 1b26354117a..2be951b92f0 100644
--- a/source/blender/compositor/nodes/COM_ColorToBWNode.cpp
+++ b/source/blender/compositor/nodes/COM_ColorToBWNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ColorToBWNode.h"
diff --git a/source/blender/compositor/nodes/COM_ColorToBWNode.h b/source/blender/compositor/nodes/COM_ColorToBWNode.h
index b4e8493d69b..496398382c4 100644
--- a/source/blender/compositor/nodes/COM_ColorToBWNode.h
+++ b/source/blender/compositor/nodes/COM_ColorToBWNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_COLORTOBWNODE_H__
diff --git a/source/blender/compositor/nodes/COM_CombineColorNode.cpp b/source/blender/compositor/nodes/COM_CombineColorNode.cpp
index ad410038c65..ec5ae64ebd7 100644
--- a/source/blender/compositor/nodes/COM_CombineColorNode.cpp
+++ b/source/blender/compositor/nodes/COM_CombineColorNode.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Lukas Toenne
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Lukas Toenne
*/
#include "COM_CombineColorNode.h"
diff --git a/source/blender/compositor/nodes/COM_CombineColorNode.h b/source/blender/compositor/nodes/COM_CombineColorNode.h
index 030224e16f9..8c1196f2868 100644
--- a/source/blender/compositor/nodes/COM_CombineColorNode.h
+++ b/source/blender/compositor/nodes/COM_CombineColorNode.h
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Lukas Toenne
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Lukas Toenne
*/
#ifndef __COM_COMBINECOLORNODE_H__
diff --git a/source/blender/compositor/nodes/COM_CompositorNode.cpp b/source/blender/compositor/nodes/COM_CompositorNode.cpp
index 002f28f3135..f6a3b62b62b 100644
--- a/source/blender/compositor/nodes/COM_CompositorNode.cpp
+++ b/source/blender/compositor/nodes/COM_CompositorNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_CompositorNode.h"
diff --git a/source/blender/compositor/nodes/COM_CompositorNode.h b/source/blender/compositor/nodes/COM_CompositorNode.h
index 54c19973134..22d19b05721 100644
--- a/source/blender/compositor/nodes/COM_CompositorNode.h
+++ b/source/blender/compositor/nodes/COM_CompositorNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_COMPOSITORNODE_H__
diff --git a/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp b/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp
index 75f72669e1e..27bd613a4e9 100644
--- a/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp
+++ b/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#include "COM_ConvertAlphaNode.h"
diff --git a/source/blender/compositor/nodes/COM_ConvertAlphaNode.h b/source/blender/compositor/nodes/COM_ConvertAlphaNode.h
index 3da009aec02..8201a490eac 100644
--- a/source/blender/compositor/nodes/COM_ConvertAlphaNode.h
+++ b/source/blender/compositor/nodes/COM_ConvertAlphaNode.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#ifndef __COM_CONVERTALPHANODE_H__
diff --git a/source/blender/compositor/nodes/COM_CornerPinNode.cpp b/source/blender/compositor/nodes/COM_CornerPinNode.cpp
index b03a3e64f83..27c2e7fd557 100644
--- a/source/blender/compositor/nodes/COM_CornerPinNode.cpp
+++ b/source/blender/compositor/nodes/COM_CornerPinNode.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Lukas Toenne
+ * Lukas Toenne
*/
#include "COM_CornerPinNode.h"
diff --git a/source/blender/compositor/nodes/COM_CornerPinNode.h b/source/blender/compositor/nodes/COM_CornerPinNode.h
index ab89107fe8a..7cf2956a05c 100644
--- a/source/blender/compositor/nodes/COM_CornerPinNode.h
+++ b/source/blender/compositor/nodes/COM_CornerPinNode.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Lukas Toenne
+ * Lukas Toenne
*/
#ifndef __COM_CORNERPINNODE_H__
diff --git a/source/blender/compositor/nodes/COM_CropNode.cpp b/source/blender/compositor/nodes/COM_CropNode.cpp
index 4f80b868f3a..99e77ff0dbe 100644
--- a/source/blender/compositor/nodes/COM_CropNode.cpp
+++ b/source/blender/compositor/nodes/COM_CropNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_CropNode.h"
diff --git a/source/blender/compositor/nodes/COM_CropNode.h b/source/blender/compositor/nodes/COM_CropNode.h
index f30acac9fd2..1247f76f7c7 100644
--- a/source/blender/compositor/nodes/COM_CropNode.h
+++ b/source/blender/compositor/nodes/COM_CropNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_CROPNODE_H__
diff --git a/source/blender/compositor/nodes/COM_DefocusNode.cpp b/source/blender/compositor/nodes/COM_DefocusNode.cpp
index 19bb42327f5..f5ff37d41ba 100644
--- a/source/blender/compositor/nodes/COM_DefocusNode.cpp
+++ b/source/blender/compositor/nodes/COM_DefocusNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_DefocusNode.h"
diff --git a/source/blender/compositor/nodes/COM_DefocusNode.h b/source/blender/compositor/nodes/COM_DefocusNode.h
index d80384ac01f..15843a4ed0b 100644
--- a/source/blender/compositor/nodes/COM_DefocusNode.h
+++ b/source/blender/compositor/nodes/COM_DefocusNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_DEFOCUSNODE_H__
diff --git a/source/blender/compositor/nodes/COM_DifferenceMatteNode.cpp b/source/blender/compositor/nodes/COM_DifferenceMatteNode.cpp
index 3867a543063..68bd7df9dbc 100644
--- a/source/blender/compositor/nodes/COM_DifferenceMatteNode.cpp
+++ b/source/blender/compositor/nodes/COM_DifferenceMatteNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_DifferenceMatteNode.h"
diff --git a/source/blender/compositor/nodes/COM_DifferenceMatteNode.h b/source/blender/compositor/nodes/COM_DifferenceMatteNode.h
index d2235c8148d..79f1efd9632 100644
--- a/source/blender/compositor/nodes/COM_DifferenceMatteNode.h
+++ b/source/blender/compositor/nodes/COM_DifferenceMatteNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_DIFFERENCEMATTENODE_H__
diff --git a/source/blender/compositor/nodes/COM_DilateErodeNode.cpp b/source/blender/compositor/nodes/COM_DilateErodeNode.cpp
index 102dba3b957..50ffd16e58c 100644
--- a/source/blender/compositor/nodes/COM_DilateErodeNode.cpp
+++ b/source/blender/compositor/nodes/COM_DilateErodeNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_DilateErodeNode.h"
diff --git a/source/blender/compositor/nodes/COM_DilateErodeNode.h b/source/blender/compositor/nodes/COM_DilateErodeNode.h
index a3d26ada95b..c2ebc31eab9 100644
--- a/source/blender/compositor/nodes/COM_DilateErodeNode.h
+++ b/source/blender/compositor/nodes/COM_DilateErodeNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_DILATEERODENODE_H__
@@ -30,7 +30,7 @@
* \ingroup Node
*/
class DilateErodeNode : public Node {
- NodeBlurData m_alpha_blur; /* only used for blurring alpha, since the dilate/erode node doesnt have this */
+ NodeBlurData m_alpha_blur; /* only used for blurring alpha, since the dilate/erode node doesn't have this */
public:
DilateErodeNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
diff --git a/source/blender/compositor/nodes/COM_DirectionalBlurNode.cpp b/source/blender/compositor/nodes/COM_DirectionalBlurNode.cpp
index 9f846c67b1d..c1c17bdeec6 100644
--- a/source/blender/compositor/nodes/COM_DirectionalBlurNode.cpp
+++ b/source/blender/compositor/nodes/COM_DirectionalBlurNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_DirectionalBlurNode.h"
diff --git a/source/blender/compositor/nodes/COM_DirectionalBlurNode.h b/source/blender/compositor/nodes/COM_DirectionalBlurNode.h
index 26e5573e586..cecf8dc880f 100644
--- a/source/blender/compositor/nodes/COM_DirectionalBlurNode.h
+++ b/source/blender/compositor/nodes/COM_DirectionalBlurNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_DIRECTIONALBLURNODE_H__
diff --git a/source/blender/compositor/nodes/COM_DisplaceNode.cpp b/source/blender/compositor/nodes/COM_DisplaceNode.cpp
index 34b3ec6d1a1..4d8b88d4075 100644
--- a/source/blender/compositor/nodes/COM_DisplaceNode.cpp
+++ b/source/blender/compositor/nodes/COM_DisplaceNode.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#include "COM_DisplaceNode.h"
diff --git a/source/blender/compositor/nodes/COM_DisplaceNode.h b/source/blender/compositor/nodes/COM_DisplaceNode.h
index 58a77527f5b..305959c9bbc 100644
--- a/source/blender/compositor/nodes/COM_DisplaceNode.h
+++ b/source/blender/compositor/nodes/COM_DisplaceNode.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#ifndef __COM_DISPLACENODE_H__
diff --git a/source/blender/compositor/nodes/COM_DistanceMatteNode.cpp b/source/blender/compositor/nodes/COM_DistanceMatteNode.cpp
index fc05e0564bc..306bddcf352 100644
--- a/source/blender/compositor/nodes/COM_DistanceMatteNode.cpp
+++ b/source/blender/compositor/nodes/COM_DistanceMatteNode.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#include "COM_DistanceMatteNode.h"
diff --git a/source/blender/compositor/nodes/COM_DistanceMatteNode.h b/source/blender/compositor/nodes/COM_DistanceMatteNode.h
index e5976455371..34e7312d519 100644
--- a/source/blender/compositor/nodes/COM_DistanceMatteNode.h
+++ b/source/blender/compositor/nodes/COM_DistanceMatteNode.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#ifndef __COM_DISTANCEMATTENODE_H__
diff --git a/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.cpp b/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.cpp
index 1a10b912b23..3dc090df28c 100644
--- a/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.cpp
+++ b/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_DoubleEdgeMaskNode.h"
diff --git a/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.h b/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.h
index c01772ea533..156483f9b87 100644
--- a/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.h
+++ b/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_DOUBLEEDGEMASKNODE_H__
diff --git a/source/blender/compositor/nodes/COM_EllipseMaskNode.cpp b/source/blender/compositor/nodes/COM_EllipseMaskNode.cpp
index 60dc377518b..11105f06770 100644
--- a/source/blender/compositor/nodes/COM_EllipseMaskNode.cpp
+++ b/source/blender/compositor/nodes/COM_EllipseMaskNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_EllipseMaskNode.h"
diff --git a/source/blender/compositor/nodes/COM_EllipseMaskNode.h b/source/blender/compositor/nodes/COM_EllipseMaskNode.h
index 64f0a319195..10d4ba2895a 100644
--- a/source/blender/compositor/nodes/COM_EllipseMaskNode.h
+++ b/source/blender/compositor/nodes/COM_EllipseMaskNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_ELLIPSEMASKNODE_H__
diff --git a/source/blender/compositor/nodes/COM_FilterNode.cpp b/source/blender/compositor/nodes/COM_FilterNode.cpp
index ad25894929e..cc201b83a82 100644
--- a/source/blender/compositor/nodes/COM_FilterNode.cpp
+++ b/source/blender/compositor/nodes/COM_FilterNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_FilterNode.h"
diff --git a/source/blender/compositor/nodes/COM_FilterNode.h b/source/blender/compositor/nodes/COM_FilterNode.h
index 6b2e0281627..90148211dd3 100644
--- a/source/blender/compositor/nodes/COM_FilterNode.h
+++ b/source/blender/compositor/nodes/COM_FilterNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_FILTERNODE_H__
diff --git a/source/blender/compositor/nodes/COM_FlipNode.cpp b/source/blender/compositor/nodes/COM_FlipNode.cpp
index 98703a22012..b895ab57acb 100644
--- a/source/blender/compositor/nodes/COM_FlipNode.cpp
+++ b/source/blender/compositor/nodes/COM_FlipNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_FlipNode.h"
diff --git a/source/blender/compositor/nodes/COM_FlipNode.h b/source/blender/compositor/nodes/COM_FlipNode.h
index f13abe3df53..316deb8539d 100644
--- a/source/blender/compositor/nodes/COM_FlipNode.h
+++ b/source/blender/compositor/nodes/COM_FlipNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_FLIPNODE_H__
diff --git a/source/blender/compositor/nodes/COM_GammaNode.cpp b/source/blender/compositor/nodes/COM_GammaNode.cpp
index fdee02b2d02..f05754a8422 100644
--- a/source/blender/compositor/nodes/COM_GammaNode.cpp
+++ b/source/blender/compositor/nodes/COM_GammaNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_GammaNode.h"
diff --git a/source/blender/compositor/nodes/COM_GammaNode.h b/source/blender/compositor/nodes/COM_GammaNode.h
index 97bdeffcaa3..57a5ef174be 100644
--- a/source/blender/compositor/nodes/COM_GammaNode.h
+++ b/source/blender/compositor/nodes/COM_GammaNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_GAMMANODE_H__
diff --git a/source/blender/compositor/nodes/COM_GlareNode.cpp b/source/blender/compositor/nodes/COM_GlareNode.cpp
index 2e012b097b3..9f92478fe39 100644
--- a/source/blender/compositor/nodes/COM_GlareNode.cpp
+++ b/source/blender/compositor/nodes/COM_GlareNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_GlareNode.h"
diff --git a/source/blender/compositor/nodes/COM_GlareNode.h b/source/blender/compositor/nodes/COM_GlareNode.h
index 723e13b7836..82ee373cb95 100644
--- a/source/blender/compositor/nodes/COM_GlareNode.h
+++ b/source/blender/compositor/nodes/COM_GlareNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_GLARENODE_H__
diff --git a/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp b/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp
index 3542bc7f36e..08ccb2b47d7 100644
--- a/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp
+++ b/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_HueSaturationValueCorrectNode.h"
diff --git a/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.h b/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.h
index d5ff55b6d1f..3c94b8f7dc3 100644
--- a/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.h
+++ b/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_HUESATURATIONVALUECORRECTNODE_H__
diff --git a/source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp b/source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp
index 7da8c5b3d3d..a1331f61eb3 100644
--- a/source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp
+++ b/source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_HueSaturationValueNode.h"
diff --git a/source/blender/compositor/nodes/COM_HueSaturationValueNode.h b/source/blender/compositor/nodes/COM_HueSaturationValueNode.h
index 2d1a3346cc3..78dcc6a8554 100644
--- a/source/blender/compositor/nodes/COM_HueSaturationValueNode.h
+++ b/source/blender/compositor/nodes/COM_HueSaturationValueNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_HUESATURATIONVALUENODE_H__
diff --git a/source/blender/compositor/nodes/COM_IDMaskNode.cpp b/source/blender/compositor/nodes/COM_IDMaskNode.cpp
index ab5931ea566..6a50346b1b3 100644
--- a/source/blender/compositor/nodes/COM_IDMaskNode.cpp
+++ b/source/blender/compositor/nodes/COM_IDMaskNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_IDMaskNode.h"
diff --git a/source/blender/compositor/nodes/COM_IDMaskNode.h b/source/blender/compositor/nodes/COM_IDMaskNode.h
index 7fbcbce204f..3849d5155fa 100644
--- a/source/blender/compositor/nodes/COM_IDMaskNode.h
+++ b/source/blender/compositor/nodes/COM_IDMaskNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_IDMASKNODE_H__
diff --git a/source/blender/compositor/nodes/COM_ImageNode.cpp b/source/blender/compositor/nodes/COM_ImageNode.cpp
index b82de5962e9..e3fb50828e8 100644
--- a/source/blender/compositor/nodes/COM_ImageNode.cpp
+++ b/source/blender/compositor/nodes/COM_ImageNode.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Lukas Tönne
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Lukas Tönne
*/
#include "COM_ImageNode.h"
diff --git a/source/blender/compositor/nodes/COM_ImageNode.h b/source/blender/compositor/nodes/COM_ImageNode.h
index 11857ed98bf..9e739ce410e 100644
--- a/source/blender/compositor/nodes/COM_ImageNode.h
+++ b/source/blender/compositor/nodes/COM_ImageNode.h
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Lukas Tönne
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Lukas Tönne
*/
#include "COM_defines.h"
diff --git a/source/blender/compositor/nodes/COM_InpaintNode.cpp b/source/blender/compositor/nodes/COM_InpaintNode.cpp
index 41cc65e2fee..cf1129781a8 100644
--- a/source/blender/compositor/nodes/COM_InpaintNode.cpp
+++ b/source/blender/compositor/nodes/COM_InpaintNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor: Peter Schlaile
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_InpaintNode.h"
diff --git a/source/blender/compositor/nodes/COM_InpaintNode.h b/source/blender/compositor/nodes/COM_InpaintNode.h
index 2a57d4f4b50..8f2b9e64040 100644
--- a/source/blender/compositor/nodes/COM_InpaintNode.h
+++ b/source/blender/compositor/nodes/COM_InpaintNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor: Peter Schlaile
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_INPAINTNODE_H__
diff --git a/source/blender/compositor/nodes/COM_InvertNode.cpp b/source/blender/compositor/nodes/COM_InvertNode.cpp
index c83db3fe78f..56a69c7e300 100644
--- a/source/blender/compositor/nodes/COM_InvertNode.cpp
+++ b/source/blender/compositor/nodes/COM_InvertNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_InvertNode.h"
diff --git a/source/blender/compositor/nodes/COM_InvertNode.h b/source/blender/compositor/nodes/COM_InvertNode.h
index 27719dd39db..9b09e71847e 100644
--- a/source/blender/compositor/nodes/COM_InvertNode.h
+++ b/source/blender/compositor/nodes/COM_InvertNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_INVERTNODE_H__
diff --git a/source/blender/compositor/nodes/COM_KeyingNode.cpp b/source/blender/compositor/nodes/COM_KeyingNode.cpp
index 261bdb93adb..6ab7a763dd5 100644
--- a/source/blender/compositor/nodes/COM_KeyingNode.cpp
+++ b/source/blender/compositor/nodes/COM_KeyingNode.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
#include "COM_KeyingNode.h"
diff --git a/source/blender/compositor/nodes/COM_KeyingNode.h b/source/blender/compositor/nodes/COM_KeyingNode.h
index d712eeb0a8b..5fad48c337e 100644
--- a/source/blender/compositor/nodes/COM_KeyingNode.h
+++ b/source/blender/compositor/nodes/COM_KeyingNode.h
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_KeyingScreenNode.cpp b/source/blender/compositor/nodes/COM_KeyingScreenNode.cpp
index df9668883e8..db0d6ebd18a 100644
--- a/source/blender/compositor/nodes/COM_KeyingScreenNode.cpp
+++ b/source/blender/compositor/nodes/COM_KeyingScreenNode.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
#include "COM_KeyingScreenNode.h"
diff --git a/source/blender/compositor/nodes/COM_KeyingScreenNode.h b/source/blender/compositor/nodes/COM_KeyingScreenNode.h
index 29619a67097..744c80df01e 100644
--- a/source/blender/compositor/nodes/COM_KeyingScreenNode.h
+++ b/source/blender/compositor/nodes/COM_KeyingScreenNode.h
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_LensDistortionNode.cpp b/source/blender/compositor/nodes/COM_LensDistortionNode.cpp
index 2bad80839e1..b854ebd5c01 100644
--- a/source/blender/compositor/nodes/COM_LensDistortionNode.cpp
+++ b/source/blender/compositor/nodes/COM_LensDistortionNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_LensDistortionNode.h"
diff --git a/source/blender/compositor/nodes/COM_LensDistortionNode.h b/source/blender/compositor/nodes/COM_LensDistortionNode.h
index 40752d3fc9e..f5a10d6ad59 100644
--- a/source/blender/compositor/nodes/COM_LensDistortionNode.h
+++ b/source/blender/compositor/nodes/COM_LensDistortionNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_LENSDISTORTIONNODE_H__
diff --git a/source/blender/compositor/nodes/COM_LuminanceMatteNode.cpp b/source/blender/compositor/nodes/COM_LuminanceMatteNode.cpp
index 12f3b1bc410..7bd264fe3f4 100644
--- a/source/blender/compositor/nodes/COM_LuminanceMatteNode.cpp
+++ b/source/blender/compositor/nodes/COM_LuminanceMatteNode.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#include "COM_LuminanceMatteNode.h"
diff --git a/source/blender/compositor/nodes/COM_LuminanceMatteNode.h b/source/blender/compositor/nodes/COM_LuminanceMatteNode.h
index cc57f4a39f1..feac63c7957 100644
--- a/source/blender/compositor/nodes/COM_LuminanceMatteNode.h
+++ b/source/blender/compositor/nodes/COM_LuminanceMatteNode.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#ifndef __COM_LUMINANCEMATTENODE_H__
diff --git a/source/blender/compositor/nodes/COM_MapRangeNode.cpp b/source/blender/compositor/nodes/COM_MapRangeNode.cpp
index 6590cf04306..72d36b922f7 100644
--- a/source/blender/compositor/nodes/COM_MapRangeNode.cpp
+++ b/source/blender/compositor/nodes/COM_MapRangeNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
- * Daniel Salazar
+ * Dalai Felinto
+ * Daniel Salazar
*/
#include "COM_MapRangeNode.h"
diff --git a/source/blender/compositor/nodes/COM_MapRangeNode.h b/source/blender/compositor/nodes/COM_MapRangeNode.h
index 74bb1e006b3..9248da8c65c 100644
--- a/source/blender/compositor/nodes/COM_MapRangeNode.h
+++ b/source/blender/compositor/nodes/COM_MapRangeNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
- * Daniel Salazar
+ * Dalai Felinto
+ * Daniel Salazar
*/
#ifndef __COM_MAPRANGENODE_H__
diff --git a/source/blender/compositor/nodes/COM_MapUVNode.cpp b/source/blender/compositor/nodes/COM_MapUVNode.cpp
index dc477ad9da0..a5f7165db44 100644
--- a/source/blender/compositor/nodes/COM_MapUVNode.cpp
+++ b/source/blender/compositor/nodes/COM_MapUVNode.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#include "COM_MapUVNode.h"
diff --git a/source/blender/compositor/nodes/COM_MapUVNode.h b/source/blender/compositor/nodes/COM_MapUVNode.h
index 04036df6a24..b53f4658e2e 100644
--- a/source/blender/compositor/nodes/COM_MapUVNode.h
+++ b/source/blender/compositor/nodes/COM_MapUVNode.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#ifndef __COM_MAPUVNODE_H__
diff --git a/source/blender/compositor/nodes/COM_MapValueNode.cpp b/source/blender/compositor/nodes/COM_MapValueNode.cpp
index 6276548c7a7..4c8991b3c42 100644
--- a/source/blender/compositor/nodes/COM_MapValueNode.cpp
+++ b/source/blender/compositor/nodes/COM_MapValueNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_MapValueNode.h"
diff --git a/source/blender/compositor/nodes/COM_MapValueNode.h b/source/blender/compositor/nodes/COM_MapValueNode.h
index 230e8134f24..6c865135cc2 100644
--- a/source/blender/compositor/nodes/COM_MapValueNode.h
+++ b/source/blender/compositor/nodes/COM_MapValueNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_MAPVALUENODE_H__
diff --git a/source/blender/compositor/nodes/COM_MaskNode.cpp b/source/blender/compositor/nodes/COM_MaskNode.cpp
index 7e29674f9aa..45888fea3a8 100644
--- a/source/blender/compositor/nodes/COM_MaskNode.cpp
+++ b/source/blender/compositor/nodes/COM_MaskNode.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
#include "COM_MaskNode.h"
diff --git a/source/blender/compositor/nodes/COM_MaskNode.h b/source/blender/compositor/nodes/COM_MaskNode.h
index 55c47c7a7d2..254fd95b87c 100644
--- a/source/blender/compositor/nodes/COM_MaskNode.h
+++ b/source/blender/compositor/nodes/COM_MaskNode.h
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
#ifndef __COM_MASKNODE_H__
diff --git a/source/blender/compositor/nodes/COM_MathNode.cpp b/source/blender/compositor/nodes/COM_MathNode.cpp
index 25c617a3487..0ab6dcad025 100644
--- a/source/blender/compositor/nodes/COM_MathNode.cpp
+++ b/source/blender/compositor/nodes/COM_MathNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_MathNode.h"
diff --git a/source/blender/compositor/nodes/COM_MathNode.h b/source/blender/compositor/nodes/COM_MathNode.h
index 86bb1a3f683..27e9e649310 100644
--- a/source/blender/compositor/nodes/COM_MathNode.h
+++ b/source/blender/compositor/nodes/COM_MathNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_MATHNODE_H__
diff --git a/source/blender/compositor/nodes/COM_MixNode.cpp b/source/blender/compositor/nodes/COM_MixNode.cpp
index e0af0106513..2f2569c5832 100644
--- a/source/blender/compositor/nodes/COM_MixNode.cpp
+++ b/source/blender/compositor/nodes/COM_MixNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_MixNode.h"
diff --git a/source/blender/compositor/nodes/COM_MixNode.h b/source/blender/compositor/nodes/COM_MixNode.h
index d9edc9e570a..317202cc5af 100644
--- a/source/blender/compositor/nodes/COM_MixNode.h
+++ b/source/blender/compositor/nodes/COM_MixNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_MIXNODE_H__
diff --git a/source/blender/compositor/nodes/COM_MovieClipNode.cpp b/source/blender/compositor/nodes/COM_MovieClipNode.cpp
index 18e6f811fff..60cecfc5881 100644
--- a/source/blender/compositor/nodes/COM_MovieClipNode.cpp
+++ b/source/blender/compositor/nodes/COM_MovieClipNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_MovieClipNode.h"
diff --git a/source/blender/compositor/nodes/COM_MovieClipNode.h b/source/blender/compositor/nodes/COM_MovieClipNode.h
index addee1a4ff8..604adc99824 100644
--- a/source/blender/compositor/nodes/COM_MovieClipNode.h
+++ b/source/blender/compositor/nodes/COM_MovieClipNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_MOVIECLIPNODE_H__
diff --git a/source/blender/compositor/nodes/COM_MovieDistortionNode.cpp b/source/blender/compositor/nodes/COM_MovieDistortionNode.cpp
index e3009e068ab..d862c27456f 100644
--- a/source/blender/compositor/nodes/COM_MovieDistortionNode.cpp
+++ b/source/blender/compositor/nodes/COM_MovieDistortionNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_MovieDistortionNode.h"
diff --git a/source/blender/compositor/nodes/COM_MovieDistortionNode.h b/source/blender/compositor/nodes/COM_MovieDistortionNode.h
index 59a8980beda..bd5526106fd 100644
--- a/source/blender/compositor/nodes/COM_MovieDistortionNode.h
+++ b/source/blender/compositor/nodes/COM_MovieDistortionNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_MOVIEDISTORTIONNODE_H__
diff --git a/source/blender/compositor/nodes/COM_NormalNode.cpp b/source/blender/compositor/nodes/COM_NormalNode.cpp
index 64231d116fa..b18e27e1a60 100644
--- a/source/blender/compositor/nodes/COM_NormalNode.cpp
+++ b/source/blender/compositor/nodes/COM_NormalNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_NormalNode.h"
diff --git a/source/blender/compositor/nodes/COM_NormalNode.h b/source/blender/compositor/nodes/COM_NormalNode.h
index 74422007e0e..a13b493328f 100644
--- a/source/blender/compositor/nodes/COM_NormalNode.h
+++ b/source/blender/compositor/nodes/COM_NormalNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_NORMALNODE_H__
diff --git a/source/blender/compositor/nodes/COM_NormalizeNode.cpp b/source/blender/compositor/nodes/COM_NormalizeNode.cpp
index a13fcd2a301..94891283828 100644
--- a/source/blender/compositor/nodes/COM_NormalizeNode.cpp
+++ b/source/blender/compositor/nodes/COM_NormalizeNode.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#include "COM_NormalizeNode.h"
diff --git a/source/blender/compositor/nodes/COM_NormalizeNode.h b/source/blender/compositor/nodes/COM_NormalizeNode.h
index 540fbfcfb7b..5148e21fd56 100644
--- a/source/blender/compositor/nodes/COM_NormalizeNode.h
+++ b/source/blender/compositor/nodes/COM_NormalizeNode.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#ifndef __COM_NORMALIZENODE_H__
diff --git a/source/blender/compositor/nodes/COM_OutputFileNode.cpp b/source/blender/compositor/nodes/COM_OutputFileNode.cpp
index 5a7e5e2c623..d0c553b7568 100644
--- a/source/blender/compositor/nodes/COM_OutputFileNode.cpp
+++ b/source/blender/compositor/nodes/COM_OutputFileNode.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Lukas Tönne
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Lukas Tönne
*/
#include "COM_OutputFileNode.h"
diff --git a/source/blender/compositor/nodes/COM_OutputFileNode.h b/source/blender/compositor/nodes/COM_OutputFileNode.h
index 562e8ca5b9f..2d259aee567 100644
--- a/source/blender/compositor/nodes/COM_OutputFileNode.h
+++ b/source/blender/compositor/nodes/COM_OutputFileNode.h
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Lukas Tönne
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Lukas Tönne
*/
#ifndef __COM_OUTPUTFILENODE_H__
diff --git a/source/blender/compositor/nodes/COM_PixelateNode.cpp b/source/blender/compositor/nodes/COM_PixelateNode.cpp
index 2b7ab0ea4e8..87b18c98cea 100644
--- a/source/blender/compositor/nodes/COM_PixelateNode.cpp
+++ b/source/blender/compositor/nodes/COM_PixelateNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_PixelateNode.h"
diff --git a/source/blender/compositor/nodes/COM_PixelateNode.h b/source/blender/compositor/nodes/COM_PixelateNode.h
index c31a09a0cbe..c0f52351cef 100644
--- a/source/blender/compositor/nodes/COM_PixelateNode.h
+++ b/source/blender/compositor/nodes/COM_PixelateNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_PIXELATENODE_H__
diff --git a/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.cpp b/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.cpp
index d8e4655b84e..7e0adccb11c 100644
--- a/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.cpp
+++ b/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
#include "COM_PlaneTrackDeformNode.h"
diff --git a/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h b/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h
index 4e3445b1581..7af9f313bd1 100644
--- a/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h
+++ b/source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Sergey Sharybin
+ * Sergey Sharybin
*/
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_RenderLayersNode.cpp b/source/blender/compositor/nodes/COM_RenderLayersNode.cpp
index 2286db81860..6d3dd22f1bd 100644
--- a/source/blender/compositor/nodes/COM_RenderLayersNode.cpp
+++ b/source/blender/compositor/nodes/COM_RenderLayersNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_RenderLayersNode.h"
@@ -78,8 +78,8 @@ void RenderLayersNode::testRenderLink(NodeConverter &converter,
const int num_outputs = this->getNumberOfOutputSockets();
for (int i = 0; i < num_outputs; i++) {
NodeOutput *output = this->getOutputSocket(i);
- NodeImageLayer *storage = (NodeImageLayer*) output->getbNodeSocket()->storage;
- RenderPass *rpass = (RenderPass*) BLI_findstring(
+ NodeImageLayer *storage = (NodeImageLayer *)output->getbNodeSocket()->storage;
+ RenderPass *rpass = (RenderPass *)BLI_findstring(
&rl->passes,
storage->pass_name,
offsetof(RenderPass, name));
diff --git a/source/blender/compositor/nodes/COM_RenderLayersNode.h b/source/blender/compositor/nodes/COM_RenderLayersNode.h
index 0ecf4c60c43..aabb9d00633 100644
--- a/source/blender/compositor/nodes/COM_RenderLayersNode.h
+++ b/source/blender/compositor/nodes/COM_RenderLayersNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_RotateNode.cpp b/source/blender/compositor/nodes/COM_RotateNode.cpp
index fe85d5db255..a93ce47544a 100644
--- a/source/blender/compositor/nodes/COM_RotateNode.cpp
+++ b/source/blender/compositor/nodes/COM_RotateNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_RotateNode.h"
diff --git a/source/blender/compositor/nodes/COM_RotateNode.h b/source/blender/compositor/nodes/COM_RotateNode.h
index 77d3879e530..82125d0e461 100644
--- a/source/blender/compositor/nodes/COM_RotateNode.h
+++ b/source/blender/compositor/nodes/COM_RotateNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_ROTATENODE_H__
diff --git a/source/blender/compositor/nodes/COM_ScaleNode.cpp b/source/blender/compositor/nodes/COM_ScaleNode.cpp
index dc512684ce6..f65cfd194b8 100644
--- a/source/blender/compositor/nodes/COM_ScaleNode.cpp
+++ b/source/blender/compositor/nodes/COM_ScaleNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ScaleNode.h"
diff --git a/source/blender/compositor/nodes/COM_ScaleNode.h b/source/blender/compositor/nodes/COM_ScaleNode.h
index 2ae07e5ab9b..eec86bce05d 100644
--- a/source/blender/compositor/nodes/COM_ScaleNode.h
+++ b/source/blender/compositor/nodes/COM_ScaleNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_SCALENODE_H__
diff --git a/source/blender/compositor/nodes/COM_SeparateColorNode.cpp b/source/blender/compositor/nodes/COM_SeparateColorNode.cpp
index b3f9ab46f35..447e256990a 100644
--- a/source/blender/compositor/nodes/COM_SeparateColorNode.cpp
+++ b/source/blender/compositor/nodes/COM_SeparateColorNode.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Lukas Toenne
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Lukas Toenne
*/
#include "COM_SeparateColorNode.h"
diff --git a/source/blender/compositor/nodes/COM_SeparateColorNode.h b/source/blender/compositor/nodes/COM_SeparateColorNode.h
index a1ec23b71c7..4373ee9919d 100644
--- a/source/blender/compositor/nodes/COM_SeparateColorNode.h
+++ b/source/blender/compositor/nodes/COM_SeparateColorNode.h
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Lukas Toenne
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Lukas Toenne
*/
#ifndef __COM_SEPARATECOLORNODE_H__
diff --git a/source/blender/compositor/nodes/COM_SetAlphaNode.cpp b/source/blender/compositor/nodes/COM_SetAlphaNode.cpp
index b5d5bf9d9d9..68d0aa7f6d5 100644
--- a/source/blender/compositor/nodes/COM_SetAlphaNode.cpp
+++ b/source/blender/compositor/nodes/COM_SetAlphaNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_SetAlphaNode.h"
diff --git a/source/blender/compositor/nodes/COM_SetAlphaNode.h b/source/blender/compositor/nodes/COM_SetAlphaNode.h
index f5482c91f13..224b34a81ce 100644
--- a/source/blender/compositor/nodes/COM_SetAlphaNode.h
+++ b/source/blender/compositor/nodes/COM_SetAlphaNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_SETALPHANODE_H__
diff --git a/source/blender/compositor/nodes/COM_SocketProxyNode.cpp b/source/blender/compositor/nodes/COM_SocketProxyNode.cpp
index 230c27dd9a0..0d02f7f0027 100644
--- a/source/blender/compositor/nodes/COM_SocketProxyNode.cpp
+++ b/source/blender/compositor/nodes/COM_SocketProxyNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_SocketProxyNode.h"
diff --git a/source/blender/compositor/nodes/COM_SocketProxyNode.h b/source/blender/compositor/nodes/COM_SocketProxyNode.h
index 2cf4c4afac5..19d025c8144 100644
--- a/source/blender/compositor/nodes/COM_SocketProxyNode.h
+++ b/source/blender/compositor/nodes/COM_SocketProxyNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_SOCKETPROXYNODE_H__
diff --git a/source/blender/compositor/nodes/COM_SplitViewerNode.cpp b/source/blender/compositor/nodes/COM_SplitViewerNode.cpp
index 725ef292d86..10f6384d06a 100644
--- a/source/blender/compositor/nodes/COM_SplitViewerNode.cpp
+++ b/source/blender/compositor/nodes/COM_SplitViewerNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_SplitViewerNode.h"
diff --git a/source/blender/compositor/nodes/COM_SplitViewerNode.h b/source/blender/compositor/nodes/COM_SplitViewerNode.h
index 695313e5d9c..ad29a222069 100644
--- a/source/blender/compositor/nodes/COM_SplitViewerNode.h
+++ b/source/blender/compositor/nodes/COM_SplitViewerNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_SPLITVIEWERNODE_H__
diff --git a/source/blender/compositor/nodes/COM_Stabilize2dNode.cpp b/source/blender/compositor/nodes/COM_Stabilize2dNode.cpp
index 38b8a466369..124b9492ecd 100644
--- a/source/blender/compositor/nodes/COM_Stabilize2dNode.cpp
+++ b/source/blender/compositor/nodes/COM_Stabilize2dNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_Stabilize2dNode.h"
diff --git a/source/blender/compositor/nodes/COM_Stabilize2dNode.h b/source/blender/compositor/nodes/COM_Stabilize2dNode.h
index 4c45b2f6db0..8f808ccd94e 100644
--- a/source/blender/compositor/nodes/COM_Stabilize2dNode.h
+++ b/source/blender/compositor/nodes/COM_Stabilize2dNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_STABILIZE2DNODE_H__
diff --git a/source/blender/compositor/nodes/COM_SunBeamsNode.cpp b/source/blender/compositor/nodes/COM_SunBeamsNode.cpp
index 7cf3c90c786..a86f27c6027 100644
--- a/source/blender/compositor/nodes/COM_SunBeamsNode.cpp
+++ b/source/blender/compositor/nodes/COM_SunBeamsNode.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Lukas Toenne
+ * Lukas Toenne
*/
#include "COM_SunBeamsNode.h"
diff --git a/source/blender/compositor/nodes/COM_SunBeamsNode.h b/source/blender/compositor/nodes/COM_SunBeamsNode.h
index bb8c2e5defc..9a52919f892 100644
--- a/source/blender/compositor/nodes/COM_SunBeamsNode.h
+++ b/source/blender/compositor/nodes/COM_SunBeamsNode.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Lukas Toenne
+ * Lukas Toenne
*/
#ifndef __COM_SUNBEAMSNODE_H__
diff --git a/source/blender/compositor/nodes/COM_SwitchNode.cpp b/source/blender/compositor/nodes/COM_SwitchNode.cpp
index 7e1eaabc886..2b58a8a5de8 100644
--- a/source/blender/compositor/nodes/COM_SwitchNode.cpp
+++ b/source/blender/compositor/nodes/COM_SwitchNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_SwitchNode.h"
diff --git a/source/blender/compositor/nodes/COM_SwitchNode.h b/source/blender/compositor/nodes/COM_SwitchNode.h
index 96abef60f21..220f3a36ed6 100644
--- a/source/blender/compositor/nodes/COM_SwitchNode.h
+++ b/source/blender/compositor/nodes/COM_SwitchNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_SWITCHNODE_H__
diff --git a/source/blender/compositor/nodes/COM_SwitchViewNode.cpp b/source/blender/compositor/nodes/COM_SwitchViewNode.cpp
index 5a23b8b4d9e..602df0fb35c 100644
--- a/source/blender/compositor/nodes/COM_SwitchViewNode.cpp
+++ b/source/blender/compositor/nodes/COM_SwitchViewNode.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#include "COM_SwitchViewNode.h"
diff --git a/source/blender/compositor/nodes/COM_SwitchViewNode.h b/source/blender/compositor/nodes/COM_SwitchViewNode.h
index 9a89103a11e..affae8ea797 100644
--- a/source/blender/compositor/nodes/COM_SwitchViewNode.h
+++ b/source/blender/compositor/nodes/COM_SwitchViewNode.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#ifndef __COM_SWITCHVIEWNODE_H__
diff --git a/source/blender/compositor/nodes/COM_TextureNode.cpp b/source/blender/compositor/nodes/COM_TextureNode.cpp
index 47b32f6e04d..41241fde76b 100644
--- a/source/blender/compositor/nodes/COM_TextureNode.cpp
+++ b/source/blender/compositor/nodes/COM_TextureNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_TextureNode.h"
diff --git a/source/blender/compositor/nodes/COM_TextureNode.h b/source/blender/compositor/nodes/COM_TextureNode.h
index 206b1ab102b..7fbb9072ae8 100644
--- a/source/blender/compositor/nodes/COM_TextureNode.h
+++ b/source/blender/compositor/nodes/COM_TextureNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_TimeNode.cpp b/source/blender/compositor/nodes/COM_TimeNode.cpp
index 883ff72229d..b4d9668e6ce 100644
--- a/source/blender/compositor/nodes/COM_TimeNode.cpp
+++ b/source/blender/compositor/nodes/COM_TimeNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_TimeNode.h"
diff --git a/source/blender/compositor/nodes/COM_TimeNode.h b/source/blender/compositor/nodes/COM_TimeNode.h
index 7d5eef7434e..f06d546e6c1 100644
--- a/source/blender/compositor/nodes/COM_TimeNode.h
+++ b/source/blender/compositor/nodes/COM_TimeNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_TIMENODE_H__
diff --git a/source/blender/compositor/nodes/COM_TonemapNode.cpp b/source/blender/compositor/nodes/COM_TonemapNode.cpp
index a01be6acb7b..981ea98f95b 100644
--- a/source/blender/compositor/nodes/COM_TonemapNode.cpp
+++ b/source/blender/compositor/nodes/COM_TonemapNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_TonemapNode.h"
diff --git a/source/blender/compositor/nodes/COM_TonemapNode.h b/source/blender/compositor/nodes/COM_TonemapNode.h
index 309cd56e580..d765303ed13 100644
--- a/source/blender/compositor/nodes/COM_TonemapNode.h
+++ b/source/blender/compositor/nodes/COM_TonemapNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_TONEMAPNODE_H__
diff --git a/source/blender/compositor/nodes/COM_TrackPositionNode.cpp b/source/blender/compositor/nodes/COM_TrackPositionNode.cpp
index cddb3557498..45380c56411 100644
--- a/source/blender/compositor/nodes/COM_TrackPositionNode.cpp
+++ b/source/blender/compositor/nodes/COM_TrackPositionNode.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
#include "COM_TrackPositionNode.h"
diff --git a/source/blender/compositor/nodes/COM_TrackPositionNode.h b/source/blender/compositor/nodes/COM_TrackPositionNode.h
index 04c3814605a..aa0c510f65b 100644
--- a/source/blender/compositor/nodes/COM_TrackPositionNode.h
+++ b/source/blender/compositor/nodes/COM_TrackPositionNode.h
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_TransformNode.cpp b/source/blender/compositor/nodes/COM_TransformNode.cpp
index 288f394a10f..1c034d16744 100644
--- a/source/blender/compositor/nodes/COM_TransformNode.cpp
+++ b/source/blender/compositor/nodes/COM_TransformNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_TransformNode.h"
diff --git a/source/blender/compositor/nodes/COM_TransformNode.h b/source/blender/compositor/nodes/COM_TransformNode.h
index ad1935dcf23..8bbcaa687ec 100644
--- a/source/blender/compositor/nodes/COM_TransformNode.h
+++ b/source/blender/compositor/nodes/COM_TransformNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_TRANSFORMNODE_H__
diff --git a/source/blender/compositor/nodes/COM_TranslateNode.cpp b/source/blender/compositor/nodes/COM_TranslateNode.cpp
index 78d1bfc3b28..ed66d008188 100644
--- a/source/blender/compositor/nodes/COM_TranslateNode.cpp
+++ b/source/blender/compositor/nodes/COM_TranslateNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_TranslateNode.h"
diff --git a/source/blender/compositor/nodes/COM_TranslateNode.h b/source/blender/compositor/nodes/COM_TranslateNode.h
index 535bd11c3b7..c84605a94cf 100644
--- a/source/blender/compositor/nodes/COM_TranslateNode.h
+++ b/source/blender/compositor/nodes/COM_TranslateNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_TRANSLATENODE_H__
diff --git a/source/blender/compositor/nodes/COM_ValueNode.cpp b/source/blender/compositor/nodes/COM_ValueNode.cpp
index b7484eb4ed6..26c87f3acb7 100644
--- a/source/blender/compositor/nodes/COM_ValueNode.cpp
+++ b/source/blender/compositor/nodes/COM_ValueNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ValueNode.h"
diff --git a/source/blender/compositor/nodes/COM_ValueNode.h b/source/blender/compositor/nodes/COM_ValueNode.h
index b7d80bcf393..a7fe54a1a9d 100644
--- a/source/blender/compositor/nodes/COM_ValueNode.h
+++ b/source/blender/compositor/nodes/COM_ValueNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_VALUENODE_H__
diff --git a/source/blender/compositor/nodes/COM_VectorBlurNode.cpp b/source/blender/compositor/nodes/COM_VectorBlurNode.cpp
index 5a6b49c9bd1..7a685b2ed1e 100644
--- a/source/blender/compositor/nodes/COM_VectorBlurNode.cpp
+++ b/source/blender/compositor/nodes/COM_VectorBlurNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_VectorBlurNode.h"
diff --git a/source/blender/compositor/nodes/COM_VectorBlurNode.h b/source/blender/compositor/nodes/COM_VectorBlurNode.h
index 93249a327fa..33aa07bb0eb 100644
--- a/source/blender/compositor/nodes/COM_VectorBlurNode.h
+++ b/source/blender/compositor/nodes/COM_VectorBlurNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_VECTORBLURNODE_H__
diff --git a/source/blender/compositor/nodes/COM_VectorCurveNode.cpp b/source/blender/compositor/nodes/COM_VectorCurveNode.cpp
index dc4b2f66a0a..fbb367ca374 100644
--- a/source/blender/compositor/nodes/COM_VectorCurveNode.cpp
+++ b/source/blender/compositor/nodes/COM_VectorCurveNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_VectorCurveNode.h"
diff --git a/source/blender/compositor/nodes/COM_VectorCurveNode.h b/source/blender/compositor/nodes/COM_VectorCurveNode.h
index a95d505fa6d..6fea5261290 100644
--- a/source/blender/compositor/nodes/COM_VectorCurveNode.h
+++ b/source/blender/compositor/nodes/COM_VectorCurveNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_VECTORCURVENODE_H__
diff --git a/source/blender/compositor/nodes/COM_ViewLevelsNode.cpp b/source/blender/compositor/nodes/COM_ViewLevelsNode.cpp
index 134ab5628ec..02b08131c2f 100644
--- a/source/blender/compositor/nodes/COM_ViewLevelsNode.cpp
+++ b/source/blender/compositor/nodes/COM_ViewLevelsNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ViewLevelsNode.h"
diff --git a/source/blender/compositor/nodes/COM_ViewLevelsNode.h b/source/blender/compositor/nodes/COM_ViewLevelsNode.h
index b5b8a386051..772c5692fa6 100644
--- a/source/blender/compositor/nodes/COM_ViewLevelsNode.h
+++ b/source/blender/compositor/nodes/COM_ViewLevelsNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_VIEWLEVELSNODE_H__
diff --git a/source/blender/compositor/nodes/COM_ViewerNode.cpp b/source/blender/compositor/nodes/COM_ViewerNode.cpp
index 8ad3b219598..773476f588a 100644
--- a/source/blender/compositor/nodes/COM_ViewerNode.cpp
+++ b/source/blender/compositor/nodes/COM_ViewerNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ViewerNode.h"
diff --git a/source/blender/compositor/nodes/COM_ViewerNode.h b/source/blender/compositor/nodes/COM_ViewerNode.h
index 666bb55b6a5..1f2a1ef1284 100644
--- a/source/blender/compositor/nodes/COM_ViewerNode.h
+++ b/source/blender/compositor/nodes/COM_ViewerNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_VIEWERNODE_H__
diff --git a/source/blender/compositor/nodes/COM_ZCombineNode.cpp b/source/blender/compositor/nodes/COM_ZCombineNode.cpp
index a5d42bb0333..1bdce3f858e 100644
--- a/source/blender/compositor/nodes/COM_ZCombineNode.cpp
+++ b/source/blender/compositor/nodes/COM_ZCombineNode.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ZCombineNode.h"
diff --git a/source/blender/compositor/nodes/COM_ZCombineNode.h b/source/blender/compositor/nodes/COM_ZCombineNode.h
index ee3558cd58f..2b8c75e8cde 100644
--- a/source/blender/compositor/nodes/COM_ZCombineNode.h
+++ b/source/blender/compositor/nodes/COM_ZCombineNode.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_ZCOMBINENODE_H__
diff --git a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp
index e6ae9b5fc8b..f09b92d2796 100644
--- a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp
+++ b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_AlphaOverKeyOperation.h"
diff --git a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h
index 569c18888d8..c3eedf4eac3 100644
--- a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h
+++ b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_ALPHAOVERKEYOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp
index 119ff3f98e9..86dd1f94787 100644
--- a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp
+++ b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_AlphaOverMixedOperation.h"
diff --git a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h
index a5174f0839a..c522d828822 100644
--- a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h
+++ b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_ALPHAOVERMIXEDOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp
index 22a92c8e65b..81e71be49fa 100644
--- a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp
+++ b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_AlphaOverPremultiplyOperation.h"
diff --git a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h
index e52971222ab..0a0c973b253 100644
--- a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h
+++ b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_ALPHAOVERPREMULTIPLYOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_AntiAliasOperation.h b/source/blender/compositor/operations/COM_AntiAliasOperation.h
index 25781196b1f..9a46044e2a0 100644
--- a/source/blender/compositor/operations/COM_AntiAliasOperation.h
+++ b/source/blender/compositor/operations/COM_AntiAliasOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_ANTIALIASOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp b/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp
index 506c2181ee9..3abb1ba183b 100644
--- a/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_BilateralBlurOperation.h"
diff --git a/source/blender/compositor/operations/COM_BilateralBlurOperation.h b/source/blender/compositor/operations/COM_BilateralBlurOperation.h
index 70f291d5e1c..3948357074b 100644
--- a/source/blender/compositor/operations/COM_BilateralBlurOperation.h
+++ b/source/blender/compositor/operations/COM_BilateralBlurOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_BILATERALBLUROPERATION_H__
diff --git a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
index 7b130edc46d..fc9686e1a32 100644
--- a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_BlurBaseOperation.h"
diff --git a/source/blender/compositor/operations/COM_BlurBaseOperation.h b/source/blender/compositor/operations/COM_BlurBaseOperation.h
index 8b3cfcafcef..3f6c4cd7508 100644
--- a/source/blender/compositor/operations/COM_BlurBaseOperation.h
+++ b/source/blender/compositor/operations/COM_BlurBaseOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_BLURBASEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
index 2476ab3b591..a92a7a85e7e 100644
--- a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_BokehBlurOperation.h"
diff --git a/source/blender/compositor/operations/COM_BokehBlurOperation.h b/source/blender/compositor/operations/COM_BokehBlurOperation.h
index f1540835eaf..04ecabd87df 100644
--- a/source/blender/compositor/operations/COM_BokehBlurOperation.h
+++ b/source/blender/compositor/operations/COM_BokehBlurOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_BOKEHBLUROPERATION_H__
diff --git a/source/blender/compositor/operations/COM_BokehImageOperation.cpp b/source/blender/compositor/operations/COM_BokehImageOperation.cpp
index 5c694a21ad9..7dfc6002c2b 100644
--- a/source/blender/compositor/operations/COM_BokehImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_BokehImageOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_BokehImageOperation.h"
diff --git a/source/blender/compositor/operations/COM_BokehImageOperation.h b/source/blender/compositor/operations/COM_BokehImageOperation.h
index d26f3f7066c..c4616e5fecb 100644
--- a/source/blender/compositor/operations/COM_BokehImageOperation.h
+++ b/source/blender/compositor/operations/COM_BokehImageOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_BOKEHIMAGEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_BoxMaskOperation.cpp b/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
index d4fe976cf26..c824ab9b005 100644
--- a/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_BoxMaskOperation.h"
diff --git a/source/blender/compositor/operations/COM_BoxMaskOperation.h b/source/blender/compositor/operations/COM_BoxMaskOperation.h
index 399b7dd393b..5b2fd70a69c 100644
--- a/source/blender/compositor/operations/COM_BoxMaskOperation.h
+++ b/source/blender/compositor/operations/COM_BoxMaskOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_BOXMASKOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_BrightnessOperation.cpp b/source/blender/compositor/operations/COM_BrightnessOperation.cpp
index a959bd0a5aa..437722abaa8 100644
--- a/source/blender/compositor/operations/COM_BrightnessOperation.cpp
+++ b/source/blender/compositor/operations/COM_BrightnessOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_BrightnessOperation.h"
diff --git a/source/blender/compositor/operations/COM_BrightnessOperation.h b/source/blender/compositor/operations/COM_BrightnessOperation.h
index 1ebccf761a7..5cfdcf8d7c9 100644
--- a/source/blender/compositor/operations/COM_BrightnessOperation.h
+++ b/source/blender/compositor/operations/COM_BrightnessOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_BRIGHTNESSOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp b/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp
index be6d2b40d7e..2a26e067a78 100644
--- a/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp
+++ b/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_CalculateMeanOperation.h"
diff --git a/source/blender/compositor/operations/COM_CalculateMeanOperation.h b/source/blender/compositor/operations/COM_CalculateMeanOperation.h
index 265057b6536..9a539788359 100644
--- a/source/blender/compositor/operations/COM_CalculateMeanOperation.h
+++ b/source/blender/compositor/operations/COM_CalculateMeanOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_CALCULATEMEANOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
index 28012cdfabf..fd607a9bfd2 100644
--- a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
+++ b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_CalculateStandardDeviationOperation.h"
diff --git a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.h b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.h
index 2d357f30f7b..2a84d306b1a 100644
--- a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.h
+++ b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_CALCULATESTANDARDDEVIATIONOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp b/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
index cbd87113276..e72a64b4d7b 100644
--- a/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
+++ b/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ChangeHSVOperation.h"
diff --git a/source/blender/compositor/operations/COM_ChangeHSVOperation.h b/source/blender/compositor/operations/COM_ChangeHSVOperation.h
index 16c4a0cca07..b32bde291e4 100644
--- a/source/blender/compositor/operations/COM_ChangeHSVOperation.h
+++ b/source/blender/compositor/operations/COM_ChangeHSVOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_CHANGEHSVOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp b/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp
index ec59a27e724..97144782967 100644
--- a/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#include "COM_ChannelMatteOperation.h"
diff --git a/source/blender/compositor/operations/COM_ChannelMatteOperation.h b/source/blender/compositor/operations/COM_ChannelMatteOperation.h
index 46ef7809492..92050d4ee7a 100644
--- a/source/blender/compositor/operations/COM_ChannelMatteOperation.h
+++ b/source/blender/compositor/operations/COM_ChannelMatteOperation.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#ifndef __COM_CHANNELMATTEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp b/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp
index 6696a6add6d..41582b51af4 100644
--- a/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#include "COM_ChromaMatteOperation.h"
diff --git a/source/blender/compositor/operations/COM_ChromaMatteOperation.h b/source/blender/compositor/operations/COM_ChromaMatteOperation.h
index ba7f207b1c6..c6495323ec0 100644
--- a/source/blender/compositor/operations/COM_ChromaMatteOperation.h
+++ b/source/blender/compositor/operations/COM_ChromaMatteOperation.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#ifndef __COM_CHROMAMATTEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp
index 806772417a4..5d9dd7fb9ca 100644
--- a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ColorBalanceASCCDLOperation.h"
diff --git a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.h b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.h
index 77a5dd55cd9..01f576cead1 100644
--- a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.h
+++ b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_COLORBALANCEASCCDLOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp
index e264c065f47..f4bc5849ebf 100644
--- a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ColorBalanceLGGOperation.h"
diff --git a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.h b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.h
index 3dbe2e11058..8bed3b05114 100644
--- a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.h
+++ b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_COLORBALANCELGGOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp b/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
index a67540f846d..e0ea3def45c 100644
--- a/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ColorCorrectionOperation.h"
diff --git a/source/blender/compositor/operations/COM_ColorCorrectionOperation.h b/source/blender/compositor/operations/COM_ColorCorrectionOperation.h
index 9b691dcb050..6c7f7b68faa 100644
--- a/source/blender/compositor/operations/COM_ColorCorrectionOperation.h
+++ b/source/blender/compositor/operations/COM_ColorCorrectionOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_COLORCORRECTIONOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_ColorCurveOperation.cpp b/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
index 4cecc53ad01..698c8bc9947 100644
--- a/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ColorCurveOperation.h"
diff --git a/source/blender/compositor/operations/COM_ColorCurveOperation.h b/source/blender/compositor/operations/COM_ColorCurveOperation.h
index 16e3455ceec..ac16840a5c0 100644
--- a/source/blender/compositor/operations/COM_ColorCurveOperation.h
+++ b/source/blender/compositor/operations/COM_ColorCurveOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_COLORCURVEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_ColorMatteOperation.cpp b/source/blender/compositor/operations/COM_ColorMatteOperation.cpp
index 22aa4a5b2d7..c3952187286 100644
--- a/source/blender/compositor/operations/COM_ColorMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorMatteOperation.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#include "COM_ColorMatteOperation.h"
diff --git a/source/blender/compositor/operations/COM_ColorMatteOperation.h b/source/blender/compositor/operations/COM_ColorMatteOperation.h
index 0ceedd23efd..0b6e9a8f9d8 100644
--- a/source/blender/compositor/operations/COM_ColorMatteOperation.h
+++ b/source/blender/compositor/operations/COM_ColorMatteOperation.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#ifndef __COM_COLORMATTEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_ColorRampOperation.cpp b/source/blender/compositor/operations/COM_ColorRampOperation.cpp
index eb1d96c81ec..dd6c80352df 100644
--- a/source/blender/compositor/operations/COM_ColorRampOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorRampOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ColorRampOperation.h"
diff --git a/source/blender/compositor/operations/COM_ColorRampOperation.h b/source/blender/compositor/operations/COM_ColorRampOperation.h
index ff6d32fc4e6..20fbfd1ea8b 100644
--- a/source/blender/compositor/operations/COM_ColorRampOperation.h
+++ b/source/blender/compositor/operations/COM_ColorRampOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_COLORRAMPOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_ColorSpillOperation.cpp b/source/blender/compositor/operations/COM_ColorSpillOperation.cpp
index 2f30ed83043..4fbb822fc06 100644
--- a/source/blender/compositor/operations/COM_ColorSpillOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorSpillOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ColorSpillOperation.h"
diff --git a/source/blender/compositor/operations/COM_ColorSpillOperation.h b/source/blender/compositor/operations/COM_ColorSpillOperation.h
index 519e9a22335..75961b94305 100644
--- a/source/blender/compositor/operations/COM_ColorSpillOperation.h
+++ b/source/blender/compositor/operations/COM_ColorSpillOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_COLORSPILLOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_CompositorOperation.cpp b/source/blender/compositor/operations/COM_CompositorOperation.cpp
index 24846f738dd..9ad10699286 100644
--- a/source/blender/compositor/operations/COM_CompositorOperation.cpp
+++ b/source/blender/compositor/operations/COM_CompositorOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_CompositorOperation.h"
diff --git a/source/blender/compositor/operations/COM_CompositorOperation.h b/source/blender/compositor/operations/COM_CompositorOperation.h
index 1a3553d14b4..5dc912cb25b 100644
--- a/source/blender/compositor/operations/COM_CompositorOperation.h
+++ b/source/blender/compositor/operations/COM_CompositorOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_COMPOSITOROPERATION_H__
diff --git a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp
index a854749990c..b357dc1a170 100644
--- a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ConvertColorProfileOperation.h"
diff --git a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.h b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.h
index 3b7272e86f6..91147e2eb13 100644
--- a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_CONVERTCOLORPROFILEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp b/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp
index 111bfeadf35..18c7419dcf5 100644
--- a/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ConvertDepthToRadiusOperation.h"
diff --git a/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.h b/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.h
index 5294d04352e..4193897078b 100644
--- a/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_CONVERTDEPTHTORADIUSOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_ConvertOperation.cpp b/source/blender/compositor/operations/COM_ConvertOperation.cpp
index 3746fc85f9c..c661420605e 100644
--- a/source/blender/compositor/operations/COM_ConvertOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ConvertOperation.h"
diff --git a/source/blender/compositor/operations/COM_ConvertOperation.h b/source/blender/compositor/operations/COM_ConvertOperation.h
index 2bbe14d6c17..404b6078cb4 100644
--- a/source/blender/compositor/operations/COM_ConvertOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_CONVERTOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp b/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp
index 9eb2d1bfcc5..ba4a2c8fad1 100644
--- a/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ConvolutionEdgeFilterOperation.h"
diff --git a/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.h b/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.h
index 4689a5b34f1..ae983dbdb47 100644
--- a/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.h
+++ b/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_CONVOLUTIONEDGEFILTEROPERATION_H__
diff --git a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp
index b14fdc811d4..7d2440a4781 100644
--- a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ConvolutionFilterOperation.h"
diff --git a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.h b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.h
index 20b8be3278d..347ed0183e5 100644
--- a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.h
+++ b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_CONVOLUTIONFILTEROPERATION_H__
diff --git a/source/blender/compositor/operations/COM_CropOperation.cpp b/source/blender/compositor/operations/COM_CropOperation.cpp
index af68fa09f1a..134e650c4ed 100644
--- a/source/blender/compositor/operations/COM_CropOperation.cpp
+++ b/source/blender/compositor/operations/COM_CropOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_CropOperation.h"
diff --git a/source/blender/compositor/operations/COM_CropOperation.h b/source/blender/compositor/operations/COM_CropOperation.h
index 0e0f25a2bf6..6608c9e14f5 100644
--- a/source/blender/compositor/operations/COM_CropOperation.h
+++ b/source/blender/compositor/operations/COM_CropOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_CROPOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_CurveBaseOperation.cpp b/source/blender/compositor/operations/COM_CurveBaseOperation.cpp
index 97129f8ec66..6310a280b7b 100644
--- a/source/blender/compositor/operations/COM_CurveBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_CurveBaseOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_CurveBaseOperation.h"
diff --git a/source/blender/compositor/operations/COM_CurveBaseOperation.h b/source/blender/compositor/operations/COM_CurveBaseOperation.h
index 1eb943dcc51..fffd44a3d30 100644
--- a/source/blender/compositor/operations/COM_CurveBaseOperation.h
+++ b/source/blender/compositor/operations/COM_CurveBaseOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_CURVEBASEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
index f6417bb78a0..4899994cf9e 100644
--- a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_DifferenceMatteOperation.h"
diff --git a/source/blender/compositor/operations/COM_DifferenceMatteOperation.h b/source/blender/compositor/operations/COM_DifferenceMatteOperation.h
index 3ea27f85eb6..fe3aea8ea2e 100644
--- a/source/blender/compositor/operations/COM_DifferenceMatteOperation.h
+++ b/source/blender/compositor/operations/COM_DifferenceMatteOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_DIFFERENCEMATTEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_DilateErodeOperation.cpp b/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
index 17f3dfeac62..0853bd6f436 100644
--- a/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
+++ b/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_DilateErodeOperation.h"
diff --git a/source/blender/compositor/operations/COM_DilateErodeOperation.h b/source/blender/compositor/operations/COM_DilateErodeOperation.h
index 56dcbb9b4a6..a873a009e18 100644
--- a/source/blender/compositor/operations/COM_DilateErodeOperation.h
+++ b/source/blender/compositor/operations/COM_DilateErodeOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_DILATEERODEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
index e3dec838589..d0d492fe2cd 100644
--- a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_DirectionalBlurOperation.h"
diff --git a/source/blender/compositor/operations/COM_DirectionalBlurOperation.h b/source/blender/compositor/operations/COM_DirectionalBlurOperation.h
index eaabf49bf74..17970cab1d6 100644
--- a/source/blender/compositor/operations/COM_DirectionalBlurOperation.h
+++ b/source/blender/compositor/operations/COM_DirectionalBlurOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_DIRECTIONALBLUROPERATION_H__
diff --git a/source/blender/compositor/operations/COM_DisplaceOperation.cpp b/source/blender/compositor/operations/COM_DisplaceOperation.cpp
index 0273a1de133..8618fba26ac 100644
--- a/source/blender/compositor/operations/COM_DisplaceOperation.cpp
+++ b/source/blender/compositor/operations/COM_DisplaceOperation.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#include "COM_DisplaceOperation.h"
diff --git a/source/blender/compositor/operations/COM_DisplaceOperation.h b/source/blender/compositor/operations/COM_DisplaceOperation.h
index 5a30f897203..298d48eac79 100644
--- a/source/blender/compositor/operations/COM_DisplaceOperation.h
+++ b/source/blender/compositor/operations/COM_DisplaceOperation.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#ifndef __COM_DISPLACEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp
index 98083add1f7..20de1fe2f93 100644
--- a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp
+++ b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#include "COM_DisplaceSimpleOperation.h"
diff --git a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.h b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.h
index c0bd6bacdd4..b0573949141 100644
--- a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.h
+++ b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#ifndef __COM_DISPLACESIMPLEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp
index adc977d014d..f34a948c909 100644
--- a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#include "COM_DistanceRGBMatteOperation.h"
diff --git a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h
index 0b45b0b75e9..7fd3ec15463 100644
--- a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h
+++ b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#ifndef __COM_DISTANCERGBMATTEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cpp b/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cpp
index 69d77c43245..d763010fbf2 100644
--- a/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#include "COM_DistanceYCCMatteOperation.h"
diff --git a/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h b/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h
index afff1414d7a..704b2e21a14 100644
--- a/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h
+++ b/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#ifndef __COM_DISTANCEYCCMATTEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_DotproductOperation.cpp b/source/blender/compositor/operations/COM_DotproductOperation.cpp
index a0cde948d25..a9eaac977e3 100644
--- a/source/blender/compositor/operations/COM_DotproductOperation.cpp
+++ b/source/blender/compositor/operations/COM_DotproductOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_DotproductOperation.h"
diff --git a/source/blender/compositor/operations/COM_DotproductOperation.h b/source/blender/compositor/operations/COM_DotproductOperation.h
index 43e38ee7c78..84938bcef99 100644
--- a/source/blender/compositor/operations/COM_DotproductOperation.h
+++ b/source/blender/compositor/operations/COM_DotproductOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_DOTPRODUCTOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
index 3566eafa2db..fdfbd4679f3 100644
--- a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include <stdlib.h>
diff --git a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h
index 1e5a3bb52a5..a11c3306e39 100644
--- a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h
+++ b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_DOUBLEEDGEMASKOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp b/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
index f0293a02724..f620df014f9 100644
--- a/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_EllipseMaskOperation.h"
diff --git a/source/blender/compositor/operations/COM_EllipseMaskOperation.h b/source/blender/compositor/operations/COM_EllipseMaskOperation.h
index 59451d2046a..ddd50fbafe5 100644
--- a/source/blender/compositor/operations/COM_EllipseMaskOperation.h
+++ b/source/blender/compositor/operations/COM_EllipseMaskOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_ELLIPSEMASKOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
index d570424cb69..f86bdac254d 100644
--- a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include <limits.h>
@@ -128,7 +128,7 @@ void FastGaussianBlurOperation::IIR_gauss(MemoryBuffer *src, float sigma, unsign
if ((xy < 1) || (xy > 3)) xy = 3;
// XXX The YVV macro defined below explicitly expects sources of at least 3x3 pixels,
- // so just skiping blur along faulty direction if src's def is below that limit!
+ // so just skipping blur along faulty direction if src's def is below that limit!
if (src_width < 3) xy &= ~1;
if (src_height < 3) xy &= ~2;
if (xy < 1) return;
diff --git a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.h b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.h
index 840849d6126..e5d3835e8cd 100644
--- a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.h
+++ b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_FASTGAUSSIANBLUROPERATION_H__
diff --git a/source/blender/compositor/operations/COM_FlipOperation.cpp b/source/blender/compositor/operations/COM_FlipOperation.cpp
index c75201903eb..38d3e10440e 100644
--- a/source/blender/compositor/operations/COM_FlipOperation.cpp
+++ b/source/blender/compositor/operations/COM_FlipOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_FlipOperation.h"
diff --git a/source/blender/compositor/operations/COM_FlipOperation.h b/source/blender/compositor/operations/COM_FlipOperation.h
index 039f3af5064..eac7897c107 100644
--- a/source/blender/compositor/operations/COM_FlipOperation.h
+++ b/source/blender/compositor/operations/COM_FlipOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_FLIPOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp b/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp
index f7d9ad838d1..d3ddb9a5ec0 100644
--- a/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp
+++ b/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_GammaCorrectOperation.h"
diff --git a/source/blender/compositor/operations/COM_GammaCorrectOperation.h b/source/blender/compositor/operations/COM_GammaCorrectOperation.h
index e9b6691349b..49a94aeca6f 100644
--- a/source/blender/compositor/operations/COM_GammaCorrectOperation.h
+++ b/source/blender/compositor/operations/COM_GammaCorrectOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_GAMMACORRECTOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_GammaOperation.cpp b/source/blender/compositor/operations/COM_GammaOperation.cpp
index 0cc0cbefd46..d657f42cc39 100644
--- a/source/blender/compositor/operations/COM_GammaOperation.cpp
+++ b/source/blender/compositor/operations/COM_GammaOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_GammaOperation.h"
diff --git a/source/blender/compositor/operations/COM_GammaOperation.h b/source/blender/compositor/operations/COM_GammaOperation.h
index b51c86f7fd3..c0ef88b1928 100644
--- a/source/blender/compositor/operations/COM_GammaOperation.h
+++ b/source/blender/compositor/operations/COM_GammaOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_GAMMAOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
index c560257b859..9c0f7de71b6 100644
--- a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Campbell Barton
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Campbell Barton
*/
#include "COM_GaussianAlphaXBlurOperation.h"
diff --git a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.h b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.h
index 50b3d68426c..7457bdca28c 100644
--- a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.h
+++ b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.h
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Campbell Barton
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Campbell Barton
*/
#ifndef __COM_GAUSSIANALPHAXBLUROPERATION_H__
diff --git a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
index b90320afdeb..982b2b9f24c 100644
--- a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Campbell Barton
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Campbell Barton
*/
#include "COM_GaussianAlphaYBlurOperation.h"
diff --git a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.h b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.h
index 30672ad5ab2..28d9c026593 100644
--- a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.h
+++ b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.h
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Campbell Barton
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Campbell Barton
*/
#ifndef __COM_GAUSSIANALPHAYBLUROPERATION_H__
diff --git a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
index bbcec45ea1f..ff5abaa0016 100644
--- a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_GaussianBokehBlurOperation.h"
diff --git a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.h b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.h
index 9089838add5..6be2f60e729 100644
--- a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.h
+++ b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_GAUSSIANBOKEHBLUROPERATION_H__
diff --git a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
index 3eafc7a1bfe..88152718524 100644
--- a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_GaussianXBlurOperation.h"
diff --git a/source/blender/compositor/operations/COM_GaussianXBlurOperation.h b/source/blender/compositor/operations/COM_GaussianXBlurOperation.h
index 6e7c9adbd9b..3a344a1b3fc 100644
--- a/source/blender/compositor/operations/COM_GaussianXBlurOperation.h
+++ b/source/blender/compositor/operations/COM_GaussianXBlurOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_GAUSSIANXBLUROPERATION_H__
diff --git a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
index 45089598af5..c17f427b71a 100644
--- a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_GaussianYBlurOperation.h"
diff --git a/source/blender/compositor/operations/COM_GaussianYBlurOperation.h b/source/blender/compositor/operations/COM_GaussianYBlurOperation.h
index 00f9ebcd21f..6e45f332a2f 100644
--- a/source/blender/compositor/operations/COM_GaussianYBlurOperation.h
+++ b/source/blender/compositor/operations/COM_GaussianYBlurOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_GAUSSIANYBLUROPERATION_H__
diff --git a/source/blender/compositor/operations/COM_GlareBaseOperation.cpp b/source/blender/compositor/operations/COM_GlareBaseOperation.cpp
index 8942bbaa3e1..27cde5a7609 100644
--- a/source/blender/compositor/operations/COM_GlareBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareBaseOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_GlareBaseOperation.h"
diff --git a/source/blender/compositor/operations/COM_GlareBaseOperation.h b/source/blender/compositor/operations/COM_GlareBaseOperation.h
index 413d495f670..f910adac211 100644
--- a/source/blender/compositor/operations/COM_GlareBaseOperation.h
+++ b/source/blender/compositor/operations/COM_GlareBaseOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_GLAREBASEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp b/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp
index fe2864461dc..63386943514 100644
--- a/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_GlareFogGlowOperation.h"
diff --git a/source/blender/compositor/operations/COM_GlareFogGlowOperation.h b/source/blender/compositor/operations/COM_GlareFogGlowOperation.h
index 5bfe40d3a23..75428905673 100644
--- a/source/blender/compositor/operations/COM_GlareFogGlowOperation.h
+++ b/source/blender/compositor/operations/COM_GlareFogGlowOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_GLAREFOGGLOWOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_GlareGhostOperation.cpp b/source/blender/compositor/operations/COM_GlareGhostOperation.cpp
index 1c515f89d4f..7420748f098 100644
--- a/source/blender/compositor/operations/COM_GlareGhostOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareGhostOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_GlareGhostOperation.h"
diff --git a/source/blender/compositor/operations/COM_GlareGhostOperation.h b/source/blender/compositor/operations/COM_GlareGhostOperation.h
index bff13d1bcce..0378ecd4671 100644
--- a/source/blender/compositor/operations/COM_GlareGhostOperation.h
+++ b/source/blender/compositor/operations/COM_GlareGhostOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_GLAREGHOSTOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_GlareSimpleStarOperation.cpp b/source/blender/compositor/operations/COM_GlareSimpleStarOperation.cpp
index 94f407dad86..95d165d7816 100644
--- a/source/blender/compositor/operations/COM_GlareSimpleStarOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareSimpleStarOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_GlareSimpleStarOperation.h"
diff --git a/source/blender/compositor/operations/COM_GlareSimpleStarOperation.h b/source/blender/compositor/operations/COM_GlareSimpleStarOperation.h
index 7f0cf7be46a..5fc333f4e3c 100644
--- a/source/blender/compositor/operations/COM_GlareSimpleStarOperation.h
+++ b/source/blender/compositor/operations/COM_GlareSimpleStarOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_GLARESIMPLESTAROPERATION_H__
diff --git a/source/blender/compositor/operations/COM_GlareStreaksOperation.cpp b/source/blender/compositor/operations/COM_GlareStreaksOperation.cpp
index 535f2952e5d..5d8c9f4ecc9 100644
--- a/source/blender/compositor/operations/COM_GlareStreaksOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareStreaksOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_GlareStreaksOperation.h"
diff --git a/source/blender/compositor/operations/COM_GlareStreaksOperation.h b/source/blender/compositor/operations/COM_GlareStreaksOperation.h
index 0671c0b2557..24f48ed4e48 100644
--- a/source/blender/compositor/operations/COM_GlareStreaksOperation.h
+++ b/source/blender/compositor/operations/COM_GlareStreaksOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_GLARESTREAKSOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
index 62ebe601d8d..18dd15d588e 100644
--- a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_GlareThresholdOperation.h"
diff --git a/source/blender/compositor/operations/COM_GlareThresholdOperation.h b/source/blender/compositor/operations/COM_GlareThresholdOperation.h
index 7934dd20524..ae819f45dda 100644
--- a/source/blender/compositor/operations/COM_GlareThresholdOperation.h
+++ b/source/blender/compositor/operations/COM_GlareThresholdOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_GLARETHRESHOLDOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
index 3e480ca04ef..5b678c6b724 100644
--- a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
+++ b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_HueSaturationValueCorrectOperation.h"
diff --git a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.h b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.h
index 2a749fef1f8..2c5a782e122 100644
--- a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.h
+++ b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_HUESATURATIONVALUECORRECTOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_IDMaskOperation.cpp b/source/blender/compositor/operations/COM_IDMaskOperation.cpp
index d294dd3e8ba..1d608744a91 100644
--- a/source/blender/compositor/operations/COM_IDMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_IDMaskOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_IDMaskOperation.h"
diff --git a/source/blender/compositor/operations/COM_IDMaskOperation.h b/source/blender/compositor/operations/COM_IDMaskOperation.h
index 53c2fd154a0..16fceb3d52e 100644
--- a/source/blender/compositor/operations/COM_IDMaskOperation.h
+++ b/source/blender/compositor/operations/COM_IDMaskOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_IDMASKOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_ImageOperation.cpp b/source/blender/compositor/operations/COM_ImageOperation.cpp
index 2215f482e4d..9b191d42110 100644
--- a/source/blender/compositor/operations/COM_ImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_ImageOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ImageOperation.h"
diff --git a/source/blender/compositor/operations/COM_ImageOperation.h b/source/blender/compositor/operations/COM_ImageOperation.h
index 40928484dbb..6336179e5ab 100644
--- a/source/blender/compositor/operations/COM_ImageOperation.h
+++ b/source/blender/compositor/operations/COM_ImageOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
diff --git a/source/blender/compositor/operations/COM_InpaintOperation.cpp b/source/blender/compositor/operations/COM_InpaintOperation.cpp
index f22270108ae..240bce0f586 100644
--- a/source/blender/compositor/operations/COM_InpaintOperation.cpp
+++ b/source/blender/compositor/operations/COM_InpaintOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor: Peter Schlaile
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "MEM_guardedalloc.h"
diff --git a/source/blender/compositor/operations/COM_InpaintOperation.h b/source/blender/compositor/operations/COM_InpaintOperation.h
index bd430a3690c..65e5c75198a 100644
--- a/source/blender/compositor/operations/COM_InpaintOperation.h
+++ b/source/blender/compositor/operations/COM_InpaintOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor: Peter Schlaile
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_INPAINTOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_InvertOperation.cpp b/source/blender/compositor/operations/COM_InvertOperation.cpp
index ac0c91394e8..cdc5eab7ed1 100644
--- a/source/blender/compositor/operations/COM_InvertOperation.cpp
+++ b/source/blender/compositor/operations/COM_InvertOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_InvertOperation.h"
diff --git a/source/blender/compositor/operations/COM_InvertOperation.h b/source/blender/compositor/operations/COM_InvertOperation.h
index 2aeb33a76f5..5608a69e3a3 100644
--- a/source/blender/compositor/operations/COM_InvertOperation.h
+++ b/source/blender/compositor/operations/COM_InvertOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_INVERTOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp b/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp
index 72c7512cb23..d9e6d6df41e 100644
--- a/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
#include "COM_KeyingBlurOperation.h"
diff --git a/source/blender/compositor/operations/COM_KeyingBlurOperation.h b/source/blender/compositor/operations/COM_KeyingBlurOperation.h
index 2bea3ca8616..a15f3f697c2 100644
--- a/source/blender/compositor/operations/COM_KeyingBlurOperation.h
+++ b/source/blender/compositor/operations/COM_KeyingBlurOperation.h
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
#ifndef __COM_KEYINGBLUROPERATION_H__
diff --git a/source/blender/compositor/operations/COM_KeyingClipOperation.cpp b/source/blender/compositor/operations/COM_KeyingClipOperation.cpp
index d4ba94f240f..fd0788bb96d 100644
--- a/source/blender/compositor/operations/COM_KeyingClipOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingClipOperation.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
#include "COM_KeyingClipOperation.h"
diff --git a/source/blender/compositor/operations/COM_KeyingClipOperation.h b/source/blender/compositor/operations/COM_KeyingClipOperation.h
index e0571bf15cd..a37fc48fc86 100644
--- a/source/blender/compositor/operations/COM_KeyingClipOperation.h
+++ b/source/blender/compositor/operations/COM_KeyingClipOperation.h
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
#ifndef __COM_KEYINGCLIPOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp b/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp
index c4b821f998f..6f707fb4cc0 100644
--- a/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
#include "COM_KeyingDespillOperation.h"
diff --git a/source/blender/compositor/operations/COM_KeyingDespillOperation.h b/source/blender/compositor/operations/COM_KeyingDespillOperation.h
index 6b7fc82367b..a8514d31733 100644
--- a/source/blender/compositor/operations/COM_KeyingDespillOperation.h
+++ b/source/blender/compositor/operations/COM_KeyingDespillOperation.h
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
#ifndef __COM_KEYINGDESPILLOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_KeyingOperation.cpp b/source/blender/compositor/operations/COM_KeyingOperation.cpp
index fa0ef70fca6..9486cbb3393 100644
--- a/source/blender/compositor/operations/COM_KeyingOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingOperation.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
#include "COM_KeyingOperation.h"
diff --git a/source/blender/compositor/operations/COM_KeyingOperation.h b/source/blender/compositor/operations/COM_KeyingOperation.h
index a9f3034f6d1..274cc48bbac 100644
--- a/source/blender/compositor/operations/COM_KeyingOperation.h
+++ b/source/blender/compositor/operations/COM_KeyingOperation.h
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
diff --git a/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp b/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
index dd87578ea78..8b842820761 100644
--- a/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
#include "COM_KeyingScreenOperation.h"
diff --git a/source/blender/compositor/operations/COM_KeyingScreenOperation.h b/source/blender/compositor/operations/COM_KeyingScreenOperation.h
index 25a3dcb6897..ac961c0919d 100644
--- a/source/blender/compositor/operations/COM_KeyingScreenOperation.h
+++ b/source/blender/compositor/operations/COM_KeyingScreenOperation.h
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
diff --git a/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp b/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
index 391d6f8d9e9..1f5b20207d1 100644
--- a/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#include "COM_LuminanceMatteOperation.h"
diff --git a/source/blender/compositor/operations/COM_LuminanceMatteOperation.h b/source/blender/compositor/operations/COM_LuminanceMatteOperation.h
index 64d4638c5cd..7341bad4263 100644
--- a/source/blender/compositor/operations/COM_LuminanceMatteOperation.h
+++ b/source/blender/compositor/operations/COM_LuminanceMatteOperation.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#ifndef __COM_LUMINANCEMATTEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_MapRangeOperation.cpp b/source/blender/compositor/operations/COM_MapRangeOperation.cpp
index f5d3b146196..3cdf14ce1e7 100644
--- a/source/blender/compositor/operations/COM_MapRangeOperation.cpp
+++ b/source/blender/compositor/operations/COM_MapRangeOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
- * Daniel Salazar
+ * Dalai Felinto
+ * Daniel Salazar
*/
#include "COM_MapRangeOperation.h"
diff --git a/source/blender/compositor/operations/COM_MapRangeOperation.h b/source/blender/compositor/operations/COM_MapRangeOperation.h
index 6598c89a09c..d8acdcc3e77 100644
--- a/source/blender/compositor/operations/COM_MapRangeOperation.h
+++ b/source/blender/compositor/operations/COM_MapRangeOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
- * Daniel Salazar
+ * Dalai Felinto
+ * Daniel Salazar
*/
#ifndef __COM_MAPRANGEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_MapUVOperation.cpp b/source/blender/compositor/operations/COM_MapUVOperation.cpp
index 9e8b28e871e..fae35ddbabc 100644
--- a/source/blender/compositor/operations/COM_MapUVOperation.cpp
+++ b/source/blender/compositor/operations/COM_MapUVOperation.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#include "COM_MapUVOperation.h"
diff --git a/source/blender/compositor/operations/COM_MapUVOperation.h b/source/blender/compositor/operations/COM_MapUVOperation.h
index 599a07e1afa..847cc93537a 100644
--- a/source/blender/compositor/operations/COM_MapUVOperation.h
+++ b/source/blender/compositor/operations/COM_MapUVOperation.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#ifndef __COM_MAPUVOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_MapValueOperation.cpp b/source/blender/compositor/operations/COM_MapValueOperation.cpp
index afe3961dbf1..81fd6eec203 100644
--- a/source/blender/compositor/operations/COM_MapValueOperation.cpp
+++ b/source/blender/compositor/operations/COM_MapValueOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_MapValueOperation.h"
diff --git a/source/blender/compositor/operations/COM_MapValueOperation.h b/source/blender/compositor/operations/COM_MapValueOperation.h
index c057ffe606a..9df4302fd83 100644
--- a/source/blender/compositor/operations/COM_MapValueOperation.h
+++ b/source/blender/compositor/operations/COM_MapValueOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_MAPVALUEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_MaskOperation.cpp b/source/blender/compositor/operations/COM_MaskOperation.cpp
index efc9f6edd5b..b9acec15c32 100644
--- a/source/blender/compositor/operations/COM_MaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_MaskOperation.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
#include "COM_MaskOperation.h"
diff --git a/source/blender/compositor/operations/COM_MaskOperation.h b/source/blender/compositor/operations/COM_MaskOperation.h
index 02c0e61c31e..b35ae647d97 100644
--- a/source/blender/compositor/operations/COM_MaskOperation.h
+++ b/source/blender/compositor/operations/COM_MaskOperation.h
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
#ifndef __COM_MASKOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_MathBaseOperation.cpp b/source/blender/compositor/operations/COM_MathBaseOperation.cpp
index 99385a5073a..3c232475558 100644
--- a/source/blender/compositor/operations/COM_MathBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_MathBaseOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_MathBaseOperation.h"
diff --git a/source/blender/compositor/operations/COM_MathBaseOperation.h b/source/blender/compositor/operations/COM_MathBaseOperation.h
index 54fd3c5d2b9..0132c77ac37 100644
--- a/source/blender/compositor/operations/COM_MathBaseOperation.h
+++ b/source/blender/compositor/operations/COM_MathBaseOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_MATHBASEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_MixOperation.cpp b/source/blender/compositor/operations/COM_MixOperation.cpp
index 0acbe63e20e..04d4d4f4b77 100644
--- a/source/blender/compositor/operations/COM_MixOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_MixOperation.h"
diff --git a/source/blender/compositor/operations/COM_MixOperation.h b/source/blender/compositor/operations/COM_MixOperation.h
index 9063635fda0..d4a079d4201 100644
--- a/source/blender/compositor/operations/COM_MixOperation.h
+++ b/source/blender/compositor/operations/COM_MixOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_MIXOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp
index c1c159f80a0..cae3b1dbcb1 100644
--- a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp
+++ b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_MovieClipAttributeOperation.h"
diff --git a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.h b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.h
index 9ac38da55d3..fc6c9e0f5c3 100644
--- a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.h
+++ b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_MOVIECLIPATTRIBUTEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_MovieClipOperation.cpp b/source/blender/compositor/operations/COM_MovieClipOperation.cpp
index a19cb1a34d2..849af221451 100644
--- a/source/blender/compositor/operations/COM_MovieClipOperation.cpp
+++ b/source/blender/compositor/operations/COM_MovieClipOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_MovieClipOperation.h"
diff --git a/source/blender/compositor/operations/COM_MovieClipOperation.h b/source/blender/compositor/operations/COM_MovieClipOperation.h
index 2b696cd5df6..d46fc007d15 100644
--- a/source/blender/compositor/operations/COM_MovieClipOperation.h
+++ b/source/blender/compositor/operations/COM_MovieClipOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
index 3b8f09fffb2..dca7cba46a8 100644
--- a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
#include "COM_MovieDistortionOperation.h"
diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.h b/source/blender/compositor/operations/COM_MovieDistortionOperation.h
index f09e9c29d01..1a7c6b363d3 100644
--- a/source/blender/compositor/operations/COM_MovieDistortionOperation.h
+++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.h
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
#ifndef __COM_MOVIEDISTORTIONOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp b/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
index 133a780fc6d..85347ea5053 100644
--- a/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Lukas Tönne
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Lukas Tönne
*/
#include "COM_MultilayerImageOperation.h"
diff --git a/source/blender/compositor/operations/COM_MultilayerImageOperation.h b/source/blender/compositor/operations/COM_MultilayerImageOperation.h
index 4074b80374f..b6d27623f1d 100644
--- a/source/blender/compositor/operations/COM_MultilayerImageOperation.h
+++ b/source/blender/compositor/operations/COM_MultilayerImageOperation.h
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Lukas Tönne
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Lukas Tönne
*/
diff --git a/source/blender/compositor/operations/COM_NormalizeOperation.cpp b/source/blender/compositor/operations/COM_NormalizeOperation.cpp
index 3527c874bcf..4c86c83c69d 100644
--- a/source/blender/compositor/operations/COM_NormalizeOperation.cpp
+++ b/source/blender/compositor/operations/COM_NormalizeOperation.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#include "COM_NormalizeOperation.h"
diff --git a/source/blender/compositor/operations/COM_NormalizeOperation.h b/source/blender/compositor/operations/COM_NormalizeOperation.h
index cebfad5dd17..9efb5b24fbe 100644
--- a/source/blender/compositor/operations/COM_NormalizeOperation.h
+++ b/source/blender/compositor/operations/COM_NormalizeOperation.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Dalai Felinto
+ * Dalai Felinto
*/
#ifndef __COM_NORMALIZEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_OpenCLKernels.cl b/source/blender/compositor/operations/COM_OpenCLKernels.cl
index cbd05cbec17..ebe8a6d08ec 100644
--- a/source/blender/compositor/operations/COM_OpenCLKernels.cl
+++ b/source/blender/compositor/operations/COM_OpenCLKernels.cl
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
/// This file contains all opencl kernels for node-operation implementations
diff --git a/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp b/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp
index f7fcf63fabb..c52d50bdb8c 100644
--- a/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp
+++ b/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp
@@ -16,10 +16,10 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Lukas Tönne
- * Dalai Felinto
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Lukas Tönne
+ * Dalai Felinto
*/
#include "COM_OutputFileOperation.h"
diff --git a/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.h b/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.h
index 74ba8ff2226..d0f9eff2773 100644
--- a/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.h
+++ b/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.h
@@ -16,10 +16,10 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Lukas Tönne
- * Dalai Felinto
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Lukas Tönne
+ * Dalai Felinto
*/
#ifndef __COM_OUTPUTFILEMULTIVIEWOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.cpp b/source/blender/compositor/operations/COM_OutputFileOperation.cpp
index de1a807f137..e73f2e46fb9 100644
--- a/source/blender/compositor/operations/COM_OutputFileOperation.cpp
+++ b/source/blender/compositor/operations/COM_OutputFileOperation.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Lukas Tönne
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Lukas Tönne
*/
#include "COM_OutputFileOperation.h"
diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.h b/source/blender/compositor/operations/COM_OutputFileOperation.h
index d230eefdd78..80e7dc21a23 100644
--- a/source/blender/compositor/operations/COM_OutputFileOperation.h
+++ b/source/blender/compositor/operations/COM_OutputFileOperation.h
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Lukas Tönne
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Lukas Tönne
*/
#ifndef __COM_OUTPUTFILEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_PixelateOperation.cpp b/source/blender/compositor/operations/COM_PixelateOperation.cpp
index 4373c3511ea..779a82366dd 100644
--- a/source/blender/compositor/operations/COM_PixelateOperation.cpp
+++ b/source/blender/compositor/operations/COM_PixelateOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_PixelateOperation.h"
diff --git a/source/blender/compositor/operations/COM_PixelateOperation.h b/source/blender/compositor/operations/COM_PixelateOperation.h
index 59337f11b54..cd91c2ccc05 100644
--- a/source/blender/compositor/operations/COM_PixelateOperation.h
+++ b/source/blender/compositor/operations/COM_PixelateOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_PIXELATEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_PlaneCornerPinOperation.cpp b/source/blender/compositor/operations/COM_PlaneCornerPinOperation.cpp
index 4e4e803c757..d8288322f37 100644
--- a/source/blender/compositor/operations/COM_PlaneCornerPinOperation.cpp
+++ b/source/blender/compositor/operations/COM_PlaneCornerPinOperation.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Lukas Toenne
+ * Lukas Toenne
*/
#include "COM_PlaneCornerPinOperation.h"
diff --git a/source/blender/compositor/operations/COM_PlaneCornerPinOperation.h b/source/blender/compositor/operations/COM_PlaneCornerPinOperation.h
index 980f57c4cea..3a4e837cc4c 100644
--- a/source/blender/compositor/operations/COM_PlaneCornerPinOperation.h
+++ b/source/blender/compositor/operations/COM_PlaneCornerPinOperation.h
@@ -17,7 +17,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Lukas Toenne
+ * Lukas Toenne
*/
#ifndef __COM_PLANECORNERPINOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp b/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp
index 75a85ad7e33..3d36e3dad9f 100644
--- a/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp
+++ b/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Sergey Sharybin
- * Lukas Toenne
+ * Sergey Sharybin
+ * Lukas Toenne
*/
#include "COM_PlaneDistortCommonOperation.h"
diff --git a/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.h b/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.h
index adf13685b4a..b96c5a0b80f 100644
--- a/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.h
+++ b/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.h
@@ -17,7 +17,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Sergey Sharybin
+ * Sergey Sharybin
*/
#ifndef __COM_PLANEDISTORTCOMMONOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_PlaneTrackOperation.cpp b/source/blender/compositor/operations/COM_PlaneTrackOperation.cpp
index 070b7562b2d..522cd950c76 100644
--- a/source/blender/compositor/operations/COM_PlaneTrackOperation.cpp
+++ b/source/blender/compositor/operations/COM_PlaneTrackOperation.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Sergey Sharybin
+ * Sergey Sharybin
*/
#include "COM_PlaneTrackOperation.h"
diff --git a/source/blender/compositor/operations/COM_PlaneTrackOperation.h b/source/blender/compositor/operations/COM_PlaneTrackOperation.h
index 493d9cb3be1..e9f9719797a 100644
--- a/source/blender/compositor/operations/COM_PlaneTrackOperation.h
+++ b/source/blender/compositor/operations/COM_PlaneTrackOperation.h
@@ -17,7 +17,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Sergey Sharybin
+ * Sergey Sharybin
*/
#ifndef __COM_PLANETRACKOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_PreviewOperation.cpp b/source/blender/compositor/operations/COM_PreviewOperation.cpp
index 91f3dc4e643..b00f92bf404 100644
--- a/source/blender/compositor/operations/COM_PreviewOperation.cpp
+++ b/source/blender/compositor/operations/COM_PreviewOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_PreviewOperation.h"
diff --git a/source/blender/compositor/operations/COM_PreviewOperation.h b/source/blender/compositor/operations/COM_PreviewOperation.h
index 350ecd5e314..9884d8ea37e 100644
--- a/source/blender/compositor/operations/COM_PreviewOperation.h
+++ b/source/blender/compositor/operations/COM_PreviewOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_PREVIEWOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
index e135abe5f20..b5da10f256c 100644
--- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ProjectorLensDistortionOperation.h"
diff --git a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h
index 79bd5586d8f..4f6f0c4d087 100644
--- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h
+++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_PROJECTORLENSDISTORTIONOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_QualityStepHelper.cpp b/source/blender/compositor/operations/COM_QualityStepHelper.cpp
index 9a9db86f720..6c589a4b68e 100644
--- a/source/blender/compositor/operations/COM_QualityStepHelper.cpp
+++ b/source/blender/compositor/operations/COM_QualityStepHelper.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_QualityStepHelper.h"
diff --git a/source/blender/compositor/operations/COM_QualityStepHelper.h b/source/blender/compositor/operations/COM_QualityStepHelper.h
index 67419cfbc87..8b424de8526 100644
--- a/source/blender/compositor/operations/COM_QualityStepHelper.h
+++ b/source/blender/compositor/operations/COM_QualityStepHelper.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_QUALITYSTEPHELPER_H__
diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
index 277b3606ff9..82b62d8fbb3 100644
--- a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
+++ b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ReadBufferOperation.h"
diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.h b/source/blender/compositor/operations/COM_ReadBufferOperation.h
index 4aa6eb7d492..a0598aec36e 100644
--- a/source/blender/compositor/operations/COM_ReadBufferOperation.h
+++ b/source/blender/compositor/operations/COM_ReadBufferOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_READBUFFEROPERATION_H__
diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cpp b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
index 5331f198aa4..2388e9e3302 100644
--- a/source/blender/compositor/operations/COM_RenderLayersProg.cpp
+++ b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_RenderLayersProg.h"
diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.h b/source/blender/compositor/operations/COM_RenderLayersProg.h
index b5946d44f74..5d1981eac31 100644
--- a/source/blender/compositor/operations/COM_RenderLayersProg.h
+++ b/source/blender/compositor/operations/COM_RenderLayersProg.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
diff --git a/source/blender/compositor/operations/COM_RotateOperation.cpp b/source/blender/compositor/operations/COM_RotateOperation.cpp
index 4186a0e1fc8..de01637501a 100644
--- a/source/blender/compositor/operations/COM_RotateOperation.cpp
+++ b/source/blender/compositor/operations/COM_RotateOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_RotateOperation.h"
diff --git a/source/blender/compositor/operations/COM_RotateOperation.h b/source/blender/compositor/operations/COM_RotateOperation.h
index 59fb92054e1..70eeea351c3 100644
--- a/source/blender/compositor/operations/COM_RotateOperation.h
+++ b/source/blender/compositor/operations/COM_RotateOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_ROTATEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_ScaleOperation.cpp b/source/blender/compositor/operations/COM_ScaleOperation.cpp
index b498b359144..61e9543023d 100644
--- a/source/blender/compositor/operations/COM_ScaleOperation.cpp
+++ b/source/blender/compositor/operations/COM_ScaleOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ScaleOperation.h"
@@ -201,7 +201,7 @@ bool ScaleAbsoluteOperation::determineDependingAreaOfInterest(rcti *input, ReadB
}
-// Absolute fixed siez
+// Absolute fixed size
ScaleFixedSizeOperation::ScaleFixedSizeOperation() : BaseScaleOperation()
{
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE);
diff --git a/source/blender/compositor/operations/COM_ScaleOperation.h b/source/blender/compositor/operations/COM_ScaleOperation.h
index b4aecb1515d..0409832fa40 100644
--- a/source/blender/compositor/operations/COM_ScaleOperation.h
+++ b/source/blender/compositor/operations/COM_ScaleOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_SCALEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
index 5d50640d582..5a05d14087f 100644
--- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ScreenLensDistortionOperation.h"
diff --git a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h
index f89af962211..2e1343694cc 100644
--- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h
+++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_SCREENLENSDISTORTIONOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_SetAlphaOperation.cpp b/source/blender/compositor/operations/COM_SetAlphaOperation.cpp
index e6c04a4b68c..d4f7e7e4f1c 100644
--- a/source/blender/compositor/operations/COM_SetAlphaOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetAlphaOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_SetAlphaOperation.h"
diff --git a/source/blender/compositor/operations/COM_SetAlphaOperation.h b/source/blender/compositor/operations/COM_SetAlphaOperation.h
index 90deb69a67d..e059cbc1dc4 100644
--- a/source/blender/compositor/operations/COM_SetAlphaOperation.h
+++ b/source/blender/compositor/operations/COM_SetAlphaOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_SETALPHAOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_SetColorOperation.cpp b/source/blender/compositor/operations/COM_SetColorOperation.cpp
index 1a362bc55e2..d83c1728c1c 100644
--- a/source/blender/compositor/operations/COM_SetColorOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetColorOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_SetColorOperation.h"
diff --git a/source/blender/compositor/operations/COM_SetColorOperation.h b/source/blender/compositor/operations/COM_SetColorOperation.h
index a3bd2e30749..e87c9550ea7 100644
--- a/source/blender/compositor/operations/COM_SetColorOperation.h
+++ b/source/blender/compositor/operations/COM_SetColorOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_SETCOLOROPERATION_H__
diff --git a/source/blender/compositor/operations/COM_SetSamplerOperation.cpp b/source/blender/compositor/operations/COM_SetSamplerOperation.cpp
index e02fcad1574..bfb567b6435 100644
--- a/source/blender/compositor/operations/COM_SetSamplerOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetSamplerOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_SetSamplerOperation.h"
diff --git a/source/blender/compositor/operations/COM_SetSamplerOperation.h b/source/blender/compositor/operations/COM_SetSamplerOperation.h
index 24b14a3ce48..90e614b6860 100644
--- a/source/blender/compositor/operations/COM_SetSamplerOperation.h
+++ b/source/blender/compositor/operations/COM_SetSamplerOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_SETSAMPLEROPERATION_H__
diff --git a/source/blender/compositor/operations/COM_SetValueOperation.cpp b/source/blender/compositor/operations/COM_SetValueOperation.cpp
index 5deb7fe672d..b1a60bdbf7c 100644
--- a/source/blender/compositor/operations/COM_SetValueOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetValueOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_SetValueOperation.h"
diff --git a/source/blender/compositor/operations/COM_SetValueOperation.h b/source/blender/compositor/operations/COM_SetValueOperation.h
index 0dc7a4cd139..8ed10ffe2a2 100644
--- a/source/blender/compositor/operations/COM_SetValueOperation.h
+++ b/source/blender/compositor/operations/COM_SetValueOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_SETVALUEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_SetVectorOperation.cpp b/source/blender/compositor/operations/COM_SetVectorOperation.cpp
index 2e1045fc2e3..e95c5d09656 100644
--- a/source/blender/compositor/operations/COM_SetVectorOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetVectorOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_SetVectorOperation.h"
diff --git a/source/blender/compositor/operations/COM_SetVectorOperation.h b/source/blender/compositor/operations/COM_SetVectorOperation.h
index 98f5d918ec2..dc9e6d6230f 100644
--- a/source/blender/compositor/operations/COM_SetVectorOperation.h
+++ b/source/blender/compositor/operations/COM_SetVectorOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_SETVECTOROPERATION_H__
diff --git a/source/blender/compositor/operations/COM_SocketProxyOperation.cpp b/source/blender/compositor/operations/COM_SocketProxyOperation.cpp
index 0d813f7313f..ceef752174e 100644
--- a/source/blender/compositor/operations/COM_SocketProxyOperation.cpp
+++ b/source/blender/compositor/operations/COM_SocketProxyOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_SocketProxyOperation.h"
diff --git a/source/blender/compositor/operations/COM_SocketProxyOperation.h b/source/blender/compositor/operations/COM_SocketProxyOperation.h
index 61575ac6b2c..215de59421b 100644
--- a/source/blender/compositor/operations/COM_SocketProxyOperation.h
+++ b/source/blender/compositor/operations/COM_SocketProxyOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_SOCKETPROXYOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_SplitOperation.cpp b/source/blender/compositor/operations/COM_SplitOperation.cpp
index 49eff79ace9..330a6b0675d 100644
--- a/source/blender/compositor/operations/COM_SplitOperation.cpp
+++ b/source/blender/compositor/operations/COM_SplitOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_SplitOperation.h"
diff --git a/source/blender/compositor/operations/COM_SplitOperation.h b/source/blender/compositor/operations/COM_SplitOperation.h
index a7c7146ddea..f16b7e92645 100644
--- a/source/blender/compositor/operations/COM_SplitOperation.h
+++ b/source/blender/compositor/operations/COM_SplitOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_SPLITOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_SunBeamsOperation.cpp b/source/blender/compositor/operations/COM_SunBeamsOperation.cpp
index 40f2ee226ae..e556d366353 100644
--- a/source/blender/compositor/operations/COM_SunBeamsOperation.cpp
+++ b/source/blender/compositor/operations/COM_SunBeamsOperation.cpp
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Lukas Toenne
+ * Lukas Toenne
*/
#include "MEM_guardedalloc.h"
@@ -141,7 +141,7 @@ struct BufferLineAccumulator {
/**
* Perform the actual accumulation along a ray segment from source to pt.
- * Only pixels withing dist_min..dist_max contribute.
+ * Only pixels within dist_min..dist_max contribute.
*
* The loop runs backwards(!) over the primary sector space axis u, i.e. increasing distance to pt.
* After each step it decrements v by dv < 1, adding a buffer shift when necessary.
diff --git a/source/blender/compositor/operations/COM_SunBeamsOperation.h b/source/blender/compositor/operations/COM_SunBeamsOperation.h
index 43846ab24d1..99de59aa31b 100644
--- a/source/blender/compositor/operations/COM_SunBeamsOperation.h
+++ b/source/blender/compositor/operations/COM_SunBeamsOperation.h
@@ -16,7 +16,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Lukas Toenne
+ * Lukas Toenne
*/
#ifndef __COM_SUNBEAMSOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_TextureOperation.cpp b/source/blender/compositor/operations/COM_TextureOperation.cpp
index 78d5976c744..da0c1106105 100644
--- a/source/blender/compositor/operations/COM_TextureOperation.cpp
+++ b/source/blender/compositor/operations/COM_TextureOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_TextureOperation.h"
diff --git a/source/blender/compositor/operations/COM_TextureOperation.h b/source/blender/compositor/operations/COM_TextureOperation.h
index 434f590a65d..ad35e2311f6 100644
--- a/source/blender/compositor/operations/COM_TextureOperation.h
+++ b/source/blender/compositor/operations/COM_TextureOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
diff --git a/source/blender/compositor/operations/COM_TonemapOperation.cpp b/source/blender/compositor/operations/COM_TonemapOperation.cpp
index ce9a5260fb6..f2db6fac9f0 100644
--- a/source/blender/compositor/operations/COM_TonemapOperation.cpp
+++ b/source/blender/compositor/operations/COM_TonemapOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_TonemapOperation.h"
diff --git a/source/blender/compositor/operations/COM_TonemapOperation.h b/source/blender/compositor/operations/COM_TonemapOperation.h
index c205785b023..97ce7c1af13 100644
--- a/source/blender/compositor/operations/COM_TonemapOperation.h
+++ b/source/blender/compositor/operations/COM_TonemapOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_TONEMAPOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_TrackPositionOperation.cpp b/source/blender/compositor/operations/COM_TrackPositionOperation.cpp
index f9db897deba..a7ce85c6f84 100644
--- a/source/blender/compositor/operations/COM_TrackPositionOperation.cpp
+++ b/source/blender/compositor/operations/COM_TrackPositionOperation.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
#include "COM_TrackPositionOperation.h"
diff --git a/source/blender/compositor/operations/COM_TrackPositionOperation.h b/source/blender/compositor/operations/COM_TrackPositionOperation.h
index add6ccd3459..571733bedd8 100644
--- a/source/blender/compositor/operations/COM_TrackPositionOperation.h
+++ b/source/blender/compositor/operations/COM_TrackPositionOperation.h
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Sergey Sharybin
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
*/
diff --git a/source/blender/compositor/operations/COM_TranslateOperation.cpp b/source/blender/compositor/operations/COM_TranslateOperation.cpp
index 89092cf8566..76efb107385 100644
--- a/source/blender/compositor/operations/COM_TranslateOperation.cpp
+++ b/source/blender/compositor/operations/COM_TranslateOperation.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Thomas Beck (plasmasolutions.de)
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Thomas Beck (plasmasolutions.de)
*/
#include "COM_TranslateOperation.h"
diff --git a/source/blender/compositor/operations/COM_TranslateOperation.h b/source/blender/compositor/operations/COM_TranslateOperation.h
index 1c54ec62284..175bbcfa599 100644
--- a/source/blender/compositor/operations/COM_TranslateOperation.h
+++ b/source/blender/compositor/operations/COM_TranslateOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_TRANSLATEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
index a252af053cc..ccc701f57ce 100644
--- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_VariableSizeBokehBlurOperation.h"
@@ -288,7 +288,7 @@ void InverseSearchRadiusOperation::initExecution()
void *InverseSearchRadiusOperation::initializeTileData(rcti *rect)
{
- MemoryBuffer * data = new MemoryBuffer(COM_DT_COLOR, rect);
+ MemoryBuffer *data = new MemoryBuffer(COM_DT_COLOR, rect);
float *buffer = data->getBuffer();
int x, y;
int width = this->m_inputRadius->getWidth();
diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h
index 57ffde6d398..2e10007bc67 100644
--- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h
+++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_VARIABLESIZEBOKEHBLUROPERATION_H__
diff --git a/source/blender/compositor/operations/COM_VectorBlurOperation.cpp b/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
index d14d745d049..718e1cbddc4 100644
--- a/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include <string.h>
@@ -761,7 +761,7 @@ void zbuf_accumulate_vecblur(
}
/* blend with a falloff. this fixes the ugly effect you get with
- * a fast moving object. then it looks like a solid object overlayed
+ * a fast moving object. then it looks like a solid object overlaid
* over a very transparent moving version of itself. in reality, the
* whole object should become transparent if it is moving fast, be
* we don't know what is behind it so we don't do that. this hack
diff --git a/source/blender/compositor/operations/COM_VectorBlurOperation.h b/source/blender/compositor/operations/COM_VectorBlurOperation.h
index fe8e9f20edb..7dc101c0826 100644
--- a/source/blender/compositor/operations/COM_VectorBlurOperation.h
+++ b/source/blender/compositor/operations/COM_VectorBlurOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_VECTORBLUROPERATION_H__
diff --git a/source/blender/compositor/operations/COM_VectorCurveOperation.cpp b/source/blender/compositor/operations/COM_VectorCurveOperation.cpp
index 3cd9a6f21ca..17539d2910d 100644
--- a/source/blender/compositor/operations/COM_VectorCurveOperation.cpp
+++ b/source/blender/compositor/operations/COM_VectorCurveOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_VectorCurveOperation.h"
diff --git a/source/blender/compositor/operations/COM_VectorCurveOperation.h b/source/blender/compositor/operations/COM_VectorCurveOperation.h
index a5c1cb6d446..ffa8dee372e 100644
--- a/source/blender/compositor/operations/COM_VectorCurveOperation.h
+++ b/source/blender/compositor/operations/COM_VectorCurveOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_VECTORCURVEOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_ViewerOperation.cpp b/source/blender/compositor/operations/COM_ViewerOperation.cpp
index 25167eeab9f..563cb819e18 100644
--- a/source/blender/compositor/operations/COM_ViewerOperation.cpp
+++ b/source/blender/compositor/operations/COM_ViewerOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ViewerOperation.h"
diff --git a/source/blender/compositor/operations/COM_ViewerOperation.h b/source/blender/compositor/operations/COM_ViewerOperation.h
index 1eb3a1ad602..d3079a1c8a2 100644
--- a/source/blender/compositor/operations/COM_ViewerOperation.h
+++ b/source/blender/compositor/operations/COM_ViewerOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_VIEWEROPERATION_H__
diff --git a/source/blender/compositor/operations/COM_WrapOperation.cpp b/source/blender/compositor/operations/COM_WrapOperation.cpp
index 7fbef453a13..9352dac292b 100644
--- a/source/blender/compositor/operations/COM_WrapOperation.cpp
+++ b/source/blender/compositor/operations/COM_WrapOperation.cpp
@@ -16,9 +16,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- * Thomas Beck (plasmasolutions.de)
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Thomas Beck (plasmasolutions.de)
*/
#include "COM_WrapOperation.h"
diff --git a/source/blender/compositor/operations/COM_WrapOperation.h b/source/blender/compositor/operations/COM_WrapOperation.h
index 4b8d1d8846b..ddc329e2033 100644
--- a/source/blender/compositor/operations/COM_WrapOperation.h
+++ b/source/blender/compositor/operations/COM_WrapOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_WRAPOPERATION_H__
diff --git a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
index 5a34673b2bd..e4d893ef3de 100644
--- a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
+++ b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_WriteBufferOperation.h"
diff --git a/source/blender/compositor/operations/COM_WriteBufferOperation.h b/source/blender/compositor/operations/COM_WriteBufferOperation.h
index 79e228c63fb..81b7a2ed062 100644
--- a/source/blender/compositor/operations/COM_WriteBufferOperation.h
+++ b/source/blender/compositor/operations/COM_WriteBufferOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_WRITEBUFFEROPERATION_H__
diff --git a/source/blender/compositor/operations/COM_ZCombineOperation.cpp b/source/blender/compositor/operations/COM_ZCombineOperation.cpp
index 8b99d5872fe..7c82eee2eb6 100644
--- a/source/blender/compositor/operations/COM_ZCombineOperation.cpp
+++ b/source/blender/compositor/operations/COM_ZCombineOperation.cpp
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#include "COM_ZCombineOperation.h"
diff --git a/source/blender/compositor/operations/COM_ZCombineOperation.h b/source/blender/compositor/operations/COM_ZCombineOperation.h
index be6fb0fe576..44071410f79 100644
--- a/source/blender/compositor/operations/COM_ZCombineOperation.h
+++ b/source/blender/compositor/operations/COM_ZCombineOperation.h
@@ -16,8 +16,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
+ * Jeroen Bakker
+ * Monique Dewanchand
*/
#ifndef __COM_ZCOMBINEOPERATION_H__
diff --git a/source/blender/datatoc/datatoc_icon_split.py b/source/blender/datatoc/datatoc_icon_split.py
index e7cc3a71446..399d7df4d8d 100755
--- a/source/blender/datatoc/datatoc_icon_split.py
+++ b/source/blender/datatoc/datatoc_icon_split.py
@@ -130,7 +130,7 @@ def dice_icon_name(
import re
# Search for eg: DEF_ICON(BRUSH_NUDGE) --> BRUSH_NUDGE
- re_icon = re.compile('^\s*DEF_ICON\(\s*([A-Za-z0-9_]+)\s*\).*$')
+ re_icon = re.compile(r'^\s*DEF_ICON\(\s*([A-Za-z0-9_]+)\s*\).*$')
ui_icons_h = os.path.join(SOURCE_DIR, "source", "blender", "editors", "include", "UI_icons.h")
with open(ui_icons_h, 'r', encoding="utf-8") as f:
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index e8adabb2668..a3eac1120db 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -804,11 +804,11 @@ void DepsgraphRelationBuilder::build_constraints(ID *id,
/* Standard object relation. */
// TODO: loc vs rot vs scale?
if (&ct->tar->id == id) {
- /* Constraint targetting own object:
+ /* Constraint targeting own object:
* - This case is fine IFF we're dealing with a bone
* constraint pointing to its own armature. In that
* case, it's just transform -> bone.
- * - If however it is a real self targetting case, just
+ * - If however it is a real self targeting case, just
* make it depend on the previous constraint (or the
* pre-constraint state).
*/
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.h b/source/blender/depsgraph/intern/builder/deg_builder_relations.h
index 4a8e91f18db..35e17cd0dc1 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.h
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.h
@@ -290,7 +290,7 @@ protected:
/* TODO(sergey): All those is_same* functions are to be generalized. */
- /* Check whether two keys correponds to the same bone from same armature.
+ /* Check whether two keys corresponds to the same bone from same armature.
*
* This is used by drivers relations builder to avoid possible fake
* dependency cycle when one bone property drives another property of the
diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc
index 241c3fb9ac3..681af26637c 100644
--- a/source/blender/depsgraph/intern/depsgraph.cc
+++ b/source/blender/depsgraph/intern/depsgraph.cc
@@ -142,7 +142,7 @@ static bool pointer_to_component_node_criteria(
else if (ptr->type == &RNA_Bone) {
Bone *bone = (Bone *)ptr->data;
/* armature-level bone, but it ends up going to bone component anyway */
- // NOTE: the ID in thise case will end up being bArmature.
+ // NOTE: the ID in this case will end up being bArmature.
*type = DEG_NODE_TYPE_BONE;
*subdata = bone->name;
return true;
diff --git a/source/blender/depsgraph/intern/depsgraph_types.h b/source/blender/depsgraph/intern/depsgraph_types.h
index 0e48be6b1e2..0478d97cf6b 100644
--- a/source/blender/depsgraph/intern/depsgraph_types.h
+++ b/source/blender/depsgraph/intern/depsgraph_types.h
@@ -198,7 +198,7 @@ typedef enum eDepsOperation_Code {
* - "READY" This (internal, noop is used to signal that all pre-IK
* operations are done. Its role is to help mediate situations
* where cyclic relations may otherwise form (i.e. one bone in
- * chain targetting another in same chain,
+ * chain targeting another in same chain,
*
* - "DONE" This noop is used to signal that the bone's final pose
* transform can be read by others
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 1ea4c7ead77..8c306ab0159 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -192,8 +192,8 @@ static void acf_generic_channel_color(bAnimContext *ac, bAnimListElem *ale, floa
}
/* set color for normal channels
- * - use 3 shades of color group/standard color for 3 indention level
- * - only use group colors if allowed to, and if actually feasible
+ * - use 3 shades of color group/standard color for 3 indention level
+ * - only use group colors if allowed to, and if actually feasible
*/
if (showGroupColors && (grp) && (grp->customCol)) {
unsigned char cp[3];
@@ -425,8 +425,8 @@ static void acf_summary_backdrop(bAnimContext *ac, bAnimListElem *ale, float ymi
glColor3fv(color);
/* rounded corners on LHS only
- * - top and bottom
- * - special hack: make the top a bit higher, since we are first...
+ * - top and bottom
+ * - special hack: make the top a bit higher, since we are first...
*/
UI_draw_roundbox_corner_set(UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT);
UI_draw_roundbox_gl_mode(GL_POLYGON, 0, yminc - 2, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc, 8);
@@ -473,7 +473,7 @@ static void *acf_summary_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings s
bAnimContext *ac = (bAnimContext *)ale->data;
/* if data is valid, return pointer to active dopesheet's relevant flag
- * - this is restricted to DopeSheet/Action Editor only
+ * - this is restricted to DopeSheet/Action Editor only
*/
if ((ac->sl) && (ac->spacetype == SPACE_ACTION) && (setting == ACHANNEL_SETTING_EXPAND)) {
SpaceAction *saction = (SpaceAction *)ac->sl;
@@ -1094,7 +1094,7 @@ static bool acf_nla_controls_setting_valid(bAnimContext *UNUSED(ac), bAnimListEl
case ACHANNEL_SETTING_EXPAND:
return true;
- // TOOD: selected?
+ // TODO: selected?
default: /* unsupported */
return false;
@@ -3022,7 +3022,7 @@ static int acf_gpl_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settings
case ACHANNEL_SETTING_MUTE: /* animation muting - similar to frame lock... */
return GP_LAYER_FRAMELOCK;
- case ACHANNEL_SETTING_VISIBLE: /* visiblity of the layers (NOT muting) */
+ case ACHANNEL_SETTING_VISIBLE: /* visibility of the layers (NOT muting) */
*neg = true;
return GP_LAYER_HIDE;
@@ -3727,8 +3727,8 @@ short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChanne
} (void)0
/* Change value of some setting for a channel
- * - setting: eAnimChannel_Settings
- * - mode: eAnimChannels_SetFlag
+ * - setting: eAnimChannel_Settings
+ * - mode: eAnimChannels_SetFlag
*/
void ANIM_channel_setting_set(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting, eAnimChannels_SetFlag mode)
{
@@ -3850,9 +3850,9 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
glDisable(GL_BLEND);
/* step 4) draw special toggles .................................
- * - in Graph Editor, checkboxes for visibility in curves area
- * - in NLA Editor, glowing dots for solo/not solo...
- * - in Grease Pencil mode, color swatches for layer color
+ * - in Graph Editor, checkboxes for visibility in curves area
+ * - in NLA Editor, glowing dots for solo/not solo...
+ * - in Grease Pencil mode, color swatches for layer color
*/
if (ac->sl) {
if ((ac->spacetype == SPACE_IPO) &&
@@ -3976,9 +3976,9 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
}
/* draw slider
- * - even if we can draw sliders for this view, we must also check that the channel-type supports them
- * (only only F-Curves really can support them for now)
- * - slider should start before the toggles (if they're visible) to keep a clean line down the side
+ * - even if we can draw sliders for this view, we must also check that the channel-type supports them
+ * (only only F-Curves really can support them for now)
+ * - slider should start before the toggles (if they're visible) to keep a clean line down the side
*/
if ((draw_sliders) && ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE, ANIMTYPE_SHAPEKEY)) {
/* adjust offset */
@@ -3987,8 +3987,8 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
/* finally draw a backdrop rect behind these
- * - starts from the point where the first toggle/slider starts,
- * - ends past the space that might be reserved for a scroller
+ * - starts from the point where the first toggle/slider starts,
+ * - ends past the space that might be reserved for a scroller
*/
glRectf(v2d->cur.xmax - (float)offset, yminc + ymin_ofs, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc);
}
@@ -4009,7 +4009,7 @@ static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void
bAnimContext ac;
ListBase anim_data = {NULL, NULL};
int filter;
- int setting = GET_INT_FROM_POINTER(setting_wrap);
+ int setting = POINTER_AS_INT(setting_wrap);
short on = 0;
/* send notifiers before doing anything else... */
@@ -4339,7 +4339,7 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, const bAni
case ACHANNEL_SETTING_PINNED: /* NLA Actions - 'map/nomap' */
case ACHANNEL_SETTING_MOD_OFF:
case ACHANNEL_SETTING_ALWAYS_VISIBLE:
- UI_but_funcN_set(but, achannel_setting_flush_widget_cb, MEM_dupallocN(ale), SET_INT_IN_POINTER(setting));
+ UI_but_funcN_set(but, achannel_setting_flush_widget_cb, MEM_dupallocN(ale), POINTER_FROM_INT(setting));
break;
/* settings needing special attention */
@@ -4397,9 +4397,9 @@ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListEle
}
/* step 3) draw special toggles .................................
- * - in Graph Editor, checkboxes for visibility in curves area
- * - in NLA Editor, glowing dots for solo/not solo...
- * - in Grease Pencil mode, color swatches for layer color
+ * - in Graph Editor, checkboxes for visibility in curves area
+ * - in NLA Editor, glowing dots for solo/not solo...
+ * - in Grease Pencil mode, color swatches for layer color
*/
if (ac->sl) {
if ((ac->spacetype == SPACE_IPO) &&
@@ -4567,12 +4567,12 @@ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListEle
}
/* draw slider
- * - even if we can draw sliders for this view, we must also check that the channel-type supports them
- * (only only F-Curves really can support them for now)
- * - to make things easier, we use RNA-autobuts for this so that changes are reflected immediately,
- * wherever they occurred. BUT, we don't use the layout engine, otherwise we'd get wrong alignment,
- * and wouldn't be able to auto-keyframe...
- * - slider should start before the toggles (if they're visible) to keep a clean line down the side
+ * - even if we can draw sliders for this view, we must also check that the channel-type supports them
+ * (only only F-Curves really can support them for now)
+ * - to make things easier, we use RNA-autobuts for this so that changes are reflected immediately,
+ * wherever they occurred. BUT, we don't use the layout engine, otherwise we'd get wrong alignment,
+ * and wouldn't be able to auto-keyframe...
+ * - slider should start before the toggles (if they're visible) to keep a clean line down the side
*/
if ((draw_sliders) && ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE, ANIMTYPE_SHAPEKEY)) {
/* adjust offset */
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index 0366ef3a026..c125c129e1d 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -251,10 +251,10 @@ static void select_pchan_for_action_group(bAnimContext *ac, bActionGroup *agrp,
}
/* Deselect all animation channels
- * - data: pointer to datatype, as contained in bAnimContext
- * - datatype: the type of data that 'data' represents (eAnimCont_Types)
- * - test: check if deselecting instead of selecting
- * - sel: eAnimChannels_SetFlag;
+ * - data: pointer to datatype, as contained in bAnimContext
+ * - datatype: the type of data that 'data' represents (eAnimCont_Types)
+ * - test: check if deselecting instead of selecting
+ * - sel: eAnimChannels_SetFlag;
*/
void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, eAnimCont_Types datatype, bool test, eAnimChannels_SetFlag sel)
{
@@ -450,13 +450,13 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, eAnimCont_Types d
/* ---------------------------- Graph Editor ------------------------------------- */
/* Flush visibility (for Graph Editor) changes up/down hierarchy for changes in the given setting
- * - anim_data: list of the all the anim channels that can be chosen
- * -> filtered using ANIMFILTER_CHANNELS only, since if we took VISIBLE too,
- * then the channels under closed expanders get ignored...
- * - ale_setting: the anim channel (not in the anim_data list directly, though occurring there)
- * with the new state of the setting that we want flushed up/down the hierarchy
- * - setting: type of setting to set
- * - on: whether the visibility setting has been enabled or disabled
+ * - anim_data: list of the all the anim channels that can be chosen
+ * -> filtered using ANIMFILTER_CHANNELS only, since if we took VISIBLE too,
+ * then the channels under closed expanders get ignored...
+ * - ale_setting: the anim channel (not in the anim_data list directly, though occurring there)
+ * with the new state of the setting that we want flushed up/down the hierarchy
+ * - setting: type of setting to set
+ * - on: whether the visibility setting has been enabled or disabled
*/
void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAnimListElem *ale_setting, eAnimChannel_Settings setting, eAnimChannels_SetFlag mode)
{
@@ -505,12 +505,12 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAn
/* flush up?
*
* For Visibility:
- * - only flush up if the current state is now enabled (positive 'on' state is default)
- * (otherwise, it's too much work to force the parents to be inactive too)
+ * - only flush up if the current state is now enabled (positive 'on' state is default)
+ * (otherwise, it's too much work to force the parents to be inactive too)
*
* For everything else:
- * - only flush up if the current state is now disabled (negative 'off' state is default)
- * (otherwise, it's too much work to force the parents to be active too)
+ * - only flush up if the current state is now disabled (negative 'off' state is default)
+ * (otherwise, it's too much work to force the parents to be active too)
*/
if ( ((setting == ACHANNEL_SETTING_VISIBLE) && (mode != ACHANNEL_SETFLAG_CLEAR)) ||
((setting != ACHANNEL_SETTING_VISIBLE) && (mode == ACHANNEL_SETFLAG_CLEAR)))
@@ -597,17 +597,17 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAn
void ANIM_fcurve_delete_from_animdata(bAnimContext *ac, AnimData *adt, FCurve *fcu)
{
/* - if no AnimData, we've got nowhere to remove the F-Curve from
- * (this doesn't guarantee that the F-Curve is in there, but at least we tried
+ * (this doesn't guarantee that the F-Curve is in there, but at least we tried
* - if no F-Curve, there is nothing to remove
*/
if (ELEM(NULL, adt, fcu))
return;
/* remove from whatever list it came from
- * - Action Group
- * - Action
- * - Drivers
- * - TODO... some others?
+ * - Action Group
+ * - Action
+ * - Drivers
+ * - TODO... some others?
*/
if ((ac) && (ac->datatype == ANIMCONT_DRIVERS)) {
/* driver F-Curve */
@@ -1010,8 +1010,8 @@ static bool rearrange_animchannel_islands(ListBase *list, AnimChanRearrangeFp re
}
/* perform moving of selected islands now, but only if there is more than one of 'em so that something will happen
- * - scanning of the list is performed in the opposite direction to the direction we're moving things, so that we
- * shouldn't need to encounter items we've moved already
+ * - scanning of the list is performed in the opposite direction to the direction we're moving things, so that we
+ * shouldn't need to encounter items we've moved already
*/
if (islands.first != islands.last) {
tReorderChannelIsland *first = (mode > 0) ? islands.last : islands.first;
@@ -1039,7 +1039,7 @@ static bool rearrange_animchannel_islands(ListBase *list, AnimChanRearrangeFp re
/* Change the order NLA Tracks within NLA Stack
* ! NLA tracks are displayed in opposite order, so directions need care
- * mode: REARRANGE_ANIMCHAN_*
+ * mode: REARRANGE_ANIMCHAN_*
*/
static void rearrange_nla_channels(bAnimContext *ac, AnimData *adt, eRearrangeAnimChan_Mode mode)
{
@@ -1067,7 +1067,7 @@ static void rearrange_nla_channels(bAnimContext *ac, AnimData *adt, eRearrangeAn
/* Drivers Specific Stuff ------------------------------------------------- */
/* Change the order drivers within AnimData block
- * mode: REARRANGE_ANIMCHAN_*
+ * mode: REARRANGE_ANIMCHAN_*
*/
static void rearrange_driver_channels(bAnimContext *ac, AnimData *adt, eRearrangeAnimChan_Mode mode)
{
@@ -1182,7 +1182,7 @@ static void join_groups_action_temp(bAction *act)
}
/* Change the order of anim-channels within action
- * mode: REARRANGE_ANIMCHAN_*
+ * mode: REARRANGE_ANIMCHAN_*
*/
static void rearrange_action_channels(bAnimContext *ac, bAction *act, eRearrangeAnimChan_Mode mode)
{
@@ -1203,8 +1203,8 @@ static void rearrange_action_channels(bAnimContext *ac, bAction *act, eRearrange
rearrange_animchannels_filter_visible(&anim_data_visible, ac, ANIMTYPE_GROUP);
/* rearrange groups first
- * - the group's channels will only get considered if nothing happened when rearranging the groups
- * i.e. the rearrange function returned 0
+ * - the group's channels will only get considered if nothing happened when rearranging the groups
+ * i.e. the rearrange function returned 0
*/
do_channels = (rearrange_animchannel_islands(&act->groups, rearrange_func, mode, ANIMTYPE_GROUP,
&anim_data_visible) == 0);
@@ -1790,9 +1790,9 @@ static const EnumPropertyItem prop_animchannel_settings_types[] = {
/* ------------------- */
/* Set/clear a particular flag (setting) for all selected + visible channels
- * setting: the setting to modify
- * mode: eAnimChannels_SetFlag
- * onlysel: only selected channels get the flag set
+ * setting: the setting to modify
+ * mode: eAnimChannels_SetFlag
+ * onlysel: only selected channels get the flag set
*/
// TODO: enable a setting which turns flushing on/off?
static void setflag_anim_channels(bAnimContext *ac, eAnimChannel_Settings setting, eAnimChannels_SetFlag mode, bool onlysel, bool flush)
@@ -1885,7 +1885,7 @@ static int animchannels_setflag_exec(bContext *C, wmOperator *op)
flush = false;
/* modify setting
- * - only selected channels are affected
+ * - only selected channels are affected
*/
setflag_anim_channels(&ac, setting, mode, true, flush);
@@ -2576,8 +2576,8 @@ static int animchannels_channel_get(bAnimContext *ac, const int mval[2])
/* figure out which channel user clicked in
* Note: although channels technically start at (y = ACHANNEL_FIRST), we need to adjust by half a channel's height
- * so that the tops of channels get caught ok. Since ACHANNEL_FIRST is really ACHANNEL_HEIGHT, we simply use
- * ACHANNEL_HEIGHT_HALF.
+ * so that the tops of channels get caught ok. Since ACHANNEL_FIRST is really ACHANNEL_HEIGHT, we simply use
+ * ACHANNEL_HEIGHT_HALF.
*/
UI_view2d_region_to_view(v2d, mval[0], mval[1], &x, &y);
@@ -2808,7 +2808,7 @@ static int mouse_anim_channels(bContext *C, bAnimContext *ac, int channel_index,
agrp->flag ^= AGRP_SELECTED;
}
else if (selectmode == -1) {
- /* select all in group (and deselect everthing else) */
+ /* select all in group (and deselect everything else) */
FCurve *fcu;
/* deselect all other channels */
@@ -2900,7 +2900,7 @@ static int mouse_anim_channels(bContext *C, bAnimContext *ac, int channel_index,
bGPdata *gpd = (bGPdata *)ale->data;
/* toggle expand
- * - although the triangle widget already allows this, the whole channel can also be used for this purpose
+ * - although the triangle widget already allows this, the whole channel can also be used for this purpose
*/
gpd->flag ^= GP_DATA_EXPAND;
@@ -2936,7 +2936,7 @@ static int mouse_anim_channels(bContext *C, bAnimContext *ac, int channel_index,
Mask *mask = (Mask *)ale->data;
/* toggle expand
- * - although the triangle widget already allows this, the whole channel can also be used for this purpose
+ * - although the triangle widget already allows this, the whole channel can also be used for this purpose
*/
mask->flag ^= MASK_ANIMF_EXPAND;
@@ -3006,8 +3006,8 @@ static int animchannels_mouseclick_invoke(bContext *C, wmOperator *op, const wmE
/* figure out which channel user clicked in
* Note: although channels technically start at (y = ACHANNEL_FIRST), we need to adjust by half a channel's height
- * so that the tops of channels get caught ok. Since ACHANNEL_FIRST is really ACHANNEL_HEIGHT, we simply use
- * ACHANNEL_HEIGHT_HALF.
+ * so that the tops of channels get caught ok. Since ACHANNEL_FIRST is really ACHANNEL_HEIGHT, we simply use
+ * ACHANNEL_HEIGHT_HALF.
*/
UI_view2d_region_to_view(v2d, event->mval[0], event->mval[1], &x, &y);
UI_view2d_listview_view_to_cell(v2d, ACHANNEL_NAMEWIDTH, ACHANNEL_STEP(&ac), 0, (float)ACHANNEL_HEIGHT_HALF(&ac), x, y, NULL, &channel_index);
diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c
index c71acd714d3..6697997b133 100644
--- a/source/blender/editors/animation/anim_deps.c
+++ b/source/blender/editors/animation/anim_deps.c
@@ -120,8 +120,8 @@ void ANIM_id_update(Scene *UNUSED(scene), ID *id)
/* **************************** animation data <-> data syncing ******************************** */
/* This code here is used to synchronize the
- * - selection (to find selected data easier)
- * - ... (insert other relevant items here later)
+ * - selection (to find selected data easier)
+ * - ... (insert other relevant items here later)
* status in relevant Blender data with the status stored in animation channels.
*
* This should be called in the refresh() callbacks for various editors in
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index 3feb14cd0f1..a21bc4989b5 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -80,9 +80,9 @@ static void draw_cfra_number(Scene *scene, View2D *v2d, const float cfra, const
glScalef(1.0f / xscale, 1.0f, 1.0f);
/* get timecode string
- * - padding on str-buf passed so that it doesn't sit on the frame indicator
- * - power = 0, gives 'standard' behavior for time
- * but power = 1 is required for frames (to get integer frames)
+ * - padding on str-buf passed so that it doesn't sit on the frame indicator
+ * - power = 0, gives 'standard' behavior for time
+ * but power = 1 is required for frames (to get integer frames)
*/
if (time) {
BLI_timecode_string_from_time(&numstr[4], sizeof(numstr) - 4, 0, FRA2TIME(cfra), FPS, U.timecode_style);
@@ -233,8 +233,8 @@ static short bezt_nlamapping_apply(KeyframeEditData *ked, BezTriple *bezt)
/* Apply/Unapply NLA mapping to all keyframes in the nominated F-Curve
- * - restore = whether to map points back to non-mapped time
- * - only_keys = whether to only adjust the location of the center point of beztriples
+ * - restore = whether to map points back to non-mapped time
+ * - only_keys = whether to only adjust the location of the center point of beztriples
*/
void ANIM_nla_mapping_apply_fcurve(AnimData *adt, FCurve *fcu, bool restore, bool only_keys)
{
@@ -242,8 +242,8 @@ void ANIM_nla_mapping_apply_fcurve(AnimData *adt, FCurve *fcu, bool restore, boo
KeyframeEditFunc map_cb;
/* init edit data
- * - AnimData is stored in 'data'
- * - only_keys is stored in 'i1'
+ * - AnimData is stored in 'data'
+ * - only_keys is stored in 'i1'
*/
ked.data = (void *)adt;
ked.i1 = (int)only_keys;
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 4659fc2ca18..fdfe08e03b6 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -322,8 +322,8 @@ static bool nlaedit_get_context(bAnimContext *ac, SpaceNla *snla)
/* ----------- Public API --------------- */
/* Obtain current anim-data context, given that context info from Blender context has already been set
- * - AnimContext to write to is provided as pointer to var on stack so that we don't have
- * allocation/freeing costs (which are not that avoidable with channels).
+ * - AnimContext to write to is provided as pointer to var on stack so that we don't have
+ * allocation/freeing costs (which are not that avoidable with channels).
*/
bool ANIM_animdata_context_getdata(bAnimContext *ac)
{
@@ -359,9 +359,9 @@ bool ANIM_animdata_context_getdata(bAnimContext *ac)
}
/* Obtain current anim-data context from Blender Context info
- * - AnimContext to write to is provided as pointer to var on stack so that we don't have
- * allocation/freeing costs (which are not that avoidable with channels).
- * - Clears data and sets the information from Blender Context which is useful
+ * - AnimContext to write to is provided as pointer to var on stack so that we don't have
+ * allocation/freeing costs (which are not that avoidable with channels).
+ * - Clears data and sets the information from Blender Context which is useful
*/
bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
{
@@ -403,12 +403,12 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
* to abstract away some of the tricky logic involved
*
* cases:
- * 1) Graph Edit main area (just data) OR channels visible in Channel List
- * 2) If not showing channels, we're only interested in the data (Action Editor's editing)
- * 3) We don't care what data, we just care there is some (so that a collapsed
- * channel can be kept around). No need to clear channels-flag in order to
- * keep expander channels with no sub-data out, as those cases should get
- * dealt with by the recursive detection idiom in place.
+ * 1) Graph Edit main area (just data) OR channels visible in Channel List
+ * 2) If not showing channels, we're only interested in the data (Action Editor's editing)
+ * 3) We don't care what data, we just care there is some (so that a collapsed
+ * channel can be kept around). No need to clear channels-flag in order to
+ * keep expander channels with no sub-data out, as those cases should get
+ * dealt with by the recursive detection idiom in place.
*
* Implementation Note:
* YES the _doSubChannels variable is NOT read anywhere. BUT, this is NOT an excuse
@@ -455,28 +455,28 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
*
* For this to work correctly, a standard set of data needs to be available within the scope that this
* gets called in:
- * - ListBase anim_data;
- * - bDopeSheet *ads;
- * - bAnimListElem *ale;
- * - size_t items;
+ * - ListBase anim_data;
+ * - bDopeSheet *ads;
+ * - bAnimListElem *ale;
+ * - size_t items;
*
- * - id: ID block which should have an AnimData pointer following it immediately, to use
- * - adtOk: line or block of code to execute for AnimData-blocks case (usually ANIMDATA_ADD_ANIMDATA)
- * - nlaOk: line or block of code to execute for NLA tracks+strips case
- * - driversOk: line or block of code to execute for Drivers case
- * - nlaKeysOk: line or block of code for NLA Strip Keyframes case
- * - keysOk: line or block of code for Keyframes case
+ * - id: ID block which should have an AnimData pointer following it immediately, to use
+ * - adtOk: line or block of code to execute for AnimData-blocks case (usually ANIMDATA_ADD_ANIMDATA)
+ * - nlaOk: line or block of code to execute for NLA tracks+strips case
+ * - driversOk: line or block of code to execute for Drivers case
+ * - nlaKeysOk: line or block of code for NLA Strip Keyframes case
+ * - keysOk: line or block of code for Keyframes case
*
* The checks for the various cases are as follows:
- * 0) top level: checks for animdata and also that all the F-Curves for the block will be visible
- * 1) animdata check: for filtering animdata blocks only
- * 2A) nla tracks: include animdata block's data as there are NLA tracks+strips there
- * 2B) actions to convert to nla: include animdata block's data as there is an action that can be
- * converted to a new NLA strip, and the filtering options allow this
- * 2C) allow non-animated datablocks to be included so that datablocks can be added
- * 3) drivers: include drivers from animdata block (for Drivers mode in Graph Editor)
- * 4A) nla strip keyframes: these are the per-strip controls for time and influence
- * 4B) normal keyframes: only when there is an active action
+ * 0) top level: checks for animdata and also that all the F-Curves for the block will be visible
+ * 1) animdata check: for filtering animdata blocks only
+ * 2A) nla tracks: include animdata block's data as there are NLA tracks+strips there
+ * 2B) actions to convert to nla: include animdata block's data as there is an action that can be
+ * converted to a new NLA strip, and the filtering options allow this
+ * 2C) allow non-animated datablocks to be included so that datablocks can be added
+ * 3) drivers: include drivers from animdata block (for Drivers mode in Graph Editor)
+ * 4A) nla strip keyframes: these are the per-strip controls for time and influence
+ * 4B) normal keyframes: only when there is an active action
*/
#define ANIMDATA_FILTER_CASES(id, adtOk, nlaOk, driversOk, nlaKeysOk, keysOk) \
{ \
@@ -546,12 +546,12 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
((filter_mode & ANIMFILTER_UNSEL) && test_func == 0) )
/* quick macro to test if an anim-channel (F-Curve) is selected ok for editing purposes
- * - _SELEDIT means that only selected curves will have visible+editable keyframes
+ * - _SELEDIT means that only selected curves will have visible+editable keyframes
*
* checks here work as follows:
- * 1) seledit off - don't need to consider the implications of this option
- * 2) foredit off - we're not considering editing, so channel is ok still
- * 3) test_func (i.e. selection test) - only if selected, this test will pass
+ * 1) seledit off - don't need to consider the implications of this option
+ * 2) foredit off - we're not considering editing, so channel is ok still
+ * 3) test_func (i.e. selection test) - only if selected, this test will pass
*/
#define ANIMCHANNEL_SELEDITOK(test_func) \
(!(filter_mode & ANIMFILTER_SELEDIT) || \
@@ -1169,12 +1169,12 @@ static FCurve *animfilter_fcurve_next(bDopeSheet *ads, FCurve *first, eAnim_Chan
*/
for (fcu = first; ((fcu) && (fcu->grp == grp)); fcu = fcu->next) {
/* special exception for Pose-Channel/Sequence-Strip/Node Based F-Curves:
- * - the 'Only Selected' and 'Include Hidden' data filters should be applied to sub-ID data which
- * can be independently selected/hidden, such as Pose-Channels, Sequence Strips, and Nodes.
- * Since these checks were traditionally done as first check for objects, we do the same here
- * - we currently use an 'approximate' method for getting these F-Curves that doesn't require
- * carefully checking the entire path
- * - this will also affect things like Drivers, and also works for Bone Constraints
+ * - the 'Only Selected' and 'Include Hidden' data filters should be applied to sub-ID data which
+ * can be independently selected/hidden, such as Pose-Channels, Sequence Strips, and Nodes.
+ * Since these checks were traditionally done as first check for objects, we do the same here
+ * - we currently use an 'approximate' method for getting these F-Curves that doesn't require
+ * carefully checking the entire path
+ * - this will also affect things like Drivers, and also works for Bone Constraints
*/
if (ads && owner_id) {
if ((filter_mode & ANIMFILTER_TMP_IGNORE_ONLYSEL) == 0) {
@@ -1227,13 +1227,13 @@ static size_t animfilter_fcurves(ListBase *anim_data, bDopeSheet *ads,
size_t items = 0;
/* loop over every F-Curve able to be included
- * - this for-loop works like this:
- * 1) the starting F-Curve is assigned to the fcu pointer so that we have a starting point to search from
- * 2) the first valid F-Curve to start from (which may include the one given as 'first') in the remaining
- * list of F-Curves is found, and verified to be non-null
- * 3) the F-Curve referenced by fcu pointer is added to the list
- * 4) the fcu pointer is set to the F-Curve after the one we just added, so that we can keep going through
- * the rest of the F-Curve list without an eternal loop. Back to step 2 :)
+ * - this for-loop works like this:
+ * 1) the starting F-Curve is assigned to the fcu pointer so that we have a starting point to search from
+ * 2) the first valid F-Curve to start from (which may include the one given as 'first') in the remaining
+ * list of F-Curves is found, and verified to be non-null
+ * 3) the F-Curve referenced by fcu pointer is added to the list
+ * 4) the fcu pointer is set to the F-Curve after the one we just added, so that we can keep going through
+ * the rest of the F-Curve list without an eternal loop. Back to step 2 :)
*/
for (fcu = first; ( (fcu = animfilter_fcurve_next(ads, fcu, fcurve_type, filter_mode, owner, owner_id)) ); fcu = fcu->next) {
if (UNLIKELY(fcurve_type == ANIMTYPE_NLACURVE)) {
@@ -1262,9 +1262,9 @@ static size_t animfilter_act_group(bAnimContext *ac, ListBase *anim_data, bDopeS
/* if we care about the selection status of the channels,
* but the group isn't expanded (1)...
- * (1) this only matters if we actually care about the hierarchy though.
- * - Hierarchy matters: this hack should be applied
- * - Hierarchy ignored: cases like [#21276] won't work properly, unless we skip this hack
+ * (1) this only matters if we actually care about the hierarchy though.
+ * - Hierarchy matters: this hack should be applied
+ * - Hierarchy ignored: cases like [#21276] won't work properly, unless we skip this hack
*/
if ( ((filter_mode & ANIMFILTER_LIST_VISIBLE) && EXPANDED_AGRP(ac, agrp) == 0) && /* care about hierarchy but group isn't expanded */
(filter_mode & (ANIMFILTER_SEL | ANIMFILTER_UNSEL)) ) /* care about selection status */
@@ -1277,9 +1277,9 @@ static size_t animfilter_act_group(bAnimContext *ac, ListBase *anim_data, bDopeS
* since this creates too much overhead for animators (i.e. making a slow workflow)
*
* Tools affected by this at time of coding (2010 Feb 09):
- * - inserting keyframes on selected channels only
- * - pasting keyframes
- * - creating ghost curves in Graph Editor
+ * - inserting keyframes on selected channels only
+ * - pasting keyframes
+ * - creating ghost curves in Graph Editor
*/
filter_mode &= ~(ANIMFILTER_SEL | ANIMFILTER_UNSEL | ANIMFILTER_LIST_VISIBLE);
}
@@ -1364,12 +1364,12 @@ static size_t animfilter_action(bAnimContext *ac, ListBase *anim_data, bDopeShee
}
/* Include NLA-Data for NLA-Editor:
- * - when ANIMFILTER_LIST_CHANNELS is used, that means we should be filtering the list for display
- * Although the evaluation order is from the first track to the last and then apply the Action on top,
- * we present this in the UI as the Active Action followed by the last track to the first so that we
- * get the evaluation order presented as per a stack.
- * - for normal filtering (i.e. for editing), we only need the NLA-tracks but they can be in 'normal' evaluation
- * order, i.e. first to last. Otherwise, some tools may get screwed up.
+ * - when ANIMFILTER_LIST_CHANNELS is used, that means we should be filtering the list for display
+ * Although the evaluation order is from the first track to the last and then apply the Action on top,
+ * we present this in the UI as the Active Action followed by the last track to the first so that we
+ * get the evaluation order presented as per a stack.
+ * - for normal filtering (i.e. for editing), we only need the NLA-tracks but they can be in 'normal' evaluation
+ * order, i.e. first to last. Otherwise, some tools may get screwed up.
*/
static size_t animfilter_nla(bAnimContext *UNUSED(ac), ListBase *anim_data, bDopeSheet *ads, AnimData *adt, int filter_mode, ID *owner_id)
{
@@ -1386,8 +1386,8 @@ static size_t animfilter_nla(bAnimContext *UNUSED(ac), ListBase *anim_data, bDop
/* there isn't really anything editable here, so skip if need editable */
if ((filter_mode & ANIMFILTER_FOREDIT) == 0) {
/* just add the action track now (this MUST appear for drawing)
- * - as AnimData may not have an action, we pass a dummy pointer just to get the list elem created, then
- * overwrite this with the real value - REVIEW THIS...
+ * - as AnimData may not have an action, we pass a dummy pointer just to get the list elem created, then
+ * overwrite this with the real value - REVIEW THIS...
*/
ANIMCHANNEL_NEW_CHANNEL_FULL((void *)(&adt->action), ANIMTYPE_NLAACTION, owner_id,
{
@@ -1413,7 +1413,7 @@ static size_t animfilter_nla(bAnimContext *UNUSED(ac), ListBase *anim_data, bDop
next = nlt->next;
/* if we're in NLA-tweakmode, don't show this track if it was disabled (due to tweaking) for now
- * - active track should still get shown though (even though it has disabled flag set)
+ * - active track should still get shown though (even though it has disabled flag set)
*/
// FIXME: the channels after should still get drawn, just 'differently', and after an active-action channel
if ((adt->flag & ADT_NLA_EDIT_ON) && (nlt->flag & NLATRACK_DISABLED) && (adt->act_track != nlt))
@@ -1501,7 +1501,7 @@ static size_t animfilter_nla_controls(ListBase *anim_data, bDopeSheet *ads, Anim
items += tmp_items;
}
- /* return the numebr of items added to the list */
+ /* return the number of items added to the list */
return items;
}
@@ -1687,13 +1687,13 @@ static size_t animdata_filter_gpencil(bAnimContext *ac, ListBase *anim_data, voi
Object *ob = base->object;
/* firstly, check if object can be included, by the following factors:
- * - if only visible, must check for layer and also viewport visibility
- * --> while tools may demand only visible, user setting takes priority
- * as user option controls whether sets of channels get included while
- * tool-flag takes into account collapsed/open channels too
- * - if only selected, must check if object is selected
- * - there must be animation data to edit (this is done recursively as we
- * try to add the channels)
+ * - if only visible, must check for layer and also viewport visibility
+ * --> while tools may demand only visible, user setting takes priority
+ * as user option controls whether sets of channels get included while
+ * tool-flag takes into account collapsed/open channels too
+ * - if only selected, must check if object is selected
+ * - there must be animation data to edit (this is done recursively as we
+ * try to add the channels)
*/
if ((filter_mode & ANIMFILTER_DATA_VISIBLE) && !(ads->filterflag & ADS_FILTER_INCL_HIDDEN)) {
/* layer visibility - we check both object and base, since these may not be in sync yet */
@@ -1711,7 +1711,7 @@ static size_t animdata_filter_gpencil(bAnimContext *ac, ListBase *anim_data, voi
/* check if object belongs to the filtering group if option to filter
* objects by the grouped status is on
- * - used to ease the process of doing multiple-character choreographies
+ * - used to ease the process of doing multiple-character choreographies
*/
if (ads->filterflag & ADS_FILTER_ONLYOBGROUP) {
if (BKE_group_object_exists(ads->filter_grp, ob) == 0)
@@ -2853,13 +2853,13 @@ static bool animdata_filter_base_is_ok(bDopeSheet *ads, Scene *scene, Base *base
return false;
/* firstly, check if object can be included, by the following factors:
- * - if only visible, must check for layer and also viewport visibility
- * --> while tools may demand only visible, user setting takes priority
- * as user option controls whether sets of channels get included while
- * tool-flag takes into account collapsed/open channels too
- * - if only selected, must check if object is selected
- * - there must be animation data to edit (this is done recursively as we
- * try to add the channels)
+ * - if only visible, must check for layer and also viewport visibility
+ * --> while tools may demand only visible, user setting takes priority
+ * as user option controls whether sets of channels get included while
+ * tool-flag takes into account collapsed/open channels too
+ * - if only selected, must check if object is selected
+ * - there must be animation data to edit (this is done recursively as we
+ * try to add the channels)
*/
if ((filter_mode & ANIMFILTER_DATA_VISIBLE) && !(ads->filterflag & ADS_FILTER_INCL_HIDDEN)) {
/* layer visibility - we check both object and base, since these may not be in sync yet */
@@ -2905,7 +2905,7 @@ static bool animdata_filter_base_is_ok(bDopeSheet *ads, Scene *scene, Base *base
/* check if object belongs to the filtering group if option to filter
* objects by the grouped status is on
- * - used to ease the process of doing multiple-character choreographies
+ * - used to ease the process of doing multiple-character choreographies
*/
if (ads->filterflag & ADS_FILTER_ONLYOBGROUP) {
if (BKE_group_object_exists(ads->filter_grp, ob) == 0)
@@ -2984,10 +2984,10 @@ static size_t animdata_filter_dopesheet(bAnimContext *ac, ListBase *anim_data, b
/* If filtering for channel drawing, we want the objects in alphabetical order,
* to make it easier to predict where items are in the hierarchy
- * - This order only really matters if we need to show all channels in the list (e.g. for drawing)
- * (XXX: What about lingering "active" flags? The order may now become unpredictable)
- * - Don't do this if this behaviour has been turned off (i.e. due to it being too slow)
- * - Don't do this if there's just a single object
+ * - This order only really matters if we need to show all channels in the list (e.g. for drawing)
+ * (XXX: What about lingering "active" flags? The order may now become unpredictable)
+ * - Don't do this if this behaviour has been turned off (i.e. due to it being too slow)
+ * - Don't do this if there's just a single object
*/
if ((filter_mode & ANIMFILTER_LIST_CHANNELS) && !(ads->flag & ADS_FLAG_NO_DB_SORT) &&
(scene->base.first != scene->base.last))
@@ -3027,16 +3027,16 @@ static size_t animdata_filter_dopesheet(bAnimContext *ac, ListBase *anim_data, b
}
/* Summary track for DopeSheet/Action Editor
- * - return code is whether the summary lets the other channels get drawn
+ * - return code is whether the summary lets the other channels get drawn
*/
static short animdata_filter_dopesheet_summary(bAnimContext *ac, ListBase *anim_data, int filter_mode, size_t *items)
{
bDopeSheet *ads = NULL;
/* get the DopeSheet information to use
- * - we should only need to deal with the DopeSheet/Action Editor,
- * since all the other Animation Editors won't have this concept
- * being applicable.
+ * - we should only need to deal with the DopeSheet/Action Editor,
+ * since all the other Animation Editors won't have this concept
+ * being applicable.
*/
if ((ac && ac->sl) && (ac->spacetype == SPACE_ACTION)) {
SpaceAction *saction = (SpaceAction *)ac->sl;
@@ -3048,8 +3048,8 @@ static short animdata_filter_dopesheet_summary(bAnimContext *ac, ListBase *anim_
}
/* dopesheet summary
- * - only for drawing and/or selecting keyframes in channels, but not for real editing
- * - only useful for DopeSheet/Action/etc. editors where it is actually useful
+ * - only for drawing and/or selecting keyframes in channels, but not for real editing
+ * - only useful for DopeSheet/Action/etc. editors where it is actually useful
*/
if ((filter_mode & ANIMFILTER_LIST_CHANNELS) && (ads->filterflag & ADS_FILTER_SUMMARY)) {
bAnimListElem *ale = make_new_animlistelem(ac, ANIMTYPE_SUMMARY, NULL);
@@ -3059,7 +3059,7 @@ static short animdata_filter_dopesheet_summary(bAnimContext *ac, ListBase *anim_
}
/* if summary is collapsed, don't show other channels beneath this
- * - this check is put inside the summary check so that it doesn't interfere with normal operation
+ * - this check is put inside the summary check so that it doesn't interfere with normal operation
*/
if (ads->flag & ADS_FLAG_SUMMARY_COLLAPSED)
return 0;
@@ -3145,8 +3145,8 @@ static size_t animdata_filter_remove_duplis(ListBase *anim_data)
next = ale->next;
/* check if hash has any record of an entry like this
- * - 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)
+ * - 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_gset_add(gs, ale->data)) {
/* this entry is 'unique' and can be kept */
@@ -3170,9 +3170,9 @@ static size_t animdata_filter_remove_duplis(ListBase *anim_data)
/* This function filters the active data source to leave only animation channels suitable for
* usage by the caller. It will return the length of the list
*
- * *anim_data: is a pointer to a ListBase, to which the filtered animation channels
- * will be placed for use.
- * filter_mode: how should the data be filtered - bitmapping accessed flags
+ * *anim_data: is a pointer to a ListBase, to which the filtered animation channels
+ * will be placed for use.
+ * filter_mode: how should the data be filtered - bitmapping accessed flags
*/
size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, eAnimFilter_Flags filter_mode, void *data, eAnimCont_Types datatype)
{
diff --git a/source/blender/editors/animation/anim_intern.h b/source/blender/editors/animation/anim_intern.h
index 8c4e2acd48d..8f237652e77 100644
--- a/source/blender/editors/animation/anim_intern.h
+++ b/source/blender/editors/animation/anim_intern.h
@@ -39,15 +39,15 @@ extern ListBase builtin_keyingsets;
/* Operator Define Prototypes ------------------- */
/* Main Keyframe Management operators:
- * These handle keyframes management from various spaces. They only make use of
- * Keying Sets.
+ * These handle keyframes management from various spaces. They only make use of
+ * Keying Sets.
*/
void ANIM_OT_keyframe_insert(struct wmOperatorType *ot);
void ANIM_OT_keyframe_delete(struct wmOperatorType *ot);
/* Main Keyframe Management operators:
- * These handle keyframes management from various spaces. They will handle the menus
- * required for each space.
+ * These handle keyframes management from various spaces. They will handle the menus
+ * required for each space.
*/
void ANIM_OT_keyframe_insert_menu(struct wmOperatorType *ot);
diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c
index 4e0993152f7..d88a418fa06 100644
--- a/source/blender/editors/animation/anim_ipo_utils.c
+++ b/source/blender/editors/animation/anim_ipo_utils.c
@@ -19,7 +19,7 @@
* All rights reserved.
*
* Contributor(s): Blender Foundation, 2005. Full recode
- * Joshua Leung
+ * Joshua Leung
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -87,10 +87,10 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
/* For now, name will consist of 3 parts: struct-name, property name, array index
* There are several options possible:
- * 1) <struct-name>.<property-name>.<array-index>
- * i.e. Bone1.Location.X, or Object.Location.X
- * 2) <array-index> <property-name> (<struct name>)
- * i.e. X Location (Bone1), or X Location (Object)
+ * 1) <struct-name>.<property-name>.<array-index>
+ * i.e. Bone1.Location.X, or Object.Location.X
+ * 2) <array-index> <property-name> (<struct name>)
+ * i.e. X Location (Bone1), or X Location (Object)
*
* Currently, option 2 is in use, to try and make it easier to quickly identify F-Curves (it does have
* problems with looking rather odd though). Option 1 is better in terms of revealing a consistent sense of
@@ -98,11 +98,11 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
*/
/* for structname
- * - as base, we use a custom name from the structs if one is available
- * - however, if we're showing subdata of bones (probably there will be other exceptions later)
- * need to include that info too since it gets confusing otherwise
- * - if a pointer just refers to the ID-block, then don't repeat this info
- * since this just introduces clutter
+ * - as base, we use a custom name from the structs if one is available
+ * - however, if we're showing subdata of bones (probably there will be other exceptions later)
+ * need to include that info too since it gets confusing otherwise
+ * - if a pointer just refers to the ID-block, then don't repeat this info
+ * since this just introduces clutter
*/
if (strstr(fcu->rna_path, "bones") && strstr(fcu->rna_path, "constraints")) {
/* perform string 'chopping' to get "Bone Name : Constraint Name" */
@@ -160,7 +160,7 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
/* Icon for this property's owner:
- * use the struct's icon if it is set
+ * use the struct's icon if it is set
*/
icon = RNA_struct_ui_icon(ptr.type);
@@ -200,8 +200,8 @@ void getcolor_fcurve_rainbow(int cur, int tot, float out[3])
/* we try to divide the color into groupings of n colors,
* where n is:
- * 3 - for 'odd' numbers of curves - there should be a majority of triplets of curves
- * 4 - for 'even' numbers of curves - there should be a majority of quartets of curves
+ * 3 - for 'odd' numbers of curves - there should be a majority of triplets of curves
+ * 4 - for 'even' numbers of curves - there should be a majority of quartets of curves
* so the base color is simply one of the three primary colors
*/
grouping = (4 - (tot % 2));
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 836a2ca948d..05682292485 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -588,7 +588,7 @@ static int ed_markers_opwrap_invoke(bContext *C, wmOperator *op, const wmEvent *
/* ************************** add markers *************************** */
-/* add TimeMarker at curent frame */
+/* add TimeMarker at current frame */
static int ed_marker_add_exec(bContext *C, wmOperator *UNUSED(op))
{
ListBase *markers = ED_context_get_markers(C);
@@ -816,7 +816,7 @@ static int ed_marker_move_invoke_wrapper(bContext *C, wmOperator *op, const wmEv
return ed_markers_opwrap_invoke_custom(C, op, event, ed_marker_move_invoke);
}
-/* note, init has to be called succesfully */
+/* note, init has to be called successfully */
static void ed_marker_move_apply(bContext *C, wmOperator *op)
{
#ifdef DURIAN_CAMERA_SWITCH
diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c
index ce991f64d5d..068d1c80f9b 100644
--- a/source/blender/editors/animation/anim_ops.c
+++ b/source/blender/editors/animation/anim_ops.c
@@ -299,8 +299,8 @@ static int previewrange_define_exec(bContext *C, wmOperator *op)
efra = UI_view2d_region_to_view_x(&ar->v2d, rect.xmax);
/* set start/end frames for preview-range
- * - must clamp within allowable limits
- * - end must not be before start (though this won't occur most of the time)
+ * - must clamp within allowable limits
+ * - end must not be before start (though this won't occur most of the time)
*/
FRAMENUMBER_MIN_CLAMP(sfra);
FRAMENUMBER_MIN_CLAMP(efra);
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index 66d636e6008..ebe085cd006 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -68,10 +68,10 @@
/* Get (or add relevant data to be able to do so) F-Curve from the driver stack,
* 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 (with keyframes for visual tweaking),
- * 2 - add new Driver FCurve (with generator, for script backwards compatibility)
- * -1 - add new Driver FCurve without driver stuff (for pasting)
+ * - add: 0 - don't add anything if not found,
+ * 1 - add new Driver FCurve (with keyframes for visual tweaking),
+ * 2 - add new Driver FCurve (with generator, for script backwards compatibility)
+ * -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)
{
@@ -92,8 +92,8 @@ FCurve *verify_driver_fcurve(ID *id, const char rna_path[], const int array_inde
}
/* try to find f-curve matching for this setting
- * - add if not found and allowed to add one
- * TODO: add auto-grouping support? how this works will need to be resolved
+ * - add if not found and allowed to add one
+ * TODO: add auto-grouping support? how this works will need to be resolved
*/
fcu = list_find_fcurve(&adt->drivers, rna_path, array_index);
@@ -580,8 +580,8 @@ bool ANIM_copy_driver(ReportList *reports, ID *id, const char rna_path[], int ar
}
/* Main Driver Management API calls:
- * Add a new driver for the specified property on the given ID block or replace an existing one
- * with the driver + driver-curve data from the buffer
+ * Add a new driver for the specified property on the given ID block or replace an existing one
+ * with the driver + driver-curve data from the buffer
*/
bool ANIM_paste_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short UNUSED(flag))
{
diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c
index 951dcc2dddf..3136b3e7137 100644
--- a/source/blender/editors/animation/fmodifier_ui.c
+++ b/source/blender/editors/animation/fmodifier_ui.c
@@ -387,7 +387,7 @@ static void fmod_envelope_deletepoint_cb(bContext *UNUSED(C), void *fcm_dv, void
{
FMod_Envelope *env = (FMod_Envelope *)fcm_dv;
FCM_EnvelopeData *fedn;
- int index = GET_INT_FROM_POINTER(ind_v);
+ int index = POINTER_AS_INT(ind_v);
/* check that no data exists for the current frame... */
if (env->totvert > 1) {
@@ -465,7 +465,7 @@ static void draw_modifier__envelope(uiLayout *layout, ID *id, FModifier *fcm, sh
but = uiDefIconBut(block, UI_BTYPE_BUT, B_FMODIFIER_REDRAW, ICON_X, 0, 0, 0.9 * UI_UNIT_X, UI_UNIT_Y,
NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Delete envelope control point"));
- UI_but_func_set(but, fmod_envelope_deletepoint_cb, env, SET_INT_IN_POINTER(i));
+ UI_but_func_set(but, fmod_envelope_deletepoint_cb, env, POINTER_FROM_INT(i));
UI_block_align_begin(block);
}
}
@@ -705,7 +705,7 @@ void ANIM_fmodifiers_copybuf_free(void)
/* copy the given F-Modifiers to the buffer, returning whether anything was copied or not
* assuming that the buffer has been cleared already with ANIM_fmodifiers_copybuf_free()
- * - active: only copy the active modifier
+ * - active: only copy the active modifier
*/
bool ANIM_fmodifiers_copy_to_buf(ListBase *modifiers, bool active)
{
@@ -734,7 +734,7 @@ bool ANIM_fmodifiers_copy_to_buf(ListBase *modifiers, bool active)
}
/* 'Paste' the F-Modifier(s) from the buffer to the specified list
- * - replace: free all the existing modifiers to leave only the pasted ones
+ * - replace: free all the existing modifiers to leave only the pasted ones
*/
bool ANIM_fmodifiers_paste_from_buf(ListBase *modifiers, bool replace, FCurve *curve)
{
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c
index 9136bdec34a..54e0839d802 100644
--- a/source/blender/editors/animation/keyframes_draw.c
+++ b/source/blender/editors/animation/keyframes_draw.c
@@ -324,8 +324,8 @@ static void add_bezt_to_keyblocks_list(DLRBT_Tree *blocks, BezTriple *first_bezt
}
else {
/* Check for same values...
- * - Handles must have same central value as each other
- * - Handles which control that section of the curve must be constant
+ * - Handles must have same central value as each other
+ * - Handles which control that section of the curve must be constant
*/
if (IS_EQF(beztn->vec[1][1], prev->vec[1][1]) == 0) return;
@@ -348,9 +348,9 @@ static void add_bezt_to_keyblocks_list(DLRBT_Tree *blocks, BezTriple *first_bezt
* an A ___ B |---| B situation
*/
// FIXME: here there is a bug where we are trying to get the summary for the following channels
- // A|--------------|A ______________ B|--------------|B
- // A|------------------------------------------------|A
- // A|----|A|---|A|-----------------------------------|A
+ // A|--------------|A ______________ B|--------------|B
+ // A|------------------------------------------------|A
+ // A|----|A|---|A|-----------------------------------|A
for (ab = blocks->root; ab; ab = abn) {
/* check if this is a match, or whether we go left or right
* NOTE: we now use a float threshold to prevent precision errors causing problems with summaries
@@ -674,7 +674,7 @@ static void draw_keylist(View2D *v2d, DLRBT_Tree *keys, DLRBT_Tree *blocks, floa
if (keys) {
for (ak = keys->first; ak; ak = ak->next) {
/* optimization: if keyframe doesn't appear within 5 units (screenspace) in visible area, don't draw
- * - this might give some improvements, since we current have to flip between view/region matrices
+ * - this might give some improvements, since we current have to flip between view/region matrices
*/
if (IN_RANGE_INCL(ak->cfra, v2d->cur.xmin, v2d->cur.xmax) == 0)
continue;
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index 1bbfa6cc979..c8b0ed391f9 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -53,7 +53,7 @@
/* This file defines an API and set of callback-operators for non-destructive editing of keyframe data.
*
* Two API functions are defined for actually performing the operations on the data:
- * ANIM_fcurve_keyframes_loop()
+ * ANIM_fcurve_keyframes_loop()
* which take the data they operate on, a few callbacks defining what operations to perform.
*
* As operators which work on keyframes usually apply the same operation on all BezTriples in
@@ -107,7 +107,7 @@ short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked, FCurve *fcu, KeyframeEdi
ked->curflags = 0;
}
- /* Only operate on this BezTriple if it fullfills the criteria of the validation func */
+ /* Only operate on this BezTriple if it fulfills the criteria of the validation func */
if ((ok = key_ok(ked, bezt))) {
if (ked) ked->curflags = ok;
@@ -436,8 +436,8 @@ void ANIM_editkeyframes_refresh(bAnimContext *ac)
/* Some macros to make this easier... */
/* run the given check on the 3 handles
- * - check should be a macro, which takes the handle index as its single arg, which it substitutes later
- * - requires that a var, of type short, is named 'ok', and has been initialized to 0
+ * - check should be a macro, which takes the handle index as its single arg, which it substitutes later
+ * - requires that a var, of type short, is named 'ok', and has been initialized to 0
*/
#define KEYFRAME_OK_CHECKS(check) \
{ \
@@ -497,8 +497,8 @@ static short ok_bezier_value(KeyframeEditData *ked, BezTriple *bezt)
short ok = 0;
/* value is stored in f1 property
- * - this float accuracy check may need to be dropped?
- * - should value be stored in f2 instead so that we won't have conflicts when using f1 for frames too?
+ * - this float accuracy check may need to be dropped?
+ * - should value be stored in f2 instead so that we won't have conflicts when using f1 for frames too?
*/
#define KEY_CHECK_OK(_index) IS_EQF(bezt->vec[_index][1], ked->f1)
KEYFRAME_OK_CHECKS(KEY_CHECK_OK);
@@ -709,7 +709,7 @@ short bezt_calc_average(KeyframeEditData *ked, BezTriple *bezt)
ked->f1 += bezt->vec[1][0];
/* store average value in float 2 (only do rounding at last step)
- * - this isn't always needed, but some operators may also require this
+ * - this isn't always needed, but some operators may also require this
*/
ked->f2 += bezt->vec[1][1];
@@ -761,7 +761,7 @@ static short snap_bezier_nearest(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
return 0;
}
-/* snaps the keyframe to the neares second */
+/* snaps the keyframe to the nearest second */
static short snap_bezier_nearestsec(KeyframeEditData *ked, BezTriple *bezt)
{
const Scene *scene = ked->scene;
@@ -882,7 +882,7 @@ static short mirror_bezier_cframe(KeyframeEditData *ked, BezTriple *bezt)
static short mirror_bezier_yaxis(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if (bezt->f2 & SELECT) {
- /* Yes, names are inverted, we are mirroring accross y axis, hence along x axis... */
+ /* Yes, names are inverted, we are mirroring across y axis, hence along x axis... */
mirror_bezier_xaxis_ex(bezt, 0.0f);
}
@@ -892,7 +892,7 @@ static short mirror_bezier_yaxis(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
static short mirror_bezier_xaxis(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if (bezt->f2 & SELECT) {
- /* Yes, names are inverted, we are mirroring accross x axis, hence along y axis... */
+ /* Yes, names are inverted, we are mirroring across x axis, hence along y axis... */
mirror_bezier_yaxis_ex(bezt, 0.0f);
}
@@ -911,7 +911,7 @@ static short mirror_bezier_marker(KeyframeEditData *ked, BezTriple *bezt)
static short mirror_bezier_time(KeyframeEditData *ked, BezTriple *bezt)
{
- /* value to mirror over is strored in f1 */
+ /* value to mirror over is stored in f1 */
if (bezt->f2 & SELECT) {
mirror_bezier_xaxis_ex(bezt, ked->f1);
}
@@ -955,7 +955,7 @@ KeyframeEditFunc ANIM_editkeyframes_mirror(short type)
/* Settings */
/* standard validation step for a few of these (implemented as macro for inlining without fn-call overhead):
- * "if the handles are not of the same type, set them to type free"
+ * "if the handles are not of the same type, set them to type free"
*/
#define ENSURE_HANDLES_MATCH(bezt) \
if (bezt->h1 != bezt->h2) { \
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index 347e3f373bb..aad9835f2aa 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -83,8 +83,8 @@ void delete_fcurve_key(FCurve *fcu, int index, bool do_recalc)
return;
/* verify the index:
- * 1) cannot be greater than the number of available keyframes
- * 2) negative indices are for specifying a value from the end of the array
+ * 1) cannot be greater than the number of available keyframes
+ * 2) negative indices are for specifying a value from the end of the array
*/
if (abs(index) >= fcu->totvert)
return;
@@ -373,10 +373,10 @@ void smooth_fcurve(FCurve *fcu)
}
/* calculate the new smoothed F-Curve's with weighted averages:
- * - this is done with two passes to avoid progressive corruption errors
- * - uses 5 points for each operation (which stores in the relevant handles)
- * - previous: w/a ratio = 3:5:2:1:1
- * - next: w/a ratio = 1:1:2:5:3
+ * - this is done with two passes to avoid progressive corruption errors
+ * - uses 5 points for each operation (which stores in the relevant handles)
+ * - previous: w/a ratio = 3:5:2:1:1
+ * - next: w/a ratio = 1:1:2:5:3
*/
/* round 1: calculate smoothing deltas and new values */
@@ -466,7 +466,7 @@ void sample_fcurve(FCurve *fcu)
/* cache values then add keyframes using these values, as adding
* keyframes while sampling will affect the outcome...
- * - only start sampling+adding from index=1, so that we don't overwrite original keyframe
+ * - only start sampling+adding from index=1, so that we don't overwrite original keyframe
*/
range = (int)(ceil(end->vec[1][0] - start->vec[1][0]));
sfra = (int)(floor(start->vec[1][0]));
@@ -514,7 +514,7 @@ void sample_fcurve(FCurve *fcu)
/* - The copy/paste buffer currently stores a set of temporary F-Curves containing only the keyframes
* that were selected in each of the original F-Curves
* - All pasted frames are offset by the same amount. This is calculated as the difference in the times of
- * the current frame and the 'first keyframe' (i.e. the earliest one in all channels).
+ * the current frame and the 'first keyframe' (i.e. the earliest one in all channels).
* - The earliest frame is calculated per copy operation.
*/
@@ -587,8 +587,8 @@ short copy_animedit_keys(bAnimContext *ac, ListBase *anim_data)
int i;
/* firstly, check if F-Curve has any selected keyframes
- * - skip if no selected keyframes found (so no need to create unnecessary copy-buffer data)
- * - this check should also eliminate any problems associated with using sample-data
+ * - skip if no selected keyframes found (so no need to create unnecessary copy-buffer data)
+ * - this check should also eliminate any problems associated with using sample-data
*/
if (ANIM_fcurve_keyframes_loop(NULL, fcu, NULL, ANIM_editkeyframes_ok(BEZT_OK_SELECTED), NULL) == 0)
continue;
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index f7cfec4d48a..9ea43c160a6 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -177,8 +177,8 @@ FCurve *verify_fcurve(bAction *act, const char group[], PointerRNA *ptr,
return NULL;
/* try to find f-curve matching for this setting
- * - add if not found and allowed to add one
- * TODO: add auto-grouping support? how this works will need to be resolved
+ * - add if not found and allowed to add one
+ * TODO: add auto-grouping support? how this works will need to be resolved
*/
fcu = list_find_fcurve(&act->curves, rna_path, array_index);
@@ -361,10 +361,10 @@ int insert_bezt_fcurve(FCurve *fcu, const BezTriple *bezt, eInsertKeyFlags flag)
}
}
/* no keyframes already, but can only add if...
- * 1) keyframing modes say that keyframes can only be replaced, so adding new ones won't know
- * 2) there are no samples on the curve
- * // NOTE: maybe we may want to allow this later when doing samples -> bezt conversions,
- * // but for now, having both is asking for trouble
+ * 1) keyframing modes say that keyframes can only be replaced, so adding new ones won't know
+ * 2) there are no samples on the curve
+ * // NOTE: maybe we may want to allow this later when doing samples -> bezt conversions,
+ * // but for now, having both is asking for trouble
*/
else if ((flag & INSERTKEY_REPLACE) == 0 && (fcu->fpt == NULL)) {
/* create new keyframes array */
@@ -458,8 +458,8 @@ int insert_vert_fcurve(FCurve *fcu, float x, float y, eBezTriple_KeyframeType ke
if (a < 0) return -1;
/* don't recalculate handles if fast is set
- * - this is a hack to make importers faster
- * - we may calculate twice (due to autohandle needing to be calculated twice)
+ * - this is a hack to make importers faster
+ * - we may calculate twice (due to autohandle needing to be calculated twice)
*/
if ((flag & INSERTKEY_FAST) == 0)
calchandles_fcurve(fcu);
@@ -469,8 +469,8 @@ int insert_vert_fcurve(FCurve *fcu, float x, float y, eBezTriple_KeyframeType ke
BezTriple *bezt = (fcu->bezt + a);
/* set interpolation from previous (if available), but only if we didn't just replace some keyframe
- * - replacement is indicated by no-change in number of verts
- * - when replacing, the user may have specified some interpolation that should be kept
+ * - replacement is indicated by no-change in number of verts
+ * - when replacing, the user may have specified some interpolation that should be kept
*/
if (fcu->totvert > oldTot) {
if (a > 0)
@@ -480,8 +480,8 @@ int insert_vert_fcurve(FCurve *fcu, float x, float y, eBezTriple_KeyframeType ke
}
/* don't recalculate handles if fast is set
- * - this is a hack to make importers faster
- * - we may calculate twice (due to autohandle needing to be calculated twice)
+ * - this is a hack to make importers faster
+ * - we may calculate twice (due to autohandle needing to be calculated twice)
*/
if ((flag & INSERTKEY_FAST) == 0)
calchandles_fcurve(fcu);
@@ -502,9 +502,9 @@ enum {
/* This helper function determines whether a new keyframe is needed */
/* Cases where keyframes should not be added:
- * 1. Keyframe to be added between two keyframes with similar values
- * 2. Keyframe to be added on frame where two keyframes are already situated
- * 3. Keyframe lies at point that intersects the linear line between two keyframes
+ * 1. Keyframe to be added between two keyframes with similar values
+ * 2. Keyframe to be added on frame where two keyframes are already situated
+ * 3. Keyframe lies at point that intersects the linear line between two keyframes
*/
static short new_key_needed(FCurve *fcu, float cFrame, float nValue)
{
@@ -674,9 +674,9 @@ static bool visualkey_can_use(PointerRNA *ptr, PropertyRNA *prop)
return false;
/* get first constraint and determine type of keyframe constraints to check for
- * - constraints can be on either Objects or PoseChannels, so we only check if the
- * ptr->type is RNA_Object or RNA_PoseBone, which are the RNA wrapping-info for
- * those structs, allowing us to identify the owner of the data
+ * - constraints can be on either Objects or PoseChannels, so we only check if the
+ * ptr->type is RNA_Object or RNA_PoseBone, which are the RNA wrapping-info for
+ * those structs, allowing us to identify the owner of the data
*/
if (ptr->type == &RNA_Object) {
/* Object */
@@ -748,7 +748,7 @@ static bool visualkey_can_use(PointerRNA *ptr, PropertyRNA *prop)
case CONSTRAINT_TYPE_KINEMATIC:
return true;
- /* single-transform constraits */
+ /* single-transform constraints */
case CONSTRAINT_TYPE_TRACKTO:
if (searchtype == VISUALKEY_ROT) return true;
break;
@@ -804,11 +804,11 @@ static float visualkey_get_value(PointerRNA *ptr, PropertyRNA *prop, int array_i
int rotmode;
/* handle for Objects or PoseChannels only
- * - only Location, Rotation or Scale keyframes are supported currently
- * - constraints can be on either Objects or PoseChannels, so we only check if the
- * ptr->type is RNA_Object or RNA_PoseBone, which are the RNA wrapping-info for
- * those structs, allowing us to identify the owner of the data
- * - assume that array_index will be sane
+ * - only Location, Rotation or Scale keyframes are supported currently
+ * - constraints can be on either Objects or PoseChannels, so we only check if the
+ * ptr->type is RNA_Object or RNA_PoseBone, which are the RNA wrapping-info for
+ * those structs, allowing us to identify the owner of the data
+ * - assume that array_index will be sane
*/
if (ptr->type == &RNA_Object) {
Object *ob = (Object *)ptr->data;
@@ -879,14 +879,14 @@ static float visualkey_get_value(PointerRNA *ptr, PropertyRNA *prop, int array_i
/* ------------------------- Insert Key API ------------------------- */
/* Secondary Keyframing API call:
- * Use this when validation of necessary animation data is not necessary, since an RNA-pointer to the necessary
- * data being keyframed, and a pointer to the F-Curve to use have both been provided.
+ * Use this when validation of necessary animation data is not necessary, since an RNA-pointer to the necessary
+ * data being keyframed, and a pointer to the F-Curve to use have both been provided.
*
- * keytype is the "keyframe type" (eBezTriple_KeyframeType), as shown in the Dope Sheet.
+ * keytype is the "keyframe type" (eBezTriple_KeyframeType), as shown in the Dope Sheet.
*
- * The flag argument is used for special settings that alter the behavior of
- * the keyframe insertion. These include the 'visual' keyframing modes, quick refresh,
- * and extra keyframe filtering.
+ * The flag argument is used for special settings that alter the behavior of
+ * the keyframe insertion. These include the 'visual' keyframing modes, quick refresh,
+ * and extra keyframe filtering.
*/
bool insert_keyframe_direct(ReportList *reports, PointerRNA ptr, PropertyRNA *prop, FCurve *fcu, float cfra, eBezTriple_KeyframeType keytype, eInsertKeyFlags flag)
{
@@ -999,13 +999,13 @@ bool insert_keyframe_direct(ReportList *reports, PointerRNA ptr, PropertyRNA *pr
}
/* Main Keyframing API call:
- * Use this when validation of necessary animation data is necessary, since it may not exist yet.
+ * Use this when validation of necessary animation data is necessary, since it may not exist yet.
*
- * The flag argument is used for special settings that alter the behavior of
- * the keyframe insertion. These include the 'visual' keyframing modes, quick refresh,
- * and extra keyframe filtering.
+ * The flag argument is used for special settings that alter the behavior of
+ * the keyframe insertion. These include the 'visual' keyframing modes, quick refresh,
+ * and extra keyframe filtering.
*
- * index of -1 keys all array indices
+ * index of -1 keys all array indices
*/
short insert_keyframe(
Main *bmain, ReportList *reports, ID *id, bAction *act,
@@ -1065,8 +1065,8 @@ short insert_keyframe(
/* will only loop once unless the array index was -1 */
for (; array_index < array_index_max; array_index++) {
/* make sure the F-Curve exists
- * - if we're replacing keyframes only, DO NOT create new F-Curves if they do not exist yet
- * but still try to get the F-Curve if it exists...
+ * - if we're replacing keyframes only, DO NOT create new F-Curves if they do not exist yet
+ * but still try to get the F-Curve if it exists...
*/
fcu = verify_fcurve(act, group, &ptr, rna_path, array_index, (flag & INSERTKEY_REPLACE) == 0);
@@ -1098,11 +1098,11 @@ short insert_keyframe(
/* KEYFRAME DELETION */
/* Main Keyframing API call:
- * Use this when validation of necessary animation data isn't necessary as it
- * already exists. It will delete a keyframe at the current frame.
+ * Use this when validation of necessary animation data isn't necessary as it
+ * already exists. It will delete a keyframe at the current frame.
*
- * The flag argument is used for special settings that alter the behavior of
- * the keyframe deletion. These include the quick refresh options.
+ * The flag argument is used for special settings that alter the behavior of
+ * the keyframe deletion. These include the quick refresh options.
*/
@@ -1161,7 +1161,7 @@ short delete_keyframe(ReportList *reports, ID *id, bAction *act, const char grou
*/
if (act == NULL) {
/* if no action is provided, use the default one attached to this ID-block
- * - if it doesn't exist, then we're out of options...
+ * - if it doesn't exist, then we're out of options...
*/
if (adt->action) {
act = adt->action;
@@ -1215,11 +1215,11 @@ short delete_keyframe(ReportList *reports, ID *id, bAction *act, const char grou
/* KEYFRAME CLEAR */
/* Main Keyframing API call:
- * Use this when validation of necessary animation data isn't necessary as it
- * already exists. It will clear the current buttons fcurve(s).
+ * Use this when validation of necessary animation data isn't necessary as it
+ * already exists. It will clear the current buttons fcurve(s).
*
- * The flag argument is used for special settings that alter the behavior of
- * the keyframe deletion. These include the quick refresh options.
+ * The flag argument is used for special settings that alter the behavior of
+ * the keyframe deletion. These include the quick refresh options.
*/
static short clear_keyframe(ReportList *reports, ID *id, bAction *act, const char group[], const char rna_path[], int array_index, eInsertKeyFlags UNUSED(flag))
{
@@ -1250,7 +1250,7 @@ static short clear_keyframe(ReportList *reports, ID *id, bAction *act, const cha
*/
if (act == NULL) {
/* if no action is provided, use the default one attached to this ID-block
- * - if it doesn't exist, then we're out of options...
+ * - if it doesn't exist, then we're out of options...
*/
if (adt->action) {
act = adt->action;
@@ -1338,9 +1338,9 @@ static int insert_key_exec(bContext *C, wmOperator *op)
short success;
/* type is the Keying Set the user specified to use when calling the operator:
- * - type == 0: use scene's active Keying Set
- * - type > 0: use a user-defined Keying Set from the active scene
- * - type < 0: use a builtin Keying Set
+ * - type == 0: use scene's active Keying Set
+ * - type > 0: use a user-defined Keying Set from the active scene
+ * - type < 0: use a builtin Keying Set
*/
if (type == 0)
type = scene->active_keyingset;
@@ -1415,7 +1415,7 @@ void ANIM_OT_keyframe_insert(wmOperatorType *ot)
ot->prop = prop;
/* confirm whether a keyframe was added by showing a popup
- * - by default, this is enabled, since this operator is assumed to be called independently
+ * - by default, this is enabled, since this operator is assumed to be called independently
*/
prop = RNA_def_boolean(ot->srna, "confirm_success", 1, "Confirm Successful Insert",
"Show a popup when the keyframes get successfully added");
@@ -1477,7 +1477,7 @@ void ANIM_OT_keyframe_insert_menu(wmOperatorType *ot)
ot->prop = prop;
/* confirm whether a keyframe was added by showing a popup
- * - by default, this is disabled so that if a menu is shown, this doesn't come up too
+ * - by default, this is disabled so that if a menu is shown, this doesn't come up too
*/
// XXX should this just be always on?
prop = RNA_def_boolean(ot->srna, "confirm_success", 0, "Confirm Successful Insert",
@@ -1485,8 +1485,8 @@ void ANIM_OT_keyframe_insert_menu(wmOperatorType *ot)
RNA_def_property_flag(prop, PROP_HIDDEN);
/* whether the menu should always be shown
- * - by default, the menu should only be shown when there is no active Keying Set (2.5 behavior),
- * although in some cases it might be useful to always shown (pre 2.5 behavior)
+ * - by default, the menu should only be shown when there is no active Keying Set (2.5 behavior),
+ * although in some cases it might be useful to always shown (pre 2.5 behavior)
*/
prop = RNA_def_boolean(ot->srna, "always_prompt", 0, "Always Show Menu", "");
RNA_def_property_flag(prop, PROP_HIDDEN);
@@ -1503,9 +1503,9 @@ static int delete_key_exec(bContext *C, wmOperator *op)
short success;
/* type is the Keying Set the user specified to use when calling the operator:
- * - type == 0: use scene's active Keying Set
- * - type > 0: use a user-defined Keying Set from the active scene
- * - type < 0: use a builtin Keying Set
+ * - type == 0: use scene's active Keying Set
+ * - type > 0: use a user-defined Keying Set from the active scene
+ * - type < 0: use a builtin Keying Set
*/
if (type == 0)
type = scene->active_keyingset;
@@ -1567,7 +1567,7 @@ void ANIM_OT_keyframe_delete(wmOperatorType *ot)
ot->prop = prop;
/* confirm whether a keyframe was added by showing a popup
- * - by default, this is enabled, since this operator is assumed to be called independently
+ * - by default, this is enabled, since this operator is assumed to be called independently
*/
RNA_def_boolean(ot->srna, "confirm_success", 1, "Confirm Successful Delete",
"Show a popup when the keyframes get successfully removed");
@@ -1686,7 +1686,7 @@ static int delete_key_v3d_exec(bContext *C, wmOperator *op)
}
/* special exception for bones, as this makes this operator more convenient to use
- * NOTE: This is only done in pose mode. In object mode, we're dealign with the entire object.
+ * NOTE: This is only done in pose mode. In object mode, we're dealing with the entire object.
*/
if ((ob->mode & OB_MODE_POSE) && strstr(fcu->rna_path, "pose.bones[\"")) {
bPoseChannel *pchan;
@@ -2122,7 +2122,7 @@ static bool action_frame_has_keyframe(bAction *act, float frame, short filter)
return false;
/* loop over F-Curves, using binary-search to try to find matches
- * - this assumes that keyframes are only beztriples
+ * - this assumes that keyframes are only beztriples
*/
for (fcu = act->curves.first; fcu; fcu = fcu->next) {
/* only check if there are keyframes (currently only of type BezTriple) */
@@ -2241,9 +2241,9 @@ bool ED_autokeyframe_object(bContext *C, Scene *scene, Object *ob, KeyingSet *ks
ListBase dsources = {NULL, NULL};
/* now insert the keyframe(s) using the Keying Set
- * 1) add datasource override for the Object
- * 2) insert keyframes
- * 3) free the extra info
+ * 1) add datasource override for the Object
+ * 2) insert keyframes
+ * 3) free the extra info
*/
ANIM_relative_keyingset_add_source(&dsources, &ob->id, NULL, NULL);
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, (float)CFRA);
@@ -2262,9 +2262,9 @@ bool ED_autokeyframe_pchan(bContext *C, Scene *scene, Object *ob, bPoseChannel *
ListBase dsources = {NULL, NULL};
/* now insert the keyframe(s) using the Keying Set
- * 1) add datasource override for the PoseChannel
- * 2) insert keyframes
- * 3) free the extra info
+ * 1) add datasource override for the PoseChannel
+ * 2) insert keyframes
+ * 3) free the extra info
*/
ANIM_relative_keyingset_add_source(&dsources, &ob->id, &RNA_PoseBone, pchan);
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, (float)CFRA);
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index 6962647b9b7..e4aeef72755 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -117,7 +117,7 @@ static int add_default_keyingset_exec(bContext *C, wmOperator *UNUSED(op))
short flag = 0, keyingflag = 0;
/* validate flags
- * - absolute KeyingSets should be created by default
+ * - absolute KeyingSets should be created by default
*/
flag |= KEYINGSET_ABSOLUTE;
@@ -155,8 +155,8 @@ static int remove_active_keyingset_exec(bContext *C, wmOperator *op)
KeyingSet *ks;
/* verify the Keying Set to use:
- * - use the active one
- * - return error if it doesn't exist
+ * - use the active one
+ * - return error if it doesn't exist
*/
if (scene->active_keyingset == 0) {
BKE_report(op->reports, RPT_ERROR, "No active keying set to remove");
@@ -203,8 +203,8 @@ static int add_empty_ks_path_exec(bContext *C, wmOperator *op)
KS_Path *ksp;
/* verify the Keying Set to use:
- * - use the active one
- * - return error if it doesn't exist
+ * - use the active one
+ * - return error if it doesn't exist
*/
if (scene->active_keyingset == 0) {
BKE_report(op->reports, RPT_ERROR, "No active keying set to add empty path to");
@@ -303,14 +303,14 @@ static int add_keyingset_button_exec(bContext *C, wmOperator *op)
}
/* verify the Keying Set to use:
- * - use the active one for now (more control over this can be added later)
- * - add a new one if it doesn't exist
+ * - use the active one for now (more control over this can be added later)
+ * - add a new one if it doesn't exist
*/
if (scene->active_keyingset == 0) {
short flag = 0, keyingflag = 0;
/* validate flags
- * - absolute KeyingSets should be created by default
+ * - absolute KeyingSets should be created by default
*/
flag |= KEYINGSET_ABSOLUTE;
@@ -406,8 +406,8 @@ static int remove_keyingset_button_exec(bContext *C, wmOperator *op)
}
/* verify the Keying Set to use:
- * - use the active one for now (more control over this can be added later)
- * - return error if it doesn't exist
+ * - use the active one for now (more control over this can be added later)
+ * - return error if it doesn't exist
*/
if (scene->active_keyingset == 0) {
BKE_report(op->reports, RPT_ERROR, "No active keying set to remove property from");
@@ -520,7 +520,7 @@ void ANIM_OT_keying_set_active_set(wmOperatorType *ot)
/* keyingset to use (dynamic enum) */
prop = RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, "Keying Set", "The Keying Set to use");
RNA_def_enum_funcs(prop, ANIM_keying_sets_enum_itemf);
-/* RNA_def_property_flag(prop, PROP_HIDDEN);*/
+ // RNA_def_property_flag(prop, PROP_HIDDEN);
}
/* ******************************************* */
@@ -583,7 +583,7 @@ void ANIM_keyingset_info_register(KeyingSetInfo *ksi)
KeyingSet *ks;
/* create a new KeyingSet
- * - inherit name and keyframing settings from the typeinfo
+ * - inherit name and keyframing settings from the typeinfo
*/
ks = BKE_keyingset_add(&builtin_keyingsets, ksi->idname, ksi->name, 1, ksi->keyingflag);
@@ -668,9 +668,9 @@ KeyingSet *ANIM_scene_get_active_keyingset(Scene *scene)
return NULL;
/* currently, there are several possibilities here:
- * - 0: no active keying set
- * - > 0: one of the user-defined Keying Sets, but indices start from 0 (hence the -1)
- * - < 0: a builtin keying set
+ * - 0: no active keying set
+ * - > 0: one of the user-defined Keying Sets, but indices start from 0 (hence the -1)
+ * - < 0: a builtin keying set
*/
if (scene->active_keyingset > 0)
return BLI_findlink(&scene->keyingsets, scene->active_keyingset - 1);
@@ -690,7 +690,7 @@ int ANIM_scene_get_keyingset_index(Scene *scene, KeyingSet *ks)
/* check if the KeyingSet exists in scene list */
if (scene) {
/* get index and if valid, return
- * - (absolute) Scene KeyingSets are from (>= 1)
+ * - (absolute) Scene KeyingSets are from (>= 1)
*/
index = BLI_findindex(&scene->keyingsets, ks);
if (index != -1)
@@ -698,8 +698,8 @@ int ANIM_scene_get_keyingset_index(Scene *scene, KeyingSet *ks)
}
/* still here, so try builtins list too
- * - builtins are from (<= -1)
- * - none/invalid is (= 0)
+ * - builtins are from (<= -1)
+ * - none/invalid is (= 0)
*/
index = BLI_findindex(&builtin_keyingsets, ks);
if (index != -1)
@@ -712,8 +712,8 @@ int ANIM_scene_get_keyingset_index(Scene *scene, KeyingSet *ks)
KeyingSet *ANIM_get_keyingset_for_autokeying(Scene *scene, const char *transformKSName)
{
/* get KeyingSet to use
- * - use the active KeyingSet if defined (and user wants to use it for all autokeying),
- * or otherwise key transforms only
+ * - use the active KeyingSet if defined (and user wants to use it for all autokeying),
+ * or otherwise key transforms only
*/
if (IS_AUTOKEY_FLAG(scene, ONLYKEYINGSET) && (scene->active_keyingset))
return ANIM_scene_get_active_keyingset(scene);
@@ -739,7 +739,7 @@ const EnumPropertyItem *ANIM_keying_sets_enum_itemf(bContext *C, PointerRNA *UNU
}
/* active Keying Set
- * - only include entry if it exists
+ * - only include entry if it exists
*/
if (scene->active_keyingset) {
/* active Keying Set */
@@ -755,7 +755,7 @@ const EnumPropertyItem *ANIM_keying_sets_enum_itemf(bContext *C, PointerRNA *UNU
i++;
/* user-defined Keying Sets
- * - these are listed in the order in which they were defined for the active scene
+ * - these are listed in the order in which they were defined for the active scene
*/
if (scene->keyingsets.first) {
for (ks = scene->keyingsets.first; ks; ks = ks->next, i++) {
@@ -817,8 +817,8 @@ bool ANIM_keyingset_context_ok_poll(bContext *C, KeyingSet *ks)
/* Special 'Overrides' Iterator for Relative KeyingSets ------ */
/* 'Data Sources' for relative Keying Set 'overrides'
- * - this is basically a wrapper for PointerRNA's in a linked list
- * - do not allow this to be accessed from outside for now
+ * - this is basically a wrapper for PointerRNA's in a linked list
+ * - do not allow this to be accessed from outside for now
*/
typedef struct tRKS_DSource {
struct tRKS_DSource *next, *prev;
@@ -846,8 +846,8 @@ void ANIM_relative_keyingset_add_source(ListBase *dsources, ID *id, StructRNA *s
tRKS_DSource *ds;
/* sanity checks
- * - we must have somewhere to output the data
- * - we must have both srna+data (and with id too optionally), or id by itself only
+ * - we must have somewhere to output the data
+ * - we must have both srna+data (and with id too optionally), or id by itself only
*/
if (dsources == NULL)
return;
@@ -926,10 +926,10 @@ static short keyingset_apply_keying_flags(const short base_flags, const short ov
short result = 0;
/* The logic for whether a keying flag applies is as follows:
- * - If the flag in question is set in "overrides", that means that the
- * status of that flag in "own_flags" is used
- * - If however the flag isn't set, then its value in "base_flags" is used
- * instead (i.e. no override)
+ * - If the flag in question is set in "overrides", that means that the
+ * status of that flag in "own_flags" is used
+ * - If however the flag isn't set, then its value in "base_flags" is used
+ * instead (i.e. no override)
*/
#define APPLY_KEYINGFLAG_OVERRIDE(kflag) \
if (overrides & kflag) { \
@@ -1033,7 +1033,7 @@ int ANIM_apply_keyingset(bContext *C, ListBase *dsources, bAction *act, KeyingSe
arraylen++;
/* for each possible index, perform operation
- * - assume that arraylen is greater than index
+ * - assume that arraylen is greater than index
*/
for (; i < arraylen; i++) {
/* action to take depends on mode */
diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c
index b268baf0f97..08db73bf69d 100644
--- a/source/blender/editors/armature/armature_add.c
+++ b/source/blender/editors/armature/armature_add.c
@@ -428,7 +428,7 @@ EditBone *duplicateEditBoneObjects(EditBone *curBone, const char *name, ListBase
{
EditBone *eBone = MEM_mallocN(sizeof(EditBone), "addup_editbone");
- /* Copy data from old bone to new bone */
+ /* Copy data from old bone to new bone */
memcpy(eBone, curBone, sizeof(EditBone));
curBone->temp.ebone = eBone;
@@ -454,7 +454,7 @@ EditBone *duplicateEditBoneObjects(EditBone *curBone, const char *name, ListBase
chanold = BKE_pose_channel_verify(src_ob->pose, curBone->name);
if (chanold) {
/* WARNING: this creates a new posechannel, but there will not be an attached bone
- * yet as the new bones created here are still 'EditBones' not 'Bones'.
+ * yet as the new bones created here are still 'EditBones' not 'Bones'.
*/
channew = BKE_pose_channel_verify(dst_ob->pose, eBone->name);
@@ -667,7 +667,7 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op)
if (axis_delta == 0.0f) {
/* both mirrored bones exist and point to eachother and overlap exactly.
*
- * in this case theres no well defined solution, so de-select both and skip.
+ * in this case there's no well defined solution, so de-select both and skip.
*/
ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
ebone_iter->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c
index 0f382f07671..67ce05ceb99 100644
--- a/source/blender/editors/armature/armature_edit.c
+++ b/source/blender/editors/armature/armature_edit.c
@@ -242,7 +242,7 @@ float ED_armature_ebone_roll_to_vector(const EditBone *bone, const float align_a
return roll;
}
-/* note, ranges arithmatic is used below */
+/* note, ranges arithmetic is used below */
typedef enum eCalcRollTypes {
/* pos */
CALC_ROLL_POS_X = 0,
@@ -822,9 +822,9 @@ static void bones_merge(Object *obedit, EditBone *start, EditBone *end, EditBone
}
/* step 1: add a new bone
- * - head = head/tail of start (default head)
- * - tail = head/tail of end (default tail)
- * - parent = parent of start
+ * - head = head/tail of start (default head)
+ * - tail = head/tail of end (default tail)
+ * - parent = parent of start
*/
if ((start->flag & BONE_TIPSEL) && (start->flag & BONE_SELECTED) == 0) {
copy_v3_v3(head, start->tail);
@@ -846,7 +846,7 @@ static void bones_merge(Object *obedit, EditBone *start, EditBone *end, EditBone
BONE_NO_CYCLICOFFSET | BONE_NO_LOCAL_LOCATION | BONE_DONE);
/* step 2a: reparent any side chains which may be parented to any bone in the chain of bones to merge
- * - potentially several tips for side chains leading to some tree exist...
+ * - potentially several tips for side chains leading to some tree exist...
*/
for (chain = chains->first; chain; chain = chain->next) {
/* traverse down chain until we hit the bottom or if we run into the tip of the chain of bones we're
@@ -936,7 +936,7 @@ static int armature_merge_exec(bContext *C, wmOperator *op)
bstart = ebo;
}
else {
- /* chain is broken... merge any continous segments then clear */
+ /* chain is broken... merge any continuous segments then clear */
if (bstart && bend)
bones_merge(obedit, bstart, bend, bchild, &chains);
@@ -1035,8 +1035,8 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
/* loop over bones in chain */
for (ebo = chain->data; ebo; ebo = parent) {
/* parent is this bone's original parent
- * - we store this, as the next bone that is checked is this one
- * but the value of ebo->parent may change here...
+ * - we store this, as the next bone that is checked is this one
+ * but the value of ebo->parent may change here...
*/
parent = ebo->parent;
@@ -1048,8 +1048,8 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
swap_v3_v3(ebo->head, ebo->tail);
/* do parent swapping:
- * - use 'child' as new parent
- * - connected flag is only set if points are coincidental
+ * - use 'child' as new parent
+ * - connected flag is only set if points are coincidental
*/
ebo->parent = child;
if ((child) && equals_v3v3(ebo->head, child->tail))
@@ -1058,7 +1058,7 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
ebo->flag &= ~BONE_CONNECTED;
/* get next bones
- * - child will become the new parent of next bone
+ * - child will become the new parent of next bone
*/
child = ebo;
}
@@ -1072,8 +1072,8 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
}
/* get next bones
- * - child will become new parent of next bone (not swapping occurred,
- * so set to NULL to prevent infinite-loop)
+ * - child will become new parent of next bone (not swapping occurred,
+ * so set to NULL to prevent infinite-loop)
*/
child = NULL;
}
diff --git a/source/blender/editors/armature/armature_naming.c b/source/blender/editors/armature/armature_naming.c
index fb314fd4ac0..b0614c84d14 100644
--- a/source/blender/editors/armature/armature_naming.c
+++ b/source/blender/editors/armature/armature_naming.c
@@ -135,7 +135,7 @@ static void constraint_bone_name_fix(Object *ob, ListBase *conlist, const char *
/* called by UI for renaming a bone */
/* warning: make sure the original bone was not renamed yet! */
-/* seems messy, but thats what you get with not using pointers but channel names :) */
+/* seems messy, but that's what you get with not using pointers but channel names :) */
void ED_armature_bone_rename(Main *bmain, bArmature *arm, const char *oldnamep, const char *newnamep)
{
Object *ob;
diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c
index 7a5e0563dd5..5d582a24f1c 100644
--- a/source/blender/editors/armature/armature_relations.c
+++ b/source/blender/editors/armature/armature_relations.c
@@ -252,7 +252,7 @@ int join_armature_exec(bContext *C, wmOperator *op)
float mat[4][4], oimat[4][4];
bool ok = false;
- /* Ensure we're not in editmode and that the active object is an armature*/
+ /* Ensure we're not in editmode and that the active object is an armature. */
if (!ob || ob->type != OB_ARMATURE)
return OPERATOR_CANCELLED;
if (!arm || arm->edbo)
@@ -435,8 +435,8 @@ static void separated_armature_fix_links(Main *bmain, Object *origArm, Object *n
for (ct = targets.first; ct; ct = ct->next) {
/* any targets which point to original armature are redirected to the new one only if:
- * - the target isn't origArm/newArm itself
- * - the target is one that can be found in newArm/origArm
+ * - the target isn't origArm/newArm itself
+ * - the target is one that can be found in newArm/origArm
*/
if (ct->subtarget[0] != 0) {
if (ct->tar == origArm) {
@@ -473,8 +473,8 @@ static void separated_armature_fix_links(Main *bmain, Object *origArm, Object *n
for (ct = targets.first; ct; ct = ct->next) {
/* any targets which point to original armature are redirected to the new one only if:
- * - the target isn't origArm/newArm itself
- * - the target is one that can be found in newArm/origArm
+ * - the target isn't origArm/newArm itself
+ * - the target is one that can be found in newArm/origArm
*/
if (ct->subtarget[0] != '\0') {
if (ct->tar == origArm) {
@@ -510,8 +510,8 @@ static void separated_armature_fix_links(Main *bmain, Object *origArm, Object *n
}
/* Helper function for armature separating - remove certain bones from the given armature
- * sel: remove selected bones from the armature, otherwise the unselected bones are removed
- * (ob is not in editmode)
+ * sel: remove selected bones from the armature, otherwise the unselected bones are removed
+ * (ob is not in editmode)
*/
static void separate_armature_bones(Main *bmain, Object *ob, short sel)
{
@@ -581,11 +581,11 @@ static int separate_armature_exec(bContext *C, wmOperator *op)
WM_cursor_wait(1);
/* we are going to do this as follows (unlike every other instance of separate):
- * 1. exit editmode +posemode for active armature/base. Take note of what this is.
- * 2. duplicate base - BASACT is the new one now
- * 3. for each of the two armatures, enter editmode -> remove appropriate bones -> exit editmode + recalc
- * 4. fix constraint links
- * 5. make original armature active and enter editmode
+ * 1. exit editmode +posemode for active armature/base. Take note of what this is.
+ * 2. duplicate base - BASACT is the new one now
+ * 3. for each of the two armatures, enter editmode -> remove appropriate bones -> exit editmode + recalc
+ * 4. fix constraint links
+ * 5. make original armature active and enter editmode
*/
/* 1) only edit-base selected */
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c
index 691da4cbd2b..f789cd0e80a 100644
--- a/source/blender/editors/armature/editarmature_sketch.c
+++ b/source/blender/editors/armature/editarmature_sketch.c
@@ -157,7 +157,7 @@ void BIF_makeListTemplates(const bContext *C)
if (ob != obedit && ob->type == OB_ARMATURE) {
index++;
- BLI_ghash_insert(TEMPLATES_HASH, SET_INT_IN_POINTER(index), ob);
+ BLI_ghash_insert(TEMPLATES_HASH, POINTER_FROM_INT(index), ob);
if (ob == ts->skgen_template) {
TEMPLATES_CURRENT = index;
@@ -187,7 +187,7 @@ const char *BIF_listTemplates(const bContext *UNUSED(C))
while (!BLI_ghashIterator_done(&ghi)) {
Object *ob = BLI_ghashIterator_getValue(&ghi);
- int key = GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(&ghi));
+ int key = POINTER_AS_INT(BLI_ghashIterator_getKey(&ghi));
p += sprintf(p, "|%s %%x%i", ob->id.name + 2, key);
@@ -208,7 +208,7 @@ int BIF_currentTemplate(const bContext *C)
while (!BLI_ghashIterator_done(&ghi)) {
Object *ob = BLI_ghashIterator_getValue(&ghi);
- int key = GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(&ghi));
+ int key = POINTER_AS_INT(BLI_ghashIterator_getKey(&ghi));
if (ob == ts->skgen_template) {
TEMPLATES_CURRENT = key;
@@ -302,7 +302,7 @@ void BIF_setTemplate(bContext *C, int index)
{
ToolSettings *ts = CTX_data_tool_settings(C);
if (index > 0) {
- ts->skgen_template = BLI_ghash_lookup(TEMPLATES_HASH, SET_INT_IN_POINTER(index));
+ ts->skgen_template = BLI_ghash_lookup(TEMPLATES_HASH, POINTER_FROM_INT(index));
}
else {
ts->skgen_template = NULL;
@@ -905,7 +905,7 @@ static void sk_interpolateDepth(bContext *C, SK_Stroke *stk, int start, int end,
float pval[2] = {0, 0};
ED_view3d_project_float_global(ar, stk->points[i].p, pval, V3D_PROJ_TEST_NOP);
- ED_view3d_win_to_ray(ar, v3d, pval, ray_start, ray_normal, false);
+ ED_view3d_win_to_ray_clipped(ar, v3d, pval, ray_start, ray_normal, false);
mul_v3_fl(ray_normal, distance * progress / length);
add_v3_v3(stk->points[i].p, ray_normal);
@@ -1502,7 +1502,7 @@ static int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, S
mval[0] = vi[0];
mval[1] = vi[1];
- ED_view3d_win_to_segment(ar, v3d, mval, ray_start, ray_end, true);
+ ED_view3d_win_to_segment_clipped(ar, v3d, mval, ray_start, ray_end, true);
isect_line_line_v3(stk->points[s_i].p,
stk->points[s_i + 1].p,
@@ -2051,7 +2051,7 @@ static void sk_drawSketch(Scene *scene, View3D *UNUSED(v3d), SK_Sketch *sketch,
for (p = sketch->depth_peels.first; p; p = p->next)
{
- int index = GET_INT_FROM_POINTER(p->ob);
+ int index = POINTER_AS_INT(p->ob);
index = (index >> 5) & 7;
glColor3fv(colors[index]);
diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c
index d91d3809a42..f04106dac3a 100644
--- a/source/blender/editors/armature/pose_edit.c
+++ b/source/blender/editors/armature/pose_edit.c
@@ -1124,7 +1124,7 @@ void POSE_OT_hide(wmOperatorType *ot)
static int show_pose_bone_cb(Object *ob, Bone *bone, void *data)
{
- const bool select = GET_INT_FROM_POINTER(data);
+ const bool select = POINTER_AS_INT(data);
bArmature *arm = ob->data;
@@ -1147,7 +1147,7 @@ static int pose_reveal_exec(bContext *C, wmOperator *op)
bArmature *arm = ob->data;
const bool select = RNA_boolean_get(op->ptr, "select");
- bone_looper(ob, arm->bonebase.first, SET_INT_IN_POINTER(select), show_pose_bone_cb);
+ bone_looper(ob, arm->bonebase.first, POINTER_FROM_INT(select), show_pose_bone_cb);
/* note, notifier might evolve */
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob);
diff --git a/source/blender/editors/armature/pose_group.c b/source/blender/editors/armature/pose_group.c
index 9648bb99c05..97cf02523a6 100644
--- a/source/blender/editors/armature/pose_group.c
+++ b/source/blender/editors/armature/pose_group.c
@@ -160,7 +160,7 @@ static int pose_groups_menu_invoke(bContext *C, wmOperator *op, const wmEvent *U
layout = UI_popup_menu_layout(pup);
/* special entry - allow to create new group, then use that
- * (not to be used for removing though)
+ * (not to be used for removing though)
*/
if (strstr(op->idname, "assign")) {
uiItemIntO(layout, "New Group", ICON_NONE, op->idname, "type", 0);
@@ -197,7 +197,7 @@ static int pose_group_assign_exec(bContext *C, wmOperator *op)
pose = ob->pose;
/* set the active group number to the one from operator props
- * - if 0 after this, make a new group...
+ * - if 0 after this, make a new group...
*/
pose->active_group = RNA_int_get(op->ptr, "type");
if (pose->active_group == 0)
diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c
index 9bb1caee067..1aa852c3863 100644
--- a/source/blender/editors/armature/pose_lib.c
+++ b/source/blender/editors/armature/pose_lib.c
@@ -89,19 +89,19 @@ static void action_set_activemarker(void *UNUSED(a), void *UNUSED(b), void *UNUS
* It acts as a kind of "glorified clipboard for poses", allowing for naming of poses.
*
* Features:
- * - PoseLibs are simply normal Actions
- * - Each "pose" is simply a set of keyframes that occur on a particular frame
- * -> a set of TimeMarkers that belong to each Action, help 'label' where a 'pose' can be
- * found in the Action
- * - The Scrollwheel or PageUp/Down buttons when used in a special mode or after pressing/holding
- * [a modifier] key, cycles through the poses available for the active pose's poselib, allowing the
- * animator to preview what action best suits that pose
+ * - PoseLibs are simply normal Actions
+ * - Each "pose" is simply a set of keyframes that occur on a particular frame
+ * -> a set of TimeMarkers that belong to each Action, help 'label' where a 'pose' can be
+ * found in the Action
+ * - The Scrollwheel or PageUp/Down buttons when used in a special mode or after pressing/holding
+ * [a modifier] key, cycles through the poses available for the active pose's poselib, allowing the
+ * animator to preview what action best suits that pose
*/
/* ************************************************************* */
/* gets the first available frame in poselib to store a pose on
- * - frames start from 1, and a pose should occur on every frame... 0 is error!
+ * - frames start from 1, and a pose should occur on every frame... 0 is error!
*/
static int poselib_get_free_index(bAction *act)
{
@@ -476,8 +476,8 @@ static int poselib_add_exec(bContext *C, wmOperator *op)
RNA_string_get(op->ptr, "name", name);
/* add pose to poselib - replaces any existing pose there
- * - for the 'replace' option, this should end up finding the appropriate marker,
- * so no new one will be added
+ * - for the 'replace' option, this should end up finding the appropriate marker,
+ * so no new one will be added
*/
for (marker = act->markers.first; marker; marker = marker->next) {
if (marker->frame == frame) {
@@ -968,9 +968,9 @@ static void poselib_backup_free_data(tPoseLib_PreviewData *pld)
/* ---------------------------- */
/* Applies the appropriate stored pose from the pose-library to the current pose
- * - assumes that a valid object, with a poselib has been supplied
- * - gets the string to print in the header
- * - this code is based on the code for extract_pose_from_action in blenkernel/action.c
+ * - assumes that a valid object, with a poselib has been supplied
+ * - gets the string to print in the header
+ * - this code is based on the code for extract_pose_from_action in blenkernel/action.c
*/
static void poselib_apply_pose(tPoseLib_PreviewData *pld)
{
@@ -1100,7 +1100,7 @@ static void poselib_preview_apply(bContext *C, wmOperator *op)
RNA_int_set(op->ptr, "pose_index", -2); /* -2 means don't apply any pose */
/* old optimize trick... this enforces to bypass the depgraph
- * - note: code copied from transform_generics.c -> recalcData()
+ * - note: code copied from transform_generics.c -> recalcData()
*/
// FIXME: shouldn't this use the builtin stuff?
if ((pld->arm->flag & ARM_DELAYDEFORM) == 0)
@@ -1182,8 +1182,8 @@ static void poselib_preview_get_next(tPoseLib_PreviewData *pld, int step)
/* generate a new list of search matches */
for (marker = pld->act->markers.first; marker; marker = marker->next) {
/* does the name partially match?
- * - don't worry about case, to make it easier for users to quickly input a name (or
- * part of one), which is the whole point of this feature
+ * - don't worry about case, to make it easier for users to quickly input a name (or
+ * part of one), which is the whole point of this feature
*/
if (BLI_strcasestr(marker->name, pld->searchstr)) {
/* make link-data to store reference to it */
@@ -1326,7 +1326,7 @@ static int poselib_preview_handle_event(bContext *UNUSED(C), wmOperator *op, con
}
/* backup stuff that needs to occur before every operation
- * - make a copy of searchstr, so that we know if cache needs to be rebuilt
+ * - make a copy of searchstr, so that we know if cache needs to be rebuilt
*/
BLI_strncpy(pld->searchold, pld->searchstr, sizeof(pld->searchold));
@@ -1609,7 +1609,7 @@ static void poselib_preview_cleanup(bContext *C, wmOperator *op)
poselib_backup_restore(pld);
/* old optimize trick... this enforces to bypass the depgraph
- * - note: code copied from transform_generics.c -> recalcData()
+ * - note: code copied from transform_generics.c -> recalcData()
*/
if ((arm->flag & ARM_DELAYDEFORM) == 0)
DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */
diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c
index ecfaa41b0b5..e17d281af63 100644
--- a/source/blender/editors/armature/pose_select.c
+++ b/source/blender/editors/armature/pose_select.c
@@ -63,8 +63,8 @@
#include "armature_intern.h"
/* utility macros for storing a temp int in the bone (selection flag) */
-#define PBONE_PREV_FLAG_GET(pchan) ((void)0, (GET_INT_FROM_POINTER((pchan)->temp)))
-#define PBONE_PREV_FLAG_SET(pchan, val) ((pchan)->temp = SET_INT_IN_POINTER(val))
+#define PBONE_PREV_FLAG_GET(pchan) ((void)0, (POINTER_AS_INT((pchan)->temp)))
+#define PBONE_PREV_FLAG_SET(pchan, val) ((pchan)->temp = POINTER_FROM_INT(val))
/* ***************** Pose Select Utilities ********************* */
@@ -641,8 +641,8 @@ static bool pose_select_same_group(bContext *C, Object *ob, bool extend)
return 0;
/* alloc a small array to keep track of the groups to use
- * - each cell stores on/off state for whether group should be used
- * - size is (numGroups + 1), since (index = 0) is used for no-group
+ * - each cell stores on/off state for whether group should be used
+ * - size is (numGroups + 1), since (index = 0) is used for no-group
*/
group_flags = MEM_callocN(numGroups + 1, "pose_select_same_group");
diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c
index b82535f013b..2980bf4637e 100644
--- a/source/blender/editors/armature/pose_slide.c
+++ b/source/blender/editors/armature/pose_slide.c
@@ -285,9 +285,9 @@ static void pose_slide_apply_val(tPoseSlideOp *pso, FCurve *fcu, float *val)
w2 = 1.0f - w1; /* this must come first */
}
else {
- /* - these weights are derived from the relative distance of these
- * poses from the current frame
- * - they then get normalized so that they only sum up to 1
+ /* - these weights are derived from the relative distance of these
+ * poses from the current frame
+ * - they then get normalized so that they only sum up to 1
*/
float wtot;
@@ -300,15 +300,15 @@ static void pose_slide_apply_val(tPoseSlideOp *pso, FCurve *fcu, float *val)
}
/* depending on the mode, calculate the new value
- * - in all of these, the start+end values are multiplied by w2 and w1 (respectively),
- * since multiplication in another order would decrease the value the current frame is closer to
+ * - in all of these, the start+end values are multiplied by w2 and w1 (respectively),
+ * since multiplication in another order would decrease the value the current frame is closer to
*/
switch (pso->mode) {
case POSESLIDE_PUSH: /* make the current pose more pronounced */
{
/* perform a weighted average here, favoring the middle pose
- * - numerator should be larger than denominator to 'expand' the result
- * - perform this weighting a number of times given by the percentage...
+ * - numerator should be larger than denominator to 'expand' the result
+ * - perform this weighting a number of times given by the percentage...
*/
int iters = (int)ceil(10.0f * pso->percentage); /* TODO: maybe a sensitivity ctrl on top of this is needed */
@@ -320,8 +320,8 @@ static void pose_slide_apply_val(tPoseSlideOp *pso, FCurve *fcu, float *val)
case POSESLIDE_RELAX: /* make the current pose more like its surrounding ones */
{
/* perform a weighted average here, favoring the middle pose
- * - numerator should be smaller than denominator to 'relax' the result
- * - perform this weighting a number of times given by the percentage...
+ * - numerator should be smaller than denominator to 'relax' the result
+ * - perform this weighting a number of times given by the percentage...
*/
int iters = (int)ceil(10.0f * pso->percentage); /* TODO: maybe a sensitivity ctrl on top of this is needed */
@@ -395,8 +395,8 @@ static void pose_slide_apply_props(tPoseSlideOp *pso, tPChanFCurveLink *pfl, con
continue;
/* do we have a match?
- * - bPtr is the RNA Path with the standard part chopped off
- * - pPtr is the chunk of the path which is left over
+ * - bPtr is the RNA Path with the standard part chopped off
+ * - pPtr is the chunk of the path which is left over
*/
bPtr = strstr(fcu->rna_path, pfl->pchan_path) + len;
pPtr = strstr(bPtr, prop_prefix);
@@ -561,9 +561,9 @@ static void pose_slide_apply(bContext *C, tPoseSlideOp *pso)
/* for each link, handle each set of transforms */
for (pfl = pso->pfLinks.first; pfl; pfl = pfl->next) {
/* valid transforms for each PoseChannel should have been noted already
- * - sliding the pose should be a straightforward exercise for location+rotation,
- * but rotations get more complicated since we may want to use quaternion blending
- * for quaternions instead...
+ * - sliding the pose should be a straightforward exercise for location+rotation,
+ * but rotations get more complicated since we may want to use quaternion blending
+ * for quaternions instead...
*/
bPoseChannel *pchan = pfl->pchan;
@@ -1261,7 +1261,7 @@ typedef union tPosePropagate_ModeData {
/* get frame on which the "hold" for the bone ends
* XXX: this may not really work that well if a bone moves on some channels and not others
* if this happens to be a major issue, scrap this, and just make this happen
- * independently per F-Curve
+ * independently per F-Curve
*/
static float pose_propagate_get_boneHoldEndFrame(Object *ob, tPChanFCurveLink *pfl, float startFrame)
{
@@ -1285,7 +1285,7 @@ static float pose_propagate_get_boneHoldEndFrame(Object *ob, tPChanFCurveLink *p
BLI_dlrbTree_linkedlist_sync(&blocks);
/* find the long keyframe (i.e. hold), and hence obtain the endFrame value
- * - the best case would be one that starts on the frame itself
+ * - the best case would be one that starts on the frame itself
*/
ab = (ActKeyBlock *)BLI_dlrbTree_search_exact(&blocks, compare_ab_cfraPtr, &startFrame);
@@ -1439,11 +1439,11 @@ static void pose_propagate_fcurve(wmOperator *op, Object *ob, FCurve *fcu,
return;
/* find the first keyframe to start propagating from
- * - if there's a keyframe on the current frame, we probably want to save this value there too
- * since it may be as of yet unkeyed
- * - if starting before the starting frame, don't touch the key, as it may have had some valid
- * values
- * - if only doing selected keyframes, start from the first one
+ * - if there's a keyframe on the current frame, we probably want to save this value there too
+ * since it may be as of yet unkeyed
+ * - if starting before the starting frame, don't touch the key, as it may have had some valid
+ * values
+ * - if only doing selected keyframes, start from the first one
*/
if (mode != POSE_PROPAGATE_SELECTED_KEYS) {
match = binarysearch_bezt_index(fcu->bezt, startFrame, fcu->totvert, &keyExists);
diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c
index 2d8f5dbecbe..304a1f8df8c 100644
--- a/source/blender/editors/armature/pose_transform.c
+++ b/source/blender/editors/armature/pose_transform.c
@@ -129,8 +129,8 @@ static int apply_armature_pose2bones_exec(bContext *C, wmOperator *op)
copy_v3_v3(curbone->tail, pchan->pose_tail);
/* fix roll:
- * 1. find auto-calculated roll value for this bone now
- * 2. remove this from the 'visual' y-rotation
+ * 1. find auto-calculated roll value for this bone now
+ * 2. remove this from the 'visual' y-rotation
*/
{
float premat[3][3], imat[3][3], pmat[3][3], tmat[3][3];
@@ -328,7 +328,7 @@ static bPoseChannel *pose_bone_do_paste(Object *ob, bPoseChannel *chan, const bo
/* continue? */
if (paste_ok) {
/* only loc rot size
- * - only copies transform info for the pose
+ * - only copies transform info for the pose
*/
copy_v3_v3(pchan->loc, chan->loc);
copy_v3_v3(pchan->size, chan->size);
diff --git a/source/blender/editors/armature/pose_utils.c b/source/blender/editors/armature/pose_utils.c
index b390f3d0f75..f5ba688fd46 100644
--- a/source/blender/editors/armature/pose_utils.c
+++ b/source/blender/editors/armature/pose_utils.c
@@ -186,7 +186,7 @@ void poseAnim_mapping_refresh(bContext *C, Scene *scene, Object *ob)
bArmature *arm = (bArmature *)ob->data;
/* old optimize trick... this enforces to bypass the depgraph
- * - note: code copied from transform_generics.c -> recalcData()
+ * - note: code copied from transform_generics.c -> recalcData()
*/
/* FIXME: shouldn't this use the builtin stuff? */
if ((arm->flag & ARM_DELAYDEFORM) == 0)
@@ -264,8 +264,8 @@ void poseAnim_mapping_autoKeyframe(bContext *C, Scene *scene, Object *ob, ListBa
BLI_freelistN(&dsources);
/* do the bone paths
- * - only do this if keyframes should have been added
- * - do not calculate unless there are paths already to update...
+ * - only do this if keyframes should have been added
+ * - do not calculate unless there are paths already to update...
*/
if (ob->pose->avs.path_bakeflag & MOTIONPATH_BAKE_HAS_PATHS) {
//ED_pose_clear_paths(C, ob); // XXX for now, don't need to clear
@@ -277,7 +277,7 @@ void poseAnim_mapping_autoKeyframe(bContext *C, Scene *scene, Object *ob, ListBa
/* ------------------------- */
/* find the next F-Curve for a PoseChannel with matching path...
- * - path is not just the pfl rna_path, since that path doesn't have property info yet
+ * - path is not just the pfl rna_path, since that path doesn't have property info yet
*/
LinkData *poseAnim_mapping_getNextFCurve(ListBase *fcuLinks, LinkData *prev, const char *path)
{
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index b046e1b6ae7..342eef063f4 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -1248,7 +1248,7 @@ void ED_curve_editnurb_make(Object *obedit)
nu = cu->nurb.first;
while (nu) {
newnu = BKE_nurb_duplicate(nu);
- BKE_nurb_test2D(newnu); // after join, or any other creation of curve
+ BKE_nurb_test_2d(newnu); // after join, or any other creation of curve
BLI_addtail(&editnurb->nurbs, newnu);
nu = nu->next;
}
@@ -1552,7 +1552,7 @@ void ed_editnurb_translate_flag(ListBase *editnurb, short flag, const float vec[
}
}
- BKE_nurb_test2D(nu);
+ BKE_nurb_test_2d(nu);
}
}
diff --git a/source/blender/editors/curve/editcurve_add.c b/source/blender/editors/curve/editcurve_add.c
index a91b58f1e65..a6100d9bb14 100644
--- a/source/blender/editors/curve/editcurve_add.c
+++ b/source/blender/editors/curve/editcurve_add.c
@@ -464,7 +464,7 @@ Nurb *ED_curve_add_nurbs_primitive(bContext *C, Object *obedit, float mat[4][4],
cu->actnu = BLI_listbase_count(editnurb);
cu->actvert = CU_ACT_NONE;
- BKE_nurb_test2D(nu);
+ BKE_nurb_test_2d(nu);
}
return nu;
diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c
index 325c39d7f38..7bdf17e9344 100644
--- a/source/blender/editors/curve/editcurve_paint.c
+++ b/source/blender/editors/curve/editcurve_paint.c
@@ -98,7 +98,7 @@ struct CurveDrawData {
bool use_plane;
float plane[4];
- /* use 'rv3d->depths', note that this will become 'damaged' while drawing, but thats OK. */
+ /* use 'rv3d->depths', note that this will become 'damaged' while drawing, but that's OK. */
bool use_depth;
/* offset projection by this value */
@@ -186,7 +186,6 @@ static bool stroke_elem_project(
float surface_offset, const float radius,
float r_location_world[3], float r_normal_world[3])
{
- View3D *v3d = cdd->vc.v3d;
ARegion *ar = cdd->vc.ar;
RegionView3D *rv3d = cdd->vc.rv3d;
@@ -195,12 +194,7 @@ static bool stroke_elem_project(
/* project to 'location_world' */
if (cdd->project.use_plane) {
/* get the view vector to 'location' */
- float ray_origin[3], ray_direction[3];
- ED_view3d_win_to_ray(cdd->vc.ar, v3d, mval_fl, ray_origin, ray_direction, false);
-
- float lambda;
- if (isect_ray_plane_v3(ray_origin, ray_direction, cdd->project.plane, &lambda, true)) {
- madd_v3_v3v3fl(r_location_world, ray_origin, ray_direction, lambda);
+ if (ED_view3d_win_to_3d_on_plane(ar, cdd->project.plane, mval_fl, true, r_location_world)) {
if (r_normal_world) {
zero_v3(r_normal_world);
}
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index 338fac03fef..f4d4ce7fb63 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -573,7 +573,7 @@ static void gp_draw_stroke_point(
gp_calc_2d_stroke_fxy(fpt, sflag, offsx, offsy, winx, winy, co);
/* if thickness is less than GP_DRAWTHICKNESS_SPECIAL, simple dot looks ok
- * - also mandatory in if Image Editor 'image-based' dot
+ * - also mandatory in if Image Editor 'image-based' dot
*/
if ((thickness < GP_DRAWTHICKNESS_SPECIAL) ||
((dflag & GP_DRAWDATA_IEDITHACK) && (sflag & GP_STROKE_2DSPACE)))
@@ -723,7 +723,7 @@ static void gp_draw_stroke_2d(bGPDspoint *points, int totpoints, short thickness
/* if the first segment, start of segment is segment's normal */
if (i == 0) {
/* draw start cap first
- * - make points slightly closer to center (about halfway across)
+ * - make points slightly closer to center (about halfway across)
*/
mt[0] = m2[0] * pthick * 0.5f;
mt[1] = m2[1] * pthick * 0.5f;
@@ -764,8 +764,8 @@ static void gp_draw_stroke_2d(bGPDspoint *points, int totpoints, short thickness
normalize_v2(mb);
/* calculate gradient to apply
- * - as basis, use just pthick * bisector gradient
- * - if cross-section not as thick as it should be, add extra padding to fix it
+ * - as basis, use just pthick * bisector gradient
+ * - if cross-section not as thick as it should be, add extra padding to fix it
*/
mt[0] = mb[0] * pthick;
mt[1] = mb[1] * pthick;
@@ -815,7 +815,7 @@ static void gp_draw_stroke_2d(bGPDspoint *points, int totpoints, short thickness
/* draw end cap as last step
- * - make points slightly closer to center (about halfway across)
+ * - make points slightly closer to center (about halfway across)
*/
mt[0] = m2[0] * pthick * 0.5f;
mt[1] = m2[1] * pthick * 0.5f;
@@ -1407,11 +1407,11 @@ static void gp_draw_data_layers(
#undef GP_DRAWFLAG_APPLY
/* Draw 'onionskins' (frame left + right)
- * - It is only possible to show these if the option is enabled
- * - The "no onions" flag prevents ghosts from appearing during animation playback/scrubbing
- * and in renders
- * - The per-layer "always show" flag however overrides the playback/render restriction,
- * allowing artists to selectively turn onionskins on/off during playback
+ * - It is only possible to show these if the option is enabled
+ * - The "no onions" flag prevents ghosts from appearing during animation playback/scrubbing
+ * and in renders
+ * - The per-layer "always show" flag however overrides the playback/render restriction,
+ * allowing artists to selectively turn onionskins on/off during playback
*/
if ((gpl->flag & GP_LAYER_ONIONSKIN) &&
((dflag & GP_DRAWDATA_NO_ONIONS) == 0 || (gpl->flag & GP_LAYER_GHOST_ALWAYS)))
@@ -1427,11 +1427,11 @@ static void gp_draw_data_layers(
gpl->opacity, gpl->tintcolor, false, false, diff_mat);
/* Draw verts of selected strokes
- * - when doing OpenGL renders, we don't want to be showing these, as that ends up flickering
- * - locked layers can't be edited, so there's no point showing these verts
- * as they will have no bearings on what gets edited
- * - only show when in editmode, since operators shouldn't work otherwise
- * (NOTE: doing it this way means that the toggling editmode shows visible change immediately)
+ * - when doing OpenGL renders, we don't want to be showing these, as that ends up flickering
+ * - locked layers can't be edited, so there's no point showing these verts
+ * as they will have no bearings on what gets edited
+ * - only show when in editmode, since operators shouldn't work otherwise
+ * (NOTE: doing it this way means that the toggling editmode shows visible change immediately)
*/
/* XXX: perhaps we don't want to show these when users are drawing... */
if ((G.f & G_RENDER_OGL) == 0 &&
@@ -1590,8 +1590,8 @@ static void gp_draw_data_all(Scene *scene, bGPdata *gpd, int offsx, int offsy, i
/* ............................
* XXX
- * We need to review the calls below, since they may be/are not that suitable for
- * the new ways that we intend to be drawing data...
+ * We need to review the calls below, since they may be/are not that suitable for
+ * the new ways that we intend to be drawing data...
* ............................ */
/* draw grease-pencil sketches to specified 2d-view that uses ibuf corrections */
diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c
index 9d9ec51119b..3a3953579a6 100644
--- a/source/blender/editors/gpencil/editaction_gpencil.c
+++ b/source/blender/editors/gpencil/editaction_gpencil.c
@@ -308,10 +308,10 @@ void ED_gplayer_frames_keytype_set(bGPDlayer *gpl, short type)
/* -------------------------------------- */
/* Copy and Paste Tools */
/* - The copy/paste buffer currently stores a set of GP_Layers, with temporary
- * GP_Frames with the necessary strokes
+ * GP_Frames with the necessary strokes
* - Unless there is only one element in the buffer, names are also tested to check for compatibility.
* - All pasted frames are offset by the same amount. This is calculated as the difference in the times of
- * the current frame and the 'first keyframe' (i.e. the earliest one in all channels).
+ * the current frame and the 'first keyframe' (i.e. the earliest one in all channels).
* - The earliest frame is calculated per copy operation.
*/
@@ -483,10 +483,10 @@ bool ED_gpencil_anim_copybuf_paste(bAnimContext *ac, const short offset_mode)
/* This should be the right frame... as it may be a pre-existing frame,
* must make sure that only compatible stroke types get copied over
- * - We cannot just add a duplicate frame, as that would cause errors
- * - For now, we don't check if the types will be compatible since we
- * don't have enough info to do so. Instead, we simply just paste,
- * af it works, it will show up.
+ * - We cannot just add a duplicate frame, as that would cause errors
+ * - For now, we don't check if the types will be compatible since we
+ * don't have enough info to do so. Instead, we simply just paste,
+ * if it works, it will show up.
*/
for (gps = gpfs->strokes.first; gps; gps = gps->next) {
/* make a copy of stroke, then of its points array */
diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c
index 0f51f12793a..a5c6fd8b8cf 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -539,9 +539,9 @@ static bool gp_brush_pinch_apply(tGP_BrushEditData *gso, bGPDstroke *gps, int i,
float vec[3];
/* Scale down standard influence value to get it more manageable...
- * - No damping = Unmanageable at > 0.5 strength
- * - Div 10 = Not enough effect
- * - Div 5 = Happy medium... (by trial and error)
+ * - No damping = Unmanageable at > 0.5 strength
+ * - Div 10 = Not enough effect
+ * - Div 5 = Happy medium... (by trial and error)
*/
inf = gp_brush_influence_calc(gso, radius, co) / 5.0f;
@@ -956,7 +956,7 @@ static bool gpsculpt_brush_apply_clone(bContext *C, tGP_BrushEditData *gso)
gp_brush_clone_add(C, gso);
}
else {
- /* Stamp or Continous Mode */
+ /* Stamp or Continuous Mode */
if (1 /*gso->brush->mode == GP_EDITBRUSH_CLONE_MODE_STAMP*/) {
/* Stamp - Proceed to translate the newly added strokes */
gp_brush_clone_adjust(gso);
@@ -1253,7 +1253,7 @@ static bool gpsculpt_brush_do_stroke(
}
else {
/* Loop over the points in the stroke, checking for intersections
- * - an intersection means that we touched the stroke
+ * - an intersection means that we touched the stroke
*/
for (i = 0; (i + 1) < gps->totpoints; i++) {
/* Get points to work with */
@@ -1287,7 +1287,7 @@ static bool gpsculpt_brush_do_stroke(
{
/* Check if point segment of stroke had anything to do with
* brush region (either within stroke painted, or on its lines)
- * - this assumes that linewidth is irrelevant
+ * - this assumes that linewidth is irrelevant
*/
if (gp_stroke_inside_circle(gso->mval, gso->mval_prev, radius, pc1[0], pc1[1], pc2[0], pc2[1])) {
/* Apply operation to these points */
diff --git a/source/blender/editors/gpencil/gpencil_convert.c b/source/blender/editors/gpencil/gpencil_convert.c
index e0c2e116b8a..9f94cf3beb8 100644
--- a/source/blender/editors/gpencil/gpencil_convert.c
+++ b/source/blender/editors/gpencil/gpencil_convert.c
@@ -141,7 +141,7 @@ static const EnumPropertyItem *rna_GPConvert_mode_items(bContext *UNUSED(C), Poi
/* --- */
/* convert the coordinates from the given stroke point into 3d-coordinates
- * - assumes that the active space is the 3D-View
+ * - assumes that the active space is the 3D-View
*/
static void gp_strokepoint_convertcoords(
bContext *C, bGPDlayer *gpl, bGPDstroke *gps, bGPDspoint *source_pt,
@@ -1150,7 +1150,7 @@ static void gp_layer_to_curve(bContext *C, ReportList *reports, bGPdata *gpd, bG
}
/* init the curve object (remove rotation and get curve data from it)
- * - must clear transforms set on object, as those skew our results
+ * - must clear transforms set on object, as those skew our results
*/
ob = BKE_object_add_only_object(bmain, OB_CURVE, gpl->info);
cu = ob->data = BKE_curve_add(bmain, gpl->info, OB_CURVE);
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index c28fea0fc41..1bdeeefe223 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -670,13 +670,13 @@ static int gp_merge_layer_exec(bContext *C, wmOperator *op)
/* Collect frames of gpl_current in hash table to avoid O(n^2) lookups */
GHash *gh_frames_cur = BLI_ghash_int_new_ex(__func__, 64);
for (bGPDframe *gpf = gpl_current->frames.first; gpf; gpf = gpf->next) {
- BLI_ghash_insert(gh_frames_cur, SET_INT_IN_POINTER(gpf->framenum), gpf);
+ BLI_ghash_insert(gh_frames_cur, POINTER_FROM_INT(gpf->framenum), gpf);
}
/* read all frames from next layer */
for (bGPDframe *gpf = gpl_next->frames.first; gpf; gpf = gpf->next) {
/* try to find frame in active layer */
- bGPDframe *frame = BLI_ghash_lookup(gh_frames_cur, SET_INT_IN_POINTER(gpf->framenum));
+ bGPDframe *frame = BLI_ghash_lookup(gh_frames_cur, POINTER_FROM_INT(gpf->framenum));
if (!frame) {
/* nothing found, create new */
frame = BKE_gpencil_frame_addnew(gpl_current, gpf->framenum);
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 936cf571b4a..2c87bd86da1 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -2091,8 +2091,8 @@ typedef enum eGP_ReprojectModes {
static bool gp_strokes_reproject_poll(bContext *C)
{
/* 2 Requirements:
- * - 1) Editable GP data
- * - 2) 3D View only (2D editors don't have projection issues)
+ * - 1) Editable GP data
+ * - 2) 3D View only (2D editors don't have projection issues)
*/
return (gp_stroke_edit_poll(C) && ED_operator_view3d_active(C));
}
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 0eb74f137ca..27cde27fdf7 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -241,7 +241,7 @@ static void gp_get_3d_reference(tGPsdata *p, float vec[3])
Object *ob = (Object *)p->ownerPtr.data;
/* active Object
- * - use relative distance of 3D-cursor from object center
+ * - use relative distance of 3D-cursor from object center
*/
sub_v3_v3v3(vec, fp, ob->loc);
}
@@ -266,14 +266,14 @@ static bool gp_stroke_filtermval(tGPsdata *p, const int mval[2], int pmval[2])
return true;
/* check if mouse moved at least certain distance on both axes (best case)
- * - aims to eliminate some jitter-noise from input when trying to draw straight lines freehand
+ * - aims to eliminate some jitter-noise from input when trying to draw straight lines freehand
*/
else if ((dx > MIN_MANHATTEN_PX) && (dy > MIN_MANHATTEN_PX))
return true;
/* check if the distance since the last point is significant enough
- * - prevents points being added too densely
- * - distance here doesn't use sqrt to prevent slowness... we should still be safe from overflows though
+ * - prevents points being added too densely
+ * - distance here doesn't use sqrt to prevent slowness... we should still be safe from overflows though
*/
else if ((dx * dx + dy * dy) > MIN_EUCLIDEAN_PX * MIN_EUCLIDEAN_PX)
return true;
@@ -351,7 +351,7 @@ static void gp_stroke_convertcoords(tGPsdata *p, const int mval[2], float out[3]
if (gpd->sbuffer_sflag & GP_STROKE_3DSPACE) {
if (gpencil_project_check(p) && (ED_view3d_autodist_simple(p->ar, mval, out, 0, depth))) {
/* projecting onto 3D-Geometry
- * - nothing more needs to be done here, since view_autodist_simple() has already done it
+ * - nothing more needs to be done here, since view_autodist_simple() has already done it
*/
}
else {
@@ -365,8 +365,8 @@ static void gp_stroke_convertcoords(tGPsdata *p, const int mval[2], float out[3]
* works OK, but it could of course be improved.
*
* TODO:
- * - investigate using nearest point(s) on a previous stroke as
- * reference point instead or as offset, for easier stroke matching
+ * - investigate using nearest point(s) on a previous stroke as
+ * reference point instead or as offset, for easier stroke matching
*/
gp_get_3d_reference(p, rvec);
@@ -507,7 +507,7 @@ static short gp_stroke_addpoint(tGPsdata *p, const int mval[2], float pressure,
}
else {
/* just reset the endpoint to the latest value
- * - assume that pointers for this are always valid...
+ * - assume that pointers for this are always valid...
*/
pt = ((tGPspoint *)(gpd->sbuffer) + 1);
@@ -673,8 +673,8 @@ static short gp_stroke_addpoint(tGPsdata *p, const int mval[2], float pressure,
}
/* simplify a stroke (in buffer) before storing it
- * - applies a reverse Chaikin filter
- * - code adapted from etch-a-ton branch (editarmature_sketch.c)
+ * - applies a reverse Chaikin filter
+ * - code adapted from etch-a-ton branch (editarmature_sketch.c)
*/
static void gp_stroke_simplify(tGPsdata *p)
{
@@ -693,15 +693,15 @@ static void gp_stroke_simplify(tGPsdata *p)
return;
/* clear buffer (but don't free mem yet) so that we can write to it
- * - firstly set sbuffer to NULL, so a new one is allocated
- * - secondly, reset flag after, as it gets cleared auto
+ * - firstly set sbuffer to NULL, so a new one is allocated
+ * - secondly, reset flag after, as it gets cleared auto
*/
gpd->sbuffer = NULL;
gp_session_validatebuffer(p);
gpd->sbuffer_sflag = flag;
/* macro used in loop to get position of new point
- * - used due to the mixture of datatypes in use here
+ * - used due to the mixture of datatypes in use here
*/
#define GP_SIMPLIFY_AVPOINT(offs, sfac) \
{ \
@@ -763,7 +763,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
int depth_margin = (ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE) ? 4 : 0;
/* get total number of points to allocate space for
- * - drawing straight-lines only requires the endpoints
+ * - drawing straight-lines only requires the endpoints
*/
if (p->paintmode == GP_PAINTMODE_DRAW_STRAIGHT)
totelem = (gpd->sbuffer_size >= 2) ? 2 : gpd->sbuffer_size;
@@ -1189,7 +1189,7 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p,
{
/* Check if point segment of stroke had anything to do with
* eraser region (either within stroke painted, or on its lines)
- * - this assumes that linewidth is irrelevant
+ * - this assumes that linewidth is irrelevant
*/
if (gp_stroke_inside_circle(mval, mvalo, radius, pc1[0], pc1[1], pc2[0], pc2[1])) {
if ((gp_stroke_eraser_is_occluded(p, pt1, pc1[0], pc1[1]) == false) ||
@@ -1197,8 +1197,8 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p,
{
/* Point is affected: */
/* 1) Adjust thickness
- * - Influence of eraser falls off with distance from the middle of the eraser
- * - Second point gets less influence, as it might get hit again in the next segment
+ * - Influence of eraser falls off with distance from the middle of the eraser
+ * - Second point gets less influence, as it might get hit again in the next segment
*/
pt1->pressure -= gp_stroke_eraser_calc_influence(p, mval, radius, pc1) * strength;
pt2->pressure -= gp_stroke_eraser_calc_influence(p, mval, radius, pc2) * strength / 2.0f;
@@ -1411,7 +1411,7 @@ static bool gp_session_initdata(bContext *C, tGPsdata *p)
/* RegionView3D *rv3d = ar->regiondata; */
/* set current area
- * - must verify that region data is 3D-view (and not something else)
+ * - must verify that region data is 3D-view (and not something else)
*/
/* CAUTION: If this is the "toolbar", then this will change on the first stroke */
p->sa = curarea;
@@ -2488,9 +2488,9 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
}
/* toggle painting mode upon mouse-button movement
- * - LEFTMOUSE = standard drawing (all) / straight line drawing (all) / polyline (toolbox only)
- * - RIGHTMOUSE = polyline (hotkey) / eraser (all)
- * (Disabling RIGHTMOUSE case here results in bugs like [#32647])
+ * - LEFTMOUSE = standard drawing (all) / straight line drawing (all) / polyline (toolbox only)
+ * - RIGHTMOUSE = polyline (hotkey) / eraser (all)
+ * (Disabling RIGHTMOUSE case here results in bugs like [#32647])
* also making sure we have a valid event value, to not exit too early
*/
if (ELEM(event->type, LEFTMOUSE, RIGHTMOUSE) && (ELEM(event->val, KM_PRESS, KM_RELEASE))) {
diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c
index a21c5618877..7bb0c005184 100644
--- a/source/blender/editors/gpencil/gpencil_select.c
+++ b/source/blender/editors/gpencil/gpencil_select.c
@@ -109,10 +109,10 @@ static int gpencil_select_all_exec(bContext *C, wmOperator *op)
}
/* if deselecting, we need to deselect strokes across all frames
- * - Currently, an exception is only given for deselection
- * Selecting and toggling should only affect what's visible,
- * while deselecting helps clean up unintended/forgotten
- * stuff on other frames
+ * - Currently, an exception is only given for deselection
+ * Selecting and toggling should only affect what's visible,
+ * while deselecting helps clean up unintended/forgotten
+ * stuff on other frames
*/
if (action == SEL_DESELECT) {
/* deselect strokes across editable layers
@@ -702,7 +702,7 @@ static bool gp_stroke_do_circle_sel(
}
else {
/* Loop over the points in the stroke, checking for intersections
- * - an intersection means that we touched the stroke
+ * - an intersection means that we touched the stroke
*/
for (i = 0; (i + 1) < gps->totpoints; i++) {
/* get points to work with */
@@ -730,7 +730,7 @@ static bool gp_stroke_do_circle_sel(
/* check if point segment of stroke had anything to do with
* eraser region (either within stroke painted, or on its lines)
- * - this assumes that linewidth is irrelevant
+ * - this assumes that linewidth is irrelevant
*/
if (gp_stroke_inside_circle(mval, mvalo, radius, x0, y0, x1, y1)) {
/* change selection of stroke, and then of both points
diff --git a/source/blender/editors/gpencil/gpencil_undo.c b/source/blender/editors/gpencil/gpencil_undo.c
index d35df8bc380..23d80f66630 100644
--- a/source/blender/editors/gpencil/gpencil_undo.c
+++ b/source/blender/editors/gpencil/gpencil_undo.c
@@ -155,8 +155,8 @@ void gpencil_undo_push(bGPdata *gpd)
}
/* limit number of undo steps to the maximum undo steps
- * - to prevent running out of memory during **really**
- * long drawing sessions (triggering swapping)
+ * - to prevent running out of memory during **really**
+ * long drawing sessions (triggering swapping)
*/
/* TODO: Undo-memory constraint is not respected yet, but can be added if we have any need for it */
if (U.undosteps && !BLI_listbase_is_empty(&undo_nodes)) {
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index e6f3b40024f..2b49b2bd3d1 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -914,8 +914,8 @@ bool gp_smooth_stroke_thickness(bGPDstroke *gps, int i, float inf)
ptc = &gps->points[after];
/* the optimal value is the corresponding to the interpolation of the pressure
- * at the distance of point b
- */
+ * at the distance of point b
+ */
float fac = line_point_factor_v3(&ptb->x, &pta->x, &ptc->x);
float optimal = (1.0f - fac) * pta->pressure + fac * ptc->pressure;
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index 28dc233e1c8..b805b2ea0ff 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -468,7 +468,7 @@ typedef struct bAnimChannelType {
int (*setting_flag)(bAnimContext *ac, eAnimChannel_Settings setting, bool *neg);
/* get the pointer to int/short where data is stored,
* with type being sizeof(ptr_data) which should be fine for runtime use...
- * - assume that setting has been checked to be valid for current context
+ * - assume that setting has been checked to be valid for current context
*/
void *(*setting_ptr)(bAnimListElem *ale, eAnimChannel_Settings setting, short *type);
} bAnimChannelType;
@@ -492,25 +492,25 @@ void ANIM_channel_draw_widgets(const struct bContext *C, bAnimContext *ac, bAnim
/* Check if some setting for a channel is enabled
* Returns: 1 = On, 0 = Off, -1 = Invalid
*
- * - setting: eAnimChannel_Settings
+ * - setting: eAnimChannel_Settings
*/
short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting);
/* Change value of some setting for a channel
- * - setting: eAnimChannel_Settings
- * - mode: eAnimChannels_SetFlag
+ * - setting: eAnimChannel_Settings
+ * - mode: eAnimChannels_SetFlag
*/
void ANIM_channel_setting_set(bAnimContext *ac, bAnimListElem *ale, eAnimChannel_Settings setting, eAnimChannels_SetFlag mode);
/* Flush visibility (for Graph Editor) changes up/down hierarchy for changes in the given setting
- * - anim_data: list of the all the anim channels that can be chosen
- * -> filtered using ANIMFILTER_CHANNELS only, since if we took VISIBLE too,
- * then the channels under closed expanders get ignored...
- * - ale_setting: the anim channel (not in the anim_data list directly, though occurring there)
- * with the new state of the setting that we want flushed up/down the hierarchy
- * - setting: type of setting to set
- * - on: whether the visibility setting has been enabled or disabled
+ * - anim_data: list of the all the anim channels that can be chosen
+ * -> filtered using ANIMFILTER_CHANNELS only, since if we took VISIBLE too,
+ * then the channels under closed expanders get ignored...
+ * - ale_setting: the anim channel (not in the anim_data list directly, though occurring there)
+ * with the new state of the setting that we want flushed up/down the hierarchy
+ * - setting: type of setting to set
+ * - on: whether the visibility setting has been enabled or disabled
*/
void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAnimListElem *ale_setting, eAnimChannel_Settings setting, eAnimChannels_SetFlag mode);
@@ -567,12 +567,12 @@ void ANIM_fmodifiers_copybuf_free(void);
/* copy the given F-Modifiers to the buffer, returning whether anything was copied or not
* assuming that the buffer has been cleared already with ANIM_fmodifiers_copybuf_free()
- * - active: only copy the active modifier
+ * - active: only copy the active modifier
*/
bool ANIM_fmodifiers_copy_to_buf(ListBase *modifiers, bool active);
/* 'Paste' the F-Modifier(s) from the buffer to the specified list
- * - replace: free all the existing modifiers to leave only the pasted ones
+ * - replace: free all the existing modifiers to leave only the pasted ones
*/
bool ANIM_fmodifiers_paste_from_buf(ListBase *modifiers, bool replace, struct FCurve *curve);
@@ -647,9 +647,9 @@ float ANIM_unit_mapping_get_factor(struct Scene *scene, struct ID *id, struct FC
#define BEZKEYTYPE(bezt) ((bezt)->hide)
/* set/clear/toggle macro
- * - channel - channel with a 'flag' member that we're setting
- * - smode - 0=clear, 1=set, 2=invert
- * - sflag - bitflag to set
+ * - channel - channel with a 'flag' member that we're setting
+ * - smode - 0=clear, 1=set, 2=invert
+ * - sflag - bitflag to set
*/
#define ACHANNEL_SET_FLAG(channel, smode, sflag) \
{ \
@@ -659,9 +659,9 @@ float ANIM_unit_mapping_get_factor(struct Scene *scene, struct ID *id, struct FC
}
/* set/clear/toggle macro, where the flag is negative
- * - channel - channel with a 'flag' member that we're setting
- * - smode - 0=clear, 1=set, 2=invert
- * - sflag - bitflag to set
+ * - channel - channel with a 'flag' member that we're setting
+ * - smode - 0=clear, 1=set, 2=invert
+ * - sflag - bitflag to set
*/
#define ACHANNEL_SET_FLAG_NEG(channel, smode, sflag) \
{ \
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h
index d6e385ab5a6..9ad716cf07c 100644
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@ -67,7 +67,7 @@ typedef struct EditBone {
float head[3]; /* Orientation and length is implicit during editing */
float tail[3];
/* All joints are considered to have zero rotation with respect to
- * their parents. Therefore any rotations specified during the
+ * their parents. Therefore any rotations specified during the
* animation are automatically relative to the bones' rest positions*/
int flag;
int layer;
diff --git a/source/blender/editors/include/ED_keyframes_edit.h b/source/blender/editors/include/ED_keyframes_edit.h
index 5787a63d324..e7ea5cf159e 100644
--- a/source/blender/editors/include/ED_keyframes_edit.h
+++ b/source/blender/editors/include/ED_keyframes_edit.h
@@ -216,11 +216,11 @@ typedef enum eKeyMergeMode {
/* function for working with F-Curve data only (i.e. when filters have been chosen to explicitly use this) */
short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked, struct FCurve *fcu, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb);
/* function for working with any type (i.e. one of the known types) of animation channel
- * - filterflag is bDopeSheet->flag (DOPESHEET_FILTERFLAG)
+ * - filterflag is bDopeSheet->flag (DOPESHEET_FILTERFLAG)
*/
short ANIM_animchannel_keyframes_loop(KeyframeEditData *ked, struct bDopeSheet *ads, struct bAnimListElem *ale, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb);
/* same as above, except bAnimListElem wrapper is not needed...
- * - keytype is eAnim_KeyType
+ * - keytype is eAnim_KeyType
*/
short ANIM_animchanneldata_keyframes_loop(KeyframeEditData *ked, struct bDopeSheet *ads, void *data, int keytype, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb);
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h
index eb77ee8f552..b3496b1c088 100644
--- a/source/blender/editors/include/ED_keyframing.h
+++ b/source/blender/editors/include/ED_keyframing.h
@@ -60,7 +60,7 @@ struct EnumPropertyItem;
/* ************ Keyframing Management **************** */
/* Get the active settings for keyframing settings from context (specifically the given scene)
- * - incl_mode: include settings from keyframing mode in the result (i.e. replace only)
+ * - incl_mode: include settings from keyframing mode in the result (i.e. replace only)
*/
short ANIM_get_keyframing_flags(struct Scene *scene, short incl_mode);
@@ -104,16 +104,16 @@ int insert_vert_fcurve(struct FCurve *fcu, float x, float y, eBezTriple_Keyframe
/* -------- */
/* Secondary Keyframing API calls:
- * Use this to insert a keyframe using the current value being keyframed, in the
- * nominated F-Curve (no creation of animation data performed). Returns success.
+ * Use this to insert a keyframe using the current value being keyframed, in the
+ * nominated F-Curve (no creation of animation data performed). Returns success.
*/
bool insert_keyframe_direct(struct ReportList *reports, struct PointerRNA ptr, struct PropertyRNA *prop, struct FCurve *fcu, float cfra, eBezTriple_KeyframeType keytype, eInsertKeyFlags flag);
/* -------- */
/* Main Keyframing API calls:
- * Use this to create any necessary animation data, and then insert a keyframe
- * using the current value being keyframed, in the relevant place. Returns success.
+ * Use this to create any necessary animation data, and then insert a keyframe
+ * using the current value being keyframed, in the relevant place. Returns success.
*/
short insert_keyframe(
struct Main *bmain, struct ReportList *reports, struct ID *id, struct bAction *act,
@@ -158,8 +158,8 @@ typedef struct KeyingSetInfo {
/* generate callbacks */
/* iterator to use to go through collections of data in context
- * - this callback is separate from the 'adding' stage, allowing
- * BuiltIn KeyingSets to be manually specified to use
+ * - this callback is separate from the 'adding' stage, allowing
+ * BuiltIn KeyingSets to be manually specified to use
*/
cbKeyingSet_Iterator iter;
/* generator to use to add properties based on the data found by iterator */
@@ -308,8 +308,8 @@ bool ANIM_driver_can_paste(void);
bool ANIM_copy_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag);
/* Main Driver Management API calls:
- * Add a new driver for the specified property on the given ID block or replace an existing one
- * with the driver + driver-curve data from the buffer
+ * Add a new driver for the specified property on the given ID block or replace an existing one
+ * with the driver + driver-curve data from the buffer
*/
bool ANIM_paste_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag);
@@ -352,22 +352,22 @@ bool autokeyframe_cfra_can_key(struct Scene *scene, struct ID *id);
/* ************ Keyframe Checking ******************** */
/* Lesser Keyframe Checking API call:
- * - Used for the buttons to check for keyframes...
+ * - Used for the buttons to check for keyframes...
*/
bool fcurve_frame_has_keyframe(struct FCurve *fcu, float frame, short filter);
/* Main Keyframe Checking API call:
* Checks whether a keyframe exists for the given ID-block one the given frame.
- * - It is recommended to call this method over the other keyframe-checkers directly,
- * in case some detail of the implementation changes...
- * - frame: the value of this is quite often result of BKE_scene_frame_get()
+ * - It is recommended to call this method over the other keyframe-checkers directly,
+ * in case some detail of the implementation changes...
+ * - frame: the value of this is quite often result of BKE_scene_frame_get()
*/
bool id_frame_has_keyframe(struct ID *id, float frame, short filter);
/* filter flags for id_cfra_has_keyframe
*
* WARNING: do not alter order of these, as also stored in files
- * (for v3d->keyflags)
+ * (for v3d->keyflags)
*/
typedef enum eAnimFilterFlags {
/* general */
diff --git a/source/blender/editors/include/ED_types.h b/source/blender/editors/include/ED_types.h
index a478278da4c..9188fca2422 100644
--- a/source/blender/editors/include/ED_types.h
+++ b/source/blender/editors/include/ED_types.h
@@ -33,7 +33,7 @@
/* **************** GENERAL EDITOR-WIDE TYPES AND DEFINES ************************** */
-/* old blender defines... should be depricated? */
+/* old blender defines... should be deprecated? */
#define DESELECT 0
#define SELECT 1
#define ACTIVE 2
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index 82411ba7401..c21a6cccb2e 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -221,12 +221,15 @@ float ED_view3d_pixel_size_no_ui_scale(const struct RegionView3D *rv3d, const fl
float ED_view3d_calc_zfac(const struct RegionView3D *rv3d, const float co[3], bool *r_flip);
bool ED_view3d_clip_segment(const struct RegionView3D *rv3d, float ray_start[3], float ray_end[3]);
-bool ED_view3d_win_to_ray(
+bool ED_view3d_win_to_ray_clipped(
const struct ARegion *ar, const struct View3D *v3d, const float mval[2],
float ray_start[3], float ray_normal[3], const bool do_clip);
-bool ED_view3d_win_to_ray_ex(
+bool ED_view3d_win_to_ray_clipped_ex(
const struct ARegion *ar, const struct View3D *v3d, const float mval[2],
float r_ray_co[3], float r_ray_normal[3], float r_ray_start[3], bool do_clip);
+void ED_view3d_win_to_ray(
+ const struct ARegion *ar, const float mval[2],
+ float r_ray_start[3], float r_ray_normal[3]);
void ED_view3d_global_to_vector(const struct RegionView3D *rv3d, const float coord[3], float vec[3]);
void ED_view3d_win_to_3d(
const struct View3D *v3d, const struct ARegion *ar,
@@ -236,11 +239,20 @@ void ED_view3d_win_to_3d_int(
const struct View3D *v3d, const struct ARegion *ar,
const float depth_pt[3], const int mval[2],
float r_out[3]);
+bool ED_view3d_win_to_3d_on_plane(
+ const struct ARegion *ar,
+ const float plane[4], const float mval[2], const bool do_clip,
+ float r_out[3]);
+bool ED_view3d_win_to_3d_on_plane_int(
+ const struct ARegion *ar,
+ const float plane[4], const int mval[2], const bool do_clip,
+ float r_out[3]);
void ED_view3d_win_to_delta(const struct ARegion *ar, const float mval[2], float out[3], const float zfac);
void ED_view3d_win_to_origin(const struct ARegion *ar, const float mval[2], float out[3]);
void ED_view3d_win_to_vector(const struct ARegion *ar, const float mval[2], float out[3]);
-bool ED_view3d_win_to_segment(const struct ARegion *ar, struct View3D *v3d, const float mval[2],
- float r_ray_start[3], float r_ray_end[3], const bool do_clip);
+bool ED_view3d_win_to_segment_clipped(
+ const struct ARegion *ar, struct View3D *v3d, const float mval[2],
+ float r_ray_start[3], float r_ray_end[3], const bool do_clip);
void ED_view3d_ob_project_mat_get(const struct RegionView3D *v3d, struct Object *ob, float pmat[4][4]);
void ED_view3d_ob_project_mat_get_from_obmat(const struct RegionView3D *rv3d, float obmat[4][4], float pmat[4][4]);
void ED_view3d_unproject(struct bglMats *mats, float out[3], const float x, const float y, const float z);
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 0db6e2c122c..48c917040f7 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -1076,6 +1076,7 @@ void uiItemV(uiLayout *layout, const char *name, int icon, int argval); /* value
void uiItemS(uiLayout *layout); /* separator */
void uiItemMenuF(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *arg);
+void uiItemMenuFN(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *argN);
void uiItemMenuEnumO_ptr(uiLayout *layout, struct bContext *C, struct wmOperatorType *ot, const char *propname, const char *name, int icon);
void uiItemMenuEnumO(uiLayout *layout, struct bContext *C, const char *opname, const char *propname, const char *name, int icon);
void uiItemMenuEnumR_prop(uiLayout *layout, struct PointerRNA *ptr, PropertyRNA *prop, const char *name, int icon);
diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h
index 99cee0cb673..a7ae4ea1241 100644
--- a/source/blender/editors/include/UI_view2d.h
+++ b/source/blender/editors/include/UI_view2d.h
@@ -46,8 +46,8 @@
/* Common View2D view types
* NOTE: only define a type here if it completely sets all (+/- a few) of the relevant flags
- * and settings for a View2D region, and that set of settings is used in more
- * than one specific place
+ * and settings for a View2D region, and that set of settings is used in more
+ * than one specific place
*/
enum eView2D_CommonViewTypes {
/* custom view type (region has defined all necessary flags already) */
@@ -118,7 +118,7 @@ enum eView2D_Gridlines {
/* ------------------------------------------ */
-/* Macros: */
+/* Macros: */
/* test if mouse in a scrollbar (assume that scroller availability has been tested) */
#define IN_2D_VERT_SCROLL(v2d, co) (BLI_rcti_isect_pt_v(&v2d->vert, co))
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 2e4cab5ec24..3188829bf31 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -4164,7 +4164,7 @@ void UI_but_drag_set_value(uiBut *but)
void UI_but_drag_set_image(uiBut *but, const char *path, int icon, struct ImBuf *imb, float scale, const bool use_free)
{
but->dragtype = WM_DRAG_PATH;
- ui_def_but_icon(but, icon, 0); /* no flag UI_HAS_ICON, so icon doesnt draw in button */
+ ui_def_but_icon(but, icon, 0); /* no flag UI_HAS_ICON, so icon doesn't draw in button */
if ((but->dragflag & UI_BUT_DRAGPOIN_FREE)) {
MEM_SAFE_FREE(but->dragpoin);
but->dragflag &= ~UI_BUT_DRAGPOIN_FREE;
@@ -4484,7 +4484,7 @@ static void operator_enum_search_cb(const struct bContext *C, void *but, const c
for (item = item_array; item->identifier; item++) {
/* note: need to give the index rather than the identifier because the enum can be freed */
if (BLI_strcasestr(item->name, str)) {
- if (false == UI_search_item_add(items, item->name, SET_INT_IN_POINTER(item->value), 0))
+ if (false == UI_search_item_add(items, item->name, POINTER_FROM_INT(item->value), 0))
break;
}
}
@@ -4502,7 +4502,7 @@ static void operator_enum_call_cb(struct bContext *UNUSED(C), void *but, void *a
if (ot) {
if (ot->prop) {
- RNA_property_enum_set(opptr, ot->prop, GET_INT_FROM_POINTER(arg2));
+ RNA_property_enum_set(opptr, ot->prop, POINTER_AS_INT(arg2));
/* We do not call op from here, will be called by button code.
* ui_apply_but_funcs_after() (in interface_handlers.c) called this func before checking operators,
* because one of its parameters is the button itself!
diff --git a/source/blender/editors/interface/interface_eyedropper_color.c b/source/blender/editors/interface/interface_eyedropper_color.c
index 5eb4359607a..34f33f1d970 100644
--- a/source/blender/editors/interface/interface_eyedropper_color.c
+++ b/source/blender/editors/interface/interface_eyedropper_color.c
@@ -103,7 +103,7 @@ static bool eyedropper_init(bContext *C, wmOperator *op)
display_device = scene->display_settings.display_device;
eye->display = IMB_colormanagement_display_get_named(display_device);
- /* store inital color */
+ /* store initial color */
RNA_property_float_get_array(&eye->ptr, eye->prop, col);
if (eye->display) {
IMB_colormanagement_display_to_scene_linear_v3(col, eye->display);
diff --git a/source/blender/editors/interface/interface_eyedropper_datablock.c b/source/blender/editors/interface/interface_eyedropper_datablock.c
index 2bb575558fc..43ccd65ddf2 100644
--- a/source/blender/editors/interface/interface_eyedropper_datablock.c
+++ b/source/blender/editors/interface/interface_eyedropper_datablock.c
@@ -190,7 +190,10 @@ static void datadropper_id_sample_pt(bContext *C, DataDropper *ddr, int mx, int
}
}
- if (id) {
+ PointerRNA idptr;
+ RNA_id_pointer_create(id, &idptr);
+
+ if (id && RNA_property_pointer_poll(&ddr->ptr, ddr->prop, &idptr)) {
BLI_snprintf(ddr->name, sizeof(ddr->name), "%s: %s",
ddr->idcode_name, id->name + 2);
*r_id = id;
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 06b6099cec7..64c3ae32eaa 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -160,7 +160,7 @@ typedef enum uiHandleButtonState {
#ifdef USE_ALLSELECT
-/* Unfortunately theres no good way handle more generally:
+/* Unfortunately there's no good way handle more generally:
* (propagate single clicks on layer buttons to other objects) */
#define USE_ALLSELECT_LAYER_HACK
@@ -2529,7 +2529,7 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
* It converts every UTF-8 character to an asterisk, and also remaps
* the cursor position and selection start/end.
*
- * \note: remaping is used, because password could contain UTF-8 characters.
+ * \note: remapping is used, because password could contain UTF-8 characters.
*
*/
@@ -2793,7 +2793,7 @@ static bool ui_textedit_insert_buf(
if ((len + step >= data->maxlen) && (data->maxlen - (len + 1) > 0)) {
if (ui_but_is_utf8(but)) {
- /* shorten 'step' to a utf8 algined size that fits */
+ /* shorten 'step' to a utf8 aligned size that fits */
BLI_strnlen_utf8_ex(buf, data->maxlen - (len + 1), &step);
}
else {
@@ -3859,7 +3859,7 @@ static int ui_do_but_HOTKEYEVT(
if (event->type == LEFTMOUSE && event->val == KM_PRESS) {
/* only cancel if click outside the button */
if (ui_but_contains_point_px(but->active->region, but, event->x, event->y) == 0) {
- /* data->cancel doesnt work, this button opens immediate */
+ /* data->cancel doesn't work, this button opens immediate */
if (but->flag & UI_BUT_IMMEDIATE)
ui_but_value_set(but, 0);
else
@@ -4444,7 +4444,7 @@ static int ui_do_but_NUM(
else if (event->type == LEFTMOUSE && event->val == KM_RELEASE) {
if (data->dragchange) {
#ifdef USE_DRAG_MULTINUM
- /* if we started multibutton but didnt drag, then edit */
+ /* if we started multibutton but didn't drag, then edit */
if (data->multi_data.init == BUTTON_MULTI_INIT_SETUP) {
click = 1;
}
@@ -4755,7 +4755,7 @@ static int ui_do_but_SLI(
else if (event->type == LEFTMOUSE && event->val == KM_RELEASE) {
if (data->dragchange) {
#ifdef USE_DRAG_MULTINUM
- /* if we started multibutton but didnt drag, then edit */
+ /* if we started multibutton but didn't drag, then edit */
if (data->multi_data.init == BUTTON_MULTI_INIT_SETUP) {
click = 1;
}
@@ -8327,7 +8327,7 @@ static void ui_handle_button_return_submenu(bContext *C, const wmEvent *event, u
/* ************************* menu handling *******************************/
/**
- * Function used to prevent loosing the open menu when using nested pulldowns,
+ * Function used to prevent losing the open menu when using nested pulldowns,
* when moving mouse towards the pulldown menu over other buttons that could
* steal the highlight from the current button, only checks:
*
@@ -8547,7 +8547,7 @@ static int ui_menu_scroll(ARegion *ar, uiBlock *block, int my, uiBut *to_bt)
* let the parent menu get the event.
*
* This allows a menu to be open,
- * but send key events to the parent if theres no active buttons.
+ * but send key events to the parent if there's no active buttons.
*
* Without this keyboard navigation from menu's wont work.
*/
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index edd568e4fea..922b5779c9f 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -370,7 +370,7 @@ static void ui_layer_but_cb(bContext *C, void *arg_but, void *arg_index)
uiBut *but = arg_but, *cbut;
PointerRNA *ptr = &but->rnapoin;
PropertyRNA *prop = but->rnaprop;
- int i, index = GET_INT_FROM_POINTER(arg_index);
+ int i, index = POINTER_AS_INT(arg_index);
int shift = win->eventstate->shift;
int len = RNA_property_array_length(ptr, prop);
@@ -463,7 +463,7 @@ static void ui_item_array(
but = uiDefAutoButR(block, ptr, prop, layer_num, "", icon, x + butw * a, y + buth, butw, buth);
if (subtype == PROP_LAYER_MEMBER)
- UI_but_func_set(but, ui_layer_but_cb, but, SET_INT_IN_POINTER(layer_num));
+ UI_but_func_set(but, ui_layer_but_cb, but, POINTER_FROM_INT(layer_num));
}
for (a = 0; a < colbuts; a++) {
const int layer_num = a + len / 2 + b * colbuts;
@@ -481,7 +481,7 @@ static void ui_item_array(
but = uiDefAutoButR(block, ptr, prop, layer_num, "", icon, x + butw * a, y, butw, buth);
if (subtype == PROP_LAYER_MEMBER)
- UI_but_func_set(but, ui_layer_but_cb, but, SET_INT_IN_POINTER(layer_num));
+ UI_but_func_set(but, ui_layer_but_cb, but, POINTER_FROM_INT(layer_num));
}
UI_block_align_end(block);
@@ -567,7 +567,7 @@ static void ui_item_enum_expand_handle(bContext *C, void *arg1, void *arg2)
if (!win->eventstate->shift) {
uiBut *but = (uiBut *)arg1;
- int enum_value = GET_INT_FROM_POINTER(arg2);
+ int enum_value = POINTER_AS_INT(arg2);
int current_value = RNA_property_enum_get(&but->rnapoin, but->rnaprop);
if (!(current_value & enum_value)) {
@@ -645,7 +645,7 @@ static void ui_item_enum_expand(
but = uiDefButR_prop(block, UI_BTYPE_ROW, 0, name, 0, 0, itemw, h, ptr, prop, -1, 0, value, -1, -1, NULL);
if (RNA_property_flag(prop) & PROP_ENUM_FLAG) {
- UI_but_func_set(but, ui_item_enum_expand_handle, but, SET_INT_IN_POINTER(value));
+ UI_but_func_set(but, ui_item_enum_expand_handle, but, POINTER_FROM_INT(value));
}
if (ui_layout_local_dir(layout) != UI_LAYOUT_HORIZONTAL)
@@ -1099,7 +1099,7 @@ void uiItemsFullEnumO_items(
uiItemS(target);
}
else {
- /* XXX bug here, colums draw bottom item badly */
+ /* XXX bug here, columns draw bottom item badly */
uiItemS(target);
}
}
@@ -1741,7 +1741,7 @@ static void rna_search_cb(const struct bContext *C, void *arg_but, const char *s
/* add search items from temporary list */
for (cis = items_list->first; cis; cis = cis->next) {
- if (false == UI_search_item_add(items, cis->name, SET_INT_IN_POINTER(cis->index), cis->iconid)) {
+ if (false == UI_search_item_add(items, cis->name, POINTER_FROM_INT(cis->index), cis->iconid)) {
break;
}
}
@@ -1941,8 +1941,11 @@ static uiBut *ui_item_menu(
else
but = uiDefMenuBut(block, func, arg, name, 0, 0, w, h, tip);
- if (argN) { /* ugly .. */
- but->poin = (char *)but;
+ if (argN) {
+ /* ugly .. */
+ if (arg != argN) {
+ but->poin = (char *)but;
+ }
but->func_argN = argN;
}
@@ -1976,7 +1979,9 @@ void uiItemM(uiLayout *layout, const char *menuname, const char *name, int icon)
if (layout->root->type == UI_LAYOUT_MENU && !icon)
icon = ICON_BLANK1;
- ui_item_menu(layout, name, icon, ui_item_menutype_func, mt, NULL, TIP_(mt->description), false);
+ ui_item_menu(
+ layout, name, icon, ui_item_menutype_func, mt, NULL,
+ mt->description ? TIP_(mt->description) : "", false);
}
/* label item */
@@ -2078,6 +2083,18 @@ void uiItemMenuF(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc
ui_item_menu(layout, name, icon, func, arg, NULL, "", false);
}
+/**
+ * Version of #uiItemMenuF that free's `argN`.
+ */
+void uiItemMenuFN(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *argN)
+{
+ if (!func)
+ return;
+
+ /* Second 'argN' only ensures it gets freed. */
+ ui_item_menu(layout, name, icon, func, argN, argN, "", false);
+}
+
typedef struct MenuItemLevel {
int opcontext;
/* don't use pointers to the strings because python can dynamically
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index d941f429339..56f95cd929c 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -605,8 +605,8 @@ static int reports_to_text_exec(bContext *C, wmOperator *UNUSED(op))
txt = BKE_text_add(bmain, "Recent Reports");
/* convert entire list to a display string, and add this to the text-block
- * - if commandline debug option enabled, show debug reports too
- * - otherwise, up to info (which is what users normally see)
+ * - if commandline debug option enabled, show debug reports too
+ * - otherwise, up to info (which is what users normally see)
*/
str = BKE_reports_string(reports, (G.debug & G_DEBUG) ? RPT_DEBUG : RPT_INFO);
@@ -936,7 +936,7 @@ static int edittranslation_exec(bContext *C, wmOperator *op)
}
/* Try to find a valid po file for current language... */
edittranslation_find_po_file(root, uilng, popath, FILE_MAX);
-/* printf("po path: %s\n", popath);*/
+ /* printf("po path: %s\n", popath); */
if (popath[0] == '\0') {
BKE_reportf(op->reports, RPT_ERROR, "No valid po found for language '%s' under %s", uilng, root);
return OPERATOR_CANCELLED;
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index 744f6b3c4d0..20f38b91b98 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -1247,7 +1247,7 @@ static void ui_panel_drag_collapse(bContext *C, uiPanelDragCollapseHandle *dragc
/**
* Panel drag-collapse (modal handler)
* Clicking and dragging over panels toggles their collapse state based on the panel that was first
- * dragged over. If it was open all affected panels incl the initial one are closed and vise versa.
+ * dragged over. If it was open all affected panels incl the initial one are closed and vice versa.
*/
static int ui_panel_drag_collapse_handler(bContext *C, const wmEvent *event, void *userdata)
{
@@ -1619,7 +1619,7 @@ void UI_panel_category_draw_all(ARegion *ar, const char *category_id_active)
const int px = max_ii(1, round_fl_to_int(U.pixelsize));
const int category_tabs_width = round_fl_to_int(UI_PANEL_CATEGORY_MARGIN_WIDTH * zoom);
const float dpi_fac = UI_DPI_FAC;
- const int tab_v_pad_text = round_fl_to_int((2 + ((px * 3) * dpi_fac)) * zoom); /* pading of tabs around text */
+ const int tab_v_pad_text = round_fl_to_int((2 + ((px * 3) * dpi_fac)) * zoom); /* padding of tabs around text */
const int tab_v_pad = round_fl_to_int((4 + (2 * px * dpi_fac)) * zoom); /* padding between tabs */
const float tab_curve_radius = ((px * 3) * dpi_fac) * zoom;
const int roundboxtype = UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT;
@@ -2105,9 +2105,9 @@ static void panel_activate_state(const bContext *C, Panel *pa, uiHandlePanelStat
if (state == PANEL_STATE_EXIT || state == PANEL_STATE_ANIMATION) {
if (data && data->state != PANEL_STATE_ANIMATION) {
/* XXX:
- * - the panel tabbing function call below (test_add_new_tabs()) has been commented out
- * "It is too easy to do by accident when reordering panels,
- * is very hard to control and use, and has no real benefit." - BillRey
+ * - the panel tabbing function call below (test_add_new_tabs()) has been commented out
+ * "It is too easy to do by accident when reordering panels,
+ * is very hard to control and use, and has no real benefit." - BillRey
* Aligorith, 2009Sep
*/
//test_add_new_tabs(ar); // also copies locations of tabs in dragged panel
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index d9be0abfb78..f9fcf9520be 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -349,7 +349,7 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
TemplateID *template_ui = (TemplateID *)arg_litem;
PointerRNA idptr = RNA_property_pointer_get(&template_ui->ptr, template_ui->prop);
ID *id = idptr.data;
- int event = GET_INT_FROM_POINTER(arg_event);
+ int event = POINTER_AS_INT(arg_event);
switch (event) {
case UI_ID_BROWSE:
@@ -535,7 +535,7 @@ static void template_ID(
but = uiDefButR(
block, UI_BTYPE_TEXT, 0, name, 0, 0, UI_UNIT_X * 6, UI_UNIT_Y,
&idptr, "name", -1, 0, 0, -1, -1, RNA_struct_ui_description(type));
- UI_but_funcN_set(but, template_id_cb, MEM_dupallocN(template_ui), SET_INT_IN_POINTER(UI_ID_RENAME));
+ UI_but_funcN_set(but, template_id_cb, MEM_dupallocN(template_ui), POINTER_FROM_INT(UI_ID_RENAME));
if (user_alert) UI_but_flag_enable(but, UI_BUT_REDALERT);
if (id->lib) {
@@ -553,7 +553,7 @@ static void template_ID(
UI_but_flag_enable(but, UI_BUT_DISABLED);
}
- UI_but_funcN_set(but, template_id_cb, MEM_dupallocN(template_ui), SET_INT_IN_POINTER(UI_ID_LOCAL));
+ UI_but_funcN_set(but, template_id_cb, MEM_dupallocN(template_ui), POINTER_FROM_INT(UI_ID_LOCAL));
}
if (id->us > 1) {
@@ -568,7 +568,7 @@ static void template_ID(
TIP_("Display number of users of this data (click to make a single-user copy)"));
but->flag |= UI_BUT_UNDO;
- UI_but_funcN_set(but, template_id_cb, MEM_dupallocN(template_ui), SET_INT_IN_POINTER(UI_ID_ALONE));
+ UI_but_funcN_set(but, template_id_cb, MEM_dupallocN(template_ui), POINTER_FROM_INT(UI_ID_ALONE));
if (/* test only */
(id_copy(CTX_data_main(C), id, NULL, true) == false) ||
(idfrom && idfrom->lib) ||
@@ -626,13 +626,13 @@ static void template_ID(
but = uiDefIconTextButO(
block, UI_BTYPE_BUT, newop, WM_OP_INVOKE_DEFAULT, ICON_ZOOMIN,
(id) ? "" : CTX_IFACE_(template_id_context(type), "New"), 0, 0, w, UI_UNIT_Y, NULL);
- UI_but_funcN_set(but, template_id_cb, MEM_dupallocN(template_ui), SET_INT_IN_POINTER(UI_ID_ADD_NEW));
+ UI_but_funcN_set(but, template_id_cb, MEM_dupallocN(template_ui), POINTER_FROM_INT(UI_ID_ADD_NEW));
}
else {
but = uiDefIconTextBut(
block, UI_BTYPE_BUT, 0, ICON_ZOOMIN, (id) ? "" : CTX_IFACE_(template_id_context(type), "New"),
0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
- UI_but_funcN_set(but, template_id_cb, MEM_dupallocN(template_ui), SET_INT_IN_POINTER(UI_ID_ADD_NEW));
+ UI_but_funcN_set(but, template_id_cb, MEM_dupallocN(template_ui), POINTER_FROM_INT(UI_ID_ADD_NEW));
}
if ((idfrom && idfrom->lib) || !editable)
@@ -658,13 +658,13 @@ static void template_ID(
but = uiDefIconTextButO(
block, UI_BTYPE_BUT, openop, WM_OP_INVOKE_DEFAULT, ICON_FILESEL, (id) ? "" : IFACE_("Open"),
0, 0, w, UI_UNIT_Y, NULL);
- UI_but_funcN_set(but, template_id_cb, MEM_dupallocN(template_ui), SET_INT_IN_POINTER(UI_ID_OPEN));
+ UI_but_funcN_set(but, template_id_cb, MEM_dupallocN(template_ui), POINTER_FROM_INT(UI_ID_OPEN));
}
else {
but = uiDefIconTextBut(
block, UI_BTYPE_BUT, 0, ICON_FILESEL, (id) ? "" : IFACE_("Open"), 0, 0, w, UI_UNIT_Y,
NULL, 0, 0, 0, 0, NULL);
- UI_but_funcN_set(but, template_id_cb, MEM_dupallocN(template_ui), SET_INT_IN_POINTER(UI_ID_OPEN));
+ UI_but_funcN_set(but, template_id_cb, MEM_dupallocN(template_ui), POINTER_FROM_INT(UI_ID_OPEN));
}
if ((idfrom && idfrom->lib) || !editable)
@@ -688,7 +688,7 @@ static void template_ID(
block, UI_BTYPE_BUT, 0, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0,
TIP_("Unlink data-block "
"(Shift + Click to set users to zero, data will then not be saved)"));
- UI_but_funcN_set(but, template_id_cb, MEM_dupallocN(template_ui), SET_INT_IN_POINTER(UI_ID_DELETE));
+ UI_but_funcN_set(but, template_id_cb, MEM_dupallocN(template_ui), POINTER_FROM_INT(UI_ID_DELETE));
if (RNA_property_flag(template_ui->prop) & PROP_NEVER_NULL) {
UI_but_flag_enable(but, UI_BUT_DISABLED);
@@ -749,7 +749,7 @@ static void ui_template_id(
template_ui->idlb = which_libbase(CTX_data_main(C), idcode);
/* create UI elements for this template
- * - template_ID makes a copy of the template data and assigns it to the relevant buttons
+ * - template_ID makes a copy of the template data and assigns it to the relevant buttons
*/
if (template_ui->idlb) {
uiLayoutRow(layout, true);
@@ -1144,7 +1144,7 @@ uiLayout *uiTemplateModifier(uiLayout *layout, bContext *C, PointerRNA *ptr)
/* find modifier and draw it */
cageIndex = modifiers_getCageIndex(scene, ob, &lastCageIndex, 0);
- /* XXX virtual modifiers are not accesible for python */
+ /* XXX virtual modifiers are not accessible for python */
vmd = modifiers_getVirtualModifierList(ob, &virtualModifierData);
for (i = 0; vmd; i++, vmd = vmd->next) {
@@ -2039,7 +2039,7 @@ static uiBlock *curvemap_clipping_func(bContext *C, ARegion *ar, void *cumap_v)
block = UI_block_begin(C, ar, __func__, UI_EMBOSS);
- /* use this for a fake extra empy space around the buttons */
+ /* use this for a fake extra empty space around the buttons */
uiDefBut(block, UI_BTYPE_LABEL, 0, "", -4, 16, width + 8, 6 * UI_UNIT_Y, NULL, 0, 0, 0, 0, "");
bt = uiDefButBitI(
@@ -2598,7 +2598,7 @@ void uiTemplateCryptoPicker(uiLayout *layout, PointerRNA *ptr, const char *propn
static void handle_layer_buttons(bContext *C, void *arg1, void *arg2)
{
uiBut *but = arg1;
- int cur = GET_INT_FROM_POINTER(arg2);
+ int cur = POINTER_AS_INT(arg2);
wmWindow *win = CTX_wm_window(C);
int i, tot, shift = win->eventstate->shift;
@@ -2638,10 +2638,10 @@ void uiTemplateLayers(
}
/* the number of layers determines the way we group them
- * - we want 2 rows only (for now)
- * - the number of columns (cols) is the total number of buttons per row
- * the 'remainder' is added to this, as it will be ok to have first row slightly wider if need be
- * - for now, only split into groups if group will have at least 5 items
+ * - we want 2 rows only (for now)
+ * - the number of columns (cols) is the total number of buttons per row
+ * the 'remainder' is added to this, as it will be ok to have first row slightly wider if need be
+ * - for now, only split into groups if group will have at least 5 items
*/
layers = RNA_property_array_length(ptr, prop);
cols = (layers / 2) + (layers % 2);
@@ -2682,7 +2682,7 @@ void uiTemplateLayers(
icon = ICON_LAYER_USED;
but = uiDefAutoButR(block, ptr, prop, layer, "", icon, 0, 0, UI_UNIT_X / 2, UI_UNIT_Y / 2);
- UI_but_func_set(but, handle_layer_buttons, but, SET_INT_IN_POINTER(layer));
+ UI_but_func_set(but, handle_layer_buttons, but, POINTER_FROM_INT(layer));
but->type = UI_BTYPE_TOGGLE;
}
}
@@ -2707,10 +2707,10 @@ void uiTemplateGameStates(
}
/* the number of states determines the way we group them
- * - we want 2 rows only (for now)
- * - the number of columns (cols) is the total number of buttons per row
- * the 'remainder' is added to this, as it will be ok to have first row slightly wider if need be
- * - for now, only split into groups if group will have at least 5 items
+ * - we want 2 rows only (for now)
+ * - the number of columns (cols) is the total number of buttons per row
+ * the 'remainder' is added to this, as it will be ok to have first row slightly wider if need be
+ * - for now, only split into groups if group will have at least 5 items
*/
states = RNA_property_array_length(ptr, prop);
cols = (states / 2) + (states % 2);
@@ -2753,7 +2753,7 @@ void uiTemplateGameStates(
but = uiDefIconButR_prop(
block, UI_BTYPE_ICON_TOGGLE, 0, icon, 0, 0, UI_UNIT_X / 2, UI_UNIT_Y / 2, ptr, prop,
state, 0, 0, -1, -1, sca_state_name_get(ob, state));
- UI_but_func_set(but, handle_layer_buttons, but, SET_INT_IN_POINTER(state));
+ UI_but_func_set(but, handle_layer_buttons, but, POINTER_FROM_INT(state));
but->type = UI_BTYPE_TOGGLE;
}
}
@@ -3670,7 +3670,7 @@ void uiTemplateOperatorPropertyButs(
/* only for popups, see [#36109] */
/* if button is operator's default property, and a text-field, enable focus for it
- * - this is used for allowing operators with popups to rename stuff with fewer clicks
+ * - this is used for allowing operators with popups to rename stuff with fewer clicks
*/
if (is_popup) {
if ((but->rnaprop == op->type->prop) && (but->type == UI_BTYPE_TEXT)) {
@@ -3876,9 +3876,11 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
UI_but_func_tooltip_set(but_progress, progress_tooltip_func, tip_arg);
}
- uiDefIconTextBut(block, UI_BTYPE_BUT, handle_event, ICON_PANEL_CLOSE,
- "", 0, 0, UI_UNIT_X, UI_UNIT_Y,
- NULL, 0.0f, 0.0f, 0, 0, TIP_("Stop this job"));
+ if (!wm->is_interface_locked) {
+ uiDefIconTextBut(block, UI_BTYPE_BUT, handle_event, ICON_PANEL_CLOSE,
+ "", 0, 0, UI_UNIT_X, UI_UNIT_Y,
+ NULL, 0.0f, 0.0f, 0, 0, TIP_("Stop this job"));
+ }
}
if (screen->animtimer)
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index 2059fc1c849..2b9c6265eeb 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -120,7 +120,7 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
but = uiDefButR_prop(block, UI_BTYPE_TEXT, 0, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
if (RNA_property_flag(prop) & PROP_TEXTEDIT_UPDATE) {
- /* TEXTEDIT_UPDATE is usally used for search buttons. For these we also want
+ /* TEXTEDIT_UPDATE is usually used for search buttons. For these we also want
* the 'x' icon to clear search string, so setting VALUE_CLEAR flag, too. */
UI_but_flag_enable(but, UI_BUT_TEXTEDIT_UPDATE | UI_BUT_VALUE_CLEAR);
}
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 7db2d7f156f..622d47bae18 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -148,8 +148,8 @@ static void view2d_masks(View2D *v2d, bool check_scrollers)
scroll = view2d_scroll_mapped(v2d->scroll);
/* scrollers shrink mask area, but should be based off regionsize
- * - they can only be on one to two edges of the region they define
- * - if they overlap, they must not occupy the corners (which are reserved for other widgets)
+ * - they can only be on one to two edges of the region they define
+ * - if they overlap, they must not occupy the corners (which are reserved for other widgets)
*/
if (scroll) {
/* vertical scroller */
@@ -387,16 +387,16 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas
tot = &v2d->tot;
/* we must satisfy the following constraints (in decreasing order of importance):
- * - alignment restrictions are respected
- * - cur must not fall outside of tot
- * - axis locks (zoom and offset) must be maintained
- * - zoom must not be excessive (check either sizes or zoom values)
- * - aspect ratio should be respected (NOTE: this is quite closely related to zoom too)
+ * - alignment restrictions are respected
+ * - cur must not fall outside of tot
+ * - axis locks (zoom and offset) must be maintained
+ * - zoom must not be excessive (check either sizes or zoom values)
+ * - aspect ratio should be respected (NOTE: this is quite closely related to zoom too)
*/
/* Step 1: if keepzoom, adjust the sizes of the rects only
- * - firstly, we calculate the sizes of the rects
- * - curwidth and curheight are saved as reference... modify width and height values here
+ * - firstly, we calculate the sizes of the rects
+ * - curwidth and curheight are saved as reference... modify width and height values here
*/
totwidth = BLI_rctf_size_x(tot);
totheight = BLI_rctf_size_y(tot);
@@ -478,7 +478,7 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas
float curRatio, winRatio;
/* when a window edge changes, the aspect ratio can't be used to
- * find which is the best new 'cur' rect. thats why it stores 'old'
+ * find which is the best new 'cur' rect. that's why it stores 'old'
*/
if (winx != v2d->oldwinx) do_x = true;
if (winy != v2d->oldwiny) do_y = true;
@@ -506,9 +506,9 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas
if (do_cur) {
if ((v2d->keeptot == V2D_KEEPTOT_STRICT) && (winx != v2d->oldwinx)) {
/* special exception for Outliner (and later channel-lists):
- * - The view may be moved left to avoid contents being pushed out of view when view shrinks.
- * - The keeptot code will make sure cur->xmin will not be less than tot->xmin (which cannot be allowed)
- * - width is not adjusted for changed ratios here...
+ * - The view may be moved left to avoid contents being pushed out of view when view shrinks.
+ * - The keeptot code will make sure cur->xmin will not be less than tot->xmin (which cannot be allowed)
+ * - width is not adjusted for changed ratios here...
*/
if (winx < v2d->oldwinx) {
float temp = v2d->oldwinx - winx;
@@ -529,7 +529,7 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas
else {
if ((v2d->keeptot == V2D_KEEPTOT_STRICT) && (winy != v2d->oldwiny)) {
/* special exception for Outliner (and later channel-lists):
- * - Currently, no actions need to be taken here...
+ * - Currently, no actions need to be taken here...
*/
if (winy < v2d->oldwiny) {
@@ -616,8 +616,8 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas
}
else if (v2d->keeptot == V2D_KEEPTOT_STRICT) {
/* This is an exception for the outliner (and later channel-lists, headers)
- * - must clamp within tot rect (absolutely no excuses)
- * --> therefore, cur->xmin must not be less than tot->xmin
+ * - must clamp within tot rect (absolutely no excuses)
+ * --> therefore, cur->xmin must not be less than tot->xmin
*/
if (cur->xmin < tot->xmin) {
/* move cur across so that it sits at minimum of tot */
@@ -648,8 +648,8 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas
}
else {
/* This here occurs when:
- * - width too big, but maintaining zoom (i.e. widths cannot be changed)
- * - width is OK, but need to check if outside of boundaries
+ * - width too big, but maintaining zoom (i.e. widths cannot be changed)
+ * - width is OK, but need to check if outside of boundaries
*
* So, resolution is to just shift view by the gap between the extremities.
* We favour moving the 'minimum' across, as that's origin for most things
@@ -699,8 +699,8 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas
}
else {
/* This here occurs when:
- * - height too big, but maintaining zoom (i.e. heights cannot be changed)
- * - height is OK, but need to check if outside of boundaries
+ * - height too big, but maintaining zoom (i.e. heights cannot be changed)
+ * - height is OK, but need to check if outside of boundaries
*
* So, resolution is to just shift view by the gap between the extremities.
* We favour moving the 'minimum' across, as that's origin for most things
@@ -1189,7 +1189,7 @@ static void step_to_grid(float *step, int *power, int unit)
/* for frames, we want 1.0 frame intervals only */
if (unit == V2D_UNIT_FRAMES) {
rem = 1.0f;
- *step = 2.0f; /* use 2 since there are grid lines drawn in between, this way to get 1 line per frane */
+ *step = 2.0f; /* use 2 since there are grid lines drawn in between, this way to get 1 line per frame */
}
/* prevents printing 1.0 2.0 3.0 etc */
@@ -1561,8 +1561,8 @@ View2DScrollers *UI_view2d_scrollers_calc(
scrollers->hor = hor;
/* scroller 'buttons':
- * - These should always remain within the visible region of the scrollbar
- * - They represent the region of 'tot' that is visible in 'cur'
+ * - These should always remain within the visible region of the scrollbar
+ * - They represent the region of 'tot' that is visible in 'cur'
*/
/* horizontal scrollers */
@@ -1722,11 +1722,11 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
state = (v2d->scroll_ui & V2D_SCROLL_H_ACTIVE) ? UI_SCROLL_PRESSED : 0;
/* show zoom handles if:
- * - zooming on x-axis is allowed (no scroll otherwise)
- * - slider bubble is large enough (no overdraw confusion)
- * - scale is shown on the scroller
- * (workaround to make sure that button windows don't show these,
- * and only the time-grids with their zoomability can do so)
+ * - zooming on x-axis is allowed (no scroll otherwise)
+ * - slider bubble is large enough (no overdraw confusion)
+ * - scale is shown on the scroller
+ * (workaround to make sure that button windows don't show these,
+ * and only the time-grids with their zoomability can do so)
*/
if ((v2d->keepzoom & V2D_LOCKZOOM_X) == 0 &&
(v2d->scroll & V2D_SCROLL_SCALE_HORIZONTAL) &&
@@ -1750,8 +1750,8 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
float fac, dfac, fac2, val;
/* the numbers: convert grid->startx and -dx to scroll coordinates
- * - fac is x-coordinate to draw to
- * - dfac is gap between scale markings
+ * - fac is x-coordinate to draw to
+ * - dfac is gap between scale markings
*/
fac = (grid->startx - v2d->cur.xmin) / BLI_rctf_size_x(&v2d->cur);
fac = (float)hor.xmin + fac * BLI_rcti_size_x(&hor);
@@ -1823,11 +1823,11 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
state = (v2d->scroll_ui & V2D_SCROLL_V_ACTIVE) ? UI_SCROLL_PRESSED : 0;
/* show zoom handles if:
- * - zooming on y-axis is allowed (no scroll otherwise)
- * - slider bubble is large enough (no overdraw confusion)
- * - scale is shown on the scroller
- * (workaround to make sure that button windows don't show these,
- * and only the time-grids with their zoomability can do so)
+ * - zooming on y-axis is allowed (no scroll otherwise)
+ * - slider bubble is large enough (no overdraw confusion)
+ * - scale is shown on the scroller
+ * (workaround to make sure that button windows don't show these,
+ * and only the time-grids with their zoomability can do so)
*/
if ((v2d->keepzoom & V2D_LOCKZOOM_Y) == 0 &&
(v2d->scroll & V2D_SCROLL_SCALE_VERTICAL) &&
@@ -1852,10 +1852,10 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
float fac, dfac, val;
/* the numbers: convert grid->starty and dy to scroll coordinates
- * - fac is y-coordinate to draw to
- * - dfac is gap between scale markings
- * - these involve a correction for horizontal scrollbar
- * NOTE: it's assumed that that scrollbar is there if this is involved!
+ * - fac is y-coordinate to draw to
+ * - dfac is gap between scale markings
+ * - these involve a correction for horizontal scrollbar
+ * NOTE: it's assumed that that scrollbar is there if this is involved!
*/
fac = (grid->starty - v2d->cur.ymin) / BLI_rctf_size_y(&v2d->cur);
fac = vert.ymin + fac * BLI_rcti_size_y(&vert);
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index b9ea5d96057..e08f9535e1f 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -1147,7 +1147,7 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, const wmEvent *event
vzd->dy += dy;
/* store mouse coordinates for next time, if not doing continuous zoom
- * - continuous zoom only depends on distance of mouse to starting point to determine rate of change
+ * - continuous zoom only depends on distance of mouse to starting point to determine rate of change
*/
if (U.viewzoom != USER_ZOOM_CONT) { // XXX store this setting as RNA prop?
vzd->lastx = event->x;
@@ -1239,9 +1239,9 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op)
if (zoom_in) {
/* zoom in:
- * - 'cur' rect will be defined by the coordinates of the border region
- * - just set the 'cur' rect to have the same coordinates as the border region
- * if zoom is allowed to be changed
+ * - 'cur' rect will be defined by the coordinates of the border region
+ * - just set the 'cur' rect to have the same coordinates as the border region
+ * if zoom is allowed to be changed
*/
if ((v2d->keepzoom & V2D_LOCKZOOM_X) == 0) {
cur_new.xmin = rect.xmin;
@@ -1254,9 +1254,9 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op)
}
else {
/* zoom out:
- * - the current 'cur' rect coordinates are going to end up where the 'rect' ones are,
- * but the 'cur' rect coordinates will need to be adjusted to take in more of the view
- * - calculate zoom factor, and adjust using center-point
+ * - the current 'cur' rect coordinates are going to end up where the 'rect' ones are,
+ * but the 'cur' rect coordinates will need to be adjusted to take in more of the view
+ * - calculate zoom factor, and adjust using center-point
*/
float zoom, center, size;
@@ -1545,7 +1545,6 @@ static void VIEW2D_OT_smoothview(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Smooth View 2D";
- ot->description = "";
ot->idname = "VIEW2D_OT_smoothview";
/* api callbacks */
@@ -1627,8 +1626,8 @@ static short mouse_in_scroller_handle(int mouse, int sc_min, int sc_max, int sh_
bool in_min, in_max, in_bar, out_min, out_max, in_view = 1;
/* firstly, check if
- * - 'bubble' fills entire scroller
- * - 'bubble' completely out of view on either side
+ * - 'bubble' fills entire scroller
+ * - 'bubble' completely out of view on either side
*/
if ((sh_min <= sc_min) && (sh_max >= sc_max)) in_view = 0;
if (sh_min == sh_max) {
@@ -1691,7 +1690,7 @@ static void scroller_activate_init(bContext *C, wmOperator *op, const wmEvent *e
vsm->lastx = event->x;
vsm->lasty = event->y;
/* 'zone' depends on where mouse is relative to bubble
- * - zooming must be allowed on this axis, otherwise, default to pan
+ * - zooming must be allowed on this axis, otherwise, default to pan
*/
scrollers = UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
diff --git a/source/blender/editors/mask/mask_shapekey.c b/source/blender/editors/mask/mask_shapekey.c
index 99ffc9cd7d2..5df0b80ad2a 100644
--- a/source/blender/editors/mask/mask_shapekey.c
+++ b/source/blender/editors/mask/mask_shapekey.c
@@ -88,7 +88,6 @@ void MASK_OT_shape_key_insert(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Insert Shape Key";
- ot->description = "";
ot->idname = "MASK_OT_shape_key_insert";
/* api callbacks */
@@ -137,7 +136,6 @@ void MASK_OT_shape_key_clear(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Clear Shape Key";
- ot->description = "";
ot->idname = "MASK_OT_shape_key_clear";
/* api callbacks */
diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c
index 7ea89c56432..1e5e279ef35 100644
--- a/source/blender/editors/mesh/editmesh_extrude.c
+++ b/source/blender/editors/mesh/editmesh_extrude.c
@@ -161,15 +161,15 @@ static bool edbm_extrude_discrete_faces(BMEditMesh *em, wmOperator *op, const ch
}
/* extrudes individual edges */
-static bool edbm_extrude_edges_indiv(BMEditMesh *em, wmOperator *op, const char hflag)
+static bool edbm_extrude_edges_indiv(BMEditMesh *em, wmOperator *op, const char hflag, const bool use_normal_flip)
{
BMesh *bm = em->bm;
BMOperator bmop;
EDBM_op_init(
em, &bmop, op,
- "extrude_edge_only edges=%he use_select_history=%b",
- hflag, true);
+ "extrude_edge_only edges=%he use_normal_flip=%b use_select_history=%b",
+ hflag, use_normal_flip, true);
/* deselect original verts */
BM_SELECT_HISTORY_BACKUP(bm);
@@ -236,6 +236,7 @@ static char edbm_extrude_htype_from_em_select(BMEditMesh *em)
static bool edbm_extrude_ex(
Object *obedit, BMEditMesh *em,
char htype, const char hflag,
+ const bool use_normal_flip,
const bool use_mirror,
const bool use_select_history)
{
@@ -250,6 +251,7 @@ static bool edbm_extrude_ex(
}
BMO_op_init(bm, &extop, BMO_FLAG_DEFAULTS, "extrude_face_region");
+ BMO_slot_bool_set(extop.slots_in, "use_normal_flip", use_normal_flip);
BMO_slot_bool_set(extop.slots_in, "use_select_history", use_select_history);
BMO_slot_buffer_from_enabled_hflag(bm, &extop, extop.slots_in, "geom", htype, hflag);
@@ -302,7 +304,7 @@ static int edbm_extrude_repeat_exec(bContext *C, wmOperator *op)
mul_m3_v3(tmat, dvec);
for (a = 0; a < steps; a++) {
- edbm_extrude_ex(obedit, em, BM_ALL_NOLOOP, BM_ELEM_SELECT, false, false);
+ edbm_extrude_ex(obedit, em, BM_ALL_NOLOOP, BM_ELEM_SELECT, false, false, false);
BMO_op_callf(
em->bm, BMO_FLAG_DEFAULTS,
@@ -345,9 +347,10 @@ void MESH_OT_extrude_repeat(wmOperatorType *ot)
/* generic extern called extruder */
static bool edbm_extrude_mesh(Object *obedit, BMEditMesh *em, wmOperator *op)
{
- bool changed = false;
+ const bool use_normal_flip = RNA_boolean_get(op->ptr, "use_normal_flip");
const char htype = edbm_extrude_htype_from_em_select(em);
enum {NONE = 0, ELEM_FLAG, VERT_ONLY, EDGE_ONLY} nr;
+ bool changed = false;
if (em->selectmode & SCE_SELECT_VERTEX) {
if (em->bm->totvertsel == 0) nr = NONE;
@@ -369,13 +372,13 @@ static bool edbm_extrude_mesh(Object *obedit, BMEditMesh *em, wmOperator *op)
case NONE:
return false;
case ELEM_FLAG:
- changed = edbm_extrude_ex(obedit, em, htype, BM_ELEM_SELECT, true, true);
+ changed = edbm_extrude_ex(obedit, em, htype, BM_ELEM_SELECT, use_normal_flip, true, true);
break;
case VERT_ONLY:
changed = edbm_extrude_verts_indiv(em, op, BM_ELEM_SELECT);
break;
case EDGE_ONLY:
- changed = edbm_extrude_edges_indiv(em, op, BM_ELEM_SELECT);
+ changed = edbm_extrude_edges_indiv(em, op, BM_ELEM_SELECT, use_normal_flip);
break;
}
@@ -421,6 +424,7 @@ void MESH_OT_extrude_region(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+ RNA_def_boolean(ot->srna, "use_normal_flip", false, "Flip Normals", "");
Transform_Properties(ot, P_NO_DEFAULTS | P_MIRROR_DUMMY);
}
@@ -470,8 +474,9 @@ static int edbm_extrude_edges_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BKE_editmesh_from_object(obedit);
+ const bool use_normal_flip = RNA_boolean_get(op->ptr, "use_normal_flip");
- edbm_extrude_edges_indiv(em, op, BM_ELEM_SELECT);
+ edbm_extrude_edges_indiv(em, op, BM_ELEM_SELECT, use_normal_flip);
EDBM_update_generic(em, true, true);
@@ -493,6 +498,7 @@ void MESH_OT_extrude_edges_indiv(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* to give to transform */
+ RNA_def_boolean(ot->srna, "use_normal_flip", false, "Flip Normals", "");
Transform_Properties(ot, P_NO_DEFAULTS | P_MIRROR_DUMMY);
}
@@ -664,7 +670,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, const w
EDBM_project_snap_verts(C, vc.ar, vc.em);
}
- edbm_extrude_ex(vc.obedit, vc.em, extrude_htype, BM_ELEM_SELECT, true, true);
+ edbm_extrude_ex(vc.obedit, vc.em, extrude_htype, BM_ELEM_SELECT, false, true, true);
EDBM_op_callf(vc.em, op, "rotate verts=%hv cent=%v matrix=%m3",
BM_ELEM_SELECT, center, mat);
EDBM_op_callf(vc.em, op, "translate verts=%hv vec=%v",
diff --git a/source/blender/editors/mesh/editmesh_extrude_spin.c b/source/blender/editors/mesh/editmesh_extrude_spin.c
index 5f1670bf57d..a9e78f74012 100644
--- a/source/blender/editors/mesh/editmesh_extrude_spin.c
+++ b/source/blender/editors/mesh/editmesh_extrude_spin.c
@@ -61,16 +61,18 @@ static int edbm_spin_exec(bContext *C, wmOperator *op)
BMOperator spinop;
float cent[3], axis[3];
float d[3] = {0.0f, 0.0f, 0.0f};
- int steps, dupli;
- float angle;
RNA_float_get_array(op->ptr, "center", cent);
RNA_float_get_array(op->ptr, "axis", axis);
- steps = RNA_int_get(op->ptr, "steps");
- angle = RNA_float_get(op->ptr, "angle");
- //if (ts->editbutflag & B_CLOCKWISE)
- angle = -angle;
- dupli = RNA_boolean_get(op->ptr, "dupli");
+ const int steps = RNA_int_get(op->ptr, "steps");
+ const float angle = RNA_float_get(op->ptr, "angle");
+ const bool use_normal_flip = RNA_boolean_get(op->ptr, "use_normal_flip") ^ (angle < 0.0f);
+ const bool dupli = RNA_boolean_get(op->ptr, "dupli");
+ const bool use_auto_merge = (
+ RNA_boolean_get(op->ptr, "use_auto_merge") &&
+ (dupli == false) &&
+ (steps >= 3) &&
+ fabsf((fabsf(angle) - (M_PI * 2))) <= 1e-6f);
if (is_zero_v3(axis)) {
BKE_report(op->reports, RPT_ERROR, "Invalid/unset axis");
@@ -78,15 +80,20 @@ static int edbm_spin_exec(bContext *C, wmOperator *op)
}
/* keep the values in worldspace since we're passing the obmat */
- if (!EDBM_op_init(em, &spinop, op,
- "spin geom=%hvef cent=%v axis=%v dvec=%v steps=%i angle=%f space=%m4 use_duplicate=%b",
- BM_ELEM_SELECT, cent, axis, d, steps, angle, obedit->obmat, dupli))
+ if (!EDBM_op_init(
+ em, &spinop, op,
+ "spin geom=%hvef cent=%v axis=%v dvec=%v steps=%i angle=%f space=%m4 "
+ "use_normal_flip=%b use_duplicate=%b use_merge=%b",
+ BM_ELEM_SELECT, cent, axis, d, steps, -angle, obedit->obmat,
+ use_normal_flip, dupli, use_auto_merge))
{
return OPERATOR_CANCELLED;
}
BMO_op_exec(bm, &spinop);
- EDBM_flag_disable_all(em, BM_ELEM_SELECT);
- BMO_slot_buffer_hflag_enable(bm, spinop.slots_out, "geom_last.out", BM_ALL_NOLOOP, BM_ELEM_SELECT, true);
+ if (use_auto_merge == false) {
+ EDBM_flag_disable_all(em, BM_ELEM_SELECT);
+ BMO_slot_buffer_hflag_enable(bm, spinop.slots_out, "geom_last.out", BM_ALL_NOLOOP, BM_ELEM_SELECT, true);
+ }
if (!EDBM_op_finish(em, &spinop, op, true)) {
return OPERATOR_CANCELLED;
}
@@ -118,6 +125,21 @@ static int edbm_spin_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(e
return edbm_spin_exec(C, op);
}
+static bool edbm_spin_poll_property(const bContext *UNUSED(C), wmOperator *op, const PropertyRNA *prop)
+{
+ const char *prop_id = RNA_property_identifier(prop);
+ const bool dupli = RNA_boolean_get(op->ptr, "dupli");
+
+ if (dupli) {
+ if (STREQ(prop_id, "use_auto_merge") ||
+ STREQ(prop_id, "use_normal_flip"))
+ {
+ return false;
+ }
+ }
+ return true;
+}
+
void MESH_OT_spin(wmOperatorType *ot)
{
PropertyRNA *prop;
@@ -131,6 +153,7 @@ void MESH_OT_spin(wmOperatorType *ot)
ot->invoke = edbm_spin_invoke;
ot->exec = edbm_spin_exec;
ot->poll = ED_operator_editmesh;
+ ot->poll_property = edbm_spin_poll_property;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -141,6 +164,8 @@ void MESH_OT_spin(wmOperatorType *ot)
prop = RNA_def_float(ot->srna, "angle", DEG2RADF(90.0f), -1e12f, 1e12f, "Angle", "Rotation for each step",
DEG2RADF(-360.0f), DEG2RADF(360.0f));
RNA_def_property_subtype(prop, PROP_ANGLE);
+ RNA_def_boolean(ot->srna, "use_auto_merge", true, "Auto Merge", "Merge first/last when the angle is a full revolution");
+ RNA_def_boolean(ot->srna, "use_normal_flip", 0, "Flip Normals", "");
RNA_def_float_vector(ot->srna, "center", 3, NULL, -1e12f, 1e12f,
"Center", "Center in global view space", -1e4f, 1e4f);
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index 8eb3ad84919..9cc19d5194e 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -479,7 +479,7 @@ static KnifeEdge *get_bm_knife_edge(KnifeTool_OpData *kcd, BMEdge *e)
/* Record the index in kcd->em->looptris of first looptri triple for a given face,
* given an index for some triple in that array.
* This assumes that all of the triangles for a given face are contiguous
- * in that array (as they are by the current tesselation routines).
+ * in that array (as they are by the current tessellation routines).
* Actually store index + 1 in the hash, because 0 looks like "no entry"
* to hash lookup routine; will reverse this in the get routine.
* Doing this lazily rather than all at once for all faces.
@@ -502,7 +502,7 @@ static void set_lowest_face_tri(KnifeTool_OpData *kcd, BMFace *f, int index)
if (i == -1)
i++;
- BLI_ghash_insert(kcd->facetrimap, f, SET_INT_IN_POINTER(i + 1));
+ BLI_ghash_insert(kcd->facetrimap, f, POINTER_FROM_INT(i + 1));
}
/* This should only be called for faces that have had a lowest face tri set by previous function */
@@ -510,7 +510,7 @@ static int get_lowest_face_tri(KnifeTool_OpData *kcd, BMFace *f)
{
int ans;
- ans = GET_INT_FROM_POINTER(BLI_ghash_lookup(kcd->facetrimap, f));
+ ans = POINTER_AS_INT(BLI_ghash_lookup(kcd->facetrimap, f));
BLI_assert(ans != 0);
return ans - 1;
}
@@ -1217,7 +1217,7 @@ static bool knife_ray_intersect_face(
lv2 = kcd->cagecos[BM_elem_index_get(tri[1]->v)];
lv3 = kcd->cagecos[BM_elem_index_get(tri[2]->v)];
/* using epsilon test in case ray is directly through an internal
- * tesselation edge and might not hit either tesselation tri with
+ * tessellation edge and might not hit either tessellation tri with
* an exact test;
* we will exclude hits near real edges by a later test */
if (isect_ray_tri_epsilon_v3(v1, raydir, lv1, lv2, lv3, &lambda, ray_tri_uv, KNIFE_FLT_EPS)) {
@@ -1542,8 +1542,8 @@ static void knife_find_line_hits(KnifeTool_OpData *kcd)
}
/* unproject screen line */
- ED_view3d_win_to_segment(kcd->ar, kcd->vc.v3d, s1, v1, v3, true);
- ED_view3d_win_to_segment(kcd->ar, kcd->vc.v3d, s2, v2, v4, true);
+ ED_view3d_win_to_segment_clipped(kcd->ar, kcd->vc.v3d, s1, v1, v3, true);
+ ED_view3d_win_to_segment_clipped(kcd->ar, kcd->vc.v3d, s2, v2, v4, true);
mul_m4_v3(kcd->ob->imat, v1);
mul_m4_v3(kcd->ob->imat, v2);
@@ -1551,7 +1551,7 @@ static void knife_find_line_hits(KnifeTool_OpData *kcd)
mul_m4_v3(kcd->ob->imat, v4);
/* numeric error, 'v1' -> 'v2', 'v2' -> 'v4' can end up being ~2000 units apart in otho mode
- * (from ED_view3d_win_to_segment_clip() above)
+ * (from ED_view3d_win_to_segment_clipped() above)
* this gives precision error; rather then solving properly
* (which may involve using doubles everywhere!),
* limit the distance between these points */
@@ -2194,7 +2194,7 @@ static int knife_update_active(KnifeTool_OpData *kcd)
/* if no hits are found this would normally default to (0, 0, 0) so instead
* get a point at the mouse ray closest to the previous point.
* Note that drawing lines in `free-space` isn't properly supported
- * but theres no guarantee (0, 0, 0) has any geometry either - campbell */
+ * but there's no guarantee (0, 0, 0) has any geometry either - campbell */
if (kcd->curr.vert == NULL && kcd->curr.edge == NULL && kcd->curr.bmface == NULL) {
float origin[3];
float origin_ofs[3];
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 313dd28e806..5f49e30a191 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -247,7 +247,6 @@ void MESH_OT_subdivide_edgering(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Subdivide Edge-Ring";
- ot->description = "";
ot->idname = "MESH_OT_subdivide_edgering";
/* api callbacks */
@@ -2850,9 +2849,9 @@ void MESH_OT_solidify(wmOperatorType *ot)
* Contributed by Robert Wenzlaff (Det. Thorn).
*
* 2.5 Revamp:
- * - non modal (no menu before cutting)
- * - exit on mouse release
- * - polygon/segment drawing can become handled by WM cb later
+ * - non modal (no menu before cutting)
+ * - exit on mouse release
+ * - polygon/segment drawing can become handled by WM cb later
*
* bmesh port version
*/
@@ -2898,7 +2897,7 @@ static float bm_edge_seg_isect(
b2 = ((x22 * y21) - (x21 * y22)) / xdiff2;
}
else {
- m2 = MAXSLOPE; /* Verticle slope */
+ m2 = MAXSLOPE; /* Vertical slope */
b2 = x22;
}
diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c
index 7a344be8e5a..65b42571bbc 100644
--- a/source/blender/editors/mesh/editmesh_utils.c
+++ b/source/blender/editors/mesh/editmesh_utils.c
@@ -433,14 +433,14 @@ void EDBM_selectmode_flush(BMEditMesh *em)
void EDBM_deselect_flush(BMEditMesh *em)
{
- /* function below doesnt use. just do this to keep the values in sync */
+ /* function below doesn't use. just do this to keep the values in sync */
em->bm->selectmode = em->selectmode;
BM_mesh_deselect_flush(em->bm);
}
void EDBM_select_flush(BMEditMesh *em)
{
- /* function below doesnt use. just do this to keep the values in sync */
+ /* function below doesn't use. just do this to keep the values in sync */
em->bm->selectmode = em->selectmode;
BM_mesh_select_flush(em->bm);
}
@@ -1499,7 +1499,7 @@ bool BMBVH_EdgeVisible(struct BMBVHTree *tree, BMEdge *e, ARegion *ar, View3D *v
ar->winy / 2.0f,
};
- ED_view3d_win_to_segment(ar, v3d, mval_f, origin, end, false);
+ ED_view3d_win_to_segment_clipped(ar, v3d, mval_f, origin, end, false);
invert_m4_m4(invmat, obedit->obmat);
mul_m4_v3(invmat, origin);
diff --git a/source/blender/editors/mesh/mesh_mirror.c b/source/blender/editors/mesh/mesh_mirror.c
index 20ece9c3336..1615ec75565 100644
--- a/source/blender/editors/mesh/mesh_mirror.c
+++ b/source/blender/editors/mesh/mesh_mirror.c
@@ -262,7 +262,7 @@ void ED_mesh_mirrtopo_init(Mesh *me, DerivedMesh *dm, const int ob_mode, MirrTop
/* sort so we can count unique values */
qsort(topo_hash_prev, totvert, sizeof(MirrTopoHash_t), mirrtopo_hash_sort);
- tot_unique = 1; /* account for skiping the first value */
+ tot_unique = 1; /* account for skipping the first value */
for (a = 1; a < totvert; a++) {
if (topo_hash_prev[a - 1] != topo_hash_prev[a]) {
tot_unique++;
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index ca43cfdf3a3..f3f7338716c 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -262,7 +262,7 @@ void ED_operatormacros_mesh(void)
RNA_boolean_set(otmacro->ptr, "mirror", false);
ot = WM_operatortype_append_macro("MESH_OT_extrude_region_shrink_fatten", "Extrude Region and Shrink/Fatten",
- "Extrude region and move result", OPTYPE_UNDO | OPTYPE_REGISTER);
+ "Extrude along normals and move result", OPTYPE_UNDO | OPTYPE_REGISTER);
otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_region");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_shrink_fatten");
RNA_enum_set(otmacro->ptr, "proportional", 0);
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index 3e9025baf40..311f13b3ef7 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -132,8 +132,8 @@ static void join_mesh_single(
}
/* for each shapekey in destination mesh:
- * - if there's a matching one, copy it across (will need to transform vertices into new space...)
- * - otherwise, just copy own coordinates of mesh (no need to transform vertex coordinates into new space)
+ * - if there's a matching one, copy it across (will need to transform vertices into new space...)
+ * - otherwise, just copy own coordinates of mesh (no need to transform vertex coordinates into new space)
*/
if (key) {
/* if this mesh has any shapekeys, check first, otherwise just copy coordinates */
@@ -162,8 +162,8 @@ static void join_mesh_single(
}
else {
/* for each shapekey in destination mesh:
- * - if it was an 'original', copy the appropriate data from nkey
- * - otherwise, copy across plain coordinates (no need to transform coordinates)
+ * - if it was an 'original', copy the appropriate data from nkey
+ * - otherwise, copy across plain coordinates (no need to transform coordinates)
*/
if (key) {
for (KeyBlock *kb = key->block.first; kb; kb = kb->next) {
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 33596e8c4b6..70d3d856599 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -274,8 +274,8 @@ static void test_constraint(Main *bmain, Object *owner, bPoseChannel *pchan, bCo
bKinematicConstraint *data = con->data;
/* bad: we need a separate set of checks here as poletarget is
- * optional... otherwise poletarget must exist too or else
- * the constraint is deemed invalid
+ * optional... otherwise poletarget must exist too or else
+ * the constraint is deemed invalid
*/
/* default IK check ... */
if (BKE_object_exists_check(bmain, data->tar) == 0) {
@@ -499,7 +499,7 @@ static int constraint_type_get(Object *owner, bPoseChannel *pchan)
}
/* checks validity of object pointers, and NULLs,
- * if Bone doesnt exist it sets the CONSTRAINT_DISABLE flag.
+ * if Bone doesn't exist it sets the CONSTRAINT_DISABLE flag.
*/
static void test_constraints(Main *bmain, Object *owner, bPoseChannel *pchan)
{
@@ -1579,13 +1579,13 @@ static bool get_new_constraint_target(bContext *C, int con_type, Object **tar_ob
bool found = false;
/* clear tar_ob and tar_pchan fields before use
- * - assume for now that both always exist...
+ * - assume for now that both always exist...
*/
*tar_ob = NULL;
*tar_pchan = NULL;
/* check if constraint type doesn't requires a target
- * - if so, no need to get any targets
+ * - if so, no need to get any targets
*/
switch (con_type) {
/* no-target constraints --------------------------- */
@@ -1760,14 +1760,14 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase
return OPERATOR_CANCELLED;
}
- /* create a new constraint of the type requried, and add it to the active/given constraints list */
+ /* create a new constraint of the type required, and add it to the active/given constraints list */
if (pchan)
con = BKE_constraint_add_for_pose(ob, pchan, NULL, type);
else
con = BKE_constraint_add_for_object(ob, NULL, type);
/* get the first selected object/bone, and make that the target
- * - apart from the buttons-window add buttons, we shouldn't add in this way
+ * - apart from the buttons-window add buttons, we shouldn't add in this way
*/
if (setTarget) {
Object *tar_ob = NULL;
@@ -1776,7 +1776,7 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase
/* get the target objects, adding them as need be */
if (get_new_constraint_target(C, type, &tar_ob, &tar_pchan, 1)) {
/* method of setting target depends on the type of target we've got
- * - by default, just set the first target (distinction here is only for multiple-targeted constraints)
+ * - by default, just set the first target (distinction here is only for multiple-targeted constraints)
*/
if (tar_pchan)
set_constraint_nth_target(con, tar_ob, tar_pchan->name, 0);
@@ -1857,7 +1857,7 @@ static int object_constraint_add_exec(bContext *C, wmOperator *op)
}
/* hack: set constraint targets from selected objects in context is allowed when
- * operator name included 'with_targets', since the menu doesn't allow multiple properties
+ * operator name included 'with_targets', since the menu doesn't allow multiple properties
*/
if (strstr(op->idname, "with_targets"))
with_targets = 1;
@@ -1878,7 +1878,7 @@ static int pose_constraint_add_exec(bContext *C, wmOperator *op)
}
/* hack: set constraint targets from selected objects in context is allowed when
- * operator name included 'with_targets', since the menu doesn't allow multiple properties
+ * operator name included 'with_targets', since the menu doesn't allow multiple properties
*/
if (strstr(op->idname, "with_targets"))
with_targets = 1;
@@ -1995,14 +1995,14 @@ static int pose_ik_add_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED
return OPERATOR_CANCELLED;
}
- /* prepare popup menu to choose targetting options */
+ /* prepare popup menu to choose targeting options */
pup = UI_popup_menu_begin(C, IFACE_("Add IK"), ICON_NONE);
layout = UI_popup_menu_layout(pup);
/* the type of targets we'll set determines the menu entries to show... */
if (get_new_constraint_target(C, CONSTRAINT_TYPE_KINEMATIC, &tar_ob, &tar_pchan, 0)) {
/* bone target, or object target?
- * - the only thing that matters is that we want a target...
+ * - the only thing that matters is that we want a target...
*/
if (tar_pchan)
uiItemBooleanO(layout, IFACE_("To Active Bone"), ICON_NONE, "POSE_OT_ik_add", "with_targets", 1);
@@ -2062,7 +2062,7 @@ static int pose_ik_clear_exec(bContext *C, wmOperator *UNUSED(op))
{
bConstraint *con, *next;
- /* TODO: should we be checking if these contraints were local before we try and remove them? */
+ /* TODO: should we be checking if these constraints were local before we try and remove them? */
for (con = pchan->constraints.first; con; con = next) {
next = con->next;
if (con->type == CONSTRAINT_TYPE_KINEMATIC) {
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 34f64023441..151df5993ed 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -2501,7 +2501,6 @@ void OBJECT_OT_drop_named_material(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Drop Named Material on Object";
- ot->description = "";
ot->idname = "OBJECT_OT_drop_named_material";
/* api callbacks */
@@ -2558,7 +2557,6 @@ void OBJECT_OT_unlink_data(wmOperatorType *ot)
/* identifiers */
ot->name = "Unlink";
ot->idname = "OBJECT_OT_unlink_data";
- ot->description = "";
/* api callbacks */
ot->exec = object_unlink_data_exec;
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 6c5076ef563..e11782cd4b3 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -491,7 +491,7 @@ static void mesh_defvert_mirror_update_internal(
const int def_nr)
{
if (def_nr == -1) {
- /* all vgroups, add groups where neded */
+ /* all vgroups, add groups where needed */
int flip_map_len;
int *flip_map = defgroup_flip_map(ob, &flip_map_len, true);
defvert_sync_mapped(dvert_dst, dvert_src, flip_map, flip_map_len, true);
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index a03892a26d1..181c42a4072 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -3212,7 +3212,7 @@ static void brush_puff(PEData *data, int point_index)
#else
/* translate (not rotate) the rest of the hair if its not selected */
{
-#if 0 /* kindof works but looks worse then whats below */
+#if 0 /* kindof works but looks worse then what's below */
/* Move the unselected point on a vector based on the
* hair direction and the offset */
@@ -3522,7 +3522,7 @@ static int brush_add(PEData *data, short number)
mco[0] = data->mval[0] + dmx;
mco[1] = data->mval[1] + dmy;
- ED_view3d_win_to_segment(data->vc.ar, data->vc.v3d, mco, co1, co2, true);
+ ED_view3d_win_to_segment_clipped(data->vc.ar, data->vc.v3d, mco, co1, co2, true);
mul_m4_v3(imat, co1);
mul_m4_v3(imat, co2);
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index 59538df7a05..d94776d126f 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -759,7 +759,7 @@ static int render_break(void *UNUSED(rjv))
}
/* runs in thread, no cursor setting here works. careful with notifiers too (malloc conflicts) */
-/* maybe need a way to get job send notifer? */
+/* maybe need a way to get job send notifier? */
static void render_drawlock(void *rjv, int lock)
{
RenderJob *rj = rjv;
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index e1042f17229..a8069b01026 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -196,7 +196,7 @@ static Main *load_main_from_memory(const void *blend, int blend_size)
BlendFileData *bfd;
G.fileflags |= G_FILE_NO_UI;
- bfd = BLO_read_from_memory(blend, blend_size, NULL, BLO_READ_SKIP_NONE);
+ bfd = BLO_read_from_memory(blend, blend_size, BLO_READ_SKIP_NONE, NULL);
if (bfd) {
bmain = bfd->main;
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 5b6a81328fa..3ca989c92fe 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -633,7 +633,7 @@ void ED_area_headerprint(ScrArea *sa, const char *str)
{
ARegion *ar;
- /* happens when running transform operators in backround mode */
+ /* happens when running transform operators in background mode */
if (sa == NULL)
return;
@@ -660,7 +660,7 @@ static void area_azone_initialize(wmWindow *win, bScreen *screen, ScrArea *sa)
{
AZone *az;
- /* reinitalize entirely, regions and fullscreen add azones too */
+ /* reinitialize entirely, regions and fullscreen add azones too */
BLI_freelistN(&sa->actionzones);
if (screen->state != SCREENNORMAL) {
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index d3d486405c5..4f9cd7a42b6 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -4259,7 +4259,7 @@ static void SCENE_OT_delete(wmOperatorType *ot)
/* implementation note: a disappearing region needs at least 1 last draw with 100% backbuffer
* texture over it- then triple buffer will clear it entirely.
- * This because flag RGN_HIDDEN is set in end - region doesnt draw at all then */
+ * This because flag RGN_HIDDEN is set in end - region doesn't draw at all then */
typedef struct RegionAlphaInfo {
ScrArea *sa;
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index f503ab37230..90066a20e88 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -259,8 +259,8 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima
bool refresh;
eOverlayControlFlags invalid = (
(primary) ?
- (overlay_flags & PAINT_INVALID_OVERLAY_TEXTURE_PRIMARY) :
- (overlay_flags & PAINT_INVALID_OVERLAY_TEXTURE_SECONDARY));
+ (overlay_flags & PAINT_OVERLAY_INVALID_TEXTURE_PRIMARY) :
+ (overlay_flags & PAINT_OVERLAY_INVALID_TEXTURE_SECONDARY));
target = (primary) ? &primary_snap : &secondary_snap;
refresh =
@@ -414,7 +414,7 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom)
int size;
const bool refresh =
!cursor_snap.overlay_texture ||
- (overlay_flags & PAINT_INVALID_OVERLAY_CURVE) ||
+ (overlay_flags & PAINT_OVERLAY_INVALID_CURVE) ||
cursor_snap.zoom != zoom;
init = (cursor_snap.overlay_texture != 0);
@@ -489,7 +489,7 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
- BKE_paint_reset_overlay_invalid(PAINT_INVALID_OVERLAY_CURVE);
+ BKE_paint_reset_overlay_invalid(PAINT_OVERLAY_INVALID_CURVE);
return 1;
}
@@ -788,7 +788,7 @@ static void paint_draw_alpha_overlay(
ViewContext *vc, int x, int y, float zoom, ePaintMode mode)
{
/* color means that primary brush texture is colured and secondary is used for alpha/mask control */
- bool col = ELEM(mode, ePaintTextureProjective, ePaintTexture2D, ePaintVertex) ? true : false;
+ bool col = ELEM(mode, PAINT_MODE_TEXTURE_3D, PAINT_MODE_TEXTURE_2D, PAINT_MODE_VERTEX) ? true : false;
eOverlayControlFlags flags = BKE_paint_get_overlay_flags();
/* save lots of GL state
* TODO: check on whether all of these are needed? */
@@ -814,7 +814,7 @@ static void paint_draw_alpha_overlay(
paint_draw_cursor_overlay(ups, brush, vc, x, y, zoom);
}
else {
- if (!(flags & PAINT_OVERLAY_OVERRIDE_PRIMARY) && (mode != ePaintWeight))
+ if (!(flags & PAINT_OVERLAY_OVERRIDE_PRIMARY) && (mode != PAINT_MODE_WEIGHT))
paint_draw_tex_overlay(ups, brush, vc, x, y, zoom, false, true);
if (!(flags & PAINT_OVERLAY_OVERRIDE_CURSOR))
paint_draw_cursor_overlay(ups, brush, vc, x, y, zoom);
@@ -990,7 +990,7 @@ static void paint_cursor_on_hit(
static bool ommit_cursor_drawing(Paint *paint, ePaintMode mode, Brush *brush)
{
if (paint->flags & PAINT_SHOW_BRUSH) {
- if (ELEM(mode, ePaintTexture2D, ePaintTextureProjective) && brush->imagepaint_tool == PAINT_TOOL_FILL) {
+ if (ELEM(mode, PAINT_MODE_TEXTURE_2D, PAINT_MODE_TEXTURE_3D) && brush->imagepaint_tool == PAINT_TOOL_FILL) {
return true;
}
return false;
@@ -1050,7 +1050,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
/* TODO: as sculpt and other paint modes are unified, this
* special mode of drawing will go away */
- if ((mode == ePaintSculpt) && vc.obact->sculpt) {
+ if ((mode == PAINT_MODE_SCULPT) && vc.obact->sculpt) {
float location[3];
int pixel_radius;
bool hit;
diff --git a/source/blender/editors/sculpt_paint/paint_curve.c b/source/blender/editors/sculpt_paint/paint_curve.c
index 0e56a1187e3..55912733dc2 100644
--- a/source/blender/editors/sculpt_paint/paint_curve.c
+++ b/source/blender/editors/sculpt_paint/paint_curve.c
@@ -658,17 +658,17 @@ static int paintcurve_draw_exec(bContext *C, wmOperator *UNUSED(op))
const char *name;
switch (mode) {
- case ePaintTexture2D:
- case ePaintTextureProjective:
+ case PAINT_MODE_TEXTURE_2D:
+ case PAINT_MODE_TEXTURE_3D:
name = "PAINT_OT_image_paint";
break;
- case ePaintWeight:
+ case PAINT_MODE_WEIGHT:
name = "PAINT_OT_weight_paint";
break;
- case ePaintVertex:
+ case PAINT_MODE_VERTEX:
name = "PAINT_OT_vertex_paint";
break;
- case ePaintSculpt:
+ case PAINT_MODE_SCULPT:
name = "SCULPT_OT_brush_stroke";
break;
default:
@@ -698,7 +698,7 @@ static int paintcurve_cursor_invoke(bContext *C, wmOperator *UNUSED(op), const w
ePaintMode mode = BKE_paintmode_get_active_from_context(C);
switch (mode) {
- case ePaintTexture2D:
+ case PAINT_MODE_TEXTURE_2D:
{
ARegion *ar = CTX_wm_region(C);
SpaceImage *sima = CTX_wm_space_image(C);
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index ab04a927573..59a5a87626c 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -729,7 +729,7 @@ void ED_space_image_paint_update(Main *bmain, wmWindowManager *wm, Scene *scene)
enabled = true;
if (enabled) {
- BKE_paint_init(bmain, scene, ePaintTexture2D, PAINT_CURSOR_TEXTURE_PAINT);
+ BKE_paint_init(bmain, scene, PAINT_MODE_TEXTURE_2D, PAINT_CURSOR_TEXTURE_PAINT);
paint_cursor_start_explicit(&imapaint->paint, wm, image_paint_poll);
}
@@ -878,7 +878,7 @@ static int sample_color_exec(bContext *C, wmOperator *op)
RNA_int_get_array(op->ptr, "location", location);
const bool use_palette = RNA_boolean_get(op->ptr, "palette");
- const bool use_sample_texture = (mode == ePaintTextureProjective) && !RNA_boolean_get(op->ptr, "merged");
+ const bool use_sample_texture = (mode == PAINT_MODE_TEXTURE_3D) && !RNA_boolean_get(op->ptr, "merged");
paint_sample_color(C, ar, location[0], location[1], use_sample_texture, use_palette);
@@ -918,7 +918,7 @@ static int sample_color_invoke(bContext *C, wmOperator *op, const wmEvent *event
RNA_int_set_array(op->ptr, "location", event->mval);
ePaintMode mode = BKE_paintmode_get_active_from_context(C);
- const bool use_sample_texture = (mode == ePaintTextureProjective) && !RNA_boolean_get(op->ptr, "merged");
+ const bool use_sample_texture = (mode == PAINT_MODE_TEXTURE_3D) && !RNA_boolean_get(op->ptr, "merged");
paint_sample_color(C, ar, event->mval[0], event->mval[1], use_sample_texture, false);
WM_cursor_modal_set(win, BC_EYEDROPPER_CURSOR);
@@ -954,7 +954,7 @@ static int sample_color_modal(bContext *C, wmOperator *op, const wmEvent *event)
}
ePaintMode mode = BKE_paintmode_get_active_from_context(C);
- const bool use_sample_texture = (mode == ePaintTextureProjective) && !RNA_boolean_get(op->ptr, "merged");
+ const bool use_sample_texture = (mode == PAINT_MODE_TEXTURE_3D) && !RNA_boolean_get(op->ptr, "merged");
switch (event->type) {
case MOUSEMOVE:
@@ -1093,7 +1093,7 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op)
ob->mode |= mode_flag;
- BKE_paint_init(bmain, scene, ePaintTextureProjective, PAINT_CURSOR_TEXTURE_PAINT);
+ BKE_paint_init(bmain, scene, PAINT_MODE_TEXTURE_3D, PAINT_CURSOR_TEXTURE_PAINT);
if (U.glreslimit != 0)
GPU_free_images(bmain);
diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c
index 76190b13b61..c5bd88d8047 100644
--- a/source/blender/editors/sculpt_paint/paint_image_2d.c
+++ b/source/blender/editors/sculpt_paint/paint_image_2d.c
@@ -409,7 +409,7 @@ static ImBuf *brush_painter_imbuf_new(BrushPainter *painter, int size, float pre
if (is_texbrush) {
brush_imbuf_tex_co(&tex_mapping, x, y, texco);
- BKE_brush_sample_tex_3D(scene, brush, texco, rgba, thread, pool);
+ BKE_brush_sample_tex_3d(scene, brush, texco, rgba, thread, pool);
/* TODO(sergey): Support texture paint color space. */
if (!use_float) {
IMB_colormanagement_scene_linear_to_display_v3(rgba, display);
@@ -484,7 +484,7 @@ static void brush_painter_imbuf_update(
if (!use_texture_old) {
if (is_texbrush) {
brush_imbuf_tex_co(&tex_mapping, x, y, texco);
- BKE_brush_sample_tex_3D(scene, brush, texco, rgba, thread, pool);
+ BKE_brush_sample_tex_3d(scene, brush, texco, rgba, thread, pool);
/* TODO(sergey): Support texture paint color space. */
if (!use_float) {
IMB_colormanagement_scene_linear_to_display_v3(rgba, display);
@@ -700,7 +700,7 @@ static void brush_painter_2d_refresh_cache(ImagePaintState *s, BrushPainter *pai
do_partial_update_mask = true;
renew_maxmask = true;
}
- /* explicilty disable partial update even if it has been enabled above */
+ /* explicitly disable partial update even if it has been enabled above */
if (brush->mask_pressure) {
do_partial_update_mask = false;
renew_maxmask = true;
@@ -1419,8 +1419,9 @@ static void paint_2d_fill_add_pixel_byte(
float color_f[4];
unsigned char *color_b = (unsigned char *)(ibuf->rect + coordinate);
rgba_uchar_to_float(color_f, color_b);
+ straight_to_premul_v4(color_f);
- if (compare_len_squared_v3v3(color_f, color, threshold_sq)) {
+ if (compare_len_squared_v4v4(color_f, color, threshold_sq)) {
BLI_stack_push(stack, &coordinate);
}
BLI_BITMAP_SET(touched, coordinate, true);
@@ -1439,7 +1440,7 @@ static void paint_2d_fill_add_pixel_float(
coordinate = ((size_t)y_px) * ibuf->x + x_px;
if (!BLI_BITMAP_TEST(touched, coordinate)) {
- if (compare_len_squared_v3v3(ibuf->rect_float + 4 * coordinate, color, threshold_sq)) {
+ if (compare_len_squared_v4v4(ibuf->rect_float + 4 * coordinate, color, threshold_sq)) {
BLI_stack_push(stack, &coordinate);
}
BLI_BITMAP_SET(touched, coordinate, true);
@@ -1546,6 +1547,7 @@ void paint_2d_bucket_fill(
else {
int pixel_color_b = *(ibuf->rect + coordinate);
rgba_uchar_to_float(pixel_color, (unsigned char *)&pixel_color_b);
+ straight_to_premul_v4(pixel_color);
}
BLI_stack_push(stack, &coordinate);
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 6b13decd41b..bfde868c241 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -183,7 +183,7 @@ BLI_INLINE unsigned char f_to_char(const float val)
#define PROJ_VERT_CULL 1
/* to avoid locking in tile initialization */
-#define TILE_PENDING SET_INT_IN_POINTER(-1)
+#define TILE_PENDING POINTER_FROM_INT(-1)
/* This is mainly a convenience struct used so we can keep an array of images we use -
* their imbufs, etc, in 1 array, When using threads this array is copied for each thread
@@ -566,7 +566,7 @@ static float VecZDepthPersp(
}
else /* dummy values for zero area face */
w_tmp[0] = w_tmp[1] = w_tmp[2] = 1.0f / 3.0f;
- /* done mimicing barycentric_weights_v2() */
+ /* done mimicking barycentric_weights_v2() */
return (v1[2] * w_tmp[0]) + (v2[2] * w_tmp[1]) + (v3[2] * w_tmp[2]);
}
@@ -593,7 +593,7 @@ static int project_paint_PickFace(
* that the point its testing is only every originated from an existing face */
for (node = ps->bucketFaces[bucket_index]; node; node = node->next) {
- const int tri_index = GET_INT_FROM_POINTER(node->link);
+ const int tri_index = POINTER_AS_INT(node->link);
const MLoopTri *lt = &ps->dm_mlooptri[tri_index];
const float *vtri_ss[3] = {
ps->screenCoords[ps->dm_mloop[lt->tri[0]].v],
@@ -807,7 +807,7 @@ static bool project_bucket_point_occluded(
* that the point its testing is only every originated from an existing face */
for (; bucketFace; bucketFace = bucketFace->next) {
- const int tri_index = GET_INT_FROM_POINTER(bucketFace->link);
+ const int tri_index = POINTER_AS_INT(bucketFace->link);
if (orig_face != tri_index) {
const MLoopTri *lt = &ps->dm_mlooptri[tri_index];
@@ -1028,7 +1028,7 @@ static bool check_seam(
int i1_fidx = -1, i2_fidx = -1; /* index in face */
for (node = ps->vertFaces[i1]; node; node = node->next) {
- const int tri_index = GET_INT_FROM_POINTER(node->link);
+ const int tri_index = POINTER_AS_INT(node->link);
if (tri_index != orig_face) {
const MLoopTri *lt = &ps->dm_mlooptri[tri_index];
@@ -1690,7 +1690,7 @@ static ProjPixel *project_paint_uvpixel_init(
if (ibuf->rect_float) projPixel->pixel.f_pt[0] = 0;
else projPixel->pixel.ch_pt[0] = 0;
#endif
- /* pointer arithmetics */
+ /* pointer arithmetic */
projPixel->image_index = projima - ps->projImages;
return projPixel;
@@ -2582,7 +2582,7 @@ static void project_paint_face_init(
v2coSS = ps->screenCoords[lt_vtri[1]];
v3coSS = ps->screenCoords[lt_vtri[2]];
- /* This funtion gives is a concave polyline in UV space from the clipped tri*/
+ /* This function gives is a concave polyline in UV space from the clipped tri*/
project_bucket_clip_face(
is_ortho, is_flip_object,
clip_rect, bucket_bounds,
@@ -2627,7 +2627,7 @@ static void project_paint_face_init(
//uv[0] = (((float)x) + 0.5f) / ibuf->x;
uv[0] = (float)x / ibuf_xf; /* use pixel offset UV coords instead */
- /* Note about IsectPoly2Df_twoside, checking the face or uv flipping doesnt work,
+ /* Note about IsectPoly2Df_twoside, checking the face or uv flipping doesn't work,
* could check the poly direction but better to do this */
if ((do_backfacecull == true && IsectPoly2Df(uv, uv_clip, uv_clip_tot)) ||
(do_backfacecull == false && IsectPoly2Df_twoside(uv, uv_clip, uv_clip_tot)))
@@ -2720,7 +2720,7 @@ static void project_paint_face_init(
/* Now create new UV's for the seam face */
float (*outset_uv)[2] = ps->faceSeamUVs[tri_index];
- float insetCos[3][3]; /* inset face coords. NOTE!!! ScreenSace for ortho, Worldspace in prespective view */
+ float insetCos[3][3]; /* inset face coords. NOTE!!! ScreenSace for ortho, Worldspace in perspective view */
const float *vCoSS[3]; /* vertex screenspace coords */
@@ -2937,7 +2937,7 @@ static void project_bucket_init(
for (node = ps->bucketFaces[bucket_index]; node; node = node->next) {
project_paint_face_init(
- ps, thread_index, bucket_index, GET_INT_FROM_POINTER(node->link), 0,
+ ps, thread_index, bucket_index, POINTER_AS_INT(node->link), 0,
clip_rect, bucket_bounds, ibuf, &tmpibuf,
(ima->tpageflag & IMA_CLAMP_U) != 0, (ima->tpageflag & IMA_CLAMP_V) != 0);
}
@@ -2946,7 +2946,7 @@ static void project_bucket_init(
/* More complicated loop, switch between images */
for (node = ps->bucketFaces[bucket_index]; node; node = node->next) {
- tri_index = GET_INT_FROM_POINTER(node->link);
+ tri_index = POINTER_AS_INT(node->link);
/* Image context switching */
tpage = project_paint_face_paint_image(ps, tri_index);
@@ -3057,7 +3057,7 @@ static void project_paint_delayed_face_init(ProjPaintState *ps, const MLoopTri *
int bucket_index = bucket_x + (bucket_y * ps->buckets_x);
BLI_linklist_prepend_arena(
&ps->bucketFaces[bucket_index],
- SET_INT_IN_POINTER(tri_index), /* cast to a pointer to shut up the compiler */
+ POINTER_FROM_INT(tri_index), /* cast to a pointer to shut up the compiler */
arena
);
@@ -3415,7 +3415,7 @@ static void project_paint_bleed_add_face_user(
/* annoying but we need to add all faces even ones we never use elsewhere */
if (ps->seam_bleed_px > 0.0f) {
const int lt_vtri[3] = { PS_LOOPTRI_AS_VERT_INDEX_3(ps, lt) };
- void *tri_index_p = SET_INT_IN_POINTER(tri_index);
+ void *tri_index_p = POINTER_FROM_INT(tri_index);
BLI_linklist_prepend_arena(&ps->vertFaces[lt_vtri[0]], tri_index_p, arena);
BLI_linklist_prepend_arena(&ps->vertFaces[lt_vtri[1]], tri_index_p, arena);
BLI_linklist_prepend_arena(&ps->vertFaces[lt_vtri[2]], tri_index_p, arena);
@@ -4758,7 +4758,7 @@ static void *do_projectpaint_thread(void *ph_v)
}
/* note, for clone and smear, we only use the alpha, could be a special function */
- BKE_brush_sample_tex_3D(ps->scene, brush, samplecos, texrgba, thread_index, pool);
+ BKE_brush_sample_tex_3d(ps->scene, brush, samplecos, texrgba, thread_index, pool);
copy_v3_v3(texrgb, texrgba);
mask *= texrgba[3];
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index 74984d090f8..5a7dd0d5f2e 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -205,11 +205,11 @@ static int palette_color_add_exec(bContext *C, wmOperator *UNUSED(op))
color = BKE_palette_color_add(palette);
palette->active_color = BLI_listbase_count(&palette->colors) - 1;
- if (ELEM(mode, ePaintTextureProjective, ePaintTexture2D, ePaintVertex)) {
+ if (ELEM(mode, PAINT_MODE_TEXTURE_3D, PAINT_MODE_TEXTURE_2D, PAINT_MODE_VERTEX)) {
copy_v3_v3(color->rgb, BKE_brush_color_get(scene, brush));
color->value = 0.0;
}
- else if (mode == ePaintWeight) {
+ else if (mode == PAINT_MODE_WEIGHT) {
zero_v3(color->rgb);
color->value = brush->weight;
}
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index de804677de9..1bfa0bef2f2 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -197,7 +197,7 @@ static void paint_draw_line_cursor(bContext *C, int x, int y, void *customdata)
static bool paint_tool_require_location(Brush *brush, ePaintMode mode)
{
switch (mode) {
- case ePaintSculpt:
+ case PAINT_MODE_SCULPT:
if (ELEM(brush->sculpt_tool,
SCULPT_TOOL_GRAB, SCULPT_TOOL_ROTATE,
SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB))
@@ -426,7 +426,7 @@ static bool paint_stroke_use_jitter(ePaintMode mode, Brush *brush, bool invert)
/* jitter-ed brush gives weird and unpredictable result for this
* kinds of stroke, so manually disable jitter usage (sergey) */
use_jitter &= (brush->flag & (BRUSH_DRAG_DOT | BRUSH_ANCHORED)) == 0;
- use_jitter &= (!ELEM(mode, ePaintTexture2D, ePaintTextureProjective) ||
+ use_jitter &= (!ELEM(mode, PAINT_MODE_TEXTURE_2D, PAINT_MODE_TEXTURE_3D) ||
!(invert && brush->imagepaint_tool == PAINT_TOOL_CLONE));
@@ -819,13 +819,13 @@ bool paint_supports_dynamic_size(Brush *br, ePaintMode mode)
return false;
switch (mode) {
- case ePaintSculpt:
+ case PAINT_MODE_SCULPT:
if (sculpt_is_grab_tool(br))
return false;
break;
- case ePaintTexture2D: /* fall through */
- case ePaintTextureProjective:
+ case PAINT_MODE_TEXTURE_2D: /* fall through */
+ case PAINT_MODE_TEXTURE_3D:
if ((br->imagepaint_tool == PAINT_TOOL_FILL) &&
(br->flag & BRUSH_USE_GRADIENT))
{
@@ -848,7 +848,7 @@ bool paint_supports_smooth_stroke(Brush *br, ePaintMode mode)
}
switch (mode) {
- case ePaintSculpt:
+ case PAINT_MODE_SCULPT:
if (sculpt_is_grab_tool(br))
return false;
break;
@@ -861,7 +861,7 @@ bool paint_supports_smooth_stroke(Brush *br, ePaintMode mode)
bool paint_supports_texture(ePaintMode mode)
{
/* omit: PAINT_WEIGHT, PAINT_SCULPT_UV, PAINT_INVALID */
- return ELEM(mode, ePaintSculpt, ePaintVertex, ePaintTextureProjective, ePaintTexture2D);
+ return ELEM(mode, PAINT_MODE_SCULPT, PAINT_MODE_VERTEX, PAINT_MODE_TEXTURE_3D, PAINT_MODE_TEXTURE_2D);
}
/* return true if the brush size can change during paint (normally used for pressure) */
@@ -871,7 +871,7 @@ bool paint_supports_dynamic_tex_coords(Brush *br, ePaintMode mode)
return false;
switch (mode) {
- case ePaintSculpt:
+ case PAINT_MODE_SCULPT:
if (sculpt_is_grab_tool(br))
return false;
break;
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index e1d8cfc3221..eb96425ee5b 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -317,7 +317,7 @@ static void tex_color_alpha(
const Brush *brush = BKE_paint_brush(&vp->paint);
BLI_assert(brush->mtex.tex != NULL);
if (brush->mtex.brush_map_mode == MTEX_MAP_MODE_3D) {
- BKE_brush_sample_tex_3D(vc->scene, brush, co, r_rgba, 0, NULL);
+ BKE_brush_sample_tex_3d(vc->scene, brush, co, r_rgba, 0, NULL);
}
else {
float co_ss[2]; /* screenspace */
@@ -327,7 +327,7 @@ static void tex_color_alpha(
V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_NEAR) == V3D_PROJ_RET_OK)
{
const float co_ss_3d[3] = {co_ss[0], co_ss[1], 0.0f}; /* we need a 3rd empty value */
- BKE_brush_sample_tex_3D(vc->scene, brush, co_ss_3d, r_rgba, 0, NULL);
+ BKE_brush_sample_tex_3d(vc->scene, brush, co_ss_3d, r_rgba, 0, NULL);
}
else {
zero_v4(r_rgba);
@@ -1046,7 +1046,7 @@ static void ed_vwpaintmode_enter_generic(
Mesh *me = BKE_mesh_from_object(ob);
if (mode_flag == OB_MODE_VERTEX_PAINT) {
- const ePaintMode paint_mode = ePaintVertex;
+ const ePaintMode paint_mode = PAINT_MODE_VERTEX;
ED_mesh_color_ensure(me, NULL);
if (scene->toolsettings->vpaint == NULL) {
@@ -1058,7 +1058,7 @@ static void ed_vwpaintmode_enter_generic(
BKE_paint_init(bmain, scene, paint_mode, PAINT_CURSOR_VERTEX_PAINT);
}
else if (mode_flag == OB_MODE_WEIGHT_PAINT) {
- const ePaintMode paint_mode = ePaintWeight;
+ const ePaintMode paint_mode = PAINT_MODE_WEIGHT;
if (scene->toolsettings->wpaint == NULL) {
scene->toolsettings->wpaint = new_vpaint();
@@ -1351,7 +1351,7 @@ static void vwpaint_update_cache_variants(bContext *C, VPaint *vp, Object *ob, P
Brush *brush = BKE_paint_brush(&vp->paint);
/* This effects the actual brush radius, so things farther away
- * are compared with a larger radius and vise versa. */
+ * are compared with a larger radius and vice versa. */
if (cache->first_time) {
RNA_float_get_array(ptr, "location", cache->true_location);
}
@@ -1363,7 +1363,7 @@ static void vwpaint_update_cache_variants(bContext *C, VPaint *vp, Object *ob, P
* brush coord/pressure/etc.
* It's more an events design issue, which doesn't split coordinate/pressure/angle
* changing events. We should avoid this after events system re-design */
- if (paint_supports_dynamic_size(brush, ePaintSculpt) || cache->first_time) {
+ if (paint_supports_dynamic_size(brush, PAINT_MODE_SCULPT) || cache->first_time) {
cache->pressure = RNA_float_get(ptr, "pressure");
}
@@ -1379,7 +1379,7 @@ static void vwpaint_update_cache_variants(bContext *C, VPaint *vp, Object *ob, P
}
}
- if (BKE_brush_use_size_pressure(scene, brush) && paint_supports_dynamic_size(brush, ePaintSculpt)) {
+ if (BKE_brush_use_size_pressure(scene, brush) && paint_supports_dynamic_size(brush, PAINT_MODE_SCULPT)) {
cache->radius = cache->initial_radius * cache->pressure;
}
else {
@@ -1673,7 +1673,7 @@ static void do_wpaint_brush_blur_task_cb_ex(
}
weight_final /= total_hit_loops;
- /* Only paint visable verts */
+ /* Only paint visible verts */
do_weight_paint_vertex(
data->vp, data->ob, data->wpi,
v_index, final_alpha, weight_final);
@@ -2394,7 +2394,7 @@ void PAINT_OT_vertex_paint_toggle(wmOperatorType *ot)
* (return OPERATOR_FINISHED also removes handler and operator)
*
* For future:
- * - implement a stroke event (or mousemove with past positons)
+ * - implement a stroke event (or mousemove with past positions)
* - revise whether op->customdata should be added in object, in set_vpaint
*/
diff --git a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
index 1a37973cd7d..21965bb30d8 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
@@ -238,7 +238,7 @@ static int weight_sample_invoke(bContext *C, wmOperator *op, const wmEvent *even
}
if (changed) {
- /* not really correct since the brush didnt change, but redraws the toolbar */
+ /* not really correct since the brush didn't change, but redraws the toolbar */
WM_main_add_notifier(NC_BRUSH | NA_EDITED, NULL); /* ts->wpaint->paint.brush */
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 74baa267b69..80e9aef4a40 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -1212,7 +1212,7 @@ float tex_strength(SculptSession *ss, const Brush *br,
else if (mtex->brush_map_mode == MTEX_MAP_MODE_3D) {
/* Get strength by feeding the vertex
* location directly into a texture */
- avg = BKE_brush_sample_tex_3D(scene, br, point, rgba, 0, ss->tex_pool);
+ avg = BKE_brush_sample_tex_3d(scene, br, point, rgba, 0, ss->tex_pool);
}
else if (ss->texcache) {
float symm_point[3], point_2d[2];
@@ -1253,7 +1253,7 @@ float tex_strength(SculptSession *ss, const Brush *br,
}
else {
const float point_3d[3] = {point_2d[0], point_2d[1], 0.0f};
- avg = BKE_brush_sample_tex_3D(scene, br, point_3d, rgba, 0, ss->tex_pool);
+ avg = BKE_brush_sample_tex_3d(scene, br, point_3d, rgba, 0, ss->tex_pool);
}
}
@@ -4526,7 +4526,7 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob,
* brush coord/pressure/etc.
* It's more an events design issue, which doesn't split coordinate/pressure/angle
* changing events. We should avoid this after events system re-design */
- if (paint_supports_dynamic_size(brush, ePaintSculpt) || cache->first_time) {
+ if (paint_supports_dynamic_size(brush, PAINT_MODE_SCULPT) || cache->first_time) {
cache->pressure = RNA_float_get(ptr, "pressure");
}
@@ -4543,7 +4543,7 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob,
}
}
- if (BKE_brush_use_size_pressure(scene, brush) && paint_supports_dynamic_size(brush, ePaintSculpt)) {
+ if (BKE_brush_use_size_pressure(scene, brush) && paint_supports_dynamic_size(brush, PAINT_MODE_SCULPT)) {
cache->radius = cache->initial_radius * cache->pressure;
}
else {
@@ -4688,7 +4688,7 @@ static float sculpt_raycast_init(
RegionView3D *rv3d = vc->ar->regiondata;
/* TODO: what if the segment is totally clipped? (return == 0) */
- ED_view3d_win_to_segment(vc->ar, vc->v3d, mouse, ray_start, ray_end, true);
+ ED_view3d_win_to_segment_clipped(vc->ar, vc->v3d, mouse, ray_start, ray_end, true);
invert_m4_m4(obimat, ob->obmat);
mul_m4_v3(obimat, ray_start);
@@ -5667,8 +5667,8 @@ void ED_object_sculptmode_enter_ex(
"Object has negative scale, sculpting may be unpredictable");
}
- Paint *paint = BKE_paint_get_active_from_paintmode(scene, ePaintSculpt);
- BKE_paint_init(bmain, scene, ePaintSculpt, PAINT_CURSOR_SCULPT);
+ Paint *paint = BKE_paint_get_active_from_paintmode(scene, PAINT_MODE_SCULPT);
+ BKE_paint_init(bmain, scene, PAINT_MODE_SCULPT, PAINT_CURSOR_SCULPT);
paint_cursor_start_explicit(paint, bmain->wm.first, sculpt_poll_view3d);
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index bf5ddeb71ff..62e548f661c 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -589,10 +589,9 @@ static void sculpt_undo_restore_list(bContext *C, ListBase *lb)
static void sculpt_undo_free_list(ListBase *lb)
{
- SculptUndoNode *unode;
- int i;
-
- for (unode = lb->first; unode; unode = unode->next) {
+ SculptUndoNode *unode = lb->first;
+ while (unode != NULL) {
+ SculptUndoNode *unode_next = unode->next;
if (unode->co)
MEM_freeN(unode->co);
if (unode->no)
@@ -606,7 +605,7 @@ static void sculpt_undo_free_list(ListBase *lb)
if (unode->vert_hidden)
MEM_freeN(unode->vert_hidden);
if (unode->grid_hidden) {
- for (i = 0; i < unode->totgrid; i++) {
+ for (int i = 0; i < unode->totgrid; i++) {
if (unode->grid_hidden[i])
MEM_freeN(unode->grid_hidden[i]);
}
@@ -627,6 +626,10 @@ static void sculpt_undo_free_list(ListBase *lb)
CustomData_free(&unode->bm_enter_ldata, unode->bm_enter_totloop);
if (unode->bm_enter_totpoly)
CustomData_free(&unode->bm_enter_pdata, unode->bm_enter_totpoly);
+
+ MEM_freeN(unode);
+
+ unode = unode_next;
}
}
diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c
index 7e30c8b5b23..a1514a65694 100644
--- a/source/blender/editors/sculpt_paint/sculpt_uv.c
+++ b/source/blender/editors/sculpt_paint/sculpt_uv.c
@@ -244,7 +244,7 @@ void ED_space_image_uv_sculpt_update(Main *bmain, wmWindowManager *wm, Scene *sc
settings->uvsculpt->paint.flags |= PAINT_SHOW_BRUSH;
}
- BKE_paint_init(bmain, scene, ePaintSculptUV, PAINT_CURSOR_SCULPT);
+ BKE_paint_init(bmain, scene, PAINT_MODE_SCULPT_UV, PAINT_CURSOR_SCULPT);
settings->uvsculpt->paint.paint_cursor = WM_paint_cursor_activate(
wm, uv_sculpt_brush_poll,
diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c
index a7c94c072a4..33822e633be 100644
--- a/source/blender/editors/space_action/action_draw.c
+++ b/source/blender/editors/space_action/action_draw.c
@@ -321,15 +321,15 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
}
}
- /* Increment the step */
+ /* Increment the step */
y -= ACHANNEL_STEP(ac);
}
glDisable(GL_BLEND);
/* Draw keyframes
- * 1) Only channels that are visible in the Action Editor get drawn/evaluated.
- * This is to try to optimize this for heavier data sets
- * 2) Keyframes which are out of view horizontally are disregarded
+ * 1) Only channels that are visible in the Action Editor get drawn/evaluated.
+ * This is to try to optimize this for heavier data sets
+ * 2) Keyframes which are out of view horizontally are disregarded
*/
y = (float)(-ACHANNEL_HEIGHT(ac));
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index ae320aec6f4..289cf730228 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -88,10 +88,10 @@
/* *************************** Localise Markers ***************************** */
/* ensure that there is:
- * 1) an active action editor
- * 2) that the mode will have an active action available
- * 3) that the set of markers being shown are the scene markers, not the list we're merging
- * 4) that there are some selected markers
+ * 1) an active action editor
+ * 2) that the mode will have an active action available
+ * 3) that the set of markers being shown are the scene markers, not the list we're merging
+ * 4) that there are some selected markers
*/
static bool act_markers_make_local_poll(bContext *C)
{
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index 83bda4d63a5..581725b7030 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -73,16 +73,16 @@
/* ******************** Deselect All Operator ***************************** */
/* This operator works in one of three ways:
- * 1) (de)select all (AKEY) - test if select all or deselect all
- * 2) invert all (CTRL-IKEY) - invert selection of all keyframes
- * 3) (de)select all - no testing is done; only for use internal tools as normal function...
+ * 1) (de)select all (AKEY) - test if select all or deselect all
+ * 2) invert all (CTRL-IKEY) - invert selection of all keyframes
+ * 3) (de)select all - no testing is done; only for use internal tools as normal function...
*/
/* Deselects keyframes in the action editor
- * - This is called by the deselect all operator, as well as other ones!
+ * - This is called by the deselect all operator, as well as other ones!
*
- * - test: check if select or deselect all
- * - sel: how to select keyframes (SELECT_*)
+ * - test: check if select or deselect all
+ * - sel: how to select keyframes (SELECT_*)
*/
static void deselect_action_keys(bAnimContext *ac, short test, short sel)
{
@@ -189,10 +189,10 @@ void ACTION_OT_select_all_toggle(wmOperatorType *ot)
/* ******************** Border Select Operator **************************** */
/* This operator currently works in one of three ways:
- * -> BKEY - 1) all keyframes within region are selected (ACTKEYS_BORDERSEL_ALLKEYS)
- * -> ALT-BKEY - depending on which axis of the region was larger...
- * -> 2) x-axis, so select all frames within frame range (ACTKEYS_BORDERSEL_FRAMERANGE)
- * -> 3) y-axis, so select all frames within channels that region included (ACTKEYS_BORDERSEL_CHANNELS)
+ * -> BKEY - 1) all keyframes within region are selected (ACTKEYS_BORDERSEL_ALLKEYS)
+ * -> ALT-BKEY - depending on which axis of the region was larger...
+ * -> 2) x-axis, so select all frames within frame range (ACTKEYS_BORDERSEL_FRAMERANGE)
+ * -> 3) y-axis, so select all frames within channels that region included (ACTKEYS_BORDERSEL_CHANNELS)
*/
/* defines for borderselect mode */
@@ -334,9 +334,9 @@ static int actkeys_borderselect_exec(bContext *C, wmOperator *op)
/* selection 'mode' depends on whether borderselect region only matters on one axis */
if (RNA_boolean_get(op->ptr, "axis_range")) {
/* mode depends on which axis of the range is larger to determine which axis to use
- * - checking this in region-space is fine, as it's fundamentally still going to be a different rect size
- * - the frame-range select option is favored over the channel one (x over y), as frame-range one is often
- * used for tweaking timing when "blocking", while channels is not that useful...
+ * - checking this in region-space is fine, as it's fundamentally still going to be a different rect size
+ * - the frame-range select option is favored over the channel one (x over y), as frame-range one is often
+ * used for tweaking timing when "blocking", while channels is not that useful...
*/
if (BLI_rcti_size_x(&rect) >= BLI_rcti_size_y(&rect))
mode = ACTKEYS_BORDERSEL_FRAMERANGE;
@@ -637,10 +637,10 @@ void ACTION_OT_select_circle(wmOperatorType *ot)
/* ******************** Column Select Operator **************************** */
/* This operator works in one of four ways:
- * - 1) select all keyframes in the same frame as a selected one (KKEY)
- * - 2) select all keyframes in the same frame as the current frame marker (CTRL-KKEY)
- * - 3) select all keyframes in the same frame as a selected markers (SHIFT-KKEY)
- * - 4) select all keyframes that occur between selected markers (ALT-KKEY)
+ * - 1) select all keyframes in the same frame as a selected one (KKEY)
+ * - 2) select all keyframes in the same frame as the current frame marker (CTRL-KKEY)
+ * - 3) select all keyframes in the same frame as a selected markers (SHIFT-KKEY)
+ * - 4) select all keyframes that occur between selected markers (ALT-KKEY)
*/
/* defines for column-select mode */
@@ -773,7 +773,7 @@ static void columnselect_action_keys(bAnimContext *ac, short mode)
AnimData *adt = ANIM_nla_mapping_get(ac, ale);
/* loop over cfraelems (stored in the KeyframeEditData->list)
- * - we need to do this here, as we can apply fewer NLA-mapping conversions
+ * - we need to do this here, as we can apply fewer NLA-mapping conversions
*/
for (ce = ked.list.first; ce; ce = ce->next) {
/* set frame for validation callback to refer to */
@@ -1188,10 +1188,10 @@ void ACTION_OT_select_leftright(wmOperatorType *ot)
/* ******************** Mouse-Click Select Operator *********************** */
/* This operator works in one of three ways:
- * - 1) keyframe under mouse - no special modifiers
- * - 2) all keyframes on the same side of current frame indicator as mouse - ALT modifier
- * - 3) column select all keyframes in frame under mouse - CTRL modifier
- * - 4) all keyframes in channel under mouse - CTRL+ALT modifiers
+ * - 1) keyframe under mouse - no special modifiers
+ * - 2) all keyframes on the same side of current frame indicator as mouse - ALT modifier
+ * - 3) column select all keyframes in frame under mouse - CTRL modifier
+ * - 4) all keyframes in channel under mouse - CTRL+ALT modifiers
*
* In addition to these basic options, the SHIFT modifier can be used to toggle the
* selection mode between replacing the selection (without) and inverting the selection (with).
@@ -1367,7 +1367,7 @@ static void mouse_action_keys(bAnimContext *ac, const int mval[2], short select_
* on either side of mouse click (size of keyframe icon)
*/
key_hsize = ACHANNEL_HEIGHT(ac) * 0.8f; /* standard channel height (to allow for some slop) */
- key_hsize = roundf(key_hsize / 2.0f); /* half-size (for either side), but rounded up to nearest int (for easier targetting) */
+ key_hsize = roundf(key_hsize / 2.0f); /* half-size (for either side), but rounded up to nearest int (for easier targeting) */
UI_view2d_region_to_view(v2d, mval[0] - (int)key_hsize, mval[1], &rectf.xmin, &rectf.ymin);
UI_view2d_region_to_view(v2d, mval[0] + (int)key_hsize, mval[1], &rectf.xmax, &rectf.ymax);
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c
index 4754d45a0d1..1d9669e3e97 100644
--- a/source/blender/editors/space_clip/clip_ops.c
+++ b/source/blender/editors/space_clip/clip_ops.c
@@ -113,12 +113,16 @@ static void sclip_zoom_set(const bContext *C, float zoom, float location[2])
}
if ((U.uiflag & USER_ZOOM_TO_MOUSEPOS) && location) {
- float dx, dy;
+ float aspx, aspy, w, h, dx, dy;
ED_space_clip_get_size(sc, &width, &height);
+ ED_space_clip_get_aspect(sc, &aspx, &aspy);
- dx = ((location[0] - 0.5f) * width - sc->xof) * (sc->zoom - oldzoom) / sc->zoom;
- dy = ((location[1] - 0.5f) * height - sc->yof) * (sc->zoom - oldzoom) / sc->zoom;
+ w = width * aspx;
+ h = height * aspy;
+
+ dx = ((location[0] - 0.5f) * w - sc->xof) * (sc->zoom - oldzoom) / sc->zoom;
+ dy = ((location[1] - 0.5f) * h - sc->yof) * (sc->zoom - oldzoom) / sc->zoom;
if (sc->flag & SC_LOCK_SELECTION) {
sc->xlockof += dx;
@@ -1585,7 +1589,7 @@ void CLIP_OT_cursor_set(wmOperatorType *ot)
"Cursor location in normalized clip coordinates", -10.0f, 10.0f);
}
-/********************** macroses *********************/
+/********************** macros *********************/
void ED_operatormacros_clip(void)
{
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index 35aa9896d12..763bb1bcc88 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -1185,6 +1185,9 @@ static void clip_main_region_draw(const bContext *C, ARegion *ar)
/* data... */
movieclip_main_area_set_view2d(C, ar);
+ /* callback */
+ ED_region_draw_cb_draw(C, ar, REGION_DRAW_PRE_VIEW);
+
clip_draw_main(C, sc, ar);
/* TODO(sergey): would be nice to find a way to de-duplicate all this space conversions */
@@ -1230,6 +1233,9 @@ static void clip_main_region_draw(const bContext *C, ARegion *ar)
clip_draw_grease_pencil((bContext *)C, true);
}
+ /* callback */
+ ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST_VIEW);
+
/* reset view matrix */
UI_view2d_view_restore(C);
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index fd9a9ff9ab1..f407d82aa5e 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -560,7 +560,7 @@ void file_draw_list(const bContext *C, ARegion *ar)
filelist_cache_previews_update(files);
/* Handle preview timer here, since it's filelist_file_cache_block() and filelist_cache_previews_update()
- * which controlls previews task. */
+ * which controls previews task. */
{
const bool previews_running = filelist_cache_previews_running(files);
// printf("%s: preview task: %d\n", __func__, previews_running);
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 81bc585db82..429b643a807 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -1301,7 +1301,7 @@ void file_operator_to_sfile(bContext *C, SpaceFile *sfile, wmOperator *op)
}
/* we could check for relative_path property which is used when converting
- * in the other direction but doesnt hurt to do this every time */
+ * in the other direction but doesn't hurt to do this every time */
BLI_path_abs(sfile->params->dir, BKE_main_blendfile_path(bmain));
/* XXX, files and dirs updates missing, not really so important though */
@@ -1714,7 +1714,6 @@ static int filepath_drop_exec(bContext *C, wmOperator *op)
void FILE_OT_filepath_drop(wmOperatorType *ot)
{
ot->name = "File Selector Drop";
- ot->description = "";
ot->idname = "FILE_OT_filepath_drop";
ot->exec = filepath_drop_exec;
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 09e2660a762..368fc8be35c 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -215,7 +215,7 @@ typedef struct FileListInternEntry {
int blentype; /* ID type, in case typeflag has FILE_TYPE_BLENDERLIB set. */
char *relpath;
- char *name; /* not striclty needed, but used during sorting, avoids to have to recompute it there... */
+ char *name; /* not strictly needed, but used during sorting, avoids to have to recompute it there... */
BLI_stat_t st;
} FileListInternEntry;
@@ -236,7 +236,7 @@ typedef struct FileListEntryCache {
/* This one gathers all entries from both block and misc caches. Used for easy bulk-freing. */
ListBase cached_entries;
- /* Block cache: all entries between start and end index. used for part of the list on diplay. */
+ /* Block cache: all entries between start and end index. used for part of the list on display. */
FileDirEntry **block_entries;
int block_start_index, block_end_index, block_center_index, block_cursor;
@@ -1516,7 +1516,7 @@ static FileDirEntry *filelist_file_ex(struct FileList *filelist, const int index
return cache->block_entries[idx];
}
- if ((ret = BLI_ghash_lookup(cache->misc_entries, SET_INT_IN_POINTER(index)))) {
+ if ((ret = BLI_ghash_lookup(cache->misc_entries, POINTER_FROM_INT(index)))) {
return ret;
}
@@ -1529,11 +1529,11 @@ static FileDirEntry *filelist_file_ex(struct FileList *filelist, const int index
/* Else, we have to add new entry to 'misc' cache - and possibly make room for it first! */
ret = filelist_file_create_entry(filelist, index);
old_index = cache->misc_entries_indices[cache->misc_cursor];
- if ((old = BLI_ghash_popkey(cache->misc_entries, SET_INT_IN_POINTER(old_index), NULL))) {
+ if ((old = BLI_ghash_popkey(cache->misc_entries, POINTER_FROM_INT(old_index), NULL))) {
BLI_ghash_remove(cache->uuids, old->uuid, NULL, NULL);
filelist_file_release_entry(filelist, old);
}
- BLI_ghash_insert(cache->misc_entries, SET_INT_IN_POINTER(index), ret);
+ BLI_ghash_insert(cache->misc_entries, POINTER_FROM_INT(index), ret);
BLI_ghash_insert(cache->uuids, ret->uuid, ret);
cache->misc_entries_indices[cache->misc_cursor] = index;
@@ -1628,7 +1628,7 @@ static bool filelist_file_cache_block_create(FileList *filelist, const int start
FileDirEntry *entry;
/* That entry might have already been requested and stored in misc cache... */
- if ((entry = BLI_ghash_popkey(cache->misc_entries, SET_INT_IN_POINTER(idx), NULL)) == NULL) {
+ if ((entry = BLI_ghash_popkey(cache->misc_entries, POINTER_FROM_INT(idx), NULL)) == NULL) {
entry = filelist_file_create_entry(filelist, idx);
BLI_ghash_insert(cache->uuids, entry->uuid, entry);
}
@@ -2064,7 +2064,7 @@ unsigned int filelist_entry_select_set(
{
/* Default NULL pointer if not found is fine here! */
void **es_p = BLI_ghash_lookup_p(filelist->selection_state, entry->uuid);
- unsigned int entry_flag = es_p ? GET_UINT_FROM_POINTER(*es_p) : 0;
+ unsigned int entry_flag = es_p ? POINTER_AS_UINT(*es_p) : 0;
const unsigned int org_entry_flag = entry_flag;
BLI_assert(entry);
@@ -2090,7 +2090,7 @@ unsigned int filelist_entry_select_set(
if (entry_flag != org_entry_flag) {
if (es_p) {
if (entry_flag) {
- *es_p = SET_UINT_IN_POINTER(entry_flag);
+ *es_p = POINTER_FROM_UINT(entry_flag);
}
else {
BLI_ghash_remove(filelist->selection_state, entry->uuid, MEM_freeN, NULL);
@@ -2099,7 +2099,7 @@ unsigned int filelist_entry_select_set(
else if (entry_flag) {
void *key = MEM_mallocN(sizeof(entry->uuid), __func__);
memcpy(key, entry->uuid, sizeof(entry->uuid));
- BLI_ghash_insert(filelist->selection_state, key, SET_UINT_IN_POINTER(entry_flag));
+ BLI_ghash_insert(filelist->selection_state, key, POINTER_FROM_UINT(entry_flag));
}
}
@@ -2139,7 +2139,7 @@ unsigned int filelist_entry_select_get(FileList *filelist, FileDirEntry *entry,
((check == CHECK_FILES) && !(entry->typeflag & FILE_TYPE_DIR)))
{
/* Default NULL pointer if not found is fine here! */
- return GET_UINT_FROM_POINTER(BLI_ghash_lookup(filelist->selection_state, entry->uuid));
+ return POINTER_AS_UINT(BLI_ghash_lookup(filelist->selection_state, entry->uuid));
}
return 0;
diff --git a/source/blender/editors/space_file/filelist.h b/source/blender/editors/space_file/filelist.h
index 76845c44226..6d898ee2fe9 100644
--- a/source/blender/editors/space_file/filelist.h
+++ b/source/blender/editors/space_file/filelist.h
@@ -56,12 +56,12 @@ typedef enum FileCheckType {
CHECK_ALL = 3
} FileCheckType;
-struct ListBase * folderlist_new(void);
+struct ListBase *folderlist_new(void);
void folderlist_free(struct ListBase *folderlist);
-struct ListBase * folderlist_duplicate(ListBase *folderlist);
+struct ListBase *folderlist_duplicate(ListBase *folderlist);
void folderlist_popdir(struct ListBase *folderlist, char *dir);
void folderlist_pushdir(struct ListBase *folderlist, const char *dir);
-const char * folderlist_peeklastdir(struct ListBase *folderdist);
+const char *folderlist_peeklastdir(struct ListBase *folderdist);
int folderlist_clear_next(struct SpaceFile *sfile);
@@ -77,24 +77,24 @@ void filelist_filter(struct FileList *filelist);
void filelist_init_icons(void);
void filelist_free_icons(void);
void filelist_imgsize(struct FileList *filelist, short w, short h);
-struct ImBuf * filelist_getimage(struct FileList *filelist, const int index);
-struct ImBuf * filelist_geticon_image(struct FileList *filelist, const int index);
+struct ImBuf *filelist_getimage(struct FileList *filelist, const int index);
+struct ImBuf *filelist_geticon_image(struct FileList *filelist, const int index);
int filelist_geticon(struct FileList *filelist, const int index, const bool is_main);
-struct FileList * filelist_new(short type);
+struct FileList *filelist_new(short type);
void filelist_clear(struct FileList *filelist);
void filelist_clear_ex(struct FileList *filelist, const bool do_cache, const bool do_selection);
void filelist_free(struct FileList *filelist);
-const char * filelist_dir(struct FileList *filelist);
+const char *filelist_dir(struct FileList *filelist);
bool filelist_is_dir(struct FileList *filelist, const char *path);
void filelist_setdir(struct FileList *filelist, char *r_dir);
int filelist_files_ensure(struct FileList *filelist);
int filelist_empty(struct FileList *filelist);
-FileDirEntry * filelist_file(struct FileList *filelist, int index);
+FileDirEntry *filelist_file(struct FileList *filelist, int index);
int filelist_file_findpath(struct FileList *filelist, const char *file);
-FileDirEntry * filelist_entry_find_uuid(struct FileList *filelist, const int uuid[4]);
+FileDirEntry *filelist_entry_find_uuid(struct FileList *filelist, const int uuid[4]);
void filelist_file_cache_slidingwindow_set(struct FileList *filelist, size_t window_size);
bool filelist_file_cache_block(struct FileList *filelist, const int index);
diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c
index 70df086b32d..359cce45baa 100644
--- a/source/blender/editors/space_file/fsmenu.c
+++ b/source/blender/editors/space_file/fsmenu.c
@@ -59,6 +59,7 @@
#ifdef __linux__
#include <mntent.h>
+#include "BLI_fileops_types.h"
#endif
#include "fsmenu.h" /* include ourselves */
@@ -439,7 +440,7 @@ void fsmenu_read_bookmarks(struct FSMenu *fsmenu, const char *filename)
line[len - 1] = '\0';
}
/* don't do this because it can be slow on network drives,
- * having a bookmark from a drive thats ejected or so isn't
+ * having a bookmark from a drive that's ejected or so isn't
* all _that_ bad */
#if 0
if (BLI_exists(line))
@@ -598,13 +599,22 @@ void fsmenu_read_system(struct FSMenu *fsmenu, int read_bookmarks)
fp = setmntent(MOUNTED, "r");
if (fp == NULL) {
- fprintf(stderr, "could not get a list of mounted filesystemts\n");
+ fprintf(stderr, "could not get a list of mounted filesystems\n");
}
else {
while ((mnt = getmntent(fp))) {
- /* not sure if this is right, but seems to give the relevant mnts */
- if (!STREQLEN(mnt->mnt_fsname, "/dev", 4))
+ if (STRPREFIX(mnt->mnt_dir, "/boot")) {
+ /* Hide share not usable to the user. */
continue;
+ }
+ else if (!STRPREFIX(mnt->mnt_fsname, "/dev")) {
+ continue;
+ }
+ else if (STRPREFIX(mnt->mnt_fsname, "/dev/loop")) {
+ /* The dev/loop* entries are SNAPS used by desktop environment
+ * (Gnome) no need for them to show up in the list. */
+ continue;
+ }
len = strlen(mnt->mnt_dir);
if (len && mnt->mnt_dir[len - 1] != '/') {
@@ -618,8 +628,35 @@ void fsmenu_read_system(struct FSMenu *fsmenu, int read_bookmarks)
found = 1;
}
if (endmntent(fp) == 0) {
- fprintf(stderr, "could not close the list of mounted filesystemts\n");
+ fprintf(stderr, "could not close the list of mounted filesystems\n");
+ }
+ }
+ /* Check gvfs shares. */
+ const char * const xdg_runtime_dir = BLI_getenv("XDG_RUNTIME_DIR");
+ if (xdg_runtime_dir != NULL) {
+ struct direntry *dir;
+ char name[FILE_MAX];
+ BLI_join_dirfile(name, sizeof(name), xdg_runtime_dir, "gvfs/");
+ const uint dir_len = BLI_filelist_dir_contents(name, &dir);
+ for (uint i = 0; i < dir_len; i++) {
+ if ((dir[i].type & S_IFDIR)) {
+ const char *dirname = dir[i].relname;
+ if (dirname[0] != '.') {
+ /* Dir names contain a lot of unwanted text.
+ * Assuming every entry ends with the share name */
+ const char *label = strstr(dirname, "share=");
+ if (label != NULL) {
+ /* Move pointer so "share=" is trimmed off or use full dirname as label. */
+ const char *label_test = label + 6;
+ label = *label_test ? label_test : dirname;
+ }
+ BLI_snprintf(line, sizeof(line), "%s%s/", name, dirname);
+ fsmenu_insert_entry(fsmenu, FS_CATEGORY_SYSTEM, line, label, FS_INSERT_SORTED);
+ found = 1;
+ }
+ }
}
+ BLI_filelist_free(dir, dir_len);
}
#endif
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 7bab5e34d40..b0dea1eb31b 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -386,7 +386,7 @@ static void file_main_region_draw(const bContext *C, ARegion *ar)
v2d->keepofs |= V2D_LOCKOFS_Y;
/* XXX this happens on scaling down Screen (like from startup.blend) */
- /* view2d has no type specific for filewindow case, which doesnt scroll vertically */
+ /* view2d has no type specific for filewindow case, which doesn't scroll vertically */
if (v2d->cur.ymax < 0) {
v2d->cur.ymin -= v2d->cur.ymax;
v2d->cur.ymax = 0;
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index 22ca3275ff9..d3f3a4e3395 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -234,14 +234,14 @@ static short get_active_fcurve_keyframe_edit(FCurve *fcu, BezTriple **bezt, BezT
return 0;
/* find first selected keyframe for now, and call it the active one
- * - this is a reasonable assumption, given that whenever anyone
- * wants to edit numerically, there is likely to only be 1 vert selected
+ * - this is a reasonable assumption, given that whenever anyone
+ * wants to edit numerically, there is likely to only be 1 vert selected
*/
for (i = 0, b = fcu->bezt; i < fcu->totvert; i++, b++) {
if (BEZT_ISSEL_ANY(b)) {
/* found
- * - 'previous' is either the one before, of the keyframe itself (which is still fine)
- * XXX: we can just make this null instead if needed
+ * - 'previous' is either the one before, of the keyframe itself (which is still fine)
+ * XXX: we can just make this null instead if needed
*/
*prevbezt = (i > 0) ? b - 1 : b;
*bezt = b;
@@ -393,8 +393,8 @@ static void graph_panel_key_properties(const bContext *C, Panel *pa)
}
/* numerical coordinate editing
- * - we use the button-versions of the calls so that we can attach special update handlers
- * and unit conversion magic that cannot be achieved using a purely RNA-approach
+ * - we use the button-versions of the calls so that we can attach special update handlers
+ * and unit conversion magic that cannot be achieved using a purely RNA-approach
*/
col = uiLayoutColumn(layout, true);
/* keyframe itself */
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index 9a94bb9072b..6823a4343a7 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -63,7 +63,7 @@
/* determine the alpha value that should be used when
* drawing components for some F-Curve (fcu)
- * - selected F-Curves should be more visible than partially visible ones
+ * - selected F-Curves should be more visible than partially visible ones
*/
static float fcurve_display_alpha(FCurve *fcu)
{
@@ -106,7 +106,7 @@ static void draw_fcurve_modifier_controls_envelope(FModifier *fcm, View2D *v2d)
glBegin(GL_POINTS);
for (i = 0, fed = env->data; i < env->totvert; i++, fed++) {
/* only draw if visible
- * - min/max here are fixed, not relative
+ * - min/max here are fixed, not relative
*/
if (IN_RANGE(fed->time, (v2d->cur.xmin - fac), (v2d->cur.xmax + fac))) {
glVertex2f(fed->time, fed->min);
@@ -132,13 +132,13 @@ static void draw_fcurve_vertices_keyframes(FCurve *fcu, SpaceIpo *UNUSED(sipo),
for (i = 0; i < fcu->totvert; i++, bezt++) {
/* as an optimization step, only draw those in view
- * - we apply a correction factor to ensure that points don't pop in/out due to slight twitches of view size
+ * - we apply a correction factor to ensure that points don't pop in/out due to slight twitches of view size
*/
if (IN_RANGE(bezt->vec[1][0], (v2d->cur.xmin - fac), (v2d->cur.xmax + fac))) {
if (edit) {
/* 'Keyframe' vertex only, as handle lines and handles have already been drawn
- * - only draw those with correct selection state for the current drawing color
- * -
+ * - only draw those with correct selection state for the current drawing color
+ * -
*/
if ((bezt->f2 & SELECT) == sel)
glVertex3fv(bezt->vec[1]);
@@ -216,8 +216,8 @@ static void draw_fcurve_vertices_handles(FCurve *fcu, SpaceIpo *sipo, View2D *v2
for (i = 0; i < fcu->totvert; i++, prevbezt = bezt, bezt++) {
/* Draw the editmode handles for a bezier curve (others don't have handles)
* if their selection status matches the selection status we're drawing for
- * - first handle only if previous beztriple was bezier-mode
- * - second handle only if current beztriple is bezier-mode
+ * - first handle only if previous beztriple was bezier-mode
+ * - second handle only if current beztriple is bezier-mode
*
* Also, need to take into account whether the keyframe was selected
* if a Graph Editor option to only show handles of selected keys is on.
@@ -264,10 +264,10 @@ static void draw_fcurve_vertices(SpaceIpo *sipo, ARegion *ar, FCurve *fcu, short
View2D *v2d = &ar->v2d;
/* only draw points if curve is visible
- * - draw unselected points before selected points as separate passes to minimize color-changing overhead
- * (XXX dunno if this is faster than drawing all in one pass though)
- * and also to make sure in the case of overlapping points that the selected is always visible
- * - draw handles before keyframes, so that keyframes will overlap handles (keyframes are more important for users)
+ * - draw unselected points before selected points as separate passes to minimize color-changing overhead
+ * (XXX dunno if this is faster than drawing all in one pass though)
+ * and also to make sure in the case of overlapping points that the selected is always visible
+ * - draw handles before keyframes, so that keyframes will overlap handles (keyframes are more important for users)
*/
glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE));
@@ -492,15 +492,15 @@ static void draw_fcurve_curve(bAnimContext *ac, ID *id, FCurve *fcu, View2D *v2d
unitFac = ANIM_unit_mapping_get_factor(ac->scene, id, fcu, mapping_flag, &offset);
/* Note about sampling frequency:
- * Ideally, this is chosen such that we have 1-2 pixels = 1 segment
- * which means that our curves can be as smooth as possible. However,
- * this does mean that curves may not be fully accurate (i.e. if they have
- * sudden spikes which happen at the sampling point, we may have problems).
- * Also, this may introduce lower performance on less densely detailed curves,
- * though it is impossible to predict this from the modifiers!
+ * Ideally, this is chosen such that we have 1-2 pixels = 1 segment
+ * which means that our curves can be as smooth as possible. However,
+ * this does mean that curves may not be fully accurate (i.e. if they have
+ * sudden spikes which happen at the sampling point, we may have problems).
+ * Also, this may introduce lower performance on less densely detailed curves,
+ * though it is impossible to predict this from the modifiers!
*
- * If the automatically determined sampling frequency is likely to cause an infinite
- * loop (i.e. too close to 0), then clamp it to a determined "safe" value. The value
+ * If the automatically determined sampling frequency is likely to cause an infinite
+ * loop (i.e. too close to 0), then clamp it to a determined "safe" value. The value
* chosen here is just the coarsest value which still looks reasonable...
*/
/* grid->dx represents the number of 'frames' between gridlines, but we divide by U.v2d_min_gridsize to get pixels-steps */
@@ -533,8 +533,8 @@ static void draw_fcurve_curve(bAnimContext *ac, ID *id, FCurve *fcu, View2D *v2d
/* at each sampling interval, add a new vertex
- * - apply the unit correction factor to the calculated values so that
- * the displayed values appear correctly in the viewport
+ * - apply the unit correction factor to the calculated values so that
+ * the displayed values appear correctly in the viewport
*/
glBegin(GL_LINE_STRIP);
@@ -722,7 +722,7 @@ static void draw_fcurve_curve_bezts(bAnimContext *ac, ID *id, FCurve *fcu, View2
}
else if (prevbezt->ipo == BEZT_IPO_BEZ) {
/* Bezier-Interpolation: draw curve as series of segments between keyframes
- * - resol determines number of points to sample in between keyframes
+ * - resol determines number of points to sample in between keyframes
*/
/* resol depends on distance between points (not just horizontal) OR is a fixed high res */
@@ -935,8 +935,8 @@ void graph_draw_ghost_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar)
/* the ghost curves are simply sampled F-Curves stored in sipo->ghostCurves */
for (fcu = sipo->ghostCurves.first; fcu; fcu = fcu->next) {
/* set whatever color the curve has set
- * - this is set by the function which creates these
- * - draw with a fixed opacity of 2
+ * - this is set by the function which creates these
+ * - draw with a fixed opacity of 2
*/
glColor4f(fcu->color[0], fcu->color[1], fcu->color[2], 0.5f);
@@ -966,8 +966,8 @@ void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* for each curve:
- * draw curve, then handle-lines, and finally vertices in this order so that
- * the data will be layered correctly
+ * draw curve, then handle-lines, and finally vertices in this order so that
+ * the data will be layered correctly
*/
for (ale = anim_data.first; ale; ale = ale->next) {
FCurve *fcu = (FCurve *)ale->key_data;
@@ -979,10 +979,10 @@ void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 0);
/* draw curve:
- * - curve line may be result of one or more destructive modifiers or just the raw data,
- * so we need to check which method should be used
- * - controls from active modifier take precedence over keyframes
- * (XXX! editing tools need to take this into account!)
+ * - curve line may be result of one or more destructive modifiers or just the raw data,
+ * so we need to check which method should be used
+ * - controls from active modifier take precedence over keyframes
+ * (XXX! editing tools need to take this into account!)
*/
/* 1) draw curve line */
@@ -999,7 +999,7 @@ void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid
}
else {
/* set whatever color the curve has set
- * - unselected curves draw less opaque to help distinguish the selected ones
+ * - unselected curves draw less opaque to help distinguish the selected ones
*/
glColor4f(fcu->color[0], fcu->color[1], fcu->color[2], fcurve_display_alpha(fcu));
}
@@ -1044,7 +1044,7 @@ void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid
}
/* 2) draw handles and vertices as appropriate based on active
- * - if the option to only show controls if the F-Curve is selected is enabled, we must obey this
+ * - if the option to only show controls if the F-Curve is selected is enabled, we must obey this
*/
if (!(sipo->flag & SIPO_SELCUVERTSONLY) || (fcu->flag & FCURVE_SELECTED)) {
if (fcurve_are_keyframes_usable(fcu) == 0) {
@@ -1125,10 +1125,10 @@ void graph_draw_channel_names(bContext *C, bAnimContext *ac, ARegion *ar)
items = ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* Update max-extent of channels here (taking into account scrollers):
- * - this is done to allow the channel list to be scrollable, but must be done here
- * to avoid regenerating the list again and/or also because channels list is drawn first
- * - offset of ACHANNEL_HEIGHT*2 is added to the height of the channels, as first is for
- * start of list offset, and the second is as a correction for the scrollers.
+ * - this is done to allow the channel list to be scrollable, but must be done here
+ * to avoid regenerating the list again and/or also because channels list is drawn first
+ * - offset of ACHANNEL_HEIGHT*2 is added to the height of the channels, as first is for
+ * start of list offset, and the second is as a correction for the scrollers.
*/
height = (float)((items * ACHANNEL_STEP(ac)) + (ACHANNEL_HEIGHT(ac) * 2));
UI_view2d_totRect_set(v2d, BLI_rcti_size_x(&ar->v2d.mask), height);
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 7717b8c8200..3086e189a7a 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -374,7 +374,7 @@ static void create_ghost_curves(bAnimContext *ac, int start, int end)
unitFac = ANIM_unit_mapping_get_factor(ac->scene, ale->id, fcu, mapping_flag, &offset);
/* create samples, but store them in a new curve
- * - we cannot use fcurve_store_samples() as that will only overwrite the original curve
+ * - we cannot use fcurve_store_samples() as that will only overwrite the original curve
*/
gcu->fpt = fpt = MEM_callocN(sizeof(FPoint) * (end - start + 1), "Ghost FPoint Samples");
gcu->totvert = end - start + 1;
@@ -388,7 +388,7 @@ static void create_ghost_curves(bAnimContext *ac, int start, int end)
}
/* set color of ghost curve
- * - make the color slightly darker
+ * - make the color slightly darker
*/
gcu->color[0] = fcu->color[0] - 0.07f;
gcu->color[1] = fcu->color[1] - 0.07f;
@@ -1818,10 +1818,10 @@ static int graphkeys_euler_filter_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* The process is done in two passes:
- * 1) Sets of three related rotation curves are identified from the selected channels,
- * and are stored as a single 'operation unit' for the next step
- * 2) Each set of three F-Curves is processed for each keyframe, with the values being
- * processed as necessary
+ * 1) Sets of three related rotation curves are identified from the selected channels,
+ * and are stored as a single 'operation unit' for the next step
+ * 2) Each set of three F-Curves is processed for each keyframe, with the values being
+ * processed as necessary
*/
/* step 1: extract only the rotation f-curves */
@@ -1832,8 +1832,8 @@ static int graphkeys_euler_filter_exec(bContext *C, wmOperator *op)
FCurve *fcu = (FCurve *)ale->data;
/* check if this is an appropriate F-Curve
- * - only rotation curves
- * - for pchan curves, make sure we're only using the euler curves
+ * - only rotation curves
+ * - for pchan curves, make sure we're only using the euler curves
*/
if (strstr(fcu->rna_path, "rotation_euler") == NULL)
continue;
@@ -1873,7 +1873,7 @@ static int graphkeys_euler_filter_exec(bContext *C, wmOperator *op)
}
/* step 2: go through each set of curves, processing the values at each keyframe
- * - it is assumed that there must be a full set of keyframes at each keyframe position
+ * - it is assumed that there must be a full set of keyframes at each keyframe position
*/
for (euf = eulers.first; euf; euf = euf->next) {
int f;
diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c
index 0bb46ca6fb8..aa1d0511e3d 100644
--- a/source/blender/editors/space_graph/graph_ops.c
+++ b/source/blender/editors/space_graph/graph_ops.c
@@ -63,8 +63,8 @@
/* Set Cursor --------------------------------------------------------------------- */
/* The 'cursor' in the Graph Editor consists of two parts:
- * 1) Current Frame Indicator (as per ANIM_OT_change_frame)
- * 2) Value Indicator (stored per Graph Editor instance)
+ * 1) Current Frame Indicator (as per ANIM_OT_change_frame)
+ * 2) Value Indicator (stored per Graph Editor instance)
*/
static bool graphview_cursor_poll(bContext *C)
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c
index ed9bed19d20..da44c33104c 100644
--- a/source/blender/editors/space_graph/graph_select.c
+++ b/source/blender/editors/space_graph/graph_select.c
@@ -68,20 +68,20 @@
/* ******************** Deselect All Operator ***************************** */
/* This operator works in one of three ways:
- * 1) (de)select all (AKEY) - test if select all or deselect all
- * 2) invert all (CTRL-IKEY) - invert selection of all keyframes
- * 3) (de)select all - no testing is done; only for use internal tools as normal function...
+ * 1) (de)select all (AKEY) - test if select all or deselect all
+ * 2) invert all (CTRL-IKEY) - invert selection of all keyframes
+ * 3) (de)select all - no testing is done; only for use internal tools as normal function...
*/
/* Deselects keyframes in the Graph Editor
- * - This is called by the deselect all operator, as well as other ones!
+ * - This is called by the deselect all operator, as well as other ones!
*
- * - test: check if select or deselect all
- * - sel: how to select keyframes
- * 0 = deselect
- * 1 = select
- * 2 = invert
- * - do_channels: whether to affect selection status of channels
+ * - test: check if select or deselect all
+ * - sel: how to select keyframes
+ * 0 = deselect
+ * 1 = select
+ * 2 = invert
+ * - do_channels: whether to affect selection status of channels
*/
void deselect_graph_keys(bAnimContext *ac, bool test, short sel, bool do_channels)
{
@@ -206,10 +206,10 @@ void GRAPH_OT_select_all_toggle(wmOperatorType *ot)
/* ******************** Border Select Operator **************************** */
/* This operator currently works in one of three ways:
- * -> BKEY - 1) all keyframes within region are selected (validation with BEZT_OK_REGION)
- * -> ALT-BKEY - depending on which axis of the region was larger...
- * -> 2) x-axis, so select all frames within frame range (validation with BEZT_OK_FRAMERANGE)
- * -> 3) y-axis, so select all frames within channels that region included (validation with BEZT_OK_VALUERANGE)
+ * -> BKEY - 1) all keyframes within region are selected (validation with BEZT_OK_REGION)
+ * -> ALT-BKEY - depending on which axis of the region was larger...
+ * -> 2) x-axis, so select all frames within frame range (validation with BEZT_OK_FRAMERANGE)
+ * -> 3) y-axis, so select all frames within channels that region included (validation with BEZT_OK_VALUERANGE)
*
* The selection backend is also reused for the Lasso and Circle select operators.
*/
@@ -345,7 +345,7 @@ static int graphkeys_borderselect_exec(bContext *C, wmOperator *op)
deselect_graph_keys(&ac, 1, SELECT_SUBTRACT, true);
/* get select mode
- * - 'include_handles' from the operator specifies whether to include handles in the selection
+ * - 'include_handles' from the operator specifies whether to include handles in the selection
*/
if (select) {
selectmode = SELECT_ADD;
@@ -362,9 +362,9 @@ static int graphkeys_borderselect_exec(bContext *C, wmOperator *op)
/* selection 'mode' depends on whether borderselect region only matters on one axis */
if (RNA_boolean_get(op->ptr, "axis_range")) {
/* mode depends on which axis of the range is larger to determine which axis to use
- * - checking this in region-space is fine, as it's fundamentally still going to be a different rect size
- * - the frame-range select option is favored over the channel one (x over y), as frame-range one is often
- * used for tweaking timing when "blocking", while channels is not that useful...
+ * - checking this in region-space is fine, as it's fundamentally still going to be a different rect size
+ * - the frame-range select option is favored over the channel one (x over y), as frame-range one is often
+ * used for tweaking timing when "blocking", while channels is not that useful...
*/
if ((BLI_rcti_size_x(&rect)) >= (BLI_rcti_size_y(&rect)))
mode = BEZT_OK_FRAMERANGE;
@@ -562,10 +562,10 @@ void GRAPH_OT_select_circle(wmOperatorType *ot)
/* ******************** Column Select Operator **************************** */
/* This operator works in one of four ways:
- * - 1) select all keyframes in the same frame as a selected one (KKEY)
- * - 2) select all keyframes in the same frame as the current frame marker (CTRL-KKEY)
- * - 3) select all keyframes in the same frame as a selected markers (SHIFT-KKEY)
- * - 4) select all keyframes that occur between selected markers (ALT-KKEY)
+ * - 1) select all keyframes in the same frame as a selected one (KKEY)
+ * - 2) select all keyframes in the same frame as the current frame marker (CTRL-KKEY)
+ * - 3) select all keyframes in the same frame as a selected markers (SHIFT-KKEY)
+ * - 4) select all keyframes that occur between selected markers (ALT-KKEY)
*/
/* defines for column-select mode */
@@ -684,7 +684,7 @@ static void columnselect_graph_keys(bAnimContext *ac, short mode)
AnimData *adt = ANIM_nla_mapping_get(ac, ale);
/* loop over cfraelems (stored in the KeyframeEditData->list)
- * - we need to do this here, as we can apply fewer NLA-mapping conversions
+ * - we need to do this here, as we can apply fewer NLA-mapping conversions
*/
for (ce = ked.list.first; ce; ce = ce->next) {
/* set frame for validation callback to refer to */
@@ -1064,9 +1064,9 @@ void GRAPH_OT_select_leftright(wmOperatorType *ot)
/* ******************** Mouse-Click Select Operator *********************** */
/* This operator works in one of three ways:
- * - 1) keyframe under mouse - no special modifiers
- * - 2) all keyframes on the same side of current frame indicator as mouse - ALT modifier
- * - 3) column select all keyframes in frame under mouse - CTRL modifier
+ * - 1) keyframe under mouse - no special modifiers
+ * - 2) all keyframes on the same side of current frame indicator as mouse - ALT modifier
+ * - 3) column select all keyframes in frame under mouse - CTRL modifier
*
* In addition to these basic options, the SHIFT modifier can be used to toggle the
* selection mode between replacing the selection (without) and inverting the selection (with).
@@ -1180,8 +1180,8 @@ static void get_nearest_fcurve_verts_list(bAnimContext *ac, const int mval[2], L
short mapping_flag = 0;
/* get curves to search through
- * - if the option to only show keyframes that belong to selected F-Curves is enabled,
- * include the 'only selected' flag...
+ * - if the option to only show keyframes that belong to selected F-Curves is enabled,
+ * include the 'only selected' flag...
*/
filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
if (sipo->flag & SIPO_SELCUVERTSONLY) // FIXME: this should really be check for by the filtering code...
@@ -1256,7 +1256,7 @@ static tNearestVertInfo *get_best_nearest_fcurve_vert(ListBase *matches)
/* which mode of search are we in: find first selected, or find vert? */
if (found) {
/* just take this vert now that we've found the selected one
- * - we'll need to remove this from the list so that it can be returned to the original caller
+ * - we'll need to remove this from the list so that it can be returned to the original caller
*/
BLI_remlink(matches, nvi);
return nvi;
diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c
index ad59e8c7eda..d184681f146 100644
--- a/source/blender/editors/space_graph/graph_utils.c
+++ b/source/blender/editors/space_graph/graph_utils.c
@@ -121,9 +121,9 @@ bool graphop_visible_keyframes_poll(bContext *C)
FCurve *fcu = (FCurve *)ale->data;
/* visible curves for selection must fulfill the following criteria:
- * - it has bezier keyframes
- * - F-Curve modifiers do not interfere with the result too much
- * (i.e. the modifier-control drawing check returns false)
+ * - it has bezier keyframes
+ * - F-Curve modifiers do not interfere with the result too much
+ * (i.e. the modifier-control drawing check returns false)
*/
if (fcu->bezt == NULL)
continue;
@@ -170,10 +170,10 @@ bool graphop_editable_keyframes_poll(bContext *C)
FCurve *fcu = (FCurve *)ale->data;
/* editable curves must fulfill the following criteria:
- * - it has bezier keyframes
- * - it must not be protected from editing (this is already checked for with the edit flag
- * - F-Curve modifiers do not interfere with the result too much
- * (i.e. the modifier-control drawing check returns false)
+ * - it has bezier keyframes
+ * - it must not be protected from editing (this is already checked for with the edit flag
+ * - F-Curve modifiers do not interfere with the result too much
+ * (i.e. the modifier-control drawing check returns false)
*/
if (fcu->bezt == NULL)
continue;
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index 4e39c741b9b..cfa42cab3e7 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -542,8 +542,8 @@ static void graph_refresh_fcurve_colors(const bContext *C)
UI_SetTheme(SPACE_IPO, RGN_TYPE_WINDOW);
/* build list of F-Curves which will be visible as channels in channel-region
- * - we don't include ANIMFILTER_CURVEVISIBLE filter, as that will result in a
- * mismatch between channel-colors and the drawn curves
+ * - we don't include ANIMFILTER_CURVEVISIBLE filter, as that will result in a
+ * mismatch between channel-colors and the drawn curves
*/
filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_NODUPLIS);
items = ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index 3fb1d6dd2d0..26bd560b31f 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -963,7 +963,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
uiItemR(col, &imaptr, "use_view_as_render", 0, NULL, ICON_NONE);
if (ima->source != IMA_SRC_GENERATED) {
- if (compact == 0) { /* background image view doesnt need these */
+ if (compact == 0) { /* background image view doesn't need these */
ImBuf *ibuf = BKE_image_acquire_ibuf(ima, iuser, NULL);
bool has_alpha = true;
diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c
index acd0a856f1a..793b1a79b55 100644
--- a/source/blender/editors/space_info/info_ops.c
+++ b/source/blender/editors/space_info/info_ops.c
@@ -70,7 +70,7 @@
#include "info_intern.h"
-/********************* pack blend file libaries operator *********************/
+/********************* pack blend file libraries operator *********************/
static int pack_libraries_exec(bContext *C, wmOperator *op)
{
@@ -124,7 +124,7 @@ void FILE_OT_unpack_libraries(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-/********************* toogle auto-pack operator *********************/
+/********************* toggle auto-pack operator *********************/
static int autopack_toggle_exec(bContext *C, wmOperator *op)
{
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c
index c8385dfcbe3..a88d82fa05a 100644
--- a/source/blender/editors/space_logic/logic_window.c
+++ b/source/blender/editors/space_logic/logic_window.c
@@ -964,7 +964,7 @@ static void draw_sensor_collision(uiLayout *layout, PointerRNA *ptr, bContext *C
uiItemR(row, ptr, "use_pulse", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
uiItemR(row, ptr, "use_material", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- switch (RNA_boolean_get(ptr, "use_material")) {
+ switch (RNA_enum_get(ptr, "use_material")) {
case SENS_COLLISION_PROPERTY:
uiItemR(split, ptr, "property", 0, NULL, ICON_NONE);
break;
diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c
index 659a36c4a23..63eb0e361bf 100644
--- a/source/blender/editors/space_nla/nla_buttons.c
+++ b/source/blender/editors/space_nla/nla_buttons.c
@@ -95,7 +95,7 @@ bool nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA *nlt_p
return false;
/* extract list of active channel(s), of which we should only take the first one
- * - we need the channels flag to get the active AnimData block when there are no NLA Tracks
+ * - we need the channels flag to get the active AnimData block when there are no NLA Tracks
*/
// XXX: double-check active!
filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_ACTIVE | ANIMFILTER_LIST_CHANNELS);
@@ -366,7 +366,7 @@ static void nla_panel_properties(const bContext *C, Panel *pa)
uiItemR(row, &strip_ptr, "blend_type", 0, NULL, ICON_NONE);
/* blend in/out + autoblending
- * - blend in/out can only be set when autoblending is off
+ * - blend in/out can only be set when autoblending is off
*/
column = uiLayoutColumn(layout, true);
uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_influence") == false);
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
index c1e4a5de0ed..103b0664a23 100644
--- a/source/blender/editors/space_nla/nla_channels.c
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -71,7 +71,7 @@
* part of the channel is relevant.
*
* NOTE: eventually, this should probably be phased out when many of these things are replaced with buttons
- * --> Most channels are now selection only...
+ * --> Most channels are now selection only...
*/
static int mouse_nla_channels(bContext *C, bAnimContext *ac, float x, int channel_index, short selectmode)
@@ -368,8 +368,8 @@ static int nlachannels_mouseclick_invoke(bContext *C, wmOperator *op, const wmEv
/* figure out which channel user clicked in
* Note: although channels technically start at y= NLACHANNEL_FIRST, we need to adjust by half a channel's height
- * so that the tops of channels get caught ok. Since NLACHANNEL_FIRST is really NLACHANNEL_HEIGHT, we simply use
- * NLACHANNEL_HEIGHT_HALF.
+ * so that the tops of channels get caught ok. Since NLACHANNEL_FIRST is really NLACHANNEL_HEIGHT, we simply use
+ * NLACHANNEL_HEIGHT_HALF.
*/
UI_view2d_region_to_view(v2d, event->mval[0], event->mval[1], &x, &y);
UI_view2d_listview_view_to_cell(v2d, NLACHANNEL_NAMEWIDTH, NLACHANNEL_STEP(snla), 0, (float)NLACHANNEL_HEIGHT_HALF(snla), x, y, NULL, &channel_index);
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 5d138a939de..ea35c583913 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -113,15 +113,15 @@ static void nla_action_draw_keyframes(AnimData *adt, bAction *act, View2D *v2d,
return;
/* draw a darkened region behind the strips
- * - get and reset the background color, this time without the alpha to stand out better
- * (amplified alpha is used instead)
+ * - get and reset the background color, this time without the alpha to stand out better
+ * (amplified alpha is used instead)
*/
nla_action_get_color(adt, act, color);
color[3] *= 2.5f;
glColor4fv(color);
- /* - draw a rect from the first to the last frame (no extra overlaps for now)
- * that is slightly stumpier than the track background (hardcoded 2-units here)
+ /* - draw a rect from the first to the last frame (no extra overlaps for now)
+ * that is slightly stumpier than the track background (hardcoded 2-units here)
*/
f1 = ((ActKeyColumn *)keys.first)->cfra;
f2 = ((ActKeyColumn *)keys.last)->cfra;
@@ -136,7 +136,7 @@ static void nla_action_draw_keyframes(AnimData *adt, bAction *act, View2D *v2d,
glColor3f(0.0f, 0.0f, 0.0f);
/* just draw each keyframe as a simple dot (regardless of the selection status)
- * - size is 3.0f which is smaller than the editable keyframes, so that there is a distinction
+ * - size is 3.0f which is smaller than the editable keyframes, so that there is a distinction
*/
for (ak = keys.first; ak; ak = ak->next)
draw_keyframe_shape(ak->cfra, y, xscale, 3.0f, 0, ak->key_type, KEYFRAME_SHAPE_FRAME, 1.0f);
@@ -289,7 +289,7 @@ static void nla_draw_strip_curves(NlaStrip *strip, float yminc, float ymaxc)
glBegin(GL_LINE_STRIP);
/* sample at 1 frame intervals, and draw
- * - min y-val is yminc, max is y-maxc, so clamp in those regions
+ * - min y-val is yminc, max is y-maxc, so clamp in those regions
*/
for (cfra = strip->start; cfra <= strip->end; cfra += 1.0f) {
float y = evaluate_fcurve(fcu, cfra);
@@ -341,7 +341,7 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri
nla_strip_get_color_inside(adt, strip, color);
/* draw extrapolation info first (as backdrop)
- * - but this should only be drawn if track has some contribution
+ * - but this should only be drawn if track has some contribution
*/
if ((strip->extendmode != NLASTRIP_EXTEND_NOTHING) && (non_solo == 0)) {
/* enable transparency... */
@@ -416,7 +416,7 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri
/* draw strip's control 'curves'
- * - only if user hasn't hidden them...
+ * - only if user hasn't hidden them...
*/
if ((snla->flag & SNLA_NOSTRIPCURVES) == 0)
nla_draw_strip_curves(strip, yminc, ymaxc);
@@ -427,7 +427,7 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri
nla_strip_draw_markers(strip, yminc, ymaxc);
/* draw strip outline
- * - color used here is to indicate active vs non-active
+ * - color used here is to indicate active vs non-active
*/
if (strip->flag & NLASTRIP_FLAG_ACTIVE) {
/* strip should appear 'sunken', so draw a light border around it */
@@ -469,13 +469,13 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri
/* only draw first-level of child-strips, but don't draw any lines on the endpoints */
for (cs = strip->strips.first; cs; cs = cs->next) {
/* draw start-line if not same as end of previous (and only if not the first strip)
- * - on upper half of strip
+ * - on upper half of strip
*/
if ((cs->prev) && IS_EQF(cs->prev->end, cs->start) == 0)
fdrawline(cs->start, y, cs->start, ymaxc);
/* draw end-line if not the last strip
- * - on lower half of strip
+ * - on lower half of strip
*/
if (cs->next)
fdrawline(cs->end, yminc, cs->end, y);
@@ -520,7 +520,7 @@ static void nla_draw_strip_text(
col[3] = 128;
/* set bounding-box for text
- * - padding of 2 'units' on either side
+ * - padding of 2 'units' on either side
*/
// TODO: make this centered?
rect.xmin = xminc;
@@ -546,8 +546,8 @@ static void nla_draw_strip_frames_text(NlaTrack *UNUSED(nlt), NlaStrip *strip, V
/* Always draw times above the strip, whereas sequencer drew below + above.
* However, we should be fine having everything on top, since these tend to be
* quite spaced out.
- * - 1 dp is compromise between lack of precision (ints only, as per sequencer)
- * while also preserving some accuracy, since we do use floats
+ * - 1 dp is compromise between lack of precision (ints only, as per sequencer)
+ * while also preserving some accuracy, since we do use floats
*/
/* start frame */
numstr_len = BLI_snprintf_rlen(numstr, sizeof(numstr), "%.1f", strip->start);
@@ -578,10 +578,10 @@ void draw_nla_main_data(bAnimContext *ac, SpaceNla *snla, ARegion *ar)
items = ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* Update max-extent of channels here (taking into account scrollers):
- * - this is done to allow the channel list to be scrollable, but must be done here
- * to avoid regenerating the list again and/or also because channels list is drawn first
- * - offset of NLACHANNEL_HEIGHT*2 is added to the height of the channels, as first is for
- * start of list offset, and the second is as a correction for the scrollers.
+ * - this is done to allow the channel list to be scrollable, but must be done here
+ * to avoid regenerating the list again and/or also because channels list is drawn first
+ * - offset of NLACHANNEL_HEIGHT*2 is added to the height of the channels, as first is for
+ * start of list offset, and the second is as a correction for the scrollers.
*/
height = ((items * NLACHANNEL_STEP(snla)) + (NLACHANNEL_HEIGHT(snla) * 2));
/* don't use totrect set, as the width stays the same
@@ -702,10 +702,10 @@ void draw_nla_channel_list(const bContext *C, bAnimContext *ac, ARegion *ar)
items = ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* Update max-extent of channels here (taking into account scrollers):
- * - this is done to allow the channel list to be scrollable, but must be done here
- * to avoid regenerating the list again and/or also because channels list is drawn first
- * - offset of NLACHANNEL_HEIGHT*2 is added to the height of the channels, as first is for
- * start of list offset, and the second is as a correction for the scrollers.
+ * - this is done to allow the channel list to be scrollable, but must be done here
+ * to avoid regenerating the list again and/or also because channels list is drawn first
+ * - offset of NLACHANNEL_HEIGHT*2 is added to the height of the channels, as first is for
+ * start of list offset, and the second is as a correction for the scrollers.
*/
height = ((items * NLACHANNEL_STEP(snla)) + (NLACHANNEL_HEIGHT(snla) * 2));
/* don't use totrect set, as the width stays the same
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index 23cd504978c..5cf3ace747b 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -617,7 +617,7 @@ static int nlaedit_add_actionclip_exec(bContext *C, wmOperator *op)
nlaedit_add_tracks_empty(&ac);
/* get a list of the editable tracks being shown in the NLA
- * - this is limited to active ones for now, but could be expanded to
+ * - this is limited to active ones for now, but could be expanded to
*/
filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_ACTIVE | ANIMFILTER_FOREDIT);
items = ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
@@ -745,8 +745,8 @@ static int nlaedit_add_transition_exec(bContext *C, wmOperator *op)
if (IS_EQF(s1->end, s2->start))
continue;
/* make sure neither one is a transition
- * - although this is impossible to create with the standard tools,
- * the user may have altered the settings
+ * - although this is impossible to create with the standard tools,
+ * the user may have altered the settings
*/
if (ELEM(NLASTRIP_TYPE_TRANSITION, s1->type, s2->type))
continue;
@@ -762,9 +762,9 @@ static int nlaedit_add_transition_exec(bContext *C, wmOperator *op)
strip->type = NLASTRIP_TYPE_TRANSITION;
/* generic settings
- * - selected flag to highlight this to the user
- * - auto-blends to ensure that blend in/out values are automatically
- * determined by overlaps of strips
+ * - selected flag to highlight this to the user
+ * - auto-blends to ensure that blend in/out values are automatically
+ * determined by overlaps of strips
*/
strip->flag = NLASTRIP_FLAG_SELECT | NLASTRIP_FLAG_AUTO_BLENDS;
@@ -1062,8 +1062,8 @@ static int nlaedit_duplicate_exec(bContext *C, wmOperator *op)
/* in case there's no space in the track above, or we haven't got a reference to it yet, try adding */
if (BKE_nlatrack_add_strip(nlt->next, nstrip) == 0) {
/* need to add a new track above the one above the current one
- * - if the current one is the last one, nlt->next will be NULL, which defaults to adding
- * at the top of the stack anyway...
+ * - if the current one is the last one, nlt->next will be NULL, which defaults to adding
+ * at the top of the stack anyway...
*/
track = BKE_nlatrack_add(adt, nlt->next);
BKE_nlatrack_add_strip(track, nstrip);
@@ -1213,7 +1213,7 @@ static void nlaedit_split_strip_actclip(Main *bmain, AnimData *adt, NlaTrack *nl
float splitframe, splitaframe;
/* calculate the frames to do the splitting at
- * - use current frame if within extents of strip
+ * - use current frame if within extents of strip
*/
if ((cfra > strip->start) && (cfra < strip->end)) {
/* use the current frame */
@@ -1509,7 +1509,7 @@ static int nlaedit_swap_exec(bContext *C, wmOperator *op)
}
/* get two selected strips only (these will be metas due to prev step) to operate on
- * - only allow swapping 2, as with more the context becomes unclear
+ * - only allow swapping 2, as with more the context becomes unclear
*/
for (strip = nlt->strips.first; strip; strip = stripN) {
stripN = strip->next;
diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c
index 78e70b76564..bfc6138fb03 100644
--- a/source/blender/editors/space_nla/nla_ops.c
+++ b/source/blender/editors/space_nla/nla_ops.c
@@ -57,11 +57,11 @@ bool nlaop_poll_tweakmode_off(bContext *C)
Scene *scene;
/* for now, we check 2 things:
- * 1) active editor must be NLA
- * 2) tweakmode is currently set as a 'per-scene' flag
- * so that it will affect entire NLA data-sets,
- * but not all AnimData blocks will be in tweakmode for
- * various reasons
+ * 1) active editor must be NLA
+ * 2) tweakmode is currently set as a 'per-scene' flag
+ * so that it will affect entire NLA data-sets,
+ * but not all AnimData blocks will be in tweakmode for
+ * various reasons
*/
if (ED_operator_nla_active(C) == 0)
return 0;
@@ -79,11 +79,11 @@ bool nlaop_poll_tweakmode_on(bContext *C)
Scene *scene;
/* for now, we check 2 things:
- * 1) active editor must be NLA
- * 2) tweakmode is currently set as a 'per-scene' flag
- * so that it will affect entire NLA data-sets,
- * but not all AnimData blocks will be in tweakmode for
- * various reasons
+ * 1) active editor must be NLA
+ * 2) tweakmode is currently set as a 'per-scene' flag
+ * so that it will affect entire NLA data-sets,
+ * but not all AnimData blocks will be in tweakmode for
+ * various reasons
*/
if (ED_operator_nla_active(C) == 0)
return 0;
@@ -319,8 +319,8 @@ void nla_keymap(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "NLA_OT_properties", NKEY, KM_PRESS, 0, 0);
/* tweakmode
- * - enter and exit are separate operators with the same hotkey...
- * This works as they use different poll()'s
+ * - enter and exit are separate operators with the same hotkey...
+ * This works as they use different poll()'s
*/
WM_keymap_add_item(keymap, "NLA_OT_tweakmode_enter", TABKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "NLA_OT_tweakmode_exit", TABKEY, KM_PRESS, 0, 0);
@@ -340,10 +340,11 @@ void nla_keymap(wmKeyConfig *keyconf)
/* channels ---------------------------------------------------------- */
/* Channels are not directly handled by the NLA Editor module, but are inherited from the Animation module.
- * Most of the relevant operations, keymaps, drawing, etc. can therefore all be found in that module instead, as there
- * are many similarities with the other Animation Editors.
+ * Most of the relevant operations, keymaps, drawing, etc. can therefore all
+ * be found in that module instead, as there are many similarities with the other Animation Editors.
*
- * However, those operations which involve clicking on channels and/or the placement of them in the view are implemented here instead
+ * However, those operations which involve clicking on channels and/or
+ * the placement of them in the view are implemented here instead
*/
keymap = WM_keymap_ensure(keyconf, "NLA Channels", SPACE_NLA, 0);
nla_keymap_channels(keymap);
diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c
index 8c9372f0612..c1d62a9768d 100644
--- a/source/blender/editors/space_nla/nla_select.c
+++ b/source/blender/editors/space_nla/nla_select.c
@@ -79,9 +79,9 @@ static short selmodes_to_flagmodes(short sel)
/* ******************** Deselect All Operator ***************************** */
/* This operator works in one of three ways:
- * 1) (de)select all (AKEY) - test if select all or deselect all
- * 2) invert all (CTRL-IKEY) - invert selection of all keyframes
- * 3) (de)select all - no testing is done; only for use internal tools as normal function...
+ * 1) (de)select all (AKEY) - test if select all or deselect all
+ * 2) invert all (CTRL-IKEY) - invert selection of all keyframes
+ * 3) (de)select all - no testing is done; only for use internal tools as normal function...
*/
enum {
@@ -91,13 +91,13 @@ enum {
} /*eDeselectNlaStrips*/;
/* Deselects strips in the NLA Editor
- * - This is called by the deselect all operator, as well as other ones!
+ * - This is called by the deselect all operator, as well as other ones!
*
- * - test: check if select or deselect all (1) or clear all active (2)
- * - sel: how to select keyframes
- * 0 = deselect
- * 1 = select
- * 2 = invert
+ * - test: check if select or deselect all (1) or clear all active (2)
+ * - sel: how to select keyframes
+ * 0 = deselect
+ * 1 = select
+ * 2 = invert
*/
static void deselect_nla_strips(bAnimContext *ac, short test, short sel)
{
@@ -303,9 +303,9 @@ static int nlaedit_borderselect_exec(bContext *C, wmOperator *op)
/* selection 'mode' depends on whether borderselect region only matters on one axis */
if (RNA_boolean_get(op->ptr, "axis_range")) {
/* mode depends on which axis of the range is larger to determine which axis to use
- * - checking this in region-space is fine, as it's fundamentally still going to be a different rect size
- * - the frame-range select option is favored over the channel one (x over y), as frame-range one is often
- * used for tweaking timing when "blocking", while channels is not that useful...
+ * - checking this in region-space is fine, as it's fundamentally still going to be a different rect size
+ * - the frame-range select option is favored over the channel one (x over y), as frame-range one is often
+ * used for tweaking timing when "blocking", while channels is not that useful...
*/
if (BLI_rcti_size_x(&rect) >= BLI_rcti_size_y(&rect))
mode = NLA_BORDERSEL_FRAMERANGE;
@@ -545,7 +545,7 @@ static void mouse_nla_strips(bContext *C, bAnimContext *ac, const int mval[2], s
return;
}
else {
- /* found some channel - we only really should do somethign when its an Nla-Track */
+ /* found some channel - we only really should do something when its an Nla-Track */
if (ale->type == ANIMTYPE_NLATRACK) {
NlaTrack *nlt = (NlaTrack *)ale->data;
@@ -589,8 +589,8 @@ static void mouse_nla_strips(bContext *C, bAnimContext *ac, const int mval[2], s
ACHANNEL_SET_FLAG(strip, select_mode, NLASTRIP_FLAG_SELECT);
/* if we selected it, we can make it active too
- * - we always need to clear the active strip flag though...
- * - as well as selecting its track...
+ * - we always need to clear the active strip flag though...
+ * - as well as selecting its track...
*/
deselect_nla_strips(ac, DESELECT_STRIPS_CLEARACTIVE, 0);
diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c
index e4c59bc9508..efdec512cf7 100644
--- a/source/blender/editors/space_node/node_relationships.c
+++ b/source/blender/editors/space_node/node_relationships.c
@@ -1161,7 +1161,7 @@ static void node_join_attach_recursive(bNode *node, bNode *frame)
if (node->parent->done & NODE_JOIN_IS_DESCENDANT)
node->done |= NODE_JOIN_IS_DESCENDANT;
else if (node->flag & NODE_TEST) {
- /* if parent is not an decendant of the frame, reattach the node */
+ /* if parent is not an descendant of the frame, reattach the node */
nodeDetachNode(node);
nodeAttachNode(node, frame);
node->done |= NODE_JOIN_IS_DESCENDANT;
@@ -1327,7 +1327,7 @@ static void node_detach_recursive(bNode *node)
if (node->parent->done & NODE_DETACH_IS_DESCENDANT)
node->done |= NODE_DETACH_IS_DESCENDANT;
else if (node->flag & NODE_SELECT) {
- /* if parent is not a decendant of a selected node, detach */
+ /* if parent is not a descendant of a selected node, detach */
nodeDetachNode(node);
node->done |= NODE_DETACH_IS_DESCENDANT;
}
@@ -1590,7 +1590,7 @@ static void node_link_insert_offset_frame_chains(
/**
* Callback that applies NodeInsertOfsData.offset_x to a node or its parent,
- * considering the logic needed for offseting nodes after link insert
+ * considering the logic needed for offsetting nodes after link insert
*/
static bool node_link_insert_offset_chain_cb(
bNode *fromnode, bNode *tonode,
@@ -1648,7 +1648,7 @@ static void node_link_insert_offset_ntree(
/* insert->totr isn't updated yet, so totr_insert is used to get the correct worldspace coords */
node_to_updated_rect(insert, &totr_insert);
- /* frame attachement was't handled yet so we search the frame that the node will be attached to later */
+ /* frame attachment wasn't handled yet so we search the frame that the node will be attached to later */
insert->parent = node_find_frame_to_attach(ar, ntree, mouse_xy);
/* this makes sure nodes are also correctly offset when inserting a node on top of a frame
diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c
index ef9ead3407c..c45a5c650ee 100644
--- a/source/blender/editors/space_node/node_templates.c
+++ b/source/blender/editors/space_node/node_templates.c
@@ -375,7 +375,7 @@ static void ui_node_link(bContext *C, void *arg_p, void *event_p)
bNode *node_to = arg->node;
bNodeSocket *sock_to = arg->sock;
bNodeTree *ntree = arg->ntree;
- int event = GET_INT_FROM_POINTER(event_p);
+ int event = POINTER_AS_INT(event_p);
if (event == UI_NODE_LINK_DISCONNECT)
node_socket_disconnect(bmain, ntree, node_to, sock_to);
@@ -581,11 +581,11 @@ static void ui_template_node_link_menu(bContext *C, uiLayout *layout, void *but_
but = uiDefBut(block, UI_BTYPE_BUT, 0, IFACE_("Remove"), 0, 0, UI_UNIT_X * 4, UI_UNIT_Y,
NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Remove nodes connected to the input"));
- UI_but_funcN_set(but, ui_node_link, MEM_dupallocN(arg), SET_INT_IN_POINTER(UI_NODE_LINK_REMOVE));
+ UI_but_funcN_set(but, ui_node_link, MEM_dupallocN(arg), POINTER_FROM_INT(UI_NODE_LINK_REMOVE));
but = uiDefBut(block, UI_BTYPE_BUT, 0, IFACE_("Disconnect"), 0, 0, UI_UNIT_X * 4, UI_UNIT_Y,
NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Disconnect nodes connected to the input"));
- UI_but_funcN_set(but, ui_node_link, MEM_dupallocN(arg), SET_INT_IN_POINTER(UI_NODE_LINK_DISCONNECT));
+ UI_but_funcN_set(but, ui_node_link, MEM_dupallocN(arg), POINTER_FROM_INT(UI_NODE_LINK_DISCONNECT));
}
ui_node_menu_column(arg, NODE_CLASS_GROUP, N_("Group"));
diff --git a/source/blender/editors/space_node/node_view.c b/source/blender/editors/space_node/node_view.c
index 00eab0c69c1..22df2586a7b 100644
--- a/source/blender/editors/space_node/node_view.c
+++ b/source/blender/editors/space_node/node_view.c
@@ -193,7 +193,7 @@ void NODE_OT_view_selected(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-/* **************** Backround Image Operators ************** */
+/* **************** Background Image Operators ************** */
typedef struct NodeViewMove {
int mvalo[2];
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index a35dffc0fcc..3f3e3c89103 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -967,7 +967,7 @@ static void outliner_buttons(const bContext *C, uiBlock *block, ARegion *ar, Tre
if (false == UI_but_active_only(C, ar, block, bt)) {
tselem->flag &= ~TSE_TEXTBUT;
- /* bad! (notifier within draw) without this, we don't get a refesh */
+ /* bad! (notifier within draw) without this, we don't get a refresh */
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_OUTLINER, NULL);
}
}
@@ -1460,8 +1460,8 @@ static void outliner_draw_tree_element(
glEnable(GL_BLEND);
/* start by highlighting search matches
- * we don't expand items when searching in the datablocks but we
- * still want to highlight any filter matches.
+ * we don't expand items when searching in the datablocks but we
+ * still want to highlight any filter matches.
*/
if ((SEARCHING_OUTLINER(soops) || (soops->outlinevis == SO_DATABLOCKS && soops->search_string[0] != 0)) &&
(tselem->flag & TSE_SEARCHMATCH))
@@ -1845,9 +1845,9 @@ void draw_outliner(const bContext *C)
if (ELEM(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF)) {
/* RNA has two columns:
- * - column 1 is (max_width + OL_RNA_COL_SPACEX) or
- * (OL_RNA_COL_X), whichever is wider...
- * - column 2 is fixed at OL_RNA_COL_SIZEX
+ * - column 1 is (max_width + OL_RNA_COL_SPACEX) or
+ * (OL_RNA_COL_X), whichever is wider...
+ * - column 2 is fixed at OL_RNA_COL_SIZEX
*
* (*) XXX max width for now is a fixed factor of (UI_UNIT_X * (max_indention + 100))
*/
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index 3708b653ec4..51117eef1dc 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -509,7 +509,6 @@ void OUTLINER_OT_id_remap(wmOperatorType *ot)
/* identifiers */
ot->name = "Outliner ID data Remap";
ot->idname = "OUTLINER_OT_id_remap";
- ot->description = "";
/* callbacks */
ot->invoke = outliner_id_remap_invoke;
@@ -1466,18 +1465,18 @@ static void tree_element_to_path(TreeElement *te, TreeStoreElem *tselem,
char *newpath = NULL;
/* optimize tricks:
- * - Don't do anything if the selected item is a 'struct', but arrays are allowed
+ * - Don't do anything if the selected item is a 'struct', but arrays are allowed
*/
if (tselem->type == TSE_RNA_STRUCT)
return;
/* Overview of Algorithm:
- * 1. Go up the chain of parents until we find the 'root', taking note of the
- * levels encountered in reverse-order (i.e. items are added to the start of the list
- * for more convenient looping later)
- * 2. Walk down the chain, adding from the first ID encountered
- * (which will become the 'ID' for the KeyingSet Path), and build a
- * path as we step through the chain
+ * 1. Go up the chain of parents until we find the 'root', taking note of the
+ * levels encountered in reverse-order (i.e. items are added to the start of the list
+ * for more convenient looping later)
+ * 2. Walk down the chain, adding from the first ID encountered
+ * (which will become the 'ID' for the KeyingSet Path), and build a
+ * path as we step through the chain
*/
/* step 1: flatten out hierarchy of parents into a flat chain */
diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h
index 49647a0d838..dabb95e9d2b 100644
--- a/source/blender/editors/space_outliner/outliner_intern.h
+++ b/source/blender/editors/space_outliner/outliner_intern.h
@@ -122,7 +122,7 @@ typedef enum {
#define SEARCHING_OUTLINER(sov) (sov->search_flags & SO_SEARCH_RECURSIVE)
-/* is the currrent element open? if so we also show children */
+/* is the current element open? if so we also show children */
#define TSELEM_OPEN(telm, sv) ( (telm->flag & TSE_CLOSED) == 0 || (SEARCHING_OUTLINER(sv) && (telm->flag & TSE_CHILDSEARCH)) )
/* outliner_tree.c ----------------------------------------------- */
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index 2707e130598..9c21241cf7b 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -1025,7 +1025,6 @@ void OUTLINER_OT_object_operation(wmOperatorType *ot)
/* identifiers */
ot->name = "Outliner Object Operation";
ot->idname = "OUTLINER_OT_object_operation";
- ot->description = "";
/* callbacks */
ot->invoke = WM_menu_invoke;
@@ -1128,7 +1127,6 @@ void OUTLINER_OT_group_operation(wmOperatorType *ot)
/* identifiers */
ot->name = "Outliner Group Operation";
ot->idname = "OUTLINER_OT_group_operation";
- ot->description = "";
/* callbacks */
ot->invoke = WM_menu_invoke;
@@ -1323,7 +1321,6 @@ void OUTLINER_OT_id_operation(wmOperatorType *ot)
/* identifiers */
ot->name = "Outliner ID data Operation";
ot->idname = "OUTLINER_OT_id_operation";
- ot->description = "";
/* callbacks */
ot->invoke = WM_menu_invoke;
@@ -1418,7 +1415,6 @@ void OUTLINER_OT_lib_operation(wmOperatorType *ot)
/* identifiers */
ot->name = "Outliner Library Operation";
ot->idname = "OUTLINER_OT_lib_operation";
- ot->description = "";
/* callbacks */
ot->invoke = WM_menu_invoke;
@@ -1642,7 +1638,6 @@ void OUTLINER_OT_animdata_operation(wmOperatorType *ot)
/* identifiers */
ot->name = "Outliner Animation Data Operation";
ot->idname = "OUTLINER_OT_animdata_operation";
- ot->description = "";
/* callbacks */
ot->invoke = WM_menu_invoke;
@@ -1688,7 +1683,6 @@ void OUTLINER_OT_constraint_operation(wmOperatorType *ot)
/* identifiers */
ot->name = "Outliner Constraint Operation";
ot->idname = "OUTLINER_OT_constraint_operation";
- ot->description = "";
/* callbacks */
ot->invoke = WM_menu_invoke;
@@ -1734,7 +1728,6 @@ void OUTLINER_OT_modifier_operation(wmOperatorType *ot)
/* identifiers */
ot->name = "Outliner Modifier Operation";
ot->idname = "OUTLINER_OT_modifier_operation";
- ot->description = "";
/* callbacks */
ot->invoke = WM_menu_invoke;
@@ -1832,7 +1825,6 @@ void OUTLINER_OT_data_operation(wmOperatorType *ot)
/* identifiers */
ot->name = "Outliner Data Operation";
ot->idname = "OUTLINER_OT_data_operation";
- ot->description = "";
/* callbacks */
ot->invoke = WM_menu_invoke;
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index 173b48cc731..e8106f8038e 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -930,7 +930,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
tselem->flag |= TSE_CHILDSEARCH;
te->parent = parent;
- te->index = index; // for data arays
+ te->index = index; // for data arrays
if (ELEM(type, TSE_SEQUENCE, TSE_SEQ_STRIP, TSE_SEQUENCE_DUP)) {
/* pass */
}
@@ -1090,7 +1090,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
int a, tot;
- /* we do lazy build, for speed and to avoid infinite recusion */
+ /* we do lazy build, for speed and to avoid infinite recursion */
if (ptr->data == NULL) {
te->name = IFACE_("(empty)");
@@ -1458,7 +1458,7 @@ static int treesort_alpha(const void *v1, const void *v2)
}
-/* this is nice option for later? doesnt look too useful... */
+/* this is nice option for later? doesn't look too useful... */
#if 0
static int treesort_obtype_alpha(const void *v1, const void *v2)
{
@@ -1592,10 +1592,10 @@ static int outliner_filter_tree(SpaceOops *soops, ListBase *lb)
if (!outliner_filter_has_name(te, search_string, soops->search_flags)) {
/* item isn't something we're looking for, but...
- * - if the subtree is expanded, check if there are any matches that can be easily found
- * so that searching for "cu" in the default scene will still match the Cube
- * - otherwise, we can't see within the subtree and the item doesn't match,
- * so these can be safely ignored (i.e. the subtree can get freed)
+ * - if the subtree is expanded, check if there are any matches that can be easily found
+ * so that searching for "cu" in the default scene will still match the Cube
+ * - otherwise, we can't see within the subtree and the item doesn't match,
+ * so these can be safely ignored (i.e. the subtree can get freed)
*/
tselem = TREESTORE(te);
diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c
index 6bfb51d07c6..5a761d1cabf 100644
--- a/source/blender/editors/space_script/script_edit.c
+++ b/source/blender/editors/space_script/script_edit.c
@@ -125,7 +125,7 @@ static int script_reload_exec(bContext *C, wmOperator *op)
/* TODO, this crashes on netrender and keying sets, need to look into why
* disable for now unless running in debug mode */
WM_cursor_wait(1);
- BPY_execute_string(C, "__import__('bpy').utils.load_scripts(reload_scripts=True)");
+ BPY_execute_string(C, (const char *[]){"bpy", NULL}, "bpy.utils.load_scripts(reload_scripts=True)");
WM_cursor_wait(0);
WM_event_add_notifier(C, NC_WINDOW, NULL);
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index b3e1d3be42a..386e66a63e0 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -166,7 +166,7 @@ static void sequencer_generic_invoke_xy__internal(bContext *C, wmOperator *op, i
RNA_int_set(op->ptr, "frame_start", cfra);
if ((flag & SEQPROP_ENDFRAME) && RNA_struct_property_is_set(op->ptr, "frame_end") == 0)
- RNA_int_set(op->ptr, "frame_end", cfra + 25); // XXX arbitary but ok for now.
+ RNA_int_set(op->ptr, "frame_end", cfra + 25); // XXX arbitrary but ok for now.
if (!(flag & SEQPROP_NOPATHS)) {
sequencer_generic_invoke_path__internal(C, op, "filepath");
@@ -650,13 +650,13 @@ static int sequencer_add_movie_strip_invoke(bContext *C, wmOperator *op, const w
Editing *ed = BKE_sequencer_editing_get(scene, false);
/* only enable "use_framerate" if there aren't any existing strips
- * - When there are no strips yet, there is no harm in enabling this,
- * and it makes the single-strip case really nice for casual users
- * - When there are strips, it's best we don't touch the framerate,
- * as all hell may break loose (e.g. audio strips start overlapping
- * and can't be restored)
- * - These initial guesses can still be manually overridden by users
- * from the modal options panel
+ * - When there are no strips yet, there is no harm in enabling this,
+ * and it makes the single-strip case really nice for casual users
+ * - When there are strips, it's best we don't touch the framerate,
+ * as all hell may break loose (e.g. audio strips start overlapping
+ * and can't be restored)
+ * - These initial guesses can still be manually overridden by users
+ * from the modal options panel
*/
if (ed && ed->seqbasep && ed->seqbasep->first) {
RNA_boolean_set(op->ptr, "use_framerate", false);
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index cae626cd1f4..04cb5c7a37c 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -558,7 +558,7 @@ int seq_effect_find_selected(Scene *scene, Sequence *activeseq, int type, Sequen
switch (BKE_sequence_effect_get_num_inputs(type)) {
case 0:
*selseq1 = *selseq2 = *selseq3 = NULL;
- return 1; /* succsess */
+ return 1; /* success */
case 1:
if (seq2 == NULL) {
*error_str = N_("At least one selected sequence strip is needed");
@@ -1394,7 +1394,7 @@ static int sequencer_slip_invoke(bContext *C, wmOperator *op, const wmEvent *eve
int num_seq, i;
View2D *v2d = UI_view2d_fromcontext(C);
- /* first recursively cound the trimmed elements */
+ /* first recursively count the trimmed elements */
num_seq = slip_count_sequences_rec(ed->seqbasep, true);
if (num_seq == 0)
@@ -1504,7 +1504,7 @@ static int sequencer_slip_exec(bContext *C, wmOperator *op)
int offset = RNA_int_get(op->ptr, "offset");
bool success = false;
- /* first recursively cound the trimmed elements */
+ /* first recursively count the trimmed elements */
num_seq = slip_count_sequences_rec(ed->seqbasep, true);
if (num_seq == 0)
@@ -2673,7 +2673,7 @@ static int sequencer_meta_separate_exec(bContext *C, wmOperator *UNUSED(op))
BLI_remlink(ed->seqbasep, last_seq);
BKE_sequence_free(scene, last_seq);
- /* emtpy meta strip, delete all effects depending on it */
+ /* empty meta strip, delete all effects depending on it */
for (seq = ed->seqbasep->first; seq; seq = seq->next)
if ((seq->type & SEQ_TYPE_EFFECT) && seq_depends_on_meta(seq, last_seq))
seq->flag |= SEQ_FLAG_DELETE;
@@ -3288,7 +3288,6 @@ void SEQUENCER_OT_copy(wmOperatorType *ot)
/* identifiers */
ot->name = "Copy";
ot->idname = "SEQUENCER_OT_copy";
- ot->description = "";
/* api callbacks */
ot->exec = sequencer_copy_exec;
@@ -3353,7 +3352,6 @@ void SEQUENCER_OT_paste(wmOperatorType *ot)
/* identifiers */
ot->name = "Paste";
ot->idname = "SEQUENCER_OT_paste";
- ot->description = "";
/* api callbacks */
ot->exec = sequencer_paste_exec;
@@ -3683,7 +3681,6 @@ void SEQUENCER_OT_change_effect_input(struct wmOperatorType *ot)
/* identifiers */
ot->name = "Change Effect Input";
ot->idname = "SEQUENCER_OT_change_effect_input";
- ot->description = "";
/* api callbacks */
ot->exec = sequencer_change_effect_input_exec;
@@ -3743,7 +3740,6 @@ void SEQUENCER_OT_change_effect_type(struct wmOperatorType *ot)
/* identifiers */
ot->name = "Change Effect Type";
ot->idname = "SEQUENCER_OT_change_effect_type";
- ot->description = "";
/* api callbacks */
ot->exec = sequencer_change_effect_type_exec;
@@ -3878,7 +3874,6 @@ void SEQUENCER_OT_change_path(struct wmOperatorType *ot)
/* identifiers */
ot->name = "Change Data/Files";
ot->idname = "SEQUENCER_OT_change_path";
- ot->description = "";
/* api callbacks */
ot->exec = sequencer_change_path_exec;
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index 88ad2cad3e9..e01c7994329 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -1150,7 +1150,7 @@ static bool select_grouped_effect_link(Editing *ed, Sequence *actseq, const int
}
SEQ_END;
- actseq->tmp = SET_INT_IN_POINTER(true);
+ actseq->tmp = POINTER_FROM_INT(true);
for (BKE_sequence_iterator_begin(ed, &iter, true); iter.valid; BKE_sequence_iterator_next(&iter)) {
seq = iter.seq;
@@ -1166,7 +1166,7 @@ static bool select_grouped_effect_link(Editing *ed, Sequence *actseq, const int
continue;
}
- /* If the seq is an effect one, we need extra cheking! */
+ /* If the seq is an effect one, we need extra checking! */
if (SEQ_IS_EFFECT(seq) && ((seq->seq1 && seq->seq1->tmp) ||
(seq->seq2 && seq->seq2->tmp) ||
(seq->seq3 && seq->seq3->tmp)))
@@ -1175,7 +1175,7 @@ static bool select_grouped_effect_link(Editing *ed, Sequence *actseq, const int
if (enddisp < seq->enddisp) enddisp = seq->enddisp;
if (machine < seq->machine) machine = seq->machine;
- seq->tmp = SET_INT_IN_POINTER(true);
+ seq->tmp = POINTER_FROM_INT(true);
seq->flag |= SELECT;
changed = true;
@@ -1185,7 +1185,7 @@ static bool select_grouped_effect_link(Editing *ed, Sequence *actseq, const int
BKE_sequence_iterator_begin(ed, &iter, true);
}
- /* Video strips bellow active one, or any strip for audio (order do no matters here!). */
+ /* Video strips below active one, or any strip for audio (order do no matters here!). */
else if (seq->machine < machine || is_audio) {
seq->flag |= SELECT;
changed = true;
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index ebeeef19191..b87d878e057 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -627,7 +627,7 @@ static void sequencer_preview_region_listener(bScreen *UNUSED(sc), ScrArea *UNUS
case NC_ANIMATION:
switch (wmn->data) {
case ND_KEYFRAME:
- /* Otherwise, often prevents seing immediately effects of keyframe editing... */
+ /* Otherwise, often prevents seeing immediately effects of keyframe editing... */
BKE_sequencer_cache_cleanup();
ED_region_tag_redraw(ar);
break;
diff --git a/source/blender/editors/space_text/text_format_lua.c b/source/blender/editors/space_text/text_format_lua.c
index 8b6ec2d804b..2a92f9a4d7d 100644
--- a/source/blender/editors/space_text/text_format_lua.c
+++ b/source/blender/editors/space_text/text_format_lua.c
@@ -69,7 +69,7 @@ static int txtfmt_lua_find_keyword(const char *string)
else if (STR_LITERAL_STARTSWITH(string, "while", len)) i = len;
else i = 0;
- /* If next source char is an identifier (eg. 'i' in "definate") no match */
+ /* If next source char is an identifier (eg. 'i' in "definite") no match */
if (i == 0 || text_check_identifier(string[i]))
return -1;
return i;
@@ -120,7 +120,7 @@ static int txtfmt_lua_find_specialvar(const char *string)
else if (STR_LITERAL_STARTSWITH(string, "xpcall", len)) i = len;
else i = 0;
- /* If next source char is an identifier (eg. 'i' in "definate") no match */
+ /* If next source char is an identifier (eg. 'i' in "definite") no match */
if (i == 0 || text_check_identifier(string[i]))
return -1;
return i;
diff --git a/source/blender/editors/space_text/text_format_osl.c b/source/blender/editors/space_text/text_format_osl.c
index 2daaaa348e6..2b2dfef72d3 100644
--- a/source/blender/editors/space_text/text_format_osl.c
+++ b/source/blender/editors/space_text/text_format_osl.c
@@ -66,7 +66,7 @@ static int txtfmt_osl_find_builtinfunc(const char *string)
else if (STR_LITERAL_STARTSWITH(string, "while", len)) i = len;
else i = 0;
- /* If next source char is an identifier (eg. 'i' in "definate") no match */
+ /* If next source char is an identifier (eg. 'i' in "definite") no match */
if (i == 0 || text_check_identifier(string[i]))
return -1;
return i;
@@ -116,7 +116,7 @@ static int txtfmt_osl_find_reserved(const char *string)
else if (STR_LITERAL_STARTSWITH(string, "volatile", len)) i = len;
else i = 0;
- /* If next source char is an identifier (eg. 'i' in "definate") no match */
+ /* If next source char is an identifier (eg. 'i' in "definite") no match */
if (i == 0 || text_check_identifier(string[i]))
return -1;
return i;
@@ -140,7 +140,7 @@ static int txtfmt_osl_find_specialvar(const char *string)
else if (STR_LITERAL_STARTSWITH(string, "displacement", len)) i = len;
else i = 0;
- /* If next source char is an identifier (eg. 'i' in "definate") no match */
+ /* If next source char is an identifier (eg. 'i' in "definite") no match */
if (i == 0 || text_check_identifier(string[i]))
return -1;
return i;
diff --git a/source/blender/editors/space_text/text_format_pov.c b/source/blender/editors/space_text/text_format_pov.c
index 4c9abecedd6..f6b6d4f8d42 100644
--- a/source/blender/editors/space_text/text_format_pov.c
+++ b/source/blender/editors/space_text/text_format_pov.c
@@ -83,7 +83,7 @@ static int txtfmt_pov_find_keyword(const char *string)
else if (STR_LITERAL_STARTSWITH(string, "if", len)) i = len;
else i = 0;
- /* If next source char is an identifier (eg. 'i' in "definate") no match */
+ /* If next source char is an identifier (eg. 'i' in "definite") no match */
return (i == 0 || text_check_identifier(string[i])) ? -1 : i;
}
@@ -236,7 +236,7 @@ static int txtfmt_pov_find_reserved_keywords(const char *string)
else if (STR_LITERAL_STARTSWITH(string, "str", len)) i = len;
else i = 0;
- /* If next source char is an identifier (eg. 'i' in "definate") no match */
+ /* If next source char is an identifier (eg. 'i' in "definite") no match */
return (i == 0 || text_check_identifier(string[i])) ? -1 : i;
}
@@ -466,7 +466,7 @@ static int txtfmt_pov_find_reserved_builtins(const char *string)
else if (STR_LITERAL_STARTSWITH(string, "z", len)) i = len;
else i = 0;
- /* If next source char is an identifier (eg. 'i' in "definate") no match */
+ /* If next source char is an identifier (eg. 'i' in "definite") no match */
return (i == 0 || text_check_identifier(string[i])) ? -1 : i;
}
@@ -683,7 +683,7 @@ static int txtfmt_pov_find_specialvar(const char *string)
else if (STR_LITERAL_STARTSWITH(string, "gall", len)) i = len;
else i = 0;
- /* If next source char is an identifier (eg. 'i' in "definate") no match */
+ /* If next source char is an identifier (eg. 'i' in "definite") no match */
return (i == 0 || text_check_identifier(string[i])) ? -1 : i;
}
diff --git a/source/blender/editors/space_text/text_format_pov_ini.c b/source/blender/editors/space_text/text_format_pov_ini.c
index 453dd1d748c..ae7d784dffc 100644
--- a/source/blender/editors/space_text/text_format_pov_ini.c
+++ b/source/blender/editors/space_text/text_format_pov_ini.c
@@ -93,7 +93,7 @@ static int txtfmt_ini_find_keyword(const char *string)
else i = 0;
- /* If next source char is an identifier (eg. 'i' in "definate") no match */
+ /* If next source char is an identifier (eg. 'i' in "definite") no match */
return (i == 0 || text_check_identifier(string[i])) ? -1 : i;
}
@@ -299,7 +299,7 @@ static int txtfmt_ini_find_reserved(const char *string)
else i = 0;
- /* If next source char is an identifier (eg. 'i' in "definate") no match */
+ /* If next source char is an identifier (eg. 'i' in "definite") no match */
return (i == 0 || text_check_identifier(string[i])) ? -1 : i;
}
diff --git a/source/blender/editors/space_text/text_format_py.c b/source/blender/editors/space_text/text_format_py.c
index 2f6962f0493..50bad9c07cf 100644
--- a/source/blender/editors/space_text/text_format_py.c
+++ b/source/blender/editors/space_text/text_format_py.c
@@ -62,6 +62,8 @@ static int txtfmt_py_find_builtinfunc(const char *string)
if (STR_LITERAL_STARTSWITH(string, "and", len)) i = len;
else if (STR_LITERAL_STARTSWITH(string, "as", len)) i = len;
else if (STR_LITERAL_STARTSWITH(string, "assert", len)) i = len;
+ else if (STR_LITERAL_STARTSWITH(string, "async", len)) i = len;
+ else if (STR_LITERAL_STARTSWITH(string, "await", len)) i = len;
else if (STR_LITERAL_STARTSWITH(string, "break", len)) i = len;
else if (STR_LITERAL_STARTSWITH(string, "continue", len)) i = len;
else if (STR_LITERAL_STARTSWITH(string, "del", len)) i = len;
@@ -89,7 +91,7 @@ static int txtfmt_py_find_builtinfunc(const char *string)
else if (STR_LITERAL_STARTSWITH(string, "yield", len)) i = len;
else i = 0;
- /* If next source char is an identifier (eg. 'i' in "definate") no match */
+ /* If next source char is an identifier (eg. 'i' in "definite") no match */
if (i == 0 || text_check_identifier(string[i]))
return -1;
return i;
@@ -110,7 +112,7 @@ static int txtfmt_py_find_specialvar(const char *string)
else if (STR_LITERAL_STARTSWITH(string, "class", len)) i = len;
else i = 0;
- /* If next source char is an identifier (eg. 'i' in "definate") no match */
+ /* If next source char is an identifier (eg. 'i' in "definite") no match */
if (i == 0 || text_check_identifier(string[i]))
return -1;
return i;
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index c8e9167edf9..c483aa180db 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -2305,7 +2305,6 @@ void TEXT_OT_scroll(wmOperatorType *ot)
* scroll_bar. Both do basically the same thing (aside
* from keymaps).*/
ot->idname = "TEXT_OT_scroll";
- ot->description = "";
/* api callbacks */
ot->exec = text_scroll_exec;
@@ -2397,7 +2396,6 @@ void TEXT_OT_scroll_bar(wmOperatorType *ot)
* scroll. Both do basically the same thing (aside
* from keymaps).*/
ot->idname = "TEXT_OT_scroll_bar";
- ot->description = "";
/* api callbacks */
ot->invoke = text_scroll_bar_invoke;
@@ -3194,7 +3192,7 @@ static int text_resolve_conflict_invoke(bContext *C, wmOperator *op, const wmEve
switch (BKE_text_file_modified_check(text)) {
case 1:
if (text->flags & TXT_ISDIRTY) {
- /* modified locally and externally, ahhh. offer more possibilites. */
+ /* modified locally and externally, ahhh. offer more possibilities. */
pup = UI_popup_menu_begin(C, IFACE_("File Modified Outside and Inside Blender"), ICON_NONE);
layout = UI_popup_menu_layout(pup);
uiItemEnumO_ptr(layout, op->type, IFACE_("Reload from disk (ignore local changes)"),
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c
index e3fe124a5c4..29cc5bafb17 100644
--- a/source/blender/editors/space_time/space_time.c
+++ b/source/blender/editors/space_time/space_time.c
@@ -337,9 +337,9 @@ static void time_draw_idblock_keyframes(View2D *v2d, ID *id, short onlysel)
BLI_dlrbTree_linkedlist_sync(&keys);
/* start drawing keyframes
- * - we use the binary-search capabilities of the tree to only start from
- * the first visible keyframe (last one can then be easily checked)
- * - draw within a single GL block to be faster
+ * - we use the binary-search capabilities of the tree to only start from
+ * the first visible keyframe (last one can then be easily checked)
+ * - draw within a single GL block to be faster
*/
glBegin(GL_LINES);
for (ak = time_cfra_find_ak(keys.root, v2d->cur.xmin);
@@ -430,8 +430,8 @@ static void time_draw_keyframes(const bContext *C, ARegion *ar)
}
/* draw scene keyframes first
- * - don't try to do this when only drawing active/selected data keyframes,
- * since this can become quite slow
+ * - don't try to do this when only drawing active/selected data keyframes,
+ * since this can become quite slow
*/
if (onlysel == 0) {
/* set draw color */
@@ -440,9 +440,9 @@ static void time_draw_keyframes(const bContext *C, ARegion *ar)
}
/* draw keyframes from selected objects
- * - only do the active object if in posemode (i.e. showing only keyframes for the bones)
- * OR the onlysel flag was set, which means that only active object's keyframes should
- * be considered
+ * - only do the active object if in posemode (i.e. showing only keyframes for the bones)
+ * OR the onlysel flag was set, which means that only active object's keyframes should
+ * be considered
*/
UI_ThemeColor(TH_TIME_KEYFRAME);
diff --git a/source/blender/editors/space_view3d/drawanimviz.c b/source/blender/editors/space_view3d/drawanimviz.c
index ba75ae6f766..e2e71207738 100644
--- a/source/blender/editors/space_view3d/drawanimviz.c
+++ b/source/blender/editors/space_view3d/drawanimviz.c
@@ -150,8 +150,8 @@ static void set_motion_path_color(Scene *scene, bMotionPath *mpath, int i, short
}
/* Draw the given motion path for an Object or a Bone
- * - assumes that the viewport has already been initialized properly
- * i.e. draw_motion_paths_init() has been called
+ * - assumes that the viewport has already been initialized properly
+ * i.e. draw_motion_paths_init() has been called
*/
void draw_motion_path_instance(Scene *scene,
Object *ob, bPoseChannel *pchan, bAnimVizSettings *avs, bMotionPath *mpath)
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index bbda002eb8d..ec15725d635 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -486,7 +486,7 @@ static void draw_bone_octahedral(void)
displist = glGenLists(1);
glNewList(displist, GL_COMPILE);
- /* Section 1, sides */
+ /* Section 1, sides */
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(3, GL_FLOAT, 0, bone_octahedral_verts);
glDrawElements(GL_LINE_LOOP,
@@ -494,7 +494,7 @@ static void draw_bone_octahedral(void)
GL_UNSIGNED_INT,
bone_octahedral_wire_sides);
- /* Section 1, square */
+ /* Section 1, square */
glDrawElements(GL_LINE_LOOP,
sizeof(bone_octahedral_wire_square) / sizeof(*bone_octahedral_wire_square),
GL_UNSIGNED_INT,
@@ -550,7 +550,7 @@ static void draw_bone_solid_octahedral(void)
static void draw_bone_points(const short dt, int armflag, unsigned int boneflag, int id)
{
- /* Draw root point if we are not connected */
+ /* Draw root point if we are not connected */
if ((boneflag & BONE_CONNECTED) == 0) {
if (id != -1)
GPU_select_load_id(id | BONESEL_ROOT);
@@ -574,7 +574,7 @@ static void draw_bone_points(const short dt, int armflag, unsigned int boneflag,
draw_bonevert();
}
- /* Draw tip point */
+ /* Draw tip point */
if (id != -1)
GPU_select_load_id(id | BONESEL_TIP);
@@ -786,7 +786,7 @@ static void draw_sphere_bone_wire(float smat[4][4], float imat[4][4],
else if (armflag & ARM_POSEMODE)
set_pchan_glColor(PCHAN_COLOR_NORMAL, boneflag, constflag);
- /* Draw root point if we are not connected */
+ /* Draw root point if we are not connected */
if ((boneflag & BONE_CONNECTED) == 0) {
if (id != -1)
GPU_select_load_id(id | BONESEL_ROOT);
@@ -794,7 +794,7 @@ static void draw_sphere_bone_wire(float smat[4][4], float imat[4][4],
drawcircball(GL_LINE_LOOP, headvec, head, imat);
}
- /* Draw tip point */
+ /* Draw tip point */
if (armflag & ARM_EDITMODE) {
if (boneflag & BONE_TIPSEL) UI_ThemeColor(TH_VERTEX_SELECT);
else UI_ThemeColor(TH_VERTEX);
@@ -904,14 +904,14 @@ static void draw_sphere_bone(const short dt, int armflag, int boneflag, short co
else if (dt == OB_SOLID)
UI_ThemeColorShade(TH_BONE_SOLID, -30);
- /* Draw root point if we are not connected */
+ /* Draw root point if we are not connected */
if ((boneflag & BONE_CONNECTED) == 0) {
if (id != -1)
GPU_select_load_id(id | BONESEL_ROOT);
gluSphere(qobj, head, 16, 10);
}
- /* Draw tip point */
+ /* Draw tip point */
if (armflag & ARM_EDITMODE) {
if (boneflag & BONE_TIPSEL) UI_ThemeColor(TH_VERTEX_SELECT);
else UI_ThemeColorShade(TH_BONE_SOLID, -30);
@@ -1011,7 +1011,7 @@ static void draw_line_bone(int armflag, int boneflag, short constflag, unsigned
UI_ThemeColor(TH_WIRE_EDIT);
}
- /* Draw root point if we are not connected */
+ /* Draw root point if we are not connected */
if ((boneflag & BONE_CONNECTED) == 0) {
if (G.f & G_PICKSEL) {
GPU_select_load_id(id | BONESEL_ROOT);
@@ -2024,7 +2024,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
}
/* Draw a line to IK root bone
- * - only if temporary chain (i.e. "autoik")
+ * - only if temporary chain (i.e. "autoik")
*/
if (arm->flag & ARM_POSEMODE) {
if (constflag & PCHAN_HAS_IK) {
@@ -2154,7 +2154,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
view3d_cached_text_draw_add(vec, pchan->name, strlen(pchan->name), 10, 0, col);
}
- /* Draw additional axes on the bone tail */
+ /* Draw additional axes on the bone tail */
if ((arm->flag & ARM_DRAWAXES) && (arm->flag & ARM_POSEMODE)) {
glPushMatrix();
copy_m4_m4(bmat, pchan->pose_mat);
@@ -2357,12 +2357,12 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, const short dt)
UI_GetThemeColor3ubv((eBone->flag & BONE_SELECTED) ? TH_TEXT_HI : TH_TEXT, col);
- /* Draw name */
+ /* Draw name */
if (arm->flag & ARM_DRAWNAMES) {
mid_v3_v3v3(vec, eBone->head, eBone->tail);
view3d_cached_text_draw_add(vec, eBone->name, strlen(eBone->name), 10, 0, col);
}
- /* Draw additional axes */
+ /* Draw additional axes */
if (arm->flag & ARM_DRAWAXES) {
glPushMatrix();
get_matrix_editbone(eBone, bmat);
@@ -2392,7 +2392,7 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, const short dt)
/* ---------- Paths --------- */
/* draw bone paths
- * - in view space
+ * - in view space
*/
static void draw_pose_paths(Scene *scene, View3D *v3d, ARegion *ar, Object *ob)
{
@@ -2512,7 +2512,7 @@ static void draw_ghost_poses_range(Scene *scene, View3D *v3d, ARegion *ar, Base
}
/* draw ghosts on keyframes in action within range
- * - object should be in posemode
+ * - object should be in posemode
*/
static void draw_ghost_poses_keys(Scene *scene, View3D *v3d, ARegion *ar, Base *base)
{
@@ -2593,7 +2593,7 @@ static void draw_ghost_poses_keys(Scene *scene, View3D *v3d, ARegion *ar, Base *
}
/* draw ghosts around current frame
- * - object is supposed to be armature in posemode
+ * - object is supposed to be armature in posemode
*/
static void draw_ghost_poses(Scene *scene, View3D *v3d, ARegion *ar, Base *base)
{
@@ -2728,7 +2728,7 @@ bool draw_armature(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
arm->flag &= ~ARM_EDITMODE;
}
else {
- /* Draw Pose */
+ /* Draw Pose */
if (ob->pose && ob->pose->chanbase.first) {
/* We can't safely draw non-updated pose, might contain NULL bone pointers... */
if (ob->pose->flag & POSE_RECALC) {
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index c3d60d9ee76..20dbb8df69e 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -545,7 +545,7 @@ static void draw_textured_end(void)
*
* It would be better if drawmesh.c kept track
* of and restored the light settings it changed.
- * - zr
+ * - zr
*/
glPushMatrix();
glLoadIdentity();
diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c
index cf118404183..b230a5e193c 100644
--- a/source/blender/editors/space_view3d/drawvolume.c
+++ b/source/blender/editors/space_view3d/drawvolume.c
@@ -297,7 +297,7 @@ static int create_view_aligned_slices(VolumeSlicer *slicer,
float plane_dist = min_dist;
float plane_dist_inc = (max_dist - min_dist) / (float)num_slices;
- /* for all egdes */
+ /* for all edges */
for (int i = 0; i < 12; i++) {
copy_v3_v3(vec_start[i], vertices[edges[edge_list[max_index][i]][0]]);
copy_v3_v3(vec_dir[i], vertices[edges[edge_list[max_index][i]][1]]);
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 63786e87b1f..05e9a34f492 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -716,7 +716,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
}
}
}
- BKE_nurb_test2D(nu);
+ BKE_nurb_test_2d(nu);
BKE_nurb_handles_test(nu, true); /* test for bezier too */
nu = nu->next;
diff --git a/source/blender/editors/space_view3d/view3d_camera_control.c b/source/blender/editors/space_view3d/view3d_camera_control.c
index e27b3fe13f9..31956ee5f86 100644
--- a/source/blender/editors/space_view3d/view3d_camera_control.c
+++ b/source/blender/editors/space_view3d/view3d_camera_control.c
@@ -87,7 +87,7 @@ typedef struct View3DCameraControl {
/* -------------------------------------------------------------------- */
- /* intial values */
+ /* initial values */
/* root most parent */
Object *root_parent;
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index b02e4ad9764..679498ab16d 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -790,7 +790,7 @@ static void viewrotate_apply(ViewOpsData *vod, const int event_xy[2])
/* avoid precision loss over time */
normalize_qt(vod->curr.viewquat);
- /* use a working copy so view rotation locking doesnt overwrite the locked
+ /* use a working copy so view rotation locking doesn't overwrite the locked
* rotation back into the view we calculate with */
copy_qt_qt(rv3d->viewquat, vod->curr.viewquat);
@@ -1033,7 +1033,7 @@ static float view3d_ndof_pan_speed_calc(RegionView3D *rv3d)
/**
* Zoom and pan in the same function since sometimes zoom is interpreted as dolly (pan forward).
*
- * \param has_zoom zoom, otherwise dolly, often `!rv3d->is_persp` since it doesnt make sense to dolly in ortho.
+ * \param has_zoom zoom, otherwise dolly, often `!rv3d->is_persp` since it doesn't make sense to dolly in ortho.
*/
static void view3d_ndof_pan_zoom(
const struct wmNDOFMotionData *ndof, ScrArea *sa, ARegion *ar,
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c
index c68b5e97414..320c00240c1 100644
--- a/source/blender/editors/space_view3d/view3d_fly.c
+++ b/source/blender/editors/space_view3d/view3d_fly.c
@@ -28,7 +28,7 @@
#ifdef WITH_INPUT_NDOF
//# define NDOF_FLY_DEBUG
-//# define NDOF_FLY_DRAW_TOOMUCH /* is this needed for ndof? - commented so redraw doesnt thrash - campbell */
+//# define NDOF_FLY_DRAW_TOOMUCH /* is this needed for ndof? - commented so redraw doesn't thrash - campbell */
#endif /* WITH_INPUT_NDOF */
#include "DNA_object_types.h"
@@ -150,7 +150,7 @@ void fly_modal_keymap(wmKeyConfig *keyconf)
WM_modalkeymap_add_item(keymap, MOUSEPAN, 0, 0, 0, FLY_MODAL_SPEED);
WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_PRESS, KM_ANY, 0, FLY_MODAL_PAN_ENABLE);
- /* XXX - Bug in the event system, middle mouse release doesnt work */
+ /* XXX - Bug in the event system, middle mouse release doesn't work */
WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, KM_ANY, 0, FLY_MODAL_PAN_DISABLE);
/* WASD */
@@ -730,7 +730,7 @@ static int flyApply(bContext *C, FlyInfo *fly)
RegionView3D *rv3d = fly->rv3d;
float mat[3][3]; /* 3x3 copy of the view matrix so we can move along the view axis */
- float dvec[3] = {0, 0, 0}; /* this is the direction thast added to the view offset per redraw */
+ float dvec[3] = {0, 0, 0}; /* this is the direction that's added to the view offset per redraw */
/* Camera Uprighting variables */
float moffset[2]; /* mouse offset from the views center */
diff --git a/source/blender/editors/space_view3d/view3d_project.c b/source/blender/editors/space_view3d/view3d_project.c
index 767df04c0b0..3cc0857c8a7 100644
--- a/source/blender/editors/space_view3d/view3d_project.c
+++ b/source/blender/editors/space_view3d/view3d_project.c
@@ -367,19 +367,19 @@ bool ED_view3d_clip_segment(const RegionView3D *rv3d, float ray_start[3], float
* \param r_ray_co The world-space point where the ray intersects the window plane.
* \param r_ray_normal The normalized world-space direction of towards mval.
* \param r_ray_start The world-space starting point of the ray.
- * \param do_clip Optionally clip the start of the ray by the view clipping planes.
+ * \param do_clip_planes Optionally clip the start of the ray by the view clipping planes.
* \return success, false if the ray is totally clipped.
*/
-bool ED_view3d_win_to_ray_ex(
+bool ED_view3d_win_to_ray_clipped_ex(
const ARegion *ar, const View3D *v3d, const float mval[2],
- float r_ray_co[3], float r_ray_normal[3], float r_ray_start[3], bool do_clip)
+ float r_ray_co[3], float r_ray_normal[3], float r_ray_start[3], bool do_clip_planes)
{
float ray_end[3];
view3d_win_to_ray_segment(ar, v3d, mval, r_ray_co, r_ray_normal, r_ray_start, ray_end);
/* bounds clipping */
- if (do_clip) {
+ if (do_clip_planes) {
return ED_view3d_clip_segment(ar->regiondata, r_ray_start, ray_end);
}
@@ -396,14 +396,32 @@ bool ED_view3d_win_to_ray_ex(
* \param mval The area relative 2d location (such as event->mval, converted into float[2]).
* \param r_ray_start The world-space point where the ray intersects the window plane.
* \param r_ray_normal The normalized world-space direction of towards mval.
- * \param do_clip Optionally clip the start of the ray by the view clipping planes.
+ * \param do_clip_planes Optionally clip the start of the ray by the view clipping planes.
* \return success, false if the ray is totally clipped.
*/
-bool ED_view3d_win_to_ray(
+bool ED_view3d_win_to_ray_clipped(
const ARegion *ar, const View3D *v3d, const float mval[2],
- float r_ray_start[3], float r_ray_normal[3], const bool do_clip)
+ float r_ray_start[3], float r_ray_normal[3], const bool do_clip_planes)
{
- return ED_view3d_win_to_ray_ex(ar, v3d, mval, NULL, r_ray_normal, r_ray_start, do_clip);
+ return ED_view3d_win_to_ray_clipped_ex(ar, v3d, mval, NULL, r_ray_normal, r_ray_start, do_clip_planes);
+}
+
+/**
+ * Calculate a 3d viewpoint and direction vector from 2d window coordinates.
+ * This ray_start is located at the viewpoint, ray_normal is the direction towards mval.
+ * \param ar The region (used for the window width and height).
+ * \param mval The area relative 2d location (such as event->mval, converted into float[2]).
+ * \param r_ray_start The world-space point where the ray intersects the window plane.
+ * \param r_ray_normal The normalized world-space direction of towards mval.
+ *
+ * \note Ignores view near/far clipping, to take this into account use #ED_view3d_win_to_ray_clipped.
+ */
+void ED_view3d_win_to_ray(
+ const ARegion *ar, const float mval[2],
+ float r_ray_start[3], float r_ray_normal[3])
+{
+ ED_view3d_win_to_origin(ar, mval, r_ray_start);
+ ED_view3d_win_to_vector(ar, mval, r_ray_normal);
}
/**
@@ -537,6 +555,31 @@ void ED_view3d_win_to_3d_int(
ED_view3d_win_to_3d(v3d, ar, depth_pt, mval_fl, r_out);
}
+bool ED_view3d_win_to_3d_on_plane(
+ const ARegion *ar,
+ const float plane[4], const float mval[2], const bool do_clip,
+ float r_out[3])
+{
+ float ray_co[3], ray_no[3];
+ ED_view3d_win_to_origin(ar, mval, ray_co);
+ ED_view3d_win_to_vector(ar, mval, ray_no);
+ float lambda;
+ if (isect_ray_plane_v3(ray_co, ray_no, plane, &lambda, do_clip)) {
+ madd_v3_v3v3fl(r_out, ray_co, ray_no, lambda);
+ return true;
+ }
+ return false;
+}
+
+bool ED_view3d_win_to_3d_on_plane_int(
+ const ARegion *ar,
+ const float plane[4], const int mval[2], const bool do_clip,
+ float r_out[3])
+{
+ const float mval_fl[2] = {mval[0], mval[1]};
+ return ED_view3d_win_to_3d_on_plane(ar, plane, mval_fl, do_clip, r_out);
+}
+
/**
* Calculate a 3d difference vector from 2d window offset.
* note that ED_view3d_calc_zfac() must be called first to determine
@@ -630,16 +673,17 @@ void ED_view3d_win_to_vector(const ARegion *ar, const float mval[2], float out[3
* \param mval The area relative 2d location (such as event->mval, converted into float[2]).
* \param r_ray_start The world-space starting point of the segment.
* \param r_ray_end The world-space end point of the segment.
- * \param do_clip Optionally clip the ray by the view clipping planes.
+ * \param do_clip_planes Optionally clip the ray by the view clipping planes.
* \return success, false if the segment is totally clipped.
*/
-bool ED_view3d_win_to_segment(const ARegion *ar, View3D *v3d, const float mval[2],
- float r_ray_start[3], float r_ray_end[3], const bool do_clip)
+bool ED_view3d_win_to_segment_clipped(
+ const ARegion *ar, View3D *v3d, const float mval[2],
+ float r_ray_start[3], float r_ray_end[3], const bool do_clip_planes)
{
view3d_win_to_ray_segment(ar, v3d, mval, NULL, NULL, r_ray_start, r_ray_end);
/* bounds clipping */
- if (do_clip) {
+ if (do_clip_planes) {
return ED_view3d_clip_segment((RegionView3D *)ar->regiondata, r_ray_start, r_ray_end);
}
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index a812950254f..92f226f72de 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -414,7 +414,6 @@ void VIEW3D_OT_smoothview(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Smooth View";
- ot->description = "";
ot->idname = "VIEW3D_OT_smoothview";
/* api callbacks */
diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c
index 97c00f1be37..33173ad3fd6 100644
--- a/source/blender/editors/space_view3d/view3d_walk.c
+++ b/source/blender/editors/space_view3d/view3d_walk.c
@@ -60,7 +60,7 @@
#ifdef WITH_INPUT_NDOF
//# define NDOF_WALK_DEBUG
-//# define NDOF_WALK_DRAW_TOOMUCH /* is this needed for ndof? - commented so redraw doesnt thrash - campbell */
+//# define NDOF_WALK_DRAW_TOOMUCH /* is this needed for ndof? - commented so redraw doesn't thrash - campbell */
#endif
#define USE_TABLET_SUPPORT
@@ -435,7 +435,7 @@ static bool walk_floor_distance_get(
ray_start, ray_normal, r_distance,
r_location, r_normal_dummy);
- /* artifically scale the distance to the scene size */
+ /* artificially scale the distance to the scene size */
*r_distance /= walk->grid;
return ret;
}
@@ -474,7 +474,7 @@ static bool walk_ray_cast(
negate_v3(r_normal);
}
- /* artifically scale the distance to the scene size */
+ /* artificially scale the distance to the scene size */
*ray_distance /= walk->grid;
return ret;
@@ -1052,7 +1052,7 @@ static int walkApply(bContext *C, wmOperator *op, WalkInfo *walk)
/* speed factor */
y *= WALK_ROTATE_FAC;
- /* user adjustement factor */
+ /* user adjustment factor */
y *= walk->mouse_speed;
/* clamp the angle limits */
@@ -1090,7 +1090,7 @@ static int walkApply(bContext *C, wmOperator *op, WalkInfo *walk)
/* speed factor */
x *= WALK_ROTATE_FAC;
- /* user adjustement factor */
+ /* user adjustment factor */
x *= walk->mouse_speed;
/* Rotate about the relative up vec */
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 79d06de8b41..f0e90a05a3b 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -782,7 +782,7 @@ enum {
TFM_MODAL_ADD_SNAP = 16,
TFM_MODAL_REMOVE_SNAP = 17,
-/* 18 and 19 used by numinput, defined in transform.h */
+/* 18 and 19 used by numinput, defined in transform.h */
TFM_MODAL_PROPSIZE_UP = 20,
TFM_MODAL_PROPSIZE_DOWN = 21,
@@ -1852,7 +1852,7 @@ static void drawTransformPixel(const struct bContext *UNUSED(C), ARegion *ar, vo
/* draw autokeyframing hint in the corner
* - only draw if enabled (advanced users may be distracted/annoyed),
- * for objects that will be autokeyframed (no point ohterwise),
+ * for objects that will be autokeyframed (no point otherwise),
* AND only for the active region (as showing all is too overwhelming)
*/
if ((U.autokey_flag & AUTOKEY_FLAG_NOWARNING) == 0) {
@@ -2561,8 +2561,8 @@ static void constraintTransLim(TransInfo *t, TransData *td)
float ctime = (float)(t->scene->r.cfra);
/* Make a temporary bConstraintOb for using these limit constraints
- * - they only care that cob->matrix is correctly set ;-)
- * - current space should be local
+ * - they only care that cob->matrix is correctly set ;-)
+ * - current space should be local
*/
unit_m4(cob.matrix);
copy_v3_v3(cob.matrix[3], td->loc);
@@ -2599,7 +2599,7 @@ static void constraintTransLim(TransInfo *t, TransData *td)
mul_m4_m3m4(cob.matrix, td->mtx, cob.matrix);
}
else if (con->ownspace != CONSTRAINT_SPACE_LOCAL) {
- /* skip... incompatable spacetype */
+ /* skip... incompatible spacetype */
continue;
}
@@ -2628,8 +2628,8 @@ static void constraintTransLim(TransInfo *t, TransData *td)
static void constraintob_from_transdata(bConstraintOb *cob, TransData *td)
{
/* Make a temporary bConstraintOb for use by limit constraints
- * - they only care that cob->matrix is correctly set ;-)
- * - current space should be local
+ * - they only care that cob->matrix is correctly set ;-)
+ * - current space should be local
*/
memset(cob, 0, sizeof(bConstraintOb));
if (td->ext) {
@@ -2675,7 +2675,7 @@ static void constraintRotLim(TransInfo *UNUSED(t), TransData *td)
if ((data->flag2 & LIMIT_TRANSFORM) == 0)
continue;
- /* skip incompatable spacetypes */
+ /* skip incompatible spacetypes */
if (!ELEM(con->ownspace, CONSTRAINT_SPACE_WORLD, CONSTRAINT_SPACE_LOCAL))
continue;
@@ -2730,8 +2730,8 @@ static void constraintSizeLim(TransInfo *t, TransData *td)
int i;
/* Make a temporary bConstraintOb for using these limit constraints
- * - they only care that cob->matrix is correctly set ;-)
- * - current space should be local
+ * - they only care that cob->matrix is correctly set ;-)
+ * - current space should be local
*/
if ((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)) {
/* scale val and reset size */
@@ -5713,7 +5713,7 @@ static void calcEdgeSlideCustomPoints(struct TransInfo *t)
setCustomPoints(t, &t->mouse, sld->mval_end, sld->mval_start);
/* setCustomPoints isn't normally changing as the mouse moves,
- * in this case apply mouse input immediatly so we don't refresh
+ * in this case apply mouse input immediately so we don't refresh
* with the value from the previous points */
applyMouseInput(t, &t->mouse, t->mval, t->values);
}
@@ -7081,7 +7081,7 @@ static void calcVertSlideCustomPoints(struct TransInfo *t)
}
/* setCustomPoints isn't normally changing as the mouse moves,
- * in this case apply mouse input immediatly so we don't refresh
+ * in this case apply mouse input immediately so we don't refresh
* with the value from the previous points */
applyMouseInput(t, &t->mouse, t->mval, t->values);
}
@@ -8056,7 +8056,7 @@ static short getAnimEdit_SnapMode(TransInfo *t)
}
/* toggle autosnap on/off
- * - when toggling on, prefer nearest frame over 1.0 frame increments
+ * - when toggling on, prefer nearest frame over 1.0 frame increments
*/
if (t->modifiers & MOD_SNAP_INVERT) {
if (autosnap)
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h
index d53f51f5076..5369fc05005 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -150,7 +150,7 @@ typedef struct TransDataExtension {
float r_mtx[3][3]; /* The rotscale matrix of pose bone, to allow using snap-align in translation mode,
* when td->mtx is the loc pose bone matrix (and hence can't be used to apply rotation in some cases,
* namely when a bone is in "NoLocal" or "Hinge" mode)... */
- float r_smtx[3][3]; /* Invers of previous one. */
+ float r_smtx[3][3]; /* Inverse of previous one. */
int rotOrder; /* rotation mode, as defined in eRotationModes (DNA_action_types.h) */
float oloc[3], orot[3], oquat[4], orotAxis[3], orotAngle; /* Original object transformation used for rigid bodies */
} TransDataExtension;
@@ -163,7 +163,7 @@ typedef struct TransData2D {
float ih1[2], ih2[2];
} TransData2D;
-/* we need to store 2 handles for each transdata in case the other handle wasnt selected */
+/* we need to store 2 handles for each transdata in case the other handle wasn't selected */
typedef struct TransDataCurveHandleFlags {
char ih1, ih2;
char *h1, *h2;
@@ -522,7 +522,7 @@ typedef struct TransInfo {
#define T_AUTOVALUES (1 << 20)
- /* to specificy if we save back settings at the end */
+ /* to specify if we save back settings at the end */
#define T_MODAL (1 << 21)
/* no retopo */
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 53f1aaef473..da4ee21ff6f 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -2291,7 +2291,7 @@ static struct TransIslandData *editmesh_islands_info_calc(
vert_map = MEM_mallocN(sizeof(*vert_map) * bm->totvert, __func__);
/* we shouldn't need this, but with incorrect selection flushing
- * its possible we have a selected vertex thats not in a face, for now best not crash in that case. */
+ * its possible we have a selected vertex that's not in a face, for now best not crash in that case. */
copy_vn_i(vert_map, bm->totvert, -1);
BM_mesh_elem_table_ensure(bm, htype);
@@ -2895,7 +2895,7 @@ void flushTransSeq(TransInfo *t)
if (seq != seq_prev) {
if (seq->depth == 0) {
- /* test overlap, displayes red outline */
+ /* test overlap, displays red outline */
seq->flag &= ~SEQ_OVERLAP;
if (BKE_sequence_test_overlap(seqbasep, seq)) {
seq->flag |= SEQ_OVERLAP;
@@ -3314,13 +3314,13 @@ static void createTransNlaData(bContext *C, TransInfo *t)
if (strip->type != NLASTRIP_TYPE_TRANSITION) {
if (strip->flag & NLASTRIP_FLAG_SELECT) {
/* our transform data is constructed as follows:
- * - only the handles on the right side of the current-frame get included
- * - td structs are transform-elements operated on by the transform system
- * and represent a single handle. The storage/pointer used (val or loc) depends on
- * whether we're scaling or transforming. Ultimately though, the handles
- * the td writes to will simply be a dummy in tdn
- * - for each strip being transformed, a single tdn struct is used, so in some
- * cases, there will need to be 1 of these tdn elements in the array skipped...
+ * - only the handles on the right side of the current-frame get included
+ * - td structs are transform-elements operated on by the transform system
+ * and represent a single handle. The storage/pointer used (val or loc) depends on
+ * whether we're scaling or transforming. Ultimately though, the handles
+ * the td writes to will simply be a dummy in tdn
+ * - for each strip being transformed, a single tdn struct is used, so in some
+ * cases, there will need to be 1 of these tdn elements in the array skipped...
*/
float center[3], yval;
@@ -4501,9 +4501,9 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
}
/* special hack (must be done after initTransDataCurveHandles(), as that stores handle settings to restore...):
- * - Check if we've got entire BezTriple selected and we're scaling/rotating that point,
- * then check if we're using auto-handles.
- * - If so, change them auto-handles to aligned handles so that handles get affected too
+ * - Check if we've got entire BezTriple selected and we're scaling/rotating that point,
+ * then check if we're using auto-handles.
+ * - If so, change them auto-handles to aligned handles so that handles get affected too
*/
if (ELEM(bezt->h1, HD_AUTO, HD_AUTO_ANIM) &&
ELEM(bezt->h2, HD_AUTO, HD_AUTO_ANIM) &&
@@ -4807,9 +4807,9 @@ void flushTransGraphData(TransInfo *t)
float inv_unit_scale = 1.0f / tdg->unit_scale;
/* handle snapping for time values
- * - we should still be in NLA-mapping timespace
- * - only apply to keyframes (but never to handles)
- * - don't do this when canceling, or else these changes won't go away
+ * - we should still be in NLA-mapping timespace
+ * - only apply to keyframes (but never to handles)
+ * - don't do this when canceling, or else these changes won't go away
*/
if ((t->state != TRANS_CANCEL) && (td->flag & TD_NOTIMESNAP) == 0) {
switch (sipo->autosnap) {
@@ -5525,9 +5525,9 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
td->con = ob->constraints.first;
/* hack: temporarily disable tracking and/or constraints when getting
- * object matrix, if tracking is on, or if constraints don't need
- * inverse correction to stop it from screwing up space conversion
- * matrix later
+ * object matrix, if tracking is on, or if constraints don't need
+ * inverse correction to stop it from screwing up space conversion
+ * matrix later
*/
constinv = constraints_list_needinv(t, &ob->constraints);
@@ -5593,7 +5593,7 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
/* Get the effect of parenting, and/or certain constraints.
* NOTE: some Constraints, and also Tracking should never get this
- * done, as it doesn't work well.
+ * done, as it doesn't work well.
*/
BKE_object_to_mat3(ob, obmtx);
copy_m3_m4(totmat, ob->obmat);
@@ -5923,9 +5923,9 @@ void autokeyframe_pose_cb_func(bContext *C, Scene *scene, View3D *v3d, Object *o
short flag = 0;
/* flag is initialized from UserPref keyframing settings
- * - special exception for targetless IK - INSERTKEY_MATRIX keyframes should get
- * visual keyframes even if flag not set, as it's not that useful otherwise
- * (for quick animation recording)
+ * - special exception for targetless IK - INSERTKEY_MATRIX keyframes should get
+ * visual keyframes even if flag not set, as it's not that useful otherwise
+ * (for quick animation recording)
*/
flag = ANIM_get_keyframing_flags(scene, 1);
@@ -6021,9 +6021,9 @@ void autokeyframe_pose_cb_func(bContext *C, Scene *scene, View3D *v3d, Object *o
}
/* do the bone paths
- * - only do this when there is context info, since we need that to resolve
- * how to do the updates and so on...
- * - do not calculate unless there are paths already to update...
+ * - only do this when there is context info, since we need that to resolve
+ * how to do the updates and so on...
+ * - do not calculate unless there are paths already to update...
*/
if (C && (ob->pose->avs.path_bakeflag & MOTIONPATH_BAKE_HAS_PATHS)) {
//ED_pose_clear_paths(C, ob); // XXX for now, don't need to clear
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 9a2c3674d2a..5e24a3d9e47 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -259,9 +259,9 @@ static void animrecord_check_state(Scene *scene, ID *id, wmTimer *animtimer)
return;
/* check if we need a new strip if:
- * - if animtimer is running
- * - we're not only keying for available channels
- * - the option to add new actions for each round is not enabled
+ * - if animtimer is running
+ * - we're not only keying for available channels
+ * - the option to add new actions for each round is not enabled
*/
if (IS_AUTOKEY_FLAG(scene, INSERTAVAIL) == 0 && (scene->toolsettings->autokey_flag & ANIMRECORD_FLAG_WITHNLA)) {
/* if playback has just looped around, we need to add a new NLA track+strip to allow a clean pass to occur */
@@ -303,7 +303,7 @@ static void animrecord_check_state(Scene *scene, ID *id, wmTimer *animtimer)
* NOTE: An alternative way would have been to instead hack the influence
* to not get always get reset to full strength if NLASTRIP_FLAG_USR_INFLUENCE
* is disabled but auto-blending isn't being used. However, that approach
- * is a bit hacky/hard to discover, and may cause backwards compatability issues,
+ * is a bit hacky/hard to discover, and may cause backwards compatibility issues,
* so it's better to just do it this way.
*/
strip->flag |= NLASTRIP_FLAG_USR_INFLUENCE;
@@ -516,8 +516,8 @@ static void recalcData_nla(TransInfo *t)
if ((pExceeded && nExceeded) || (iter == 4)) {
/* both endpoints exceeded (or iteration ping-pong'd meaning that we need a compromise)
- * - simply crop strip to fit within the bounds of the strips bounding it
- * - if there were no neighbors, clear the transforms (make it default to the strip's current values)
+ * - simply crop strip to fit within the bounds of the strips bounding it
+ * - if there were no neighbors, clear the transforms (make it default to the strip's current values)
*/
if (strip->prev && strip->next) {
tdn->h1[0] = strip->prev->end;
@@ -607,7 +607,7 @@ static void recalcData_nla(TransInfo *t)
/* now, check if we need to try and move track
- * - we need to calculate both, as only one may have been altered by transform if only 1 handle moved
+ * - we need to calculate both, as only one may have been altered by transform if only 1 handle moved
*/
delta_y1 = ((int)tdn->h1[1] / NLACHANNEL_STEP(snla) - tdn->trackIndex);
delta_y2 = ((int)tdn->h2[1] / NLACHANNEL_STEP(snla) - tdn->trackIndex);
@@ -760,7 +760,7 @@ static void recalcData_objects(TransInfo *t)
else {
/* Normal updating */
while (nu) {
- BKE_nurb_test2D(nu);
+ BKE_nurb_test_2d(nu);
BKE_nurb_handles_calc(nu);
nu = nu->next;
}
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 4122cf33bdb..8cd31c32911 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -662,7 +662,7 @@ int getTransformOrientation_ex(const bContext *C, float normal[3], float plane[3
}
if (em->bm->totedgesel >= 1) {
- /* find an edge thats apart of v_tri (no need to search all edges) */
+ /* find an edge that's apart of v_tri (no need to search all edges) */
float e_length;
int j;
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index 8bc53127b4c..b06f22f50cc 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -611,7 +611,7 @@ static void initSnappingMode(TransInfo *t)
(bool (*)(BMVert *, void *))BM_elem_cb_check_hflag_disabled,
bm_edge_is_snap_target,
bm_face_is_snap_target,
- SET_UINT_IN_POINTER((BM_ELEM_SELECT | BM_ELEM_HIDDEN)));
+ POINTER_FROM_UINT((BM_ELEM_SELECT | BM_ELEM_HIDDEN)));
}
}
}
diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c
index f9c628877c1..1c6ad1fe752 100644
--- a/source/blender/editors/transform/transform_snap_object.c
+++ b/source/blender/editors/transform/transform_snap_object.c
@@ -2425,7 +2425,7 @@ bool ED_transform_snap_object_project_all_view3d_ex(
{
float ray_start[3], ray_normal[3];
- if (!ED_view3d_win_to_ray_ex(
+ if (!ED_view3d_win_to_ray_clipped_ex(
sctx->v3d_data.ar, sctx->v3d_data.v3d,
mval, NULL, ray_normal, ray_start, true))
{
diff --git a/source/blender/editors/undo/CMakeLists.txt b/source/blender/editors/undo/CMakeLists.txt
index 89832604ed8..2e3e73f34f4 100644
--- a/source/blender/editors/undo/CMakeLists.txt
+++ b/source/blender/editors/undo/CMakeLists.txt
@@ -22,6 +22,7 @@ set(INC
../include
../../blenkernel
../../blenlib
+ ../../blenloader
../../blentranslation
../../makesdna
../../makesrna
diff --git a/source/blender/editors/undo/ed_undo.c b/source/blender/editors/undo/ed_undo.c
index e0a1faf04b8..c69fabdbd70 100644
--- a/source/blender/editors/undo/ed_undo.c
+++ b/source/blender/editors/undo/ed_undo.c
@@ -47,9 +47,12 @@
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_main.h"
+#include "BKE_report.h"
#include "BKE_screen.h"
#include "BKE_undo_system.h"
+#include "BLO_runtime.h"
+
#include "ED_gpencil.h"
#include "ED_render.h"
#include "ED_screen.h"
@@ -101,7 +104,7 @@ void ED_undo_push(bContext *C, const char *str)
}
/* note: also check undo_history_exec() in bottom if you change notifiers */
-static int ed_undo_step(bContext *C, int step, const char *undoname)
+static int ed_undo_step(bContext *C, int step, const char *undoname, ReportList *reports)
{
CLOG_INFO(&LOG, 1, "name='%s', step=%d", undoname, step);
wmWindowManager *wm = CTX_wm_manager(C);
@@ -111,6 +114,14 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
* or they can just lead to freezing job in some other cases */
WM_jobs_kill_all(wm);
+ if (G.debug & G_DEBUG_IO) {
+ Main *bmain = CTX_data_main(C);
+ if (bmain->lock != NULL) {
+ BKE_report(reports, RPT_INFO, "Checking sanity of current .blend file *BEFORE* undo step.");
+ BLO_main_validate_libraries(bmain, reports);
+ }
+ }
+
/* TODO(campbell): undo_system: use undo system */
/* grease pencil can be can be used in plenty of spaces, so check it first */
if (ED_gpencil_session_active()) {
@@ -161,6 +172,14 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
wm->op_undo_depth--;
}
+ if (G.debug & G_DEBUG_IO) {
+ Main *bmain = CTX_data_main(C);
+ if (bmain->lock != NULL) {
+ BKE_report(reports, RPT_INFO, "Checking sanity of current .blend file *AFTER* undo step.");
+ BLO_main_validate_libraries(bmain, reports);
+ }
+ }
+
WM_event_add_notifier(C, NC_WINDOW, NULL);
WM_event_add_notifier(C, NC_WM | ND_UNDO, NULL);
@@ -182,11 +201,11 @@ void ED_undo_grouped_push(bContext *C, const char *str)
void ED_undo_pop(bContext *C)
{
- ed_undo_step(C, 1, NULL);
+ ed_undo_step(C, 1, NULL, NULL);
}
void ED_undo_redo(bContext *C)
{
- ed_undo_step(C, -1, NULL);
+ ed_undo_step(C, -1, NULL, NULL);
}
void ED_undo_push_op(bContext *C, wmOperator *op)
@@ -208,7 +227,7 @@ void ED_undo_grouped_push_op(bContext *C, wmOperator *op)
void ED_undo_pop_op(bContext *C, wmOperator *op)
{
/* search back a couple of undo's, in case something else added pushes */
- ed_undo_step(C, 0, op->type->name);
+ ed_undo_step(C, 0, op->type->name, op->reports);
}
/* name optionally, function used to check for operator redo panel */
@@ -237,11 +256,11 @@ UndoStack *ED_undo_stack_get(void)
/** \name Undo, Undo Push & Redo Operators
* \{ */
-static int ed_undo_exec(bContext *C, wmOperator *UNUSED(op))
+static int ed_undo_exec(bContext *C, wmOperator *op)
{
/* "last operator" should disappear, later we can tie this with undo stack nicer */
WM_operator_stack_clear(CTX_wm_manager(C));
- int ret = ed_undo_step(C, 1, NULL);
+ int ret = ed_undo_step(C, 1, NULL, op->reports);
if (ret & OPERATOR_FINISHED) {
/* Keep button under the cursor active. */
WM_event_add_mousemove(C);
@@ -257,9 +276,9 @@ static int ed_undo_push_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int ed_redo_exec(bContext *C, wmOperator *UNUSED(op))
+static int ed_redo_exec(bContext *C, wmOperator *op)
{
- int ret = ed_undo_step(C, -1, NULL);
+ int ret = ed_undo_step(C, -1, NULL, op->reports);
if (ret & OPERATOR_FINISHED) {
/* Keep button under the cursor active. */
WM_event_add_mousemove(C);
diff --git a/source/blender/editors/util/ed_transverts.c b/source/blender/editors/util/ed_transverts.c
index e6b13569d6a..09f1c060641 100644
--- a/source/blender/editors/util/ed_transverts.c
+++ b/source/blender/editors/util/ed_transverts.c
@@ -112,7 +112,7 @@ void ED_transverts_update_obedit(TransVertStore *tvs, Object *obedit)
}
}
- BKE_nurb_test2D(nu);
+ BKE_nurb_test_2d(nu);
BKE_nurb_handles_test(nu, true); /* test for bezier too */
nu = nu->next;
}
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c
index 79e804725e5..352bfbf9a9e 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.c
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.c
@@ -34,6 +34,8 @@
#include "BLI_heap.h"
#include "BLI_boxpack_2d.h"
#include "BLI_convexhull_2d.h"
+#include "BLI_polyfill_2d.h"
+#include "BLI_polyfill_2d_beautify.h"
#include "uvedit_parametrizer.h"
@@ -219,6 +221,8 @@ enum PHandleState {
typedef struct PHandle {
enum PHandleState state;
MemArena *arena;
+ MemArena *polyfill_arena;
+ Heap *polyfill_heap;
PChart *construction_chart;
PHash *hash_verts;
@@ -4119,6 +4123,8 @@ ParamHandle *param_construct_begin(void)
handle->construction_chart = p_chart_new(handle);
handle->state = PHANDLE_STATE_ALLOCATED;
handle->arena = BLI_memarena_new(MEM_SIZE_OPTIMAL(1 << 16), "param construct arena");
+ handle->polyfill_arena = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "param polyfill arena");
+ handle->polyfill_heap = BLI_heap_new_ex(BLI_POLYFILL_ALLOC_NGON_RESERVE);
handle->aspx = 1.0f;
handle->aspy = 1.0f;
handle->do_aspect = false;
@@ -4162,82 +4168,71 @@ void param_delete(ParamHandle *handle)
}
BLI_memarena_free(phandle->arena);
+ BLI_memarena_free(phandle->polyfill_arena);
+ BLI_heap_free(phandle->polyfill_heap, NULL);
MEM_freeN(phandle);
}
static void p_add_ngon(ParamHandle *handle, ParamKey key, int nverts,
ParamKey *vkeys, float **co, float **uv,
- ParamBool *pin, ParamBool *select, const float normal[3])
+ ParamBool *pin, ParamBool *select)
{
- int *boundary = BLI_array_alloca(boundary, nverts);
-
- /* boundary vertex indexes */
- for (int i = 0; i < nverts; i++) {
- boundary[i] = i;
- }
-
- while (nverts > 2) {
- float minangle = FLT_MAX;
- float minshape = FLT_MAX;
- int i, mini = 0;
-
- /* find corner with smallest angle */
- for (i = 0; i < nverts; i++) {
- int v0 = boundary[(i + nverts - 1) % nverts];
- int v1 = boundary[i];
- int v2 = boundary[(i + 1) % nverts];
- float angle = p_vec_angle(co[v0], co[v1], co[v2]);
- float n[3];
-
- normal_tri_v3(n, co[v0], co[v1], co[v2]);
+ /* Allocate memory for polyfill. */
+ PHandle *phandle = (PHandle *)handle;
+ MemArena *arena = phandle->polyfill_arena;
+ Heap *heap = phandle->polyfill_heap;
+ unsigned int nfilltri = nverts - 2;
+ unsigned int (*tris)[3] = BLI_memarena_alloc(arena, sizeof(*tris) * (size_t)nfilltri);
+ float (*projverts)[2] = BLI_memarena_alloc(arena, sizeof(*projverts) * (size_t)nverts);
- if (normal && (dot_v3v3(n, normal) < 0.0f))
- angle = (float)(2.0 * M_PI) - angle;
+ /* Calc normal, flipped: to get a positive 2d cross product. */
+ float normal[3];
+ zero_v3(normal);
- float other_angle = p_vec_angle(co[v2], co[v0], co[v1]);
- float shape = fabsf((float)M_PI - angle - 2.0f * other_angle);
+ const float *co_curr, *co_prev = co[nverts-1];
+ for (int j = 0; j < nverts; j++) {
+ co_curr = co[j];
+ add_newell_cross_v3_v3v3(normal, co_prev, co_curr);
+ co_prev = co_curr;
+ }
+ if (UNLIKELY(normalize_v3(normal) == 0.0f)) {
+ normal[2] = 1.0f;
+ }
- if (fabsf(angle - minangle) < 0.01f) {
- /* for nearly equal angles, try to get well shaped triangles */
- if (shape < minshape) {
- minangle = angle;
- minshape = shape;
- mini = i;
- }
- }
- else if (angle < minangle) {
- minangle = angle;
- minshape = shape;
- mini = i;
- }
- }
+ /* Project verts to 2d. */
+ float axis_mat[3][3];
+ axis_dominant_v3_to_m3_negate(axis_mat, normal);
+ for (int j = 0; j < nverts; j++) {
+ mul_v2_m3v3(projverts[j], axis_mat, co[j]);
+ }
- /* add triangle in corner */
- {
- int v0 = boundary[(mini + nverts - 1) % nverts];
- int v1 = boundary[mini];
- int v2 = boundary[(mini + 1) % nverts];
+ BLI_polyfill_calc_arena(projverts, nverts, 1, tris, arena);
- ParamKey tri_vkeys[3] = {vkeys[v0], vkeys[v1], vkeys[v2]};
- float *tri_co[3] = {co[v0], co[v1], co[v2]};
- float *tri_uv[3] = {uv[v0], uv[v1], uv[v2]};
- ParamBool tri_pin[3] = {pin[v0], pin[v1], pin[v2]};
- ParamBool tri_select[3] = {select[v0], select[v1], select[v2]};
+ /* Beautify helps avoid thin triangles that give numerical problems. */
+ BLI_polyfill_beautify(projverts, nverts, tris, arena, heap);
- param_face_add(handle, key, 3, tri_vkeys, tri_co, tri_uv, tri_pin, tri_select, NULL);
- }
+ /* Add triangles. */
+ for (int j = 0; j < nfilltri; j++) {
+ unsigned int *tri = tris[j];
+ unsigned int v0 = tri[0];
+ unsigned int v1 = tri[1];
+ unsigned int v2 = tri[2];
- /* remove corner */
- if (mini + 1 < nverts)
- memmove(boundary + mini, boundary + mini + 1, (nverts - mini - 1) * sizeof(int));
+ ParamKey tri_vkeys[3] = {vkeys[v0], vkeys[v1], vkeys[v2]};
+ float *tri_co[3] = {co[v0], co[v1], co[v2]};
+ float *tri_uv[3] = {uv[v0], uv[v1], uv[v2]};
+ ParamBool tri_pin[3] = {pin[v0], pin[v1], pin[v2]};
+ ParamBool tri_select[3] = {select[v0], select[v1], select[v2]};
- nverts--;
+ param_face_add(handle, key, 3, tri_vkeys, tri_co, tri_uv, tri_pin, tri_select);
}
+
+ BLI_memarena_clear(arena);
}
void param_face_add(ParamHandle *handle, ParamKey key, int nverts,
ParamKey *vkeys, float *co[4], float *uv[4],
- ParamBool *pin, ParamBool *select, float normal[3])
+ ParamBool *pin, ParamBool *select)
{
PHandle *phandle = (PHandle *)handle;
@@ -4247,7 +4242,7 @@ void param_face_add(ParamHandle *handle, ParamKey key, int nverts,
if (nverts > 4) {
/* ngon */
- p_add_ngon(handle, key, nverts, vkeys, co, uv, pin, select, normal);
+ p_add_ngon(handle, key, nverts, vkeys, co, uv, pin, select);
}
else if (nverts == 4) {
/* quad */
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.h b/source/blender/editors/uvedit/uvedit_parametrizer.h
index 2714bc33769..e42944f3da4 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.h
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.h
@@ -62,8 +62,7 @@ void param_face_add(ParamHandle *handle,
float *co[4],
float *uv[4],
ParamBool *pin,
- ParamBool *select,
- float face_normal[3]);
+ ParamBool *select);
void param_edge_set_seam(ParamHandle *handle,
ParamKey *vkeys);
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c
index 9699d74c86b..869009d1bdf 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.c
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c
@@ -2002,6 +2002,7 @@ static void stitch_exit(bContext *C, wmOperator *op, int finished)
RNA_enum_set(op->ptr, "stored_mode", state->mode);
/* Store selection for re-execution of stitch */
+ RNA_collection_clear(op->ptr, "selection");
for (i = 0; i < state->selection_size; i++) {
UvElement *element;
PointerRNA itemptr;
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index 06eae0ee63d..088ed42b0c0 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -254,7 +254,7 @@ static void construct_param_handle_face_add(ParamHandle *handle, Scene *scene,
select[i] = uvedit_uv_select_test(scene, l, cd_loop_uv_offset);
}
- param_face_add(handle, key, i, vkeys, co, uv, pin, select, efa->no);
+ param_face_add(handle, key, i, vkeys, co, uv, pin, select);
}
static ParamHandle *construct_param_handle(Scene *scene, Object *ob, BMesh *bm,
@@ -478,7 +478,7 @@ static ParamHandle *construct_param_handle_subsurfed(Scene *scene, Object *ob, B
texface_from_original_index(origFace, origVertIndices[mloop[2].v], &uv[2], &pin[2], &select[2], scene, cd_loop_uv_offset);
texface_from_original_index(origFace, origVertIndices[mloop[3].v], &uv[3], &pin[3], &select[3], scene, cd_loop_uv_offset);
- param_face_add(handle, key, 4, vkeys, co, uv, pin, select, NULL);
+ param_face_add(handle, key, 4, vkeys, co, uv, pin, select);
}
/* these are calculated from original mesh too */
@@ -1241,7 +1241,7 @@ static int unwrap_exec(bContext *C, wmOperator *op)
else
RNA_enum_set(op->ptr, "method", scene->toolsettings->unwrapper);
- /* remember packing marging */
+ /* remember packing margin */
if (RNA_struct_property_is_set(op->ptr, "margin"))
scene->toolsettings->uvcalc_margin = RNA_float_get(op->ptr, "margin");
else
diff --git a/source/blender/freestyle/intern/application/AppCanvas.h b/source/blender/freestyle/intern/application/AppCanvas.h
index 9a92cf482d0..ed473e22489 100644
--- a/source/blender/freestyle/intern/application/AppCanvas.h
+++ b/source/blender/freestyle/intern/application/AppCanvas.h
@@ -69,7 +69,7 @@ public:
virtual float thickness() const;
AppView *_pViewer;
- inline const AppView * viewer() const {return _pViewer;}
+ inline const AppView *viewer() const {return _pViewer;}
/*! modifiers */
void setViewer(AppView *iViewer);
diff --git a/source/blender/freestyle/intern/application/AppConfig.h b/source/blender/freestyle/intern/application/AppConfig.h
index ae1d96e06d8..d7572aa1a04 100644
--- a/source/blender/freestyle/intern/application/AppConfig.h
+++ b/source/blender/freestyle/intern/application/AppConfig.h
@@ -44,7 +44,7 @@ namespace Config {
class Path {
protected:
- static Path * _pInstance;
+ static Path *_pInstance;
string _ProjectDir;
string _ModelsPath;
string _PatternsPath;
diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp
index 46db99a8d51..03dc5f67d43 100644
--- a/source/blender/freestyle/intern/application/Controller.cpp
+++ b/source/blender/freestyle/intern/application/Controller.cpp
@@ -642,11 +642,11 @@ void Controller::ComputeSteerableViewMap()
NodeShape *completeNS = new NodeShape;
completeNS->material().setDiffuse(c,c,c,1);
ng[Canvas::NB_STEERABLE_VIEWMAP-1]->AddChild(completeNS);
- SteerableViewMap * svm = _Canvas->getSteerableViewMap();
+ SteerableViewMap *svm = _Canvas->getSteerableViewMap();
svm->Reset();
ViewMap::fedges_container& fedges = _ViewMap->FEdges();
- LineRep * fRep;
+ LineRep *fRep;
NodeShape *ns;
for (ViewMap::fedges_container::iterator f = fedges.begin(), fend = fedges.end();
f != fend;
@@ -722,7 +722,7 @@ void Controller::ComputeSteerableViewMap()
void Controller::saveSteerableViewMapImages()
{
- SteerableViewMap * svm = _Canvas->getSteerableViewMap();
+ SteerableViewMap *svm = _Canvas->getSteerableViewMap();
if (!svm) {
cerr << "the Steerable ViewMap has not been computed yet" << endl;
return;
@@ -1003,7 +1003,7 @@ void Controller::resetModified(bool iMod)
_Canvas->resetModified(iMod);
}
-NodeGroup * Controller::BuildRep(vector<ViewEdge*>::iterator vedges_begin, vector<ViewEdge*>::iterator vedges_end)
+NodeGroup *Controller::BuildRep(vector<ViewEdge*>::iterator vedges_begin, vector<ViewEdge*>::iterator vedges_end)
{
ViewMapTesselator2D tesselator2D;
FrsMaterial mat;
@@ -1052,7 +1052,7 @@ void Controller::resetInterpreter()
void Controller::displayDensityCurves(int x, int y)
{
- SteerableViewMap * svm = _Canvas->getSteerableViewMap();
+ SteerableViewMap *svm = _Canvas->getSteerableViewMap();
if (!svm)
return;
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h
index 894f8eeeb4e..290701936e3 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h
+++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h
@@ -82,7 +82,7 @@ public:
virtual ~BlenderFileLoader();
/*! Loads the 3D scene and returns a pointer to the scene root node */
- NodeGroup * Load();
+ NodeGroup *Load();
/*! Gets the number of read faces */
inline unsigned int numFacesRead() {return _numFacesRead;}
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
index 9c3ff8999b7..0b672ca6adb 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
+++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
@@ -96,7 +96,8 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(Render *re, int render_count) : Str
//freestyle_scene->r.maximsize = old_scene->r.maximsize; /* DEPRECATED */
freestyle_scene->r.ocres = old_scene->r.ocres;
freestyle_scene->r.color_mgt_flag = 0; // old_scene->r.color_mgt_flag;
- freestyle_scene->r.scemode = old_scene->r.scemode & ~(R_SINGLE_LAYER | R_NO_FRAME_UPDATE | R_MULTIVIEW);
+ freestyle_scene->r.scemode = (old_scene->r.scemode & ~(R_SINGLE_LAYER | R_NO_FRAME_UPDATE | R_MULTIVIEW)) &
+ (re->r.scemode | ~R_FULL_SAMPLE);
freestyle_scene->r.flag = old_scene->r.flag;
freestyle_scene->r.threads = old_scene->r.threads;
freestyle_scene->r.border.xmin = old_scene->r.border.xmin;
diff --git a/source/blender/freestyle/intern/geometry/Grid.h b/source/blender/freestyle/intern/geometry/Grid.h
index 62c0e58232a..0a9be01aba1 100644
--- a/source/blender/freestyle/intern/geometry/Grid.h
+++ b/source/blender/freestyle/intern/geometry/Grid.h
@@ -30,7 +30,7 @@
#include <cstring> // for memset
#include <float.h>
-#include <stdint.h> // For SET_UINT_IN_POINTER, i.e. uintptr_t.
+#include <stdint.h> // For POINTER_FROM_UINT, i.e. uintptr_t.
#include <vector>
#include "Geom.h"
@@ -290,8 +290,9 @@ public:
* Returns the first intersection (occluder,t,u,v) or null.
* Starts with a call to InitRay.
*/
- Polygon3r * castRayToFindFirstIntersection(const Vec3r& orig, const Vec3r& dir, double& t,
- double& u, double& v, unsigned timestamp);
+ Polygon3r *castRayToFindFirstIntersection(
+ const Vec3r& orig, const Vec3r& dir, double& t,
+ double& u, double& v, unsigned timestamp);
/*! Init all structures and values for computing the cells intersected by this new ray */
@@ -338,8 +339,8 @@ protected:
visitor.discoverCell(current_cell);
OccludersSet& occluders = current_cell->getOccluders(); // FIXME: I had forgotten the ref &
for (OccludersSet::iterator it = occluders.begin(); it != occluders.end(); it++) {
- if (GET_UINT_FROM_POINTER((*it)->userdata2) != _timestamp) {
- (*it)->userdata2 = SET_UINT_IN_POINTER(_timestamp);
+ if (POINTER_AS_UINT((*it)->userdata2) != _timestamp) {
+ (*it)->userdata2 = POINTER_FROM_UINT(_timestamp);
visitor.examineOccluder(*it);
}
}
diff --git a/source/blender/freestyle/intern/geometry/SweepLine.h b/source/blender/freestyle/intern/geometry/SweepLine.h
index 98e860862bb..3edd045320f 100644
--- a/source/blender/freestyle/intern/geometry/SweepLine.h
+++ b/source/blender/freestyle/intern/geometry/SweepLine.h
@@ -72,7 +72,7 @@ public:
}
public:
- void * userdata; // FIXME
+ void *userdata; // FIXME
Edge *EdgeA; // first segment
Edge *EdgeB; // second segment
diff --git a/source/blender/freestyle/intern/image/ImagePyramid.cpp b/source/blender/freestyle/intern/image/ImagePyramid.cpp
index b81f8303945..db92cc68286 100644
--- a/source/blender/freestyle/intern/image/ImagePyramid.cpp
+++ b/source/blender/freestyle/intern/image/ImagePyramid.cpp
@@ -61,7 +61,7 @@ ImagePyramid::~ImagePyramid()
}
}
-GrayImage * ImagePyramid::getLevel(int l)
+GrayImage *ImagePyramid::getLevel(int l)
{
return _levels[l];
}
diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h
index a0e0b578c10..976b760a325 100644
--- a/source/blender/freestyle/intern/python/BPy_Convert.h
+++ b/source/blender/freestyle/intern/python/BPy_Convert.h
@@ -98,53 +98,53 @@ extern "C" {
// C++ => Python
//==============================
-PyObject * PyBool_from_bool(bool b);
-PyObject * Vector_from_Vec2f(Vec2f& v);
-PyObject * Vector_from_Vec3f(Vec3f& v);
-PyObject * Vector_from_Vec3r(Vec3r& v);
-
-PyObject * Any_BPy_Interface0D_from_Interface0D(Interface0D& if0D);
-PyObject * Any_BPy_Interface1D_from_Interface1D(Interface1D& if1D);
-PyObject * Any_BPy_FEdge_from_FEdge(FEdge& fe);
-PyObject * Any_BPy_ViewVertex_from_ViewVertex(ViewVertex& vv);
-
-PyObject * BPy_BBox_from_BBox(const BBox< Vec3r > &bb);
-PyObject * BPy_CurvePoint_from_CurvePoint(CurvePoint& cp);
-PyObject * BPy_directedViewEdge_from_directedViewEdge(ViewVertex::directedViewEdge& dve);
-PyObject * BPy_FEdge_from_FEdge(FEdge& fe);
-PyObject * BPy_FEdgeSharp_from_FEdgeSharp(FEdgeSharp& fes);
-PyObject * BPy_FEdgeSmooth_from_FEdgeSmooth(FEdgeSmooth& fes);
-PyObject * BPy_Id_from_Id(Id& id);
-PyObject * BPy_Interface0D_from_Interface0D(Interface0D& if0D);
-PyObject * BPy_Interface1D_from_Interface1D(Interface1D& if1D);
-PyObject * BPy_IntegrationType_from_IntegrationType(IntegrationType i);
-PyObject * BPy_FrsMaterial_from_FrsMaterial(const FrsMaterial& m);
-PyObject * BPy_Nature_from_Nature(unsigned short n);
-PyObject * BPy_MediumType_from_MediumType(Stroke::MediumType n);
-PyObject * BPy_SShape_from_SShape(SShape& ss);
-PyObject * BPy_Stroke_from_Stroke(Stroke& s);
-PyObject * BPy_StrokeAttribute_from_StrokeAttribute(StrokeAttribute& sa);
-PyObject * BPy_StrokeVertex_from_StrokeVertex(StrokeVertex& sv);
-PyObject * BPy_SVertex_from_SVertex(SVertex& sv);
-PyObject * BPy_ViewVertex_from_ViewVertex(ViewVertex& vv);
-PyObject * BPy_NonTVertex_from_NonTVertex(NonTVertex& ntv);
-PyObject * BPy_TVertex_from_TVertex(TVertex& tv);
-PyObject * BPy_ViewEdge_from_ViewEdge(ViewEdge& ve);
-PyObject * BPy_Chain_from_Chain(Chain& c);
-PyObject * BPy_ViewShape_from_ViewShape(ViewShape& vs);
-
-PyObject * BPy_AdjacencyIterator_from_AdjacencyIterator(AdjacencyIterator& a_it);
-PyObject * BPy_Interface0DIterator_from_Interface0DIterator(Interface0DIterator& if0D_it, bool reversed);
-PyObject * BPy_CurvePointIterator_from_CurvePointIterator(CurveInternal::CurvePointIterator& cp_it);
-PyObject * BPy_StrokeVertexIterator_from_StrokeVertexIterator(StrokeInternal::StrokeVertexIterator& sv_it,
+PyObject *PyBool_from_bool(bool b);
+PyObject *Vector_from_Vec2f(Vec2f& v);
+PyObject *Vector_from_Vec3f(Vec3f& v);
+PyObject *Vector_from_Vec3r(Vec3r& v);
+
+PyObject *Any_BPy_Interface0D_from_Interface0D(Interface0D& if0D);
+PyObject *Any_BPy_Interface1D_from_Interface1D(Interface1D& if1D);
+PyObject *Any_BPy_FEdge_from_FEdge(FEdge& fe);
+PyObject *Any_BPy_ViewVertex_from_ViewVertex(ViewVertex& vv);
+
+PyObject *BPy_BBox_from_BBox(const BBox< Vec3r > &bb);
+PyObject *BPy_CurvePoint_from_CurvePoint(CurvePoint& cp);
+PyObject *BPy_directedViewEdge_from_directedViewEdge(ViewVertex::directedViewEdge& dve);
+PyObject *BPy_FEdge_from_FEdge(FEdge& fe);
+PyObject *BPy_FEdgeSharp_from_FEdgeSharp(FEdgeSharp& fes);
+PyObject *BPy_FEdgeSmooth_from_FEdgeSmooth(FEdgeSmooth& fes);
+PyObject *BPy_Id_from_Id(Id& id);
+PyObject *BPy_Interface0D_from_Interface0D(Interface0D& if0D);
+PyObject *BPy_Interface1D_from_Interface1D(Interface1D& if1D);
+PyObject *BPy_IntegrationType_from_IntegrationType(IntegrationType i);
+PyObject *BPy_FrsMaterial_from_FrsMaterial(const FrsMaterial& m);
+PyObject *BPy_Nature_from_Nature(unsigned short n);
+PyObject *BPy_MediumType_from_MediumType(Stroke::MediumType n);
+PyObject *BPy_SShape_from_SShape(SShape& ss);
+PyObject *BPy_Stroke_from_Stroke(Stroke& s);
+PyObject *BPy_StrokeAttribute_from_StrokeAttribute(StrokeAttribute& sa);
+PyObject *BPy_StrokeVertex_from_StrokeVertex(StrokeVertex& sv);
+PyObject *BPy_SVertex_from_SVertex(SVertex& sv);
+PyObject *BPy_ViewVertex_from_ViewVertex(ViewVertex& vv);
+PyObject *BPy_NonTVertex_from_NonTVertex(NonTVertex& ntv);
+PyObject *BPy_TVertex_from_TVertex(TVertex& tv);
+PyObject *BPy_ViewEdge_from_ViewEdge(ViewEdge& ve);
+PyObject *BPy_Chain_from_Chain(Chain& c);
+PyObject *BPy_ViewShape_from_ViewShape(ViewShape& vs);
+
+PyObject *BPy_AdjacencyIterator_from_AdjacencyIterator(AdjacencyIterator& a_it);
+PyObject *BPy_Interface0DIterator_from_Interface0DIterator(Interface0DIterator& if0D_it, bool reversed);
+PyObject *BPy_CurvePointIterator_from_CurvePointIterator(CurveInternal::CurvePointIterator& cp_it);
+PyObject *BPy_StrokeVertexIterator_from_StrokeVertexIterator(StrokeInternal::StrokeVertexIterator& sv_it,
bool reversed);
-PyObject * BPy_SVertexIterator_from_SVertexIterator(ViewEdgeInternal::SVertexIterator& sv_it);
-PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator& ove_it,
+PyObject *BPy_SVertexIterator_from_SVertexIterator(ViewEdgeInternal::SVertexIterator& sv_it);
+PyObject *BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator& ove_it,
bool reversed);
-PyObject * BPy_ViewEdgeIterator_from_ViewEdgeIterator(ViewEdgeInternal::ViewEdgeIterator& ve_it);
-PyObject * BPy_ChainingIterator_from_ChainingIterator(ChainingIterator& c_it);
-PyObject * BPy_ChainPredicateIterator_from_ChainPredicateIterator(ChainPredicateIterator& cp_it);
-PyObject * BPy_ChainSilhouetteIterator_from_ChainSilhouetteIterator(ChainSilhouetteIterator& cs_it);
+PyObject *BPy_ViewEdgeIterator_from_ViewEdgeIterator(ViewEdgeInternal::ViewEdgeIterator& ve_it);
+PyObject *BPy_ChainingIterator_from_ChainingIterator(ChainingIterator& c_it);
+PyObject *BPy_ChainPredicateIterator_from_ChainPredicateIterator(ChainPredicateIterator& cp_it);
+PyObject *BPy_ChainSilhouetteIterator_from_ChainSilhouetteIterator(ChainSilhouetteIterator& cs_it);
//==============================
// Python => C++
diff --git a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
index 548ab529f34..a6683f538c6 100644
--- a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
+++ b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
@@ -63,7 +63,7 @@ PyDoc_STRVAR(Integrator_integrate_doc,
" :class:`UnaryFunction0DUnsigned` type.\n"
" :rtype: int or float");
-static PyObject * Integrator_integrate(PyObject * /*self*/, PyObject *args, PyObject *kwds)
+static PyObject *Integrator_integrate(PyObject * /*self*/, PyObject *args, PyObject *kwds)
{
static const char *kwlist[] = {"func", "it", "it_end", "integration_type", NULL};
PyObject *obj1, *obj4 = 0;
diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
index 0fc3ec41dec..c5a07fd295b 100644
--- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
@@ -138,7 +138,7 @@ PyDoc_STRVAR(Interface1D_vertices_begin_doc,
" :return: An Interface0DIterator pointing to the first vertex.\n"
" :rtype: :class:`Interface0DIterator`");
-static PyObject * Interface1D_vertices_begin(BPy_Interface1D *self)
+static PyObject *Interface1D_vertices_begin(BPy_Interface1D *self)
{
Interface0DIterator if0D_it(self->if1D->verticesBegin());
return BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, false);
@@ -153,7 +153,7 @@ PyDoc_STRVAR(Interface1D_vertices_end_doc,
" :return: An Interface0DIterator pointing after the last vertex.\n"
" :rtype: :class:`Interface0DIterator`");
-static PyObject * Interface1D_vertices_end(BPy_Interface1D *self)
+static PyObject *Interface1D_vertices_end(BPy_Interface1D *self)
{
Interface0DIterator if0D_it(self->if1D->verticesEnd());
return BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, true);
@@ -173,7 +173,7 @@ PyDoc_STRVAR(Interface1D_points_begin_doc,
" :return: An Interface0DIterator pointing to the first point.\n"
" :rtype: :class:`Interface0DIterator`");
-static PyObject * Interface1D_points_begin(BPy_Interface1D *self, PyObject *args, PyObject *kwds)
+static PyObject *Interface1D_points_begin(BPy_Interface1D *self, PyObject *args, PyObject *kwds)
{
static const char *kwlist[] = {"t", NULL};
float f = 0.0f;
@@ -198,7 +198,7 @@ PyDoc_STRVAR(Interface1D_points_end_doc,
" :return: An Interface0DIterator pointing after the last point.\n"
" :rtype: :class:`Interface0DIterator`");
-static PyObject * Interface1D_points_end(BPy_Interface1D *self, PyObject *args, PyObject *kwds)
+static PyObject *Interface1D_points_end(BPy_Interface1D *self, PyObject *args, PyObject *kwds)
{
static const char *kwlist[] = {"t", NULL};
float f = 0.0f;
diff --git a/source/blender/freestyle/intern/python/BPy_SShape.cpp b/source/blender/freestyle/intern/python/BPy_SShape.cpp
index cf4880ad3f7..28c9e815196 100644
--- a/source/blender/freestyle/intern/python/BPy_SShape.cpp
+++ b/source/blender/freestyle/intern/python/BPy_SShape.cpp
@@ -122,7 +122,7 @@ PyDoc_STRVAR(SShape_add_vertex_doc,
" :arg vertex: An SVertex object.\n"
" :type vertex: :class:`SVertex`");
-static PyObject * SShape_add_vertex(BPy_SShape *self, PyObject *args, PyObject *kwds)
+static PyObject *SShape_add_vertex(BPy_SShape *self, PyObject *args, PyObject *kwds)
{
static const char *kwlist[] = {"edge", NULL};
PyObject *py_sv = 0;
diff --git a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
index fb7eb49127c..b390bb293d5 100644
--- a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
+++ b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
@@ -135,7 +135,7 @@ static void StrokeAttribute_dealloc(BPy_StrokeAttribute *self)
Py_TYPE(self)->tp_free((PyObject *)self);
}
-static PyObject * StrokeAttribute_repr(BPy_StrokeAttribute *self)
+static PyObject *StrokeAttribute_repr(BPy_StrokeAttribute *self)
{
stringstream repr("StrokeAttribute:");
repr << " r: " << self->sa->getColorR() << " g: " << self->sa->getColorG() << " b: " << self->sa->getColorB() <<
@@ -282,7 +282,7 @@ PyDoc_STRVAR(StrokeAttribute_set_attribute_real_doc,
" :arg value: The attribute value.\n"
" :type value: float\n");
-static PyObject * StrokeAttribute_set_attribute_real(BPy_StrokeAttribute *self, PyObject *args, PyObject *kwds)
+static PyObject *StrokeAttribute_set_attribute_real(BPy_StrokeAttribute *self, PyObject *args, PyObject *kwds)
{
static const char *kwlist[] = {"name", "value", NULL};
char *s = 0;
@@ -306,7 +306,7 @@ PyDoc_STRVAR(StrokeAttribute_set_attribute_vec2_doc,
" :arg value: The attribute value.\n"
" :type value: :class:`mathutils.Vector`, list or tuple of 2 real numbers\n");
-static PyObject * StrokeAttribute_set_attribute_vec2(BPy_StrokeAttribute *self, PyObject *args, PyObject *kwds)
+static PyObject *StrokeAttribute_set_attribute_vec2(BPy_StrokeAttribute *self, PyObject *args, PyObject *kwds)
{
static const char *kwlist[] = {"name", "value", NULL};
char *s;
@@ -335,7 +335,7 @@ PyDoc_STRVAR(StrokeAttribute_set_attribute_vec3_doc,
" :arg value: The attribute value.\n"
" :type value: :class:`mathutils.Vector`, list or tuple of 3 real numbers\n");
-static PyObject * StrokeAttribute_set_attribute_vec3(BPy_StrokeAttribute *self, PyObject *args, PyObject *kwds)
+static PyObject *StrokeAttribute_set_attribute_vec3(BPy_StrokeAttribute *self, PyObject *args, PyObject *kwds)
{
static const char *kwlist[] = {"name", "value", NULL};
char *s;
diff --git a/source/blender/freestyle/intern/scene_graph/NodeCamera.h b/source/blender/freestyle/intern/scene_graph/NodeCamera.h
index c2f70d514a8..2fc6a00f955 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeCamera.h
+++ b/source/blender/freestyle/intern/scene_graph/NodeCamera.h
@@ -68,12 +68,12 @@ public:
/*! Matrix is copied */
void setProjectionMatrix(double projection_matrix[16]);
- double * modelViewMatrix()
+ double *modelViewMatrix()
{
return modelview_matrix_;
}
- double * projectionMatrix()
+ double *projectionMatrix()
{
return projection_matrix_;
}
diff --git a/source/blender/freestyle/intern/system/PythonInterpreter.h b/source/blender/freestyle/intern/system/PythonInterpreter.h
index 4f5e94ef7a0..cb49e7718a0 100644
--- a/source/blender/freestyle/intern/system/PythonInterpreter.h
+++ b/source/blender/freestyle/intern/system/PythonInterpreter.h
@@ -112,7 +112,7 @@ public:
BKE_reports_clear(reports);
- if (!BPY_execute_string(_context, str.c_str())) {
+ if (!BPY_execute_string(_context, NULL, str.c_str())) {
BPy_errors_to_report(reports);
cerr << "\nError executing Python script from PythonInterpreter::interpretString" << endl;
cerr << "Name: " << name << endl;
diff --git a/source/blender/freestyle/intern/view_map/Interface0D.cpp b/source/blender/freestyle/intern/view_map/Interface0D.cpp
index 1d8515700d3..5cfd216cda2 100644
--- a/source/blender/freestyle/intern/view_map/Interface0D.cpp
+++ b/source/blender/freestyle/intern/view_map/Interface0D.cpp
@@ -78,7 +78,7 @@ Geometry::Vec2r Interface0D::getPoint2D() const
return 0;
}
-FEdge * Interface0D::getFEdge(Interface0D&)
+FEdge *Interface0D::getFEdge(Interface0D&)
{
PyErr_SetString(PyExc_TypeError, "method getFEdge() not properly overridden");
return 0;
@@ -96,25 +96,25 @@ Nature::VertexNature Interface0D::getNature() const
return Nature::POINT;
}
-SVertex * Interface0D::castToSVertex()
+SVertex *Interface0D::castToSVertex()
{
PyErr_SetString(PyExc_TypeError, "method castToSVertex() not properly overridden");
return 0;
}
-ViewVertex * Interface0D::castToViewVertex()
+ViewVertex *Interface0D::castToViewVertex()
{
PyErr_SetString(PyExc_TypeError, "method castToViewVertex() not properly overridden");
return 0;
}
-NonTVertex * Interface0D::castToNonTVertex()
+NonTVertex *Interface0D::castToNonTVertex()
{
PyErr_SetString(PyExc_TypeError, "method castToNonTVertex() not properly overridden");
return 0;
}
-TVertex * Interface0D::castToTVertex()
+TVertex *Interface0D::castToTVertex()
{
PyErr_SetString(PyExc_TypeError, "method castToTVertex() not properly overridden");
return 0;
diff --git a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
index f59291d910f..c0562cbb417 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
@@ -1102,17 +1102,17 @@ int save(ostream& out, ViewMap *vm, ProgressBar *pb)
// For every object, initialize its userdata member to its index in the ViewMap list
for (unsigned int i0 = 0; i0 < vm->ViewShapes().size(); i0++) {
- vm->ViewShapes()[i0]->userdata = SET_UINT_IN_POINTER(i0);
- vm->ViewShapes()[i0]->sshape()->userdata = SET_UINT_IN_POINTER(i0);
+ vm->ViewShapes()[i0]->userdata = POINTER_FROM_UINT(i0);
+ vm->ViewShapes()[i0]->sshape()->userdata = POINTER_FROM_UINT(i0);
}
for (unsigned int i1 = 0; i1 < vm->FEdges().size(); i1++)
- vm->FEdges()[i1]->userdata = SET_UINT_IN_POINTER(i1);
+ vm->FEdges()[i1]->userdata = POINTER_FROM_UINT(i1);
for (unsigned int i2 = 0; i2 < vm->SVertices().size(); i2++)
- vm->SVertices()[i2]->userdata = SET_UINT_IN_POINTER(i2);
+ vm->SVertices()[i2]->userdata = POINTER_FROM_UINT(i2);
for (unsigned int i3 = 0; i3 < vm->ViewEdges().size(); i3++)
- vm->ViewEdges()[i3]->userdata = SET_UINT_IN_POINTER(i3);
+ vm->ViewEdges()[i3]->userdata = POINTER_FROM_UINT(i3);
for (unsigned int i4 = 0; i4 < vm->ViewVertices().size(); i4++)
- vm->ViewVertices()[i4]->userdata = SET_UINT_IN_POINTER(i4);
+ vm->ViewVertices()[i4]->userdata = POINTER_FROM_UINT(i4);
// Write the current options
unsigned char flags = Options::getFlags();
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index 0fde0e2a4a9..31cf2033714 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -62,28 +62,6 @@ set(SRC
intern/gpu_shader.c
intern/gpu_texture.c
- shaders/gpu_shader_fx_lib.glsl
- shaders/gpu_shader_fx_ssao_frag.glsl
- shaders/gpu_shader_fx_dof_frag.glsl
- shaders/gpu_shader_fx_dof_vert.glsl
- shaders/gpu_shader_fx_dof_hq_frag.glsl
- shaders/gpu_shader_fx_dof_hq_vert.glsl
- shaders/gpu_shader_fx_dof_hq_geo.glsl
- shaders/gpu_shader_fx_vert.glsl
- shaders/gpu_shader_material.glsl
- shaders/gpu_shader_sep_gaussian_blur_frag.glsl
- shaders/gpu_shader_sep_gaussian_blur_vert.glsl
- shaders/gpu_shader_basic_frag.glsl
- shaders/gpu_shader_basic_vert.glsl
- shaders/gpu_shader_basic_geom.glsl
- shaders/gpu_shader_vertex.glsl
- shaders/gpu_shader_vsm_store_frag.glsl
- shaders/gpu_shader_vsm_store_vert.glsl
- shaders/gpu_shader_fx_depth_resolve.glsl
- shaders/gpu_shader_fire_frag.glsl
- shaders/gpu_shader_smoke_frag.glsl
- shaders/gpu_shader_smoke_vert.glsl
-
GPU_basic_shader.h
GPU_buffers.h
GPU_compositing.h
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h
index 1ae3d73991e..0aa6d86689e 100644
--- a/source/blender/gpu/GPU_texture.h
+++ b/source/blender/gpu/GPU_texture.h
@@ -49,10 +49,10 @@ typedef struct GPUTexture GPUTexture;
* graphics card capabilities the texture may actually be stored in a
* larger texture with power of two dimensions.
* - can use reference counting:
- * - reference counter after GPU_texture_create is 1
- * - GPU_texture_ref increases by one
- * - GPU_texture_free decreases by one, and frees if 0
- * - if created with from_blender, will not free the texture
+ * - reference counter after GPU_texture_create is 1
+ * - GPU_texture_ref increases by one
+ * - GPU_texture_free decreases by one, and frees if 0
+ * - if created with from_blender, will not free the texture
*/
typedef enum GPUHDRType {
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index cc005e5b6e1..d1e74fc8b3f 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -421,14 +421,14 @@ static void codegen_set_texid(GHash *bindhash, GPUInput *input, int *texid, void
{
if (BLI_ghash_haskey(bindhash, key)) {
/* Reuse existing texid */
- input->texid = GET_INT_FROM_POINTER(BLI_ghash_lookup(bindhash, key));
+ input->texid = POINTER_AS_INT(BLI_ghash_lookup(bindhash, key));
}
else {
/* Allocate new texid */
input->texid = *texid;
(*texid)++;
input->bindtex = true;
- BLI_ghash_insert(bindhash, key, SET_INT_IN_POINTER(input->texid));
+ BLI_ghash_insert(bindhash, key, POINTER_FROM_INT(input->texid));
}
}
@@ -478,13 +478,13 @@ static void codegen_set_unique_ids(ListBase *nodes)
if (input->ima) {
if (!BLI_ghash_haskey(definehash, input->ima)) {
input->definetex = true;
- BLI_ghash_insert(definehash, input->ima, SET_INT_IN_POINTER(input->texid));
+ BLI_ghash_insert(definehash, input->ima, POINTER_FROM_INT(input->texid));
}
}
else {
if (!BLI_ghash_haskey(definehash, input->link)) {
input->definetex = true;
- BLI_ghash_insert(definehash, input->link, SET_INT_IN_POINTER(input->texid));
+ BLI_ghash_insert(definehash, input->link, POINTER_FROM_INT(input->texid));
}
}
}
diff --git a/source/blender/gpu/intern/gpu_codegen.h b/source/blender/gpu/intern/gpu_codegen.h
index fbb6a845a96..ec2ff7615d5 100644
--- a/source/blender/gpu/intern/gpu_codegen.h
+++ b/source/blender/gpu/intern/gpu_codegen.h
@@ -46,9 +46,9 @@ struct GPUVertexAttribs;
struct PreviewImage;
/* Pass Generation
- * - Takes a list of nodes and a desired output, and makes a pass. This
- * will take ownership of the nodes and free them early if unused or
- * at the end if used.
+ * - Takes a list of nodes and a desired output, and makes a pass. This
+ * will take ownership of the nodes and free them early if unused or
+ * at the end if used.
*/
typedef enum GPUDataSource {
diff --git a/source/blender/gpu/intern/gpu_shader.c b/source/blender/gpu/intern/gpu_shader.c
index 66945b13aba..5e35b9279d4 100644
--- a/source/blender/gpu/intern/gpu_shader.c
+++ b/source/blender/gpu/intern/gpu_shader.c
@@ -280,7 +280,7 @@ static void gpu_dump_shaders(const char **code, const int num_shaders, const cha
}
/* We use the same shader index for shaders in the same program.
- * So we call this function once before calling for the invidual shaders. */
+ * So we call this function once before calling for the individual shaders. */
static int shader_index = 0;
if (code == NULL) {
shader_index++;
diff --git a/source/blender/imbuf/intern/dds/BlockDXT.cpp b/source/blender/imbuf/intern/dds/BlockDXT.cpp
index 7273ec1659c..0887576eedf 100644
--- a/source/blender/imbuf/intern/dds/BlockDXT.cpp
+++ b/source/blender/imbuf/intern/dds/BlockDXT.cpp
@@ -430,7 +430,7 @@ void AlphaBlockDXT5::decodeBlock(ColorBlock *block) const
void AlphaBlockDXT5::flip4()
{
- uint64 * b = (uint64 *)this;
+ uint64 *b = (uint64 *)this;
// @@ The masks might have to be byte swapped.
uint64 tmp = (*b & (uint64)(0x000000000000FFFFLL));
@@ -444,7 +444,7 @@ void AlphaBlockDXT5::flip4()
void AlphaBlockDXT5::flip2()
{
- uint * b = (uint *)this;
+ uint *b = (uint *)this;
// @@ The masks might have to be byte swapped.
uint tmp = (*b & 0xFF000000);
diff --git a/source/blender/imbuf/intern/dds/ColorBlock.h b/source/blender/imbuf/intern/dds/ColorBlock.h
index 7b5291cf976..67c0b64d53e 100644
--- a/source/blender/imbuf/intern/dds/ColorBlock.h
+++ b/source/blender/imbuf/intern/dds/ColorBlock.h
@@ -45,9 +45,9 @@ struct ColorBlock {
ColorBlock();
ColorBlock(const uint * linearImage);
ColorBlock(const ColorBlock & block);
- ColorBlock(const Image * img, uint x, uint y);
+ ColorBlock(const Image *img, uint x, uint y);
- void init(const Image * img, uint x, uint y);
+ void init(const Image *img, uint x, uint y);
void init(uint w, uint h, const uint * data, uint x, uint y);
void init(uint w, uint h, const float * data, uint x, uint y);
diff --git a/source/blender/imbuf/intern/dds/Image.cpp b/source/blender/imbuf/intern/dds/Image.cpp
index fd3ca1c35e6..2e9ae9da388 100644
--- a/source/blender/imbuf/intern/dds/Image.cpp
+++ b/source/blender/imbuf/intern/dds/Image.cpp
@@ -82,7 +82,7 @@ const Color32 * Image::scanline(uint h) const
return m_data + h * m_width;
}
-Color32 * Image::scanline(uint h)
+Color32 *Image::scanline(uint h)
{
if (h >= m_height) {
printf("DDS: scanline beyond dimensions of image\n");
@@ -91,12 +91,12 @@ Color32 * Image::scanline(uint h)
return m_data + h * m_width;
}
-const Color32 * Image::pixels() const
+const Color32 *Image::pixels() const
{
return m_data;
}
-Color32 * Image::pixels()
+Color32 *Image::pixels()
{
return m_data;
}
diff --git a/source/blender/imbuf/intern/dds/Image.h b/source/blender/imbuf/intern/dds/Image.h
index bb74a9d5d15..9a8bacd93a3 100644
--- a/source/blender/imbuf/intern/dds/Image.h
+++ b/source/blender/imbuf/intern/dds/Image.h
@@ -65,11 +65,11 @@ public:
uint width() const;
uint height() const;
- const Color32 * scanline(uint h) const;
- Color32 * scanline(uint h);
+ const Color32 *scanline(uint h) const;
+ Color32 *scanline(uint h);
- const Color32 * pixels() const;
- Color32 * pixels();
+ const Color32 *pixels() const;
+ Color32 *pixels();
const Color32 & pixel(uint idx) const;
Color32 & pixel(uint idx);
@@ -87,7 +87,7 @@ private:
uint m_width;
uint m_height;
Format m_format;
- Color32 * m_data;
+ Color32 *m_data;
};
diff --git a/source/blender/imbuf/intern/filetype.c b/source/blender/imbuf/intern/filetype.c
index 25bbd132a49..a5af51e3e95 100644
--- a/source/blender/imbuf/intern/filetype.c
+++ b/source/blender/imbuf/intern/filetype.c
@@ -74,7 +74,7 @@ const ImFileType IMB_FILE_TYPES[] = {
{NULL, NULL, imb_is_a_hdr, NULL, imb_ftype_default, imb_loadhdr, NULL, imb_savehdr, NULL, IM_FTYPE_FLOAT, IMB_FTYPE_RADHDR, COLOR_ROLE_DEFAULT_FLOAT},
#endif
#ifdef WITH_OPENEXR
- {imb_initopenexr, NULL, imb_is_a_openexr, NULL, imb_ftype_default, imb_load_openexr, NULL, imb_save_openexr, NULL, IM_FTYPE_FLOAT, IMB_FTYPE_OPENEXR, COLOR_ROLE_DEFAULT_FLOAT},
+ {imb_initopenexr, imb_exitopenexr, imb_is_a_openexr, NULL, imb_ftype_default, imb_load_openexr, NULL, imb_save_openexr, NULL, IM_FTYPE_FLOAT, IMB_FTYPE_OPENEXR, COLOR_ROLE_DEFAULT_FLOAT},
#endif
#ifdef WITH_OPENJPEG
{NULL, NULL, imb_is_a_jp2, NULL, imb_ftype_default, imb_load_jp2, NULL, imb_save_jp2, NULL, IM_FTYPE_FLOAT, IMB_FTYPE_JP2, COLOR_ROLE_DEFAULT_BYTE},
diff --git a/source/blender/imbuf/intern/filter.c b/source/blender/imbuf/intern/filter.c
index decbfd6d5b9..da64403de44 100644
--- a/source/blender/imbuf/intern/filter.c
+++ b/source/blender/imbuf/intern/filter.c
@@ -42,10 +42,6 @@
#include "imbuf.h"
-/************************************************************************/
-/* FILTERS */
-/************************************************************************/
-
static void filtrow(unsigned char *point, int x)
{
unsigned int c1, c2, c3, error;
diff --git a/source/blender/imbuf/intern/imageprocess.c b/source/blender/imbuf/intern/imageprocess.c
index 2eec5da7bc4..507455c47f4 100644
--- a/source/blender/imbuf/intern/imageprocess.c
+++ b/source/blender/imbuf/intern/imageprocess.c
@@ -391,7 +391,7 @@ static void processor_apply_scanline_func(TaskPool * __restrict pool,
int UNUSED(threadid))
{
ScanlineGlobalData *data = BLI_task_pool_userdata(pool);
- int start_scanline = GET_INT_FROM_POINTER(taskdata);
+ int start_scanline = POINTER_AS_INT(taskdata);
int num_scanlines = min_ii(data->scanlines_per_task,
data->total_scanlines - start_scanline);
data->do_thread(data->custom_data,
@@ -415,7 +415,7 @@ void IMB_processor_apply_threaded_scanlines(int total_scanlines,
for (int i = 0, start_line = 0; i < total_tasks; i++) {
BLI_task_pool_push(task_pool,
processor_apply_scanline_func,
- SET_INT_IN_POINTER(start_line),
+ POINTER_FROM_INT(start_line),
false,
TASK_PRIORITY_LOW);
start_line += scanlines_per_task;
diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c
index 50690cfa047..11f799a33d2 100644
--- a/source/blender/imbuf/intern/iris.c
+++ b/source/blender/imbuf/intern/iris.c
@@ -124,7 +124,7 @@ static int compressrow(uchar *lbuf, uchar *rlebuf, int z, int cnt);
static void lumrow(uchar *rgbptr, uchar *lumptr, int n);
/*
- * byte order independent read/write of shorts and ints.
+ * byte order independent read/write of shorts and ints.
*
*/
@@ -245,9 +245,9 @@ int imb_is_a_iris(const uchar *mem)
}
/*
- * longimagedata -
- * read in a B/W RGB or RGBA iris image file and return a
- * pointer to an array of ints.
+ * longimagedata -
+ * read in a B/W RGB or RGBA iris image file and return a
+ * pointer to an array of ints.
*
*/
diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c
index 2febbb1f861..896c25ffd65 100644
--- a/source/blender/imbuf/intern/jpeg.c
+++ b/source/blender/imbuf/intern/jpeg.c
@@ -367,7 +367,7 @@ static ImBuf *ibJpegImageFromCinfo(struct jpeg_decompress_struct *cinfo, int fla
* Because JPEG format don't support the
* pair "key/value" like PNG, we store the
* stampinfo in a single "encode" string:
- * "Blender:key:value"
+ * "Blender:key:value"
*
* That is why we need split it to the
* common key/value here.
@@ -493,7 +493,7 @@ static void write_jpeg(struct jpeg_compress_struct *cinfo, struct ImBuf *ibuf)
* The JPEG format don't support a pair "key/value"
* like PNG, so we "encode" the stamp in a
* single string:
- * "Blender:key:value"
+ * "Blender:key:value"
*
* The first "Blender" is a simple identify to help
* in the read process.
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index e8e6e0576ed..bad5e0efd65 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -1921,4 +1921,12 @@ void imb_initopenexr(void)
setGlobalThreadCount(num_threads);
}
+void imb_exitopenexr(void)
+{
+ /* Tells OpenEXR to free thread pool, also ensures there is no running
+ * tasks.
+ */
+ setGlobalThreadCount(0);
+}
+
} // export "C"
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.h b/source/blender/imbuf/intern/openexr/openexr_api.h
index 92bbeecfd5d..32d276b31ea 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.h
+++ b/source/blender/imbuf/intern/openexr/openexr_api.h
@@ -40,6 +40,7 @@ extern "C" {
#include <stdio.h>
void imb_initopenexr (void);
+void imb_exitopenexr (void);
int imb_is_a_openexr (const unsigned char *mem);
diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c
index 43c5a9d3597..abd13376c72 100644
--- a/source/blender/imbuf/intern/scaling.c
+++ b/source/blender/imbuf/intern/scaling.c
@@ -45,11 +45,6 @@
#include "BLI_sys_types.h" // for intptr_t support
-/************************************************************************/
-/* SCALING */
-/************************************************************************/
-
-
static void imb_half_x_no_alloc(struct ImBuf *ibuf2, struct ImBuf *ibuf1)
{
uchar *p1, *_p1, *dest;
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 0c7341b0fae..e9bc0f41980 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -176,9 +176,9 @@ enum ePreviewImage_Flag {
/* for PreviewImage->tag */
enum {
- PRV_TAG_DEFFERED = (1 << 0), /* Actual loading of preview is deffered. */
- PRV_TAG_DEFFERED_RENDERING = (1 << 1), /* Deffered preview is being loaded. */
- PRV_TAG_DEFFERED_DELETE = (1 << 2), /* Deffered preview should be deleted asap. */
+ PRV_TAG_DEFFERED = (1 << 0), /* Actual loading of preview is deferred. */
+ PRV_TAG_DEFFERED_RENDERING = (1 << 1), /* Deferred preview is being loaded. */
+ PRV_TAG_DEFFERED_DELETE = (1 << 2), /* Deferred preview should be deleted asap. */
};
typedef struct PreviewImage {
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index e255b85ebe3..bcb92cccecd 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -67,7 +67,7 @@ typedef enum eMotionPathVert_Flag {
/* ........ */
/* Motion Path data cache (mpath)
- * - for elements providing transforms (i.e. Objects or PoseChannels)
+ * - for elements providing transforms (i.e. Objects or PoseChannels)
*/
typedef struct bMotionPath {
bMotionPathVert *points; /* path samples */
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h
index d0a21b50d45..5119c06f927 100644
--- a/source/blender/makesdna/DNA_anim_types.h
+++ b/source/blender/makesdna/DNA_anim_types.h
@@ -125,7 +125,7 @@ typedef enum eFMod_Generator_Modes {
/* generator flags
- * - shared by Generator and Function Generator
+ * - shared by Generator and Function Generator
*/
typedef enum eFMod_Generator_Flags {
/* generator works in conjunction with other modifiers (i.e. doesn't replace those before it) */
@@ -136,7 +136,7 @@ typedef enum eFMod_Generator_Flags {
/* 'Built-In Function' Generator modifier data
*
* This uses the general equation for equations:
- * y = amplitude * fn(phase_multiplier*x + phase_offset) + y_offset
+ * y = amplitude * fn(phase_multiplier*x + phase_offset) + y_offset
*
* where amplitude, phase_multiplier/offset, y_offset are user-defined coefficients,
* x is the evaluation 'time', and 'y' is the resultant value
@@ -353,7 +353,7 @@ typedef enum eDriverVar_Types {
/* maximum number of variable types
* NOTE: this must always be th last item in this list,
- * so add new types above this line
+ * so add new types above this line.
*/
MAX_DVAR_TYPES
} eDriverVar_Types;
@@ -571,9 +571,9 @@ typedef enum eFCurve_Smoothing {
*
* Defines what parts of the paths should be remapped from 'abc' to 'xyz'.
* TODO:
- * - Regrex (possibly provided through PY, though having our own module might be faster)
- * would be important to have at some point. Current replacements are just simple
- * string matches...
+ * - Regrex (possibly provided through PY, though having our own module might be faster)
+ * would be important to have at some point. Current replacements are just simple
+ * string matches...
*/
typedef struct AnimMapPair {
char from[128]; /* part of path to bed replaced */
@@ -793,7 +793,7 @@ typedef enum eKSP_Grouping {
/* path should be grouped using KeyingSet's name */
KSP_GROUP_KSNAME,
/* path should be grouped using name of inner-most context item from templates
- * - this is most useful for relative KeyingSets only
+ * - this is most useful for relative KeyingSets only
*/
KSP_GROUP_TEMPLATE_ITEM
} eKSP_Grouping;
diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h
index f1fe370788d..a7c9c934304 100644
--- a/source/blender/makesdna/DNA_armature_types.h
+++ b/source/blender/makesdna/DNA_armature_types.h
@@ -111,7 +111,7 @@ typedef struct bArmature {
unsigned int layer_used; /* for UI, to show which layers are there */
unsigned int layer, layer_protected; /* for buttons to work, both variables in this order together */
-// XXX deprecated... old animaton system (armature only viz) ---
+// XXX deprecated... old animation system (armature only viz) ---
short ghostep, ghostsize; /* number of frames to ghosts to show, and step between them */
short ghosttype, pathsize; /* ghost drawing options and number of frames between points of path */
int ghostsf, ghostef; /* start and end frames of ghost-drawing range */
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
index 2ae686d178e..e49cd65fa9b 100644
--- a/source/blender/makesdna/DNA_constraint_types.h
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -54,19 +54,19 @@ typedef struct bConstraintChannel {
typedef struct bConstraint {
struct bConstraint *next, *prev;
- void *data; /* Constraint data (a valid constraint type) */
- short type; /* Constraint type */
- short flag; /* Flag - General Settings */
+ void *data; /* Constraint data (a valid constraint type) */
+ short type; /* Constraint type */
+ short flag; /* Flag - General Settings */
- char ownspace; /* Space that owner should be evaluated in */
- char tarspace; /* Space that target should be evaluated in (only used if 1 target) */
+ char ownspace; /* Space that owner should be evaluated in */
+ char tarspace; /* Space that target should be evaluated in (only used if 1 target) */
- char name[64]; /* Constraint name, MAX_NAME */
+ char name[64]; /* Constraint name, MAX_NAME */
short pad;
float enforce; /* Amount of influence exherted by constraint (0.0-1.0) */
- float headtail; /* Point along subtarget bone where the actual target is. 0=head (default for all), 1=tail*/
+ float headtail; /* Point along subtarget bone where the actual target is. 0=head (default for all), 1=tail*/
struct Ipo *ipo DNA_DEPRECATED; /* local influence ipo or driver */ /* old animation system, deprecated for 2.5 */
@@ -103,10 +103,10 @@ typedef enum eConstraintTargetFlag {
/* bConstraintTarget/bConstraintOb -> type */
typedef enum eConstraintObType {
- CONSTRAINT_OBTYPE_OBJECT = 1, /* string is "" */
- CONSTRAINT_OBTYPE_BONE = 2, /* string is bone-name */
- CONSTRAINT_OBTYPE_VERT = 3, /* string is vertex-group name */
- CONSTRAINT_OBTYPE_CV = 4 /* string is vertex-group name - is not available until curves get vgroups */
+ CONSTRAINT_OBTYPE_OBJECT = 1, /* string is "" */
+ CONSTRAINT_OBTYPE_BONE = 2, /* string is bone-name */
+ CONSTRAINT_OBTYPE_VERT = 3, /* string is vertex-group name */
+ CONSTRAINT_OBTYPE_CV = 4 /* string is vertex-group name - is not available until curves get vgroups */
} eConstraintObType;
@@ -121,7 +121,7 @@ typedef struct bPythonConstraint {
ListBase targets; /* a list of targets that this constraint has (bConstraintTarget-s) */
struct Object *tar; /* target from previous implementation (version-patch sets this to NULL on file-load) */
- char subtarget[64]; /* subtarger from previous implentation (version-patch sets this to "" on file-load), MAX_ID_NAME-2 */
+ char subtarget[64]; /* subtarger from previous implementation (version-patch sets this to "" on file-load), MAX_ID_NAME-2 */
} bPythonConstraint;
@@ -364,14 +364,14 @@ typedef struct bTransformConstraint {
/* Pivot Constraint */
typedef struct bPivotConstraint {
/* Pivot Point:
- * Either target object + offset, or just offset is used
+ * Either target object + offset, or just offset is used
*/
struct Object *tar; /* target object (optional) */
char subtarget[64]; /* subtarget name (optional), MAX_ID_NAME-2 */
float offset[3]; /* offset from the target to use, regardless of whether it exists */
/* Rotation-driven activation:
- * This option provides easier one-stop setups for footrolls
+ * This option provides easier one-stop setups for footrolls
*/
short rotAxis; /* rotation axes to consider for this (ePivotConstraint_Axis) */
@@ -467,8 +467,8 @@ typedef struct bTransformCacheConstraint {
/* ------------------------------------------ */
/* bConstraint->type
- * - Do not ever change the order of these, or else files could get
- * broken as their correct value cannot be resolved
+ * - Do not ever change the order of these, or else files could get
+ * broken as their correct value cannot be resolved
*/
typedef enum eBConstraint_Types {
CONSTRAINT_TYPE_NULL = 0, /* Invalid/legacy constraint */
@@ -641,7 +641,7 @@ typedef enum eTrackTo_Flags {
TARGET_Z_UP = (1<<0)
} eTrackTo_Flags;
-/* Strech To Constraint -> volmode */
+/* Stretch To Constraint -> volmode */
typedef enum eStretchTo_VolMode {
VOLUME_XZ = 0,
VOLUME_X = 1,
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
index 45f2d6c70e4..d5ef18bd1b8 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -38,9 +38,9 @@ struct AnimData;
struct CurveMapping;
/* Grease-Pencil Annotations - 'Stroke Point'
- * -> Coordinates may either be 2d or 3d depending on settings at the time
- * -> Coordinates of point on stroke, in proportions of window size
- * This assumes that the bottom-left corner is (0,0)
+ * -> Coordinates may either be 2d or 3d depending on settings at the time
+ * -> Coordinates of point on stroke, in proportions of window size
+ * This assumes that the bottom-left corner is (0,0)
*/
typedef struct bGPDspoint {
float x, y, z; /* co-ordinates of point (usually 2d, but can be 3d as well) */
@@ -153,14 +153,14 @@ typedef enum eGPDpalette_Flag {
} eGPDpalette_Flag;
/* Grease-Pencil Annotations - 'Stroke'
- * -> A stroke represents a (simplified version) of the curve
- * drawn by the user in one 'mousedown'->'mouseup' operation
+ * -> A stroke represents a (simplified version) of the curve
+ * drawn by the user in one 'mousedown'->'mouseup' operation
*/
typedef struct bGPDstroke {
struct bGPDstroke *next, *prev;
bGPDspoint *points; /* array of data-points for stroke */
- bGPDtriangle *triangles;/* tesselated triangles for GP Fill */
+ bGPDtriangle *triangles;/* tessellated triangles for GP Fill */
int totpoints; /* number of data-points in array */
int tot_triangles; /* number of triangles in array */
@@ -199,7 +199,7 @@ typedef enum eGPDstroke_Flag {
} eGPDstroke_Flag;
/* Grease-Pencil Annotations - 'Frame'
- * -> Acts as storage for the 'image' formed by strokes
+ * -> Acts as storage for the 'image' formed by strokes
*/
typedef struct bGPDframe {
struct bGPDframe *next, *prev;
@@ -293,8 +293,8 @@ typedef struct bGPdata {
int flag; /* settings for this datablock */
/* not-saved stroke buffer data (only used during paint-session)
- * - buffer must be initialized before use, but freed after
- * whole paint operation is over
+ * - buffer must be initialized before use, but freed after
+ * whole paint operation is over
*/
short sbuffer_size; /* number of elements currently in cache */
short sbuffer_sflag; /* flags for stroke that cache represents */
diff --git a/source/blender/makesdna/DNA_mask_types.h b/source/blender/makesdna/DNA_mask_types.h
index b84292d0519..9d4b68b7242 100644
--- a/source/blender/makesdna/DNA_mask_types.h
+++ b/source/blender/makesdna/DNA_mask_types.h
@@ -88,7 +88,7 @@ typedef struct MaskSplinePoint {
typedef struct MaskSpline {
struct MaskSpline *next, *prev;
- short flag; /* defferent spline flag (closed, ...) */
+ short flag; /* different spline flag (closed, ...) */
char offset_mode; /* feather offset method */
char weight_interp; /* weight interpolation */
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 00ae9ff8b60..2adf4a02d22 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -192,8 +192,9 @@ typedef struct MaskModifierData {
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 */
+ short mode; /* using armature or hardcoded vgroup */
+ short flag; /* flags for various things */
+ float threshold;
} MaskModifierData;
/* Mask Modifier -> mode */
@@ -870,7 +871,7 @@ typedef struct SimpleDeformModifierData {
float limit[2]; /* lower and upper limit */
char mode; /* deform function */
- char axis; /* lock axis (for taper and strech) */
+ char axis; /* lock axis (for taper and stretch) */
char deform_axis; /* axis to perform the deform on (default is X, but can be overridden by origin */
char flag;
diff --git a/source/blender/makesdna/DNA_object_fluidsim_types.h b/source/blender/makesdna/DNA_object_fluidsim_types.h
index 0b0c1c40ef4..9ddae38edf2 100644
--- a/source/blender/makesdna/DNA_object_fluidsim_types.h
+++ b/source/blender/makesdna/DNA_object_fluidsim_types.h
@@ -102,7 +102,7 @@ typedef struct FluidsimSettings {
/* additional flags depending on the type, lower short contains flags
* to check validity, higher short additional flags */
short typeFlags;
- /* switch off velocity genration, volume init type for fluid/obstacles (volume=1, shell=2, both=3) */
+ /* switch off velocity generation, volume init type for fluid/obstacles (volume=1, shell=2, both=3) */
char domainNovecgen, volumeInitType;
/* boundary "stickiness" for part slip values */
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index a96354f05c1..26a99f49d86 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -106,7 +106,7 @@ typedef struct ParticleData {
int totkey; /* amount of hair or keyed keys*/
- float time, lifetime; /* dietime is not nescessarily time+lifetime as */
+ float time, lifetime; /* dietime is not necessarily time+lifetime as */
float dietime; /* particles can die unnaturally (collision). */
/* WARNING! Those two indices, when not affected to vertices, are for !!! TESSELLATED FACES !!!, not POLYGONS! */
@@ -355,7 +355,7 @@ typedef enum eParticleDrawFlag {
} eParticleDrawFlag;
/* part->type */
-/* hair is allways baked static in object/geometry space */
+/* hair is always baked static in object/geometry space */
/* other types (normal particles) are in global space and not static baked */
#define PART_EMITTER 0
//#define PART_REACTOR 1
diff --git a/source/blender/makesdna/DNA_rigidbody_types.h b/source/blender/makesdna/DNA_rigidbody_types.h
index 19e49644816..dbfd3921b8b 100644
--- a/source/blender/makesdna/DNA_rigidbody_types.h
+++ b/source/blender/makesdna/DNA_rigidbody_types.h
@@ -102,7 +102,7 @@ typedef struct RigidBodyOb {
short shape; /* (eRigidBody_Shape) collision shape to use */
int flag; /* (eRigidBodyOb_Flag) */
- int col_groups; /* Collision groups that determines wich rigid bodies can collide with each other */
+ int col_groups; /* Collision groups that determines which rigid bodies can collide with each other */
short mesh_source; /* (eRigidBody_MeshSource) mesh source for mesh based collision shapes */
short pad;
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 505b89f4c94..c7bba869ef4 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -141,6 +141,14 @@ typedef enum eFFMpegCrf {
FFM_CRF_LOWEST = 32,
} eFFMpegCrf;
+typedef enum eFFMpegAudioChannels {
+ FFM_CHANNELS_MONO = 1,
+ FFM_CHANNELS_STEREO = 2,
+ FFM_CHANNELS_SURROUND4 = 4,
+ FFM_CHANNELS_SURROUND51 = 6,
+ FFM_CHANNELS_SURROUND71 = 8,
+} eFFMpegAudioChannels;
+
typedef struct FFMpegCodecData {
int type;
int codec;
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index ef076c98b5f..6e2fd412445 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -126,7 +126,7 @@ typedef struct Strip {
* each of the strips uses a different sequence structure.
*
* \warning The first part identical to ID (for use in ipo's)
- * the commend above is historic, probably we can drop the ID compatibility,
+ * the comment above is historic, probably we can drop the ID compatibility,
* but take care making this change.
*
* \warning This is really a 'Strip' in the UI!, name is highly confusing.
diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h
index d74d46aebbd..ee7e080f39b 100644
--- a/source/blender/makesdna/DNA_smoke_types.h
+++ b/source/blender/makesdna/DNA_smoke_types.h
@@ -113,7 +113,7 @@ enum {
#define SM_HRES_LINEAR 1
#define SM_HRES_FULLSAMPLE 2
-/* smoke data fileds (active_fields) */
+/* smoke data fields (active_fields) */
#define SM_ACTIVE_HEAT (1<<0)
#define SM_ACTIVE_FIRE (1<<1)
#define SM_ACTIVE_COLORS (1<<2)
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 6879c3044a6..e94364e8a65 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -423,7 +423,7 @@ typedef struct SpaceNla {
/* SpaceNla.flag */
typedef enum eSpaceNla_Flag {
- /* flags (1<<0), (1<<1), and (1<<3) are deprecated flags from old verisons */
+ /* flags (1<<0), (1<<1), and (1<<3) are deprecated flags from old versions */
/* draw timing in seconds instead of frames */
SNLA_DRAWTIME = (1 << 2),
diff --git a/source/blender/makesdna/DNA_tracking_types.h b/source/blender/makesdna/DNA_tracking_types.h
index 42b72c1ff93..bfd9edceab4 100644
--- a/source/blender/makesdna/DNA_tracking_types.h
+++ b/source/blender/makesdna/DNA_tracking_types.h
@@ -108,7 +108,7 @@ typedef struct MovieTrackingTrack {
char name[64]; /* MAX_NAME */
- /* ** setings ** */
+ /* ** settings ** */
/* positions of left-bottom and right-top corners of pattern (in unified 0..1 units,
* relative to marker->pos)
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index e8cc4fbe38f..aea5f0fd87b 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -59,7 +59,7 @@ typedef enum eUIFont_ID {
UIFONT_CUSTOM2 = 3
} eUIFont_ID;
-/* default fonts to load/initalize */
+/* default fonts to load/initialize */
/* first font is the default (index 0), others optional */
typedef struct uiFont {
struct uiFont *next, *prev;
@@ -168,7 +168,7 @@ typedef struct ThemeUI {
uiWidgetStateColors wcol_state;
- uiPanelColors panel; /* depricated, but we keep it for do_versions (2.66.1) */
+ uiPanelColors panel; /* deprecated, but we keep it for do_versions (2.66.1) */
char widget_emboss[4];
@@ -513,7 +513,7 @@ typedef struct UserDef {
short rvisize; /* rotating view icon size */
short rvibright; /* rotating view icon brightness */
short recent_files; /* maximum number of recently used files to remember */
- short smooth_viewtx; /* miliseconds to spend spinning the view */
+ short smooth_viewtx; /* milliseconds to spend spinning the view */
short glreslimit;
short curssize;
short color_picker_type; /* eColorPicker_Types */
@@ -670,7 +670,7 @@ typedef enum eUserpref_UI_Flag {
USER_PLAINMENUS = (1 << 5),
USER_LOCK_CURSOR_ADJUST = (1 << 6),
/* Avoid accidentally adjusting the layout
- * (exact behavior may change based on whats considered reasonable to lock down). */
+ * (exact behavior may change based on what's considered reasonable to lock down). */
USER_UIFLAG_DEPRECATED_7 = (1 << 7),
USER_ALLWINCODECS = (1 << 8),
USER_MENUOPENAUTO = (1 << 9),
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index 7e55eb4633e..c76a447097e 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -174,7 +174,7 @@ enum {
# endif
#endif
-/* the savable part, rest of data is local in ghostwinlay */
+/* the saveable part, rest of data is local in ghostwinlay */
typedef struct wmWindow {
struct wmWindow *next, *prev;
diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c
index d8d29c9c812..077bae741b8 100644
--- a/source/blender/makesdna/intern/dna_genfile.c
+++ b/source/blender/makesdna/intern/dna_genfile.c
@@ -102,7 +102,7 @@
*
* ALLOWED AND TESTED CHANGES IN STRUCTS:
* - type change (a char to float will be divided by 255)
- * - location within a struct (everthing can be randomly mixed up)
+ * - location within a struct (everything can be randomly mixed up)
* - struct within struct (within struct etc), this is recursive
* - adding new elements, will be default initialized zero
* - removing elements
@@ -271,7 +271,7 @@ int DNA_struct_find_nr_ex(const SDNA *sdna, const char *str, unsigned int *index
index_p = BLI_ghash_lookup_p(sdna->structs_map, str);
if (index_p) {
- a = GET_INT_FROM_POINTER(*index_p);
+ a = POINTER_AS_INT(*index_p);
*index_last = a;
}
else {
@@ -500,7 +500,7 @@ static bool init_structDNA(
for (intptr_t nr = 0; nr < sdna->nr_structs; nr++) {
sp = sdna->structs[nr];
- BLI_ghash_insert(sdna->structs_map, (void *)sdna->types[sp[0]], SET_INT_IN_POINTER(nr));
+ BLI_ghash_insert(sdna->structs_map, (void *)sdna->types[sp[0]], POINTER_FROM_INT(nr));
}
}
#endif
@@ -901,7 +901,7 @@ static int elem_strcmp(const char *name, const char *oname)
* \param type Current field type name
* \param name Current field name
* \param old Pointer to struct information in sdna
- * \return true when existsing, false otherwise.
+ * \return true when existing, false otherwise.
*/
static bool elem_exists(
const SDNA *sdna,
@@ -1259,7 +1259,7 @@ void DNA_struct_switch_endian(const SDNA *oldsdna, int oldSDNAnr, char *data)
else if (ELEM(spc[0], SDNA_TYPE_INT, SDNA_TYPE_FLOAT)) {
/* note, intentionally ignore long/ulong here these could be 4 or 8 bits,
* but turns out we only used for runtime vars and
- * only once for a struct type thats no longer used. */
+ * only once for a struct type that's no longer used. */
BLI_endian_switch_int32_array((int32_t *)cur, DNA_elem_array_size(name));
}
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index 3b8d0e01ace..5d5efda975f 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -152,10 +152,10 @@ static short **structs, *structdata; /* at sp = structs[a] is the first address
/**
* Variable to control debug output of makesdna.
* debugSDNA:
- * - 0 = no output, except errors
- * - 1 = detail actions
- * - 2 = full trace, tell which names and types were found
- * - 4 = full trace, plus all gritty details
+ * - 0 = no output, except errors
+ * - 1 = detail actions
+ * - 2 = full trace, tell which names and types were found
+ * - 4 = full trace, plus all gritty details
*/
static int debugSDNA = 0;
static int additional_slen_offset;
@@ -984,7 +984,7 @@ static int make_structDNA(const char *baseDirectory, FILE *file, FILE *file_offs
printf("Running makesdna at debug level %d\n", debugSDNA);
}
- /* the longest known struct is 50k, so we assume 100k is sufficent! */
+ /* the longest known struct is 50k, so we assume 100k is sufficient! */
namedata = MEM_callocN(maxdata, "namedata");
typedata = MEM_callocN(maxdata, "typedata");
structdata = MEM_callocN(maxdata, "structdata");
@@ -1258,7 +1258,7 @@ int main(int argc, char **argv)
return(return_status);
}
-/* handy but fails on struct bounds which makesdna doesnt care about
+/* handy but fails on struct bounds which makesdna doesn't care about
* with quite the same strictness as GCC does */
#if 0
/* include files for automatic dependencies */
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index 05a166f4664..0d972a118e8 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -400,7 +400,7 @@ typedef struct ParameterDynAlloc {
typedef enum FunctionFlag {
/***** Options affecting callback signature. *****/
- /* Those add additionnal parameters at the beginning of the C callback, like that:
+ /* Those add additional parameters at the beginning of the C callback, like that:
* rna_my_func([ID *_selfid],
* [<DNA_STRUCT> *self|StructRNA *type],
* [Main *bmain],
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 4b58e13d994..a47426861b1 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -49,8 +49,8 @@
/**
* Variable to control debug output of makesrna.
* debugSRNA:
- * - 0 = no output, except errors
- * - 1 = detail actions
+ * - 0 = no output, except errors
+ * - 1 = detail actions
*/
static int debugSRNA = 0;
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 6335869ca43..bebf232b3b9 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -376,7 +376,7 @@ static struct ID *rna_ID_make_local(struct ID *self, Main *bmain, bool clear_pro
}
-static AnimData * rna_ID_animation_data_create(ID *id, Main *bmain)
+static AnimData *rna_ID_animation_data_create(ID *id, Main *bmain)
{
AnimData *adt = BKE_animdata_add_id(id);
DAG_relations_tag_update(bmain);
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index d805d6138a7..51293340a6c 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -6872,7 +6872,7 @@ int RNA_function_call_direct_va(bContext *C, ReportList *reports, PointerRNA *pt
case PROP_COLLECTION:
{
StructRNA *srna = va_arg(args, StructRNA *);
- ListBase **arg = va_arg(args, ListBase * *);
+ ListBase **arg = va_arg(args, ListBase **);
err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, arg, retdata,
srna, tid, fid, pid);
break;
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index 7af3746b855..6c728ac50e5 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -886,7 +886,7 @@ static void rna_def_edit_bone(BlenderRNA *brna)
/* calculated and read only, not actual data access */
prop = RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
- /*RNA_def_property_float_sdna(prop, NULL, ""); *//* doesnt access any real data */
+ /*RNA_def_property_float_sdna(prop, NULL, ""); *//* doesn't access any real data */
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
//RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_flag(prop, PROP_THICK_WRAP); /* no reference to original data */
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 1afa462dba8..4fba7a91a32 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -526,7 +526,7 @@ static const EnumPropertyItem *rna_Brush_direction_itemf(bContext *C, PointerRNA
Brush *me = (Brush *)(ptr->data);
switch (mode) {
- case ePaintSculpt:
+ case PAINT_MODE_SCULPT:
switch (me->sculpt_tool) {
case SCULPT_TOOL_DRAW:
case SCULPT_TOOL_CREASE:
@@ -567,8 +567,8 @@ static const EnumPropertyItem *rna_Brush_direction_itemf(bContext *C, PointerRNA
return prop_default_items;
}
- case ePaintTexture2D:
- case ePaintTextureProjective:
+ case PAINT_MODE_TEXTURE_2D:
+ case PAINT_MODE_TEXTURE_3D:
switch (me->imagepaint_tool) {
case PAINT_TOOL_SOFTEN:
return prop_soften_sharpen_items;
@@ -597,9 +597,9 @@ static const EnumPropertyItem *rna_Brush_stroke_itemf(bContext *C, PointerRNA *U
};
switch (mode) {
- case ePaintSculpt:
- case ePaintTexture2D:
- case ePaintTextureProjective:
+ case PAINT_MODE_SCULPT:
+ case PAINT_MODE_TEXTURE_2D:
+ case PAINT_MODE_TEXTURE_3D:
return sculpt_stroke_method_items;
default:
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index aa1164068d8..2dac5439c80 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -222,7 +222,7 @@ static char *rna_ColorRampElement_path(PointerRNA *ptr)
int index;
/* helper macro for use here to try and get the path
- * - this calls the standard code for getting a path to a texture...
+ * - this calls the standard code for getting a path to a texture...
*/
#define COLRAMP_GETPATH \
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 697e23a414a..d004491a33b 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -425,7 +425,7 @@ static int rna_validate_identifier(const char *identifier, char *error, bool pro
*/
static const char *kwlist[] = {
/* "False", "None", "True", */
- "and", "as", "assert", "break",
+ "and", "as", "assert", "async", "await", "break",
"class", "continue", "def", "del", "elif", "else", "except",
"finally", "for", "from", "global", "if", "import", "in",
"is", "lambda", "nonlocal", "not", "or", "pass", "raise",
diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c
index c82c95e5a4b..42f8e2ae787 100644
--- a/source/blender/makesrna/intern/rna_dynamicpaint.c
+++ b/source/blender/makesrna/intern/rna_dynamicpaint.c
@@ -93,7 +93,7 @@ static char *rna_DynamicPaintSurface_path(PointerRNA *ptr)
/*
- * Surfaces
+ * Surfaces
*/
static void rna_DynamicPaint_redoModifier(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
@@ -510,7 +510,7 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
/*
- * Initial Color
+ * Initial Color
*/
prop = RNA_def_property(srna, "init_color_type", PROP_ENUM, PROP_NONE);
@@ -535,7 +535,7 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING_DRAW | ND_MODIFIER, "rna_DynamicPaintSurface_reset");
/*
- * Effect Settings
+ * Effect Settings
*/
prop = RNA_def_property(srna, "effect_ui", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
@@ -755,7 +755,7 @@ static void rna_def_dynamic_paint_canvas_settings(BlenderRNA *brna)
RNA_def_struct_path_func(srna, "rna_DynamicPaintCanvasSettings_path");
/*
- * Surface Slots
+ * Surface Slots
*/
prop = RNA_def_property(srna, "canvas_surfaces", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_funcs(prop, "rna_DynamicPaint_surfaces_begin", "rna_iterator_listbase_next",
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index 9dbc9a62aa4..92f6bb16340 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -111,8 +111,10 @@ static StructRNA *rna_FModifierType_refine(struct PointerRNA *ptr)
return &RNA_FModifierCycles;
case FMODIFIER_TYPE_NOISE:
return &RNA_FModifierNoise;
- /*case FMODIFIER_TYPE_FILTER: */
- /* return &RNA_FModifierFilter; */
+#if 0
+ case FMODIFIER_TYPE_FILTER:
+ return &RNA_FModifierFilter;
+#endif
case FMODIFIER_TYPE_PYTHON:
return &RNA_FModifierPython;
case FMODIFIER_TYPE_LIMITS:
@@ -1026,8 +1028,8 @@ static void rna_def_fmodifier_envelope_ctrl(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "FCM_EnvelopeData");
/* min/max extents
- * - for now, these are allowed to go past each other, so that we can have inverted action
- * - technically, the range is limited by the settings in the envelope-modifier data, not here...
+ * - for now, these are allowed to go past each other, so that we can have inverted action
+ * - technically, the range is limited by the settings in the envelope-modifier data, not here...
*/
prop = RNA_def_property(srna, "min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "min");
@@ -1046,7 +1048,7 @@ static void rna_def_fmodifier_envelope_ctrl(BlenderRNA *brna)
RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, "rna_FModifier_update");
/* TODO: */
- /* - selection flags (not implemented in UI yet though) */
+ /* - selection flags (not implemented in UI yet though) */
}
static void rna_def_fmodifier_envelope_control_points(BlenderRNA *brna, PropertyRNA *cprop)
@@ -1569,7 +1571,7 @@ static void rna_def_drivervar(BlenderRNA *brna)
static void rna_def_channeldriver_variables(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
-/* PropertyRNA *prop; */
+ /* PropertyRNA *prop; */
FunctionRNA *func;
PropertyRNA *parm;
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index 90af65497a4..625ef7db2dc 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -263,7 +263,7 @@ static const EnumPropertyItem *rna_Object_parent_type_itemf(
Object *par = gpl->parent;
if (par->type == OB_ARMATURE) {
- /* special hack: prevents this being overrided */
+ /* special hack: prevents this being overridden */
RNA_enum_items_add_value(&item, &totitem, &parent_type_items[1], PARSKEL);
RNA_enum_items_add_value(&item, &totitem, parent_type_items, PARBONE);
}
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index 9a22742e7b9..6170c884b51 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -519,7 +519,7 @@ static KeyBlock *rna_ShapeKeyData_find_keyblock(Key *key, float *point)
}
/* determine where end of array is
- * - elemsize is in bytes, so use (char *) cast to get array in terms of bytes
+ * - elemsize is in bytes, so use (char *) cast to get array in terms of bytes
*/
end = (float *)((char *)start + (key->elemsize * kb->totelem));
diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c
index bbc0c251897..782ca0d76b3 100644
--- a/source/blender/makesrna/intern/rna_lattice.c
+++ b/source/blender/makesrna/intern/rna_lattice.c
@@ -103,7 +103,7 @@ static void rna_Lattice_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), P
/* copy settings to editlattice,
* we could split this up differently (one update call per property)
- * but for now thats overkill
+ * but for now that's overkill
*/
static void rna_Lattice_update_data_editlatt(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c
index bcd8ab054ae..b50102079a9 100644
--- a/source/blender/makesrna/intern/rna_linestyle.c
+++ b/source/blender/makesrna/intern/rna_linestyle.c
@@ -591,7 +591,7 @@ static void rna_def_modifier_type_common(
{LS_VALUE_MULT, "MULTIPLY", 0, "Multiply", ""},
{LS_VALUE_DIV, "DIVIDE", 0, "Divide", ""},
{LS_VALUE_DIFF, "DIFFERENCE", 0, "Difference", ""},
- {LS_VALUE_MIN, "MININUM", 0, "Minimum", ""},
+ {LS_VALUE_MIN, "MINIMUM", 0, "Minimum", ""},
{LS_VALUE_MAX, "MAXIMUM", 0, "Maximum", ""},
{0, NULL, 0, NULL, NULL}
};
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index 7d619254e07..f2249eb397d 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -1864,7 +1864,8 @@ void RNA_def_main_masks(BlenderRNA *brna, PropertyRNA *cprop)
/* new func */
func = RNA_def_function(srna, "new", "rna_Main_mask_new");
RNA_def_function_ui_description(func, "Add a new mask with a given name to the main database");
- RNA_def_string_file_path(func, "name", NULL, MAX_ID_NAME - 2, "Mask", "Name of new mask data-block");
+ parm = RNA_def_string(func, "name", NULL, MAX_ID_NAME - 2, "Mask", "Name of new mask data-block");
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
/* return type */
parm = RNA_def_pointer(func, "mask", "Mask", "", "New mask data-block");
RNA_def_function_return(func, parm);
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 1a05b6e5e00..f9b848744d6 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -3267,6 +3267,13 @@ static void rna_def_modifier_mask(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MASK_INV);
RNA_def_property_ui_text(prop, "Invert", "Use vertices that are not part of region defined");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "threshold");
+ RNA_def_property_range(prop, 0.0, 1.0);
+ RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
+ RNA_def_property_ui_text(prop, "Threshold", "Weights over this threshold remain");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_simpledeform(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_movieclip.c b/source/blender/makesrna/intern/rna_movieclip.c
index 3639c8547ba..36c6bebe561 100644
--- a/source/blender/makesrna/intern/rna_movieclip.c
+++ b/source/blender/makesrna/intern/rna_movieclip.c
@@ -72,6 +72,12 @@ static void rna_MovieClip_size_get(PointerRNA *ptr, int *values)
values[1] = clip->lastsize[1];
}
+static float rna_MovieClip_fps_get(PointerRNA *ptr)
+{
+ MovieClip *clip = (MovieClip *)ptr->id.data;
+ return BKE_movieclip_get_fps(clip);
+}
+
static void rna_MovieClipUser_proxy_render_settings_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
ID *id = (ID *) ptr->id.data;
@@ -362,6 +368,12 @@ static void rna_def_movieclip(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "len");
RNA_def_property_ui_text(prop, "Duration", "Detected duration of movie clip in frames");
+ /* FPS */
+ prop = RNA_def_property(srna, "fps", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_float_funcs(prop, "rna_MovieClip_fps_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Frame Rate", "Detected frame rate of the movie clip in frames per second");
+
/* color management */
prop = RNA_def_property(srna, "colorspace_settings", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "colorspace_settings");
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c
index 09b194d0e1b..d27a9d3740d 100644
--- a/source/blender/makesrna/intern/rna_nla.c
+++ b/source/blender/makesrna/intern/rna_nla.c
@@ -136,11 +136,11 @@ static void rna_NlaStrip_start_frame_set(PointerRNA *ptr, float value)
NlaStrip *data = (NlaStrip *)ptr->data;
/* clamp value to lie within valid limits
- * - cannot start past the end of the strip + some flexibility threshold
- * - cannot start before the previous strip (if present) ends
- * -> but if it was a transition, we could go up to the start of the strip + some flexibility threshold
- * as long as we re-adjust the transition afterwards
- * - minimum frame is -MAXFRAME so that we don't get clipping on frame 0
+ * - cannot start past the end of the strip + some flexibility threshold
+ * - cannot start before the previous strip (if present) ends
+ * -> but if it was a transition, we could go up to the start of the strip + some flexibility threshold
+ * as long as we re-adjust the transition afterwards
+ * - minimum frame is -MAXFRAME so that we don't get clipping on frame 0
*/
if (data->prev) {
if (data->prev->type == NLASTRIP_TYPE_TRANSITION) {
@@ -164,11 +164,11 @@ static void rna_NlaStrip_end_frame_set(PointerRNA *ptr, float value)
NlaStrip *data = (NlaStrip *)ptr->data;
/* clamp value to lie within valid limits
- * - must not have zero or negative length strip, so cannot start before the first frame
- * + some minimum-strip-length threshold
- * - cannot end later than the start of the next strip (if present)
- * -> but if it was a transition, we could go up to the start of the end - some flexibility threshold
- * as long as we re-adjust the transition afterwards
+ * - must not have zero or negative length strip, so cannot start before the first frame
+ * + some minimum-strip-length threshold
+ * - cannot end later than the start of the next strip (if present)
+ * -> but if it was a transition, we could go up to the start of the end - some flexibility threshold
+ * as long as we re-adjust the transition afterwards
*/
if (data->next) {
if (data->next->type == NLASTRIP_TYPE_TRANSITION) {
@@ -390,7 +390,7 @@ static NlaStrip *rna_NlaStrip_new(NlaTrack *track, bContext *C, ReportList *repo
/* create dummy AnimData block so that BKE_nlastrip_validate_name()
* can be used to ensure a valid name, as we don't have one here...
- * - only the nla_tracks list is needed there, which we aim to reverse engineer here...
+ * - only the nla_tracks list is needed there, which we aim to reverse engineer here...
*/
{
AnimData adt = {NULL};
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 1d62f438047..4094552d9bc 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -472,7 +472,7 @@ static const EnumPropertyItem *rna_Object_parent_type_itemf(bContext *UNUSED(C),
RNA_enum_items_add_value(&item, &totitem, &parent_type_items[2], PARSKEL);
}
else if (par->type == OB_ARMATURE) {
- /* special hack: prevents this being overrided */
+ /* special hack: prevents this being overridden */
RNA_enum_items_add_value(&item, &totitem, &parent_type_items[1], PARSKEL);
RNA_enum_items_add_value(&item, &totitem, parent_type_items, PARBONE);
}
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 376a89c65d1..6218de2469d 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -49,7 +49,7 @@
static const EnumPropertyItem space_items[] = {
{CONSTRAINT_SPACE_WORLD, "WORLD", 0, "World Space",
- "The most gobal space in Blender"},
+ "The most global space in Blender"},
{CONSTRAINT_SPACE_POSE, "POSE", 0, "Pose Space",
"The pose space of a bone (its armature's object space)"},
{CONSTRAINT_SPACE_PARLOCAL, "LOCAL_WITH_PARENT", 0, "Local With Parent",
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 7da859c000c..c5d66581ca3 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -916,7 +916,7 @@ static void rna_def_pointcache_active(BlenderRNA *brna)
/* This first-level RNA pointer also has list of all caches from owning ID.
* Those caches items have exact same content as 'active' one, except for that collection,
* to prevent ugly recursive layout pattern.
- * Note: This shall probably be redone from scratch in a proper way at some poitn, but for now that will do,
+ * Note: This shall probably be redone from scratch in a proper way at some point, but for now that will do,
* and shall not break anything in the API. */
prop = RNA_def_property(srna, "point_caches", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_funcs(prop, "rna_Cache_list_begin", "rna_iterator_listbase_next",
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c
index 513717a9e46..b516accbf1e 100644
--- a/source/blender/makesrna/intern/rna_render.c
+++ b/source/blender/makesrna/intern/rna_render.c
@@ -801,7 +801,7 @@ static void rna_def_render_result(BlenderRNA *brna)
RNA_def_function_ui_description(func, "Add engine-specific stamp data to the result");
parm = RNA_def_string(func, "field", NULL, 1024, "Field", "Name of the stamp field to add");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
- parm = RNA_def_string(func, "value", NULL, 1024, "Value", "Value of the stamp data");
+ parm = RNA_def_string(func, "value", NULL, 0, "Value", "Value of the stamp data");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
RNA_define_verify_sdna(0);
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 3c8cc9ee2be..fb7fee06b83 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -916,8 +916,8 @@ static void rna_Scene_active_keying_set_set(PointerRNA *ptr, PointerRNA value)
}
/* get KeyingSet index stuff for list of Keying Sets editing UI
- * - active_keyingset-1 since 0 is reserved for 'none'
- * - don't clamp, otherwise can never set builtins types as active...
+ * - active_keyingset-1 since 0 is reserved for 'none'
+ * - don't clamp, otherwise can never set builtins types as active...
*/
static int rna_Scene_active_keying_set_index_get(PointerRNA *ptr)
{
@@ -926,7 +926,7 @@ static int rna_Scene_active_keying_set_index_get(PointerRNA *ptr)
}
/* get KeyingSet index stuff for list of Keying Sets editing UI
- * - value+1 since 0 is reserved for 'none'
+ * - value+1 since 0 is reserved for 'none'
*/
static void rna_Scene_active_keying_set_index_set(PointerRNA *ptr, int value)
{
@@ -2894,7 +2894,7 @@ static void rna_def_tool_settings(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_bone_sketching", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bone_sketching", BONE_SKETCHING);
RNA_def_property_ui_text(prop, "Use Bone Sketching", "Use sketching to create and edit bones");
-/* RNA_def_property_ui_icon(prop, ICON_EDIT, 0); */
+ // RNA_def_property_ui_icon(prop, ICON_EDIT, 0);
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "use_etch_quick", PROP_BOOLEAN, PROP_NONE);
@@ -5498,11 +5498,11 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
#endif
static const EnumPropertyItem audio_channel_items[] = {
- {1, "MONO", 0, "Mono", "Set audio channels to mono"},
- {2, "STEREO", 0, "Stereo", "Set audio channels to stereo"},
- {4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 channels"},
- {6, "SURROUND51", 0, "5.1 Surround", "Set audio channels to 5.1 surround sound"},
- {8, "SURROUND71", 0, "7.1 Surround", "Set audio channels to 7.1 surround sound"},
+ {FFM_CHANNELS_MONO, "MONO", 0, "Mono", "Set audio channels to mono"},
+ {FFM_CHANNELS_STEREO, "STEREO", 0, "Stereo", "Set audio channels to stereo"},
+ {FFM_CHANNELS_SURROUND4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 channels"},
+ {FFM_CHANNELS_SURROUND51, "SURROUND51", 0, "5.1 Surround", "Set audio channels to 5.1 surround sound"},
+ {FFM_CHANNELS_SURROUND71, "SURROUND71", 0, "7.1 Surround", "Set audio channels to 7.1 surround sound"},
{0, NULL, 0, NULL, NULL}
};
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index ae1761faec1..987f94c5238 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -1362,21 +1362,21 @@ static void rna_SpaceDopeSheetEditor_mode_update(Main *UNUSED(bmain), Scene *sce
if (saction->mode == SACTCONT_SHAPEKEY) {
Key *key = BKE_key_from_object(obact);
- /* 1) update the action stored for the editor */
+ /* 1) update the action stored for the editor */
if (key)
saction->action = (key->adt) ? key->adt->action : NULL;
else
saction->action = NULL;
- /* 2) enable 'show sliders' by default, since one of the main
- * points of the ShapeKey Editor is to provide a one-stop shop
- * for controlling the shapekeys, whose main control is the value
+ /* 2) enable 'show sliders' by default, since one of the main
+ * points of the ShapeKey Editor is to provide a one-stop shop
+ * for controlling the shapekeys, whose main control is the value
*/
saction->flag |= SACTION_SLIDERS;
}
/* make sure action stored is valid */
else if (saction->mode == SACTCONT_ACTION) {
- /* 1) update the action stored for the editor */
+ /* 1) update the action stored for the editor */
/* TODO: context selector could help decide this with more control? */
if (obact)
saction->action = (obact->adt) ? obact->adt->action : NULL;
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index 782d39bcb7e..c6dc0c1b124 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -759,8 +759,9 @@ static StructRNA *rna_Menu_register(
memcpy(buf, _menu_descr, description_size);
mt->description = buf;
}
- else
- mt->description = "";
+ else {
+ mt->description = NULL;
+ }
mt->ext.srna = RNA_def_struct_ptr(&BLENDER_RNA, mt->idname, &RNA_Menu);
RNA_def_struct_translation_context(mt->ext.srna, mt->translation_context);
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index d0d01b9e43e..9b2cc850169 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -1187,7 +1187,7 @@ static StructRNA *rna_Operator_register(
dummyot.idname = strings_table[0]; /* allocated string stored here */
dummyot.name = strings_table[1];
- dummyot.description = strings_table[2];
+ dummyot.description = *strings_table[2] ? strings_table[2] : NULL;
dummyot.translation_context = strings_table[3];
dummyot.undo_group = strings_table[4];
BLI_assert(ARRAY_SIZE(strings) == 5);
@@ -1328,7 +1328,7 @@ static StructRNA *rna_MacroOperator_register(
dummyot.idname = strings_table[0]; /* allocated string stored here */
dummyot.name = strings_table[1];
- dummyot.description = strings_table[2];
+ dummyot.description = *strings_table[2] ? strings_table[2] : NULL;
dummyot.translation_context = strings_table[3];
dummyot.undo_group = strings_table[4];
BLI_assert(ARRAY_SIZE(strings) == 5);
diff --git a/source/blender/modifiers/intern/MOD_build.c b/source/blender/modifiers/intern/MOD_build.c
index e877d5649d4..34b432fe805 100644
--- a/source/blender/modifiers/intern/MOD_build.c
+++ b/source/blender/modifiers/intern/MOD_build.c
@@ -138,7 +138,7 @@ static DerivedMesh *applyModifier(
for (j = 0; j < mp->totloop; j++, ml++) {
void **val_p;
- if (!BLI_ghash_ensure_p(vertHash, SET_INT_IN_POINTER(ml->v), &val_p)) {
+ if (!BLI_ghash_ensure_p(vertHash, POINTER_FROM_INT(ml->v), &val_p)) {
*val_p = (void *)hash_num;
hash_num++;
}
@@ -157,8 +157,8 @@ static DerivedMesh *applyModifier(
for (i = 0; i < numEdge_src; i++, hash_num_alt++) {
MEdge *me = medge + i;
- if (BLI_ghash_haskey(vertHash, SET_INT_IN_POINTER(me->v1)) &&
- BLI_ghash_haskey(vertHash, SET_INT_IN_POINTER(me->v2)))
+ if (BLI_ghash_haskey(vertHash, POINTER_FROM_INT(me->v1)) &&
+ BLI_ghash_haskey(vertHash, POINTER_FROM_INT(me->v2)))
{
BLI_ghash_insert(edgeHash, (void *)hash_num, (void *)hash_num_alt);
BLI_ghash_insert(edgeHash2, (void *)hash_num_alt, (void *)hash_num);
@@ -184,11 +184,11 @@ static DerivedMesh *applyModifier(
void **val_p;
me = medge + edgeMap[i];
- if (!BLI_ghash_ensure_p(vertHash, SET_INT_IN_POINTER(me->v1), &val_p)) {
+ if (!BLI_ghash_ensure_p(vertHash, POINTER_FROM_INT(me->v1), &val_p)) {
*val_p = (void *)hash_num;
hash_num++;
}
- if (!BLI_ghash_ensure_p(vertHash, SET_INT_IN_POINTER(me->v2), &val_p)) {
+ if (!BLI_ghash_ensure_p(vertHash, POINTER_FROM_INT(me->v2), &val_p)) {
*val_p = (void *)hash_num;
hash_num++;
}
@@ -199,10 +199,10 @@ static DerivedMesh *applyModifier(
for (i = 0; i < numEdges_dst; i++) {
j = BLI_ghash_len(edgeHash);
- BLI_ghash_insert(edgeHash, SET_INT_IN_POINTER(j),
- SET_INT_IN_POINTER(edgeMap[i]));
- BLI_ghash_insert(edgeHash2, SET_INT_IN_POINTER(edgeMap[i]),
- SET_INT_IN_POINTER(j));
+ BLI_ghash_insert(edgeHash, POINTER_FROM_INT(j),
+ POINTER_FROM_INT(edgeMap[i]));
+ BLI_ghash_insert(edgeHash2, POINTER_FROM_INT(edgeMap[i]),
+ POINTER_FROM_INT(j));
}
}
else {
@@ -217,7 +217,7 @@ static DerivedMesh *applyModifier(
* mapped to the new indices
*/
for (i = 0; i < numVerts; i++) {
- BLI_ghash_insert(vertHash, SET_INT_IN_POINTER(vertMap[i]), SET_INT_IN_POINTER(i));
+ BLI_ghash_insert(vertHash, POINTER_FROM_INT(vertMap[i]), POINTER_FROM_INT(i));
}
}
@@ -231,8 +231,8 @@ static DerivedMesh *applyModifier(
GHASH_ITER (gh_iter, vertHash) {
MVert source;
MVert *dest;
- int oldIndex = GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(&gh_iter));
- int newIndex = GET_INT_FROM_POINTER(BLI_ghashIterator_getValue(&gh_iter));
+ int oldIndex = POINTER_AS_INT(BLI_ghashIterator_getKey(&gh_iter));
+ int newIndex = POINTER_AS_INT(BLI_ghashIterator_getValue(&gh_iter));
source = mvert_src[oldIndex];
dest = CDDM_get_vert(result, newIndex);
@@ -245,13 +245,13 @@ static DerivedMesh *applyModifier(
for (i = 0; i < BLI_ghash_len(edgeHash); i++) {
MEdge source;
MEdge *dest;
- int oldIndex = GET_INT_FROM_POINTER(BLI_ghash_lookup(edgeHash, SET_INT_IN_POINTER(i)));
+ int oldIndex = POINTER_AS_INT(BLI_ghash_lookup(edgeHash, POINTER_FROM_INT(i)));
source = medge_src[oldIndex];
dest = CDDM_get_edge(result, i);
- source.v1 = GET_INT_FROM_POINTER(BLI_ghash_lookup(vertHash, SET_INT_IN_POINTER(source.v1)));
- source.v2 = GET_INT_FROM_POINTER(BLI_ghash_lookup(vertHash, SET_INT_IN_POINTER(source.v2)));
+ source.v1 = POINTER_AS_INT(BLI_ghash_lookup(vertHash, POINTER_FROM_INT(source.v1)));
+ source.v2 = POINTER_AS_INT(BLI_ghash_lookup(vertHash, POINTER_FROM_INT(source.v2)));
DM_copy_edge_data(dm, result, oldIndex, i, 1);
*dest = source;
@@ -277,8 +277,8 @@ static DerivedMesh *applyModifier(
ml_src = mloop_src + source->loopstart;
for (j = 0; j < source->totloop; j++, k++, ml_src++, ml_dst++) {
- ml_dst->v = GET_INT_FROM_POINTER(BLI_ghash_lookup(vertHash, SET_INT_IN_POINTER(ml_src->v)));
- ml_dst->e = GET_INT_FROM_POINTER(BLI_ghash_lookup(edgeHash2, SET_INT_IN_POINTER(ml_src->e)));
+ ml_dst->v = POINTER_AS_INT(BLI_ghash_lookup(vertHash, POINTER_FROM_INT(ml_src->v)));
+ ml_dst->e = POINTER_AS_INT(BLI_ghash_lookup(edgeHash2, POINTER_FROM_INT(ml_src->e)));
}
}
diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c
index a7f09aec481..2fc30f9fddd 100644
--- a/source/blender/modifiers/intern/MOD_explode.c
+++ b/source/blender/modifiers/intern/MOD_explode.c
@@ -189,7 +189,7 @@ static void createFacepa(
static int edgecut_get(EdgeHash *edgehash, unsigned int v1, unsigned int v2)
{
- return GET_INT_FROM_POINTER(BLI_edgehash_lookup(edgehash, v1, v2));
+ return POINTER_AS_INT(BLI_edgehash_lookup(edgehash, v1, v2));
}
@@ -626,7 +626,7 @@ static DerivedMesh *cutEdges(ExplodeModifierData *emd, DerivedMesh *dm)
ehi = BLI_edgehashIterator_new(edgehash);
totesplit = totvert;
for (; !BLI_edgehashIterator_isDone(ehi); BLI_edgehashIterator_step(ehi)) {
- BLI_edgehashIterator_setValue(ehi, SET_INT_IN_POINTER(totesplit));
+ BLI_edgehashIterator_setValue(ehi, POINTER_FROM_INT(totesplit));
totesplit++;
}
BLI_edgehashIterator_free(ehi);
@@ -665,7 +665,7 @@ static DerivedMesh *cutEdges(ExplodeModifierData *emd, DerivedMesh *dm)
ehi = BLI_edgehashIterator_new(edgehash);
for (; !BLI_edgehashIterator_isDone(ehi); BLI_edgehashIterator_step(ehi)) {
BLI_edgehashIterator_getKey(ehi, &ed_v1, &ed_v2);
- esplit = GET_INT_FROM_POINTER(BLI_edgehashIterator_getValue(ehi));
+ esplit = POINTER_AS_INT(BLI_edgehashIterator_getValue(ehi));
mv = CDDM_get_vert(splitdm, ed_v2);
dupve = CDDM_get_vert(splitdm, esplit);
@@ -859,7 +859,7 @@ static DerivedMesh *explodeMesh(
/* make new vertice indexes & count total vertices after duplication */
ehi = BLI_edgehashIterator_new(vertpahash);
for (; !BLI_edgehashIterator_isDone(ehi); BLI_edgehashIterator_step(ehi)) {
- BLI_edgehashIterator_setValue(ehi, SET_INT_IN_POINTER(totdup));
+ BLI_edgehashIterator_setValue(ehi, POINTER_FROM_INT(totdup));
totdup++;
}
BLI_edgehashIterator_free(ehi);
@@ -883,7 +883,7 @@ static DerivedMesh *explodeMesh(
/* get particle + vertex from hash */
BLI_edgehashIterator_getKey(ehi, &ed_v1, &ed_v2);
ed_v2 -= totvert;
- v = GET_INT_FROM_POINTER(BLI_edgehashIterator_getValue(ehi));
+ v = POINTER_AS_INT(BLI_edgehashIterator_getValue(ehi));
dm->getVert(dm, ed_v1, &source);
dest = CDDM_get_vert(explode, v);
diff --git a/source/blender/modifiers/intern/MOD_mask.c b/source/blender/modifiers/intern/MOD_mask.c
index 25db2d5ff0b..75b2352ab2e 100644
--- a/source/blender/modifiers/intern/MOD_mask.c
+++ b/source/blender/modifiers/intern/MOD_mask.c
@@ -129,9 +129,9 @@ static DerivedMesh *applyModifier(
}
/* Overview of Method:
- * 1. Get the vertices that are in the vertexgroup of interest
- * 2. Filter out unwanted geometry (i.e. not in vertexgroup), by populating mappings with new vs old indices
- * 3. Make a new mesh containing only the mapping data
+ * 1. Get the vertices that are in the vertexgroup of interest
+ * 2. Filter out unwanted geometry (i.e. not in vertexgroup), by populating mappings with new vs old indices
+ * 3. Make a new mesh containing only the mapping data
*/
/* get original number of verts, edges, and faces */
@@ -140,7 +140,7 @@ static DerivedMesh *applyModifier(
maxPolys = dm->getNumPolys(dm);
/* check if we can just return the original mesh
- * - must have verts and therefore verts assigned to vgroups to do anything useful
+ * - must have verts and therefore verts assigned to vgroups to do anything useful
*/
if (!(ELEM(mmd->mode, MOD_MASK_MODE_ARM, MOD_MASK_MODE_VGROUP)) ||
(maxVerts == 0) || BLI_listbase_is_empty(&ob->defbase))
@@ -196,7 +196,7 @@ static DerivedMesh *applyModifier(
for (j = 0; j < dv->totweight; j++, dw++) {
if (dw->def_nr < defbase_tot) {
if (bone_select_array[dw->def_nr]) {
- if (dw->weight != 0.0f) {
+ if (dw->weight > mmd->threshold) {
found = true;
break;
}
@@ -209,7 +209,7 @@ static DerivedMesh *applyModifier(
}
/* add to ghash for verts (numVerts acts as counter for mapping) */
- BLI_ghash_insert(vertHash, SET_INT_IN_POINTER(i), SET_INT_IN_POINTER(numVerts));
+ BLI_ghash_insert(vertHash, POINTER_FROM_INT(i), POINTER_FROM_INT(numVerts));
numVerts++;
}
@@ -228,13 +228,13 @@ static DerivedMesh *applyModifier(
/* add vertices which exist in vertexgroup into ghash for filtering */
for (i = 0, dv = dvert; i < maxVerts; i++, dv++) {
- const bool found = defvert_find_weight(dv, defgrp_index) != 0.0f;
+ const bool found = defvert_find_weight(dv, defgrp_index) > mmd->threshold;
if (found_test != found) {
continue;
}
/* add to ghash for verts (numVerts acts as counter for mapping) */
- BLI_ghash_insert(vertHash, SET_INT_IN_POINTER(i), SET_INT_IN_POINTER(numVerts));
+ BLI_ghash_insert(vertHash, POINTER_FROM_INT(i), POINTER_FROM_INT(numVerts));
numVerts++;
}
}
@@ -258,10 +258,10 @@ static DerivedMesh *applyModifier(
const MEdge *me = &medge_src[i];
/* only add if both verts will be in new mesh */
- if (BLI_ghash_haskey(vertHash, SET_INT_IN_POINTER(me->v1)) &&
- BLI_ghash_haskey(vertHash, SET_INT_IN_POINTER(me->v2)))
+ if (BLI_ghash_haskey(vertHash, POINTER_FROM_INT(me->v1)) &&
+ BLI_ghash_haskey(vertHash, POINTER_FROM_INT(me->v2)))
{
- BLI_ghash_insert(edgeHash, SET_INT_IN_POINTER(i), SET_INT_IN_POINTER(numEdges));
+ BLI_ghash_insert(edgeHash, POINTER_FROM_INT(i), POINTER_FROM_INT(numEdges));
numEdges++;
}
}
@@ -272,7 +272,7 @@ static DerivedMesh *applyModifier(
int j;
for (j = 0; j < mp_src->totloop; j++, ml_src++) {
- if (!BLI_ghash_haskey(vertHash, SET_INT_IN_POINTER(ml_src->v))) {
+ if (!BLI_ghash_haskey(vertHash, POINTER_FROM_INT(ml_src->v))) {
ok = false;
break;
}
@@ -280,7 +280,7 @@ static DerivedMesh *applyModifier(
/* all verts must be available */
if (ok) {
- BLI_ghash_insert(polyHash, SET_INT_IN_POINTER(i), SET_INT_IN_POINTER(numPolys));
+ BLI_ghash_insert(polyHash, POINTER_FROM_INT(i), POINTER_FROM_INT(numPolys));
loop_mapping[numPolys] = numLoops;
numPolys++;
numLoops += mp_src->totloop;
@@ -303,8 +303,8 @@ static DerivedMesh *applyModifier(
GHASH_ITER (gh_iter, vertHash) {
const MVert *v_src;
MVert *v_dst;
- const int i_src = GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(&gh_iter));
- const int i_dst = GET_INT_FROM_POINTER(BLI_ghashIterator_getValue(&gh_iter));
+ const int i_src = POINTER_AS_INT(BLI_ghashIterator_getKey(&gh_iter));
+ const int i_dst = POINTER_AS_INT(BLI_ghashIterator_getValue(&gh_iter));
v_src = &mvert_src[i_src];
v_dst = &mvert_dst[i_dst];
@@ -317,22 +317,22 @@ static DerivedMesh *applyModifier(
GHASH_ITER (gh_iter, edgeHash) {
const MEdge *e_src;
MEdge *e_dst;
- const int i_src = GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(&gh_iter));
- const int i_dst = GET_INT_FROM_POINTER(BLI_ghashIterator_getValue(&gh_iter));
+ const int i_src = POINTER_AS_INT(BLI_ghashIterator_getKey(&gh_iter));
+ const int i_dst = POINTER_AS_INT(BLI_ghashIterator_getValue(&gh_iter));
e_src = &medge_src[i_src];
e_dst = &medge_dst[i_dst];
DM_copy_edge_data(dm, result, i_src, i_dst, 1);
*e_dst = *e_src;
- e_dst->v1 = GET_UINT_FROM_POINTER(BLI_ghash_lookup(vertHash, SET_UINT_IN_POINTER(e_src->v1)));
- e_dst->v2 = GET_UINT_FROM_POINTER(BLI_ghash_lookup(vertHash, SET_UINT_IN_POINTER(e_src->v2)));
+ e_dst->v1 = POINTER_AS_UINT(BLI_ghash_lookup(vertHash, POINTER_FROM_UINT(e_src->v1)));
+ e_dst->v2 = POINTER_AS_UINT(BLI_ghash_lookup(vertHash, POINTER_FROM_UINT(e_src->v2)));
}
/* faces */
GHASH_ITER (gh_iter, polyHash) {
- const int i_src = GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(&gh_iter));
- const int i_dst = GET_INT_FROM_POINTER(BLI_ghashIterator_getValue(&gh_iter));
+ const int i_src = POINTER_AS_INT(BLI_ghashIterator_getKey(&gh_iter));
+ const int i_dst = POINTER_AS_INT(BLI_ghashIterator_getValue(&gh_iter));
const MPoly *mp_src = &mpoly_src[i_src];
MPoly *mp_dst = &mpoly_dst[i_dst];
const int i_ml_src = mp_src->loopstart;
@@ -346,8 +346,8 @@ static DerivedMesh *applyModifier(
*mp_dst = *mp_src;
mp_dst->loopstart = i_ml_dst;
for (i = 0; i < mp_src->totloop; i++) {
- ml_dst[i].v = GET_UINT_FROM_POINTER(BLI_ghash_lookup(vertHash, SET_UINT_IN_POINTER(ml_src[i].v)));
- ml_dst[i].e = GET_UINT_FROM_POINTER(BLI_ghash_lookup(edgeHash, SET_UINT_IN_POINTER(ml_src[i].e)));
+ ml_dst[i].v = POINTER_AS_UINT(BLI_ghash_lookup(vertHash, POINTER_FROM_UINT(ml_src[i].v)));
+ ml_dst[i].e = POINTER_AS_UINT(BLI_ghash_lookup(edgeHash, POINTER_FROM_UINT(ml_src[i].e)));
}
}
diff --git a/source/blender/modifiers/intern/MOD_meshsequencecache.c b/source/blender/modifiers/intern/MOD_meshsequencecache.c
index 8e04ff04648..4b7b4f63dde 100644
--- a/source/blender/modifiers/intern/MOD_meshsequencecache.c
+++ b/source/blender/modifiers/intern/MOD_meshsequencecache.c
@@ -155,8 +155,13 @@ static DerivedMesh *applyModifier(
static bool dependsOnTime(ModifierData *md)
{
+#ifdef WITH_ALEMBIC
+ MeshSeqCacheModifierData *mcmd = (MeshSeqCacheModifierData *) md;
+ return (mcmd->cache_file != NULL);
+#else
UNUSED_VARS(md);
- return true;
+ return false;
+#endif
}
static void foreachIDLink(
diff --git a/source/blender/nodes/composite/nodes/node_composite_image.c b/source/blender/nodes/composite/nodes/node_composite_image.c
index 52e58a0ebd3..eb48d332f19 100644
--- a/source/blender/nodes/composite/nodes/node_composite_image.c
+++ b/source/blender/nodes/composite/nodes/node_composite_image.c
@@ -295,6 +295,8 @@ static void cmp_node_image_update(bNodeTree *ntree, bNode *node)
/* avoid unnecessary updates, only changes to the image/image user data are of interest */
if (node->update & NODE_UPDATE_ID)
cmp_node_image_verify_outputs(ntree, node, false);
+
+ cmp_node_update_default(ntree, node);
}
static void node_composit_init_image(bNodeTree *ntree, bNode *node)
@@ -427,6 +429,8 @@ static void node_composit_copy_rlayers(bNodeTree *UNUSED(dest_ntree), bNode *UNU
static void cmp_node_rlayers_update(bNodeTree *ntree, bNode *node)
{
cmp_node_image_verify_outputs(ntree, node, true);
+
+ cmp_node_update_default(ntree, node);
}
void register_node_type_cmp_rlayers(void)
diff --git a/source/blender/physics/intern/BPH_mass_spring.cpp b/source/blender/physics/intern/BPH_mass_spring.cpp
index 750073dae1f..451959766cb 100644
--- a/source/blender/physics/intern/BPH_mass_spring.cpp
+++ b/source/blender/physics/intern/BPH_mass_spring.cpp
@@ -553,7 +553,7 @@ BLI_INLINE void cloth_get_grid_location(Implicit_Data *data, float cell_scale, c
add_v3_v3(x, cell_offset);
}
-/* returns next spring forming a continous hair sequence */
+/* returns next spring forming a continuous hair sequence */
BLI_INLINE LinkNode *hair_spring_next(LinkNode *spring_link)
{
ClothSpring *spring = (ClothSpring *)spring_link->link;
diff --git a/source/blender/physics/intern/ConstrainedConjugateGradient.h b/source/blender/physics/intern/ConstrainedConjugateGradient.h
index 2d5fb41cc73..8d8dc1ae187 100644
--- a/source/blender/physics/intern/ConstrainedConjugateGradient.h
+++ b/source/blender/physics/intern/ConstrainedConjugateGradient.h
@@ -175,7 +175,7 @@ struct traits<ConstrainedConjugateGradient<_MatrixType,_UpLo,_FilterMatrixType,_
* ++i;
* } while (cg.info()!=Success && i<100);
* \endcode
- * Note that such a step by step excution is slightly slower.
+ * Note that such a step by step execution is slightly slower.
*
* \sa class SimplicialCholesky, DiagonalPreconditioner, IdentityPreconditioner
*/
diff --git a/source/blender/physics/intern/implicit_blender.c b/source/blender/physics/intern/implicit_blender.c
index e4d93b72f73..45030524566 100644
--- a/source/blender/physics/intern/implicit_blender.c
+++ b/source/blender/physics/intern/implicit_blender.c
@@ -384,7 +384,7 @@ DO_INLINE void inverse_fmatrix(float to[3][3], float from[3][3])
int i2=(i+2)%3;
int j1=(j+1)%3;
int j2=(j+2)%3;
- /** Reverse indexs i&j to take transpose. */
+ /** Reverse indexes i&j to take transpose. */
to[j][i] = (from[i1][j1]*from[i2][j2]-from[i1][j2]*from[i2][j1])/d;
/**
* <pre>
diff --git a/source/blender/python/BPY_extern.h b/source/blender/python/BPY_extern.h
index 5f43f0bf885..955b1c4e4ed 100644
--- a/source/blender/python/BPY_extern.h
+++ b/source/blender/python/BPY_extern.h
@@ -80,8 +80,8 @@ bool BPY_execute_string_as_number(struct bContext *C, const char *imports[], con
bool BPY_execute_string_as_intptr(struct bContext *C, const char *imports[], const char *expr, const bool verbose, intptr_t *r_value);
bool BPY_execute_string_as_string(struct bContext *C, const char *imports[], const char *expr, const bool verbose, char **r_value);
-bool BPY_execute_string_ex(struct bContext *C, const char *expr, bool use_eval);
-bool BPY_execute_string(struct bContext *C, const char *expr);
+bool BPY_execute_string_ex(struct bContext *C, const char *imports[], const char *expr, bool use_eval);
+bool BPY_execute_string(struct bContext *C, const char *imports[], const char *expr);
void BPY_text_free_code(struct Text *text);
void BPY_modules_update(struct bContext *C); // XXX - annoying, need this for pointers that get out of date
diff --git a/source/blender/python/bmesh/bmesh_py_api.c b/source/blender/python/bmesh/bmesh_py_api.c
index d7324eabb6c..5819d7ce2bb 100644
--- a/source/blender/python/bmesh/bmesh_py_api.c
+++ b/source/blender/python/bmesh/bmesh_py_api.c
@@ -115,7 +115,7 @@ static PyObject *bpy_bm_from_edit_mesh(PyObject *UNUSED(self), PyObject *value)
PyDoc_STRVAR(bpy_bm_update_edit_mesh_doc,
".. method:: update_edit_mesh(mesh, tessface=True, destructive=True)\n"
"\n"
-" Update the mesh after changes to the BMesh in editmode, \n"
+" Update the mesh after changes to the BMesh in editmode,\n"
" optionally recalculating n-gon tessellation.\n"
"\n"
" :arg mesh: The editmode mesh.\n"
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c
index 5bd938ba279..9cd8eeb0aab 100644
--- a/source/blender/python/bmesh/bmesh_py_types.c
+++ b/source/blender/python/bmesh/bmesh_py_types.c
@@ -112,7 +112,7 @@ PyDoc_STRVAR(bpy_bm_elem_seam_doc, "Seam for UV unwrapping.\n\n:type: boolean
static PyObject *bpy_bm_elem_hflag_get(BPy_BMElem *self, void *flag)
{
- const char hflag = (char)GET_INT_FROM_POINTER(flag);
+ const char hflag = (char)POINTER_AS_INT(flag);
BPY_BM_CHECK_OBJ(self);
@@ -121,7 +121,7 @@ static PyObject *bpy_bm_elem_hflag_get(BPy_BMElem *self, void *flag)
static int bpy_bm_elem_hflag_set(BPy_BMElem *self, PyObject *value, void *flag)
{
- const char hflag = (char)GET_INT_FROM_POINTER(flag);
+ const char hflag = (char)POINTER_AS_INT(flag);
int param;
BPY_BM_CHECK_INT(self);
@@ -265,7 +265,7 @@ PyDoc_STRVAR(bpy_bmloops_link_loops_doc,
static PyObject *bpy_bmelemseq_elem_get(BPy_BMElem *self, void *itype)
{
BPY_BM_CHECK_OBJ(self);
- return BPy_BMElemSeq_CreatePyObject(self->bm, self, GET_INT_FROM_POINTER(itype));
+ return BPy_BMElemSeq_CreatePyObject(self->bm, self, POINTER_AS_INT(itype));
}
@@ -613,7 +613,7 @@ static PyObject *bpy_bmelemseq_layers_get(BPy_BMElemSeq *self, void *htype)
{
BPY_BM_CHECK_OBJ(self);
- return BPy_BMLayerAccess_CreatePyObject(self->bm, GET_INT_FROM_POINTER(htype));
+ return BPy_BMLayerAccess_CreatePyObject(self->bm, POINTER_AS_INT(htype));
}
/* FaceSeq
@@ -2453,7 +2453,7 @@ PyDoc_STRVAR(bpy_bmelemseq_index_update_doc,
" .. note::\n"
"\n"
" Running this on sequences besides :class:`BMesh.verts`, :class:`BMesh.edges`, :class:`BMesh.faces`\n"
-" works but won't result in each element having a valid index, insted its order in the sequence will be set.\n"
+" works but wont result in each element having a valid index, instead its order in the sequence will be set.\n"
);
static PyObject *bpy_bmelemseq_index_update(BPy_BMElemSeq *self)
{
@@ -3272,10 +3272,10 @@ PyDoc_STRVAR(bpy_bmloop_doc,
"This is normally accessed from :class:`BMFace.loops` where each face loop represents a corner of the face.\n"
);
PyDoc_STRVAR(bpy_bmelemseq_doc,
-"General sequence type used for accessing any sequence of \n"
+"General sequence type used for accessing any sequence of\n"
":class:`BMVert`, :class:`BMEdge`, :class:`BMFace`, :class:`BMLoop`.\n"
"\n"
-"When accessed via :class:`BMesh.verts`, :class:`BMesh.edges`, :class:`BMesh.faces` \n"
+"When accessed via :class:`BMesh.verts`, :class:`BMesh.edges`, :class:`BMesh.faces`\n"
"there are also functions to create/remomove items.\n"
);
PyDoc_STRVAR(bpy_bmiter_doc,
diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c
index aee9d6405d0..ecf5cce8bd2 100644
--- a/source/blender/python/bmesh/bmesh_py_types_customdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c
@@ -131,7 +131,7 @@ PyDoc_STRVAR(bpy_bmlayeraccess_collection__freestyle_face_doc,
static PyObject *bpy_bmlayeraccess_collection_get(BPy_BMLayerAccess *self, void *flag)
{
- const int type = (int)GET_INT_FROM_POINTER(flag);
+ const int type = (int)POINTER_AS_INT(flag);
BPY_BM_CHECK_OBJ(self);
diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
index e4a2cb8fbbc..d2ea87dd03f 100644
--- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
@@ -182,13 +182,13 @@ PyDoc_STRVAR(bpy_bmloopuv_flag__select_edge_doc,
static PyObject *bpy_bmloopuv_flag_get(BPy_BMLoopUV *self, void *flag_p)
{
- const int flag = GET_INT_FROM_POINTER(flag_p);
+ const int flag = POINTER_AS_INT(flag_p);
return PyBool_FromLong(self->data->flag & flag);
}
static int bpy_bmloopuv_flag_set(BPy_BMLoopUV *self, PyObject *value, void *flag_p)
{
- const int flag = GET_INT_FROM_POINTER(flag_p);
+ const int flag = POINTER_AS_INT(flag_p);
switch (PyC_Long_AsBool(value)) {
case true:
@@ -290,13 +290,13 @@ PyDoc_STRVAR(bpy_bmvertskin_flag__use_loose_doc,
static PyObject *bpy_bmvertskin_flag_get(BPy_BMVertSkin *self, void *flag_p)
{
- const int flag = GET_INT_FROM_POINTER(flag_p);
+ const int flag = POINTER_AS_INT(flag_p);
return PyBool_FromLong(self->data->flag & flag);
}
static int bpy_bmvertskin_flag_set(BPy_BMVertSkin *self, PyObject *value, void *flag_p)
{
- const int flag = GET_INT_FROM_POINTER(flag_p);
+ const int flag = POINTER_AS_INT(flag_p);
switch (PyC_Long_AsBool(value)) {
case true:
diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c
index 8bed0f28cba..918ec8fa018 100644
--- a/source/blender/python/generic/idprop_py_api.c
+++ b/source/blender/python/generic/idprop_py_api.c
@@ -944,7 +944,7 @@ PyObject *BPy_Wrap_GetKeys(IDProperty *prop)
/* pass */
}
- if (i != prop->len) { /* if the loop didnt finish, we know the length is wrong */
+ if (i != prop->len) { /* if the loop didn't finish, we know the length is wrong */
BPy_IDGroup_CorrectListLen(prop, list, i, __func__);
Py_DECREF(list); /*free the list*/
/*call self again*/
diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c
index 46f80bf79f9..62b24618d3f 100644
--- a/source/blender/python/generic/py_capi_utils.c
+++ b/source/blender/python/generic/py_capi_utils.c
@@ -46,7 +46,6 @@
#endif
#ifdef _WIN32
-#include "BLI_path_util.h" /* BLI_setenv() */
#include "BLI_math_base.h" /* isfinite() */
#endif
@@ -618,7 +617,7 @@ const char *PyC_UnicodeAsByteAndSize(PyObject *py_str, Py_ssize_t *size, PyObjec
if (result) {
/* 99% of the time this is enough but we better support non unicode
- * chars since blender doesnt limit this */
+ * chars since blender doesn't limit this */
return result;
}
else {
@@ -671,7 +670,7 @@ PyObject *PyC_UnicodeFromByteAndSize(const char *str, Py_ssize_t size)
PyObject *result = PyUnicode_FromStringAndSize(str, size);
if (result) {
/* 99% of the time this is enough but we better support non unicode
- * chars since blender doesnt limit this */
+ * chars since blender doesn't limit this */
return result;
}
else {
diff --git a/source/blender/python/generic/py_capi_utils.h b/source/blender/python/generic/py_capi_utils.h
index 92964fce9d5..4cf6d6b26de 100644
--- a/source/blender/python/generic/py_capi_utils.h
+++ b/source/blender/python/generic/py_capi_utils.h
@@ -30,19 +30,19 @@
#include "BLI_sys_types.h"
#include "BLI_utildefines_variadic.h"
-void PyC_ObSpit(const char *name, PyObject *var);
-void PyC_ObSpitStr(char *result, size_t result_len, PyObject *var);
-void PyC_LineSpit(void);
-void PyC_StackSpit(void);
-PyObject * PyC_ExceptionBuffer(void);
-PyObject * PyC_ExceptionBuffer_Simple(void);
-PyObject * PyC_Object_GetAttrStringArgs(PyObject *o, Py_ssize_t n, ...);
-PyObject * PyC_FrozenSetFromStrings(const char **strings);
-PyObject * PyC_Err_Format_Prefix(PyObject *exception_type_prefix, const char *format, ...);
-void PyC_Err_PrintWithFunc(PyObject *py_func);
-
-void PyC_FileAndNum(const char **filename, int *lineno);
-void PyC_FileAndNum_Safe(const char **filename, int *lineno); /* checks python is running */
+void PyC_ObSpit(const char *name, PyObject *var);
+void PyC_ObSpitStr(char *result, size_t result_len, PyObject *var);
+void PyC_LineSpit(void);
+void PyC_StackSpit(void);
+PyObject *PyC_ExceptionBuffer(void);
+PyObject *PyC_ExceptionBuffer_Simple(void);
+PyObject *PyC_Object_GetAttrStringArgs(PyObject *o, Py_ssize_t n, ...);
+PyObject *PyC_FrozenSetFromStrings(const char **strings);
+PyObject *PyC_Err_Format_Prefix(PyObject *exception_type_prefix, const char *format, ...);
+void PyC_Err_PrintWithFunc(PyObject *py_func);
+
+void PyC_FileAndNum(const char **filename, int *lineno);
+void PyC_FileAndNum_Safe(const char **filename, int *lineno); /* checks python is running */
int PyC_AsArray_FAST(
void *array, PyObject *value_fast, const Py_ssize_t length,
const PyTypeObject *type, const bool is_double, const char *error_prefix);
@@ -71,10 +71,10 @@ void PyC_Tuple_Fill(PyObject *tuple, PyObject *value);
void PyC_List_Fill(PyObject *list, PyObject *value);
/* follow http://www.python.org/dev/peps/pep-0383/ */
-PyObject * PyC_UnicodeFromByte(const char *str);
-PyObject * PyC_UnicodeFromByteAndSize(const char *str, Py_ssize_t size);
-const char * PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce); /* coerce must be NULL */
-const char * PyC_UnicodeAsByteAndSize(PyObject *py_str, Py_ssize_t *size, PyObject **coerce);
+PyObject *PyC_UnicodeFromByte(const char *str);
+PyObject *PyC_UnicodeFromByteAndSize(const char *str, Py_ssize_t size);
+const char *PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce); /* coerce must be NULL */
+const char *PyC_UnicodeAsByteAndSize(PyObject *py_str, Py_ssize_t *size, PyObject **coerce);
/* name namespace function for bpy & bge */
PyObject *PyC_DefaultNameSpace(const char *filename);
diff --git a/source/blender/python/intern/CMakeLists.txt b/source/blender/python/intern/CMakeLists.txt
index ae16bd4a145..357cb175769 100644
--- a/source/blender/python/intern/CMakeLists.txt
+++ b/source/blender/python/intern/CMakeLists.txt
@@ -165,6 +165,10 @@ if(WITH_CYCLES_OSL)
add_definitions(-DWITH_CYCLES_OSL)
endif()
+if(WITH_CYCLES_EMBREE)
+ add_definitions(-DWITH_CYCLES_EMBREE)
+endif()
+
if(WITH_FREESTYLE)
list(APPEND INC
../../freestyle/intern/python
diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c
index 66c64b580f3..928e14c09bf 100644
--- a/source/blender/python/intern/bpy_app.c
+++ b/source/blender/python/intern/bpy_app.c
@@ -230,13 +230,13 @@ PyDoc_STRVAR(bpy_app_debug_doc,
);
static PyObject *bpy_app_debug_get(PyObject *UNUSED(self), void *closure)
{
- const int flag = GET_INT_FROM_POINTER(closure);
+ const int flag = POINTER_AS_INT(closure);
return PyBool_FromLong(G.debug & flag);
}
static int bpy_app_debug_set(PyObject *UNUSED(self), PyObject *value, void *closure)
{
- const int flag = GET_INT_FROM_POINTER(closure);
+ const int flag = POINTER_AS_INT(closure);
const int param = PyObject_IsTrue(value);
if (param == -1) {
@@ -307,7 +307,7 @@ static int bpy_app_debug_value_set(PyObject *UNUSED(self), PyObject *value, void
static PyObject *bpy_app_global_flag_get(PyObject *UNUSED(self), void *closure)
{
- const int flag = GET_INT_FROM_POINTER(closure);
+ const int flag = POINTER_AS_INT(closure);
return PyBool_FromLong(G.f & flag);
}
@@ -339,7 +339,7 @@ PyDoc_STRVAR(bpy_app_preview_render_size_doc,
);
static PyObject *bpy_app_preview_render_size_get(PyObject *UNUSED(self), void *closure)
{
- return PyLong_FromLong((long)UI_preview_render_size(GET_INT_FROM_POINTER(closure)));
+ return PyLong_FromLong((long)UI_preview_render_size(POINTER_AS_INT(closure)));
}
static PyObject *bpy_app_autoexec_fail_message_get(PyObject *UNUSED(self), void *UNUSED(closure))
@@ -364,6 +364,7 @@ static PyGetSetDef bpy_app_getsets[] = {
{(char *)"debug_depsgraph_pretty", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_DEPSGRAPH_PRETTY},
{(char *)"debug_simdata", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_SIMDATA},
{(char *)"debug_gpumem", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_GPU_MEM},
+ {(char *)"debug_io", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_IO},
{(char *)"binary_path_python", bpy_app_binary_path_python_get, NULL, (char *)bpy_app_binary_path_python_doc, NULL},
diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c
index ded5ead93aa..8453808d6ec 100644
--- a/source/blender/python/intern/bpy_app_handlers.c
+++ b/source/blender/python/intern/bpy_app_handlers.c
@@ -241,7 +241,7 @@ PyObject *BPY_app_handlers_struct(void)
funcstore = &funcstore_array[pos];
funcstore->func = bpy_app_generic_callback;
funcstore->alloc = 0;
- funcstore->arg = SET_INT_IN_POINTER(pos);
+ funcstore->arg = POINTER_FROM_INT(pos);
BLI_callback_add(funcstore, pos);
}
}
@@ -300,7 +300,7 @@ void BPY_app_handlers_reset(const short do_all)
/* the actual callback - not necessarily called from py */
void bpy_app_generic_callback(struct Main *UNUSED(main), struct ID *id, void *arg)
{
- PyObject *cb_list = py_cb_array[GET_INT_FROM_POINTER(arg)];
+ PyObject *cb_list = py_cb_array[POINTER_AS_INT(arg)];
if (PyList_GET_SIZE(cb_list) > 0) {
PyGILState_STATE gilstate = PyGILState_Ensure();
diff --git a/source/blender/python/intern/bpy_app_translations.c b/source/blender/python/intern/bpy_app_translations.c
index ffc54969d8c..2a5efc15b87 100644
--- a/source/blender/python/intern/bpy_app_translations.c
+++ b/source/blender/python/intern/bpy_app_translations.c
@@ -289,12 +289,12 @@ PyDoc_STRVAR(app_translations_py_messages_register_doc,
" Registers an addon's UI translations.\n"
"\n"
" .. note::\n"
-" Does nothing when Blender is built without internationalization support.\n"
+" Does nothing when Blender is built without internationalization support.\n"
"\n"
" :arg module_name: The name identifying the addon.\n"
" :type module_name: string\n"
" :arg translations_dict: A dictionary built like that:\n"
-" ``{locale: {msg_key: msg_translation, ...}, ...}``\n"
+" ``{locale: {msg_key: msg_translation, ...}, ...}``\n"
" :type translations_dict: dict\n"
"\n"
);
@@ -337,7 +337,7 @@ PyDoc_STRVAR(app_translations_py_messages_unregister_doc,
" Unregisters an addon's UI translations.\n"
"\n"
" .. note::\n"
-" Does nothing when Blender is built without internationalization support.\n"
+" Does nothing when Blender is built without internationalization support.\n"
"\n"
" :arg module_name: The name identifying the addon.\n"
" :type module_name: string\n"
@@ -425,8 +425,8 @@ PyDoc_STRVAR(app_translations_contexts_doc,
"A named tuple containing all pre-defined translation contexts.\n"
"\n"
".. warning::\n"
-" Never use a (new) context starting with \"" BLT_I18NCONTEXT_DEFAULT_BPYRNA "\", it would be internally \n"
-" assimilated as the default one!\n"
+" Never use a (new) context starting with \"" BLT_I18NCONTEXT_DEFAULT_BPYRNA "\", it would be internally\n"
+" assimilated as the default one!\n"
);
PyDoc_STRVAR(app_translations_contexts_C_to_py_doc,
@@ -522,16 +522,16 @@ PyDoc_STRVAR(app_translations_pgettext_doc,
" Try to translate the given msgid (with optional msgctxt).\n"
"\n"
" .. note::\n"
-" The ``(msgid, msgctxt)`` parameters order has been switched compared to gettext function, to allow\n"
-" single-parameter calls (context then defaults to BLT_I18NCONTEXT_DEFAULT).\n"
+" The ``(msgid, msgctxt)`` parameters order has been switched compared to gettext function, to allow\n"
+" single-parameter calls (context then defaults to BLT_I18NCONTEXT_DEFAULT).\n"
"\n"
" .. note::\n"
-" You should really rarely need to use this function in regular addon code, as all translation should be\n"
-" handled by Blender internal code. The only exception are string containing formatting (like \"File: %r\"),\n"
-" but you should rather use :func:`pgettext_iface`/:func:`pgettext_tip` in those cases!\n"
+" You should really rarely need to use this function in regular addon code, as all translation should be\n"
+" handled by Blender internal code. The only exception are string containing formatting (like \"File: %r\"),\n"
+" but you should rather use :func:`pgettext_iface`/:func:`pgettext_tip` in those cases!\n"
"\n"
" .. note::\n"
-" Does nothing when Blender is built without internationalization support (hence always returns ``msgid``).\n"
+" Does nothing when Blender is built without internationalization support (hence always returns ``msgid``).\n"
"\n"
" :arg msgid: The string to translate.\n"
" :type msgid: string\n"
@@ -551,7 +551,7 @@ PyDoc_STRVAR(app_translations_pgettext_iface_doc,
" Try to translate the given msgid (with optional msgctxt), if labels' translation is enabled.\n"
"\n"
" .. note::\n"
-" See :func:`pgettext` notes.\n"
+" See :func:`pgettext` notes.\n"
"\n"
" :arg msgid: The string to translate.\n"
" :type msgid: string\n"
@@ -571,7 +571,7 @@ PyDoc_STRVAR(app_translations_pgettext_tip_doc,
" Try to translate the given msgid (with optional msgctxt), if tooltips' translation is enabled.\n"
"\n"
" .. note::\n"
-" See :func:`pgettext` notes.\n"
+" See :func:`pgettext` notes.\n"
"\n"
" :arg msgid: The string to translate.\n"
" :type msgid: string\n"
@@ -591,7 +591,7 @@ PyDoc_STRVAR(app_translations_pgettext_data_doc,
" Try to translate the given msgid (with optional msgctxt), if new data name's translation is enabled.\n"
"\n"
" .. note::\n"
-" See :func:`pgettext` notes.\n"
+" See :func:`pgettext` notes.\n"
"\n"
" :arg msgid: The string to translate.\n"
" :type msgid: string\n"
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index 123c938b921..1ae3106aa76 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -692,7 +692,9 @@ bool BPY_execute_string_as_intptr(
return ok;
}
-bool BPY_execute_string_ex(bContext *C, const char *expr, bool use_eval)
+bool BPY_execute_string_ex(
+ bContext *C, const char *imports[],
+ const char *expr, bool use_eval)
{
BLI_assert(expr);
PyGILState_STATE gilstate;
@@ -714,13 +716,18 @@ bool BPY_execute_string_ex(bContext *C, const char *expr, bool use_eval)
bmain_back = bpy_import_main_get();
bpy_import_main_set(CTX_data_main(C));
- retval = PyRun_String(expr, use_eval ? Py_eval_input : Py_file_input, py_dict, py_dict);
+ if (imports && (!PyC_NameSpace_ImportArray(py_dict, imports))) {
+ Py_DECREF(py_dict);
+ retval = NULL;
+ }
+ else {
+ retval = PyRun_String(expr, use_eval ? Py_eval_input : Py_file_input, py_dict, py_dict);
+ }
bpy_import_main_set(bmain_back);
if (retval == NULL) {
ok = false;
-
BPy_errors_to_report(CTX_wm_reports(C));
}
else {
@@ -734,9 +741,11 @@ bool BPY_execute_string_ex(bContext *C, const char *expr, bool use_eval)
return ok;
}
-bool BPY_execute_string(bContext *C, const char *expr)
+bool BPY_execute_string(
+ bContext *C, const char *imports[],
+ const char *expr)
{
- return BPY_execute_string_ex(C, expr, true);
+ return BPY_execute_string_ex(C, imports, expr, true);
}
void BPY_modules_load_user(bContext *C)
@@ -994,7 +1003,7 @@ bool BPY_string_is_keyword(const char *str)
*/
const char *kwlist[] = {
"False", "None", "True",
- "and", "as", "assert", "break",
+ "and", "as", "assert", "async", "await", "break",
"class", "continue", "def", "del", "elif", "else", "except",
"finally", "for", "from", "global", "if", "import", "in",
"is", "lambda", "nonlocal", "not", "or", "pass", "raise",
diff --git a/source/blender/python/intern/bpy_path.c b/source/blender/python/intern/bpy_path.c
index f182972ba9c..53d8f8ea954 100644
--- a/source/blender/python/intern/bpy_path.c
+++ b/source/blender/python/intern/bpy_path.c
@@ -23,7 +23,7 @@
/** \file blender/python/intern/bpy_path.c
* \ingroup pythonintern
*
- * This file defines '_bpy_path' module, Some 'C' funtionality used by 'bpy.path'
+ * This file defines '_bpy_path' module, Some 'C' functionality used by 'bpy.path'
*/
#include <Python.h>
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 28a6a4f7fb0..9837017b8b1 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -90,7 +90,7 @@ static PyObject *pyrna_prop_collection_values(BPy_PropertyRNA *self);
#define BPY_DOC_ID_PROP_TYPE_NOTE \
" .. note::\n" \
"\n" \
-" Only :class:`bpy.types.ID`, :class:`bpy.types.Bone` and \n" \
+" Only :class:`bpy.types.ID`, :class:`bpy.types.Bone` and\n" \
" :class:`bpy.types.PoseBone` classes support custom properties.\n"
@@ -2351,7 +2351,7 @@ static int pyrna_prop_collection_subscript_str_lib_pair_ptr(
}
else {
PyErr_Format(PyExc_KeyError,
- "%s: lib must be a sting or None, not %.200s",
+ "%s: lib must be a string or None, not %.200s",
err_prefix, Py_TYPE(keylib)->tp_name);
return -1;
}
@@ -4091,7 +4091,7 @@ static PyObject *pyrna_struct_meta_idprop_getattro(PyObject *cls, PyObject *attr
* <bpy_struct, BoolProperty("foo")>
* ...rather than returning the deferred class register tuple as checked by pyrna_is_deferred_prop()
*
- * Disable for now, this is faking internal behavior in a way thats too tricky to maintain well. */
+ * Disable for now, this is faking internal behavior in a way that's too tricky to maintain well. */
#if 0
if (ret == NULL) { // || pyrna_is_deferred_prop(ret)
StructRNA *srna = srna_from_self(cls, "StructRNA.__getattr__");
@@ -7309,7 +7309,7 @@ static int deferred_register_prop(StructRNA *srna, PyObject *key, PyObject *item
RNA_struct_idprops_contains_datablock(type_srna))
{
PyErr_Format(PyExc_ValueError,
- "bpy_struct \"%.200s\" doesn't support datablock properties \n",
+ "bpy_struct \"%.200s\" doesn't support datablock properties\n",
RNA_struct_identifier(srna));
return -1;
}
diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c
index f021d456b3a..566bac9cb09 100644
--- a/source/blender/python/mathutils/mathutils.c
+++ b/source/blender/python/mathutils/mathutils.c
@@ -641,7 +641,7 @@ PyMODINIT_FUNC PyInit_mathutils(void)
/* submodule */
PyModule_AddObject(mod, "geometry", (submodule = PyInit_mathutils_geometry()));
- /* XXX, python doesnt do imports with this usefully yet
+ /* XXX, python doesn't do imports with this usefully yet
* 'from mathutils.geometry import PolyFill'
* ...fails without this. */
PyDict_SetItem(sys_modules, PyModule_GetNameObject(submodule), submodule);
diff --git a/source/blender/python/mathutils/mathutils_Color.c b/source/blender/python/mathutils/mathutils_Color.c
index 4c1163a6181..e97ed095b24 100644
--- a/source/blender/python/mathutils/mathutils_Color.c
+++ b/source/blender/python/mathutils/mathutils_Color.c
@@ -706,12 +706,12 @@ PyDoc_STRVAR(Color_channel_b_doc, "Blue color channel.\n\n:type: float");
static PyObject *Color_channel_get(ColorObject *self, void *type)
{
- return Color_item(self, GET_INT_FROM_POINTER(type));
+ return Color_item(self, POINTER_AS_INT(type));
}
static int Color_channel_set(ColorObject *self, PyObject *value, void *type)
{
- return Color_ass_item(self, GET_INT_FROM_POINTER(type), value);
+ return Color_ass_item(self, POINTER_AS_INT(type), value);
}
/* color channel (HSV), color.h/s/v */
@@ -722,7 +722,7 @@ PyDoc_STRVAR(Color_channel_hsv_v_doc, "HSV Value component in [0, 1].\n\n:type:
static PyObject *Color_channel_hsv_get(ColorObject *self, void *type)
{
float hsv[3];
- int i = GET_INT_FROM_POINTER(type);
+ int i = POINTER_AS_INT(type);
if (BaseMath_ReadCallback(self) == -1)
return NULL;
@@ -735,7 +735,7 @@ static PyObject *Color_channel_hsv_get(ColorObject *self, void *type)
static int Color_channel_hsv_set(ColorObject *self, PyObject *value, void *type)
{
float hsv[3];
- int i = GET_INT_FROM_POINTER(type);
+ int i = POINTER_AS_INT(type);
float f = PyFloat_AsDouble(value);
if (f == -1 && PyErr_Occurred()) {
diff --git a/source/blender/python/mathutils/mathutils_Euler.c b/source/blender/python/mathutils/mathutils_Euler.c
index 31576c32497..9046bdc1aa4 100644
--- a/source/blender/python/mathutils/mathutils_Euler.c
+++ b/source/blender/python/mathutils/mathutils_Euler.c
@@ -612,12 +612,12 @@ PyDoc_STRVAR(Euler_axis_doc,
);
static PyObject *Euler_axis_get(EulerObject *self, void *type)
{
- return Euler_item(self, GET_INT_FROM_POINTER(type));
+ return Euler_item(self, POINTER_AS_INT(type));
}
static int Euler_axis_set(EulerObject *self, PyObject *value, void *type)
{
- return Euler_ass_item(self, GET_INT_FROM_POINTER(type), value);
+ return Euler_ass_item(self, POINTER_AS_INT(type), value);
}
/* rotation order */
diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c
index 48c18dd20c1..645fa96c22e 100644
--- a/source/blender/python/mathutils/mathutils_Quaternion.c
+++ b/source/blender/python/mathutils/mathutils_Quaternion.c
@@ -972,12 +972,12 @@ PyDoc_STRVAR(Quaternion_axis_doc,
);
static PyObject *Quaternion_axis_get(QuaternionObject *self, void *type)
{
- return Quaternion_item(self, GET_INT_FROM_POINTER(type));
+ return Quaternion_item(self, POINTER_AS_INT(type));
}
static int Quaternion_axis_set(QuaternionObject *self, PyObject *value, void *type)
{
- return Quaternion_ass_item(self, GET_INT_FROM_POINTER(type), value);
+ return Quaternion_ass_item(self, POINTER_AS_INT(type), value);
}
PyDoc_STRVAR(Quaternion_magnitude_doc,
@@ -1260,17 +1260,17 @@ PyDoc_STRVAR(quaternion_doc,
" The constructor takes arguments in various forms:\n"
"\n"
" (), *no args*\n"
-" Create an identity quaternion\n"
+" Create an identity quaternion\n"
" (*wxyz*)\n"
-" Create a quaternion from a ``(w, x, y, z)`` vector.\n"
+" Create a quaternion from a ``(w, x, y, z)`` vector.\n"
" (*exponential_map*)\n"
-" Create a quaternion from a 3d exponential map vector.\n"
+" Create a quaternion from a 3d exponential map vector.\n"
"\n"
-" .. seealso:: :meth:`to_exponential_map`\n"
+" .. seealso:: :meth:`to_exponential_map`\n"
" (*axis, angle*)\n"
-" Create a quaternion representing a rotation of *angle* radians over *axis*.\n"
+" Create a quaternion representing a rotation of *angle* radians over *axis*.\n"
"\n"
-" .. seealso:: :meth:`to_axis_angle`\n"
+" .. seealso:: :meth:`to_axis_angle`\n"
);
PyTypeObject quaternion_Type = {
PyVarObject_HEAD_INIT(NULL, 0)
diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c
index c203ac2bd05..e7776f836aa 100644
--- a/source/blender/python/mathutils/mathutils_Vector.c
+++ b/source/blender/python/mathutils/mathutils_Vector.c
@@ -2132,12 +2132,12 @@ PyDoc_STRVAR(Vector_axis_w_doc, "Vector W axis (4D Vectors only).\n\n:type: floa
static PyObject *Vector_axis_get(VectorObject *self, void *type)
{
- return vector_item_internal(self, GET_INT_FROM_POINTER(type), true);
+ return vector_item_internal(self, POINTER_AS_INT(type), true);
}
static int Vector_axis_set(VectorObject *self, PyObject *value, void *type)
{
- return vector_ass_item_internal(self, GET_INT_FROM_POINTER(type), value, true);
+ return vector_ass_item_internal(self, POINTER_AS_INT(type), value, true);
}
/* vector.length */
@@ -2280,7 +2280,7 @@ static PyObject *Vector_swizzle_get(VectorObject *self, void *closure)
/* Unpack the axes from the closure into an array. */
axis_to = 0;
- swizzleClosure = GET_INT_FROM_POINTER(closure);
+ swizzleClosure = POINTER_AS_INT(closure);
while (swizzleClosure & SWIZZLE_VALID_AXIS) {
axis_from = swizzleClosure & SWIZZLE_AXIS;
if (axis_from >= self->size) {
@@ -2327,7 +2327,7 @@ static int Vector_swizzle_set(VectorObject *self, PyObject *value, void *closure
/* Check that the closure can be used with this vector: even 2D vectors have
* swizzles defined for axes z and w, but they would be invalid. */
- swizzleClosure = GET_INT_FROM_POINTER(closure);
+ swizzleClosure = POINTER_AS_INT(closure);
axis_from = 0;
while (swizzleClosure & SWIZZLE_VALID_AXIS) {
@@ -2366,7 +2366,7 @@ static int Vector_swizzle_set(VectorObject *self, PyObject *value, void *closure
/* Copy vector contents onto swizzled axes. */
axis_from = 0;
- swizzleClosure = GET_INT_FROM_POINTER(closure);
+ swizzleClosure = POINTER_AS_INT(closure);
/* We must first copy current vec into tvec, else some org values may be lost.
* See [#31760].
@@ -2396,9 +2396,9 @@ static int Vector_swizzle_set(VectorObject *self, PyObject *value, void *closure
#define _SWIZZLE3(a, b, c) (_SWIZZLE2(a, b) | (((c) | SWIZZLE_VALID_AXIS) << (SWIZZLE_BITS_PER_AXIS * 2)))
#define _SWIZZLE4(a, b, c, d) (_SWIZZLE3(a, b, c) | (((d) | SWIZZLE_VALID_AXIS) << (SWIZZLE_BITS_PER_AXIS * 3)))
-#define SWIZZLE2(a, b) SET_INT_IN_POINTER(_SWIZZLE2(a, b))
-#define SWIZZLE3(a, b, c) SET_INT_IN_POINTER(_SWIZZLE3(a, b, c))
-#define SWIZZLE4(a, b, c, d) SET_INT_IN_POINTER(_SWIZZLE4(a, b, c, d))
+#define SWIZZLE2(a, b) POINTER_FROM_INT(_SWIZZLE2(a, b))
+#define SWIZZLE3(a, b, c) POINTER_FROM_INT(_SWIZZLE3(a, b, c))
+#define SWIZZLE4(a, b, c, d) POINTER_FROM_INT(_SWIZZLE4(a, b, c, d))
/*****************************************************************************/
/* Python attributes get/set structure: */
diff --git a/source/blender/python/mathutils/mathutils_geometry.c b/source/blender/python/mathutils/mathutils_geometry.c
index d935949fd8c..371733ea147 100644
--- a/source/blender/python/mathutils/mathutils_geometry.c
+++ b/source/blender/python/mathutils/mathutils_geometry.c
@@ -860,7 +860,7 @@ static PyObject *M_Geometry_intersect_point_tri_2d(PyObject *UNUSED(self), PyObj
PyDoc_STRVAR(M_Geometry_intersect_point_quad_2d_doc,
".. function:: intersect_point_quad_2d(pt, quad_p1, quad_p2, quad_p3, quad_p4)\n"
"\n"
-" Takes 5 vectors (using only the x and y coordinates): one is the point and the next 4 define the quad, \n"
+" Takes 5 vectors (using only the x and y coordinates): one is the point and the next 4 define the quad,\n"
" only the x and y are used from the vectors. Returns 1 if the point is within the quad, otherwise 0.\n"
" Works only with convex quads without singular edges.\n"
"\n"
@@ -1265,7 +1265,7 @@ static PyObject *M_Geometry_tessellate_polygon(PyObject *UNUSED(self), PyObject
BKE_displist_fill(&dispbase, &dispbase, NULL, false);
/* The faces are stored in a new DisplayList
- * thats added to the head of the listbase */
+ * that's added to the head of the listbase */
dl = dispbase.first;
tri_list = PyList_New(dl->parts);
diff --git a/source/blender/render/intern/raytrace/rayobject_internal.h b/source/blender/render/intern/raytrace/rayobject_internal.h
index dbc78b317c6..e24ce568c6b 100644
--- a/source/blender/render/intern/raytrace/rayobject_internal.h
+++ b/source/blender/render/intern/raytrace/rayobject_internal.h
@@ -40,10 +40,10 @@ extern "C" {
*
* This class is intended as a place holder for control, configuration of the
* rayobject like:
- * - stop building (TODO maybe when porting build to threads this could be
- * implemented with some thread_cancel function)
- * - max number of threads and threads callback to use during build
- * ...
+ * - stop building (TODO maybe when porting build to threads this could be
+ * implemented with some thread_cancel function)
+ * - max number of threads and threads callback to use during build
+ * ...
*/
typedef int (*RE_rayobjectcontrol_test_break_callback)(void *data);
diff --git a/source/blender/render/intern/raytrace/rayobject_rtbuild.h b/source/blender/render/intern/raytrace/rayobject_rtbuild.h
index fc42bc36d92..d4510fe245d 100644
--- a/source/blender/render/intern/raytrace/rayobject_rtbuild.h
+++ b/source/blender/render/intern/raytrace/rayobject_rtbuild.h
@@ -40,10 +40,10 @@ extern "C" {
/*
- * Ray Tree Builder
- * this structs helps building any type of tree
- * it contains several methods to organize/split nodes
- * allowing to create a given tree on the fly.
+ * Ray Tree Builder:
+ * this structs helps building any type of tree
+ * it contains several methods to organize/split nodes
+ * allowing to create a given tree on the fly.
*
* Idea is that other trees BVH, BIH can use this code to
* generate with simple calls, and then convert to the theirs
diff --git a/source/blender/render/intern/raytrace/reorganize.h b/source/blender/render/intern/raytrace/reorganize.h
index 3fdd3363edb..8cdd2547de3 100644
--- a/source/blender/render/intern/raytrace/reorganize.h
+++ b/source/blender/render/intern/raytrace/reorganize.h
@@ -218,7 +218,7 @@ static void pushup_simd(Node *parent)
/*
* Pushdown
- * makes sure no child fits inside any of its sibling
+ * makes sure no child fits inside any of its sibling
*/
template<class Node>
static void pushdown(Node *parent)
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 97971030dfb..4f2f8d67f45 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -2454,6 +2454,13 @@ static void do_merge_fullsample(Render *re, bNodeTree *ntree)
BLI_rw_mutex_unlock(&re->resultmutex);
render_result_uncrop(re1);
}
+#ifdef WITH_FREESTYLE
+ else if (re1->r.mode & R_EDGE_FRS) {
+ BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
+ composite_freestyle_renders(re1, 0);
+ BLI_rw_mutex_unlock(&re->resultmutex);
+ }
+#endif
ntreeCompositTagRender(re1->scene); /* ensure node gets exec to put buffers on stack */
}
}
diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c
index 6e3dffccc16..608275cdb4d 100644
--- a/source/blender/render/intern/source/rayshade.c
+++ b/source/blender/render/intern/source/rayshade.c
@@ -88,7 +88,7 @@ static void RE_rayobject_config_control(RayObject *r, Render *re)
RayObject *RE_rayobject_create(int type, int size, int octree_resolution)
{
- RayObject * res = NULL;
+ RayObject *res = NULL;
if (type == R_RAYSTRUCTURE_AUTO) {
/* TODO */
@@ -124,7 +124,7 @@ RayObject *RE_rayobject_create(int type, int size, int octree_resolution)
static RayObject* rayobject_create(Render *re, int type, int size)
{
- RayObject * res = NULL;
+ RayObject *res = NULL;
res = RE_rayobject_create(type, size, re->r.ocres);
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index fb3c8b542a8..103dbbacd22 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -2181,7 +2181,7 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T
if ( mtex->texflag & MTEX_BUMP_OBJECTSPACE ) {
/* TODO: these calculations happen for every pixel!
- * -> move to shi->obi */
+ * -> move to shi->obi */
mul_m4_m4m4(tmp, R.viewmat, shi->obr->ob->obmat);
copy_m3_m4(obj2view, tmp); /* use only upper left 3x3 matrix */
invert_m3_m3(view2obj, obj2view);
@@ -3859,13 +3859,13 @@ void RE_sample_material_free(Material *mat)
}
/*
- * Get material diffuse color and alpha (including linked textures) in given coordinates
+ * Get material diffuse color and alpha (including linked textures) in given coordinates
*
- * color,alpha : input/output color values
- * volume_co : sample coordinate in global space. used by volumetric materials
- * surface_co : sample surface coordinate in global space. used by "surface" materials
- * tri_index : surface tri index
- * orcoDm : orco state derived mesh
+ * color,alpha : input/output color values
+ * volume_co : sample coordinate in global space. used by volumetric materials
+ * surface_co : sample surface coordinate in global space. used by "surface" materials
+ * tri_index : surface tri index
+ * orcoDm : orco state derived mesh
*/
void RE_sample_material_color(
Material *mat, float color[3], float *alpha, const float volume_co[3], const float surface_co[3],
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c
index 99d2436d4bc..cfbf199c94d 100644
--- a/source/blender/render/intern/source/rendercore.c
+++ b/source/blender/render/intern/source/rendercore.c
@@ -314,7 +314,7 @@ static void halo_tile(RenderPart *pa, RenderLayer *rl)
if ((zz> har->zs) || (har->mat && (har->mat->mode & MA_HALO_SOFT))) {
if (shadeHaloFloat(har, col, zz, dist, xn, yn, har->flarec)) {
for (sample=0; sample<totsample; sample++) {
- float * rect= RE_RenderLayerGetPass(rlpp[sample], RE_PASSNAME_COMBINED, R.viewname);
+ float *rect = RE_RenderLayerGetPass(rlpp[sample], RE_PASSNAME_COMBINED, R.viewname);
addalphaAddfacFloat(rect + od*4, col, har->add);
}
}
diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c
index 04e9177241b..3f2ed75f5a4 100644
--- a/source/blender/render/intern/source/shadbuf.c
+++ b/source/blender/render/intern/source/shadbuf.c
@@ -1086,7 +1086,7 @@ static float readshadowbuf(ShadBuf *shb, ShadSampleBuf *shsample, int bias, int
else {
/* got warning on this for 64 bits.... */
/* but it's working code! in this case rz is not a pointer but zvalue (ton) */
- zsamp= GET_INT_FROM_POINTER(rz);
+ zsamp= POINTER_AS_INT(rz);
}
/* tricky stuff here; we use ints which can overflow easily with bias values */
@@ -1270,7 +1270,7 @@ static float readshadowbuf_halo(ShadBuf *shb, ShadSampleBuf *shsample, int xs, i
else {
/* same as before */
/* still working code! (ton) */
- zsamp= GET_INT_FROM_POINTER(rz);
+ zsamp= POINTER_AS_INT(rz);
}
/* NO schadow when sampled at 'eternal' distance */
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 33e918b25e5..5ee7763272b 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -55,6 +55,7 @@ struct wmGesture;
struct wmJob;
struct wmOperatorType;
struct wmOperator;
+struct wmPaintCursor;
struct rcti;
struct PointerRNA;
struct PropertyRNA;
@@ -78,6 +79,7 @@ const char *WM_init_state_app_template_get(void);
void WM_init_state_size_set (int stax, int stay, int sizx, int sizy);
void WM_init_state_fullscreen_set(void);
void WM_init_state_normal_set(void);
+void WM_init_window_focus_set(bool do_it);
void WM_init_native_pixels(bool do_it);
void WM_init (struct bContext *C, int argc, const char **argv);
@@ -132,15 +134,17 @@ void WM_cursor_grab_enable(struct wmWindow *win, bool wrap, bool hide, int boun
void WM_cursor_grab_disable(struct wmWindow *win, const int mouse_ungrab_xy[2]);
void WM_cursor_time (struct wmWindow *win, int nr);
-void *WM_paint_cursor_activate(
+struct wmPaintCursor *WM_paint_cursor_activate(
struct wmWindowManager *wm,
bool (*poll)(struct bContext *C),
void (*draw)(struct bContext *C, int, int, void *customdata),
void *customdata);
-void WM_paint_cursor_end(struct wmWindowManager *wm, void *handle);
+bool WM_paint_cursor_end(struct wmWindowManager *wm, struct wmPaintCursor *handle);
+void *WM_paint_cursor_customdata_get(struct wmPaintCursor *pc);
void WM_paint_cursor_tag_redraw(struct wmWindow *win, struct ARegion *ar);
+
void WM_cursor_warp (struct wmWindow *win, int x, int y);
void WM_cursor_compatible_xy(wmWindow *win, int *x, int *y);
float WM_cursor_pressure (const struct wmWindow *win);
diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c
index 24ec3aef759..e789099c799 100644
--- a/source/blender/windowmanager/intern/wm_cursors.c
+++ b/source/blender/windowmanager/intern/wm_cursors.c
@@ -274,7 +274,7 @@ bool wm_cursor_arrow_move(wmWindow *win, const wmEvent *event)
}
-/* afer this you can call restore too */
+/* after this you can call restore too */
void WM_cursor_time(wmWindow *win, int nr)
{
/* 10 8x8 digits */
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 3a300877750..0084c3a5407 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -2101,7 +2101,7 @@ static int wm_handlers_do_intern(bContext *C, wmEvent *event, ListBase *handlers
/* modal handlers can get removed in this loop, we keep the loop this way
*
* note: check 'handlers->first' because in rare cases the handlers can be cleared
- * by the event thats called, for eg:
+ * by the event that's called, for eg:
*
* Calling a python script which changes the area.type, see [#32232] */
for (handler = handlers->first; handler && handlers->first; handler = nexthandler) {
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 477699fccaa..acb954a4b05 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -473,10 +473,14 @@ static void wm_file_read_post(bContext *C, const bool is_startup_file, const boo
if (use_userdef) {
/* Only run when we have a template path found. */
if (BKE_appdir_app_template_any()) {
- BPY_execute_string(C, "__import__('bl_app_template_utils').reset()");
+ BPY_execute_string(
+ C, (const char *[]){"bl_app_template_utils", NULL},
+ "bl_app_template_utils.reset()");
}
/* sync addons, these may have changed from the defaults */
- BPY_execute_string(C, "__import__('addon_utils').reset_all()");
+ BPY_execute_string(
+ C, (const char *[]){"addon_utils", NULL},
+ "addon_utils.reset_all()");
}
BPY_python_reset(C);
addons_loaded = true;
@@ -565,7 +569,10 @@ bool WM_file_read(bContext *C, const char *filepath, ReportList *reports)
/* confusing this global... */
G.relbase_valid = 1;
- retval = BKE_blendfile_read(C, filepath, reports, 0);
+ retval = BKE_blendfile_read(
+ C, filepath,
+ &(const struct BlendFileReadParams){0},
+ reports);
/* BKE_file_read sets new Main into context. */
Main *bmain = CTX_data_main(C);
@@ -641,7 +648,7 @@ bool WM_file_read(bContext *C, const char *filepath, ReportList *reports)
struct {
char app_template[64];
bool override;
-} wm_init_state_app_template = {0};
+} wm_init_state_app_template = {{0}};
/**
* Used for setting app-template from the command line:
@@ -800,7 +807,13 @@ int wm_homefile_read(
if (!use_factory_settings || (filepath_startup[0] != '\0')) {
if (BLI_access(filepath_startup, R_OK) == 0) {
- success = (BKE_blendfile_read(C, filepath_startup, NULL, skip_flags) != BKE_BLENDFILE_READ_FAIL);
+ success = BKE_blendfile_read(
+ C, filepath_startup,
+ &(const struct BlendFileReadParams){
+ .is_startup = true,
+ .skip_flags = skip_flags,
+ },
+ NULL) != BKE_BLENDFILE_READ_FAIL;
}
if (BLI_listbase_is_empty(&U.themes)) {
if (G.debug & G_DEBUG)
@@ -816,8 +829,12 @@ int wm_homefile_read(
if (success == false) {
success = BKE_blendfile_read_from_memory(
- C, datatoc_startup_blend, datatoc_startup_blend_size,
- NULL, skip_flags, true);
+ C, datatoc_startup_blend, datatoc_startup_blend_size, true,
+ &(const struct BlendFileReadParams){
+ .is_startup = true,
+ .skip_flags = skip_flags,
+ },
+ NULL);
if (success) {
if (use_userdef) {
if ((skip_flags & BLO_READ_SKIP_USERDEF) == 0) {
@@ -964,7 +981,7 @@ static RecentFile *wm_file_history_find(const char *filepath)
/**
* Write #BLENDER_HISTORY_FILE as-is, without checking the environment
- * (thats handled by #wm_history_file_update).
+ * (that's handled by #wm_history_file_update).
*/
static void wm_history_file_write(void)
{
@@ -1128,12 +1145,12 @@ bool write_crash_blend(void)
/**
* \see #wm_homefile_write_exec wraps #BLO_write_file in a similar way.
*/
-static int wm_file_write(bContext *C, const char *filepath, int fileflags, ReportList *reports)
+static bool wm_file_write(bContext *C, const char *filepath, int fileflags, ReportList *reports)
{
Main *bmain = CTX_data_main(C);
Library *li;
int len;
- int ret = -1;
+ int ok = false;
BlendThumbnail *thumb, *main_thumb;
ImBuf *ibuf_thumb = NULL;
@@ -1141,18 +1158,18 @@ static int wm_file_write(bContext *C, const char *filepath, int fileflags, Repor
if (len == 0) {
BKE_report(reports, RPT_ERROR, "Path is empty, cannot save");
- return ret;
+ return ok;
}
if (len >= FILE_MAX) {
BKE_report(reports, RPT_ERROR, "Path too long, cannot save");
- return ret;
+ return ok;
}
/* Check if file write permission is ok */
if (BLI_exists(filepath) && !BLI_file_is_writable(filepath)) {
BKE_reportf(reports, RPT_ERROR, "Cannot save blend file, path '%s' is not writable", filepath);
- return ret;
+ return ok;
}
/* note: used to replace the file extension (to ensure '.blend'),
@@ -1163,7 +1180,7 @@ static int wm_file_write(bContext *C, const char *filepath, int fileflags, Repor
for (li = bmain->library.first; li; li = li->id.next) {
if (BLI_path_cmp(li->filepath, filepath) == 0) {
BKE_reportf(reports, RPT_ERROR, "Cannot overwrite used library '%.240s'", filepath);
- return ret;
+ return ok;
}
}
@@ -1226,7 +1243,8 @@ static int wm_file_write(bContext *C, const char *filepath, int fileflags, Repor
ibuf_thumb = IMB_thumb_create(filepath, THB_LARGE, THB_SOURCE_BLEND, ibuf_thumb);
}
- ret = 0; /* Success. */
+ /* Success. */
+ ok = true;
}
if (ibuf_thumb) {
@@ -1238,7 +1256,7 @@ static int wm_file_write(bContext *C, const char *filepath, int fileflags, Repor
WM_cursor_wait(0);
- return ret;
+ return ok;
}
/************************ autosave ****************************/
@@ -1415,6 +1433,7 @@ void WM_file_tag_modified(void)
/**
* \see #wm_file_write wraps #BLO_write_file in a similar way.
+ * \return success.
*/
static int wm_homefile_write_exec(bContext *C, wmOperator *op)
{
@@ -2092,7 +2111,7 @@ static int wm_save_as_mainfile_exec(bContext *C, wmOperator *op)
{
Main *bmain = CTX_data_main(C);
char path[FILE_MAX];
- int fileflags;
+ const bool is_save_as = (op->type->invoke == wm_save_as_mainfile_invoke);
save_set_compress(op);
@@ -2104,7 +2123,8 @@ static int wm_save_as_mainfile_exec(bContext *C, wmOperator *op)
wm_filepath_default(path);
}
- fileflags = G.fileflags & ~G_FILE_USERPREFS;
+ const int fileflags_orig = G.fileflags;
+ int fileflags = G.fileflags & ~G_FILE_USERPREFS;
/* set compression flag */
SET_FLAG_FROM_TEST(
@@ -2119,12 +2139,22 @@ static int wm_save_as_mainfile_exec(bContext *C, wmOperator *op)
RNA_boolean_get(op->ptr, "copy")),
G_FILE_SAVE_COPY);
- if (wm_file_write(C, path, fileflags, op->reports) != 0)
+ const bool ok = wm_file_write(C, path, fileflags, op->reports);
+
+ if ((op->flag & OP_IS_INVOKE) == 0) {
+ /* OP_IS_INVOKE is set when the operator is called from the GUI.
+ * If it is not set, the operator is called from a script and
+ * shouldn't influence G.fileflags. */
+ G.fileflags = fileflags_orig;
+ }
+
+ if (ok == false) {
return OPERATOR_CANCELLED;
+ }
WM_event_add_notifier(C, NC_WM | ND_FILESAVE, NULL);
- if (RNA_boolean_get(op->ptr, "exit")) {
+ if (!is_save_as && RNA_boolean_get(op->ptr, "exit")) {
wm_exit_schedule_delayed(C);
}
diff --git a/source/blender/windowmanager/intern/wm_files_link.c b/source/blender/windowmanager/intern/wm_files_link.c
index 72973d3de56..d8cc5b37b7d 100644
--- a/source/blender/windowmanager/intern/wm_files_link.c
+++ b/source/blender/windowmanager/intern/wm_files_link.c
@@ -361,7 +361,7 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
}
if (!BLI_ghash_haskey(libraries, libname)) {
- BLI_ghash_insert(libraries, BLI_strdup(libname), SET_INT_IN_POINTER(lib_idx));
+ BLI_ghash_insert(libraries, BLI_strdup(libname), POINTER_FROM_INT(lib_idx));
lib_idx++;
wm_link_append_data_library_add(lapp_data, libname);
}
@@ -382,7 +382,7 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
continue;
}
- lib_idx = GET_INT_FROM_POINTER(BLI_ghash_lookup(libraries, libname));
+ lib_idx = POINTER_AS_INT(BLI_ghash_lookup(libraries, libname));
item = wm_link_append_data_item_add(lapp_data, name, BKE_idcode_from_name(group), NULL);
BLI_BITMAP_ENABLE(item->libraries, lib_idx);
@@ -602,7 +602,7 @@ static void lib_relocate_do(
BKE_main_id_tag_all(bmain, LIB_TAG_PRE_EXISTING, true);
- /* We do not want any instanciation here! */
+ /* We do not want any instantiation here! */
wm_link_do(lapp_data, reports, bmain, NULL, NULL);
BKE_main_lock(bmain);
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index 185cf3fad4f..d254a83fcc2 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -188,7 +188,10 @@ void WM_init(bContext *C, int argc, const char **argv)
ED_node_init_butfuncs();
BLF_init(); /* Please update source/gamengine/GamePlayer/GPG_ghost.cpp if you change this */
+
BLT_lang_init();
+ /* Must call first before doing any .blend file reading, since versionning code may create new IDs... See T57066. */
+ BLT_lang_set(NULL);
/* reports cant be initialized before the wm,
* but keep before file reading, since that may report errors */
@@ -197,6 +200,7 @@ void WM_init(bContext *C, int argc, const char **argv)
/* get the default database, plus a wm */
wm_homefile_read(C, NULL, G.factory_startup, false, true, NULL, WM_init_state_app_template_get());
+ /* Call again to set from userpreferences... */
BLT_lang_set(NULL);
if (!G.background) {
diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c
index d7df671bce5..92d51c9a400 100644
--- a/source/blender/windowmanager/intern/wm_jobs.c
+++ b/source/blender/windowmanager/intern/wm_jobs.c
@@ -175,7 +175,7 @@ static wmJob *wm_job_find(wmWindowManager *wm, void *owner, const int job_type)
/* ******************* public API ***************** */
/**
- * \return current job or adds new job, but doesnt run it.
+ * \return current job or adds new job, but doesn't run it.
*
* \note every owner only gets a single job,
* adding a new one will stop running job and when stopped it starts the new one.
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index be147606c46..2834e95527a 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -121,7 +121,7 @@ static void wm_keymap_item_properties_update_ot(wmKeyMapItem *kmi)
wmOperatorType *ot = WM_operatortype_find(kmi->idname, 0);
if (ot) {
if (ot->srna != kmi->ptr->type) {
- /* matches wm_keymap_item_properties_set but doesnt alloc new ptr */
+ /* matches wm_keymap_item_properties_set but doesn't alloc new ptr */
WM_operator_properties_create_ptr(kmi->ptr, ot);
/* 'kmi->ptr->data' NULL'd above, keep using existing properties.
* Note: the operators property types may have changed,
diff --git a/source/blender/windowmanager/intern/wm_menu_type.c b/source/blender/windowmanager/intern/wm_menu_type.c
index 58e85716bf1..4e71001990d 100644
--- a/source/blender/windowmanager/intern/wm_menu_type.c
+++ b/source/blender/windowmanager/intern/wm_menu_type.c
@@ -60,6 +60,7 @@ MenuType *WM_menutype_find(const char *idname, bool quiet)
bool WM_menutype_add(MenuType *mt)
{
+ BLI_assert((mt->description == NULL) || (mt->description[0]));
BLI_ghash_insert(menutypes_hash, mt->idname, mt);
return true;
}
diff --git a/source/blender/windowmanager/intern/wm_operator_type.c b/source/blender/windowmanager/intern/wm_operator_type.c
index 25ca84f3d57..e9287d83a9a 100644
--- a/source/blender/windowmanager/intern/wm_operator_type.c
+++ b/source/blender/windowmanager/intern/wm_operator_type.c
@@ -116,6 +116,7 @@ void WM_operatortype_append(void (*opfunc)(wmOperatorType *))
if (ot->name == NULL) {
CLOG_ERROR(WM_LOG_OPERATORS, "Operator '%s' has no name property", ot->idname);
}
+ BLI_assert((ot->description == NULL) || (ot->description[0]));
/* XXX All ops should have a description but for now allow them not to. */
RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description : UNDOCUMENTED_OPERATOR_TIP);
@@ -134,6 +135,7 @@ void WM_operatortype_append_ptr(void (*opfunc)(wmOperatorType *, void *), void *
RNA_def_struct_translation_context(ot->srna, BLT_I18NCONTEXT_OPERATOR_DEFAULT);
ot->translation_context = BLT_I18NCONTEXT_OPERATOR_DEFAULT;
opfunc(ot, userdata);
+ BLI_assert((ot->description == NULL) || (ot->description[0]));
RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description : UNDOCUMENTED_OPERATOR_TIP);
RNA_def_struct_identifier(&BLENDER_RNA, ot->srna, ot->idname);
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 4438bd1595f..2008d388ad3 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -262,7 +262,7 @@ char *WM_operator_pystring_ex(bContext *C, wmOperator *op, const bool all_args,
}
}
else {
- /* only to get the orginal props for comparisons */
+ /* only to get the original props for comparisons */
PointerRNA opptr_default;
const bool macro_args_test = ot->macro.first ? macro_args : true;
@@ -607,7 +607,7 @@ void WM_operator_properties_sanitize(PointerRNA *ptr, const bool no_context)
/** set all props to their default,
* \param do_update Only update un-initialized props.
*
- * \note, theres nothing specific to operators here.
+ * \note, there's nothing specific to operators here.
* this could be made a general function.
*/
bool WM_operator_properties_default(PointerRNA *ptr, const bool do_update)
@@ -1813,7 +1813,7 @@ static void WM_OT_console_toggle(wmOperatorType *ot)
* - draw(bContext): drawing callback for paint cursor
*/
-void *WM_paint_cursor_activate(
+wmPaintCursor *WM_paint_cursor_activate(
wmWindowManager *wm, bool (*poll)(bContext *C),
wmPaintCursorDraw draw, void *customdata)
{
@@ -1828,7 +1828,7 @@ void *WM_paint_cursor_activate(
return pc;
}
-void WM_paint_cursor_end(wmWindowManager *wm, void *handle)
+bool WM_paint_cursor_end(wmWindowManager *wm, wmPaintCursor *handle)
{
wmPaintCursor *pc;
@@ -1836,9 +1836,15 @@ void WM_paint_cursor_end(wmWindowManager *wm, void *handle)
if (pc == (wmPaintCursor *)handle) {
BLI_remlink(&wm->paintcursors, pc);
MEM_freeN(pc);
- return;
+ return true;
}
}
+ return false;
+}
+
+void *WM_paint_cursor_customdata_get(wmPaintCursor *pc)
+{
+ return pc->customdata;
}
/* *********************** radial control ****************** */
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 501d448011b..04a236e5d66 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -102,8 +102,9 @@ static struct WMInitStruct {
int windowstate;
WinOverrideFlag override_flag;
+ bool window_focus;
bool native_pixels;
-} wm_init_state = {0, 0, 0, 0, GHOST_kWindowStateNormal, 0, true};
+} wm_init_state = {0, 0, 0, 0, GHOST_kWindowStateNormal, 0, true, true};
/* ******** win open & close ************ */
@@ -624,7 +625,9 @@ static void wm_window_ghostwindow_add(wmWindowManager *wm, const char *title, wm
#ifndef __APPLE__
/* set the state here, so minimized state comes up correct on windows */
- GHOST_SetWindowState(ghostwin, (GHOST_TWindowState)win->windowstate);
+ if (wm_init_state.window_focus) {
+ GHOST_SetWindowState(ghostwin, (GHOST_TWindowState)win->windowstate);
+ }
#endif
/* until screens get drawn, make it nice gray */
glClearColor(0.55, 0.55, 0.55, 0.0);
@@ -809,7 +812,7 @@ wmWindow *WM_window_open_temp(bContext *C, int x, int y, int sizex, int sizey, i
sizex /= native_pixel_size;
sizey /= native_pixel_size;
- /* calculate postition */
+ /* calculate position */
rcti rect;
rect.xmin = x + win_prev->posx - sizex / 2;
rect.ymin = y + win_prev->posy - sizey / 2;
@@ -1468,7 +1471,7 @@ static int wm_window_timer(const bContext *C)
else if (wt->event_type == TIMERAUTOSAVE)
wm_autosave_timer(C, wm, wt);
else if (wt->event_type == TIMERNOTIFIER)
- WM_main_add_notifier(GET_UINT_FROM_POINTER(wt->customdata), NULL);
+ WM_main_add_notifier(POINTER_AS_UINT(wt->customdata), NULL);
else if (win) {
wmEvent event;
wm_event_init_from_window(win, &event);
@@ -1546,6 +1549,8 @@ void wm_ghost_init(bContext *C)
if (wm_init_state.native_pixels) {
GHOST_UseNativePixels();
}
+
+ GHOST_UseWindowFocus(wm_init_state.window_focus);
}
}
@@ -1598,7 +1603,7 @@ wmTimer *WM_event_add_timer_notifier(wmWindowManager *wm, wmWindow *win, unsigne
wt->stime = wt->ltime;
wt->timestep = timestep;
wt->win = win;
- wt->customdata = SET_UINT_IN_POINTER(type);
+ wt->customdata = POINTER_FROM_UINT(type);
wt->flags |= WM_TIMER_NO_FREE_CUSTOM_DATA;
BLI_addtail(&wm->timers, wt);
@@ -1832,6 +1837,11 @@ void WM_init_state_normal_set(void)
wm_init_state.override_flag |= WIN_OVERRIDE_WINSTATE;
}
+void WM_init_window_focus_set(bool do_it)
+{
+ wm_init_state.window_focus = do_it;
+}
+
void WM_init_native_pixels(bool do_it)
{
wm_init_state.native_pixels = do_it;
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index e6772a003f5..fb02a7c871c 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -753,6 +753,19 @@ elseif(WIN32)
DESTINATION ${BLENDER_VERSION}/python/bin
CONFIGURATIONS Debug
)
+ if(WINDOWS_PYTHON_DEBUG)
+ install(
+ FILES ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}.pdb
+ DESTINATION "."
+ CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
+ )
+
+ install(
+ FILES ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}_d.pdb
+ DESTINATION "."
+ CONFIGURATIONS Debug
+ )
+ endif()
endif()
unset(_PYTHON_VERSION_NO_DOTS)
@@ -1031,4 +1044,9 @@ if(WIN32 AND NOT WITH_PYTHON_MODULE)
COMPONENT Blender
DESTINATION "."
)
+ set_target_properties(
+ blender
+ PROPERTIES
+ VS_USER_PROPS "blender.Cpp.user.props"
+ )
endif()
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c
index 7ad44916047..74bcc129f20 100644
--- a/source/creator/creator_args.c
+++ b/source/creator/creator_args.c
@@ -514,6 +514,7 @@ static int arg_handle_print_help(int UNUSED(argc), const char **UNUSED(argv), vo
BLI_argsPrintArgDoc(ba, "--window-geometry");
BLI_argsPrintArgDoc(ba, "--start-console");
BLI_argsPrintArgDoc(ba, "--no-native-pixels");
+ BLI_argsPrintArgDoc(ba, "--no-window-focus");
printf("\n");
@@ -902,7 +903,7 @@ static const char arg_handle_debug_mode_generic_set_doc_gpumem[] =
static int arg_handle_debug_mode_generic_set(int UNUSED(argc), const char **UNUSED(argv), void *data)
{
- G.debug |= GET_INT_FROM_POINTER(data);
+ G.debug |= POINTER_AS_INT(data);
return 0;
}
@@ -1134,6 +1135,15 @@ static int arg_handle_without_borders(int UNUSED(argc), const char **UNUSED(argv
return 0;
}
+static const char arg_handle_no_window_focus_doc[] =
+"\n\tOpen behind other windows and without taking focus."
+;
+static int arg_handle_no_window_focus(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
+{
+ WM_init_window_focus_set(false);
+ return 0;
+}
+
extern bool wm_start_with_console; /* wm_init_exit.c */
static const char arg_handle_start_with_console_doc[] =
@@ -1805,7 +1815,7 @@ static int arg_handle_python_expr_run(int argc, const char **argv, void *data)
/* workaround for scripts not getting a bpy.context.scene, causes internal errors elsewhere */
if (argc > 1) {
bool ok;
- BPY_CTX_SETUP(ok = BPY_execute_string_ex(C, argv[1], false));
+ BPY_CTX_SETUP(ok = BPY_execute_string_ex(C, NULL, argv[1], false));
if (!ok && app_state.exit_code_on_error.python) {
printf("\nError: script failed, expr: '%s', exiting.\n", argv[1]);
exit(app_state.exit_code_on_error.python);
@@ -1831,7 +1841,7 @@ static int arg_handle_python_console_run(int UNUSED(argc), const char **argv, vo
#ifdef WITH_PYTHON
bContext *C = data;
- BPY_CTX_SETUP(BPY_execute_string(C, "__import__('code').interact()"));
+ BPY_CTX_SETUP(BPY_execute_string(C, (const char *[]){"code", NULL}, "code.interact()"));
return 0;
#else
@@ -1887,7 +1897,7 @@ static int arg_handle_addons_set(int argc, const char **argv, void *data)
BLI_snprintf(str, slen, script_str, argv[1]);
BLI_assert(strlen(str) + 1 == slen);
- BPY_CTX_SETUP(BPY_execute_string_ex(C, str, false));
+ BPY_CTX_SETUP(BPY_execute_string_ex(C, NULL, str, false));
free(str);
#else
UNUSED_VARS(argv, data);
@@ -2072,6 +2082,7 @@ void main_args_setup(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle)
BLI_argsAdd(ba, 2, "-p", "--window-geometry", CB(arg_handle_window_geometry), NULL);
BLI_argsAdd(ba, 2, "-w", "--window-border", CB(arg_handle_with_borders), NULL);
BLI_argsAdd(ba, 2, "-W", "--window-fullscreen", CB(arg_handle_without_borders), NULL);
+ BLI_argsAdd(ba, 2, NULL, "--no-window-focus", CB(arg_handle_no_window_focus), NULL);
BLI_argsAdd(ba, 2, "-con", "--start-console", CB(arg_handle_start_with_console), NULL);
BLI_argsAdd(ba, 2, "-R", NULL, CB(arg_handle_register_extension), NULL);
BLI_argsAdd(ba, 2, "-r", NULL, CB_EX(arg_handle_register_extension, silent), ba);
diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
index 22616458b54..84cbf4bf85b 100644
--- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
+++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
@@ -110,7 +110,8 @@ static BlendFileData *load_game_data(const char *filename)
BlendFileData *bfd;
BKE_reports_init(&reports, RPT_STORE);
- bfd= BLO_read_from_file(filename, &reports, BLO_READ_SKIP_USERDEF);
+ bfd= BLO_read_from_file(filename, BLO_READ_SKIP_USERDEF, &reports);
+
if (!bfd) {
printf("Loading %s failed: ", filename);
diff --git a/source/gameengine/Expressions/EXP_BoolValue.h b/source/gameengine/Expressions/EXP_BoolValue.h
index 89c724e87ee..2b8c909a0ba 100644
--- a/source/gameengine/Expressions/EXP_BoolValue.h
+++ b/source/gameengine/Expressions/EXP_BoolValue.h
@@ -22,7 +22,7 @@
#include "EXP_Value.h"
/**
- * Smart Boolean Value class.
+ * Smart Boolean Value class.
* Is used by parser when an expression tree is build containing booleans.
*/
diff --git a/source/gameengine/Expressions/EXP_Value.h b/source/gameengine/Expressions/EXP_Value.h
index dd0cee3dbb8..78e0303b0ad 100644
--- a/source/gameengine/Expressions/EXP_Value.h
+++ b/source/gameengine/Expressions/EXP_Value.h
@@ -141,7 +141,7 @@ struct ValueFlags {
};
/**
- * Base Class for all Actions performed on CValue's. Can be extended for undo/redo system in future.
+ * Base Class for all Actions performed on CValue's. Can be extended for undo/redo system in future.
*/
class CAction
{
diff --git a/source/gameengine/Expressions/intern/InputParser.cpp b/source/gameengine/Expressions/intern/InputParser.cpp
index 1f5f9800a33..4c1697c22c7 100644
--- a/source/gameengine/Expressions/intern/InputParser.cpp
+++ b/source/gameengine/Expressions/intern/InputParser.cpp
@@ -417,7 +417,7 @@ int CParser::Priority(int optorkind)
CExpression *CParser::Ex(int i)
{
- // parses an expression in the imput, starting at priority i, and
+ // parses an expression in the input, starting at priority i, and
// returns an CExpression, containing the parsed input
CExpression *e1 = NULL, *e2 = NULL;
int opkind2;
@@ -562,7 +562,7 @@ CExpression *CParser::Ex(int i)
CExpression *CParser::Expr()
{
- // parses an expression in the imput, and
+ // parses an expression in the input, and
// returns an CExpression, containing the parsed input
return Ex(1);
}
diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
index a502158f453..66a5c5a2a5a 100644
--- a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
@@ -304,10 +304,10 @@ bool SCA_KeyboardSensor::Evaluate()
* note, this will only change the results if key modifiers are set.
*
* When all modifiers and keys are positive
- * - pulse true
+ * - pulse true
*
* When ANY of the modifiers or main key become inactive,
- * - pulse false
+ * - pulse false
*/
if (qual==false) { /* one of the qualifiers are not pressed */
if (m_val_orig && qual_change) { /* we were originally enabled, but a qualifier changed */
diff --git a/source/gameengine/GameLogic/SCA_MouseSensor.cpp b/source/gameengine/GameLogic/SCA_MouseSensor.cpp
index c1ad1c4543a..f3a5269f3d7 100644
--- a/source/gameengine/GameLogic/SCA_MouseSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_MouseSensor.cpp
@@ -202,7 +202,7 @@ bool SCA_MouseSensor::Evaluate()
m_val = 0;
result = true;
}
- else //KX_NO_IMPUTSTATUS
+ else// KX_NO_INPUTSTATUS
{
if (m_val == 1)
{
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index 42b603f8980..46b477a6da5 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -355,7 +355,7 @@ static BlendFileData *load_game_data(const char *progname, char *filename = NULL
BLI_strncpy(bfd->main->name, progname, sizeof(bfd->main->name));
}
} else {
- bfd= BLO_read_from_file(progname, &reports, BLO_READ_SKIP_NONE);
+ bfd= BLO_read_from_file(progname, BLO_READ_SKIP_NONE, &reports);
}
if (!bfd && filename) {
diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp
index bfc8b6edf1b..2f8a94c3b50 100644
--- a/source/gameengine/Ketsji/KX_Dome.cpp
+++ b/source/gameengine/Ketsji/KX_Dome.cpp
@@ -457,13 +457,13 @@ bool KX_Dome::ParseWarpMesh(STR_String text)
/*
* //Notes about the supported data format:
* File example::
- * mode
- * width height
- * n0_x n0_y n0_u n0_v n0_i
- * n1_x n1_y n1_u n1_v n1_i
- * n2_x n1_y n2_u n2_v n2_i
- * n3_x n3_y n3_u n3_v n3_i
- * (...)
+ * mode
+ * width height
+ * n0_x n0_y n0_u n0_v n0_i
+ * n1_x n1_y n1_u n1_v n1_i
+ * n2_x n1_y n2_u n2_v n2_i
+ * n3_x n3_y n3_u n3_v n3_i
+ * (...)
* First line is the image type the mesh is support to be applied to: 2 = fisheye, 1=radial
* The next line has the mesh dimensions
* Rest of the lines are the nodes of the mesh. Each line has x y u v i
@@ -535,7 +535,7 @@ bool KX_Dome::ParseWarpMesh(STR_String text)
void KX_Dome::CreateMeshDome180(void)
{
/*
- * 1)- Define the faces of half of a cube
+ * 1) Define the faces of half of a cube
* - each face is made out of 2 triangles
* 2) Subdivide the faces
* - more resolution == more curved lines
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
index 3592a67c8e4..e8fe056618e 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
@@ -105,7 +105,7 @@ short KX_KetsjiEngine::m_exitkey = 130; // ESC Key
bool KX_KetsjiEngine::m_doRender = true;
/**
- * Constructor of the Ketsji Engine
+ * Constructor of the Ketsji Engine
*/
KX_KetsjiEngine::KX_KetsjiEngine(KX_ISystem* system)
: m_canvas(NULL),
@@ -189,7 +189,7 @@ KX_KetsjiEngine::KX_KetsjiEngine(KX_ISystem* system)
/**
- * Destructor of the Ketsji Engine, release all memory
+ * Destructor of the Ketsji Engine, release all memory
*/
KX_KetsjiEngine::~KX_KetsjiEngine()
{
diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
index 6dc85b59935..a9cd8bf4508 100644
--- a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
+++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
@@ -308,11 +308,11 @@ bool KX_MouseFocusSensor::ParentObjectHasFocusCamera(KX_Camera *cam)
* _should_ be wrong! - see from point Z values */
- /* build the from and to point in normalized device coordinates
- * Normalized device coordinates are [-1,1] in x, y, z
+ /* build the from and to point in normalized device coordinates
+ * Normalized device coordinates are [-1,1] in x, y, z
*
- * The actual z coordinates used don't have to be exact just infront and
- * behind of the near and far clip planes.
+ * The actual z coordinates used don't have to be exact just infront and
+ * behind of the near and far clip planes.
*/
frompoint.setValue( (2 * (m_x-x_lb) / width) - 1.0f,
1.0f - (2 * (m_y_inv - y_lb) / height),
diff --git a/source/gameengine/Ketsji/KX_RadarSensor.cpp b/source/gameengine/Ketsji/KX_RadarSensor.cpp
index 4f7a0e33011..6300a6ab0e4 100644
--- a/source/gameengine/Ketsji/KX_RadarSensor.cpp
+++ b/source/gameengine/Ketsji/KX_RadarSensor.cpp
@@ -38,7 +38,7 @@
#include "DNA_sensor_types.h"
/**
- * RadarSensor constructor. Creates a near-sensor derived class, with a cone collision shape.
+ * RadarSensor constructor. Creates a near-sensor derived class, with a cone collision shape.
*/
KX_RadarSensor::KX_RadarSensor(SCA_EventManager* eventmgr,
KX_GameObject* gameobj,
@@ -84,8 +84,8 @@ CValue* KX_RadarSensor::GetReplica()
}
/**
- * Transforms the collision object. A cone is not correctly centered
- * for usage. */
+ * Transforms the collision object. A cone is not correctly centered
+ * for usage. */
void KX_RadarSensor::SynchronizeTransform()
{
// Getting the parent location was commented out. Why?
diff --git a/source/gameengine/Network/NG_NetworkScene.h b/source/gameengine/Network/NG_NetworkScene.h
index e6233852ee2..d9985fe05c7 100644
--- a/source/gameengine/Network/NG_NetworkScene.h
+++ b/source/gameengine/Network/NG_NetworkScene.h
@@ -85,7 +85,7 @@ public:
void RemoveAllObjects();
/**
- * send a message (ascii text) over the network
+ * send a message (ascii text) over the network
*/
void SendMessage(const STR_String& to,const STR_String& from,const STR_String& subject,const STR_String& message);
diff --git a/source/gameengine/SceneGraph/SG_Spatial.h b/source/gameengine/SceneGraph/SG_Spatial.h
index 7fa21506675..504eccedea7 100644
--- a/source/gameengine/SceneGraph/SG_Spatial.h
+++ b/source/gameengine/SceneGraph/SG_Spatial.h
@@ -60,7 +60,7 @@ protected:
MT_Matrix3x3 m_worldRotation;
MT_Vector3 m_worldScaling;
- SG_ParentRelation * m_parent_relation;
+ SG_ParentRelation *m_parent_relation;
SG_BBox m_bbox;
MT_Scalar m_radius;
diff --git a/tests/gtests/blenlib/BLI_ghash_performance_test.cc b/tests/gtests/blenlib/BLI_ghash_performance_test.cc
index 0eca99ae542..18a1f121e47 100644
--- a/tests/gtests/blenlib/BLI_ghash_performance_test.cc
+++ b/tests/gtests/blenlib/BLI_ghash_performance_test.cc
@@ -83,16 +83,16 @@ static void str_ghash_tests(GHash *ghash, const char *id)
BLI_ghash_reserve(ghash, strlen(data) / 32); /* rough estimation... */
#endif
- BLI_ghash_insert(ghash, data, SET_INT_IN_POINTER(data[0]));
+ BLI_ghash_insert(ghash, data, POINTER_FROM_INT(data[0]));
for (p = c_p = data_p, w = c_w = data_w; *c_w; c_w++, c_p++) {
if (*c_p == '.') {
*c_p = *c_w = '\0';
if (!BLI_ghash_haskey(ghash, p)) {
- BLI_ghash_insert(ghash, p, SET_INT_IN_POINTER(p[0]));
+ BLI_ghash_insert(ghash, p, POINTER_FROM_INT(p[0]));
}
if (!BLI_ghash_haskey(ghash, w)) {
- BLI_ghash_insert(ghash, w, SET_INT_IN_POINTER(w[0]));
+ BLI_ghash_insert(ghash, w, POINTER_FROM_INT(w[0]));
}
p = c_p + 1;
w = c_w + 1;
@@ -100,7 +100,7 @@ static void str_ghash_tests(GHash *ghash, const char *id)
else if (*c_w == ' ') {
*c_w = '\0';
if (!BLI_ghash_haskey(ghash, w)) {
- BLI_ghash_insert(ghash, w, SET_INT_IN_POINTER(w[0]));
+ BLI_ghash_insert(ghash, w, POINTER_FROM_INT(w[0]));
}
w = c_w + 1;
}
@@ -118,21 +118,21 @@ static void str_ghash_tests(GHash *ghash, const char *id)
TIMEIT_START(string_lookup);
v = BLI_ghash_lookup(ghash, data_bis);
- EXPECT_EQ(GET_INT_FROM_POINTER(v), data_bis[0]);
+ EXPECT_EQ(POINTER_AS_INT(v), data_bis[0]);
for (p = w = c = data_bis; *c; c++) {
if (*c == '.') {
*c = '\0';
v = BLI_ghash_lookup(ghash, w);
- EXPECT_EQ(GET_INT_FROM_POINTER(v), w[0]);
+ EXPECT_EQ(POINTER_AS_INT(v), w[0]);
v = BLI_ghash_lookup(ghash, p);
- EXPECT_EQ(GET_INT_FROM_POINTER(v), p[0]);
+ EXPECT_EQ(POINTER_AS_INT(v), p[0]);
p = w = c + 1;
}
else if (*c == ' ') {
*c = '\0';
v = BLI_ghash_lookup(ghash, w);
- EXPECT_EQ(GET_INT_FROM_POINTER(v), w[0]);
+ EXPECT_EQ(POINTER_AS_INT(v), w[0]);
w = c + 1;
}
}
@@ -180,7 +180,7 @@ static void int_ghash_tests(GHash *ghash, const char *id, const unsigned int nbr
#endif
while (i--) {
- BLI_ghash_insert(ghash, SET_UINT_IN_POINTER(i), SET_UINT_IN_POINTER(i));
+ BLI_ghash_insert(ghash, POINTER_FROM_UINT(i), POINTER_FROM_UINT(i));
}
TIMEIT_END(int_insert);
@@ -194,8 +194,8 @@ static void int_ghash_tests(GHash *ghash, const char *id, const unsigned int nbr
TIMEIT_START(int_lookup);
while (i--) {
- void *v = BLI_ghash_lookup(ghash, SET_UINT_IN_POINTER(i));
- EXPECT_EQ(GET_UINT_FROM_POINTER(v), i);
+ void *v = BLI_ghash_lookup(ghash, POINTER_FROM_UINT(i));
+ EXPECT_EQ(POINTER_AS_UINT(v), i);
}
TIMEIT_END(int_lookup);
@@ -279,7 +279,7 @@ static void randint_ghash_tests(GHash *ghash, const char *id, const unsigned int
#endif
for (i = nbr, dt = data; i--; dt++) {
- BLI_ghash_insert(ghash, SET_UINT_IN_POINTER(*dt), SET_UINT_IN_POINTER(*dt));
+ BLI_ghash_insert(ghash, POINTER_FROM_UINT(*dt), POINTER_FROM_UINT(*dt));
}
TIMEIT_END(int_insert);
@@ -291,8 +291,8 @@ static void randint_ghash_tests(GHash *ghash, const char *id, const unsigned int
TIMEIT_START(int_lookup);
for (i = nbr, dt = data; i--; dt++) {
- void *v = BLI_ghash_lookup(ghash, SET_UINT_IN_POINTER(*dt));
- EXPECT_EQ(GET_UINT_FROM_POINTER(v), *dt);
+ void *v = BLI_ghash_lookup(ghash, POINTER_FROM_UINT(*dt));
+ EXPECT_EQ(POINTER_AS_UINT(v), *dt);
}
TIMEIT_END(int_lookup);
@@ -337,7 +337,7 @@ TEST(ghash, IntRandMurmur2a50000000)
static unsigned int ghashutil_tests_nohash_p(const void *p)
{
- return GET_UINT_FROM_POINTER(p);
+ return POINTER_AS_UINT(p);
}
static bool ghashutil_tests_cmp_p(const void *a, const void *b)
@@ -390,7 +390,7 @@ static void int4_ghash_tests(GHash *ghash, const char *id, const unsigned int nb
#endif
for (i = nbr, dt = data; i--; dt++) {
- BLI_ghash_insert(ghash, *dt, SET_UINT_IN_POINTER(i));
+ BLI_ghash_insert(ghash, *dt, POINTER_FROM_UINT(i));
}
TIMEIT_END(int_v4_insert);
@@ -403,7 +403,7 @@ static void int4_ghash_tests(GHash *ghash, const char *id, const unsigned int nb
for (i = nbr, dt = data; i--; dt++) {
void *v = BLI_ghash_lookup(ghash, (void *)(*dt));
- EXPECT_EQ(GET_UINT_FROM_POINTER(v), i);
+ EXPECT_EQ(POINTER_AS_UINT(v), i);
}
TIMEIT_END(int_v4_lookup);
@@ -464,12 +464,12 @@ static void multi_small_ghash_tests_one(GHash *ghash, RNG *rng, const unsigned i
#endif
for (i = nbr, dt = data; i--; dt++) {
- BLI_ghash_insert(ghash, SET_UINT_IN_POINTER(*dt), SET_UINT_IN_POINTER(*dt));
+ BLI_ghash_insert(ghash, POINTER_FROM_UINT(*dt), POINTER_FROM_UINT(*dt));
}
for (i = nbr, dt = data; i--; dt++) {
- void *v = BLI_ghash_lookup(ghash, SET_UINT_IN_POINTER(*dt));
- EXPECT_EQ(GET_UINT_FROM_POINTER(v), *dt);
+ void *v = BLI_ghash_lookup(ghash, POINTER_FROM_UINT(*dt));
+ EXPECT_EQ(POINTER_AS_UINT(v), *dt);
}
BLI_ghash_clear(ghash, NULL, NULL);
diff --git a/tests/gtests/blenlib/BLI_ghash_test.cc b/tests/gtests/blenlib/BLI_ghash_test.cc
index f73a13ce05a..a219d3ec21a 100644
--- a/tests/gtests/blenlib/BLI_ghash_test.cc
+++ b/tests/gtests/blenlib/BLI_ghash_test.cc
@@ -59,14 +59,14 @@ TEST(ghash, InsertLookup)
init_keys(keys, 0);
for (i = TESTCASE_SIZE, k = keys; i--; k++) {
- BLI_ghash_insert(ghash, SET_UINT_IN_POINTER(*k), SET_UINT_IN_POINTER(*k));
+ BLI_ghash_insert(ghash, POINTER_FROM_UINT(*k), POINTER_FROM_UINT(*k));
}
EXPECT_EQ(BLI_ghash_len(ghash), TESTCASE_SIZE);
for (i = TESTCASE_SIZE, k = keys; i--; k++) {
- void *v = BLI_ghash_lookup(ghash, SET_UINT_IN_POINTER(*k));
- EXPECT_EQ(GET_UINT_FROM_POINTER(v), *k);
+ void *v = BLI_ghash_lookup(ghash, POINTER_FROM_UINT(*k));
+ EXPECT_EQ(POINTER_AS_UINT(v), *k);
}
BLI_ghash_free(ghash, NULL, NULL);
@@ -82,15 +82,15 @@ TEST(ghash, InsertRemove)
init_keys(keys, 10);
for (i = TESTCASE_SIZE, k = keys; i--; k++) {
- BLI_ghash_insert(ghash, SET_UINT_IN_POINTER(*k), SET_UINT_IN_POINTER(*k));
+ BLI_ghash_insert(ghash, POINTER_FROM_UINT(*k), POINTER_FROM_UINT(*k));
}
EXPECT_EQ(BLI_ghash_len(ghash), TESTCASE_SIZE);
bkt_size = BLI_ghash_buckets_len(ghash);
for (i = TESTCASE_SIZE, k = keys; i--; k++) {
- void *v = BLI_ghash_popkey(ghash, SET_UINT_IN_POINTER(*k), NULL);
- EXPECT_EQ(GET_UINT_FROM_POINTER(v), *k);
+ void *v = BLI_ghash_popkey(ghash, POINTER_FROM_UINT(*k), NULL);
+ EXPECT_EQ(POINTER_AS_UINT(v), *k);
}
EXPECT_EQ(BLI_ghash_len(ghash), 0);
@@ -110,15 +110,15 @@ TEST(ghash, InsertRemoveShrink)
init_keys(keys, 20);
for (i = TESTCASE_SIZE, k = keys; i--; k++) {
- BLI_ghash_insert(ghash, SET_UINT_IN_POINTER(*k), SET_UINT_IN_POINTER(*k));
+ BLI_ghash_insert(ghash, POINTER_FROM_UINT(*k), POINTER_FROM_UINT(*k));
}
EXPECT_EQ(BLI_ghash_len(ghash), TESTCASE_SIZE);
bkt_size = BLI_ghash_buckets_len(ghash);
for (i = TESTCASE_SIZE, k = keys; i--; k++) {
- void *v = BLI_ghash_popkey(ghash, SET_UINT_IN_POINTER(*k), NULL);
- EXPECT_EQ(GET_UINT_FROM_POINTER(v), *k);
+ void *v = BLI_ghash_popkey(ghash, POINTER_FROM_UINT(*k), NULL);
+ EXPECT_EQ(POINTER_AS_UINT(v), *k);
}
EXPECT_EQ(BLI_ghash_len(ghash), 0);
@@ -138,7 +138,7 @@ TEST(ghash, Copy)
init_keys(keys, 30);
for (i = TESTCASE_SIZE, k = keys; i--; k++) {
- BLI_ghash_insert(ghash, SET_UINT_IN_POINTER(*k), SET_UINT_IN_POINTER(*k));
+ BLI_ghash_insert(ghash, POINTER_FROM_UINT(*k), POINTER_FROM_UINT(*k));
}
EXPECT_EQ(BLI_ghash_len(ghash), TESTCASE_SIZE);
@@ -149,8 +149,8 @@ TEST(ghash, Copy)
EXPECT_EQ(BLI_ghash_buckets_len(ghash_copy), BLI_ghash_buckets_len(ghash));
for (i = TESTCASE_SIZE, k = keys; i--; k++) {
- void *v = BLI_ghash_lookup(ghash_copy, SET_UINT_IN_POINTER(*k));
- EXPECT_EQ(GET_UINT_FROM_POINTER(v), *k);
+ void *v = BLI_ghash_lookup(ghash_copy, POINTER_FROM_UINT(*k));
+ EXPECT_EQ(POINTER_AS_UINT(v), *k);
}
BLI_ghash_free(ghash, NULL, NULL);
@@ -168,7 +168,7 @@ TEST(ghash, Pop)
init_keys(keys, 30);
for (i = TESTCASE_SIZE, k = keys; i--; k++) {
- BLI_ghash_insert(ghash, SET_UINT_IN_POINTER(*k), SET_UINT_IN_POINTER(*k));
+ BLI_ghash_insert(ghash, POINTER_FROM_UINT(*k), POINTER_FROM_UINT(*k));
}
EXPECT_EQ(BLI_ghash_len(ghash), TESTCASE_SIZE);
@@ -182,7 +182,7 @@ TEST(ghash, Pop)
EXPECT_TRUE(success);
if (i % 2) {
- BLI_ghash_insert(ghash, SET_UINT_IN_POINTER(i * 4), SET_UINT_IN_POINTER(i * 4));
+ BLI_ghash_insert(ghash, POINTER_FROM_UINT(i * 4), POINTER_FROM_UINT(i * 4));
}
}
diff --git a/tests/gtests/blenlib/BLI_heap_test.cc b/tests/gtests/blenlib/BLI_heap_test.cc
index dd0bc3451ce..69566d8dca6 100644
--- a/tests/gtests/blenlib/BLI_heap_test.cc
+++ b/tests/gtests/blenlib/BLI_heap_test.cc
@@ -55,10 +55,10 @@ TEST(heap, Range)
const int items_total = SIZE;
Heap *heap = BLI_heap_new();
for (int in = 0; in < items_total; in++) {
- BLI_heap_insert(heap, (float)in, SET_INT_IN_POINTER(in));
+ BLI_heap_insert(heap, (float)in, POINTER_FROM_INT(in));
}
for (int out_test = 0; out_test < items_total; out_test++) {
- EXPECT_EQ(out_test, GET_INT_FROM_POINTER(BLI_heap_pop_min(heap)));
+ EXPECT_EQ(out_test, POINTER_AS_INT(BLI_heap_pop_min(heap)));
}
EXPECT_TRUE(BLI_heap_is_empty(heap));
@@ -70,10 +70,10 @@ TEST(heap, RangeReverse)
const int items_total = SIZE;
Heap *heap = BLI_heap_new();
for (int in = 0; in < items_total; in++) {
- BLI_heap_insert(heap, (float)-in, SET_INT_IN_POINTER(-in));
+ BLI_heap_insert(heap, (float)-in, POINTER_FROM_INT(-in));
}
for (int out_test = items_total - 1; out_test >= 0; out_test--) {
- EXPECT_EQ(-out_test, GET_INT_FROM_POINTER(BLI_heap_pop_min(heap)));
+ EXPECT_EQ(-out_test, POINTER_AS_INT(BLI_heap_pop_min(heap)));
}
EXPECT_TRUE(BLI_heap_is_empty(heap));
BLI_heap_free(heap, NULL);
@@ -85,14 +85,14 @@ TEST(heap, RangeRemove)
Heap *heap = BLI_heap_new();
HeapNode **nodes = (HeapNode **)MEM_mallocN(sizeof(HeapNode *) * items_total, __func__);
for (int in = 0; in < items_total; in++) {
- nodes[in] = BLI_heap_insert(heap, (float)in, SET_INT_IN_POINTER(in));
+ nodes[in] = BLI_heap_insert(heap, (float)in, POINTER_FROM_INT(in));
}
for (int i = 0; i < items_total; i += 2) {
BLI_heap_remove(heap, nodes[i]);
nodes[i] = NULL;
}
for (int out_test = 1; out_test < items_total; out_test += 2) {
- EXPECT_EQ(out_test, GET_INT_FROM_POINTER(BLI_heap_pop_min(heap)));
+ EXPECT_EQ(out_test, POINTER_AS_INT(BLI_heap_pop_min(heap)));
}
EXPECT_TRUE(BLI_heap_is_empty(heap));
BLI_heap_free(heap, NULL);
@@ -107,7 +107,7 @@ TEST(heap, Duplicates)
BLI_heap_insert(heap, 1.0f, 0);
}
for (int out_test = 0; out_test < items_total; out_test++) {
- EXPECT_EQ(0, GET_INT_FROM_POINTER(BLI_heap_pop_min(heap)));
+ EXPECT_EQ(0, POINTER_AS_INT(BLI_heap_pop_min(heap)));
}
EXPECT_TRUE(BLI_heap_is_empty(heap));
BLI_heap_free(heap, NULL);
@@ -122,10 +122,10 @@ static void random_heap_helper(
range_fl(values, items_total);
BLI_array_randomize(values, sizeof(float), items_total, random_seed);
for (int i = 0; i < items_total; i++) {
- BLI_heap_insert(heap, values[i], SET_INT_IN_POINTER((int)values[i]));
+ BLI_heap_insert(heap, values[i], POINTER_FROM_INT((int)values[i]));
}
for (int out_test = 0; out_test < items_total; out_test++) {
- EXPECT_EQ(out_test, GET_INT_FROM_POINTER(BLI_heap_pop_min(heap)));
+ EXPECT_EQ(out_test, POINTER_AS_INT(BLI_heap_pop_min(heap)));
}
EXPECT_TRUE(BLI_heap_is_empty(heap));
BLI_heap_free(heap, NULL);
@@ -143,14 +143,14 @@ TEST(heap, ReInsertSimple)
Heap *heap = BLI_heap_new();
HeapNode **nodes = (HeapNode **)MEM_mallocN(sizeof(HeapNode *) * items_total, __func__);
for (int in = 0; in < items_total; in++) {
- nodes[in] = BLI_heap_insert(heap, (float)in, SET_INT_IN_POINTER(in));
+ nodes[in] = BLI_heap_insert(heap, (float)in, POINTER_FROM_INT(in));
}
for (int i = 0; i < items_total; i++) {
BLI_heap_node_value_update(heap, nodes[i], (float)(items_total + i));
}
for (int out_test = 0; out_test < items_total; out_test++) {
- EXPECT_EQ(out_test, GET_INT_FROM_POINTER(BLI_heap_pop_min(heap)));
+ EXPECT_EQ(out_test, POINTER_AS_INT(BLI_heap_pop_min(heap)));
}
EXPECT_TRUE(BLI_heap_is_empty(heap));
@@ -165,7 +165,7 @@ static void random_heap_reinsert_helper(
Heap *heap = BLI_heap_new();
HeapNode **nodes = (HeapNode **)MEM_mallocN(sizeof(HeapNode *) * items_total, __func__);
for (int in = 0; in < items_total; in++) {
- nodes[in] = BLI_heap_insert(heap, (float)in, SET_INT_IN_POINTER(in));
+ nodes[in] = BLI_heap_insert(heap, (float)in, POINTER_FROM_INT(in));
}
BLI_array_randomize(nodes, sizeof(HeapNode *), items_total, random_seed);
for (int i = 0; i < items_total; i++) {
diff --git a/tests/gtests/blenlib/BLI_linklist_lockfree_test.cc b/tests/gtests/blenlib/BLI_linklist_lockfree_test.cc
index b5b790079d5..309efaee00e 100644
--- a/tests/gtests/blenlib/BLI_linklist_lockfree_test.cc
+++ b/tests/gtests/blenlib/BLI_linklist_lockfree_test.cc
@@ -74,7 +74,7 @@ void concurrent_insert(TaskPool *__restrict pool,
CHECK_NOTNULL(list);
IndexedNode *node = (IndexedNode *)MEM_mallocN(sizeof(IndexedNode),
"test node");
- node->index = GET_INT_FROM_POINTER(taskdata);
+ node->index = POINTER_AS_INT(taskdata);
BLI_linklist_lockfree_insert(list, (LockfreeLinkNode *)node);
}
@@ -95,7 +95,7 @@ TEST(LockfreeLinkList, InsertMultipleConcurrent)
for (int i = 0; i < num_nodes; ++i) {
BLI_task_pool_push(pool,
concurrent_insert,
- SET_INT_IN_POINTER(i),
+ POINTER_FROM_INT(i),
false,
TASK_PRIORITY_HIGH);
}
diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt
index 0a6e2e4909c..b5cc39ae37a 100644
--- a/tests/python/CMakeLists.txt
+++ b/tests/python/CMakeLists.txt
@@ -575,7 +575,7 @@ if(WITH_OPENGL_DRAW_TESTS)
file(GLOB children RELATIVE ${TEST_SRC_DIR} ${TEST_SRC_DIR}/*)
foreach(child ${children})
if(IS_DIRECTORY ${TEST_SRC_DIR}/${child})
- file(GLOB blends ${TEST_SRC_DIR}/${child}/*.blend)
+ file(GLOB_RECURSE blends "${TEST_SRC_DIR}/${child}/*.blend")
if(blends)
add_python_test(
opengl_draw_${child}_test
diff --git a/tests/python/bl_run_operators.py b/tests/python/bl_run_operators.py
index aae78a84132..9a3f801b04a 100644
--- a/tests/python/bl_run_operators.py
+++ b/tests/python/bl_run_operators.py
@@ -136,7 +136,7 @@ def filter_op_list(operators):
def reset_blend():
bpy.ops.wm.read_factory_settings()
for scene in bpy.data.scenes:
- # reduce range so any bake action doesnt take too long
+ # reduce range so any bake action doesn't take too long
scene.frame_start = 1
scene.frame_end = 5
diff --git a/tests/python/bl_test.py b/tests/python/bl_test.py
index 0cb322a21b1..ceb5811438a 100644
--- a/tests/python/bl_test.py
+++ b/tests/python/bl_test.py
@@ -181,7 +181,7 @@ def main():
sys.exit(1)
if md5 != md5_new:
- print(" Running: %s\n MD5 Recieved: %s\n MD5 Expected: %s" % (run, md5_new, md5))
+ print(" Running: %s\n MD5 Received: %s\n MD5 Expected: %s" % (run, md5_new, md5))
sys.exit(1)
print(" Success: %s" % run)
diff --git a/tests/python/modules/render_report.py b/tests/python/modules/render_report.py
index 6c71e8dcb74..ed46abb4b63 100755
--- a/tests/python/modules/render_report.py
+++ b/tests/python/modules/render_report.py
@@ -51,10 +51,11 @@ def print_message(message, type=None, status=''):
def blend_list(dirpath):
- for filename in os.listdir(dirpath):
- if filename.lower().endswith(".blend"):
- filepath = os.path.join(dirpath, filename)
- yield filepath
+ for root, dirs, files in os.walk(dirpath):
+ for filename in files:
+ if filename.lower().endswith(".blend"):
+ filepath = os.path.join(root, filename)
+ yield filepath
def test_get_name(filepath):
@@ -323,7 +324,7 @@ class Report:
testname = test_get_name(filepath)
print_message(testname, 'SUCCESS', 'RUN')
time_start = time.time()
- tmp_filepath = os.path.join(self.output_dir, "tmp")
+ tmp_filepath = os.path.join(self.output_dir, "tmp_" + testname)
error = render_cb(filepath, tmp_filepath)
status = "FAIL"
diff --git a/tests/python/opengl_draw_tests.py b/tests/python/opengl_draw_tests.py
index ae7f0dabf74..b6c18e289bc 100755
--- a/tests/python/opengl_draw_tests.py
+++ b/tests/python/opengl_draw_tests.py
@@ -36,6 +36,9 @@ if inside_blender:
def render_file(filepath, output_filepath):
command = (
BLENDER,
+ "--no-window-focus",
+ "--window-geometry",
+ "0", "0", "1024", "768",
"-noaudio",
"--factory-startup",
"--enable-autoexec",