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:
authorAntonio Vazquez <blendergit@gmail.com>2022-11-07 18:09:54 +0300
committerAntonio Vazquez <blendergit@gmail.com>2022-11-07 18:09:54 +0300
commitb6b888f7fb706487d9e5ae6b0738201da5493b9f (patch)
tree852f79b4532a1b93e75c2541ca0d181b00de08a2
parenta2377b60548f2fe5d46b14ecdf4cf83971432b5c (diff)
parent95631c94c4bd08f8a7e9c713f624e934eb7eb7ae (diff)
Merge branch 'master' into gpencil-new-data-proposalgpencil-new-data-proposal
-rw-r--r--CMakeLists.txt8
-rw-r--r--build_files/build_environment/CMakeLists.txt9
-rw-r--r--build_files/build_environment/cmake/dpcpp.cmake7
-rw-r--r--build_files/build_environment/cmake/setup_mingw64.cmake6
-rw-r--r--build_files/build_environment/cmake/usd.cmake8
-rw-r--r--build_files/build_environment/cmake/versions.cmake11
-rw-r--r--build_files/build_environment/patches/cmake/modules/FindIlmBase.cmake12
-rw-r--r--build_files/build_environment/patches/cmake/modules/FindOpenEXR.cmake3
-rw-r--r--build_files/cmake/Modules/FindOpenEXR.cmake3
-rw-r--r--build_files/cmake/Modules/FindUSD.cmake3
-rw-r--r--build_files/cmake/config/blender_developer.cmake6
-rw-r--r--build_files/cmake/macros.cmake46
-rw-r--r--build_files/cmake/platform/platform_unix.cmake2
-rw-r--r--build_files/cmake/platform/platform_win32.cmake9
-rw-r--r--build_files/config/pipeline_config.yaml2
-rw-r--r--doc/doxygen/Doxyfile2
-rw-r--r--doc/python_api/requirements.txt6
-rw-r--r--doc/python_api/sphinx_doc_gen.py6
-rw-r--r--extern/hipew/src/hipew.c2
-rw-r--r--extern/mantaflow/CMakeLists.txt3
-rw-r--r--intern/cycles/device/CMakeLists.txt3
-rw-r--r--intern/cycles/device/metal/kernel.mm61
-rw-r--r--intern/cycles/kernel/CMakeLists.txt7
-rw-r--r--intern/cycles/test/CMakeLists.txt1
-rw-r--r--intern/cycles/test/util_md5_test.cpp16
-rw-r--r--intern/cycles/util/md5.cpp9
-rw-r--r--intern/ffmpeg/tests/ffmpeg_codecs.cc2
-rw-r--r--intern/ghost/intern/GHOST_ContextGLX.cpp2
-rw-r--r--intern/ghost/intern/GHOST_ImeWin32.h2
-rw-r--r--intern/ghost/intern/GHOST_SystemWayland.cpp5
-rw-r--r--intern/guardedalloc/MEM_guardedalloc.h2
-rw-r--r--intern/guardedalloc/intern/leak_detector.cc2
-rw-r--r--intern/wayland_dynload/intern/wayland_dynload_client.c5
-rw-r--r--intern/wayland_dynload/intern/wayland_dynload_cursor.c2
-rw-r--r--intern/wayland_dynload/intern/wayland_dynload_egl.c2
-rw-r--r--intern/wayland_dynload/intern/wayland_dynload_libdecor.c2
-rw-r--r--intern/wayland_dynload/intern/wayland_dynload_utils.c9
-rw-r--r--intern/wayland_dynload/intern/wayland_dynload_utils.h3
m---------release/datafiles/locale0
m---------release/scripts/addons0
-rw-r--r--release/scripts/modules/rna_manual_reference.py96
-rw-r--r--release/scripts/startup/bl_ui/node_add_menu.py8
-rw-r--r--release/scripts/startup/bl_ui/node_add_menu_geometry.py23
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py30
-rw-r--r--source/blender/blenkernel/BKE_asset_catalog.hh11
-rw-r--r--source/blender/blenkernel/BKE_asset_catalog_path.hh2
-rw-r--r--source/blender/blenkernel/BKE_asset_library.hh11
-rw-r--r--source/blender/blenkernel/BKE_blender_version.h4
-rw-r--r--source/blender/blenkernel/BKE_context.h46
-rw-r--r--source/blender/blenkernel/BKE_customdata.h1
-rw-r--r--source/blender/blenkernel/BKE_dynamicpaint.h2
-rw-r--r--source/blender/blenkernel/BKE_mesh.h7
-rw-r--r--source/blender/blenkernel/BKE_mesh_legacy_convert.h9
-rw-r--r--source/blender/blenkernel/BKE_node.h22
-rw-r--r--source/blender/blenkernel/BKE_object.h12
-rw-r--r--source/blender/blenkernel/BKE_screen.h1
-rw-r--r--source/blender/blenkernel/BKE_sound.h2
-rw-r--r--source/blender/blenkernel/BKE_tracking.h4
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.cc8
-rw-r--r--source/blender/blenkernel/intern/action.c2
-rw-r--r--source/blender/blenkernel/intern/armature.c10
-rw-r--r--source/blender/blenkernel/intern/armature_deform.c4
-rw-r--r--source/blender/blenkernel/intern/armature_update.c8
-rw-r--r--source/blender/blenkernel/intern/asset_catalog.cc36
-rw-r--r--source/blender/blenkernel/intern/asset_catalog_path.cc2
-rw-r--r--source/blender/blenkernel/intern/asset_library.cc30
-rw-r--r--source/blender/blenkernel/intern/asset_library_service.cc36
-rw-r--r--source/blender/blenkernel/intern/asset_library_service.hh3
-rw-r--r--source/blender/blenkernel/intern/attribute_access.cc5
-rw-r--r--source/blender/blenkernel/intern/blender.c2
-rw-r--r--source/blender/blenkernel/intern/boids.c2
-rw-r--r--source/blender/blenkernel/intern/camera.c20
-rw-r--r--source/blender/blenkernel/intern/cloth.c12
-rw-r--r--source/blender/blenkernel/intern/constraint.c91
-rw-r--r--source/blender/blenkernel/intern/context.c60
-rw-r--r--source/blender/blenkernel/intern/curve_deform.c4
-rw-r--r--source/blender/blenkernel/intern/curve_to_mesh_convert.cc4
-rw-r--r--source/blender/blenkernel/intern/curves.cc4
-rw-r--r--source/blender/blenkernel/intern/customdata.cc34
-rw-r--r--source/blender/blenkernel/intern/displist.cc5
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c24
-rw-r--r--source/blender/blenkernel/intern/effect.c22
-rw-r--r--source/blender/blenkernel/intern/fcurve_driver.c14
-rw-r--r--source/blender/blenkernel/intern/fluid.c30
-rw-r--r--source/blender/blenkernel/intern/geometry_set_instances.cc4
-rw-r--r--source/blender/blenkernel/intern/gpencil.c18
-rw-r--r--source/blender/blenkernel/intern/gpencil_modifier.c2
-rw-r--r--source/blender/blenkernel/intern/icons.cc2
-rw-r--r--source/blender/blenkernel/intern/ipo.c2
-rw-r--r--source/blender/blenkernel/intern/lattice.c6
-rw-r--r--source/blender/blenkernel/intern/lattice_deform.c6
-rw-r--r--source/blender/blenkernel/intern/lib_id.c2
-rw-r--r--source/blender/blenkernel/intern/mball_tessellate.cc11
-rw-r--r--source/blender/blenkernel/intern/mesh.cc32
-rw-r--r--source/blender/blenkernel/intern/mesh_calc_edges.cc2
-rw-r--r--source/blender/blenkernel/intern/mesh_convert.cc8
-rw-r--r--source/blender/blenkernel/intern/mesh_legacy_convert.cc441
-rw-r--r--source/blender/blenkernel/intern/mesh_mirror.c10
-rw-r--r--source/blender/blenkernel/intern/mesh_remesh_voxel.cc181
-rw-r--r--source/blender/blenkernel/intern/mesh_validate.cc212
-rw-r--r--source/blender/blenkernel/intern/nla.c2
-rw-r--r--source/blender/blenkernel/intern/node.cc49
-rw-r--r--source/blender/blenkernel/intern/object.cc121
-rw-r--r--source/blender/blenkernel/intern/object_dupli.cc56
-rw-r--r--source/blender/blenkernel/intern/object_update.cc16
-rw-r--r--source/blender/blenkernel/intern/paint.cc2
-rw-r--r--source/blender/blenkernel/intern/particle.c28
-rw-r--r--source/blender/blenkernel/intern/particle_child.c4
-rw-r--r--source/blender/blenkernel/intern/particle_system.c38
-rw-r--r--source/blender/blenkernel/intern/rigidbody.c24
-rw-r--r--source/blender/blenkernel/intern/scene.cc8
-rw-r--r--source/blender/blenkernel/intern/softbody.c19
-rw-r--r--source/blender/blenkernel/intern/sound.c17
-rw-r--r--source/blender/blenkernel/intern/subdiv_mesh.cc4
-rw-r--r--source/blender/blenkernel/intern/subsurf_ccg.c6
-rw-r--r--source/blender/blenkernel/intern/tracking_solver.c8
-rw-r--r--source/blender/blenkernel/intern/unit.c2
-rw-r--r--source/blender/blenkernel/intern/vfont.c4
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c34
-rw-r--r--source/blender/blenlib/BLI_color_mix.hh2
-rw-r--r--source/blender/blenlib/BLI_lazy_threading.hh11
-rw-r--r--source/blender/blenlib/BLI_math_matrix.h2
-rw-r--r--source/blender/blenlib/BLI_path_util.h7
-rw-r--r--source/blender/blenlib/BLI_string_utils.h393
-rw-r--r--source/blender/blenlib/BLI_task.hh1
-rw-r--r--source/blender/blenlib/BLI_uvproject.h2
-rw-r--r--source/blender/blenlib/intern/lazy_threading.cc30
-rw-r--r--source/blender/blenlib/intern/path_util.c159
-rw-r--r--source/blender/blenlib/intern/string_utils.c14
-rw-r--r--source/blender/blenlib/intern/task_scheduler.cc2
-rw-r--r--source/blender/blenlib/intern/uvproject.c2
-rw-r--r--source/blender/blenlib/tests/BLI_path_util_test.cc431
-rw-r--r--source/blender/blenloader/intern/versioning_260.c1
-rw-r--r--source/blender/blenloader/intern/versioning_300.cc19
-rw-r--r--source/blender/blenloader/intern/versioning_legacy.c1
-rw-r--r--source/blender/bmesh/intern/bmesh_construct.c3
-rw-r--r--source/blender/bmesh/operators/bmo_bridge.c122
-rw-r--r--source/blender/compositor/realtime_compositor/CMakeLists.txt139
-rw-r--r--source/blender/compositor/realtime_compositor/COM_context.hh11
-rw-r--r--source/blender/compositor/realtime_compositor/COM_result.hh12
-rw-r--r--source/blender/compositor/realtime_compositor/COM_static_cache_manager.hh77
-rw-r--r--source/blender/compositor/realtime_compositor/COM_texture_pool.hh4
-rw-r--r--source/blender/compositor/realtime_compositor/cached_resources/COM_cached_resource.hh31
-rw-r--r--source/blender/compositor/realtime_compositor/cached_resources/COM_morphological_distance_feather_weights.hh61
-rw-r--r--source/blender/compositor/realtime_compositor/cached_resources/COM_symmetric_blur_weights.hh52
-rw-r--r--source/blender/compositor/realtime_compositor/cached_resources/COM_symmetric_separable_blur_weights.hh53
-rw-r--r--source/blender/compositor/realtime_compositor/cached_resources/intern/morphological_distance_feather_weights.cc159
-rw-r--r--source/blender/compositor/realtime_compositor/cached_resources/intern/symmetric_blur_weights.cc115
-rw-r--r--source/blender/compositor/realtime_compositor/cached_resources/intern/symmetric_separable_blur_weights.cc93
-rw-r--r--source/blender/compositor/realtime_compositor/intern/context.cc6
-rw-r--r--source/blender/compositor/realtime_compositor/intern/conversion_operation.cc8
-rw-r--r--source/blender/compositor/realtime_compositor/intern/evaluator.cc1
-rw-r--r--source/blender/compositor/realtime_compositor/intern/input_single_value_operation.cc2
-rw-r--r--source/blender/compositor/realtime_compositor/intern/result.cc8
-rw-r--r--source/blender/compositor/realtime_compositor/intern/static_cache_manager.cc74
-rw-r--r--source/blender/compositor/realtime_compositor/intern/texture_pool.cc2
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_alpha_crop.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_alpha_crop.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_bilateral_blur.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_bilateral_blur.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_blur.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_blur.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_blur_variable_size.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_blur_variable_size.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_bokeh_image.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_bokeh_image.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_box_mask.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_box_mask.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_convert.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_convert.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_despeckle.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_despeckle.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_directional_blur.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_directional_blur.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_edge_filter.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_edge_filter.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_ellipse_mask.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_ellipse_mask.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_filter.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_filter.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_flip.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_flip.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_image_crop.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_image_crop.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_morphological_distance.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_morphological_distance.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_morphological_distance_feather.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_morphological_distance_feather.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_morphological_distance_threshold.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_morphological_distance_threshold.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_morphological_step.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_morphological_step.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_normalize.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_normalize.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_parallel_reduction.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_parallel_reduction.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_projector_lens_distortion.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_projector_lens_distortion.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_realize_on_domain.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_realize_on_domain.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_screen_lens_distortion.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_screen_lens_distortion.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_set_alpha.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_set_alpha.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_split_viewer.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_split_viewer.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_symmetric_blur.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_symmetric_blur.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_symmetric_separable_blur.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_symmetric_separable_blur.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_tone_map_photoreceptor.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_tone_map_photoreceptor.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/compositor_tone_map_simple.glsl (renamed from source/blender/gpu/shaders/compositor/compositor_tone_map_simple.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_alpha_crop_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_alpha_crop_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_bilateral_blur_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_bilateral_blur_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_blur_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_blur_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_blur_variable_size_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_blur_variable_size_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_bokeh_image_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_bokeh_image_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_box_mask_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_box_mask_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_convert_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_convert_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_despeckle_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_despeckle_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_directional_blur_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_directional_blur_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_edge_filter_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_edge_filter_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_ellipse_mask_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_ellipse_mask_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_filter_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_filter_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_flip_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_flip_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_image_crop_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_image_crop_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_morphological_distance_feather_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_morphological_distance_feather_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_morphological_distance_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_morphological_distance_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_morphological_distance_threshold_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_morphological_distance_threshold_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_morphological_step_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_morphological_step_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_normalize_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_normalize_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_parallel_reduction_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_parallel_reduction_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_projector_lens_distortion_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_projector_lens_distortion_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_realize_on_domain_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_realize_on_domain_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_screen_lens_distortion_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_screen_lens_distortion_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_set_alpha_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_set_alpha_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_split_viewer_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_split_viewer_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_symmetric_blur_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_symmetric_blur_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_symmetric_separable_blur_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_symmetric_separable_blur_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_tone_map_photoreceptor_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_tone_map_photoreceptor_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/infos/compositor_tone_map_simple_info.hh (renamed from source/blender/gpu/shaders/compositor/infos/compositor_tone_map_simple_info.hh)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_alpha_over.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_alpha_over.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_blur_common.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_blur_common.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_bright_contrast.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_bright_contrast.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_channel_matte.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_channel_matte.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_chroma_matte.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_chroma_matte.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_color_balance.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_color_balance.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_color_correction.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_color_correction.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_color_matte.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_color_matte.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_color_spill.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_color_spill.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_color_to_luminance.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_color_to_luminance.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_difference_matte.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_difference_matte.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_distance_matte.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_distance_matte.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_exposure.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_exposure.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_gamma.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_gamma.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_hue_correct.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_hue_correct.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_hue_saturation_value.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_hue_saturation_value.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_invert.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_invert.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_luminance_matte.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_luminance_matte.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_main.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_main.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_map_value.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_map_value.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_normal.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_normal.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_posterize.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_posterize.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_separate_combine.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_separate_combine.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_set_alpha.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_set_alpha.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_store_output.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_store_output.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_texture_utilities.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_texture_utilities.glsl)0
-rw-r--r--source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_type_conversion.glsl (renamed from source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_type_conversion.glsl)0
-rw-r--r--source/blender/depsgraph/intern/depsgraph_query_iter.cc4
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_flush.cc2
-rw-r--r--source/blender/draw/CMakeLists.txt2
-rw-r--r--source/blender/draw/engines/eevee/eevee_depth_of_field.c2
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightcache.c12
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightcache.h2
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightprobes.c40
-rw-r--r--source/blender/draw/engines/eevee/eevee_lights.c4
-rw-r--r--source/blender/draw/engines/eevee/eevee_motion_blur.c4
-rw-r--r--source/blender/draw/engines/eevee/eevee_shadows.c2
-rw-r--r--source/blender/draw/engines/eevee/eevee_volumes.c2
-rw-r--r--source/blender/draw/engines/eevee_next/eevee_light.cc2
-rw-r--r--source/blender/draw/engines/eevee_next/eevee_pipeline.cc4
-rw-r--r--source/blender/draw/engines/eevee_next/eevee_velocity.cc6
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_cache_utils.c10
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_draw_data.c8
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.c2
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_shader_fx.c30
-rw-r--r--source/blender/draw/engines/overlay/overlay_armature.cc55
-rw-r--r--source/blender/draw/engines/overlay/overlay_edit_text.cc6
-rw-r--r--source/blender/draw/engines/overlay/overlay_extra.cc84
-rw-r--r--source/blender/draw/engines/overlay/overlay_gpencil.cc6
-rw-r--r--source/blender/draw/engines/overlay/overlay_image.cc2
-rw-r--r--source/blender/draw/engines/overlay/overlay_lattice.cc2
-rw-r--r--source/blender/draw/engines/overlay/overlay_metaball.cc8
-rw-r--r--source/blender/draw/engines/overlay/overlay_outline.cc4
-rw-r--r--source/blender/draw/engines/overlay/overlay_viewer_attribute.cc4
-rw-r--r--source/blender/draw/engines/overlay/overlay_wireframe.cc18
-rw-r--r--source/blender/draw/engines/select/select_engine.c10
-rw-r--r--source/blender/draw/engines/workbench/workbench_effect_dof.c2
-rw-r--r--source/blender/draw/engines/workbench/workbench_materials.c6
-rw-r--r--source/blender/draw/engines/workbench/workbench_shadow.c5
-rw-r--r--source/blender/draw/engines/workbench/workbench_volume.c4
-rw-r--r--source/blender/draw/intern/draw_cache_impl_curves.cc4
-rw-r--r--source/blender/draw/intern/draw_cache_impl_gpencil.cc2
-rw-r--r--source/blender/draw/intern/draw_cache_impl_mesh.cc8
-rw-r--r--source/blender/draw/intern/draw_cache_impl_pointcloud.cc120
-rw-r--r--source/blender/draw/intern/draw_command.cc12
-rw-r--r--source/blender/draw/intern/draw_command.hh5
-rw-r--r--source/blender/draw/intern/draw_curves.cc2
-rw-r--r--source/blender/draw/intern/draw_hair.cc6
-rw-r--r--source/blender/draw/intern/draw_manager.c6
-rw-r--r--source/blender/draw/intern/draw_manager_data.cc24
-rw-r--r--source/blender/draw/intern/draw_manager_shader.c4
-rw-r--r--source/blender/draw/intern/draw_manager_text.cc34
-rw-r--r--source/blender/draw/intern/draw_pass.hh12
-rw-r--r--source/blender/draw/intern/draw_resource.hh4
-rw-r--r--source/blender/draw/intern/draw_volume.cc2
-rw-r--r--source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edge_fac.cc4
-rw-r--r--source/blender/editors/animation/anim_draw.c230
-rw-r--r--source/blender/editors/animation/anim_motion_paths.c4
-rw-r--r--source/blender/editors/animation/keyframing.c4
-rw-r--r--source/blender/editors/armature/armature_add.c10
-rw-r--r--source/blender/editors/armature/armature_edit.c20
-rw-r--r--source/blender/editors/armature/armature_relations.c4
-rw-r--r--source/blender/editors/armature/armature_select.c8
-rw-r--r--source/blender/editors/armature/armature_skinning.c8
-rw-r--r--source/blender/editors/armature/meshlaplacian.c4
-rw-r--r--source/blender/editors/armature/pose_transform.c4
-rw-r--r--source/blender/editors/asset/ED_asset_list.h1
-rw-r--r--source/blender/editors/asset/intern/asset_list.cc14
-rw-r--r--source/blender/editors/curve/editcurve.c20
-rw-r--r--source/blender/editors/curve/editcurve_paint.c18
-rw-r--r--source/blender/editors/curve/editcurve_pen.c10
-rw-r--r--source/blender/editors/curve/editcurve_select.c4
-rw-r--r--source/blender/editors/curves/intern/curves_ops.cc4
-rw-r--r--source/blender/editors/gizmo_library/gizmo_library_presets.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_armature.c6
-rw-r--r--source/blender/editors/gpencil/gpencil_bake_animation.cc4
-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_fill.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_mesh.cc2
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_sculpt_paint.c14
-rw-r--r--source/blender/editors/gpencil/gpencil_trace_ops.c8
-rw-r--r--source/blender/editors/gpencil/gpencil_utils.c16
-rw-r--r--source/blender/editors/gpencil/gpencil_uv.c4
-rw-r--r--source/blender/editors/include/ED_uvedit.h4
-rw-r--r--source/blender/editors/include/UI_interface.h9
-rw-r--r--source/blender/editors/interface/eyedroppers/eyedropper_depth.c2
-rw-r--r--source/blender/editors/interface/interface.cc15
-rw-r--r--source/blender/editors/interface/interface_icons.c4
-rw-r--r--source/blender/editors/interface/interface_intern.h10
-rw-r--r--source/blender/editors/interface/interface_layout.c8
-rw-r--r--source/blender/editors/interface/interface_panel.cc10
-rw-r--r--source/blender/editors/interface/interface_region_menu_popup.cc302
-rw-r--r--source/blender/editors/interface/views/interface_view.cc2
-rw-r--r--source/blender/editors/mesh/editface.cc4
-rw-r--r--source/blender/editors/mesh/editmesh_add_gizmo.c4
-rw-r--r--source/blender/editors/mesh/editmesh_bevel.c4
-rw-r--r--source/blender/editors/mesh/editmesh_bisect.c4
-rw-r--r--source/blender/editors/mesh/editmesh_extrude.c24
-rw-r--r--source/blender/editors/mesh/editmesh_extrude_screw.c8
-rw-r--r--source/blender/editors/mesh/editmesh_extrude_spin.c2
-rw-r--r--source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c2
-rw-r--r--source/blender/editors/mesh/editmesh_inset.c2
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c18
-rw-r--r--source/blender/editors/mesh/editmesh_loopcut.c2
-rw-r--r--source/blender/editors/mesh/editmesh_polybuild.c28
-rw-r--r--source/blender/editors/mesh/editmesh_preselect_elem.c8
-rw-r--r--source/blender/editors/mesh/editmesh_select.cc18
-rw-r--r--source/blender/editors/mesh/editmesh_select_similar.c32
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c8
-rw-r--r--source/blender/editors/mesh/editmesh_utils.c4
-rw-r--r--source/blender/editors/mesh/mesh_data.cc2
-rw-r--r--source/blender/editors/mesh/meshtools.cc6
-rw-r--r--source/blender/editors/object/object_add.cc22
-rw-r--r--source/blender/editors/object/object_bake.c2
-rw-r--r--source/blender/editors/object/object_bake_api.c47
-rw-r--r--source/blender/editors/object/object_constraint.c6
-rw-r--r--source/blender/editors/object/object_hook.c20
-rw-r--r--source/blender/editors/object/object_modifier.cc10
-rw-r--r--source/blender/editors/object/object_relations.c22
-rw-r--r--source/blender/editors/object/object_remesh.cc22
-rw-r--r--source/blender/editors/object/object_transform.cc55
-rw-r--r--source/blender/editors/object/object_utils.c24
-rw-r--r--source/blender/editors/object/object_warp.c2
-rw-r--r--source/blender/editors/physics/dynamicpaint_ops.c6
-rw-r--r--source/blender/editors/physics/particle_edit.c28
-rw-r--r--source/blender/editors/physics/particle_object.c14
-rw-r--r--source/blender/editors/physics/physics_fluid.c10
-rw-r--r--source/blender/editors/physics/physics_pointcache.c6
-rw-r--r--source/blender/editors/render/render_internal.cc22
-rw-r--r--source/blender/editors/render/render_preview.cc33
-rw-r--r--source/blender/editors/render/render_shading.cc2
-rw-r--r--source/blender/editors/screen/area.c2
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_brush.cc4
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_ops.cc19
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c20
-rw-r--r--source/blender/editors/sculpt_paint/paint_curve.c5
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c6
-rw-r--r--source/blender/editors/sculpt_paint/paint_mask.c20
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c17
-rw-r--r--source/blender/editors/sculpt_paint/paint_utils.c6
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.cc12
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c45
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_brush_types.c3
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_cloth.c8
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_detail.c14
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_face_set.cc2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_filter_mesh.c10
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_ops.c2
-rw-r--r--source/blender/editors/space_clip/clip_editor.c28
-rw-r--r--source/blender/editors/space_clip/clip_ops.c16
-rw-r--r--source/blender/editors/space_clip/tracking_ops_solve.c2
-rw-r--r--source/blender/editors/space_clip/tracking_ops_track.c6
-rw-r--r--source/blender/editors/space_file/file_ops.c15
-rw-r--r--source/blender/editors/space_file/filelist.cc77
-rw-r--r--source/blender/editors/space_file/fsmenu.c4
-rw-r--r--source/blender/editors/space_node/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_node/add_menu_assets.cc317
-rw-r--r--source/blender/editors/space_node/node_add.cc143
-rw-r--r--source/blender/editors/space_node/node_edit.cc10
-rw-r--r--source/blender/editors/space_node/node_group.cc93
-rw-r--r--source/blender/editors/space_node/node_intern.hh17
-rw-r--r--source/blender/editors/space_node/node_ops.cc1
-rw-r--r--source/blender/editors/space_node/space_node.cc3
-rw-r--r--source/blender/editors/space_sequencer/sequencer_channels_draw.c4
-rw-r--r--source/blender/editors/space_sequencer/sequencer_drag_drop.c4
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c3
-rw-r--r--source/blender/editors/space_sequencer/sequencer_preview.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_proxy.c4
-rw-r--r--source/blender/editors/space_sequencer/sequencer_thumbnails.c4
-rw-r--r--source/blender/editors/space_view3d/space_view3d.cc10
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c10
-rw-r--r--source/blender/editors/space_view3d/view3d_camera_control.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.cc2
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_armature.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_camera.c18
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_empty.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_forcefield.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_light.c8
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_preselect_type.cc6
-rw-r--r--source/blender/editors/space_view3d/view3d_iterators.cc16
-rw-r--r--source/blender/editors/space_view3d/view3d_navigate.c14
-rw-r--r--source/blender/editors/space_view3d/view3d_navigate_smoothview.c5
-rw-r--r--source/blender/editors/space_view3d/view3d_project.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_select.cc28
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c53
-rw-r--r--source/blender/editors/space_view3d/view3d_utils.c17
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c6
-rw-r--r--source/blender/editors/transform/transform.h3
-rw-r--r--source/blender/editors/transform/transform_convert.c6
-rw-r--r--source/blender/editors/transform/transform_convert_armature.c4
-rw-r--r--source/blender/editors/transform/transform_convert_curve.c2
-rw-r--r--source/blender/editors/transform/transform_convert_lattice.c2
-rw-r--r--source/blender/editors/transform/transform_convert_mball.c2
-rw-r--r--source/blender/editors/transform/transform_convert_mesh.c2
-rw-r--r--source/blender/editors/transform/transform_convert_mesh_edge.c2
-rw-r--r--source/blender/editors/transform/transform_convert_mesh_skin.c2
-rw-r--r--source/blender/editors/transform/transform_convert_mesh_vert_cdata.c2
-rw-r--r--source/blender/editors/transform/transform_convert_object.c14
-rw-r--r--source/blender/editors/transform/transform_convert_object_texspace.c4
-rw-r--r--source/blender/editors/transform/transform_convert_particle.c2
-rw-r--r--source/blender/editors/transform/transform_convert_sculpt.c12
-rw-r--r--source/blender/editors/transform/transform_generics.c6
-rw-r--r--source/blender/editors/transform/transform_gizmo_3d.c50
-rw-r--r--source/blender/editors/transform/transform_mode.c2
-rw-r--r--source/blender/editors/transform/transform_mode_edge_slide.c2
-rw-r--r--source/blender/editors/transform/transform_mode_vert_slide.c15
-rw-r--r--source/blender/editors/transform/transform_orientations.c16
-rw-r--r--source/blender/editors/transform/transform_snap.c4
-rw-r--r--source/blender/editors/transform/transform_snap_object.cc1241
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c4
-rw-r--r--source/blender/editors/uvedit/uvedit_select.c16
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c16
-rw-r--r--source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp2
-rw-r--r--source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp6
-rw-r--r--source/blender/freestyle/intern/python/BPy_BBox.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BPy_FrsNoise.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BPy_Id.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BPy_IntegrationType.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BPy_Interface0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BPy_Interface1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BPy_Iterator.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BPy_MediumType.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BPy_Nature.cpp145
-rw-r--r--source/blender/freestyle/intern/python/BPy_Operators.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BPy_SShape.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BPy_StrokeShader.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BPy_ViewMap.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BPy_ViewShape.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp75
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp75
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp75
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp75
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp75
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp75
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp95
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp75
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp95
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp75
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp75
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp75
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp75
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp75
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp75
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp75
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp75
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp75
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp75
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp75
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp75
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp75
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp75
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp75
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp75
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp75
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp75
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp75
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp75
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp75
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp75
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp75
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp75
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp75
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp75
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp75
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp75
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp75
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp75
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp75
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp74
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp75
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp75
-rw-r--r--source/blender/geometry/intern/realize_instances.cc2
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilarray.c4
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c4
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c8
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c4
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilmultiply.c2
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpenciloutline.c6
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c2
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilweight_angle.c6
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilweight_proximity.c4
-rw-r--r--source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c14
-rw-r--r--source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c8
-rw-r--r--source/blender/gpencil_modifiers/intern/lineart/lineart_shadow.c2
-rw-r--r--source/blender/gpu/CMakeLists.txt90
-rw-r--r--source/blender/gpu/intern/gpu_shader_create_info.cc1
-rw-r--r--source/blender/gpu/intern/gpu_shader_dependency.cc2
-rw-r--r--source/blender/gpu/vulkan/vk_framebuffer.cc2
-rw-r--r--source/blender/gpu/vulkan/vk_query.hh4
-rw-r--r--source/blender/gpu/vulkan/vk_shader.hh31
-rw-r--r--source/blender/ikplugin/intern/iksolver_plugin.c4
-rw-r--r--source/blender/ikplugin/intern/itasc_plugin.cpp16
-rw-r--r--source/blender/imbuf/IMB_imbuf.h6
-rw-r--r--source/blender/imbuf/intern/indexer.c18
-rw-r--r--source/blender/io/alembic/exporter/abc_export_capi.cc6
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_hair.cc4
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_points.cc2
-rw-r--r--source/blender/io/alembic/intern/abc_axis_conversion.cc8
-rw-r--r--source/blender/io/alembic/intern/abc_reader_object.cc2
-rw-r--r--source/blender/io/alembic/intern/alembic_capi.cc8
-rw-r--r--source/blender/io/collada/AnimationImporter.cpp6
-rw-r--r--source/blender/io/collada/ArmatureImporter.cpp4
-rw-r--r--source/blender/io/collada/ControllerExporter.cpp4
-rw-r--r--source/blender/io/collada/DocumentImporter.cpp4
-rw-r--r--source/blender/io/collada/MeshImporter.cpp2
-rw-r--r--source/blender/io/collada/SkinInfo.cpp6
-rw-r--r--source/blender/io/collada/collada_utils.cpp8
-rw-r--r--source/blender/io/common/intern/abstract_hierarchy_iterator.cc2
-rw-r--r--source/blender/io/gpencil/intern/gpencil_io_base.cc8
-rw-r--r--source/blender/io/gpencil/intern/gpencil_io_export_pdf.cc2
-rw-r--r--source/blender/io/gpencil/intern/gpencil_io_export_svg.cc2
-rw-r--r--source/blender/io/usd/CMakeLists.txt7
-rw-r--r--source/blender/io/usd/intern/usd_capi_export.cc6
-rw-r--r--source/blender/io/usd/intern/usd_capi_import.cc8
-rw-r--r--source/blender/io/usd/intern/usd_reader_mesh.cc15
-rw-r--r--source/blender/io/usd/intern/usd_writer_mesh.cc5
-rw-r--r--source/blender/io/usd/tests/usd_imaging_test.cc7
-rw-r--r--source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc16
-rw-r--r--source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc17
-rw-r--r--source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh5
-rw-r--r--source/blender/io/wavefront_obj/exporter/obj_export_nurbs.cc8
-rw-r--r--source/blender/io/wavefront_obj/importer/obj_import_mesh.cc1
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h1
-rw-r--r--source/blender/makesdna/DNA_node_types.h6
-rw-r--r--source/blender/makesdna/DNA_object_defaults.h2
-rw-r--r--source/blender/makesdna/DNA_object_types.h12
-rw-r--r--source/blender/makesdna/intern/dna_rename_defs.h2
-rw-r--r--source/blender/makesrna/RNA_enum_items.h1
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt5
-rw-r--r--source/blender/makesrna/intern/rna_asset.c7
-rw-r--r--source/blender/makesrna/intern/rna_color.c34
-rw-r--r--source/blender/makesrna/intern/rna_depsgraph.c2
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c8
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c8
-rw-r--r--source/blender/makesrna/intern/rna_nla.c2
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c111
-rw-r--r--source/blender/makesrna/intern/rna_object.c5
-rw-r--r--source/blender/makesrna/intern/rna_particle.c2
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c4
-rw-r--r--source/blender/modifiers/intern/MOD_array.c6
-rw-r--r--source/blender/modifiers/intern/MOD_boolean.cc34
-rw-r--r--source/blender/modifiers/intern/MOD_cast.c16
-rw-r--r--source/blender/modifiers/intern/MOD_collision.c4
-rw-r--r--source/blender/modifiers/intern/MOD_displace.c2
-rw-r--r--source/blender/modifiers/intern/MOD_explode.c4
-rw-r--r--source/blender/modifiers/intern/MOD_hook.c8
-rw-r--r--source/blender/modifiers/intern/MOD_mask.cc2
-rw-r--r--source/blender/modifiers/intern/MOD_mesh_to_volume.cc4
-rw-r--r--source/blender/modifiers/intern/MOD_meshdeform.c4
-rw-r--r--source/blender/modifiers/intern/MOD_nodes.cc3
-rw-r--r--source/blender/modifiers/intern/MOD_normal_edit.cc8
-rw-r--r--source/blender/modifiers/intern/MOD_particleinstance.c2
-rw-r--r--source/blender/modifiers/intern/MOD_screw.c8
-rw-r--r--source/blender/modifiers/intern/MOD_solidify_extrude.c2
-rw-r--r--source/blender/modifiers/intern/MOD_solidify_nonmanifold.c7
-rw-r--r--source/blender/modifiers/intern/MOD_surface.c2
-rw-r--r--source/blender/modifiers/intern/MOD_surfacedeform.c4
-rw-r--r--source/blender/modifiers/intern/MOD_triangulate.c2
-rw-r--r--source/blender/modifiers/intern/MOD_ui_common.c27
-rw-r--r--source/blender/modifiers/intern/MOD_util.cc10
-rw-r--r--source/blender/modifiers/intern/MOD_uvproject.cc6
-rw-r--r--source/blender/modifiers/intern/MOD_uvwarp.cc4
-rw-r--r--source/blender/modifiers/intern/MOD_volume_displace.cc7
-rw-r--r--source/blender/modifiers/intern/MOD_volume_to_mesh.cc4
-rw-r--r--source/blender/modifiers/intern/MOD_warp.c6
-rw-r--r--source/blender/modifiers/intern/MOD_wave.cc4
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgproximity.cc6
-rw-r--r--source/blender/nodes/composite/CMakeLists.txt1
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_alpha_over.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_antialiasing.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_bilateralblur.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_blur.cc229
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_bokehblur.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_bokehimage.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_boxmask.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_brightness.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_channel_matte.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_chroma_matte.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_color_matte.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_color_spill.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_colorbalance.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_colorcorrection.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_common.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_convert_color_space.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_crop.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc4
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_curves.cc6
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_defocus.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_denoise.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_despeckle.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_diff_matte.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_dilate.cc189
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_directionalblur.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_distance_matte.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_ellipsemask.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_glare.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_huecorrect.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_image.cc8
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_invert.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_keying.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_lensdist.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_levels.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_luma_matte.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_map_value.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_mask.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_math.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_output_file.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_rotate.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_scale.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_sepcomb_color.cc8
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_sepcomb_ycca.cc4
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_setalpha.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_split_viewer.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_sunbeams.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_switchview.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_tonemap.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_translate.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_val_to_rgb.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_vec_blur.cc2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_viewer.cc2
-rw-r--r--source/blender/nodes/function/nodes/node_fn_boolean_math.cc2
-rw-r--r--source/blender/nodes/function/nodes/node_fn_combine_color.cc4
-rw-r--r--source/blender/nodes/function/nodes/node_fn_compare.cc4
-rw-r--r--source/blender/nodes/function/nodes/node_fn_input_bool.cc2
-rw-r--r--source/blender/nodes/function/nodes/node_fn_input_color.cc2
-rw-r--r--source/blender/nodes/function/nodes/node_fn_input_int.cc2
-rw-r--r--source/blender/nodes/function/nodes/node_fn_input_string.cc2
-rw-r--r--source/blender/nodes/function/nodes/node_fn_input_vector.cc2
-rw-r--r--source/blender/nodes/function/nodes/node_fn_random_value.cc4
-rw-r--r--source/blender/nodes/function/nodes/node_fn_rotate_euler.cc2
-rw-r--r--source/blender/nodes/function/nodes/node_fn_separate_color.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_accumulate_field.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_attribute_capture.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_attribute_domain_size.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_attribute_statistic.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_boolean.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_collection_info.cc10
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_common.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_convex_hull.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_handle_type_selection.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_primitive_arc.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_primitive_bezier_segment.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_primitive_line.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_primitive_quadrilateral.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_reverse.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_sample.cc343
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_set_handle_type.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_trim.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_distribute_points_in_volume.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_distribute_points_on_faces.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc6
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_image_texture.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_input_named_attribute.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_merge_by_distance.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc6
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc12
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cylinder.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_grid.cc3
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_line.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc8
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_mesh_to_points.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_mesh_to_volume.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_object_info.cc6
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_points_to_volume.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_proximity.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_raycast.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_sample_index.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_sample_nearest.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_sample_nearest_surface.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_sample_uv_surface.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_separate_geometry.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_set_curve_handles.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_set_curve_normal.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_set_spline_resolution.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_switch.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_triangulate.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_uv_unwrap.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_viewer.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_volume_to_mesh.cc4
-rw-r--r--source/blender/nodes/intern/node_common.cc150
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_add_shader.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_ambient_occlusion.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_attribute.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_background.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bevel.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_blackbody.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_brightness.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_anisotropic.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_diffuse.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_glass.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_glossy.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_hair.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_hair_principled.cc6
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_principled.cc6
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_refraction.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_toon.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_translucent.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_transparent.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_velvet.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bump.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_camera.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_clamp.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_color_ramp.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_common.cc6
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_curves.cc12
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_displacement.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_eevee_specular.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_emission.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_fresnel.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_gamma.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_geometry.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_hair_info.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_holdout.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_hueSatVal.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_ies_light.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_invert.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_layer_weight.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_light_falloff.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_light_path.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_map_range.cc6
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_mapping.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_math.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_mix.cc6
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_mix_rgb.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_mix_shader.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_normal.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_normal_map.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_object_info.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_output_aov.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_output_light.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_output_material.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_output_world.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_particle_info.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_point_info.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_rgb.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_rgb_to_bw.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_script.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_sepcomb_color.cc12
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_sepcomb_hsv.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_sepcomb_rgb.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_sepcomb_xyz.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_shader_to_rgb.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_squeeze.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.cc6
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tangent.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_brick.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_checker.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_coord.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_environment.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_gradient.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_image.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_magic.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_musgrave.cc6
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_noise.cc6
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_pointdensity.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_sky.cc6
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_voronoi.cc6
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_wave.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_white_noise.cc6
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_uvmap.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_value.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_vector_displacement.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_vector_math.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_vector_rotate.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_vector_transform.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_vertex_color.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_volume_absorption.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_volume_info.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_volume_principled.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_volume_scatter.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_wavelength.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_wireframe.cc2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_at.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_bricks.c4
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_checker.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_combine_color.c4
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_common.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_compose.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_coord.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_curves.c11
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_decompose.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_distance.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_hueSatVal.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_image.c4
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_invert.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_math.c4
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_mixRgb.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_output.c4
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_proc.c4
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_rotate.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_scale.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_separate_color.c4
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_texture.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_translate.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_valToNor.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_valToRgb.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_viewer.c2
-rw-r--r--source/blender/python/bmesh/bmesh_py_ops.c124
-rw-r--r--source/blender/python/bmesh/bmesh_py_types.c35
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_customdata.c28
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_meshdata.c28
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_select.c28
-rw-r--r--source/blender/python/generic/bgl.c141
-rw-r--r--source/blender/python/generic/idprop_py_api.c339
-rw-r--r--source/blender/python/generic/idprop_py_ui_api.c106
-rw-r--r--source/blender/python/generic/imbuf_py_api.c105
-rw-r--r--source/blender/python/gpu/gpu_py_buffer.c30
-rw-r--r--source/blender/python/intern/bpy_app_handlers.c90
-rw-r--r--source/blender/python/intern/bpy_app_translations.c126
-rw-r--r--source/blender/python/intern/bpy_gizmo_wrap.h2
-rw-r--r--source/blender/python/intern/bpy_library_load.c125
-rw-r--r--source/blender/python/intern/bpy_operator_wrap.h5
-rw-r--r--source/blender/python/intern/bpy_rna.c1187
-rw-r--r--source/blender/python/intern/bpy_rna_data.c126
-rw-r--r--source/blender/python/mathutils/mathutils_Color.c202
-rw-r--r--source/blender/python/mathutils/mathutils_Euler.c132
-rw-r--r--source/blender/python/mathutils/mathutils_Matrix.c284
-rw-r--r--source/blender/python/mathutils/mathutils_Quaternion.c204
-rw-r--r--source/blender/python/mathutils/mathutils_Vector.c233
-rw-r--r--source/blender/python/mathutils/mathutils_bvhtree.c95
-rw-r--r--source/blender/python/mathutils/mathutils_kdtree.c96
-rw-r--r--source/blender/render/RE_multires_bake.h4
-rw-r--r--source/blender/render/RE_pipeline.h2
-rw-r--r--source/blender/render/intern/bake.c2
-rw-r--r--source/blender/render/intern/engine.cc6
-rw-r--r--source/blender/render/intern/multires_bake.c4
-rw-r--r--source/blender/render/intern/pipeline.cc113
-rw-r--r--source/blender/render/intern/pipeline.h9
-rw-r--r--source/blender/render/intern/render_result.cc6
-rw-r--r--source/blender/render/intern/render_result.h5
-rw-r--r--source/blender/render/intern/render_types.h8
-rw-r--r--source/blender/render/intern/texture_pointdensity.c12
-rw-r--r--source/blender/sequencer/SEQ_proxy.h4
-rw-r--r--source/blender/sequencer/SEQ_render.h10
-rw-r--r--source/blender/sequencer/intern/image_cache.c7
-rw-r--r--source/blender/sequencer/intern/image_cache.h2
-rw-r--r--source/blender/sequencer/intern/proxy.c5
-rw-r--r--source/blender/sequencer/intern/proxy_job.c4
-rw-r--r--source/blender/sequencer/intern/render.c10
-rw-r--r--source/blender/windowmanager/WM_api.h42
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.cc2
-rw-r--r--source/blender/windowmanager/intern/wm_jobs.c18
-rw-r--r--source/blender/windowmanager/wm_event_system.h8
-rw-r--r--source/blender/windowmanager/xr/intern/wm_xr_session.c2
-rw-r--r--source/creator/creator_args.c2
m---------source/tools0
-rw-r--r--tests/CMakeLists.txt19
-rw-r--r--tests/blender_as_python_module/CMakeLists.txt2
-rw-r--r--tests/python/CMakeLists.txt2
988 files changed, 14585 insertions, 12442 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7e89943714a..30a186318ce 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -177,8 +177,11 @@ option(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON)
option(WITH_PYTHON "Enable Embedded Python API (only disable for development)" ON)
option(WITH_PYTHON_SECURITY "Disables execution of scripts within blend files by default" ON)
-mark_as_advanced(WITH_PYTHON) # don't want people disabling this unless they really know what they are doing.
-mark_as_advanced(WITH_PYTHON_SECURITY) # some distributions see this as a security issue, rather than have them patch it, make a build option.
+# Don't want people disabling this unless they really know what they are doing.
+mark_as_advanced(WITH_PYTHON)
+# Some distributions see this as a security issue, rather than have them patch it,
+# make a build option.
+mark_as_advanced(WITH_PYTHON_SECURITY)
option(WITH_PYTHON_SAFETY "Enable internal API error checking to track invalid data to prevent crash on access (at the expense of some efficiency, only enable for development)." OFF)
mark_as_advanced(WITH_PYTHON_SAFETY)
@@ -550,6 +553,7 @@ endif()
option(WITH_GTESTS "Enable GTest unit testing" OFF)
option(WITH_OPENGL_RENDER_TESTS "Enable OpenGL render related unit testing (Experimental)" OFF)
option(WITH_OPENGL_DRAW_TESTS "Enable OpenGL UI drawing related unit testing (Experimental)" OFF)
+# NOTE: All callers of this must add `TEST_PYTHON_EXE_EXTRA_ARGS` before any other arguments.
set(TEST_PYTHON_EXE "" CACHE PATH "Python executable to run unit tests")
mark_as_advanced(TEST_PYTHON_EXE)
diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt
index 023d113b551..999223603d5 100644
--- a/build_files/build_environment/CMakeLists.txt
+++ b/build_files/build_environment/CMakeLists.txt
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-or-later
-####################################################################################################
+##################################################################################################
#
# This is a build system used by platform maintainers to build library dependencies on
# Windows, macOS and Linux.
@@ -22,7 +22,7 @@
# Install compiler cmake autoconf automake libtool yasm tcl
# Run "make deps" from main Blender directory
#
-####################################################################################################
+##################################################################################################
project("BlenderDependencies")
cmake_minimum_required(VERSION 3.5)
@@ -30,7 +30,8 @@ cmake_minimum_required(VERSION 3.5)
include(ExternalProject)
include(cmake/check_software.cmake)
include(cmake/options.cmake)
-# versions.cmake needs to be included after options.cmake due to the BLENDER_PLATFORM_ARM variable being needed.
+# `versions.cmake` needs to be included after `options.cmake`
+# due to the `BLENDER_PLATFORM_ARM` variable being needed.
include(cmake/versions.cmake)
include(cmake/boost_build_options.cmake)
include(cmake/download.cmake)
@@ -88,7 +89,7 @@ include(cmake/package_python.cmake)
include(cmake/usd.cmake)
include(cmake/potrace.cmake)
include(cmake/haru.cmake)
-# Boost needs to be included after python.cmake due to the PYTHON_BINARY variable being needed.
+# Boost needs to be included after `python.cmake` due to the PYTHON_BINARY variable being needed.
include(cmake/boost.cmake)
include(cmake/pugixml.cmake)
include(cmake/ispc.cmake)
diff --git a/build_files/build_environment/cmake/dpcpp.cmake b/build_files/build_environment/cmake/dpcpp.cmake
index dbba97b8264..28315d1f703 100644
--- a/build_files/build_environment/cmake/dpcpp.cmake
+++ b/build_files/build_environment/cmake/dpcpp.cmake
@@ -80,8 +80,11 @@ ExternalProject_Add(external_dpcpp
SOURCE_SUBDIR llvm
LIST_SEPARATOR ^^
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/dpcpp ${DEFAULT_CMAKE_FLAGS} ${DPCPP_EXTRA_ARGS}
- #CONFIGURE_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/dpcpp/src/external_dpcpp/buildbot/configure.py ${DPCPP_CONFIGURE_ARGS}
- #BUILD_COMMAND echo "." #${PYTHON_BINARY} ${BUILD_DIR}/dpcpp/src/external_dpcpp/buildbot/compile.py
+ # CONFIGURE_COMMAND
+ # ${PYTHON_BINARY}
+ # ${BUILD_DIR}/dpcpp/src/external_dpcpp/buildbot/configure.py ${DPCPP_CONFIGURE_ARGS}
+ # BUILD_COMMAND
+ # echo "." # ${PYTHON_BINARY} ${BUILD_DIR}/dpcpp/src/external_dpcpp/buildbot/compile.py
INSTALL_COMMAND ${CMAKE_COMMAND} --build . -- deploy-sycl-toolchain
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/dpcpp/src/external_dpcpp < ${PATCH_DIR}/dpcpp.diff
INSTALL_DIR ${LIBDIR}/dpcpp
diff --git a/build_files/build_environment/cmake/setup_mingw64.cmake b/build_files/build_environment/cmake/setup_mingw64.cmake
index fa65212e056..6f53edb38ea 100644
--- a/build_files/build_environment/cmake/setup_mingw64.cmake
+++ b/build_files/build_environment/cmake/setup_mingw64.cmake
@@ -1,10 +1,10 @@
# SPDX-License-Identifier: GPL-2.0-or-later
-####################################################################################################################
+##################################################################################################
# Mingw64 Builds
-####################################################################################################################
+##################################################################################################
# This installs mingw64+msys to compile ffmpeg/iconv/libsndfile/fftw3
-####################################################################################################################
+##################################################################################################
message("LIBDIR = ${LIBDIR}")
macro(cmake_to_msys_path MsysPath ResultingPath)
diff --git a/build_files/build_environment/cmake/usd.cmake b/build_files/build_environment/cmake/usd.cmake
index 34e43383637..0661be3ba14 100644
--- a/build_files/build_environment/cmake/usd.cmake
+++ b/build_files/build_environment/cmake/usd.cmake
@@ -58,8 +58,9 @@ set(USD_EXTRA_ARGS
-DPXR_BUILD_USD_TOOLS=OFF
-DCMAKE_DEBUG_POSTFIX=_d
-DBUILD_SHARED_LIBS=Off
- # USD is hellbound on making a shared lib, unless you point this variable to a valid cmake file
- # doesn't have to make sense, but as long as it points somewhere valid it will skip the shared lib.
+ # USD is hellbound on making a shared library,
+ # unless you point this variable to a valid CMAKE file doesn't have to make sense,
+ # but as long as it points somewhere valid it will skip the shared library.
-DPXR_MONOLITHIC_IMPORT=${BUILD_DIR}/usd/src/external_usd/cmake/defaults/Version.cmake
-DTBB_INCLUDE_DIRS=${LIBDIR}/tbb/include
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
@@ -86,7 +87,8 @@ add_dependencies(
external_opensubdiv
)
-# Since USD 21.11 the libraries are prefixed with "usd_", i.e. "libusd_m.a" became "libusd_usd_m.a".
+# Since USD 21.11 the libraries are prefixed with "usd_", i.e.
+# "libusd_m.a" became "libusd_usd_m.a".
# See https://github.com/PixarAnimationStudios/USD/blob/release/CHANGELOG.md#2111---2021-11-01
if(NOT WIN32)
if (USD_VERSION VERSION_LESS 21.11)
diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake
index 89b0a8d72de..4f4330b56f4 100644
--- a/build_files/build_environment/cmake/versions.cmake
+++ b/build_files/build_environment/cmake/versions.cmake
@@ -225,8 +225,9 @@ set(URLLIB3_CPE "cpe:2.3:a:urllib3:urllib3:${URLLIB3_VERSION}:*:*:*:*:*:*:*")
set(CERTIFI_VERSION 2021.10.8)
set(REQUESTS_VERSION 2.27.1)
set(CYTHON_VERSION 0.29.26)
-# The version of the zstd library used to build the Python package should match ZSTD_VERSION defined below.
-# At this time of writing, 0.17.0 was already released, but built against zstd 1.5.1, while we use 1.5.0.
+# The version of the zstd library used to build the Python package should match ZSTD_VERSION
+# defined below. At this time of writing, 0.17.0 was already released,
+# but built against zstd 1.5.1, while we use 1.5.0.
set(ZSTANDARD_VERSION 0.16.0)
set(AUTOPEP8_VERSION 1.6.0)
set(PYCODESTYLE_VERSION 2.8.0)
@@ -371,10 +372,10 @@ set(PYSTRING_HASH f2c68786b359f5e4e62bed53bc4fb86d)
set(PYSTRING_HASH_TYPE MD5)
set(PYSTRING_FILE pystring-${PYSTRING_VERSION}.tar.gz)
-set(EXPAT_VERSION 2_4_9)
-set(EXPAT_VERSION_DOTS 2.4.9)
+set(EXPAT_VERSION 2_5_0)
+set(EXPAT_VERSION_DOTS 2.5.0)
set(EXPAT_URI https://github.com/libexpat/libexpat/archive/R_${EXPAT_VERSION}.tar.gz)
-set(EXPAT_HASH b59a2aa796be1ee177bbab3b7231dfa5)
+set(EXPAT_HASH d375fa3571c0abb945873f5061a8f2e2)
set(EXPAT_HASH_TYPE MD5)
set(EXPAT_FILE libexpat-${EXPAT_VERSION}.tar.gz)
set(EXPAT_CPE "cpe:2.3:a:libexpat_project:libexpat:${EXPAT_VERSION_DOTS}:*:*:*:*:*:*:*")
diff --git a/build_files/build_environment/patches/cmake/modules/FindIlmBase.cmake b/build_files/build_environment/patches/cmake/modules/FindIlmBase.cmake
index 7611ca21708..c74ff788a75 100644
--- a/build_files/build_environment/patches/cmake/modules/FindIlmBase.cmake
+++ b/build_files/build_environment/patches/cmake/modules/FindIlmBase.cmake
@@ -177,7 +177,8 @@ if(ILMBASE_INCLUDE_DIR)
"\\1" XYZ ${ILMBASE_BUILD_SPECIFICATION})
set("ILMBASE_VERSION" ${XYZ} CACHE STRING "Version of ILMBase lib")
else()
- # Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
+ # Old versions (before 2.0?) do not have any version string,
+ # just assuming 2.0 should be fine though.
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
set("ILMBASE_VERSION" "2.0" CACHE STRING "Version of ILMBase lib")
endif()
@@ -195,8 +196,13 @@ else()
# elseif(${ILMBASE_VERSION} VERSION_LESS "2.1")
set(IlmBase_Libraries Half Iex Imath IlmThread)
# else()
-# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _ilmbase_libs_ver ${ILMBASE_VERSION})
-# set(IlmBase_Libraries Half Iex-${_ilmbase_libs_ver} Imath-${_ilmbase_libs_ver} IlmThread-${_ilmbase_libs_ver})
+ # string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _ilmbase_libs_ver ${ILMBASE_VERSION})
+ # set(IlmBase_Libraries
+ # Half
+ # Iex-${_ilmbase_libs_ver}
+ # Imath-${_ilmbase_libs_ver}
+ # IlmThread-${_ilmbase_libs_ver}
+ # )
endif()
diff --git a/build_files/build_environment/patches/cmake/modules/FindOpenEXR.cmake b/build_files/build_environment/patches/cmake/modules/FindOpenEXR.cmake
index 8b08b047eac..040dfe1c16f 100644
--- a/build_files/build_environment/patches/cmake/modules/FindOpenEXR.cmake
+++ b/build_files/build_environment/patches/cmake/modules/FindOpenEXR.cmake
@@ -175,7 +175,8 @@ if(OPENEXR_INCLUDE_DIR)
"\\1" XYZ ${OPENEXR_BUILD_SPECIFICATION})
set("OPENEXR_VERSION" ${XYZ} CACHE STRING "Version of OpenEXR lib")
else()
- # Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
+ # Old versions (before 2.0?) do not have any version string,
+ # just assuming 2.0 should be fine though.
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
set("OPENEXR_VERSION" "2.0" CACHE STRING "Version of OpenEXR lib")
endif()
diff --git a/build_files/cmake/Modules/FindOpenEXR.cmake b/build_files/cmake/Modules/FindOpenEXR.cmake
index 9107b562711..1cc3e50ba92 100644
--- a/build_files/cmake/Modules/FindOpenEXR.cmake
+++ b/build_files/cmake/Modules/FindOpenEXR.cmake
@@ -26,7 +26,8 @@ IF(NOT OPENEXR_ROOT_DIR AND NOT $ENV{OPENEXR_ROOT_DIR} STREQUAL "")
SET(OPENEXR_ROOT_DIR $ENV{OPENEXR_ROOT_DIR})
ENDIF()
-# Old versions (before 2.0?) do not have any version string, just assuming this should be fine though.
+# Old versions (before 2.0?) do not have any version string,
+# just assuming this should be fine though.
SET(_openexr_libs_ver_init "2.0")
SET(_openexr_SEARCH_DIRS
diff --git a/build_files/cmake/Modules/FindUSD.cmake b/build_files/cmake/Modules/FindUSD.cmake
index 0fd5f06bb35..ba5a3d7c843 100644
--- a/build_files/cmake/Modules/FindUSD.cmake
+++ b/build_files/cmake/Modules/FindUSD.cmake
@@ -32,7 +32,8 @@ FIND_PATH(USD_INCLUDE_DIR
DOC "Universal Scene Description (USD) header files"
)
-# Since USD 21.11 the libraries are prefixed with "usd_", i.e. "libusd_m.a" became "libusd_usd_m.a".
+# Since USD 21.11 the libraries are prefixed with "usd_", i.e.
+# "libusd_m.a" became "libusd_usd_m.a".
# See https://github.com/PixarAnimationStudios/USD/blob/release/CHANGELOG.md#2111---2021-11-01
FIND_LIBRARY(USD_LIBRARY
NAMES
diff --git a/build_files/cmake/config/blender_developer.cmake b/build_files/cmake/config/blender_developer.cmake
index 1f1a100d958..ebc5727a79c 100644
--- a/build_files/cmake/config/blender_developer.cmake
+++ b/build_files/cmake/config/blender_developer.cmake
@@ -8,7 +8,11 @@
set(WITH_ASSERT_ABORT ON CACHE BOOL "" FORCE)
set(WITH_BUILDINFO OFF CACHE BOOL "" FORCE)
-set(WITH_COMPILER_ASAN ON CACHE BOOL "" FORCE)
+# Sadly ASAN is more often broken than working with MSVC do not enable it in the
+# developer profile for now.
+if(NOT WIN32)
+ set(WITH_COMPILER_ASAN ON CACHE BOOL "" FORCE)
+endif()
set(WITH_CYCLES_NATIVE_ONLY ON CACHE BOOL "" FORCE)
set(WITH_DOC_MANPAGE OFF CACHE BOOL "" FORCE)
set(WITH_GTESTS ON CACHE BOOL "" FORCE)
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 8af45690862..73883376060 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -57,6 +57,25 @@ macro(path_ensure_trailing_slash
unset(_path_sep)
endmacro()
+# Our own version of `cmake_path(IS_PREFIX ..)`.
+# This can be removed when 3.20 or greater is the minimum supported version.
+macro(path_is_prefix
+ path_prefix path result_var
+ )
+ # Remove when CMAKE version is bumped to "3.20" or greater.
+ # `cmake_path(IS_PREFIX ${path_prefix} ${path} NORMALIZE result_var)`
+ # Get the normalized paths (needed to remove `..`).
+ get_filename_component(_abs_prefix "${${path_prefix}}" ABSOLUTE)
+ get_filename_component(_abs_suffix "${${path}}" ABSOLUTE)
+ string(LENGTH "${_abs_prefix}" _len)
+ string(SUBSTRING "${_abs_suffix}" 0 "${_len}" _substr)
+ string(COMPARE EQUAL "${_abs_prefix}" "${_substr}" "${result_var}")
+ unset(_abs_prefix)
+ unset(_abs_suffix)
+ unset(_len)
+ unset(_substr)
+endmacro()
+
# foo_bar.spam --> foo_barMySuffix.spam
macro(file_suffix
file_name_new file_name file_suffix
@@ -995,7 +1014,8 @@ function(data_to_c_simple_icons
add_custom_command(
OUTPUT ${_file_from} ${_file_to}
COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
- # COMMAND python3 ${CMAKE_SOURCE_DIR}/source/blender/datatoc/datatoc_icon.py ${_path_from_abs} ${_file_from}
+ # COMMAND python3 ${CMAKE_SOURCE_DIR}/source/blender/datatoc/datatoc_icon.py
+ # ${_path_from_abs} ${_file_from}
COMMAND "$<TARGET_FILE:datatoc_icon>" ${_path_from_abs} ${_file_from}
COMMAND "$<TARGET_FILE:datatoc>" ${_file_from} ${_file_to}
DEPENDS
@@ -1073,23 +1093,27 @@ function(msgfmt_simple
endfunction()
function(find_python_package
- package
- relative_include_dir
+ package
+ relative_include_dir
)
string(TOUPPER ${package} _upper_package)
- # set but invalid
+ # Set but invalid.
if((NOT ${PYTHON_${_upper_package}_PATH} STREQUAL "") AND
(NOT ${PYTHON_${_upper_package}_PATH} MATCHES NOTFOUND))
-# if(NOT EXISTS "${PYTHON_${_upper_package}_PATH}/${package}")
-# message(WARNING "PYTHON_${_upper_package}_PATH is invalid, ${package} not found in '${PYTHON_${_upper_package}_PATH}' "
-# "WITH_PYTHON_INSTALL_${_upper_package} option will be ignored when installing python")
-# set(WITH_PYTHON_INSTALL${_upper_package} OFF)
-# endif()
- # not set, so initialize
+ # if(NOT EXISTS "${PYTHON_${_upper_package}_PATH}/${package}")
+ # message(
+ # WARNING
+ # "PYTHON_${_upper_package}_PATH is invalid, ${package} not found in "
+ # "'${PYTHON_${_upper_package}_PATH}' "
+ # "WITH_PYTHON_INSTALL_${_upper_package} option will be ignored when installing Python"
+ # )
+ # set(WITH_PYTHON_INSTALL${_upper_package} OFF)
+ # endif()
+ # Not set, so initialize.
else()
- string(REPLACE "." ";" _PY_VER_SPLIT "${PYTHON_VERSION}")
+ string(REPLACE "." ";" _PY_VER_SPLIT "${PYTHON_VERSION}")
list(GET _PY_VER_SPLIT 0 _PY_VER_MAJOR)
# re-cache
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
index 343ed6d8ef4..f1ce3221440 100644
--- a/build_files/cmake/platform/platform_unix.cmake
+++ b/build_files/cmake/platform/platform_unix.cmake
@@ -151,7 +151,7 @@ if(WITH_PYTHON)
# Installing into `site-packages`, warn when installing into `./../lib/`
# which script authors almost certainly don't want.
if(EXISTS ${LIBDIR})
- cmake_path(IS_PREFIX LIBDIR "${PYTHON_SITE_PACKAGES}" NORMALIZE _is_prefix)
+ path_is_prefix(LIBDIR PYTHON_SITE_PACKAGES _is_prefix)
if(_is_prefix)
message(WARNING "
Building Blender with the following configuration:
diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake
index 3818076634a..7a2d3ad948a 100644
--- a/build_files/cmake/platform/platform_win32.cmake
+++ b/build_files/cmake/platform/platform_win32.cmake
@@ -150,10 +150,11 @@ endif()
# Debug Symbol format
# sccache # MSVC_ASAN # format # why
-# ON # ON # Z7 # sccache will only play nice with Z7
-# ON # OFF # Z7 # sccache will only play nice with Z7
-# OFF # ON # Zi # Asan will not play nice with Edit and Continue
-# OFF # OFF # ZI # Neither asan nor sscache is enabled Edit and Continue is available
+# ON # ON # Z7 # sccache will only play nice with Z7.
+# ON # OFF # Z7 # sccache will only play nice with Z7.
+# OFF # ON # Zi # Asan will not play nice with Edit and Continue.
+# OFF # OFF # ZI # Neither ASAN nor sscache is enabled Edit and
+# Continue is available.
# Release Symbol format
# sccache # MSVC_ASAN # format # why
diff --git a/build_files/config/pipeline_config.yaml b/build_files/config/pipeline_config.yaml
index 82cd009ea95..3359f89c41e 100644
--- a/build_files/config/pipeline_config.yaml
+++ b/build_files/config/pipeline_config.yaml
@@ -58,6 +58,8 @@ buildbot:
version: '5.2.21440'
optix:
version: '7.3.0'
+ ocloc:
+ version: '101.3430'
cmake:
default:
version: any
diff --git a/doc/doxygen/Doxyfile b/doc/doxygen/Doxyfile
index 18c16a60993..e1d8ac39bcf 100644
--- a/doc/doxygen/Doxyfile
+++ b/doc/doxygen/Doxyfile
@@ -38,7 +38,7 @@ PROJECT_NAME = Blender
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = V3.4
+PROJECT_NUMBER = V3.5
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
diff --git a/doc/python_api/requirements.txt b/doc/python_api/requirements.txt
index bf120f24995..4b31c3f1344 100644
--- a/doc/python_api/requirements.txt
+++ b/doc/python_api/requirements.txt
@@ -1,13 +1,13 @@
-sphinx==5.2.3
+sphinx==5.3.0
# Sphinx dependencies that are important
Jinja2==3.1.2
Pygments==2.13.0
docutils==0.17.1
snowballstemmer==2.2.0
-babel==2.10.3
+babel==2.11.0
requests==2.28.1
# Only needed to match the theme used for the official documentation.
# Without this theme, the default theme will be used.
-sphinx_rtd_theme==1.0.0
+sphinx_rtd_theme==1.1.0
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index 7b5f13177ef..f51ab8d6591 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -1459,15 +1459,15 @@ def pyrna2sphinx(basepath):
# If the link has been written, no need to inline the enum items.
enum_text = "" if enum_descr_override else pyrna_enum2sphinx(prop)
if prop.name or prop.description or enum_text:
- fw(ident + ":%s%s:\n\n" % (id_name, identifier))
+ fw(ident + ":%s%s: " % (id_name, identifier))
if prop.name or prop.description:
- fw(indent(", ".join(val for val in (prop.name, prop.description) if val), ident + " ") + "\n\n")
+ fw(", ".join(val for val in (prop.name, prop.description.replace("\n", "")) if val) + "\n")
# Special exception, can't use generic code here for enums.
if enum_text:
- write_indented_lines(ident + " ", fw, enum_text)
fw("\n")
+ write_indented_lines(ident + " ", fw, enum_text)
del enum_text
# end enum exception
diff --git a/extern/hipew/src/hipew.c b/extern/hipew/src/hipew.c
index ecf952e266f..7cafe7727f5 100644
--- a/extern/hipew/src/hipew.c
+++ b/extern/hipew/src/hipew.c
@@ -253,7 +253,7 @@ static int hipewHipInit(void) {
/* Default installation path. */
const char *hip_paths[] = {"", NULL};
#else
- const char *hip_paths[] = {"/opt/rocm/hip/lib/libamdhip64.so", NULL};
+ const char *hip_paths[] = {"libamdhip64.so", "/opt/rocm/hip/lib/libamdhip64.so", NULL};
#endif
static int initialized = 0;
static int result = 0;
diff --git a/extern/mantaflow/CMakeLists.txt b/extern/mantaflow/CMakeLists.txt
index 908c5d2ffd9..06767e9af1e 100644
--- a/extern/mantaflow/CMakeLists.txt
+++ b/extern/mantaflow/CMakeLists.txt
@@ -25,7 +25,8 @@ set(MANTAVERSION "0.13")
add_definitions(-DWITH_FLUID=1)
# Compile Mantaflow dependencies too (e.g. cnpy for numpy file IO).
-# Make sure that dependencies exist before enabling this option by updating the source files in extern/
+# Make sure that dependencies exist before enabling this option
+# by updating the source files in `extern/`.
set(WITH_MANTA_DEPENDENCIES 0)
# Enable Mantaflow numpy support
diff --git a/intern/cycles/device/CMakeLists.txt b/intern/cycles/device/CMakeLists.txt
index 5296d819e42..bfca3ab6aea 100644
--- a/intern/cycles/device/CMakeLists.txt
+++ b/intern/cycles/device/CMakeLists.txt
@@ -224,7 +224,8 @@ include_directories(SYSTEM ${INC_SYS})
cycles_add_library(cycles_device "${LIB}" ${SRC})
if(WITH_CYCLES_DEVICE_ONEAPI)
- # Need to have proper rebuilding in case of changes in cycles_kernel_oneapi due external project behaviour
+ # Need to have proper rebuilding in case of changes
+ # in cycles_kernel_oneapi due external project behavior.
add_dependencies(cycles_device cycles_kernel_oneapi)
endif()
diff --git a/intern/cycles/device/metal/kernel.mm b/intern/cycles/device/metal/kernel.mm
index 55938d1a03a..dc8af9a5358 100644
--- a/intern/cycles/device/metal/kernel.mm
+++ b/intern/cycles/device/metal/kernel.mm
@@ -45,6 +45,36 @@ bool kernel_has_intersection(DeviceKernel device_kernel)
struct ShaderCache {
ShaderCache(id<MTLDevice> _mtlDevice) : mtlDevice(_mtlDevice)
{
+ /* Initialize occupancy tuning LUT. */
+ if (MetalInfo::get_device_vendor(mtlDevice) == METAL_GPU_APPLE) {
+ switch (MetalInfo::get_apple_gpu_architecture(mtlDevice)) {
+ default:
+ case APPLE_M2:
+ occupancy_tuning[DEVICE_KERNEL_INTEGRATOR_COMPACT_SHADOW_STATES] = {32, 32};
+ occupancy_tuning[DEVICE_KERNEL_INTEGRATOR_INIT_FROM_CAMERA] = {832, 32};
+ occupancy_tuning[DEVICE_KERNEL_INTEGRATOR_INTERSECT_CLOSEST] = {64, 64};
+ occupancy_tuning[DEVICE_KERNEL_INTEGRATOR_INTERSECT_SHADOW] = {64, 64};
+ occupancy_tuning[DEVICE_KERNEL_INTEGRATOR_INTERSECT_SUBSURFACE] = {704, 32};
+ occupancy_tuning[DEVICE_KERNEL_INTEGRATOR_QUEUED_PATHS_ARRAY] = {1024, 256};
+ occupancy_tuning[DEVICE_KERNEL_INTEGRATOR_SHADE_BACKGROUND] = {64, 32};
+ occupancy_tuning[DEVICE_KERNEL_INTEGRATOR_SHADE_SHADOW] = {256, 256};
+ occupancy_tuning[DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE] = {448, 384};
+ occupancy_tuning[DEVICE_KERNEL_INTEGRATOR_SORTED_PATHS_ARRAY] = {1024, 1024};
+ break;
+ case APPLE_M1:
+ occupancy_tuning[DEVICE_KERNEL_INTEGRATOR_COMPACT_SHADOW_STATES] = {256, 128};
+ occupancy_tuning[DEVICE_KERNEL_INTEGRATOR_INIT_FROM_CAMERA] = {768, 32};
+ occupancy_tuning[DEVICE_KERNEL_INTEGRATOR_INTERSECT_CLOSEST] = {512, 128};
+ occupancy_tuning[DEVICE_KERNEL_INTEGRATOR_INTERSECT_SHADOW] = {384, 128};
+ occupancy_tuning[DEVICE_KERNEL_INTEGRATOR_INTERSECT_SUBSURFACE] = {512, 64};
+ occupancy_tuning[DEVICE_KERNEL_INTEGRATOR_QUEUED_PATHS_ARRAY] = {512, 256};
+ occupancy_tuning[DEVICE_KERNEL_INTEGRATOR_SHADE_BACKGROUND] = {512, 128};
+ occupancy_tuning[DEVICE_KERNEL_INTEGRATOR_SHADE_SHADOW] = {384, 32};
+ occupancy_tuning[DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE] = {576, 384};
+ occupancy_tuning[DEVICE_KERNEL_INTEGRATOR_SORTED_PATHS_ARRAY] = {832, 832};
+ break;
+ }
+ }
}
~ShaderCache();
@@ -73,6 +103,11 @@ struct ShaderCache {
std::function<void(MetalKernelPipeline *)> completionHandler;
};
+ struct OccupancyTuningParameters {
+ int threads_per_threadgroup = 0;
+ int num_threads_per_block = 0;
+ } occupancy_tuning[DEVICE_KERNEL_NUM];
+
std::mutex cache_mutex;
PipelineCollection pipelines[DEVICE_KERNEL_NUM];
@@ -230,6 +265,13 @@ void ShaderCache::load_kernel(DeviceKernel device_kernel,
request.pipeline->device_kernel = device_kernel;
request.pipeline->threads_per_threadgroup = device->max_threads_per_threadgroup;
+ if (occupancy_tuning[device_kernel].threads_per_threadgroup) {
+ request.pipeline->threads_per_threadgroup =
+ occupancy_tuning[device_kernel].threads_per_threadgroup;
+ request.pipeline->num_threads_per_block =
+ occupancy_tuning[device_kernel].num_threads_per_block;
+ }
+
/* metalrt options */
request.pipeline->use_metalrt = device->use_metalrt;
request.pipeline->metalrt_hair = device->use_metalrt &&
@@ -374,13 +416,6 @@ void MetalKernelPipeline::compile()
const std::string function_name = std::string("cycles_metal_") +
device_kernel_as_string(device_kernel);
- int threads_per_threadgroup = this->threads_per_threadgroup;
- if (device_kernel > DEVICE_KERNEL_INTEGRATOR_MEGAKERNEL &&
- device_kernel < DEVICE_KERNEL_INTEGRATOR_RESET) {
- /* Always use 512 for the sorting kernels */
- threads_per_threadgroup = 512;
- }
-
NSString *entryPoint = [@(function_name.c_str()) copy];
NSError *error = NULL;
@@ -644,12 +679,14 @@ void MetalKernelPipeline::compile()
return;
}
- int num_threads_per_block = round_down(computePipelineState.maxTotalThreadsPerThreadgroup,
- computePipelineState.threadExecutionWidth);
- num_threads_per_block = std::max(num_threads_per_block,
- (int)computePipelineState.threadExecutionWidth);
+ if (!num_threads_per_block) {
+ num_threads_per_block = round_down(computePipelineState.maxTotalThreadsPerThreadgroup,
+ computePipelineState.threadExecutionWidth);
+ num_threads_per_block = std::max(num_threads_per_block,
+ (int)computePipelineState.threadExecutionWidth);
+ }
+
this->pipeline = computePipelineState;
- this->num_threads_per_block = num_threads_per_block;
if (@available(macOS 11.0, *)) {
if (creating_new_archive || recreate_archive) {
diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt
index 81c5f593974..3779fdc697a 100644
--- a/intern/cycles/kernel/CMakeLists.txt
+++ b/intern/cycles/kernel/CMakeLists.txt
@@ -866,8 +866,8 @@ if(WITH_CYCLES_DEVICE_ONEAPI)
else()
list(APPEND sycl_compiler_flags -fPIC)
- # We avoid getting __FAST_MATH__ to be defined when building on CentOS 7 until the compilation crash
- # it triggers at either AoT or JIT stages gets fixed.
+ # We avoid getting __FAST_MATH__ to be defined when building on CentOS 7 until the compilation
+ # crash it triggers at either AoT or JIT stages gets fixed.
list(APPEND sycl_compiler_flags -fhonor-nans)
# add $ORIGIN to cycles_kernel_oneapi.so rpath so libsycl.so and
@@ -881,7 +881,8 @@ if(WITH_CYCLES_DEVICE_ONEAPI)
OUTPUT ${cycles_kernel_oneapi_lib}
COMMAND ${CMAKE_COMMAND} -E env
"LD_LIBRARY_PATH=${sycl_compiler_root}/../lib:${OCLOC_INSTALL_DIR}/lib:${IGC_INSTALL_DIR}/lib"
- "PATH=${OCLOC_INSTALL_DIR}/bin:${sycl_compiler_root}:$ENV{PATH}" # env PATH is for compiler to find ld
+ # `$ENV{PATH}` is for compiler to find `ld`.
+ "PATH=${OCLOC_INSTALL_DIR}/bin:${sycl_compiler_root}:$ENV{PATH}"
${SYCL_COMPILER} $<$<CONFIG:Debug>:-g>$<$<CONFIG:RelWithDebInfo>:-g> ${sycl_compiler_flags}
DEPENDS ${cycles_oneapi_kernel_sources})
endif()
diff --git a/intern/cycles/test/CMakeLists.txt b/intern/cycles/test/CMakeLists.txt
index b126247de5f..c3ae81ed1db 100644
--- a/intern/cycles/test/CMakeLists.txt
+++ b/intern/cycles/test/CMakeLists.txt
@@ -34,6 +34,7 @@ set(SRC
render_graph_finalize_test.cpp
util_aligned_malloc_test.cpp
util_math_test.cpp
+ util_md5_test.cpp
util_path_test.cpp
util_string_test.cpp
util_task_test.cpp
diff --git a/intern/cycles/test/util_md5_test.cpp b/intern/cycles/test/util_md5_test.cpp
new file mode 100644
index 00000000000..abc147b70a1
--- /dev/null
+++ b/intern/cycles/test/util_md5_test.cpp
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: Apache-2.0
+ * Copyright 2011-2022 Blender Foundation */
+
+#include "testing/testing.h"
+
+#include "util/md5.h"
+
+CCL_NAMESPACE_BEGIN
+
+TEST(util, util_md5_string)
+{
+ /* The hash is calculated using `echo -n "Hello, World\!" | md5 | tr '[:lower:]' '[:upper:]'`. */
+ EXPECT_EQ(util_md5_string("Hello, World!"), "65A8E27D8879283831B664BD8B7F0AD4");
+}
+
+CCL_NAMESPACE_END
diff --git a/intern/cycles/util/md5.cpp b/intern/cycles/util/md5.cpp
index 1c7e6b9bf3e..3342d7a509a 100644
--- a/intern/cycles/util/md5.cpp
+++ b/intern/cycles/util/md5.cpp
@@ -347,13 +347,18 @@ void MD5Hash::finish(uint8_t digest[16])
string MD5Hash::get_hex()
{
+ constexpr char kHexDigits[] = {
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
+
uint8_t digest[16];
char buf[16 * 2 + 1];
finish(digest);
- for (int i = 0; i < 16; i++)
- sprintf(buf + i * 2, "%02X", (unsigned int)digest[i]);
+ for (int i = 0; i < 16; i++) {
+ buf[i * 2 + 0] = kHexDigits[digest[i] / 0x10];
+ buf[i * 2 + 1] = kHexDigits[digest[i] % 0x10];
+ }
buf[sizeof(buf) - 1] = '\0';
return string(buf);
diff --git a/intern/ffmpeg/tests/ffmpeg_codecs.cc b/intern/ffmpeg/tests/ffmpeg_codecs.cc
index e5c33202417..10cbe4b938b 100644
--- a/intern/ffmpeg/tests/ffmpeg_codecs.cc
+++ b/intern/ffmpeg/tests/ffmpeg_codecs.cc
@@ -40,7 +40,7 @@ bool test_acodec(const AVCodec *codec, AVSampleFormat fmt)
if (ctx) {
ctx->sample_fmt = fmt;
ctx->sample_rate = 48000;
- ctx->channel_layout = AV_CH_LAYOUT_MONO;
+ av_channel_layout_from_mask(&ctx->ch_layout, AV_CH_LAYOUT_MONO);
ctx->bit_rate = 128000;
int open = avcodec_open2(ctx, codec, NULL);
if (open >= 0) {
diff --git a/intern/ghost/intern/GHOST_ContextGLX.cpp b/intern/ghost/intern/GHOST_ContextGLX.cpp
index 93708983f37..d9f2df21ee0 100644
--- a/intern/ghost/intern/GHOST_ContextGLX.cpp
+++ b/intern/ghost/intern/GHOST_ContextGLX.cpp
@@ -140,7 +140,7 @@ GHOST_TSuccess GHOST_ContextGLX::initializeDrawingContext()
/* End Inline GLEW. */
/* -------------------------------------------------------------------- */
#else
- /* Important to initialize only glxew (_not_ GLEW),
+ /* Important to initialize only GLXEW (_not_ GLEW),
* since this breaks w/ Mesa's `swrast`, see: T46431. */
glxewInit();
#endif /* USE_GLXEW_INIT_WORKAROUND */
diff --git a/intern/ghost/intern/GHOST_ImeWin32.h b/intern/ghost/intern/GHOST_ImeWin32.h
index 85c8ed7b4bd..cb6d8a770cf 100644
--- a/intern/ghost/intern/GHOST_ImeWin32.h
+++ b/intern/ghost/intern/GHOST_ImeWin32.h
@@ -266,7 +266,7 @@ class GHOST_ImeWin32 {
* Parameters
* * window_handle [in] (HWND)
* Represents the window handle of the caller.
- * * caret_rect [in] (const gfx::Rect&)
+ * * caret_rect [in] (`const gfx::Rect&`)
* Represent the rectangle of the input caret.
* This rectangle is used for controlling the positions of IME windows.
* * complete [in] (bool)
diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp
index 5afbf5b0b5f..3a0ba5cd21a 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -101,7 +101,7 @@ static const struct GWL_RegistryHandler *gwl_registry_handler_from_interface_slo
int interface_slot);
/* -------------------------------------------------------------------- */
-/** \name Workaround Compositor Sprsific Bugs
+/** \name Workaround Compositor Specific Bugs
* \{ */
/**
@@ -4013,7 +4013,8 @@ static void gwl_seat_capability_touch_disable(GWL_Seat *seat)
}
static void seat_handle_capabilities(void *data,
- struct wl_seat *wl_seat,
+ /* Only used in an assert. */
+ [[maybe_unused]] struct wl_seat *wl_seat,
const uint32_t capabilities)
{
CLOG_INFO(LOG,
diff --git a/intern/guardedalloc/MEM_guardedalloc.h b/intern/guardedalloc/MEM_guardedalloc.h
index fdd77fb9eef..5ae33343949 100644
--- a/intern/guardedalloc/MEM_guardedalloc.h
+++ b/intern/guardedalloc/MEM_guardedalloc.h
@@ -271,7 +271,7 @@ void MEM_use_guarded_allocator(void);
template<typename T, typename... Args>
inline T *MEM_new(const char *allocation_name, Args &&...args)
{
- void *buffer = MEM_mallocN(sizeof(T), allocation_name);
+ void *buffer = MEM_mallocN_aligned(sizeof(T), alignof(T), allocation_name);
return new (buffer) T(std::forward<Args>(args)...);
}
diff --git a/intern/guardedalloc/intern/leak_detector.cc b/intern/guardedalloc/intern/leak_detector.cc
index 288d78fd206..5b565b15920 100644
--- a/intern/guardedalloc/intern/leak_detector.cc
+++ b/intern/guardedalloc/intern/leak_detector.cc
@@ -41,7 +41,7 @@ class MemLeakPrinter {
if (fail_on_memleak) {
/* There are many other ways to change the exit code to failure here:
- * - Make the destructor noexcept(false) and throw an exception.
+ * - Make the destructor `noexcept(false)` and throw an exception.
* - Call exit(EXIT_FAILURE).
* - Call terminate().
*/
diff --git a/intern/wayland_dynload/intern/wayland_dynload_client.c b/intern/wayland_dynload/intern/wayland_dynload_client.c
index 68ba5374aba..617a8878199 100644
--- a/intern/wayland_dynload/intern/wayland_dynload_client.c
+++ b/intern/wayland_dynload/intern/wayland_dynload_client.c
@@ -44,7 +44,8 @@ bool wayland_dynload_client_init(const bool verbose)
#define WAYLAND_DYNLOAD_IFACE(symbol) \
{ \
const void *symbol_val; \
- if (!(symbol_val = dynamic_library_find_with_error(lib, #symbol, paths[path_found]))) { \
+ if (!(symbol_val = dynamic_library_find_with_error( \
+ lib, #symbol, paths[path_found], verbose))) { \
return false; \
} \
memcpy(&symbol, symbol_val, sizeof(symbol)); \
@@ -54,7 +55,7 @@ bool wayland_dynload_client_init(const bool verbose)
#define WAYLAND_DYNLOAD_FN(symbol) \
if (!(wayland_dynload_client.symbol = dynamic_library_find_with_error( \
- lib, #symbol, paths[path_found]))) { \
+ lib, #symbol, paths[path_found], verbose))) { \
return false; \
}
#include "wayland_dynload_client.h"
diff --git a/intern/wayland_dynload/intern/wayland_dynload_cursor.c b/intern/wayland_dynload/intern/wayland_dynload_cursor.c
index 3d0526c7ba6..cc62a43bc01 100644
--- a/intern/wayland_dynload/intern/wayland_dynload_cursor.c
+++ b/intern/wayland_dynload/intern/wayland_dynload_cursor.c
@@ -36,7 +36,7 @@ bool wayland_dynload_cursor_init(const bool verbose)
#define WAYLAND_DYNLOAD_FN(symbol) \
if (!(wayland_dynload_cursor.symbol = dynamic_library_find_with_error( \
- lib, #symbol, paths[path_index]))) { \
+ lib, #symbol, paths[path_index], verbose))) { \
return false; \
}
#include "wayland_dynload_cursor.h"
diff --git a/intern/wayland_dynload/intern/wayland_dynload_egl.c b/intern/wayland_dynload/intern/wayland_dynload_egl.c
index cfc195c0408..d8e4dfe0dad 100644
--- a/intern/wayland_dynload/intern/wayland_dynload_egl.c
+++ b/intern/wayland_dynload/intern/wayland_dynload_egl.c
@@ -36,7 +36,7 @@ bool wayland_dynload_egl_init(const bool verbose)
#define WAYLAND_DYNLOAD_FN(symbol) \
if (!(wayland_dynload_egl.symbol = dynamic_library_find_with_error( \
- lib, #symbol, paths[path_found]))) { \
+ lib, #symbol, paths[path_found], verbose))) { \
return false; \
}
#include "wayland_dynload_egl.h"
diff --git a/intern/wayland_dynload/intern/wayland_dynload_libdecor.c b/intern/wayland_dynload/intern/wayland_dynload_libdecor.c
index d8bdd27bb27..dafd1badfda 100644
--- a/intern/wayland_dynload/intern/wayland_dynload_libdecor.c
+++ b/intern/wayland_dynload/intern/wayland_dynload_libdecor.c
@@ -36,7 +36,7 @@ bool wayland_dynload_libdecor_init(const bool verbose)
#define WAYLAND_DYNLOAD_FN(symbol) \
if (!(wayland_dynload_libdecor.symbol = dynamic_library_find_with_error( \
- lib, #symbol, paths[path_index]))) { \
+ lib, #symbol, paths[path_index], verbose))) { \
return false; \
}
#include "wayland_dynload_libdecor.h"
diff --git a/intern/wayland_dynload/intern/wayland_dynload_utils.c b/intern/wayland_dynload/intern/wayland_dynload_utils.c
index 743dac14eec..666de20c5d3 100644
--- a/intern/wayland_dynload/intern/wayland_dynload_utils.c
+++ b/intern/wayland_dynload/intern/wayland_dynload_utils.c
@@ -30,11 +30,16 @@ DynamicLibrary dynamic_library_open_array_with_error(const char **paths,
return lib;
}
-void *dynamic_library_find_with_error(DynamicLibrary lib, const char *symbol, const char *path_lib)
+void *dynamic_library_find_with_error(DynamicLibrary lib,
+ const char *symbol,
+ const char *path_lib,
+ const bool verbose)
{
void *symbol_var = dynamic_library_find(lib, symbol);
if (symbol_var == NULL) {
- fprintf(stderr, "Unable to find '%s' in '%s'.\n", symbol, path_lib);
+ if (verbose) {
+ fprintf(stderr, "Unable to find '%s' in '%s'.\n", symbol, path_lib);
+ }
}
return symbol_var;
}
diff --git a/intern/wayland_dynload/intern/wayland_dynload_utils.h b/intern/wayland_dynload/intern/wayland_dynload_utils.h
index 785f32521e4..1814879615b 100644
--- a/intern/wayland_dynload/intern/wayland_dynload_utils.h
+++ b/intern/wayland_dynload/intern/wayland_dynload_utils.h
@@ -26,4 +26,5 @@ DynamicLibrary dynamic_library_open_array_with_error(const char **paths,
/** Find a symbol, printing an error when the symbol isn't found. */
void *dynamic_library_find_with_error(DynamicLibrary lib,
const char *symbol,
- const char *path_lib);
+ const char *path_lib,
+ bool verbose);
diff --git a/release/datafiles/locale b/release/datafiles/locale
-Subproject 7be7aff5a18c550465b3f7634539ed4168af7c5
+Subproject fe221a8bc934385d9f302c46a5c7cbeacddafe3
diff --git a/release/scripts/addons b/release/scripts/addons
-Subproject eb09be71a96c4fe910fdc43373be5ec08b419d2
+Subproject 5a818af95080cccf04dfa8317f0e966bff515c6
diff --git a/release/scripts/modules/rna_manual_reference.py b/release/scripts/modules/rna_manual_reference.py
index 10925e78ef3..dfebf9132d2 100644
--- a/release/scripts/modules/rna_manual_reference.py
+++ b/release/scripts/modules/rna_manual_reference.py
@@ -58,6 +58,7 @@ url_manual_mapping = (
("bpy.types.cyclesrendersettings.preview_denoising_input_passes*", "render/cycles/render_settings/sampling.html#bpy-types-cyclesrendersettings-preview-denoising-input-passes"),
("bpy.types.cyclesrendersettings.preview_denoising_start_sample*", "render/cycles/render_settings/sampling.html#bpy-types-cyclesrendersettings-preview-denoising-start-sample"),
("bpy.types.fluiddomainsettings.sndparticle_sampling_trappedair*", "physics/fluid/type/domain/liquid/particles.html#bpy-types-fluiddomainsettings-sndparticle-sampling-trappedair"),
+ ("bpy.types.brush.automasking_boundary_edges_propagation_steps*", "sculpt_paint/sculpting/controls.html#bpy-types-brush-automasking-boundary-edges-propagation-steps"),
("bpy.types.fluiddomainsettings.sndparticle_sampling_wavecrest*", "physics/fluid/type/domain/liquid/particles.html#bpy-types-fluiddomainsettings-sndparticle-sampling-wavecrest"),
("bpy.types.lineartgpencilmodifier.use_image_boundary_trimming*", "grease_pencil/modifiers/generate/line_art.html#bpy-types-lineartgpencilmodifier-use-image-boundary-trimming"),
("bpy.types.materiallineart.use_intersection_priority_override*", "render/materials/line_art.html#bpy-types-materiallineart-use-intersection-priority-override"),
@@ -179,6 +180,7 @@ url_manual_mapping = (
("bpy.types.brushgpencilsettings.use_random_press_hue*", "grease_pencil/modes/draw/tools/draw.html#bpy-types-brushgpencilsettings-use-random-press-hue"),
("bpy.types.brushgpencilsettings.use_random_press_sat*", "grease_pencil/modes/draw/tools/draw.html#bpy-types-brushgpencilsettings-use-random-press-sat"),
("bpy.types.brushgpencilsettings.use_random_press_val*", "grease_pencil/modes/draw/tools/draw.html#bpy-types-brushgpencilsettings-use-random-press-val"),
+ ("bpy.types.brushgpencilsettings.use_settings_outline*", "grease_pencil/modes/draw/tools/draw.html#bpy-types-brushgpencilsettings-use-settings-outline"),
("bpy.types.brushgpencilsettings.use_stroke_random_uv*", "grease_pencil/modes/draw/tools/draw.html#bpy-types-brushgpencilsettings-use-stroke-random-uv"),
("bpy.types.cyclesmaterialsettings.homogeneous_volume*", "render/cycles/material_settings.html#bpy-types-cyclesmaterialsettings-homogeneous-volume"),
("bpy.types.cyclesobjectsettings.is_caustics_receiver*", "render/cycles/object_settings/object_data.html#bpy-types-cyclesobjectsettings-is-caustics-receiver"),
@@ -203,12 +205,14 @@ url_manual_mapping = (
("bpy.types.materialgpencilstyle.use_fill_texture_mix*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-use-fill-texture-mix"),
("bpy.types.rendersettings_simplify_gpencil_shader_fx*", "render/cycles/render_settings/simplify.html#bpy-types-rendersettings-simplify-gpencil-shader-fx"),
("bpy.types.rendersettings_simplify_gpencil_view_fill*", "render/cycles/render_settings/simplify.html#bpy-types-rendersettings-simplify-gpencil-view-fill"),
+ ("bpy.types.sculpt.use_automasking_boundary_face_sets*", "sculpt_paint/sculpting/controls.html#bpy-types-sculpt-use-automasking-boundary-face-sets"),
("bpy.types.sequencertoolsettings.snap_to_hold_offset*", "video_editing/edit/montage/editing.html#bpy-types-sequencertoolsettings-snap-to-hold-offset"),
("bpy.types.toolsettings.use_mesh_automerge_and_split*", "modeling/meshes/tools/tool_settings.html#bpy-types-toolsettings-use-mesh-automerge-and-split"),
("bpy.ops.scene.view_layer_remove_unused_lightgroups*", "render/layers/passes.html#bpy-ops-scene-view-layer-remove-unused-lightgroups"),
("bpy.types.animvizmotionpaths.show_keyframe_numbers*", "animation/motion_paths.html#bpy-types-animvizmotionpaths-show-keyframe-numbers"),
("bpy.types.brush.cloth_constraint_softbody_strength*", "sculpt_paint/sculpting/tools/cloth.html#bpy-types-brush-cloth-constraint-softbody-strength"),
("bpy.types.brush.elastic_deform_volume_preservation*", "sculpt_paint/sculpting/tools/elastic_deform.html#bpy-types-brush-elastic-deform-volume-preservation"),
+ ("bpy.types.brush.use_automasking_boundary_face_sets*", "sculpt_paint/sculpting/tool_settings/brush_settings.html#bpy-types-brush-use-automasking-boundary-face-sets"),
("bpy.types.brushcurvessculptsettings.minimum_length*", "sculpt_paint/curves_sculpting/tools/grow_shrink_curves.html#bpy-types-brushcurvessculptsettings-minimum-length"),
("bpy.types.brushgpencilsettings.fill_simplify_level*", "grease_pencil/modes/draw/tools/fill.html#bpy-types-brushgpencilsettings-fill-simplify-level"),
("bpy.types.brushgpencilsettings.random_value_factor*", "grease_pencil/modes/draw/tools/draw.html#bpy-types-brushgpencilsettings-random-value-factor"),
@@ -241,6 +245,7 @@ url_manual_mapping = (
("bpy.types.spacespreadsheet.geometry_component_type*", "editors/spreadsheet.html#bpy-types-spacespreadsheet-geometry-component-type"),
("bpy.types.toolsettings.use_gpencil_weight_data_add*", "grease_pencil/modes/draw/introduction.html#bpy-types-toolsettings-use-gpencil-weight-data-add"),
("bpy.types.view3doverlay.texture_paint_mode_opacity*", "editors/3dview/display/overlays.html#bpy-types-view3doverlay-texture-paint-mode-opacity"),
+ ("bpy.ops.mesh.customdata_bevel_weight_vertex_clear*", "modeling/meshes/properties/custom_data.html#bpy-ops-mesh-customdata-bevel-weight-vertex-clear"),
("bpy.ops.mesh.customdata_custom_splitnormals_clear*", "modeling/meshes/properties/custom_data.html#bpy-ops-mesh-customdata-custom-splitnormals-clear"),
("bpy.types.bakesettings.use_pass_ambient_occlusion*", "render/cycles/baking.html#bpy-types-bakesettings-use-pass-ambient-occlusion"),
("bpy.types.brush.surface_smooth_shape_preservation*", "sculpt_paint/sculpting/tools/smooth.html#bpy-types-brush-surface-smooth-shape-preservation"),
@@ -344,9 +349,12 @@ url_manual_mapping = (
("bpy.types.toolsettings.use_snap_uv_grid_absolute*", "editors/uv/controls/snapping.html#bpy-types-toolsettings-use-snap-uv-grid-absolute"),
("bpy.types.toolsettings.use_transform_data_origin*", "scene_layout/object/tools/tool_settings.html#bpy-types-toolsettings-use-transform-data-origin"),
("bpy.types.view3doverlay.sculpt_mode_mask_opacity*", "sculpt_paint/sculpting/editing/mask.html#bpy-types-view3doverlay-sculpt-mode-mask-opacity"),
+ ("bpy.ops.mesh.customdata_bevel_weight_edge_clear*", "modeling/meshes/properties/custom_data.html#bpy-ops-mesh-customdata-bevel-weight-edge-clear"),
+ ("bpy.ops.mesh.customdata_bevel_weight_vertex_add*", "modeling/meshes/properties/custom_data.html#bpy-ops-mesh-customdata-bevel-weight-vertex-add"),
("bpy.ops.mesh.customdata_custom_splitnormals_add*", "modeling/meshes/properties/custom_data.html#bpy-ops-mesh-customdata-custom-splitnormals-add"),
("bpy.ops.outliner.collection_indirect_only_clear*", "render/layers/introduction.html#bpy-ops-outliner-collection-indirect-only-clear"),
("bpy.types.animvizmotionpaths.show_frame_numbers*", "animation/motion_paths.html#bpy-types-animvizmotionpaths-show-frame-numbers"),
+ ("bpy.types.brushgpencilsettings.fill_extend_mode*", "grease_pencil/modes/draw/tools/fill.html#bpy-types-brushgpencilsettings-fill-extend-mode"),
("bpy.types.brushgpencilsettings.pen_smooth_steps*", "grease_pencil/modes/draw/tools/draw.html#bpy-types-brushgpencilsettings-pen-smooth-steps"),
("bpy.types.brushgpencilsettings.show_fill_extend*", "grease_pencil/modes/draw/tools/fill.html#bpy-types-brushgpencilsettings-show-fill-extend"),
("bpy.types.cycleslightsettings.is_caustics_light*", "render/cycles/light_settings.html#bpy-types-cycleslightsettings-is-caustics-light"),
@@ -384,6 +392,7 @@ url_manual_mapping = (
("bpy.types.movietrackingplanetrack.image_opacity*", "movie_clip/tracking/clip/sidebar/track/plane_track.html#bpy-types-movietrackingplanetrack-image-opacity"),
("bpy.types.particlesettings.use_parent_particles*", "physics/particles/emitter/render.html#bpy-types-particlesettings-use-parent-particles"),
("bpy.types.rigidbodyconstraint.solver_iterations*", "physics/rigid_body/constraints/introduction.html#bpy-types-rigidbodyconstraint-solver-iterations"),
+ ("bpy.types.sculpt.use_automasking_boundary_edges*", "sculpt_paint/sculpting/controls.html#bpy-types-sculpt-use-automasking-boundary-edges"),
("bpy.types.sequenceeditor.use_overlay_frame_lock*", "editors/video_sequencer/preview/sidebar.html#bpy-types-sequenceeditor-use-overlay-frame-lock"),
("bpy.types.sequencerpreviewoverlay.show_metadata*", "editors/video_sequencer/preview/display/overlays.html#bpy-types-sequencerpreviewoverlay-show-metadata"),
("bpy.types.sequencertimelineoverlay.show_fcurves*", "editors/video_sequencer/sequencer/display.html#bpy-types-sequencertimelineoverlay-show-fcurves"),
@@ -398,6 +407,7 @@ url_manual_mapping = (
("bpy.types.viewlayer.use_pass_cryptomatte_object*", "render/layers/passes.html#bpy-types-viewlayer-use-pass-cryptomatte-object"),
("bpy.ops.armature.rigify_apply_selection_colors*", "addons/rigging/rigify/metarigs.html#bpy-ops-armature-rigify-apply-selection-colors"),
("bpy.ops.ed.lib_id_generate_preview_from_object*", "editors/asset_browser.html#bpy-ops-ed-lib-id-generate-preview-from-object"),
+ ("bpy.types.brush.use_automasking_boundary_edges*", "sculpt_paint/sculpting/tool_settings/brush_settings.html#bpy-types-brush-use-automasking-boundary-edges"),
("bpy.types.brushcurvessculptsettings.add_amount*", "sculpt_paint/curves_sculpting/tools/add_curves.html#bpy-types-brushcurvessculptsettings-add-amount"),
("bpy.types.brushgpencilsettings.fill_layer_mode*", "grease_pencil/modes/draw/tools/fill.html#bpy-types-brushgpencilsettings-fill-layer-mode"),
("bpy.types.brushgpencilsettings.random_strength*", "grease_pencil/modes/draw/tools/draw.html#bpy-types-brushgpencilsettings-random-strength"),
@@ -444,6 +454,7 @@ url_manual_mapping = (
("bpy.types.toolsettings.use_snap_align_rotation*", "editors/3dview/controls/snapping.html#bpy-types-toolsettings-use-snap-align-rotation"),
("bpy.types.toolsettings.use_snap_to_same_target*", "editors/3dview/controls/snapping.html#bpy-types-toolsettings-use-snap-to-same-target"),
("bpy.types.viewlayer.use_pass_cryptomatte_asset*", "render/layers/passes.html#bpy-types-viewlayer-use-pass-cryptomatte-asset"),
+ ("bpy.ops.mesh.customdata_bevel_weight_edge_add*", "modeling/meshes/properties/custom_data.html#bpy-ops-mesh-customdata-bevel-weight-edge-add"),
("bpy.ops.outliner.collection_indirect_only_set*", "render/layers/introduction.html#bpy-ops-outliner-collection-indirect-only-set"),
("bpy.ops.scene.freestyle_geometry_modifier_add*", "render/freestyle/view_layer/line_style/geometry.html#bpy-ops-scene-freestyle-geometry-modifier-add"),
("bpy.ops.scene.view_layer_add_used_lightgroups*", "render/layers/passes.html#bpy-ops-scene-view-layer-add-used-lightgroups"),
@@ -574,6 +585,8 @@ url_manual_mapping = (
("bpy.types.toolsettings.uv_sticky_select_mode*", "editors/uv/selecting.html#bpy-types-toolsettings-uv-sticky-select-mode"),
("bpy.types.volumedisplay.interpolation_method*", "modeling/volumes/properties.html#bpy-types-volumedisplay-interpolation-method"),
("bpy.ops.geometry.color_attribute_render_set*", "modeling/meshes/properties/object_data.html#bpy-ops-geometry-color-attribute-render-set"),
+ ("bpy.ops.mesh.customdata_crease_vertex_clear*", "modeling/meshes/properties/custom_data.html#bpy-ops-mesh-customdata-crease-vertex-clear"),
+ ("bpy.types.brush.html#bpy.types.brush.jitter*", "sculpt_paint/brush/stroke.html#bpy-types-brush-html-bpy-types-brush-jitter"),
("bpy.types.brushgpencilsettings.angle_factor*", "grease_pencil/modes/draw/tools/draw.html#bpy-types-brushgpencilsettings-angle-factor"),
("bpy.types.brushgpencilsettings.pen_strength*", "grease_pencil/modes/draw/tools/erase.html#bpy-types-brushgpencilsettings-pen-strength"),
("bpy.types.clothsettings.use_pressure_volume*", "physics/cloth/settings/physical_properties.html#bpy-types-clothsettings-use-pressure-volume"),
@@ -600,6 +613,7 @@ url_manual_mapping = (
("bpy.types.geometrynodeinputmeshedgevertices*", "modeling/geometry_nodes/mesh/edge_vertices.html#bpy-types-geometrynodeinputmeshedgevertices"),
("bpy.types.geometrynodeinputmeshfaceisplanar*", "modeling/geometry_nodes/mesh/face_is_planar.html#bpy-types-geometrynodeinputmeshfaceisplanar"),
("bpy.types.geometrynodeinputsplineresolution*", "modeling/geometry_nodes/curve/spline_resolution.html#bpy-types-geometrynodeinputsplineresolution"),
+ ("bpy.types.geometrynodemeshfacesetboundaries*", "modeling/geometry_nodes/mesh/face_set_boundaries.html#bpy-types-geometrynodemeshfacesetboundaries"),
("bpy.types.greasepencil.curve_edit_threshold*", "grease_pencil/modes/edit/curve_editing.html#bpy-types-greasepencil-curve-edit-threshold"),
("bpy.types.lineartgpencilmodifier.use_crease*", "grease_pencil/modifiers/generate/line_art.html#bpy-types-lineartgpencilmodifier-use-crease"),
("bpy.types.lineartgpencilmodifier.use_shadow*", "grease_pencil/modifiers/generate/line_art.html#bpy-types-lineartgpencilmodifier-use-shadow"),
@@ -678,13 +692,13 @@ url_manual_mapping = (
("bpy.types.lineartgpencilmodifier.use_cache*", "grease_pencil/modifiers/generate/line_art.html#bpy-types-lineartgpencilmodifier-use-cache"),
("bpy.types.lineartgpencilmodifier.use_loose*", "grease_pencil/modifiers/generate/line_art.html#bpy-types-lineartgpencilmodifier-use-loose"),
("bpy.types.materialgpencilstyle.show_stroke*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-show-stroke"),
- ("bpy.types.mesh.use_customdata_vertex_bevel*", "modeling/meshes/properties/custom_data.html#bpy-types-mesh-use-customdata-vertex-bevel"),
("bpy.types.movietrackingcamera.focal_length*", "movie_clip/tracking/clip/sidebar/track/camera.html#bpy-types-movietrackingcamera-focal-length"),
("bpy.types.movietrackingcamera.pixel_aspect*", "movie_clip/tracking/clip/sidebar/track/camera.html#bpy-types-movietrackingcamera-pixel-aspect"),
("bpy.types.movietrackingcamera.sensor_width*", "movie_clip/tracking/clip/sidebar/track/camera.html#bpy-types-movietrackingcamera-sensor-width"),
("bpy.types.posebone.use_ik_rotation_control*", "animation/armatures/posing/bone_constraints/inverse_kinematics/introduction.html#bpy-types-posebone-use-ik-rotation-control"),
("bpy.types.rendersettings.use_bake_multires*", "render/cycles/baking.html#bpy-types-rendersettings-use-bake-multires"),
("bpy.types.scenegpencil.antialias_threshold*", "render/cycles/render_settings/grease_pencil.html#bpy-types-scenegpencil-antialias-threshold"),
+ ("bpy.types.sculpt.use_automasking_face_sets*", "sculpt_paint/sculpting/controls.html#bpy-types-sculpt-use-automasking-face-sets"),
("bpy.types.spaceclipeditor.show_mask_spline*", "editors/clip/display/mask_display.html#bpy-types-spaceclipeditor-show-mask-spline"),
("bpy.types.spaceclipeditor.show_red_channel*", "editors/clip/display/clip_display.html#bpy-types-spaceclipeditor-show-red-channel"),
("bpy.types.spaceclipeditor.use_mute_footage*", "editors/clip/display/clip_display.html#bpy-types-spaceclipeditor-use-mute-footage"),
@@ -698,6 +712,8 @@ url_manual_mapping = (
("bpy.ops.constraint.disable_keep_transform*", "animation/constraints/interface/common.html#bpy-ops-constraint-disable-keep-transform"),
("bpy.ops.curves.convert_to_particle_system*", "sculpt_paint/curves_sculpting/introduction.html#bpy-ops-curves-convert-to-particle-system"),
("bpy.ops.gpencil.stroke_reset_vertex_color*", "grease_pencil/modes/vertex_paint/editing.html#bpy-ops-gpencil-stroke-reset-vertex-color"),
+ ("bpy.ops.mesh.customdata_crease_edge_clear*", "modeling/meshes/properties/custom_data.html#bpy-ops-mesh-customdata-crease-edge-clear"),
+ ("bpy.ops.mesh.customdata_crease_vertex_add*", "modeling/meshes/properties/custom_data.html#bpy-ops-mesh-customdata-crease-vertex-add"),
("bpy.ops.object.modifier_apply_as_shapekey*", "modeling/modifiers/introduction.html#bpy-ops-object-modifier-apply-as-shapekey"),
("bpy.ops.object.vertex_group_normalize_all*", "sculpt_paint/weight_paint/editing.html#bpy-ops-object-vertex-group-normalize-all"),
("bpy.ops.outliner.collection_color_tag_set*", "editors/outliner/editing.html#bpy-ops-outliner-collection-color-tag-set"),
@@ -709,6 +725,7 @@ url_manual_mapping = (
("bpy.types.animvizmotionpaths.frame_before*", "animation/motion_paths.html#bpy-types-animvizmotionpaths-frame-before"),
("bpy.types.brush.disconnected_distance_max*", "sculpt_paint/sculpting/tools/pose.html#bpy-types-brush-disconnected-distance-max"),
("bpy.types.brush.surface_smooth_iterations*", "sculpt_paint/sculpting/tools/smooth.html#bpy-types-brush-surface-smooth-iterations"),
+ ("bpy.types.brush.use_automasking_face_sets*", "sculpt_paint/sculpting/tool_settings/brush_settings.html#bpy-types-brush-use-automasking-face-sets"),
("bpy.types.brushgpencilsettings.pen_jitter*", "grease_pencil/modes/draw/tools/draw.html#bpy-types-brushgpencilsettings-pen-jitter"),
("bpy.types.brushgpencilsettings.show_lasso*", "grease_pencil/modes/draw/tools/draw.html#bpy-types-brushgpencilsettings-show-lasso"),
("bpy.types.compositornodeconvertcolorspace*", "compositing/types/converter/color_space.html#bpy-types-compositornodeconvertcolorspace"),
@@ -753,7 +770,6 @@ url_manual_mapping = (
("bpy.types.materialgpencilstyle.fill_style*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-fill-style"),
("bpy.types.materialgpencilstyle.mix_factor*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-mix-factor"),
("bpy.types.materialgpencilstyle.pass_index*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-pass-index"),
- ("bpy.types.mesh.use_customdata_edge_crease*", "modeling/meshes/properties/custom_data.html#bpy-types-mesh-use-customdata-edge-crease"),
("bpy.types.nodesocketinterface.description*", "interface/controls/nodes/groups.html#bpy-types-nodesocketinterface-description"),
("bpy.types.rendersettings.dither_intensity*", "render/output/properties/post_processing.html#bpy-types-rendersettings-dither-intensity"),
("bpy.types.rendersettings.film_transparent*", "render/cycles/render_settings/film.html#bpy-types-rendersettings-film-transparent"),
@@ -761,6 +777,7 @@ url_manual_mapping = (
("bpy.types.rendersettings.use_render_cache*", "render/output/properties/output.html#bpy-types-rendersettings-use-render-cache"),
("bpy.types.rendersettings.use_single_layer*", "render/layers/view_layer.html#bpy-types-rendersettings-use-single-layer"),
("bpy.types.sceneeevee.use_taa_reprojection*", "render/eevee/render_settings/sampling.html#bpy-types-sceneeevee-use-taa-reprojection"),
+ ("bpy.types.sculpt.use_automasking_topology*", "sculpt_paint/sculpting/controls.html#bpy-types-sculpt-use-automasking-topology"),
("bpy.types.spaceclipeditor.cursor_location*", "editors/clip/sidebar.html#bpy-types-spaceclipeditor-cursor-location"),
("bpy.types.spacefilebrowser.recent_folders*", "editors/file_browser.html#bpy-types-spacefilebrowser-recent-folders"),
("bpy.types.spacefilebrowser.system_folders*", "editors/file_browser.html#bpy-types-spacefilebrowser-system-folders"),
@@ -789,10 +806,11 @@ url_manual_mapping = (
("bpy.types.animvizmotionpaths.frame_start*", "animation/motion_paths.html#bpy-types-animvizmotionpaths-frame-start"),
("bpy.types.bakesettings.use_pass_indirect*", "render/cycles/baking.html#bpy-types-bakesettings-use-pass-indirect"),
("bpy.types.brush.cloth_force_falloff_type*", "sculpt_paint/sculpting/tools/cloth.html#bpy-types-brush-cloth-force-falloff-type"),
+ ("bpy.types.brush.use_automasking_topology*", "sculpt_paint/sculpting/tool_settings/brush_settings.html#bpy-types-brush-use-automasking-topology"),
("bpy.types.brushgpencilsettings.caps_type*", "grease_pencil/modes/draw/tools/draw.html#bpy-types-brushgpencilsettings-caps-type"),
- ("bpy.types.brushgpencilsettings.fill_leak*", "grease_pencil/modes/draw/tools/fill.html#bpy-types-brushgpencilsettings-fill-leak"),
("bpy.types.brushgpencilsettings.show_fill*", "grease_pencil/modes/draw/tools/fill.html#bpy-types-brushgpencilsettings-show-fill"),
("bpy.types.brushgpencilsettings.uv_random*", "grease_pencil/modes/draw/tools/draw.html#bpy-types-brushgpencilsettings-uv-random"),
+ ("bpy.types.brushtextureslot.mask_map_mode*", "sculpt_paint/brush/texture_mask.html#bpy-types-brushtextureslot-mask-map-mode"),
("bpy.types.clothsettings.internal_tension*", "physics/cloth/settings/physical_properties.html#bpy-types-clothsettings-internal-tension"),
("bpy.types.colormanagedviewsettings.gamma*", "render/color_management.html#bpy-types-colormanagedviewsettings-gamma"),
("bpy.types.compositornodeplanetrackdeform*", "compositing/types/distort/plane_track_deform.html#bpy-types-compositornodeplanetrackdeform"),
@@ -801,7 +819,7 @@ url_manual_mapping = (
("bpy.types.editbone.bbone_handle_type_end*", "animation/armatures/bones/properties/bendy_bones.html#bpy-types-editbone-bbone-handle-type-end"),
("bpy.types.editbone.use_endroll_as_inroll*", "animation/armatures/bones/properties/bendy_bones.html#bpy-types-editbone-use-endroll-as-inroll"),
("bpy.types.fieldsettings.guide_kink_shape*", "physics/forces/force_fields/types/curve_guide.html#bpy-types-fieldsettings-guide-kink-shape"),
- ("bpy.types.fieldsettings.use_max_distance*", "physics/forces/force_fields/types/curve_guide.html#bpy-types-fieldsettings-use-max-distance"),
+ ("bpy.types.fieldsettings.use_max_distance*", "physics/forces/force_fields/introduction.html#bpy-types-fieldsettings-use-max-distance"),
("bpy.types.fieldsettings.use_min_distance*", "physics/forces/force_fields/introduction.html#bpy-types-fieldsettings-use-min-distance"),
("bpy.types.fileselectparams.filter_search*", "editors/file_browser.html#bpy-types-fileselectparams-filter-search"),
("bpy.types.fluiddomainsettings.cache_type*", "physics/fluid/type/domain/cache.html#bpy-types-fluiddomainsettings-cache-type"),
@@ -837,7 +855,6 @@ url_manual_mapping = (
("bpy.types.material.use_screen_refraction*", "render/eevee/materials/settings.html#bpy-types-material-use-screen-refraction"),
("bpy.types.materialgpencilstyle.mix_color*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-mix-color"),
("bpy.types.materialgpencilstyle.show_fill*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-show-fill"),
- ("bpy.types.mesh.use_customdata_edge_bevel*", "modeling/meshes/properties/custom_data.html#bpy-types-mesh-use-customdata-edge-bevel"),
("bpy.types.mesh.use_mirror_vertex_group_x*", "sculpt_paint/weight_paint/tool_settings/symmetry.html#bpy-types-mesh-use-mirror-vertex-group-x"),
("bpy.types.movietrackingcamera.division_k*", "movie_clip/tracking/clip/sidebar/track/camera.html#bpy-types-movietrackingcamera-division-k"),
("bpy.types.movietrackingobject.keyframe_a*", "movie_clip/tracking/clip/toolbar/solve.html#bpy-types-movietrackingobject-keyframe-a"),
@@ -858,6 +875,7 @@ url_manual_mapping = (
("bpy.types.spaceoutliner.show_mode_column*", "editors/outliner/interface.html#bpy-types-spaceoutliner-show-mode-column"),
("bpy.types.spacesequenceeditor.show_gizmo*", "editors/video_sequencer/preview/display/gizmos.html#bpy-types-spacesequenceeditor-show-gizmo"),
("bpy.types.spacetexteditor.use_match_case*", "editors/text_editor.html#bpy-types-spacetexteditor-use-match-case"),
+ ("bpy.types.spaceuveditor.pixel_round_mode*", "modeling/meshes/uv/editing.html#bpy-types-spaceuveditor-pixel-round-mode"),
("bpy.types.spaceview3d.show_object_select*", "editors/3dview/display/visibility.html#bpy-types-spaceview3d-show-object-select"),
("bpy.types.toolsettings.use_lock_relative*", "sculpt_paint/weight_paint/tool_settings/options.html#bpy-types-toolsettings-use-lock-relative"),
("bpy.types.vertexpaint.use_group_restrict*", "sculpt_paint/weight_paint/tool_settings/options.html#bpy-types-vertexpaint-use-group-restrict"),
@@ -865,6 +883,7 @@ url_manual_mapping = (
("bpy.types.windowmanager.asset_path_dummy*", "editors/asset_browser.html#bpy-types-windowmanager-asset-path-dummy"),
("bpy.ops.armature.rigify_add_bone_groups*", "addons/rigging/rigify/metarigs.html#bpy-ops-armature-rigify-add-bone-groups"),
("bpy.ops.geometry.color_attribute_remove*", "modeling/meshes/properties/object_data.html#bpy-ops-geometry-color-attribute-remove"),
+ ("bpy.ops.mesh.customdata_crease_edge_add*", "modeling/meshes/properties/custom_data.html#bpy-ops-mesh-customdata-crease-edge-add"),
("bpy.ops.object.assign_property_defaults*", "animation/armatures/posing/editing/apply.html#bpy-ops-object-assign-property-defaults"),
("bpy.ops.object.vertex_group_limit_total*", "sculpt_paint/weight_paint/editing.html#bpy-ops-object-vertex-group-limit-total"),
("bpy.ops.object.vertex_group_remove_from*", "modeling/meshes/properties/vertex_groups/vertex_groups.html#bpy-ops-object-vertex-group-remove-from"),
@@ -872,6 +891,7 @@ url_manual_mapping = (
("bpy.ops.outliner.collection_hide_inside*", "editors/outliner/editing.html#bpy-ops-outliner-collection-hide-inside"),
("bpy.ops.outliner.collection_holdout_set*", "render/layers/introduction.html#bpy-ops-outliner-collection-holdout-set"),
("bpy.ops.outliner.collection_show_inside*", "editors/outliner/editing.html#bpy-ops-outliner-collection-show-inside"),
+ ("bpy.ops.poselib.pose_asset_select_bones*", "animation/armatures/posing/editing/pose_library.html#bpy-ops-poselib-pose-asset-select-bones"),
("bpy.ops.poselib.restore_previous_action*", "animation/armatures/posing/editing/pose_library.html#bpy-ops-poselib-restore-previous-action"),
("bpy.ops.preferences.reset_default_theme*", "editors/preferences/themes.html#bpy-ops-preferences-reset-default-theme"),
("bpy.ops.scene.view_layer_add_lightgroup*", "render/layers/passes.html#bpy-ops-scene-view-layer-add-lightgroup"),
@@ -885,6 +905,7 @@ url_manual_mapping = (
("bpy.types.brush.multiplane_scrape_angle*", "sculpt_paint/sculpting/tools/multiplane_scrape.html#bpy-types-brush-multiplane-scrape-angle"),
("bpy.types.brushgpencilsettings.hardness*", "grease_pencil/modes/draw/tools/draw.html#bpy-types-brushgpencilsettings-hardness"),
("bpy.types.brushgpencilsettings.use_trim*", "grease_pencil/modes/draw/tools/draw.html#bpy-types-brushgpencilsettings-use-trim"),
+ ("bpy.types.brushtextureslot.random_angle*", "sculpt_paint/brush/texture.html#bpy-types-brushtextureslot-random-angle"),
("bpy.types.clothsettings.internal_spring*", "physics/cloth/settings/physical_properties.html#bpy-types-clothsettings-internal-spring"),
("bpy.types.clothsettings.pressure_factor*", "physics/cloth/settings/physical_properties.html#bpy-types-clothsettings-pressure-factor"),
("bpy.types.colormanagedviewsettings.look*", "render/color_management.html#bpy-types-colormanagedviewsettings-look"),
@@ -920,6 +941,7 @@ url_manual_mapping = (
("bpy.types.geometrynodeinputsplinecyclic*", "modeling/geometry_nodes/curve/is_spline_cyclic.html#bpy-types-geometrynodeinputsplinecyclic"),
("bpy.types.geometrynodeinstancestopoints*", "modeling/geometry_nodes/instances/instances_to_points.html#bpy-types-geometrynodeinstancestopoints"),
("bpy.types.gpencillayer.viewlayer_render*", "grease_pencil/properties/layers.html#bpy-types-gpencillayer-viewlayer-render"),
+ ("bpy.types.imagepaint.use_normal_falloff*", "sculpt_paint/brush/falloff.html#bpy-types-imagepaint-use-normal-falloff"),
("bpy.types.layercollection.hide_viewport*", "editors/outliner/interface.html#bpy-types-layercollection-hide-viewport"),
("bpy.types.layercollection.indirect_only*", "editors/outliner/interface.html#bpy-types-layercollection-indirect-only"),
("bpy.types.material.use_backface_culling*", "render/eevee/materials/settings.html#bpy-types-material-use-backface-culling"),
@@ -941,7 +963,6 @@ url_manual_mapping = (
("bpy.types.spacesequenceeditor.view_type*", "editors/video_sequencer/introduction.html#bpy-types-spacesequenceeditor-view-type"),
("bpy.types.spacetexteditor.margin_column*", "editors/text_editor.html#bpy-types-spacetexteditor-margin-column"),
("bpy.types.spacetexteditor.use_find_wrap*", "editors/text_editor.html#bpy-types-spacetexteditor-use-find-wrap"),
- ("bpy.types.spaceuveditor.pixel_snap_mode*", "modeling/meshes/uv/editing.html#bpy-types-spaceuveditor-pixel-snap-mode"),
("bpy.types.spaceuveditor.tile_grid_shape*", "editors/uv/overlays.html#bpy-types-spaceuveditor-tile-grid-shape"),
("bpy.types.spaceuveditor.use_custom_grid*", "editors/uv/overlays.html#bpy-types-spaceuveditor-use-custom-grid"),
("bpy.types.spaceuveditor.use_live_unwrap*", "modeling/meshes/uv/editing.html#bpy-types-spaceuveditor-use-live-unwrap"),
@@ -955,7 +976,9 @@ url_manual_mapping = (
("bpy.types.vertexweightproximitymodifier*", "modeling/modifiers/modify/weight_proximity.html#bpy-types-vertexweightproximitymodifier"),
("bpy.types.view3doverlay.show_wireframes*", "editors/3dview/display/overlays.html#bpy-types-view3doverlay-show-wireframes"),
("bpy.types.view3dshading.background_type*", "editors/3dview/display/shading.html#bpy-types-view3dshading-background-type"),
+ ("bpy.types.windowmanager.poselib_flipped*", "animation/armatures/posing/editing/pose_library.html#bpy-types-windowmanager-poselib-flipped"),
("bpy.types.workspace.use_filter_by_owner*", "interface/window_system/workspaces.html#bpy-types-workspace-use-filter-by-owner"),
+ ("bpy.ops.brush.stencil_fit_image_aspect*", "sculpt_paint/brush/texture.html#bpy-ops-brush-stencil-fit-image-aspect"),
("bpy.ops.gpencil.image_to_grease_pencil*", "editors/image/editing.html#bpy-ops-gpencil-image-to-grease-pencil"),
("bpy.ops.mesh.vertices_smooth_laplacian*", "modeling/meshes/editing/vertex/laplacian_smooth.html#bpy-ops-mesh-vertices-smooth-laplacian"),
("bpy.ops.object.multires_rebuild_subdiv*", "modeling/modifiers/generate/multiresolution.html#bpy-ops-object-multires-rebuild-subdiv"),
@@ -1033,6 +1056,7 @@ url_manual_mapping = (
("bpy.types.volumedisplay.wireframe_type*", "modeling/volumes/properties.html#bpy-types-volumedisplay-wireframe-type"),
("bpy.ops.anim.channels_editable_toggle*", "editors/graph_editor/channels.html#bpy-ops-anim-channels-editable-toggle"),
("bpy.ops.anim.channels_setting_disable*", "editors/graph_editor/channels.html#bpy-ops-anim-channels-setting-disable"),
+ ("bpy.ops.brush.stencil_reset_transform*", "sculpt_paint/brush/texture.html#bpy-ops-brush-stencil-reset-transform"),
("bpy.ops.curve.normals_make_consistent*", "modeling/curves/editing/control_points.html#bpy-ops-curve-normals-make-consistent"),
("bpy.ops.curves.snap_curves_to_surface*", "sculpt_paint/curves_sculpting/introduction.html#bpy-ops-curves-snap-curves-to-surface"),
("bpy.ops.ed.lib_id_load_custom_preview*", "editors/asset_browser.html#bpy-ops-ed-lib-id-load-custom-preview"),
@@ -1061,9 +1085,11 @@ url_manual_mapping = (
("bpy.types.brush.boundary_falloff_type*", "sculpt_paint/sculpting/tools/boundary.html#bpy-types-brush-boundary-falloff-type"),
("bpy.types.brush.cursor_color_subtract*", "sculpt_paint/brush/cursor.html#bpy-types-brush-cursor-color-subtract"),
("bpy.types.brush.texture_overlay_alpha*", "sculpt_paint/brush/cursor.html#bpy-types-brush-texture-overlay-alpha"),
+ ("bpy.types.brush.use_space_attenuation*", "sculpt_paint/brush/stroke.html#bpy-types-brush-use-space-attenuation"),
("bpy.types.brushgpencilsettings.aspect*", "grease_pencil/modes/draw/tools/draw.html#bpy-types-brushgpencilsettings-aspect"),
("bpy.types.brushgpencilsettings.dilate*", "grease_pencil/modes/draw/tools/fill.html#bpy-types-brushgpencilsettings-dilate"),
("bpy.types.brushgpencilsettings.random*", "grease_pencil/modes/draw/tools/draw.html#bpy-types-brushgpencilsettings-random"),
+ ("bpy.types.brushtextureslot.use_random*", "sculpt_paint/brush/texture.html#bpy-types-brushtextureslot-use-random"),
("bpy.types.clothsettings.target_volume*", "physics/cloth/settings/physical_properties.html#bpy-types-clothsettings-target-volume"),
("bpy.types.colormanageddisplaysettings*", "render/color_management.html#bpy-types-colormanageddisplaysettings"),
("bpy.types.colorramp.hue_interpolation*", "interface/controls/templates/color_ramp.html#bpy-types-colorramp-hue-interpolation"),
@@ -1076,7 +1102,7 @@ url_manual_mapping = (
("bpy.types.editbone.use_local_location*", "animation/armatures/bones/properties/relations.html#bpy-types-editbone-use-local-location"),
("bpy.types.ffmpegsettings.audio_volume*", "render/output/properties/output.html#bpy-types-ffmpegsettings-audio-volume"),
("bpy.types.ffmpegsettings.max_b_frames*", "render/output/properties/output.html#bpy-types-ffmpegsettings-max-b-frames"),
- ("bpy.types.fieldsettings.falloff_power*", "physics/forces/force_fields/types/curve_guide.html#bpy-types-fieldsettings-falloff-power"),
+ ("bpy.types.fieldsettings.falloff_power*", "physics/forces/force_fields/introduction.html#bpy-types-fieldsettings-falloff-power"),
("bpy.types.fieldsettings.guide_minimum*", "physics/forces/force_fields/types/curve_guide.html#bpy-types-fieldsettings-guide-minimum"),
("bpy.types.fileselectparams.use_filter*", "editors/file_browser.html#bpy-types-fileselectparams-use-filter"),
("bpy.types.fluiddomainsettings.gravity*", "physics/fluid/type/domain/settings.html#bpy-types-fluiddomainsettings-gravity"),
@@ -1140,6 +1166,7 @@ url_manual_mapping = (
("bpy.ops.mesh.normals_make_consistent*", "modeling/meshes/editing/mesh/normals.html#bpy-ops-mesh-normals-make-consistent"),
("bpy.ops.mesh.offset_edge_loops_slide*", "modeling/meshes/editing/edge/offset_edge_slide.html#bpy-ops-mesh-offset-edge-loops-slide"),
("bpy.ops.mesh.primitive_uv_sphere_add*", "modeling/meshes/primitives.html#bpy-ops-mesh-primitive-uv-sphere-add"),
+ ("bpy.ops.object.curves_empty_hair_add*", "modeling/curves/primitives.html#bpy-ops-object-curves-empty-hair-add"),
("bpy.ops.object.duplicate_move_linked*", "scene_layout/object/editing/duplicate_linked.html#bpy-ops-object-duplicate-move-linked"),
("bpy.ops.object.make_override_library*", "files/linked_libraries/library_overrides.html#bpy-ops-object-make-override-library"),
("bpy.ops.object.parent_no_inverse_set*", "scene_layout/object/editing/parent.html#bpy-ops-object-parent-no-inverse-set"),
@@ -1157,10 +1184,12 @@ url_manual_mapping = (
("bpy.types.brush.boundary_deform_type*", "sculpt_paint/sculpting/tools/boundary.html#bpy-types-brush-boundary-deform-type"),
("bpy.types.brush.cursor_overlay_alpha*", "sculpt_paint/brush/cursor.html#bpy-types-brush-cursor-overlay-alpha"),
("bpy.types.brush.normal_radius_factor*", "sculpt_paint/sculpting/tool_settings/brush_settings.html#bpy-types-brush-normal-radius-factor"),
- ("bpy.types.brush.smooth_stroke_factor*", "grease_pencil/modes/draw/tools/draw.html#bpy-types-brush-smooth-stroke-factor"),
- ("bpy.types.brush.smooth_stroke_radius*", "grease_pencil/modes/draw/tools/draw.html#bpy-types-brush-smooth-stroke-radius"),
+ ("bpy.types.brush.smooth_stroke_factor*", "sculpt_paint/brush/stroke.html#bpy-types-brush-smooth-stroke-factor"),
+ ("bpy.types.brush.smooth_stroke_radius*", "sculpt_paint/brush/stroke.html#bpy-types-brush-smooth-stroke-radius"),
("bpy.types.brush.topology_rake_factor*", "sculpt_paint/sculpting/tool_settings/dyntopo.html#bpy-types-brush-topology-rake-factor"),
("bpy.types.brush.use_pose_ik_anchored*", "sculpt_paint/sculpting/tools/pose.html#bpy-types-brush-use-pose-ik-anchored"),
+ ("bpy.types.brush.use_pressure_masking*", "sculpt_paint/brush/texture_mask.html#bpy-types-brush-use-pressure-masking"),
+ ("bpy.types.brush.use_pressure_spacing*", "sculpt_paint/brush/stroke.html#bpy-types-brush-use-pressure-spacing"),
("bpy.types.brushgpencilsettings.angle*", "grease_pencil/modes/draw/tools/draw.html#bpy-types-brushgpencilsettings-angle"),
("bpy.types.clothsettings.use_pressure*", "physics/cloth/settings/physical_properties.html#bpy-types-clothsettings-use-pressure"),
("bpy.types.compositornodeantialiasing*", "compositing/types/filter/anti_aliasing.html#bpy-types-compositornodeantialiasing"),
@@ -1170,7 +1199,7 @@ url_manual_mapping = (
("bpy.types.compositornodekeyingscreen*", "compositing/types/matte/keying_screen.html#bpy-types-compositornodekeyingscreen"),
("bpy.types.dynamicpaintcanvassettings*", "physics/dynamic_paint/canvas.html#bpy-types-dynamicpaintcanvassettings"),
("bpy.types.ffmpegsettings.audio_codec*", "render/output/properties/output.html#bpy-types-ffmpegsettings-audio-codec"),
- ("bpy.types.fieldsettings.distance_max*", "physics/forces/force_fields/types/curve_guide.html#bpy-types-fieldsettings-distance-max"),
+ ("bpy.types.fieldsettings.distance_max*", "physics/forces/force_fields/introduction.html#bpy-types-fieldsettings-distance-max"),
("bpy.types.fieldsettings.distance_min*", "physics/forces/force_fields/introduction.html#bpy-types-fieldsettings-distance-min"),
("bpy.types.fieldsettings.falloff_type*", "physics/forces/force_fields/introduction.html#bpy-types-fieldsettings-falloff-type"),
("bpy.types.fileselectparams.directory*", "editors/file_browser.html#bpy-types-fileselectparams-directory"),
@@ -1198,7 +1227,7 @@ url_manual_mapping = (
("bpy.types.object.display_bounds_type*", "scene_layout/object/properties/display.html#bpy-types-object-display-bounds-type"),
("bpy.types.object.show_only_shape_key*", "animation/shape_keys/shape_keys_panel.html#bpy-types-object-show-only-shape-key"),
("bpy.types.regionview3d.lock_rotation*", "editors/3dview/navigate/views.html#bpy-types-regionview3d-lock-rotation"),
- ("bpy.types.rendersettings.hair_subdiv*", "render/cycles/render_settings/hair.html#bpy-types-rendersettings-hair-subdiv"),
+ ("bpy.types.rendersettings.hair_subdiv*", "render/eevee/render_settings/hair.html#bpy-types-rendersettings-hair-subdiv"),
("bpy.types.scene.audio_distance_model*", "scene_layout/scene/properties.html#bpy-types-scene-audio-distance-model"),
("bpy.types.scene.audio_doppler_factor*", "scene_layout/scene/properties.html#bpy-types-scene-audio-doppler-factor"),
("bpy.types.sequencetransform.rotation*", "editors/video_sequencer/sequencer/sidebar/strip.html#bpy-types-sequencetransform-rotation"),
@@ -1251,11 +1280,15 @@ url_manual_mapping = (
("bpy.types.bakesettings.normal_space*", "render/cycles/baking.html#bpy-types-bakesettings-normal-space"),
("bpy.types.brush.crease_pinch_factor*", "sculpt_paint/sculpting/tools/snake_hook.html#bpy-types-brush-crease-pinch-factor"),
("bpy.types.brush.elastic_deform_type*", "sculpt_paint/sculpting/tools/elastic_deform.html#bpy-types-brush-elastic-deform-type"),
+ ("bpy.types.brush.texture_sample_bias*", "sculpt_paint/brush/texture.html#bpy-types-brush-texture-sample-bias"),
("bpy.types.brush.use_cloth_collision*", "sculpt_paint/sculpting/tools/cloth.html#bpy-types-brush-use-cloth-collision"),
("bpy.types.brush.use_grab_silhouette*", "sculpt_paint/sculpting/tools/grab.html#bpy-types-brush-use-grab-silhouette"),
+ ("bpy.types.brush.use_original_normal*", "sculpt_paint/sculpting/tool_settings/brush_settings.html#bpy-types-brush-use-original-normal"),
+ ("bpy.types.brush.use_pressure_jitter*", "sculpt_paint/brush/stroke.html#bpy-types-brush-use-pressure-jitter"),
("bpy.types.brush.use_primary_overlay*", "sculpt_paint/brush/cursor.html#bpy-types-brush-use-primary-overlay"),
("bpy.types.brushcurvessculptsettings*", "sculpt_paint/curves_sculpting/index.html#bpy-types-brushcurvessculptsettings"),
("bpy.types.brushtextureslot.map_mode*", "sculpt_paint/brush/texture.html#bpy-types-brushtextureslot-map-mode"),
+ ("bpy.types.brushtextureslot.use_rake*", "sculpt_paint/brush/texture.html#bpy-types-brushtextureslot-use-rake"),
("bpy.types.camera.passepartout_alpha*", "render/cameras.html#bpy-types-camera-passepartout-alpha"),
("bpy.types.colorrampelement.position*", "interface/controls/templates/color_ramp.html#bpy-types-colorrampelement-position"),
("bpy.types.compositornodechromamatte*", "compositing/types/matte/chroma_key.html#bpy-types-compositornodechromamatte"),
@@ -1370,6 +1403,7 @@ url_manual_mapping = (
("bpy.types.brush.smooth_deform_type*", "sculpt_paint/sculpting/tools/smooth.html#bpy-types-brush-smooth-deform-type"),
("bpy.types.brush.use_connected_only*", "sculpt_paint/sculpting/tools/pose.html#bpy-types-brush-use-connected-only"),
("bpy.types.brush.use_cursor_overlay*", "sculpt_paint/brush/cursor.html#bpy-types-brush-use-cursor-overlay"),
+ ("bpy.types.brush.use_original_plane*", "sculpt_paint/sculpting/tool_settings/brush_settings.html#bpy-types-brush-use-original-plane"),
("bpy.types.camera.show_passepartout*", "render/cameras.html#bpy-types-camera-show-passepartout"),
("bpy.types.collection.lineart_usage*", "scene_layout/collections/collections.html#bpy-types-collection-lineart-usage"),
("bpy.types.colormanagedviewsettings*", "render/color_management.html#bpy-types-colormanagedviewsettings"),
@@ -1440,6 +1474,7 @@ url_manual_mapping = (
("bpy.types.transformcacheconstraint*", "animation/constraints/transform/transform_cache.html#bpy-types-transformcacheconstraint"),
("bpy.types.unitsettings.length_unit*", "scene_layout/scene/properties.html#bpy-types-unitsettings-length-unit"),
("bpy.types.vertexweighteditmodifier*", "modeling/modifiers/modify/weight_edit.html#bpy-types-vertexweighteditmodifier"),
+ ("bpy.types.view3dshading.color_type*", "render/workbench/color.html#bpy-types-view3dshading-color-type"),
("bpy.types.volumedisplay.slice_axis*", "modeling/volumes/properties.html#bpy-types-volumedisplay-slice-axis"),
("bpy.ops.action.markers_make_local*", "animation/markers.html#bpy-ops-action-markers-make-local"),
("bpy.ops.anim.channels_clean_empty*", "editors/nla/editing.html#bpy-ops-anim-channels-clean-empty"),
@@ -1458,7 +1493,7 @@ url_manual_mapping = (
("bpy.ops.mask.feather_weight_clear*", "movie_clip/masking/editing.html#bpy-ops-mask-feather-weight-clear"),
("bpy.ops.mask.primitive_circle_add*", "movie_clip/masking/scurve.html#bpy-ops-mask-primitive-circle-add"),
("bpy.ops.mask.primitive_square_add*", "movie_clip/masking/scurve.html#bpy-ops-mask-primitive-square-add"),
- ("bpy.ops.mesh.dupli_extrude_cursor*", "modeling/meshes/tools/extrude_cursor.html#bpy-ops-mesh-dupli-extrude-cursor"),
+ ("bpy.ops.mesh.dupli_extrude_cursor*", "modeling/meshes/editing/vertex/extrude_cursor.html#bpy-ops-mesh-dupli-extrude-cursor"),
("bpy.ops.mesh.primitive_circle_add*", "modeling/meshes/primitives.html#bpy-ops-mesh-primitive-circle-add"),
("bpy.ops.mesh.primitive_monkey_add*", "modeling/meshes/primitives.html#bpy-ops-mesh-primitive-monkey-add"),
("bpy.ops.mesh.select_face_by_sides*", "modeling/meshes/selecting/all_by_trait.html#bpy-ops-mesh-select-face-by-sides"),
@@ -1486,6 +1521,8 @@ url_manual_mapping = (
("bpy.types.brush.cloth_deform_type*", "sculpt_paint/sculpting/tools/cloth.html#bpy-types-brush-cloth-deform-type"),
("bpy.types.brush.cloth_sim_falloff*", "sculpt_paint/sculpting/tools/cloth.html#bpy-types-brush-cloth-sim-falloff"),
("bpy.types.brush.slide_deform_type*", "sculpt_paint/sculpting/tools/slide_relax.html#bpy-types-brush-slide-deform-type"),
+ ("bpy.types.brush.use_scene_spacing*", "sculpt_paint/brush/stroke.html#bpy-types-brush-use-scene-spacing"),
+ ("bpy.types.brush.use_smooth_stroke*", "sculpt_paint/brush/stroke.html#bpy-types-brush-use-smooth-stroke"),
("bpy.types.camera.show_composition*", "render/cameras.html#bpy-types-camera-show-composition"),
("bpy.types.colorramp.interpolation*", "interface/controls/templates/color_ramp.html#bpy-types-colorramp-interpolation"),
("bpy.types.compositornodealphaover*", "compositing/types/color/alpha_over.html#bpy-types-compositornodealphaover"),
@@ -1539,6 +1576,7 @@ url_manual_mapping = (
("bpy.types.gpencilsculptguide.type*", "grease_pencil/modes/draw/guides.html#bpy-types-gpencilsculptguide-type"),
("bpy.types.greasepencil.onion_mode*", "grease_pencil/properties/onion_skinning.html#bpy-types-greasepencil-onion-mode"),
("bpy.types.greasepencilgrid.offset*", "grease_pencil/properties/display.html#bpy-types-greasepencilgrid-offset"),
+ ("bpy.types.imagepaint.normal_angle*", "sculpt_paint/brush/falloff.html#bpy-types-imagepaint-normal-angle"),
("bpy.types.laplaciandeformmodifier*", "modeling/modifiers/deform/laplacian_deform.html#bpy-types-laplaciandeformmodifier"),
("bpy.types.laplaciansmoothmodifier*", "modeling/modifiers/deform/laplacian_smooth.html#bpy-types-laplaciansmoothmodifier"),
("bpy.types.layercollection.exclude*", "editors/outliner/interface.html#bpy-types-layercollection-exclude"),
@@ -1577,6 +1615,7 @@ url_manual_mapping = (
("bpy.ops.constraint.move_to_index*", "animation/constraints/interface/header.html#bpy-ops-constraint-move-to-index"),
("bpy.ops.gpencil.frame_clean_fill*", "grease_pencil/modes/edit/grease_pencil_menu.html#bpy-ops-gpencil-frame-clean-fill"),
("bpy.ops.gpencil.select_alternate*", "grease_pencil/selecting.html#bpy-ops-gpencil-select-alternate"),
+ ("bpy.ops.gpencil.stroke_start_set*", "grease_pencil/modes/edit/stroke_menu.html#bpy-ops-gpencil-stroke-start-set"),
("bpy.ops.gpencil.stroke_subdivide*", "grease_pencil/modes/edit/stroke_menu.html#bpy-ops-gpencil-stroke-subdivide"),
("bpy.ops.gpencil.vertex_color_hsv*", "grease_pencil/modes/vertex_paint/editing.html#bpy-ops-gpencil-vertex-color-hsv"),
("bpy.ops.gpencil.vertex_color_set*", "grease_pencil/modes/vertex_paint/editing.html#bpy-ops-gpencil-vertex-color-set"),
@@ -1600,6 +1639,8 @@ url_manual_mapping = (
("bpy.ops.outliner.collection_hide*", "editors/outliner/editing.html#bpy-ops-outliner-collection-hide"),
("bpy.ops.outliner.collection_show*", "editors/outliner/editing.html#bpy-ops-outliner-collection-show"),
("bpy.ops.paint.mask_lasso_gesture*", "sculpt_paint/sculpting/editing/mask.html#bpy-ops-paint-mask-lasso-gesture"),
+ ("bpy.ops.poselib.apply_pose_asset*", "animation/armatures/posing/editing/pose_library.html#bpy-ops-poselib-apply-pose-asset"),
+ ("bpy.ops.poselib.blend_pose_asset*", "animation/armatures/posing/editing/pose_library.html#bpy-ops-poselib-blend-pose-asset"),
("bpy.ops.rigidbody.mass_calculate*", "scene_layout/object/editing/rigid_body.html#bpy-ops-rigidbody-mass-calculate"),
("bpy.ops.screen.spacedata_cleanup*", "advanced/operators.html#bpy-ops-screen-spacedata-cleanup"),
("bpy.ops.sculpt.detail_flood_fill*", "sculpt_paint/sculpting/tool_settings/dyntopo.html#bpy-ops-sculpt-detail-flood-fill"),
@@ -1620,6 +1661,8 @@ url_manual_mapping = (
("bpy.types.brush.pose_deform_type*", "sculpt_paint/sculpting/tools/pose.html#bpy-types-brush-pose-deform-type"),
("bpy.types.brush.pose_ik_segments*", "sculpt_paint/sculpting/tools/pose.html#bpy-types-brush-pose-ik-segments"),
("bpy.types.brush.pose_origin_type*", "sculpt_paint/sculpting/tools/pose.html#bpy-types-brush-pose-origin-type"),
+ ("bpy.types.brush.use_edge_to_edge*", "sculpt_paint/brush/stroke.html#bpy-types-brush-use-edge-to-edge"),
+ ("bpy.types.brushtextureslot.angle*", "sculpt_paint/brush/texture.html#bpy-types-brushtextureslot-angle"),
("bpy.types.camerasolverconstraint*", "animation/constraints/motion_tracking/camera_solver.html#bpy-types-camerasolverconstraint"),
("bpy.types.clothcollisionsettings*", "physics/cloth/settings/collisions.html#bpy-types-clothcollisionsettings"),
("bpy.types.collection.hide_select*", "editors/outliner/interface.html#bpy-types-collection-hide-select"),
@@ -1681,6 +1724,7 @@ url_manual_mapping = (
("bpy.types.object.visible_diffuse*", "render/cycles/object_settings/object_data.html#bpy-types-object-visible-diffuse"),
("bpy.types.objectsolverconstraint*", "animation/constraints/motion_tracking/object_solver.html#bpy-types-objectsolverconstraint"),
("bpy.types.opacitygpencilmodifier*", "grease_pencil/modifiers/color/opacity.html#bpy-types-opacitygpencilmodifier"),
+ ("bpy.types.outlinegpencilmodifier*", "grease_pencil/modifiers/generate/outline.html#bpy-types-outlinegpencilmodifier"),
("bpy.types.particlesystemmodifier*", "physics/particles/index.html#bpy-types-particlesystemmodifier"),
("bpy.types.rendersettings.threads*", "render/cycles/render_settings/performance.html#bpy-types-rendersettings-threads"),
("bpy.types.scenedisplay.render_aa*", "render/workbench/sampling.html#bpy-types-scenedisplay-render-aa"),
@@ -1752,6 +1796,7 @@ url_manual_mapping = (
("bpy.ops.outliner.show_one_level*", "editors/outliner/editing.html#bpy-ops-outliner-show-one-level"),
("bpy.ops.paint.brush_colors_flip*", "sculpt_paint/texture_paint/tool_settings/brush_settings.html#bpy-ops-paint-brush-colors-flip"),
("bpy.ops.paint.weight_from_bones*", "sculpt_paint/weight_paint/editing.html#bpy-ops-paint-weight-from-bones"),
+ ("bpy.ops.paintcurve.delete_point*", "sculpt_paint/brush/stroke.html#bpy-ops-paintcurve-delete-point"),
("bpy.ops.pose.paths_range_update*", "animation/motion_paths.html#bpy-ops-pose-paths-range-update"),
("bpy.ops.poselib.action_sanitize*", "animation/armatures/properties/pose_library.html#bpy-ops-poselib-action-sanitize"),
("bpy.ops.preferences.studiolight*", "editors/preferences/lights.html#bpy-ops-preferences-studiolight"),
@@ -1791,7 +1836,7 @@ url_manual_mapping = (
("bpy.types.compositornodevecblur*", "compositing/types/filter/vector_blur.html#bpy-types-compositornodevecblur"),
("bpy.types.curve.use_fill_deform*", "modeling/curves/properties/shape.html#bpy-types-curve-use-fill-deform"),
("bpy.types.curve.use_path_follow*", "modeling/curves/properties/path_animation.html#bpy-types-curve-use-path-follow"),
- ("bpy.types.curves.surface_uv_map*", "sculpt_paint/curves_sculpting/introduction.html#bpy-types-curves-surface-uv-map"),
+ ("bpy.types.curves.surface_uv_map*", "modeling/curves/primitives.html#bpy-types-curves-surface-uv-map"),
("bpy.types.dampedtrackconstraint*", "animation/constraints/tracking/damped_track.html#bpy-types-dampedtrackconstraint"),
("bpy.types.distortednoisetexture*", "render/materials/legacy_textures/types/distorted_noise.html#bpy-types-distortednoisetexture"),
("bpy.types.dopesheet.filter_text*", "editors/graph_editor/channels.html#bpy-types-dopesheet-filter-text"),
@@ -1862,6 +1907,7 @@ url_manual_mapping = (
("bpy.ops.gpencil.duplicate_move*", "grease_pencil/modes/edit/grease_pencil_menu.html#bpy-ops-gpencil-duplicate-move"),
("bpy.ops.gpencil.select_grouped*", "grease_pencil/selecting.html#bpy-ops-gpencil-select-grouped"),
("bpy.ops.gpencil.stroke_arrange*", "grease_pencil/modes/edit/stroke_menu.html#bpy-ops-gpencil-stroke-arrange"),
+ ("bpy.ops.gpencil.stroke_outline*", "grease_pencil/modes/edit/stroke_menu.html#bpy-ops-gpencil-stroke-outline"),
("bpy.ops.graph.blend_to_default*", "editors/graph_editor/fcurves/editing.html#bpy-ops-graph-blend-to-default"),
("bpy.ops.graph.equalize_handles*", "editors/graph_editor/fcurves/editing.html#bpy-ops-graph-equalize-handles"),
("bpy.ops.mball.delete_metaelems*", "modeling/metas/editing.html#bpy-ops-mball-delete-metaelems"),
@@ -2041,7 +2087,9 @@ url_manual_mapping = (
("bpy.types.bakesettings.margin*", "render/cycles/baking.html#bpy-types-bakesettings-margin"),
("bpy.types.bakesettings.target*", "render/cycles/baking.html#bpy-types-bakesettings-target"),
("bpy.types.brush.cloth_damping*", "sculpt_paint/sculpting/tools/cloth.html#bpy-types-brush-cloth-damping"),
+ ("bpy.types.brush.falloff_shape*", "sculpt_paint/brush/falloff.html#bpy-types-brush-falloff-shape"),
("bpy.types.brush.icon_filepath*", "sculpt_paint/brush/brush.html#bpy-types-brush-icon-filepath"),
+ ("bpy.types.brush.stroke_method*", "sculpt_paint/brush/stroke.html#bpy-types-brush-stroke-method"),
("bpy.types.brush.tip_roundness*", "sculpt_paint/sculpting/tools/clay_strips.html#bpy-types-brush-tip-roundness"),
("bpy.types.camera.display_size*", "render/cameras.html#bpy-types-camera-display-size"),
("bpy.types.camera.sensor_width*", "render/cameras.html#bpy-types-camera-sensor-width"),
@@ -2074,6 +2122,7 @@ url_manual_mapping = (
("bpy.types.mesh.use_paint_mask*", "sculpt_paint/brush/introduction.html#bpy-types-mesh-use-paint-mask"),
("bpy.types.object.display_type*", "scene_layout/object/properties/display.html#bpy-types-object-display-type"),
("bpy.types.objectlineart.usage*", "scene_layout/object/properties/line_art.html#bpy-types-objectlineart-usage"),
+ ("bpy.types.paint.input_samples*", "sculpt_paint/brush/stroke.html#bpy-types-paint-input-samples"),
("bpy.types.particledupliweight*", "physics/particles/emitter/vertex_groups.html#bpy-types-particledupliweight"),
("bpy.types.posebone.bone_group*", "animation/armatures/bones/properties/relations.html#bpy-types-posebone-bone-group"),
("bpy.types.poseboneconstraints*", "animation/armatures/posing/bone_constraints/index.html#bpy-types-poseboneconstraints"),
@@ -2109,6 +2158,7 @@ url_manual_mapping = (
("bpy.types.transformconstraint*", "animation/constraints/transform/transformation.html#bpy-types-transformconstraint"),
("bpy.types.triangulatemodifier*", "modeling/modifiers/generate/triangulate.html#bpy-types-triangulatemodifier"),
("bpy.types.unitsettings.system*", "scene_layout/scene/properties.html#bpy-types-unitsettings-system"),
+ ("bpy.types.view3dshading.light*", "render/workbench/lighting.html#bpy-types-view3dshading-light"),
("bpy.types.viewlayer.use_solid*", "render/layers/introduction.html#bpy-types-viewlayer-use-solid"),
("bpy.types.volume.frame_offset*", "modeling/volumes/properties.html#bpy-types-volume-frame-offset"),
("bpy.types.windowmanager.addon*", "editors/preferences/addons.html#bpy-types-windowmanager-addon"),
@@ -2184,6 +2234,8 @@ url_manual_mapping = (
("bpy.types.animvizmotionpaths*", "animation/motion_paths.html#bpy-types-animvizmotionpaths"),
("bpy.types.armature.show_axes*", "animation/armatures/properties/display.html#bpy-types-armature-show-axes"),
("bpy.types.armatureconstraint*", "animation/constraints/relationship/armature.html#bpy-types-armatureconstraint"),
+ ("bpy.types.brush.dash_samples*", "sculpt_paint/brush/stroke.html#bpy-types-brush-dash-samples"),
+ ("bpy.types.brush.sculpt_plane*", "sculpt_paint/sculpting/tool_settings/brush_settings.html#bpy-types-brush-sculpt-plane"),
("bpy.types.compositornodeblur*", "compositing/types/filter/blur_node.html#bpy-types-compositornodeblur"),
("bpy.types.compositornodecrop*", "compositing/types/distort/crop.html#bpy-types-compositornodecrop"),
("bpy.types.compositornodeflip*", "compositing/types/distort/flip.html#bpy-types-compositornodeflip"),
@@ -2242,6 +2294,7 @@ url_manual_mapping = (
("bpy.types.texturenodechecker*", "editors/texture_node/types/patterns/checker.html#bpy-types-texturenodechecker"),
("bpy.types.texturenodetexture*", "editors/texture_node/types/input/texture.html#bpy-types-texturenodetexture"),
("bpy.types.texturenodetexwood*", "editors/texture_node/types/textures/wood.html#bpy-types-texturenodetexwood"),
+ ("bpy.types.textureslot.offset*", "sculpt_paint/brush/texture.html#bpy-types-textureslot-offset"),
("bpy.types.view3dshading.type*", "editors/3dview/display/shading.html#bpy-types-view3dshading-type"),
("bpy.types.volume.frame_start*", "modeling/volumes/properties.html#bpy-types-volume-frame-start"),
("bpy.types.volume.is_sequence*", "modeling/volumes/properties.html#bpy-types-volume-is-sequence"),
@@ -2320,6 +2373,7 @@ url_manual_mapping = (
("bpy.types.action.use_cyclic*", "animation/actions.html#bpy-types-action-use-cyclic"),
("bpy.types.alphaoversequence*", "video_editing/edit/montage/strips/effects/alpha_over_under_overdrop.html#bpy-types-alphaoversequence"),
("bpy.types.armatureeditbones*", "animation/armatures/bones/editing/index.html#bpy-types-armatureeditbones"),
+ ("bpy.types.brush.jitter_unit*", "sculpt_paint/brush/stroke.html#bpy-types-brush-jitter-unit"),
("bpy.types.brush.pose_offset*", "sculpt_paint/sculpting/tools/pose.html#bpy-types-brush-pose-offset"),
("bpy.types.brush.rake_factor*", "sculpt_paint/sculpting/tools/snake_hook.html#bpy-types-brush-rake-factor"),
("bpy.types.camera.sensor_fit*", "render/cameras.html#bpy-types-camera-sensor-fit"),
@@ -2374,6 +2428,7 @@ url_manual_mapping = (
("bpy.types.texturenodeoutput*", "editors/texture_node/types/output/output.html#bpy-types-texturenodeoutput"),
("bpy.types.texturenoderotate*", "editors/texture_node/types/distort/rotate.html#bpy-types-texturenoderotate"),
("bpy.types.texturenodeviewer*", "editors/texture_node/types/output/viewer.html#bpy-types-texturenodeviewer"),
+ ("bpy.types.textureslot.scale*", "sculpt_paint/brush/texture.html#bpy-types-textureslot-scale"),
("bpy.types.tracktoconstraint*", "animation/constraints/tracking/track_to.html#bpy-types-tracktoconstraint"),
("bpy.types.transformsequence*", "video_editing/edit/montage/strips/effects/transform.html#bpy-types-transformsequence"),
("bpy.types.uvprojectmodifier*", "modeling/modifiers/modify/uv_project.html#bpy-types-uvprojectmodifier"),
@@ -2383,6 +2438,7 @@ url_manual_mapping = (
("bpy.types.worldmistsettings*", "render/cycles/world_settings.html#bpy-types-worldmistsettings"),
("bpy.ops.anim.channels_move*", "editors/graph_editor/channels.html#bpy-ops-anim-channels-move"),
("bpy.ops.armature.subdivide*", "animation/armatures/bones/editing/subdivide.html#bpy-ops-armature-subdivide"),
+ ("bpy.ops.brush.curve_preset*", "sculpt_paint/brush/falloff.html#bpy-ops-brush-curve-preset"),
("bpy.ops.buttons.toggle_pin*", "editors/properties_editor.html#bpy-ops-buttons-toggle-pin"),
("bpy.ops.clip.delete_marker*", "movie_clip/tracking/clip/editing/track.html#bpy-ops-clip-delete-marker"),
("bpy.ops.clip.filter_tracks*", "movie_clip/tracking/clip/editing/track.html#bpy-ops-clip-filter-tracks"),
@@ -2444,6 +2500,7 @@ url_manual_mapping = (
("bpy.types.bone.head_radius*", "animation/armatures/bones/properties/deform.html#bpy-types-bone-head-radius"),
("bpy.types.bone.tail_radius*", "animation/armatures/bones/properties/deform.html#bpy-types-bone-tail-radius"),
("bpy.types.brush.cloth_mass*", "sculpt_paint/sculpting/tools/cloth.html#bpy-types-brush-cloth-mass"),
+ ("bpy.types.brush.dash_ratio*", "sculpt_paint/brush/stroke.html#bpy-types-brush-dash-ratio"),
("bpy.types.brushtextureslot*", "sculpt_paint/brush/texture.html#bpy-types-brushtextureslot"),
("bpy.types.colormixsequence*", "video_editing/edit/montage/strips/effects/color_mix.html#bpy-types-colormixsequence"),
("bpy.types.curve.dimensions*", "modeling/curves/properties/shape.html#bpy-types-curve-dimensions"),
@@ -2541,6 +2598,7 @@ url_manual_mapping = (
("bpy.ops.object.pointcloud*", "modeling/point_cloud.html#bpy-ops-object-pointcloud"),
("bpy.ops.object.select_all*", "scene_layout/object/selecting.html#bpy-ops-object-select-all"),
("bpy.ops.object.shade_flat*", "scene_layout/object/editing/shading.html#bpy-ops-object-shade-flat"),
+ ("bpy.ops.paintcurve.select*", "sculpt_paint/brush/stroke.html#bpy-ops-paintcurve-select"),
("bpy.ops.pose.group_assign*", "animation/armatures/properties/bone_groups.html#bpy-ops-pose-group-assign"),
("bpy.ops.pose.group_select*", "animation/armatures/properties/bone_groups.html#bpy-ops-pose-group-select"),
("bpy.ops.pose.paths_update*", "animation/motion_paths.html#bpy-ops-pose-paths-update"),
@@ -2552,6 +2610,7 @@ url_manual_mapping = (
("bpy.ops.screen.area_split*", "interface/window_system/areas.html#bpy-ops-screen-area-split"),
("bpy.ops.screen.screenshot*", "interface/window_system/topbar.html#bpy-ops-screen-screenshot"),
("bpy.ops.sculpt.dirty_mask*", "sculpt_paint/sculpting/editing/mask.html#bpy-ops-sculpt-dirty-mask"),
+ ("bpy.ops.sculpt.reveal_all*", "sculpt_paint/sculpting/editing/face_sets.html#bpy-ops-sculpt-reveal-all"),
("bpy.ops.sculpt.symmetrize*", "sculpt_paint/sculpting/tool_settings/symmetry.html#bpy-ops-sculpt-symmetrize"),
("bpy.ops.uv.remove_doubles*", "modeling/meshes/uv/editing.html#bpy-ops-uv-remove-doubles"),
("bpy.ops.uv.select_similar*", "editors/uv/selecting.html#bpy-ops-uv-select-similar"),
@@ -2655,7 +2714,7 @@ url_manual_mapping = (
("bpy.ops.wm.save_mainfile*", "files/blend/open_save.html#bpy-ops-wm-save-mainfile"),
("bpy.types.bone.show_wire*", "animation/armatures/bones/properties/display.html#bpy-types-bone-show-wire"),
("bpy.types.brush.hardness*", "sculpt_paint/sculpting/tool_settings/brush_settings.html#bpy-types-brush-hardness"),
- ("bpy.types.curves.surface*", "sculpt_paint/curves_sculpting/introduction.html#bpy-types-curves-surface"),
+ ("bpy.types.curves.surface*", "modeling/curves/primitives.html#bpy-types-curves-surface"),
("bpy.types.curvesmodifier*", "editors/video_sequencer/sequencer/sidebar/modifiers.html#bpy-types-curvesmodifier"),
("bpy.types.ffmpegsettings*", "render/output/properties/output.html#bpy-types-ffmpegsettings"),
("bpy.types.fmodifiernoise*", "editors/graph_editor/fcurves/modifiers.html#bpy-types-fmodifiernoise"),
@@ -2725,13 +2784,13 @@ url_manual_mapping = (
("bpy.ops.object.face_map*", "modeling/meshes/properties/object_data.html#bpy-ops-object-face-map"),
("bpy.ops.object.join_uvs*", "scene_layout/object/editing/link_transfer/copy_uvmaps.html#bpy-ops-object-join-uvs"),
("bpy.ops.outliner.delete*", "editors/outliner/editing.html#bpy-ops-outliner-delete"),
+ ("bpy.ops.paintcurve.draw*", "sculpt_paint/brush/stroke.html#bpy-ops-paintcurve-draw"),
("bpy.ops.pose.relax_rest*", "animation/armatures/posing/editing/in_betweens.html#bpy-ops-pose-relax-rest"),
("bpy.ops.pose.select_all*", "animation/armatures/posing/selecting.html#bpy-ops-pose-select-all"),
("bpy.ops.rigidbody.world*", "physics/rigid_body/world.html#bpy-ops-rigidbody-world"),
("bpy.ops.sculpt.optimize*", "sculpt_paint/sculpting/editing/sculpt.html#bpy-ops-sculpt-optimize"),
("bpy.ops.sequencer.split*", "video_editing/edit/montage/editing.html#bpy-ops-sequencer-split"),
("bpy.ops.transform.shear*", "modeling/meshes/editing/mesh/transform/shear.html#bpy-ops-transform-shear"),
- ("bpy.ops.ui.eyedropper_**", "interface/controls/buttons/eyedropper.html#bpy-ops-ui-eyedropper"),
("bpy.ops.uv.cube_project*", "modeling/meshes/editing/uv.html#bpy-ops-uv-cube-project"),
("bpy.ops.uv.pack_islands*", "modeling/meshes/uv/editing.html#bpy-ops-uv-pack-islands"),
("bpy.ops.uv.select_split*", "modeling/meshes/uv/editing.html#bpy-ops-uv-select-split"),
@@ -2743,12 +2802,14 @@ url_manual_mapping = (
("bpy.ops.wm.batch_rename*", "files/blend/rename.html#bpy-ops-wm-batch-rename"),
("bpy.ops.wm.owner_enable*", "interface/window_system/workspaces.html#bpy-ops-wm-owner-enable"),
("bpy.ops.wm.redraw_timer*", "advanced/operators.html#bpy-ops-wm-redraw-timer"),
+ ("bpy.ops.wm.splash_about*", "interface/window_system/topbar.html#bpy-ops-wm-splash-about"),
("bpy.types.*light.shadow*", "render/eevee/lighting.html#bpy-types-light-shadow"),
("bpy.types.armature.show*", "animation/armatures/properties/display.html#bpy-types-armature-show"),
("bpy.types.armaturebones*", "animation/armatures/bones/index.html#bpy-types-armaturebones"),
("bpy.types.arraymodifier*", "modeling/modifiers/generate/array.html#bpy-types-arraymodifier"),
("bpy.types.assetmetadata*", "editors/asset_browser.html#bpy-types-assetmetadata"),
("bpy.types.bevelmodifier*", "modeling/modifiers/generate/bevel.html#bpy-types-bevelmodifier"),
+ ("bpy.types.brush.spacing*", "sculpt_paint/brush/stroke.html#bpy-types-brush-spacing"),
("bpy.types.buildmodifier*", "modeling/modifiers/generate/build.html#bpy-types-buildmodifier"),
("bpy.types.clothmodifier*", "physics/cloth/index.html#bpy-types-clothmodifier"),
("bpy.types.clothsettings*", "physics/cloth/settings/index.html#bpy-types-clothsettings"),
@@ -2783,6 +2844,7 @@ url_manual_mapping = (
("bpy.types.sequence.name*", "editors/video_sequencer/sequencer/sidebar/strip.html#bpy-types-sequence-name"),
("bpy.types.sequenceproxy*", "editors/video_sequencer/sequencer/sidebar/proxy.html#bpy-types-sequenceproxy"),
("bpy.types.shaderfxswirl*", "grease_pencil/visual_effects/swirl.html#bpy-types-shaderfxswirl"),
+ ("bpy.types.shadernodemix*", "render/shader_nodes/converter/mix.html#bpy-types-shadernodemix"),
("bpy.types.shadernodergb*", "render/shader_nodes/input/rgb.html#bpy-types-shadernodergb"),
("bpy.types.shapekey.mute*", "animation/shape_keys/shape_keys_panel.html#bpy-types-shapekey-mute"),
("bpy.types.soundsequence*", "video_editing/edit/montage/strips/sound.html#bpy-types-soundsequence"),
@@ -2821,6 +2883,7 @@ url_manual_mapping = (
("bpy.ops.object.convert*", "scene_layout/object/editing/convert.html#bpy-ops-object-convert"),
("bpy.ops.object.gpencil*", "grease_pencil/index.html#bpy-ops-object-gpencil"),
("bpy.ops.object.speaker*", "render/output/audio/speaker.html#bpy-ops-object-speaker"),
+ ("bpy.ops.paintcurve.new*", "sculpt_paint/brush/stroke.html#bpy-ops-paintcurve-new"),
("bpy.ops.pose.breakdown*", "animation/armatures/posing/editing/in_betweens.html#bpy-ops-pose-breakdown"),
("bpy.ops.pose.loc_clear*", "animation/armatures/posing/editing/clear.html#bpy-ops-pose-loc-clear"),
("bpy.ops.pose.propagate*", "animation/armatures/posing/editing/propagate.html#bpy-ops-pose-propagate"),
@@ -2902,6 +2965,7 @@ url_manual_mapping = (
("bpy.ops.script.reload*", "advanced/operators.html#bpy-ops-script-reload"),
("bpy.ops.sculpt.expand*", "sculpt_paint/sculpting/editing/mask.html#bpy-ops-sculpt-expand"),
("bpy.ops.sculpt_curves*", "sculpt_paint/curves_sculpting/index.html#bpy-ops-sculpt-curves"),
+ ("bpy.ops.ui.eyedropper*", "interface/controls/buttons/eyedropper.html#bpy-ops-ui-eyedropper"),
("bpy.ops.view3d.select*", "editors/3dview/selecting.html#bpy-ops-view3d-select"),
("bpy.ops.wm.debug_menu*", "advanced/operators.html#bpy-ops-wm-debug-menu"),
("bpy.ops.wm.obj_export*", "files/import_export/obj.html#bpy-ops-wm-obj-export"),
@@ -2911,6 +2975,7 @@ url_manual_mapping = (
("bpy.ops.wm.usd_export*", "files/import_export/usd.html#bpy-ops-wm-usd-export"),
("bpy.types.addsequence*", "video_editing/edit/montage/strips/effects/add.html#bpy-types-addsequence"),
("bpy.types.brush.cloth*", "sculpt_paint/sculpting/tools/cloth.html#bpy-types-brush-cloth"),
+ ("bpy.types.brush.curve*", "sculpt_paint/brush/falloff.html#bpy-types-brush-curve"),
("bpy.types.camera.show*", "render/cameras.html#bpy-types-camera-show"),
("bpy.types.consoleline*", "editors/python_console.html#bpy-types-consoleline"),
("bpy.types.curve.bevel*", "modeling/curves/properties/geometry.html#bpy-types-curve-bevel"),
@@ -2960,6 +3025,7 @@ url_manual_mapping = (
("bpy.types.areaspaces*", "interface/window_system/areas.html#bpy-types-areaspaces"),
("bpy.types.bonegroups*", "animation/armatures/properties/bone_groups.html#bpy-types-bonegroups"),
("bpy.types.bpy_struct*", "files/data_blocks.html#bpy-types-bpy-struct"),
+ ("bpy.types.brush.rate*", "sculpt_paint/brush/stroke.html#bpy-types-brush-rate"),
("bpy.types.collection*", "scene_layout/collections/collections.html#bpy-types-collection"),
("bpy.types.compositor*", "compositing/index.html#bpy-types-compositor"),
("bpy.types.constraint*", "animation/constraints/index.html#bpy-types-constraint"),
diff --git a/release/scripts/startup/bl_ui/node_add_menu.py b/release/scripts/startup/bl_ui/node_add_menu.py
index 31b84b8f08a..873dbd533a5 100644
--- a/release/scripts/startup/bl_ui/node_add_menu.py
+++ b/release/scripts/startup/bl_ui/node_add_menu.py
@@ -59,6 +59,14 @@ def draw_node_group_add_menu(context, layout):
ops.value = "bpy.data.node_groups[%r]" % group.name
+def draw_assets_for_catalog(layout, catalog_path):
+ layout.template_node_asset_menu_items(catalog_path=catalog_path)
+
+
+def draw_root_assets(layout):
+ layout.menu_contents("NODE_MT_node_add_root_catalogs")
+
+
classes = (
)
diff --git a/release/scripts/startup/bl_ui/node_add_menu_geometry.py b/release/scripts/startup/bl_ui/node_add_menu_geometry.py
index e1b57ec4f43..c076cd7395a 100644
--- a/release/scripts/startup/bl_ui/node_add_menu_geometry.py
+++ b/release/scripts/startup/bl_ui/node_add_menu_geometry.py
@@ -16,6 +16,7 @@ class NODE_MT_geometry_node_GEO_ATTRIBUTE(Menu):
node_add_menu.add_node_type(layout, "GeometryNodeAttributeDomainSize")
node_add_menu.add_node_type(layout, "GeometryNodeRemoveAttribute")
node_add_menu.add_node_type(layout, "GeometryNodeStoreNamedAttribute")
+ node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
class NODE_MT_geometry_node_GEO_COLOR(Menu):
@@ -32,6 +33,7 @@ class NODE_MT_geometry_node_GEO_COLOR(Menu):
ops.value = "'RGBA'"
node_add_menu.add_node_type(layout, "ShaderNodeRGBCurve")
node_add_menu.add_node_type(layout, "FunctionNodeSeparateColor")
+ node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
class NODE_MT_geometry_node_GEO_CURVE(Menu):
@@ -70,6 +72,7 @@ class NODE_MT_geometry_node_GEO_CURVE(Menu):
node_add_menu.add_node_type(layout, "GeometryNodeSetSplineCyclic")
node_add_menu.add_node_type(layout, "GeometryNodeSetSplineResolution")
node_add_menu.add_node_type(layout, "GeometryNodeCurveSplineType")
+ node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
class NODE_MT_geometry_node_GEO_PRIMITIVES_CURVE(Menu):
@@ -86,6 +89,7 @@ class NODE_MT_geometry_node_GEO_PRIMITIVES_CURVE(Menu):
node_add_menu.add_node_type(layout, "GeometryNodeCurveQuadraticBezier")
node_add_menu.add_node_type(layout, "GeometryNodeCurvePrimitiveQuadrilateral")
node_add_menu.add_node_type(layout, "GeometryNodeCurveStar")
+ node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
class NODE_MT_geometry_node_curve_topology(Menu):
@@ -97,6 +101,7 @@ class NODE_MT_geometry_node_curve_topology(Menu):
node_add_menu.add_node_type(layout, "GeometryNodeOffsetPointInCurve")
node_add_menu.add_node_type(layout, "GeometryNodeCurveOfPoint")
node_add_menu.add_node_type(layout, "GeometryNodePointsOfCurve")
+ node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
class NODE_MT_geometry_node_GEO_GEOMETRY(Menu):
@@ -122,6 +127,7 @@ class NODE_MT_geometry_node_GEO_GEOMETRY(Menu):
layout.separator()
node_add_menu.add_node_type(layout, "GeometryNodeSetID")
node_add_menu.add_node_type(layout, "GeometryNodeSetPosition")
+ node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
class NODE_MT_geometry_node_GEO_INPUT(Menu):
@@ -149,6 +155,7 @@ class NODE_MT_geometry_node_GEO_INPUT(Menu):
node_add_menu.add_node_type(layout, "GeometryNodeInputPosition")
node_add_menu.add_node_type(layout, "GeometryNodeInputRadius")
node_add_menu.add_node_type(layout, "GeometryNodeInputSceneTime")
+ node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
class NODE_MT_geometry_node_GEO_INSTANCE(Menu):
@@ -166,6 +173,7 @@ class NODE_MT_geometry_node_GEO_INSTANCE(Menu):
layout.separator()
node_add_menu.add_node_type(layout, "GeometryNodeInputInstanceRotation")
node_add_menu.add_node_type(layout, "GeometryNodeInputInstanceScale")
+ node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
class NODE_MT_geometry_node_GEO_MATERIAL(Menu):
@@ -181,6 +189,7 @@ class NODE_MT_geometry_node_GEO_MATERIAL(Menu):
layout.separator()
node_add_menu.add_node_type(layout, "GeometryNodeSetMaterial")
node_add_menu.add_node_type(layout, "GeometryNodeSetMaterialIndex")
+ node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
class NODE_MT_geometry_node_GEO_MESH(Menu):
@@ -219,6 +228,7 @@ class NODE_MT_geometry_node_GEO_MESH(Menu):
node_add_menu.add_node_type(layout, "GeometryNodeInputMeshVertexNeighbors")
layout.separator()
node_add_menu.add_node_type(layout, "GeometryNodeSetShadeSmooth")
+ node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
class NODE_MT_category_PRIMITIVES_MESH(Menu):
@@ -235,6 +245,7 @@ class NODE_MT_category_PRIMITIVES_MESH(Menu):
node_add_menu.add_node_type(layout, "GeometryNodeMeshCircle")
node_add_menu.add_node_type(layout, "GeometryNodeMeshLine")
node_add_menu.add_node_type(layout, "GeometryNodeMeshUVSphere")
+ node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
class NODE_MT_geometry_node_mesh_topology(Menu):
@@ -250,6 +261,7 @@ class NODE_MT_geometry_node_mesh_topology(Menu):
node_add_menu.add_node_type(layout, "GeometryNodeFaceOfCorner"),
node_add_menu.add_node_type(layout, "GeometryNodeOffsetCornerInFace"),
node_add_menu.add_node_type(layout, "GeometryNodeVertexOfCorner"),
+ node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
class NODE_MT_category_GEO_OUTPUT(Menu):
@@ -259,6 +271,7 @@ class NODE_MT_category_GEO_OUTPUT(Menu):
def draw(self, _context):
layout = self.layout
node_add_menu.add_node_type(layout, "GeometryNodeViewer")
+ node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
class NODE_MT_category_GEO_POINT(Menu):
@@ -274,6 +287,7 @@ class NODE_MT_category_GEO_POINT(Menu):
node_add_menu.add_node_type(layout, "GeometryNodePointsToVolume")
layout.separator()
node_add_menu.add_node_type(layout, "GeometryNodeSetPointRadius")
+ node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
class NODE_MT_category_GEO_TEXT(Menu):
@@ -290,6 +304,7 @@ class NODE_MT_category_GEO_TEXT(Menu):
node_add_menu.add_node_type(layout, "FunctionNodeValueToString")
layout.separator()
node_add_menu.add_node_type(layout, "FunctionNodeInputSpecialCharacters")
+ node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
class NODE_MT_category_GEO_TEXTURE(Menu):
@@ -308,6 +323,7 @@ class NODE_MT_category_GEO_TEXTURE(Menu):
node_add_menu.add_node_type(layout, "ShaderNodeTexVoronoi")
node_add_menu.add_node_type(layout, "ShaderNodeTexWave")
node_add_menu.add_node_type(layout, "ShaderNodeTexWhiteNoise")
+ node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
class NODE_MT_category_GEO_UTILITIES(Menu):
@@ -331,6 +347,7 @@ class NODE_MT_category_GEO_UTILITIES(Menu):
node_add_menu.add_node_type(layout, "FunctionNodeRandomValue")
node_add_menu.add_node_type(layout, "FunctionNodeRotateEuler")
node_add_menu.add_node_type(layout, "GeometryNodeSwitch")
+ node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
class NODE_MT_category_GEO_UV(Menu):
@@ -341,6 +358,7 @@ class NODE_MT_category_GEO_UV(Menu):
layout = self.layout
node_add_menu.add_node_type(layout, "GeometryNodeUVPackIslands")
node_add_menu.add_node_type(layout, "GeometryNodeUVUnwrap")
+ node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
class NODE_MT_category_GEO_VECTOR(Menu):
@@ -354,6 +372,7 @@ class NODE_MT_category_GEO_VECTOR(Menu):
node_add_menu.add_node_type(layout, "ShaderNodeVectorCurve")
node_add_menu.add_node_type(layout, "ShaderNodeVectorMath")
node_add_menu.add_node_type(layout, "ShaderNodeVectorRotate")
+ node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
class NODE_MT_category_GEO_VOLUME(Menu):
@@ -364,6 +383,7 @@ class NODE_MT_category_GEO_VOLUME(Menu):
layout = self.layout
node_add_menu.add_node_type(layout, "GeometryNodeVolumeCube")
node_add_menu.add_node_type(layout, "GeometryNodeVolumeToMesh")
+ node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
class NODE_MT_category_GEO_GROUP(Menu):
@@ -373,6 +393,7 @@ class NODE_MT_category_GEO_GROUP(Menu):
def draw(self, context):
layout = self.layout
node_add_menu.draw_node_group_add_menu(context, layout)
+ node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
class NODE_MT_category_GEO_LAYOUT(Menu):
@@ -383,6 +404,7 @@ class NODE_MT_category_GEO_LAYOUT(Menu):
layout = self.layout
node_add_menu.add_node_type(layout, "NodeFrame")
node_add_menu.add_node_type(layout, "NodeReroute")
+ node_add_menu.draw_assets_for_catalog(layout, self.bl_label)
class NODE_MT_geometry_node_add_all(Menu):
@@ -413,6 +435,7 @@ class NODE_MT_geometry_node_add_all(Menu):
layout.menu("NODE_MT_category_GEO_VOLUME")
layout.menu("NODE_MT_category_GEO_GROUP")
layout.menu("NODE_MT_category_GEO_LAYOUT")
+ node_add_menu.draw_root_assets(layout)
classes = (
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 39684aaf161..83f190ee5d9 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3121,21 +3121,33 @@ class VIEW3D_MT_paint_weight_lock(Menu):
op = layout.operator("object.vertex_group_lock", icon='LOCKED', text="Lock All")
op.action, op.mask = 'LOCK', 'ALL'
- op = layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="Unlock All")
- op.action, op.mask = 'UNLOCK', 'ALL'
- op = layout.operator("object.vertex_group_lock", icon='LOCKED', text="Lock Selected")
+
+ op = layout.operator("object.vertex_group_lock", text="Lock Selected")
op.action, op.mask = 'LOCK', 'SELECTED'
- op = layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="Unlock Selected")
- op.action, op.mask = 'UNLOCK', 'SELECTED'
- op = layout.operator("object.vertex_group_lock", icon='LOCKED', text="Lock Unselected")
+
+ op = layout.operator("object.vertex_group_lock", text="Lock Unselected")
op.action, op.mask = 'LOCK', 'UNSELECTED'
- op = layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="Unlock Unselected")
- op.action, op.mask = 'UNLOCK', 'UNSELECTED'
+
op = layout.operator("object.vertex_group_lock", text="Lock Only Selected")
op.action, op.mask = 'LOCK', 'INVERT_UNSELECTED'
+
op = layout.operator("object.vertex_group_lock", text="Lock Only Unselected")
op.action, op.mask = 'UNLOCK', 'INVERT_UNSELECTED'
- op = layout.operator("object.vertex_group_lock", text="Invert Locks")
+
+ layout.separator()
+
+ op = layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="Unlock All")
+ op.action, op.mask = 'UNLOCK', 'ALL'
+
+ op = layout.operator("object.vertex_group_lock", text="Unlock Selected")
+ op.action, op.mask = 'UNLOCK', 'SELECTED'
+
+ op = layout.operator("object.vertex_group_lock", text="Unlock Unselected")
+ op.action, op.mask = 'UNLOCK', 'UNSELECTED'
+
+ layout.separator()
+
+ op = layout.operator("object.vertex_group_lock", icon='ARROW_LEFTRIGHT', text="Invert Locks")
op.action, op.mask = 'INVERT', 'ALL'
diff --git a/source/blender/blenkernel/BKE_asset_catalog.hh b/source/blender/blenkernel/BKE_asset_catalog.hh
index caed12d4fdf..73c2e00c4c4 100644
--- a/source/blender/blenkernel/BKE_asset_catalog.hh
+++ b/source/blender/blenkernel/BKE_asset_catalog.hh
@@ -307,7 +307,7 @@ class AssetCatalogTreeItem {
/** Iterate over children calling \a callback for each of them, but do not recurse into their
* children. */
- void foreach_child(const ItemIterFn callback);
+ void foreach_child(ItemIterFn callback);
protected:
/** Child tree items, ordered by their names. */
@@ -345,10 +345,15 @@ class AssetCatalogTree {
/** Ensure an item representing \a path is in the tree, adding it if necessary. */
void insert_item(const AssetCatalog &catalog);
- void foreach_item(const AssetCatalogTreeItem::ItemIterFn callback);
+ void foreach_item(ItemIterFn callback);
/** Iterate over root items calling \a callback for each of them, but do not recurse into their
* children. */
- void foreach_root_item(const ItemIterFn callback);
+ void foreach_root_item(ItemIterFn callback);
+
+ bool is_empty() const;
+
+ AssetCatalogTreeItem *find_item(const AssetCatalogPath &path);
+ AssetCatalogTreeItem *find_root_item(const AssetCatalogPath &path);
protected:
/** Child tree items, ordered by their names. */
diff --git a/source/blender/blenkernel/BKE_asset_catalog_path.hh b/source/blender/blenkernel/BKE_asset_catalog_path.hh
index 135906dd064..93ab0389daf 100644
--- a/source/blender/blenkernel/BKE_asset_catalog_path.hh
+++ b/source/blender/blenkernel/BKE_asset_catalog_path.hh
@@ -49,7 +49,7 @@ class AssetCatalogPath {
AssetCatalogPath() = default;
AssetCatalogPath(StringRef path);
- AssetCatalogPath(const std::string &path);
+ AssetCatalogPath(std::string path);
AssetCatalogPath(const char *path);
AssetCatalogPath(const AssetCatalogPath &other_path) = default;
AssetCatalogPath(AssetCatalogPath &&other_path) noexcept;
diff --git a/source/blender/blenkernel/BKE_asset_library.hh b/source/blender/blenkernel/BKE_asset_library.hh
index e0a39e3aee8..2058df71f6a 100644
--- a/source/blender/blenkernel/BKE_asset_library.hh
+++ b/source/blender/blenkernel/BKE_asset_library.hh
@@ -10,6 +10,8 @@
# error This is a C++-only header file. Use BKE_asset_library.h instead.
#endif
+#include "DNA_asset_types.h"
+
#include "BKE_asset_library.h"
#include "BKE_asset_catalog.hh"
@@ -44,19 +46,24 @@ struct AssetLibrary {
* No-op if the catalog cannot be found. This could be the kind of "the
* catalog definition file is corrupt/lost" scenario that the simple name is
* meant to help recover from. */
- void refresh_catalog_simplename(struct AssetMetaData *asset_data);
+ void refresh_catalog_simplename(AssetMetaData *asset_data);
void on_blend_save_handler_register();
void on_blend_save_handler_unregister();
- void on_blend_save_post(struct Main *, struct PointerRNA **pointers, int num_pointers);
+ void on_blend_save_post(Main *bmain, PointerRNA **pointers, int num_pointers);
private:
bCallbackFuncStore on_save_callback_store_{};
};
+Vector<AssetLibraryReference> all_valid_asset_library_refs();
+
} // namespace blender::bke
+blender::bke::AssetLibrary *BKE_asset_library_load(const Main *bmain,
+ const AssetLibraryReference &library_reference);
+
blender::bke::AssetCatalogService *BKE_asset_library_get_catalog_service(
const ::AssetLibrary *library);
blender::bke::AssetCatalogTree *BKE_asset_library_get_catalog_tree(const ::AssetLibrary *library);
diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h
index 806fff2099e..4bffa5492b5 100644
--- a/source/blender/blenkernel/BKE_blender_version.h
+++ b/source/blender/blenkernel/BKE_blender_version.h
@@ -17,7 +17,7 @@ extern "C" {
*/
/* Blender major and minor version. */
-#define BLENDER_VERSION 304
+#define BLENDER_VERSION 305
/* Blender patch version for bugfix releases. */
#define BLENDER_VERSION_PATCH 0
/** Blender release cycle stage: alpha/beta/rc/release. */
@@ -25,7 +25,7 @@ extern "C" {
/* Blender file format version. */
#define BLENDER_FILE_VERSION BLENDER_VERSION
-#define BLENDER_FILE_SUBVERSION 5
+#define BLENDER_FILE_SUBVERSION 0
/* Minimum Blender version that supports reading file written with the current
* version. Older Blender versions will test this and show a warning if the file
diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h
index b7068720469..e1406e63ce1 100644
--- a/source/blender/blenkernel/BKE_context.h
+++ b/source/blender/blenkernel/BKE_context.h
@@ -285,7 +285,7 @@ bool CTX_data_dir(const char *member);
CTX_DATA_BEGIN (C, Type, instance, member) \
Type_id instance_id = (Type_id)ctx_link->ptr.owner_id;
-int ctx_data_list_count(const bContext *C, int (*func)(const bContext *, ListBase *));
+int ctx_data_list_count(const bContext *C, bool (*func)(const bContext *, ListBase *));
#define CTX_DATA_COUNT(C, member) ctx_data_list_count(C, CTX_data_##member)
@@ -316,22 +316,22 @@ void CTX_data_main_set(bContext *C, struct Main *bmain);
void CTX_data_scene_set(bContext *C, struct Scene *scene);
/* Only Outliner currently! */
-int CTX_data_selected_ids(const bContext *C, ListBase *list);
+bool CTX_data_selected_ids(const bContext *C, ListBase *list);
-int CTX_data_selected_editable_objects(const bContext *C, ListBase *list);
-int CTX_data_selected_editable_bases(const bContext *C, ListBase *list);
+bool CTX_data_selected_editable_objects(const bContext *C, ListBase *list);
+bool CTX_data_selected_editable_bases(const bContext *C, ListBase *list);
-int CTX_data_editable_objects(const bContext *C, ListBase *list);
-int CTX_data_editable_bases(const bContext *C, ListBase *list);
+bool CTX_data_editable_objects(const bContext *C, ListBase *list);
+bool CTX_data_editable_bases(const bContext *C, ListBase *list);
-int CTX_data_selected_objects(const bContext *C, ListBase *list);
-int CTX_data_selected_bases(const bContext *C, ListBase *list);
+bool CTX_data_selected_objects(const bContext *C, ListBase *list);
+bool CTX_data_selected_bases(const bContext *C, ListBase *list);
-int CTX_data_visible_objects(const bContext *C, ListBase *list);
-int CTX_data_visible_bases(const bContext *C, ListBase *list);
+bool CTX_data_visible_objects(const bContext *C, ListBase *list);
+bool CTX_data_visible_bases(const bContext *C, ListBase *list);
-int CTX_data_selectable_objects(const bContext *C, ListBase *list);
-int CTX_data_selectable_bases(const bContext *C, ListBase *list);
+bool CTX_data_selectable_objects(const bContext *C, ListBase *list);
+bool CTX_data_selectable_bases(const bContext *C, ListBase *list);
struct Object *CTX_data_active_object(const bContext *C);
struct Base *CTX_data_active_base(const bContext *C);
@@ -345,25 +345,25 @@ struct Mask *CTX_data_edit_mask(const bContext *C);
struct CacheFile *CTX_data_edit_cachefile(const bContext *C);
-int CTX_data_selected_nodes(const bContext *C, ListBase *list);
+bool CTX_data_selected_nodes(const bContext *C, ListBase *list);
struct EditBone *CTX_data_active_bone(const bContext *C);
-int CTX_data_selected_bones(const bContext *C, ListBase *list);
-int CTX_data_selected_editable_bones(const bContext *C, ListBase *list);
-int CTX_data_visible_bones(const bContext *C, ListBase *list);
-int CTX_data_editable_bones(const bContext *C, ListBase *list);
+bool CTX_data_selected_bones(const bContext *C, ListBase *list);
+bool CTX_data_selected_editable_bones(const bContext *C, ListBase *list);
+bool CTX_data_visible_bones(const bContext *C, ListBase *list);
+bool CTX_data_editable_bones(const bContext *C, ListBase *list);
struct bPoseChannel *CTX_data_active_pose_bone(const bContext *C);
-int CTX_data_selected_pose_bones(const bContext *C, ListBase *list);
-int CTX_data_selected_pose_bones_from_active_object(const bContext *C, ListBase *list);
-int CTX_data_visible_pose_bones(const bContext *C, ListBase *list);
+bool CTX_data_selected_pose_bones(const bContext *C, ListBase *list);
+bool CTX_data_selected_pose_bones_from_active_object(const bContext *C, ListBase *list);
+bool CTX_data_visible_pose_bones(const bContext *C, ListBase *list);
struct bGPdata *CTX_data_gpencil_data(const bContext *C);
struct bGPDlayer *CTX_data_active_gpencil_layer(const bContext *C);
struct bGPDframe *CTX_data_active_gpencil_frame(const bContext *C);
-int CTX_data_visible_gpencil_layers(const bContext *C, ListBase *list);
-int CTX_data_editable_gpencil_layers(const bContext *C, ListBase *list);
-int CTX_data_editable_gpencil_strokes(const bContext *C, ListBase *list);
+bool CTX_data_visible_gpencil_layers(const bContext *C, ListBase *list);
+bool CTX_data_editable_gpencil_layers(const bContext *C, ListBase *list);
+bool CTX_data_editable_gpencil_strokes(const bContext *C, ListBase *list);
const struct AssetLibraryReference *CTX_wm_asset_library_ref(const bContext *C);
struct AssetHandle CTX_wm_asset_handle(const bContext *C, bool *r_is_valid);
diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h
index f761e28cbb4..1cdd3c02d8d 100644
--- a/source/blender/blenkernel/BKE_customdata.h
+++ b/source/blender/blenkernel/BKE_customdata.h
@@ -552,7 +552,6 @@ bool CustomData_verify_versions(struct CustomData *data, int index);
/* BMesh specific custom-data stuff. */
-void CustomData_bmesh_update_active_layers(struct CustomData *fdata, struct CustomData *ldata);
void CustomData_bmesh_init_pool(struct CustomData *data, int totelem, char htype);
/**
diff --git a/source/blender/blenkernel/BKE_dynamicpaint.h b/source/blender/blenkernel/BKE_dynamicpaint.h
index 109d3e6d977..431bc11b07f 100644
--- a/source/blender/blenkernel/BKE_dynamicpaint.h
+++ b/source/blender/blenkernel/BKE_dynamicpaint.h
@@ -119,7 +119,7 @@ struct DynamicPaintSurface *get_activeSurface(struct DynamicPaintCanvasSettings
int dynamicPaint_createUVSurface(struct Scene *scene,
struct DynamicPaintSurface *surface,
float *progress,
- short *do_update);
+ bool *do_update);
/**
* Calculate a single frame and included sub-frames for surface.
*/
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index 0ff7f50f71c..8f6786d4113 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -307,8 +307,6 @@ void BKE_mesh_translate(struct Mesh *me, const float offset[3], bool do_keys);
void BKE_mesh_tessface_clear(struct Mesh *mesh);
-void BKE_mesh_do_versions_cd_flag_init(struct Mesh *mesh);
-
void BKE_mesh_mselect_clear(struct Mesh *me);
void BKE_mesh_mselect_validate(struct Mesh *me);
/**
@@ -974,11 +972,6 @@ void BKE_mesh_strip_loose_faces(struct Mesh *me);
void BKE_mesh_strip_loose_polysloops(struct Mesh *me);
void BKE_mesh_strip_loose_edges(struct Mesh *me);
-/**
- * If the mesh is from a very old blender version,
- * convert #MFace.edcode to edge #ME_EDGEDRAW.
- */
-void BKE_mesh_calc_edges_legacy(struct Mesh *me, bool use_old);
void BKE_mesh_calc_edges_loose(struct Mesh *mesh);
/**
* Calculate edges from polygons.
diff --git a/source/blender/blenkernel/BKE_mesh_legacy_convert.h b/source/blender/blenkernel/BKE_mesh_legacy_convert.h
index 92182f8045b..5eae7bf3b22 100644
--- a/source/blender/blenkernel/BKE_mesh_legacy_convert.h
+++ b/source/blender/blenkernel/BKE_mesh_legacy_convert.h
@@ -95,8 +95,6 @@ void BKE_mesh_tessface_calc(struct Mesh *mesh);
void BKE_mesh_tessface_ensure(struct Mesh *mesh);
-void BKE_mesh_add_mface_layers(struct CustomData *fdata, struct CustomData *ldata, int total);
-
/**
* Rotates the vertices of a face in case v[2] or v[3] (vertex index) is = 0.
* this is necessary to make the if #MFace.v4 check for quads work.
@@ -123,6 +121,13 @@ void BKE_mesh_convert_mfaces_to_mpolys(struct Mesh *mesh);
*/
void BKE_mesh_do_versions_convert_mfaces_to_mpolys(struct Mesh *mesh);
+/**
+ * Convert legacy #MFace.edcode to edge #ME_EDGEDRAW.
+ */
+void BKE_mesh_calc_edges_legacy(struct Mesh *me, bool use_old);
+
+void BKE_mesh_do_versions_cd_flag_init(struct Mesh *mesh);
+
/* Inlines */
/* NOTE(@sybren): Instead of -1 that function uses ORIGINDEX_NONE as defined in BKE_customdata.h,
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index ecf7a556459..4d883f9e31e 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -572,6 +572,11 @@ struct bNodeSocket *ntreeInsertSocketInterface(struct bNodeTree *ntree,
struct bNodeSocket *ntreeAddSocketInterfaceFromSocket(struct bNodeTree *ntree,
struct bNode *from_node,
struct bNodeSocket *from_sock);
+struct bNodeSocket *ntreeAddSocketInterfaceFromSocketWithName(struct bNodeTree *ntree,
+ struct bNode *from_node,
+ struct bNodeSocket *from_sock,
+ const char *idname,
+ const char *name);
struct bNodeSocket *ntreeInsertSocketInterfaceFromSocket(struct bNodeTree *ntree,
struct bNodeSocket *next_sock,
struct bNode *from_node,
@@ -983,8 +988,6 @@ void node_type_socket_templates(struct bNodeType *ntype,
struct bNodeSocketTemplate *outputs);
void node_type_size(struct bNodeType *ntype, int width, int minwidth, int maxwidth);
void node_type_size_preset(struct bNodeType *ntype, eNodeSizePreset size);
-void node_type_init(struct bNodeType *ntype,
- void (*initfunc)(struct bNodeTree *ntree, struct bNode *node));
/**
* \warning Nodes defining a storage type _must_ allocate this for new nodes.
* Otherwise nodes will reload as undefined (T46619).
@@ -995,17 +998,6 @@ void node_type_storage(struct bNodeType *ntype,
void (*copyfunc)(struct bNodeTree *dest_ntree,
struct bNode *dest_node,
const struct bNode *src_node));
-void node_type_update(struct bNodeType *ntype,
- void (*updatefunc)(struct bNodeTree *ntree, struct bNode *node));
-void node_type_group_update(struct bNodeType *ntype,
- void (*group_update_func)(struct bNodeTree *ntree,
- struct bNode *node));
-
-void node_type_exec(struct bNodeType *ntype,
- NodeInitExecFunction init_exec_fn,
- NodeFreeExecFunction free_exec_fn,
- NodeExecFunction exec_fn);
-void node_type_gpu(struct bNodeType *ntype, NodeGPUExecFunction gpu_fn);
/** \} */
@@ -1013,7 +1005,7 @@ void node_type_gpu(struct bNodeType *ntype, NodeGPUExecFunction gpu_fn);
/** \name Node Generic Functions
* \{ */
-bool BKE_node_is_connected_to_output(struct bNodeTree *ntree, struct bNode *node);
+bool BKE_node_is_connected_to_output(const struct bNodeTree *ntree, const struct bNode *node);
/* ************** COMMON NODES *************** */
@@ -1028,8 +1020,6 @@ bool BKE_node_is_connected_to_output(struct bNodeTree *ntree, struct bNode *node
#define NODE_GROUP_OUTPUT 8
#define NODE_CUSTOM_GROUP 9
-void BKE_node_tree_unlink_id(ID *id, struct bNodeTree *ntree);
-
/** \} */
/* -------------------------------------------------------------------- */
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index 60dfc0af25f..cfad8c5cfdb 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -283,7 +283,17 @@ void BKE_object_apply_parent_inverse(struct Object *ob);
void BKE_object_matrix_local_get(struct Object *ob, float r_mat[4][4]);
bool BKE_object_pose_context_check(const struct Object *ob);
+
struct Object *BKE_object_pose_armature_get(struct Object *ob);
+/**
+ * A version of #BKE_object_pose_armature_get with an additional check.
+ * When `ob` isn't an armature: only return the referenced pose object
+ * when the active object is in weight paint mode.
+ *
+ * \note Some callers need to check that pose bones are selectable
+ * which isn't the case when the object using the armature isn't in weight-paint mode.
+ */
+struct Object *BKE_object_pose_armature_get_with_wpaint_check(struct Object *ob);
struct Object *BKE_object_pose_armature_get_visible(struct Object *ob,
const struct Scene *scene,
struct ViewLayer *view_layer,
@@ -323,7 +333,7 @@ struct Base **BKE_object_pose_base_array_get(const struct Scene *scene,
void BKE_object_get_parent_matrix(struct Object *ob, struct Object *par, float r_parentmat[4][4]);
/**
- * Compute object world transform and store it in `ob->obmat`.
+ * Compute object world transform and store it in `ob->object_to_world`.
*/
void BKE_object_where_is_calc(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob);
void BKE_object_where_is_calc_ex(struct Depsgraph *depsgraph,
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h
index 9a7d2bde810..a86953f35cc 100644
--- a/source/blender/blenkernel/BKE_screen.h
+++ b/source/blender/blenkernel/BKE_screen.h
@@ -385,6 +385,7 @@ typedef struct MenuType {
bool (*poll)(const struct bContext *C, struct MenuType *mt);
/* draw entirely, view changes should be handled here */
void (*draw)(const struct bContext *C, struct Menu *menu);
+ void (*listener)(const wmRegionListenerParams *params);
/* RNA integration */
ExtensionRNA rna_ext;
diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h
index 11c37a74a54..f0bb530e32b 100644
--- a/source/blender/blenkernel/BKE_sound.h
+++ b/source/blender/blenkernel/BKE_sound.h
@@ -170,7 +170,7 @@ int BKE_sound_scene_playing(struct Scene *scene);
void BKE_sound_free_waveform(struct bSound *sound);
-void BKE_sound_read_waveform(struct Main *bmain, struct bSound *sound, short *stop);
+void BKE_sound_read_waveform(struct Main *bmain, struct bSound *sound, bool *stop);
void BKE_sound_update_scene(struct Depsgraph *depsgraph, struct Scene *scene);
diff --git a/source/blender/blenkernel/BKE_tracking.h b/source/blender/blenkernel/BKE_tracking.h
index 89f30ce8ef8..70c1049b5d7 100644
--- a/source/blender/blenkernel/BKE_tracking.h
+++ b/source/blender/blenkernel/BKE_tracking.h
@@ -657,8 +657,8 @@ void BKE_tracking_reconstruction_context_free(struct MovieReconstructContext *co
* callback in libmv side and passing to an interface.
*/
void BKE_tracking_reconstruction_solve(struct MovieReconstructContext *context,
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress,
char *stats_message,
int message_size);
diff --git a/source/blender/blenkernel/intern/DerivedMesh.cc b/source/blender/blenkernel/intern/DerivedMesh.cc
index 11ef2b08df4..bfdfc447baf 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.cc
+++ b/source/blender/blenkernel/intern/DerivedMesh.cc
@@ -747,7 +747,7 @@ static void mesh_calc_modifiers(struct Depsgraph *depsgraph,
MutableAttributeAccessor attributes = mesh_final->attributes_for_write();
SpanAttributeWriter<float3> rest_positions =
attributes.lookup_or_add_for_write_only_span<float3>("rest_position", ATTR_DOMAIN_POINT);
- if (rest_positions) {
+ if (rest_positions && attributes.domain_size(ATTR_DOMAIN_POINT) > 0) {
attributes.lookup<float3>("position").materialize(rest_positions.span);
rest_positions.finish();
}
@@ -1648,6 +1648,12 @@ static void editbmesh_build_data(struct Depsgraph *depsgraph,
const bool is_mesh_eval_owned = (me_final != mesh->runtime->mesh_eval);
BKE_object_eval_assign_data(obedit, &me_final->id, is_mesh_eval_owned);
+ /* Make sure that drivers can target shapekey properties.
+ * Note that this causes a potential inconsistency, as the shapekey may have a
+ * different topology than the evaluated mesh. */
+ BLI_assert(mesh->key == nullptr || DEG_is_evaluated_id(&mesh->key->id));
+ me_final->key = mesh->key;
+
obedit->runtime.editmesh_eval_cage = me_cage;
obedit->runtime.geometry_set_eval = non_mesh_components;
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 10aa4ec7906..8f6bd812d8e 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -1738,7 +1738,7 @@ void what_does_obaction(Object *ob,
BKE_object_workob_clear(workob);
/* init workob */
- copy_m4_m4(workob->obmat, ob->obmat);
+ copy_m4_m4(workob->object_to_world, ob->object_to_world);
copy_m4_m4(workob->parentinv, ob->parentinv);
copy_m4_m4(workob->constinv, ob->constinv);
workob->parent = ob->parent;
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 2e73cac99b5..e433c26cc54 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -1596,7 +1596,7 @@ void BKE_armature_mat_world_to_pose(Object *ob, const float inmat[4][4], float o
}
/* Get inverse of (armature) object's matrix. */
- invert_m4_m4(obmat, ob->obmat);
+ invert_m4_m4(obmat, ob->object_to_world);
/* multiply given matrix by object's-inverse to find pose-space matrix */
mul_m4_m4m4(outmat, inmat, obmat);
@@ -2569,7 +2569,7 @@ void BKE_pose_where_is(struct Depsgraph *depsgraph, Scene *scene, Object *ob)
}
}
else {
- invert_m4_m4(ob->imat, ob->obmat); /* imat is needed */
+ invert_m4_m4(ob->world_to_object, ob->object_to_world); /* world_to_object is needed */
/* 1. clear flags */
for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
@@ -2696,14 +2696,14 @@ void BKE_pchan_minmax(const Object *ob,
pchan->custom_translation[0],
pchan->custom_translation[1],
pchan->custom_translation[2]);
- mul_m4_series(mat, ob->obmat, tmp, rmat, smat);
+ mul_m4_series(mat, ob->object_to_world, tmp, rmat, smat);
BKE_boundbox_minmax(bb_custom, mat, r_min, r_max);
}
else {
float vec[3];
- mul_v3_m4v3(vec, ob->obmat, pchan_tx->pose_head);
+ mul_v3_m4v3(vec, ob->object_to_world, pchan_tx->pose_head);
minmax_v3v3_v3(r_min, r_max, vec);
- mul_v3_m4v3(vec, ob->obmat, pchan_tx->pose_tail);
+ mul_v3_m4v3(vec, ob->object_to_world, pchan_tx->pose_tail);
minmax_v3v3_v3(r_min, r_max, vec);
}
}
diff --git a/source/blender/blenkernel/intern/armature_deform.c b/source/blender/blenkernel/intern/armature_deform.c
index 89afb886fc2..64a3937c191 100644
--- a/source/blender/blenkernel/intern/armature_deform.c
+++ b/source/blender/blenkernel/intern/armature_deform.c
@@ -582,9 +582,9 @@ static void armature_deform_coords_impl(const Object *ob_arm,
};
float obinv[4][4];
- invert_m4_m4(obinv, ob_target->obmat);
+ invert_m4_m4(obinv, ob_target->object_to_world);
- mul_m4_m4m4(data.postmat, obinv, ob_arm->obmat);
+ mul_m4_m4m4(data.postmat, obinv, ob_arm->object_to_world);
invert_m4_m4(data.premat, data.postmat);
if (em_target != NULL) {
diff --git a/source/blender/blenkernel/intern/armature_update.c b/source/blender/blenkernel/intern/armature_update.c
index 6d7aed239e7..5f749472b2d 100644
--- a/source/blender/blenkernel/intern/armature_update.c
+++ b/source/blender/blenkernel/intern/armature_update.c
@@ -249,11 +249,11 @@ static void apply_curve_transform(
* unless the option to allow curve to be positioned elsewhere is activated (i.e. no root).
*/
if ((ik_data->flag & CONSTRAINT_SPLINEIK_NO_ROOT) == 0) {
- mul_m4_v3(ik_data->tar->obmat, r_vec);
+ mul_m4_v3(ik_data->tar->object_to_world, r_vec);
}
/* Convert the position to pose-space. */
- mul_m4_v3(ob->imat, r_vec);
+ mul_m4_v3(ob->world_to_object, r_vec);
/* Set the new radius (it should be the average value). */
*r_radius = (radius + *r_radius) / 2;
@@ -818,8 +818,8 @@ void BKE_pose_eval_init(struct Depsgraph *depsgraph, Scene *UNUSED(scene), Objec
BLI_assert(object->pose != NULL);
BLI_assert((object->pose->flag & POSE_RECALC) == 0);
- /* imat is needed for solvers. */
- invert_m4_m4(object->imat, object->obmat);
+ /* world_to_object is needed for solvers. */
+ invert_m4_m4(object->world_to_object, object->object_to_world);
/* clear flags */
for (bPoseChannel *pchan = pose->chanbase.first; pchan != NULL; pchan = pchan->next) {
diff --git a/source/blender/blenkernel/intern/asset_catalog.cc b/source/blender/blenkernel/intern/asset_catalog.cc
index 38c712d7e75..62d03b2d79b 100644
--- a/source/blender/blenkernel/intern/asset_catalog.cc
+++ b/source/blender/blenkernel/intern/asset_catalog.cc
@@ -9,6 +9,7 @@
#include "BKE_asset_catalog.hh"
#include "BKE_asset_library.h"
+#include "BKE_asset_library.hh"
#include "BLI_fileops.hh"
#include "BLI_path_util.h"
@@ -787,6 +788,41 @@ void AssetCatalogTree::foreach_root_item(const ItemIterFn callback)
}
}
+bool AssetCatalogTree::is_empty() const
+{
+ return root_items_.empty();
+}
+
+AssetCatalogTreeItem *AssetCatalogTree::find_item(const AssetCatalogPath &path)
+{
+ AssetCatalogTreeItem *result = nullptr;
+ this->foreach_item([&](AssetCatalogTreeItem &item) {
+ if (result) {
+ /* There is no way to stop iteration. */
+ return;
+ }
+ if (item.catalog_path() == path) {
+ result = &item;
+ }
+ });
+ return result;
+}
+
+AssetCatalogTreeItem *AssetCatalogTree::find_root_item(const AssetCatalogPath &path)
+{
+ AssetCatalogTreeItem *result = nullptr;
+ this->foreach_root_item([&](AssetCatalogTreeItem &item) {
+ if (result) {
+ /* There is no way to stop iteration. */
+ return;
+ }
+ if (item.catalog_path() == path) {
+ result = &item;
+ }
+ });
+ return result;
+}
+
/* ---------------------------------------------------------------------- */
/* ---------------------------------------------------------------------- */
diff --git a/source/blender/blenkernel/intern/asset_catalog_path.cc b/source/blender/blenkernel/intern/asset_catalog_path.cc
index 669adb7adf4..9c653c1a137 100644
--- a/source/blender/blenkernel/intern/asset_catalog_path.cc
+++ b/source/blender/blenkernel/intern/asset_catalog_path.cc
@@ -12,7 +12,7 @@ namespace blender::bke {
const char AssetCatalogPath::SEPARATOR = '/';
-AssetCatalogPath::AssetCatalogPath(const std::string &path) : path_(path)
+AssetCatalogPath::AssetCatalogPath(std::string path) : path_(std::move(path))
{
}
diff --git a/source/blender/blenkernel/intern/asset_library.cc b/source/blender/blenkernel/intern/asset_library.cc
index 968873cbcbe..b8420af1168 100644
--- a/source/blender/blenkernel/intern/asset_library.cc
+++ b/source/blender/blenkernel/intern/asset_library.cc
@@ -10,6 +10,7 @@
#include "BKE_main.h"
#include "BKE_preferences.h"
+#include "BLI_fileops.h"
#include "BLI_path_util.h"
#include "DNA_asset_types.h"
@@ -19,6 +20,13 @@
bool blender::bke::AssetLibrary::save_catalogs_when_file_is_saved = true;
+blender::bke::AssetLibrary *BKE_asset_library_load(const Main *bmain,
+ const AssetLibraryReference &library_reference)
+{
+ blender::bke::AssetLibraryService *service = blender::bke::AssetLibraryService::get();
+ return service->get_asset_library(bmain, library_reference);
+}
+
/**
* Loading an asset library at this point only means loading the catalogs. Later on this should
* invoke reading of asset representations too.
@@ -172,4 +180,26 @@ void AssetLibrary::refresh_catalog_simplename(struct AssetMetaData *asset_data)
}
STRNCPY(asset_data->catalog_simple_name, catalog->simple_name.c_str());
}
+
+Vector<AssetLibraryReference> all_valid_asset_library_refs()
+{
+ Vector<AssetLibraryReference> result;
+ int i;
+ LISTBASE_FOREACH_INDEX (const bUserAssetLibrary *, asset_library, &U.asset_libraries, i) {
+ if (!BLI_is_dir(asset_library->path)) {
+ continue;
+ }
+ AssetLibraryReference library_ref{};
+ library_ref.custom_library_index = i;
+ library_ref.type = ASSET_LIBRARY_CUSTOM;
+ result.append(library_ref);
+ }
+
+ AssetLibraryReference library_ref{};
+ library_ref.custom_library_index = -1;
+ library_ref.type = ASSET_LIBRARY_LOCAL;
+ result.append(library_ref);
+ return result;
+}
+
} // namespace blender::bke
diff --git a/source/blender/blenkernel/intern/asset_library_service.cc b/source/blender/blenkernel/intern/asset_library_service.cc
index a4f97234042..cd8de7908bf 100644
--- a/source/blender/blenkernel/intern/asset_library_service.cc
+++ b/source/blender/blenkernel/intern/asset_library_service.cc
@@ -7,11 +7,15 @@
#include "asset_library_service.hh"
#include "BKE_blender.h"
+#include "BKE_preferences.h"
#include "BLI_fileops.h" /* For PATH_MAX (at least on Windows). */
#include "BLI_path_util.h"
#include "BLI_string_ref.hh"
+#include "DNA_asset_types.h"
+#include "DNA_userdef_types.h"
+
#include "CLG_log.h"
static CLG_LogRef LOG = {"bke.asset_service"};
@@ -38,6 +42,38 @@ void AssetLibraryService::destroy()
instance_.reset();
}
+AssetLibrary *AssetLibraryService::get_asset_library(
+ const Main *bmain, const AssetLibraryReference &library_reference)
+{
+ if (library_reference.type == ASSET_LIBRARY_LOCAL) {
+ /* For the "Current File" library we get the asset library root path based on main. */
+ char root_path[FILE_MAX];
+ if (bmain) {
+ BKE_asset_library_find_suitable_root_path_from_main(bmain, root_path);
+ }
+ else {
+ root_path[0] = '\0';
+ }
+
+ if (root_path[0] == '\0') {
+ /* File wasn't saved yet. */
+ return get_asset_library_current_file();
+ }
+
+ return get_asset_library_on_disk(root_path);
+ }
+ if (library_reference.type == ASSET_LIBRARY_CUSTOM) {
+ bUserAssetLibrary *user_library = BKE_preferences_asset_library_find_from_index(
+ &U, library_reference.custom_library_index);
+
+ if (user_library) {
+ return get_asset_library_on_disk(user_library->path);
+ }
+ }
+
+ return nullptr;
+}
+
namespace {
std::string normalize_directory_path(StringRefNull directory)
{
diff --git a/source/blender/blenkernel/intern/asset_library_service.hh b/source/blender/blenkernel/intern/asset_library_service.hh
index 277fb9db6cc..c22c6b182ce 100644
--- a/source/blender/blenkernel/intern/asset_library_service.hh
+++ b/source/blender/blenkernel/intern/asset_library_service.hh
@@ -44,6 +44,9 @@ class AssetLibraryService {
/** Destroy the AssetLibraryService singleton. It will be reallocated by #get() if necessary. */
static void destroy();
+ AssetLibrary *get_asset_library(const Main *bmain,
+ const AssetLibraryReference &library_reference);
+
/**
* Get the given asset library. Opens it (i.e. creates a new AssetLibrary instance) if necessary.
*/
diff --git a/source/blender/blenkernel/intern/attribute_access.cc b/source/blender/blenkernel/intern/attribute_access.cc
index 544427cfdd3..e5c43a3f90e 100644
--- a/source/blender/blenkernel/intern/attribute_access.cc
+++ b/source/blender/blenkernel/intern/attribute_access.cc
@@ -247,11 +247,8 @@ static bool add_custom_data_layer_from_attribute_init(const AttributeIDRef &attr
}
case AttributeInit::Type::MoveArray: {
void *source_data = static_cast<const AttributeInitMoveArray &>(initializer).data;
- void *data = add_generic_custom_data_layer(
+ add_generic_custom_data_layer(
custom_data, data_type, CD_ASSIGN, source_data, domain_num, attribute_id);
- if (source_data != nullptr && data == nullptr) {
- MEM_freeN(source_data);
- }
break;
}
}
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 23cf368af01..3598201d906 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -59,7 +59,7 @@ void BKE_blender_free(void)
{
/* samples are in a global list..., also sets G_MAIN->sound->sample NULL */
- /* Needs to run before main free as wm is still referenced for icons preview jobs. */
+ /* Needs to run before main free as window-manager is still referenced for icons preview jobs. */
BKE_studiolight_free();
BKE_blender_globals_clear();
diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c
index 2e07b52c7bf..a0458f0f8d8 100644
--- a/source/blender/blenkernel/intern/boids.c
+++ b/source/blender/blenkernel/intern/boids.c
@@ -959,7 +959,7 @@ void boids_precalc_rules(ParticleSettings *part, float cfra)
if (flbr->ob && flbr->cfra != cfra) {
/* save object locations for velocity calculations */
copy_v3_v3(flbr->oloc, flbr->loc);
- copy_v3_v3(flbr->loc, flbr->ob->obmat[3]);
+ copy_v3_v3(flbr->loc, flbr->ob->object_to_world[3]);
flbr->cfra = cfra;
}
}
diff --git a/source/blender/blenkernel/intern/camera.c b/source/blender/blenkernel/intern/camera.c
index 8608ce97397..7c1193d80ab 100644
--- a/source/blender/blenkernel/intern/camera.c
+++ b/source/blender/blenkernel/intern/camera.c
@@ -221,16 +221,16 @@ float BKE_camera_object_dof_distance(const Object *ob)
}
if (cam->dof.focus_object) {
float view_dir[3], dof_dir[3];
- normalize_v3_v3(view_dir, ob->obmat[2]);
+ normalize_v3_v3(view_dir, ob->object_to_world[2]);
bPoseChannel *pchan = BKE_pose_channel_find_name(cam->dof.focus_object->pose,
cam->dof.focus_subtarget);
if (pchan) {
float posemat[4][4];
- mul_m4_m4m4(posemat, cam->dof.focus_object->obmat, pchan->pose_mat);
- sub_v3_v3v3(dof_dir, ob->obmat[3], posemat[3]);
+ mul_m4_m4m4(posemat, cam->dof.focus_object->object_to_world, pchan->pose_mat);
+ sub_v3_v3v3(dof_dir, ob->object_to_world[3], posemat[3]);
}
else {
- sub_v3_v3v3(dof_dir, ob->obmat[3], cam->dof.focus_object->obmat[3]);
+ sub_v3_v3v3(dof_dir, ob->object_to_world[3], cam->dof.focus_object->object_to_world[3]);
}
return fabsf(dot_v3v3(view_dir, dof_dir));
}
@@ -628,7 +628,7 @@ static void camera_frame_fit_data_init(const Scene *scene,
BKE_camera_params_compute_matrix(params);
/* initialize callback data */
- copy_m3_m4(data->camera_rotmat, (float(*)[4])ob->obmat);
+ copy_m3_m4(data->camera_rotmat, (float(*)[4])ob->object_to_world);
normalize_m3(data->camera_rotmat);
/* To transform a plane which is in its homogeneous representation (4d vector),
* we need the inverse of the transpose of the transform matrix... */
@@ -828,7 +828,7 @@ bool BKE_camera_view_frame_fit_to_coords(const Depsgraph *depsgraph,
static void camera_model_matrix(const Object *camera, float r_modelmat[4][4])
{
- copy_m4_m4(r_modelmat, camera->obmat);
+ copy_m4_m4(r_modelmat, camera->object_to_world);
}
static void camera_stereo3d_model_matrix(const Object *camera,
@@ -854,7 +854,7 @@ static void camera_stereo3d_model_matrix(const Object *camera,
}
float size[3];
- mat4_to_size(size, camera->obmat);
+ mat4_to_size(size, camera->object_to_world);
size_to_mat4(sizemat, size);
if (pivot == CAM_S3D_PIVOT_CENTER) {
@@ -894,7 +894,7 @@ static void camera_stereo3d_model_matrix(const Object *camera,
toeinmat[3][0] = interocular_distance * fac_signed;
/* transform */
- normalize_m4_m4(r_modelmat, camera->obmat);
+ normalize_m4_m4(r_modelmat, camera->object_to_world);
mul_m4_m4m4(r_modelmat, r_modelmat, toeinmat);
/* scale back to the original size */
@@ -902,7 +902,7 @@ static void camera_stereo3d_model_matrix(const Object *camera,
}
else { /* CAM_S3D_PIVOT_LEFT, CAM_S3D_PIVOT_RIGHT */
/* rotate perpendicular to the interocular line */
- normalize_m4_m4(r_modelmat, camera->obmat);
+ normalize_m4_m4(r_modelmat, camera->object_to_world);
mul_m4_m4m4(r_modelmat, r_modelmat, rotmat);
/* translate along the interocular line */
@@ -918,7 +918,7 @@ static void camera_stereo3d_model_matrix(const Object *camera,
}
}
else {
- normalize_m4_m4(r_modelmat, camera->obmat);
+ normalize_m4_m4(r_modelmat, camera->object_to_world);
/* translate - no rotation in CAM_S3D_OFFAXIS, CAM_S3D_PARALLEL */
translate_m4(r_modelmat, -interocular_distance * fac_signed, 0.0f, 0.0f);
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index 89983eb8f62..88ba50fe901 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -269,7 +269,7 @@ static int do_step_cloth(
/* Get the current position. */
copy_v3_v3(verts->xconst, mvert[i].co);
- mul_m4_v3(ob->obmat, verts->xconst);
+ mul_m4_v3(ob->object_to_world, verts->xconst);
if (vert_mass_changed) {
verts->mass = clmd->sim_parms->mass;
@@ -581,11 +581,11 @@ static void cloth_to_object(Object *ob, ClothModifierData *clmd, float (*vertexC
if (clmd->clothObject) {
/* Inverse matrix is not up to date. */
- invert_m4_m4(ob->imat, ob->obmat);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
for (i = 0; i < cloth->mvert_num; i++) {
copy_v3_v3(vertexCos[i], cloth->verts[i].x);
- mul_m4_v3(ob->imat, vertexCos[i]); /* cloth is in global coords */
+ mul_m4_v3(ob->world_to_object, vertexCos[i]); /* cloth is in global coords */
}
}
}
@@ -763,11 +763,11 @@ static bool cloth_from_object(
if (first) {
copy_v3_v3(verts->x, mvert[i].co);
- mul_m4_v3(ob->obmat, verts->x);
+ mul_m4_v3(ob->object_to_world, verts->x);
if (shapekey_rest) {
copy_v3_v3(verts->xrest, shapekey_rest[i]);
- mul_m4_v3(ob->obmat, verts->xrest);
+ mul_m4_v3(ob->object_to_world, verts->xrest);
}
else {
copy_v3_v3(verts->xrest, verts->x);
@@ -1155,7 +1155,7 @@ static void cloth_update_verts(Object *ob, ClothModifierData *clmd, Mesh *mesh)
/* vertex count is already ensured to match */
for (i = 0; i < mesh->totvert; i++, verts++) {
copy_v3_v3(verts->xrest, mvert[i].co);
- mul_m4_v3(ob->obmat, verts->xrest);
+ mul_m4_v3(ob->object_to_world, verts->xrest);
}
}
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index a6a6a1ca28f..bcc4ad0cb55 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -149,7 +149,7 @@ bConstraintOb *BKE_constraints_make_evalob(
/* Quats/Axis-Angle, so Eulers should just use default order */
cob->rotOrder = EULER_ORDER_DEFAULT;
}
- copy_m4_m4(cob->matrix, ob->obmat);
+ copy_m4_m4(cob->matrix, ob->object_to_world);
}
else {
unit_m4(cob->matrix);
@@ -175,7 +175,7 @@ bConstraintOb *BKE_constraints_make_evalob(
}
/* matrix in world-space */
- mul_m4_m4m4(cob->matrix, ob->obmat, cob->pchan->pose_mat);
+ mul_m4_m4m4(cob->matrix, ob->object_to_world, cob->pchan->pose_mat);
}
else {
unit_m4(cob->matrix);
@@ -216,7 +216,7 @@ void BKE_constraints_clear_evalob(bConstraintOb *cob)
/* cob->ob might not exist! */
if (cob->ob) {
/* copy new ob-matrix back to owner */
- copy_m4_m4(cob->ob->obmat, cob->matrix);
+ copy_m4_m4(cob->ob->object_to_world, cob->matrix);
/* copy inverse of delta back to owner */
invert_m4_m4(cob->ob->constinv, delta);
@@ -227,7 +227,7 @@ void BKE_constraints_clear_evalob(bConstraintOb *cob)
/* cob->ob or cob->pchan might not exist */
if (cob->ob && cob->pchan) {
/* copy new pose-matrix back to owner */
- mul_m4_m4m4(cob->pchan->pose_mat, cob->ob->imat, cob->matrix);
+ mul_m4_m4m4(cob->pchan->pose_mat, cob->ob->world_to_object, cob->matrix);
/* copy inverse of delta back to owner */
invert_m4_m4(cob->pchan->constinv, delta);
@@ -276,7 +276,7 @@ void BKE_constraint_mat_convertspace(Object *ob,
}
else {
/* World to pose. */
- invert_m4_m4(imat, ob->obmat);
+ invert_m4_m4(imat, ob->object_to_world);
mul_m4_m4m4(mat, imat, mat);
/* Use pose-space as stepping stone for other spaces. */
@@ -319,7 +319,7 @@ void BKE_constraint_mat_convertspace(Object *ob,
}
else {
/* Pose to world. */
- mul_m4_m4m4(mat, ob->obmat, mat);
+ mul_m4_m4m4(mat, ob->object_to_world, mat);
/* Use world-space as stepping stone for other spaces. */
if (to != CONSTRAINT_SPACE_WORLD) {
/* Call self with slightly different values. */
@@ -429,7 +429,7 @@ void BKE_constraint_mat_convertspace(Object *ob,
/* Check if object has a parent. */
if (ob->parent) {
/* 'subtract' parent's effects from owner. */
- mul_m4_m4m4(diff_mat, ob->parent->obmat, ob->parentinv);
+ mul_m4_m4m4(diff_mat, ob->parent->object_to_world, ob->parentinv);
invert_m4_m4_safe(imat, diff_mat);
mul_m4_m4m4(mat, imat, mat);
}
@@ -465,7 +465,7 @@ void BKE_constraint_mat_convertspace(Object *ob,
/* check that object has a parent - otherwise this won't work */
if (ob->parent) {
/* 'add' parent's effect back to owner */
- mul_m4_m4m4(diff_mat, ob->parent->obmat, ob->parentinv);
+ mul_m4_m4m4(diff_mat, ob->parent->object_to_world, ob->parentinv);
mul_m4_m4m4(mat, diff_mat, mat);
}
else {
@@ -518,7 +518,7 @@ static void contarget_get_mesh_mat(Object *ob, const char *substring, float mat[
const int defgroup = BKE_object_defgroup_name_index(ob, substring);
/* initialize target matrix using target matrix */
- copy_m4_m4(mat, ob->obmat);
+ copy_m4_m4(mat, ob->object_to_world);
/* get index of vertex group */
if (defgroup == -1) {
@@ -584,7 +584,7 @@ static void contarget_get_mesh_mat(Object *ob, const char *substring, float mat[
* calc_gizmo_stats, V3D_ORIENT_NORMAL case */
/* We need the transpose of the inverse for a normal. */
- copy_m3_m4(imat, ob->obmat);
+ copy_m3_m4(imat, ob->object_to_world);
invert_m3_m3(tmat, imat);
transpose_m3(tmat);
@@ -605,7 +605,7 @@ static void contarget_get_mesh_mat(Object *ob, const char *substring, float mat[
normalize_m4(mat);
/* apply the average coordinate as the new location */
- mul_v3_m4v3(mat[3], ob->obmat, vec);
+ mul_v3_m4v3(mat[3], ob->object_to_world, vec);
}
/* function that sets the given matrix based on given vertex group in lattice */
@@ -627,7 +627,7 @@ static void contarget_get_lattice_mat(Object *ob, const char *substring, float m
const int defgroup = BKE_object_defgroup_name_index(ob, substring);
/* initialize target matrix using target matrix */
- copy_m4_m4(mat, ob->obmat);
+ copy_m4_m4(mat, ob->object_to_world);
/* get index of vertex group */
if (defgroup == -1) {
@@ -661,11 +661,11 @@ static void contarget_get_lattice_mat(Object *ob, const char *substring, float m
}
}
- /* find average location, then multiply by ob->obmat to find world-space location */
+ /* find average location, then multiply by ob->object_to_world to find world-space location */
if (grouped) {
mul_v3_fl(vec, 1.0f / grouped);
}
- mul_v3_m4v3(tvec, ob->obmat, vec);
+ mul_v3_m4v3(tvec, ob->object_to_world, vec);
/* copy new location to matrix */
copy_v3_v3(mat[3], tvec);
@@ -684,7 +684,7 @@ static void constraint_target_to_mat4(Object *ob,
{
/* Case OBJECT */
if (substring[0] == '\0') {
- copy_m4_m4(mat, ob->obmat);
+ copy_m4_m4(mat, ob->object_to_world);
BKE_constraint_mat_convertspace(ob, NULL, cob, mat, from, to, false);
}
/* Case VERTEXGROUP */
@@ -719,7 +719,7 @@ static void constraint_target_to_mat4(Object *ob,
if (headtail < 0.000001f && !(is_bbone && full_bbone)) {
/* skip length interpolation if set to head */
- mul_m4_m4m4(mat, ob->obmat, pchan->pose_mat);
+ mul_m4_m4m4(mat, ob->object_to_world, pchan->pose_mat);
}
else if (is_bbone && pchan->bone->segments == pchan->runtime.bbone_segments) {
/* use point along bbone */
@@ -745,7 +745,7 @@ static void constraint_target_to_mat4(Object *ob,
mul_v3_m4v3(tempmat[3], pchan->pose_mat, loc);
}
- mul_m4_m4m4(mat, ob->obmat, tempmat);
+ mul_m4_m4m4(mat, ob->object_to_world, tempmat);
}
else {
float tempmat[4][4], loc[3];
@@ -757,11 +757,11 @@ static void constraint_target_to_mat4(Object *ob,
copy_m4_m4(tempmat, pchan->pose_mat);
copy_v3_v3(tempmat[3], loc);
- mul_m4_m4m4(mat, ob->obmat, tempmat);
+ mul_m4_m4m4(mat, ob->object_to_world, tempmat);
}
}
else {
- copy_m4_m4(mat, ob->obmat);
+ copy_m4_m4(mat, ob->object_to_world);
}
/* convert matrix space as required */
@@ -1069,7 +1069,7 @@ static void childof_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *tar
if (data->flag & CHILDOF_SET_INVERSE) {
invert_m4_m4(data->invmat, parmat);
if (cob->pchan != NULL) {
- mul_m4_series(data->invmat, data->invmat, cob->ob->obmat);
+ mul_m4_series(data->invmat, data->invmat, cob->ob->object_to_world);
}
copy_m4_m4(inverse_matrix, data->invmat);
@@ -1388,8 +1388,8 @@ static void kinematic_get_tarmat(struct Depsgraph *UNUSED(depsgraph),
else {
float vec[3];
/* move grabtarget into world space */
- mul_v3_m4v3(vec, ob->obmat, data->grabtarget);
- copy_m4_m4(ct->matrix, ob->obmat);
+ mul_v3_m4v3(vec, ob->object_to_world, data->grabtarget);
+ copy_m4_m4(ct->matrix, ob->object_to_world);
copy_v3_v3(ct->matrix[3], vec);
}
}
@@ -1528,7 +1528,7 @@ static void followpath_get_tarmat(struct Depsgraph *UNUSED(depsgraph),
copy_v3_v3(totmat[3], vec);
- mul_m4_m4m4(ct->matrix, ct->tar->obmat, totmat);
+ mul_m4_m4m4(ct->matrix, ct->tar->object_to_world, totmat);
}
}
}
@@ -2557,7 +2557,7 @@ static void armdef_get_tarmat(struct Depsgraph *UNUSED(depsgraph),
bPoseChannel *pchan = BKE_pose_channel_find_name(ct->tar->pose, ct->subtarget);
if (pchan != NULL) {
- mul_m4_m4m4(ct->matrix, ct->tar->obmat, pchan->pose_mat);
+ mul_m4_m4m4(ct->matrix, ct->tar->object_to_world, pchan->pose_mat);
return;
}
}
@@ -2613,7 +2613,7 @@ static void armdef_accumulate_bone(bConstraintTarget *ct,
float weight = ct->weight;
/* Our object's location in target pose space. */
- invert_m4_m4(iobmat, ct->tar->obmat);
+ invert_m4_m4(iobmat, ct->tar->object_to_world);
mul_v3_m4v3(co, iobmat, wco);
/* Multiply by the envelope weight when appropriate. */
@@ -2644,7 +2644,7 @@ static void armdef_accumulate_bone(bConstraintTarget *ct,
mul_m4_m4m4(basemat, bone->arm_mat, b_bone_rest_mats[index].mat);
}
- armdef_accumulate_matrix(ct->tar->obmat,
+ armdef_accumulate_matrix(ct->tar->object_to_world,
iobmat,
basemat,
b_bone_mats[index + 1].mat,
@@ -2657,7 +2657,7 @@ static void armdef_accumulate_bone(bConstraintTarget *ct,
mul_m4_m4m4(basemat, bone->arm_mat, b_bone_rest_mats[index + 1].mat);
}
- armdef_accumulate_matrix(ct->tar->obmat,
+ armdef_accumulate_matrix(ct->tar->object_to_world,
iobmat,
basemat,
b_bone_mats[index + 2].mat,
@@ -2667,8 +2667,13 @@ static void armdef_accumulate_bone(bConstraintTarget *ct,
}
else {
/* Simple bone. This requires DEG_OPCODE_BONE_DONE dependency due to chan_mat. */
- armdef_accumulate_matrix(
- ct->tar->obmat, iobmat, bone->arm_mat, pchan->chan_mat, weight, r_sum_mat, r_sum_dq);
+ armdef_accumulate_matrix(ct->tar->object_to_world,
+ iobmat,
+ bone->arm_mat,
+ pchan->chan_mat,
+ weight,
+ r_sum_mat,
+ r_sum_dq);
}
/* Accumulate the weight. */
@@ -2694,7 +2699,7 @@ static void armdef_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targ
/* For constraints on bones, use the rest position to bind b-bone segments
* and envelopes, to allow safely changing the bone location as if parented. */
copy_v3_v3(input_co, cob->pchan->bone->arm_head);
- mul_m4_v3(cob->ob->obmat, input_co);
+ mul_m4_v3(cob->ob->object_to_world, input_co);
}
else {
copy_v3_v3(input_co, cob->matrix[3]);
@@ -3927,7 +3932,7 @@ static void clampto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *tar
unit_m4(totmat);
copy_v3_v3(totmat[3], vec);
- mul_m4_m4m4(targetMatrix, ct->tar->obmat, totmat);
+ mul_m4_m4m4(targetMatrix, ct->tar->object_to_world, totmat);
}
}
@@ -4227,7 +4232,7 @@ static void shrinkwrap_get_tarmat(struct Depsgraph *UNUSED(depsgraph),
if (BKE_shrinkwrap_init_tree(
&tree, target_eval, scon->shrinkType, scon->shrinkMode, do_track_normal)) {
- BLI_space_transform_from_matrices(&transform, cob->matrix, ct->tar->obmat);
+ BLI_space_transform_from_matrices(&transform, cob->matrix, ct->tar->object_to_world);
switch (scon->shrinkType) {
case MOD_SHRINKWRAP_NEAREST_SURFACE:
@@ -4902,7 +4907,7 @@ static void followtrack_evaluate_using_3d_position_object(FollowTrackContext *co
/* Object matrix of the camera. */
float camera_obmat[4][4];
- copy_m4_m4(camera_obmat, camera_object->obmat);
+ copy_m4_m4(camera_obmat, camera_object->object_to_world);
/* Calculate inverted matrix of the solved camera at the current time. */
float reconstructed_camera_mat[4][4];
@@ -5054,10 +5059,10 @@ static void followtrack_project_to_depth_object_if_needed(FollowTrackContext *co
}
float depth_object_mat_inv[4][4];
- invert_m4_m4(depth_object_mat_inv, depth_object->obmat);
+ invert_m4_m4(depth_object_mat_inv, depth_object->object_to_world);
float ray_start[3], ray_end[3];
- mul_v3_m4v3(ray_start, depth_object_mat_inv, context->camera_object->obmat[3]);
+ mul_v3_m4v3(ray_start, depth_object_mat_inv, context->camera_object->object_to_world[3]);
mul_v3_m4v3(ray_end, depth_object_mat_inv, cob->matrix[3]);
float ray_direction[3];
@@ -5080,7 +5085,7 @@ static void followtrack_project_to_depth_object_if_needed(FollowTrackContext *co
&tree_data);
if (result != -1) {
- mul_v3_m4v3(cob->matrix[3], depth_object->obmat, hit.co);
+ mul_v3_m4v3(cob->matrix[3], depth_object->object_to_world, hit.co);
}
free_bvhtree_from_mesh(&tree_data);
@@ -5128,9 +5133,9 @@ static void followtrack_evaluate_using_2d_position(FollowTrackContext *context,
}
float disp[3];
- mul_v3_m4v3(disp, camera_object->obmat, vec);
+ mul_v3_m4v3(disp, camera_object->object_to_world, vec);
- copy_m4_m4(rmat, camera_object->obmat);
+ copy_m4_m4(rmat, camera_object->object_to_world);
zero_v3(rmat[3]);
mul_m4_m4m4(cob->matrix, cob->matrix, rmat);
@@ -5152,10 +5157,10 @@ static void followtrack_evaluate_using_2d_position(FollowTrackContext *context,
}
float disp[3];
- mul_v3_m4v3(disp, camera_object->obmat, vec);
+ mul_v3_m4v3(disp, camera_object->object_to_world, vec);
/* apply camera rotation so Z-axis would be co-linear */
- copy_m4_m4(rmat, camera_object->obmat);
+ copy_m4_m4(rmat, camera_object->object_to_world);
zero_v3(rmat[3]);
mul_m4_m4m4(cob->matrix, cob->matrix, rmat);
@@ -5303,7 +5308,7 @@ static void objectsolver_evaluate(bConstraint *con, bConstraintOb *cob, ListBase
BKE_tracking_camera_get_reconstructed_interpolate(tracking, object, framenr, mat);
invert_m4_m4(imat, mat);
- mul_m4_m4m4(parmat, camob->obmat, imat);
+ mul_m4_m4m4(parmat, camob->object_to_world, imat);
copy_m4_m4(obmat, cob->matrix);
@@ -5650,7 +5655,7 @@ bool BKE_constraint_apply_for_object(Depsgraph *depsgraph,
BLI_freelinkN(&single_con, new_con);
/* Apply transform from matrix. */
- BKE_object_apply_mat4(ob, ob_eval->obmat, true, true);
+ BKE_object_apply_mat4(ob, ob_eval->object_to_world, true, true);
return true;
}
@@ -6237,7 +6242,7 @@ void BKE_constraint_target_matrix_get(struct Depsgraph *depsgraph,
cob->ob = (Object *)ownerdata;
cob->pchan = NULL;
if (cob->ob) {
- copy_m4_m4(cob->matrix, cob->ob->obmat);
+ copy_m4_m4(cob->matrix, cob->ob->object_to_world);
copy_m4_m4(cob->startmat, cob->matrix);
}
else {
diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c
index d7bd0038d3c..1d6092849cc 100644
--- a/source/blender/blenkernel/intern/context.c
+++ b/source/blender/blenkernel/intern/context.c
@@ -393,37 +393,37 @@ static void *ctx_data_pointer_get(const bContext *C, const char *member)
return NULL;
}
-static int ctx_data_pointer_verify(const bContext *C, const char *member, void **pointer)
+static bool ctx_data_pointer_verify(const bContext *C, const char *member, void **pointer)
{
/* if context is NULL, pointer must be NULL too and that is a valid return */
if (C == NULL) {
*pointer = NULL;
- return 1;
+ return true;
}
bContextDataResult result;
if (ctx_data_get((bContext *)C, member, &result) == CTX_RESULT_OK) {
BLI_assert(result.type == CTX_DATA_TYPE_POINTER);
*pointer = result.ptr.data;
- return 1;
+ return true;
}
*pointer = NULL;
- return 0;
+ return false;
}
-static int ctx_data_collection_get(const bContext *C, const char *member, ListBase *list)
+static bool ctx_data_collection_get(const bContext *C, const char *member, ListBase *list)
{
bContextDataResult result;
if (ctx_data_get((bContext *)C, member, &result) == CTX_RESULT_OK) {
BLI_assert(result.type == CTX_DATA_TYPE_COLLECTION);
*list = result.list;
- return 1;
+ return true;
}
BLI_listbase_clear(list);
- return 0;
+ return false;
}
static int ctx_data_base_collection_get(const bContext *C, const char *member, ListBase *list)
@@ -681,7 +681,7 @@ void CTX_data_list_add_ptr(bContextDataResult *result, const PointerRNA *ptr)
BLI_addtail(&result->list, link);
}
-int ctx_data_list_count(const bContext *C, int (*func)(const bContext *, ListBase *))
+int ctx_data_list_count(const bContext *C, bool (*func)(const bContext *, ListBase *))
{
ListBase list;
@@ -1291,62 +1291,62 @@ ToolSettings *CTX_data_tool_settings(const bContext *C)
return NULL;
}
-int CTX_data_selected_ids(const bContext *C, ListBase *list)
+bool CTX_data_selected_ids(const bContext *C, ListBase *list)
{
return ctx_data_collection_get(C, "selected_ids", list);
}
-int CTX_data_selected_nodes(const bContext *C, ListBase *list)
+bool CTX_data_selected_nodes(const bContext *C, ListBase *list)
{
return ctx_data_collection_get(C, "selected_nodes", list);
}
-int CTX_data_selected_editable_objects(const bContext *C, ListBase *list)
+bool CTX_data_selected_editable_objects(const bContext *C, ListBase *list)
{
return ctx_data_collection_get(C, "selected_editable_objects", list);
}
-int CTX_data_selected_editable_bases(const bContext *C, ListBase *list)
+bool CTX_data_selected_editable_bases(const bContext *C, ListBase *list)
{
return ctx_data_base_collection_get(C, "selected_editable_objects", list);
}
-int CTX_data_editable_objects(const bContext *C, ListBase *list)
+bool CTX_data_editable_objects(const bContext *C, ListBase *list)
{
return ctx_data_collection_get(C, "editable_objects", list);
}
-int CTX_data_editable_bases(const bContext *C, ListBase *list)
+bool CTX_data_editable_bases(const bContext *C, ListBase *list)
{
return ctx_data_base_collection_get(C, "editable_objects", list);
}
-int CTX_data_selected_objects(const bContext *C, ListBase *list)
+bool CTX_data_selected_objects(const bContext *C, ListBase *list)
{
return ctx_data_collection_get(C, "selected_objects", list);
}
-int CTX_data_selected_bases(const bContext *C, ListBase *list)
+bool CTX_data_selected_bases(const bContext *C, ListBase *list)
{
return ctx_data_base_collection_get(C, "selected_objects", list);
}
-int CTX_data_visible_objects(const bContext *C, ListBase *list)
+bool CTX_data_visible_objects(const bContext *C, ListBase *list)
{
return ctx_data_collection_get(C, "visible_objects", list);
}
-int CTX_data_visible_bases(const bContext *C, ListBase *list)
+bool CTX_data_visible_bases(const bContext *C, ListBase *list)
{
return ctx_data_base_collection_get(C, "visible_objects", list);
}
-int CTX_data_selectable_objects(const bContext *C, ListBase *list)
+bool CTX_data_selectable_objects(const bContext *C, ListBase *list)
{
return ctx_data_collection_get(C, "selectable_objects", list);
}
-int CTX_data_selectable_bases(const bContext *C, ListBase *list)
+bool CTX_data_selectable_bases(const bContext *C, ListBase *list)
{
return ctx_data_base_collection_get(C, "selectable_objects", list);
}
@@ -1404,22 +1404,22 @@ struct CacheFile *CTX_data_edit_cachefile(const bContext *C)
return ctx_data_pointer_get(C, "edit_cachefile");
}
-int CTX_data_selected_bones(const bContext *C, ListBase *list)
+bool CTX_data_selected_bones(const bContext *C, ListBase *list)
{
return ctx_data_collection_get(C, "selected_bones", list);
}
-int CTX_data_selected_editable_bones(const bContext *C, ListBase *list)
+bool CTX_data_selected_editable_bones(const bContext *C, ListBase *list)
{
return ctx_data_collection_get(C, "selected_editable_bones", list);
}
-int CTX_data_visible_bones(const bContext *C, ListBase *list)
+bool CTX_data_visible_bones(const bContext *C, ListBase *list)
{
return ctx_data_collection_get(C, "visible_bones", list);
}
-int CTX_data_editable_bones(const bContext *C, ListBase *list)
+bool CTX_data_editable_bones(const bContext *C, ListBase *list)
{
return ctx_data_collection_get(C, "editable_bones", list);
}
@@ -1429,17 +1429,17 @@ struct bPoseChannel *CTX_data_active_pose_bone(const bContext *C)
return ctx_data_pointer_get(C, "active_pose_bone");
}
-int CTX_data_selected_pose_bones(const bContext *C, ListBase *list)
+bool CTX_data_selected_pose_bones(const bContext *C, ListBase *list)
{
return ctx_data_collection_get(C, "selected_pose_bones", list);
}
-int CTX_data_selected_pose_bones_from_active_object(const bContext *C, ListBase *list)
+bool CTX_data_selected_pose_bones_from_active_object(const bContext *C, ListBase *list)
{
return ctx_data_collection_get(C, "selected_pose_bones_from_active_object", list);
}
-int CTX_data_visible_pose_bones(const bContext *C, ListBase *list)
+bool CTX_data_visible_pose_bones(const bContext *C, ListBase *list)
{
return ctx_data_collection_get(C, "visible_pose_bones", list);
}
@@ -1459,17 +1459,17 @@ bGPDframe *CTX_data_active_gpencil_frame(const bContext *C)
return ctx_data_pointer_get(C, "active_gpencil_frame");
}
-int CTX_data_visible_gpencil_layers(const bContext *C, ListBase *list)
+bool CTX_data_visible_gpencil_layers(const bContext *C, ListBase *list)
{
return ctx_data_collection_get(C, "visible_gpencil_layers", list);
}
-int CTX_data_editable_gpencil_layers(const bContext *C, ListBase *list)
+bool CTX_data_editable_gpencil_layers(const bContext *C, ListBase *list)
{
return ctx_data_collection_get(C, "editable_gpencil_layers", list);
}
-int CTX_data_editable_gpencil_strokes(const bContext *C, ListBase *list)
+bool CTX_data_editable_gpencil_strokes(const bContext *C, ListBase *list)
{
return ctx_data_collection_get(C, "editable_gpencil_strokes", list);
}
diff --git a/source/blender/blenkernel/intern/curve_deform.c b/source/blender/blenkernel/intern/curve_deform.c
index 9a27ba91c2f..066d8494451 100644
--- a/source/blender/blenkernel/intern/curve_deform.c
+++ b/source/blender/blenkernel/intern/curve_deform.c
@@ -44,8 +44,8 @@ typedef struct {
static void init_curve_deform(const Object *ob_curve, const Object *ob_target, CurveDeform *cd)
{
float imat[4][4];
- invert_m4_m4(imat, ob_target->obmat);
- mul_m4_m4m4(cd->objectspace, imat, ob_curve->obmat);
+ invert_m4_m4(imat, ob_target->object_to_world);
+ mul_m4_m4m4(cd->objectspace, imat, ob_curve->object_to_world);
invert_m4_m4(cd->curvespace, cd->objectspace);
copy_m3_m4(cd->objectspace3, cd->objectspace);
cd->no_rot_axis = 0;
diff --git a/source/blender/blenkernel/intern/curve_to_mesh_convert.cc b/source/blender/blenkernel/intern/curve_to_mesh_convert.cc
index ecf3be9bd81..3a86068d8e8 100644
--- a/source/blender/blenkernel/intern/curve_to_mesh_convert.cc
+++ b/source/blender/blenkernel/intern/curve_to_mesh_convert.cc
@@ -71,7 +71,7 @@ static void fill_mesh_topology(const int vert_offset,
MEdge &edge = edges[profile_edge_offset + i_ring];
edge.v1 = ring_vert_offset + i_profile;
edge.v2 = next_ring_vert_offset + i_profile;
- edge.flag = ME_EDGEDRAW | ME_EDGERENDER;
+ edge.flag = ME_EDGEDRAW;
}
}
@@ -87,7 +87,7 @@ static void fill_mesh_topology(const int vert_offset,
MEdge &edge = edges[ring_edge_offset + i_profile];
edge.v1 = ring_vert_offset + i_profile;
edge.v2 = ring_vert_offset + i_next_profile;
- edge.flag = ME_EDGEDRAW | ME_EDGERENDER;
+ edge.flag = ME_EDGEDRAW;
}
}
diff --git a/source/blender/blenkernel/intern/curves.cc b/source/blender/blenkernel/intern/curves.cc
index 72e53023d6d..61755a5be9b 100644
--- a/source/blender/blenkernel/intern/curves.cc
+++ b/source/blender/blenkernel/intern/curves.cc
@@ -412,11 +412,11 @@ void curves_copy_parameters(const Curves &src, Curves &dst)
CurvesSurfaceTransforms::CurvesSurfaceTransforms(const Object &curves_ob, const Object *surface_ob)
{
- this->curves_to_world = curves_ob.obmat;
+ this->curves_to_world = curves_ob.object_to_world;
this->world_to_curves = this->curves_to_world.inverted();
if (surface_ob != nullptr) {
- this->surface_to_world = surface_ob->obmat;
+ this->surface_to_world = surface_ob->object_to_world;
this->world_to_surface = this->surface_to_world.inverted();
this->surface_to_curves = this->world_to_curves * this->surface_to_world;
this->curves_to_surface = this->world_to_surface * this->curves_to_world;
diff --git a/source/blender/blenkernel/intern/customdata.cc b/source/blender/blenkernel/intern/customdata.cc
index 03a0f17a4bb..8b791eb4a00 100644
--- a/source/blender/blenkernel/intern/customdata.cc
+++ b/source/blender/blenkernel/intern/customdata.cc
@@ -2800,6 +2800,7 @@ static CustomDataLayer *customData_add_layer__internal(CustomData *data,
int flag = 0;
if (!typeInfo->defaultname && CustomData_has_layer(data, type)) {
+ MEM_SAFE_FREE(layerdata);
return &data->layers[CustomData_get_layer_index(data, type)];
}
@@ -3596,39 +3597,6 @@ const char *CustomData_get_layer_name(const CustomData *data, const int type, co
/* BMesh functions */
-void CustomData_bmesh_update_active_layers(CustomData *fdata, CustomData *ldata)
-{
- int act;
-
- if (CustomData_has_layer(ldata, CD_MLOOPUV)) {
- act = CustomData_get_active_layer(ldata, CD_MLOOPUV);
- CustomData_set_layer_active(fdata, CD_MTFACE, act);
-
- act = CustomData_get_render_layer(ldata, CD_MLOOPUV);
- CustomData_set_layer_render(fdata, CD_MTFACE, act);
-
- act = CustomData_get_clone_layer(ldata, CD_MLOOPUV);
- CustomData_set_layer_clone(fdata, CD_MTFACE, act);
-
- act = CustomData_get_stencil_layer(ldata, CD_MLOOPUV);
- CustomData_set_layer_stencil(fdata, CD_MTFACE, act);
- }
-
- if (CustomData_has_layer(ldata, CD_PROP_BYTE_COLOR)) {
- act = CustomData_get_active_layer(ldata, CD_PROP_BYTE_COLOR);
- CustomData_set_layer_active(fdata, CD_MCOL, act);
-
- act = CustomData_get_render_layer(ldata, CD_PROP_BYTE_COLOR);
- CustomData_set_layer_render(fdata, CD_MCOL, act);
-
- act = CustomData_get_clone_layer(ldata, CD_PROP_BYTE_COLOR);
- CustomData_set_layer_clone(fdata, CD_MCOL, act);
-
- act = CustomData_get_stencil_layer(ldata, CD_PROP_BYTE_COLOR);
- CustomData_set_layer_stencil(fdata, CD_MCOL, act);
- }
-}
-
void CustomData_bmesh_init_pool(CustomData *data, const int totelem, const char htype)
{
int chunksize;
diff --git a/source/blender/blenkernel/intern/displist.cc b/source/blender/blenkernel/intern/displist.cc
index 2b4bd3eb8f6..f8117a89198 100644
--- a/source/blender/blenkernel/intern/displist.cc
+++ b/source/blender/blenkernel/intern/displist.cc
@@ -532,6 +532,11 @@ static ModifierData *curve_get_tessellate_point(const Scene *scene,
return pretessellatePoint;
}
+ if (md->type == eModifierType_Smooth) {
+ /* Smooth modifier works with mesh edges explicitly (so needs tesselation, thus cannnot work on control points). */
+ md->mode &= ~eModifierMode_ApplyOnSpline;
+ return pretessellatePoint;
+ }
if (ELEM(md->type, eModifierType_Hook, eModifierType_Softbody, eModifierType_MeshDeform)) {
pretessellatePoint = md;
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index e177250ae5a..e0ae3f42be6 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -2790,7 +2790,7 @@ static bool dynamicPaint_symmetrizeAdjData(PaintAdjData *ed, int active_points)
int dynamicPaint_createUVSurface(Scene *scene,
DynamicPaintSurface *surface,
float *progress,
- short *do_update)
+ bool *do_update)
{
/* Antialias jitter point relative coords */
const int aa_samples = (surface->flags & MOD_DPAINT_ANTIALIAS) ? 5 : 1;
@@ -3783,7 +3783,7 @@ static void dynamicPaint_brushMeshCalculateVelocity(Depsgraph *depsgraph,
numOfVerts_p = mesh_p->totvert;
mvert_p = BKE_mesh_verts_for_write(mesh_p);
- copy_m4_m4(prev_obmat, ob->obmat);
+ copy_m4_m4(prev_obmat, ob->object_to_world);
/* current frame mesh */
scene->r.cfra = cur_fra;
@@ -3816,7 +3816,7 @@ static void dynamicPaint_brushMeshCalculateVelocity(Depsgraph *depsgraph,
.brush_vel = *brushVel,
.mvert_p = mvert_p,
.mvert_c = mvert_c,
- .obmat = ob->obmat,
+ .obmat = ob->object_to_world,
.prev_obmat = prev_obmat,
.timescale = timescale,
};
@@ -3856,7 +3856,7 @@ static void dynamicPaint_brushObjectCalculateVelocity(
SUBFRAME_RECURSION,
BKE_scene_ctime_get(scene),
eModifierType_DynamicPaint);
- copy_m4_m4(prev_obmat, ob->obmat);
+ copy_m4_m4(prev_obmat, ob->object_to_world);
/* current frame mesh */
scene->r.cfra = cur_fra;
@@ -3871,7 +3871,7 @@ static void dynamicPaint_brushObjectCalculateVelocity(
/* calculate speed */
mul_m4_v3(prev_obmat, prev_loc);
- mul_m4_v3(ob->obmat, cur_loc);
+ mul_m4_v3(ob->object_to_world, cur_loc);
sub_v3_v3v3(brushVel->v, cur_loc, prev_loc);
mul_v3_fl(brushVel->v, 1.0f / timescale);
@@ -4279,14 +4279,14 @@ static bool dynamicPaint_paintMesh(Depsgraph *depsgraph,
* (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);
+ mul_m4_v3(brushOb->object_to_world, mvert[ii].co);
boundInsert(&mesh_bb, mvert[ii].co);
/* for proximity project calculate average normal */
if (brush->flags & MOD_DPAINT_PROX_PROJECT && brush->collision != MOD_DPAINT_COL_VOLUME) {
float nor[3];
copy_v3_v3(nor, vert_normals[ii]);
- mul_mat3_m4_v3(brushOb->obmat, nor);
+ mul_mat3_m4_v3(brushOb->object_to_world, nor);
normalize_v3(nor);
add_v3_v3(avg_brushNor, nor);
@@ -5870,7 +5870,7 @@ static bool dynamicPaint_surfaceHasMoved(DynamicPaintSurface *surface, Object *o
}
/* matrix comparison */
- if (!equals_m4m4(bData->prev_obmat, ob->obmat)) {
+ if (!equals_m4m4(bData->prev_obmat, ob->object_to_world)) {
return true;
}
@@ -5957,7 +5957,7 @@ static void dynamic_paint_generate_bake_data_cb(void *__restrict userdata,
mul_v3_v3v3(scaled_nor, temp_nor, ob->scale);
bData->bNormal[index].normal_scale = len_v3(scaled_nor);
}
- mul_mat3_m4_v3(ob->obmat, temp_nor);
+ mul_mat3_m4_v3(ob->object_to_world, temp_nor);
normalize_v3(temp_nor);
negate_v3_v3(bData->bNormal[index].invNorm, temp_nor);
}
@@ -5995,7 +5995,7 @@ static void dynamic_paint_generate_bake_data_cb(void *__restrict userdata,
mul_v3_v3v3(scaled_nor, temp_nor, ob->scale);
bData->bNormal[index].normal_scale = len_v3(scaled_nor);
}
- mul_mat3_m4_v3(ob->obmat, temp_nor);
+ mul_mat3_m4_v3(ob->object_to_world, temp_nor);
normalize_v3(temp_nor);
negate_v3_v3(bData->bNormal[index].invNorm, temp_nor);
}
@@ -6113,7 +6113,7 @@ static bool dynamicPaint_generateBakeData(DynamicPaintSurface *surface,
bData->mesh_bounds.valid = false;
for (index = 0; index < canvasNumOfVerts; index++) {
copy_v3_v3(canvas_verts[index].v, mvert[index].co);
- mul_m4_v3(ob->obmat, canvas_verts[index].v);
+ mul_m4_v3(ob->object_to_world, canvas_verts[index].v);
boundInsert(&bData->mesh_bounds, canvas_verts[index].v);
}
@@ -6143,7 +6143,7 @@ static bool dynamicPaint_generateBakeData(DynamicPaintSurface *surface,
dynamicPaint_prepareAdjacencyData(surface, false);
/* Copy current frame vertices to check against in next frame */
- copy_m4_m4(bData->prev_obmat, ob->obmat);
+ copy_m4_m4(bData->prev_obmat, ob->object_to_world);
memcpy(bData->prev_verts, mvert, canvasNumOfVerts * sizeof(MVert));
bData->clear = 0;
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index 42b38854248..c2ae4efbde8 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -154,8 +154,8 @@ static void precalculate_effector(struct Depsgraph *depsgraph, EffectorCache *ef
if (eff->ob->runtime.curve_cache->anim_path_accum_length) {
BKE_where_on_path(
eff->ob, 0.0, eff->guide_loc, eff->guide_dir, NULL, &eff->guide_radius, NULL);
- mul_m4_v3(eff->ob->obmat, eff->guide_loc);
- mul_mat3_m4_v3(eff->ob->obmat, eff->guide_dir);
+ mul_m4_v3(eff->ob->object_to_world, eff->guide_loc);
+ mul_mat3_m4_v3(eff->ob->object_to_world, eff->guide_dir);
}
}
}
@@ -707,8 +707,8 @@ bool get_effector_data(EffectorCache *eff,
copy_v3_v3(efd->loc, verts[*efd->index].co);
copy_v3_v3(efd->nor, vert_normals[*efd->index]);
- mul_m4_v3(eff->ob->obmat, efd->loc);
- mul_mat3_m4_v3(eff->ob->obmat, efd->nor);
+ mul_m4_v3(eff->ob->object_to_world, efd->loc);
+ mul_mat3_m4_v3(eff->ob->object_to_world, efd->nor);
normalize_v3(efd->nor);
@@ -760,23 +760,23 @@ bool get_effector_data(EffectorCache *eff,
const Object *ob = eff->ob;
/* Use z-axis as normal. */
- normalize_v3_v3(efd->nor, ob->obmat[2]);
+ normalize_v3_v3(efd->nor, ob->object_to_world[2]);
if (eff->pd && ELEM(eff->pd->shape, PFIELD_SHAPE_PLANE, PFIELD_SHAPE_LINE)) {
float temp[3], translate[3];
- sub_v3_v3v3(temp, point->loc, ob->obmat[3]);
+ sub_v3_v3v3(temp, point->loc, ob->object_to_world[3]);
project_v3_v3v3(translate, temp, efd->nor);
/* for vortex the shape chooses between old / new force */
if (eff->pd->forcefield == PFIELD_VORTEX || eff->pd->shape == PFIELD_SHAPE_LINE) {
- add_v3_v3v3(efd->loc, ob->obmat[3], translate);
+ add_v3_v3v3(efd->loc, ob->object_to_world[3], translate);
}
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]);
+ copy_v3_v3(efd->loc, ob->object_to_world[3]);
}
zero_v3(efd->vel);
@@ -801,8 +801,8 @@ bool get_effector_data(EffectorCache *eff,
}
else {
/* for some effectors we need the object center every time */
- sub_v3_v3v3(efd->vec_to_point2, point->loc, eff->ob->obmat[3]);
- normalize_v3_v3(efd->nor2, eff->ob->obmat[2]);
+ sub_v3_v3v3(efd->vec_to_point2, point->loc, eff->ob->object_to_world[3]);
+ normalize_v3_v3(efd->nor2, eff->ob->object_to_world[2]);
}
}
@@ -875,7 +875,7 @@ static void do_texture_effector(EffectorCache *eff,
copy_v3_v3(tex_co, point->loc);
if (eff->pd->flag & PFIELD_TEX_OBJECT) {
- mul_m4_v3(eff->ob->imat, tex_co);
+ mul_m4_v3(eff->ob->world_to_object, tex_co);
if (eff->pd->flag & PFIELD_TEX_2D) {
tex_co[2] = 0.0f;
diff --git a/source/blender/blenkernel/intern/fcurve_driver.c b/source/blender/blenkernel/intern/fcurve_driver.c
index 9f63e2d3743..3d1439b5530 100644
--- a/source/blender/blenkernel/intern/fcurve_driver.c
+++ b/source/blender/blenkernel/intern/fcurve_driver.c
@@ -321,7 +321,7 @@ static float dvar_eval_rotDiff(ChannelDriver *driver, DriverVar *dvar)
}
else {
/* Object. */
- mat[i] = ob->obmat;
+ mat[i] = ob->object_to_world;
}
}
@@ -399,7 +399,7 @@ static float dvar_eval_locDiff(ChannelDriver *driver, DriverVar *dvar)
else {
/* Convert to world-space. */
copy_v3_v3(tmp_loc, pchan->pose_head);
- mul_m4_v3(ob->obmat, tmp_loc);
+ mul_m4_v3(ob->object_to_world, tmp_loc);
}
}
else {
@@ -410,7 +410,7 @@ static float dvar_eval_locDiff(ChannelDriver *driver, DriverVar *dvar)
float mat[4][4];
/* Extract transform just like how the constraints do it! */
- copy_m4_m4(mat, ob->obmat);
+ copy_m4_m4(mat, ob->object_to_world);
BKE_constraint_mat_convertspace(
ob, NULL, NULL, mat, CONSTRAINT_SPACE_WORLD, CONSTRAINT_SPACE_LOCAL, false);
@@ -424,7 +424,7 @@ static float dvar_eval_locDiff(ChannelDriver *driver, DriverVar *dvar)
}
else {
/* World-space. */
- copy_v3_v3(tmp_loc, ob->obmat[3]);
+ copy_v3_v3(tmp_loc, ob->object_to_world[3]);
}
}
@@ -500,7 +500,7 @@ static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar)
}
else {
/* World-space matrix. */
- mul_m4_m4m4(mat, ob->obmat, pchan->pose_mat);
+ mul_m4_m4m4(mat, ob->object_to_world, pchan->pose_mat);
}
}
else {
@@ -514,7 +514,7 @@ static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar)
if (dtar->flag & DTAR_FLAG_LOCALSPACE) {
if (dtar->flag & DTAR_FLAG_LOCAL_CONSTS) {
/* Just like how the constraints do it! */
- copy_m4_m4(mat, ob->obmat);
+ copy_m4_m4(mat, ob->object_to_world);
BKE_constraint_mat_convertspace(
ob, NULL, NULL, mat, CONSTRAINT_SPACE_WORLD, CONSTRAINT_SPACE_LOCAL, false);
}
@@ -525,7 +525,7 @@ static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar)
}
else {
/* World-space matrix - just the good-old one. */
- copy_m4_m4(mat, ob->obmat);
+ copy_m4_m4(mat, ob->object_to_world);
}
}
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index 5470231cd07..a3d2d73678c 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -433,7 +433,7 @@ static void manta_set_domain_from_mesh(FluidDomainSettings *fds,
copy_v3_v3(fds->global_size, size);
copy_v3_v3(fds->dp0, min);
- invert_m4_m4(fds->imat, ob->obmat);
+ invert_m4_m4(fds->imat, ob->object_to_world);
/* Prevent crash when initializing a plane as domain. */
if (!init_resolution || (size[0] < FLT_EPSILON) || (size[1] < FLT_EPSILON) ||
@@ -498,8 +498,8 @@ static bool fluid_modifier_init(
zero_v3(fds->shift_f);
add_v3_fl(fds->shift_f, 0.5f);
zero_v3(fds->prev_loc);
- mul_m4_v3(ob->obmat, fds->prev_loc);
- copy_m4_m4(fds->obmat, ob->obmat);
+ mul_m4_v3(ob->object_to_world, fds->prev_loc);
+ copy_m4_m4(fds->obmat, ob->object_to_world);
/* Set resolutions. */
if (fmd->domain->type == FLUID_DOMAIN_TYPE_GAS &&
@@ -566,11 +566,11 @@ static int get_light(Scene *scene, ViewLayer *view_layer, float *light)
Light *la = base_tmp->object->data;
if (la->type == LA_LOCAL) {
- copy_v3_v3(light, base_tmp->object->obmat[3]);
+ copy_v3_v3(light, base_tmp->object->object_to_world[3]);
return 1;
}
if (!found_light) {
- copy_v3_v3(light, base_tmp->object->obmat[3]);
+ copy_v3_v3(light, base_tmp->object->object_to_world[3]);
found_light = 1;
}
}
@@ -1036,7 +1036,7 @@ static void obstacles_from_mesh(Object *coll_ob,
float co[3];
/* Vertex position. */
- mul_m4_v3(coll_ob->obmat, verts[i].co);
+ mul_m4_v3(coll_ob->object_to_world, verts[i].co);
manta_pos_to_cell(fds, verts[i].co);
/* Vertex velocity. */
@@ -2099,11 +2099,11 @@ static void emit_from_mesh(
float(*vert_normals)[3] = BKE_mesh_vertex_normals_for_write(me);
for (i = 0; i < numverts; i++) {
/* Vertex position. */
- mul_m4_v3(flow_ob->obmat, verts[i].co);
+ mul_m4_v3(flow_ob->object_to_world, verts[i].co);
manta_pos_to_cell(fds, verts[i].co);
/* Vertex normal. */
- mul_mat3_m4_v3(flow_ob->obmat, vert_normals[i]);
+ mul_mat3_m4_v3(flow_ob->object_to_world, vert_normals[i]);
mul_mat3_m4_v3(fds->imat, vert_normals[i]);
normalize_v3(vert_normals[i]);
@@ -2121,7 +2121,7 @@ static void emit_from_mesh(
/* Calculate emission map bounds. */
bb_boundInsert(bb, verts[i].co);
}
- mul_m4_v3(flow_ob->obmat, flow_center);
+ mul_m4_v3(flow_ob->object_to_world, flow_center);
manta_pos_to_cell(fds, flow_center);
/* Set emission map.
@@ -2191,7 +2191,7 @@ static void adaptive_domain_adjust(
float frame_shift_f[3];
float ob_loc[3] = {0};
- mul_m4_v3(ob->obmat, ob_loc);
+ mul_m4_v3(ob->object_to_world, ob_loc);
sub_v3_v3v3(frame_shift_f, ob_loc, fds->prev_loc);
copy_v3_v3(fds->prev_loc, ob_loc);
@@ -3495,12 +3495,12 @@ static Mesh *create_smoke_geometry(FluidDomainSettings *fds, Mesh *orgmesh, Obje
/* Calculate required shift to match domain's global position
* it was originally simulated at (if object moves without manta step). */
- invert_m4_m4(ob->imat, ob->obmat);
- mul_m4_v3(ob->obmat, ob_loc);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
+ mul_m4_v3(ob->object_to_world, ob_loc);
mul_m4_v3(fds->obmat, ob_cache_loc);
sub_v3_v3v3(fds->obj_shift_f, ob_cache_loc, ob_loc);
/* Convert shift to local space and apply to vertices. */
- mul_mat3_m4_v3(ob->imat, fds->obj_shift_f);
+ mul_mat3_m4_v3(ob->world_to_object, fds->obj_shift_f);
/* Apply shift to vertices. */
for (int i = 0; i < num_verts; i++) {
add_v3_v3(mverts[i].co, fds->obj_shift_f);
@@ -3525,8 +3525,8 @@ static int manta_step(
bool mode_replay = (mode == FLUID_DOMAIN_CACHE_REPLAY);
/* Update object state. */
- invert_m4_m4(fds->imat, ob->obmat);
- copy_m4_m4(fds->obmat, ob->obmat);
+ invert_m4_m4(fds->imat, ob->object_to_world);
+ copy_m4_m4(fds->obmat, ob->object_to_world);
/* Gas domain might use adaptive domain. */
if (fds->type == FLUID_DOMAIN_TYPE_GAS) {
diff --git a/source/blender/blenkernel/intern/geometry_set_instances.cc b/source/blender/blenkernel/intern/geometry_set_instances.cc
index e078991187d..2b36020b4e7 100644
--- a/source/blender/blenkernel/intern/geometry_set_instances.cc
+++ b/source/blender/blenkernel/intern/geometry_set_instances.cc
@@ -98,7 +98,7 @@ static void geometry_set_collect_recursive_collection(const Collection &collecti
LISTBASE_FOREACH (const CollectionObject *, collection_object, &collection.gobject) {
BLI_assert(collection_object->ob != nullptr);
const Object &object = *collection_object->ob;
- const float4x4 object_transform = transform * object.obmat;
+ const float4x4 object_transform = transform * object.object_to_world;
geometry_set_collect_recursive_object(object, object_transform, r_sets);
}
LISTBASE_FOREACH (const CollectionChild *, collection_child, &collection.children) {
@@ -220,7 +220,7 @@ void Instances::ensure_geometry_instances()
Collection &collection = reference.collection();
FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN (&collection, object) {
const int handle = instances->add_reference(*object);
- instances->add_instance(handle, object->obmat);
+ instances->add_instance(handle, object->object_to_world);
float4x4 &transform = instances->transforms().last();
sub_v3_v3(transform.values[3], collection.instance_offset);
}
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 45e56717d6a..5409bf61274 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -2691,7 +2691,7 @@ void BKE_gpencil_layer_transform_matrix_get(const Depsgraph *depsgraph,
/* if not layer parented, try with object parented */
if (obparent_eval == NULL) {
if ((ob_eval != NULL) && (ob_eval->type == OB_GPENCIL)) {
- copy_m4_m4(diff_mat, ob_eval->obmat);
+ copy_m4_m4(diff_mat, ob_eval->object_to_world);
mul_m4_m4m4(diff_mat, diff_mat, gpl->layer_mat);
return;
}
@@ -2701,8 +2701,8 @@ void BKE_gpencil_layer_transform_matrix_get(const Depsgraph *depsgraph,
}
if (ELEM(gpl->partype, PAROBJECT, PARSKEL)) {
- mul_m4_m4m4(diff_mat, obparent_eval->obmat, gpl->inverse);
- add_v3_v3(diff_mat[3], ob_eval->obmat[3]);
+ mul_m4_m4m4(diff_mat, obparent_eval->object_to_world, gpl->inverse);
+ add_v3_v3(diff_mat[3], ob_eval->object_to_world[3]);
mul_m4_m4m4(diff_mat, diff_mat, gpl->layer_mat);
return;
}
@@ -2710,14 +2710,14 @@ void BKE_gpencil_layer_transform_matrix_get(const Depsgraph *depsgraph,
bPoseChannel *pchan = BKE_pose_channel_find_name(obparent_eval->pose, gpl->parsubstr);
if (pchan) {
float tmp_mat[4][4];
- mul_m4_m4m4(tmp_mat, obparent_eval->obmat, pchan->pose_mat);
+ mul_m4_m4m4(tmp_mat, obparent_eval->object_to_world, pchan->pose_mat);
mul_m4_m4m4(diff_mat, tmp_mat, gpl->inverse);
- add_v3_v3(diff_mat[3], ob_eval->obmat[3]);
+ add_v3_v3(diff_mat[3], ob_eval->object_to_world[3]);
}
else {
/* if bone not found use object (armature) */
- mul_m4_m4m4(diff_mat, obparent_eval->obmat, gpl->inverse);
- add_v3_v3(diff_mat[3], ob_eval->obmat[3]);
+ mul_m4_m4m4(diff_mat, obparent_eval->object_to_world, gpl->inverse);
+ add_v3_v3(diff_mat[3], ob_eval->object_to_world[3]);
}
mul_m4_m4m4(diff_mat, diff_mat, gpl->layer_mat);
return;
@@ -2771,12 +2771,12 @@ void BKE_gpencil_update_layer_transforms(const Depsgraph *depsgraph, Object *ob)
Object *ob_parent = DEG_get_evaluated_object(depsgraph, gpl->parent);
/* calculate new matrix */
if (ELEM(gpl->partype, PAROBJECT, PARSKEL)) {
- mul_m4_m4m4(cur_mat, ob->imat, ob_parent->obmat);
+ mul_m4_m4m4(cur_mat, ob->world_to_object, ob_parent->object_to_world);
}
else if (gpl->partype == PARBONE) {
bPoseChannel *pchan = BKE_pose_channel_find_name(ob_parent->pose, gpl->parsubstr);
if (pchan != NULL) {
- mul_m4_series(cur_mat, ob->imat, ob_parent->obmat, pchan->pose_mat);
+ mul_m4_series(cur_mat, ob->world_to_object, ob_parent->object_to_world, pchan->pose_mat);
}
else {
unit_m4(cur_mat);
diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c b/source/blender/blenkernel/intern/gpencil_modifier.c
index c84ee2e4a56..1ad7aeed41c 100644
--- a/source/blender/blenkernel/intern/gpencil_modifier.c
+++ b/source/blender/blenkernel/intern/gpencil_modifier.c
@@ -942,7 +942,7 @@ void BKE_gpencil_modifier_blend_read_data(BlendDataReader *reader, ListBase *lb)
BLO_read_data_address(reader, &gpmd->curve_intensity);
if (gpmd->curve_intensity) {
BKE_curvemapping_blend_read(reader, gpmd->curve_intensity);
- /* initialize the curve. Maybe this could be moved to modififer logic */
+ /* Initialize the curve. Maybe this could be moved to modifier logic. */
BKE_curvemapping_init(gpmd->curve_intensity);
}
}
diff --git a/source/blender/blenkernel/intern/icons.cc b/source/blender/blenkernel/intern/icons.cc
index dc1d23de7e0..7fd0515b52c 100644
--- a/source/blender/blenkernel/intern/icons.cc
+++ b/source/blender/blenkernel/intern/icons.cc
@@ -530,7 +530,7 @@ void BKE_previewimg_ensure(PreviewImage *prv, const int size)
thumb = IMB_thumb_manage(filepath, THB_LARGE, (ThumbSource)source);
if (thumb) {
- /* PreviewImage assumes premultiplied alhpa... */
+ /* #PreviewImage assumes pre-multiplied alpha. */
IMB_premultiply_alpha(thumb);
if (do_preview) {
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index bd655caae2b..a21033a8b91 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -1147,7 +1147,7 @@ static char *get_rna_access(ID *id,
/* 'buf' _must_ be initialized in this block */
/* append preceding bits to path */
- /* NOTE: strings are not escapted and they should be! */
+ /* NOTE: strings are not escaped and they should be! */
if ((actname && actname[0]) && (constname && constname[0])) {
/* Constraint in Pose-Channel */
char actname_esc[sizeof(((bActionChannel *)NULL)->name) * 2];
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index f6a409ee3f0..0adf162b4eb 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -355,10 +355,10 @@ void BKE_lattice_resize(Lattice *lt, int uNew, int vNew, int wNew, Object *ltOb)
BKE_displist_free(&ltOb->runtime.curve_cache->disp);
}
- copy_m4_m4(mat, ltOb->obmat);
- unit_m4(ltOb->obmat);
+ copy_m4_m4(mat, ltOb->object_to_world);
+ unit_m4(ltOb->object_to_world);
BKE_lattice_deform_coords(ltOb, NULL, vert_coords, uNew * vNew * wNew, 0, NULL, 1.0f);
- copy_m4_m4(ltOb->obmat, mat);
+ copy_m4_m4(ltOb->object_to_world, mat);
lt->typeu = typeu;
lt->typev = typev;
diff --git a/source/blender/blenkernel/intern/lattice_deform.c b/source/blender/blenkernel/intern/lattice_deform.c
index 3a1c42b9178..892889aa426 100644
--- a/source/blender/blenkernel/intern/lattice_deform.c
+++ b/source/blender/blenkernel/intern/lattice_deform.c
@@ -79,15 +79,15 @@ LatticeDeformData *BKE_lattice_deform_data_create(const Object *oblatt, const Ob
/* for example with a particle system: (ob == NULL) */
if (ob == NULL) {
/* In deform-space, calc matrix. */
- invert_m4_m4(latmat, oblatt->obmat);
+ invert_m4_m4(latmat, oblatt->object_to_world);
/* back: put in deform array */
invert_m4_m4(imat, latmat);
}
else {
/* In deform-space, calc matrix. */
- invert_m4_m4(imat, oblatt->obmat);
- mul_m4_m4m4(latmat, imat, ob->obmat);
+ invert_m4_m4(imat, oblatt->object_to_world);
+ mul_m4_m4m4(latmat, imat, ob->object_to_world);
/* back: put in deform array. */
invert_m4_m4(imat, latmat);
diff --git a/source/blender/blenkernel/intern/lib_id.c b/source/blender/blenkernel/intern/lib_id.c
index 158aaa961ce..f60234a684d 100644
--- a/source/blender/blenkernel/intern/lib_id.c
+++ b/source/blender/blenkernel/intern/lib_id.c
@@ -1612,7 +1612,7 @@ static void library_make_local_copying_check(ID *id,
if (!BLI_gset_haskey(done_ids, from_id)) {
if (BLI_gset_haskey(loop_tags, from_id)) {
/* We are in a 'dependency loop' of IDs, this does not say us anything, skip it.
- * Note that this is the situation that can lead to archipelagoes of linked data-blocks
+ * Note that this is the situation that can lead to archipelagos of linked data-blocks
* (since all of them have non-local users, they would all be duplicated,
* leading to a loop of unused linked data-blocks that cannot be freed since they all use
* each other...). */
diff --git a/source/blender/blenkernel/intern/mball_tessellate.cc b/source/blender/blenkernel/intern/mball_tessellate.cc
index bb3713e770a..f8a64a7cd8b 100644
--- a/source/blender/blenkernel/intern/mball_tessellate.cc
+++ b/source/blender/blenkernel/intern/mball_tessellate.cc
@@ -1188,8 +1188,9 @@ static void init_meta(Depsgraph *depsgraph, PROCESS *process, Scene *scene, Obje
const eEvaluationMode deg_eval_mode = DEG_get_mode(depsgraph);
const short parenting_dupli_transflag = (OB_DUPLIFACES | OB_DUPLIVERTS);
- copy_m4_m4(obmat, ob->obmat); /* to cope with duplicators from BKE_scene_base_iter_next */
- invert_m4_m4(obinv, ob->obmat);
+ copy_m4_m4(obmat,
+ ob->object_to_world); /* to cope with duplicators from BKE_scene_base_iter_next */
+ invert_m4_m4(obinv, ob->object_to_world);
BLI_split_name_num(obname, &obnr, ob->id.name + 2, '.');
@@ -1237,13 +1238,13 @@ static void init_meta(Depsgraph *depsgraph, PROCESS *process, Scene *scene, Obje
/* when metaball object has zero scale, then MetaElem to this MetaBall
* will not be put to mainb array */
- if (has_zero_axis_m4(bob->obmat)) {
+ if (has_zero_axis_m4(bob->object_to_world)) {
zero_size = 1;
}
else if (bob->parent) {
struct Object *pob = bob->parent;
while (pob) {
- if (has_zero_axis_m4(pob->obmat)) {
+ if (has_zero_axis_m4(pob->object_to_world)) {
zero_size = 1;
break;
}
@@ -1307,7 +1308,7 @@ static void init_meta(Depsgraph *depsgraph, PROCESS *process, Scene *scene, Obje
* rotation ->
* ml local space
*/
- mul_m4_series((float(*)[4])new_ml->mat, obinv, bob->obmat, pos, rot);
+ mul_m4_series((float(*)[4])new_ml->mat, obinv, bob->object_to_world, pos, rot);
/* ml local space -> basis object space */
invert_m4_m4((float(*)[4])new_ml->imat, (float(*)[4])new_ml->mat);
diff --git a/source/blender/blenkernel/intern/mesh.cc b/source/blender/blenkernel/intern/mesh.cc
index 0018c217964..2d613f24a0a 100644
--- a/source/blender/blenkernel/intern/mesh.cc
+++ b/source/blender/blenkernel/intern/mesh.cc
@@ -1608,38 +1608,6 @@ void BKE_mesh_tessface_clear(Mesh *mesh)
mesh_tessface_clear_intern(mesh, true);
}
-void BKE_mesh_do_versions_cd_flag_init(Mesh *mesh)
-{
- if (UNLIKELY(mesh->cd_flag)) {
- return;
- }
-
- const Span<MVert> verts = mesh->verts();
- const Span<MEdge> edges = mesh->edges();
-
- for (const MVert &vert : verts) {
- if (vert.bweight_legacy != 0) {
- mesh->cd_flag |= ME_CDFLAG_VERT_BWEIGHT;
- break;
- }
- }
-
- for (const MEdge &edge : edges) {
- if (edge.bweight_legacy != 0) {
- mesh->cd_flag |= ME_CDFLAG_EDGE_BWEIGHT;
- if (mesh->cd_flag & ME_CDFLAG_EDGE_CREASE) {
- break;
- }
- }
- if (edge.crease_legacy != 0) {
- mesh->cd_flag |= ME_CDFLAG_EDGE_CREASE;
- if (mesh->cd_flag & ME_CDFLAG_EDGE_BWEIGHT) {
- break;
- }
- }
- }
-}
-
/* -------------------------------------------------------------------- */
/* MSelect functions (currently used in weight paint mode) */
diff --git a/source/blender/blenkernel/intern/mesh_calc_edges.cc b/source/blender/blenkernel/intern/mesh_calc_edges.cc
index 5e6babdf7b4..4a4c2ebcbb0 100644
--- a/source/blender/blenkernel/intern/mesh_calc_edges.cc
+++ b/source/blender/blenkernel/intern/mesh_calc_edges.cc
@@ -146,7 +146,7 @@ static void serialize_and_initialize_deduplicated_edges(MutableSpan<EdgeMap> edg
/* Initialize new edge. */
new_edge.v1 = item.key.v_low;
new_edge.v2 = item.key.v_high;
- new_edge.flag = ME_EDGEDRAW | ME_EDGERENDER;
+ new_edge.flag = ME_EDGEDRAW;
}
item.value.index = new_edge_index;
new_edge_index++;
diff --git a/source/blender/blenkernel/intern/mesh_convert.cc b/source/blender/blenkernel/intern/mesh_convert.cc
index 784d35a8d65..2255038a991 100644
--- a/source/blender/blenkernel/intern/mesh_convert.cc
+++ b/source/blender/blenkernel/intern/mesh_convert.cc
@@ -119,7 +119,7 @@ static void make_edges_mdata_extend(Mesh &mesh)
BLI_edgehashIterator_getKey(ehi, &medge->v1, &medge->v2);
BLI_edgehashIterator_setValue(ehi, POINTER_FROM_UINT(e_index));
- medge->flag = ME_EDGEDRAW | ME_EDGERENDER;
+ medge->flag = ME_EDGEDRAW;
}
BLI_edgehashIterator_free(ehi);
@@ -223,7 +223,7 @@ static Mesh *mesh_nurbs_displist_to_mesh(const Curve *cu, const ListBase *dispba
for (b = 1; b < dl->nr; b++) {
medge->v1 = startvert + ofs + b - 1;
medge->v2 = startvert + ofs + b;
- medge->flag = ME_LOOSEEDGE | ME_EDGERENDER | ME_EDGEDRAW;
+ medge->flag = ME_LOOSEEDGE | ME_EDGEDRAW;
medge++;
}
@@ -251,7 +251,7 @@ static Mesh *mesh_nurbs_displist_to_mesh(const Curve *cu, const ListBase *dispba
else {
medge->v2 = startvert + ofs + b + 1;
}
- medge->flag = ME_LOOSEEDGE | ME_EDGERENDER | ME_EDGEDRAW;
+ medge->flag = ME_LOOSEEDGE | ME_EDGEDRAW;
medge++;
}
}
@@ -706,7 +706,7 @@ void BKE_mesh_edges_set_draw_render(Mesh *mesh)
{
MutableSpan<MEdge> edges = mesh->edges_for_write();
for (int i = 0; i < mesh->totedge; i++) {
- edges[i].flag |= ME_EDGEDRAW | ME_EDGERENDER;
+ edges[i].flag |= ME_EDGEDRAW;
}
}
diff --git a/source/blender/blenkernel/intern/mesh_legacy_convert.cc b/source/blender/blenkernel/intern/mesh_legacy_convert.cc
index df3057d9592..23426f8c087 100644
--- a/source/blender/blenkernel/intern/mesh_legacy_convert.cc
+++ b/source/blender/blenkernel/intern/mesh_legacy_convert.cc
@@ -30,6 +30,258 @@
#include "BKE_multires.h"
/* -------------------------------------------------------------------- */
+/** \name Legacy Edge Calculation
+ * \{ */
+
+struct EdgeSort {
+ uint v1, v2;
+ char is_loose, is_draw;
+};
+
+/* edges have to be added with lowest index first for sorting */
+static void to_edgesort(struct EdgeSort *ed, uint v1, uint v2, char is_loose, short is_draw)
+{
+ if (v1 < v2) {
+ ed->v1 = v1;
+ ed->v2 = v2;
+ }
+ else {
+ ed->v1 = v2;
+ ed->v2 = v1;
+ }
+ ed->is_loose = is_loose;
+ ed->is_draw = is_draw;
+}
+
+static int vergedgesort(const void *v1, const void *v2)
+{
+ const struct EdgeSort *x1 = static_cast<const struct EdgeSort *>(v1);
+ const struct EdgeSort *x2 = static_cast<const struct EdgeSort *>(v2);
+
+ if (x1->v1 > x2->v1) {
+ return 1;
+ }
+ if (x1->v1 < x2->v1) {
+ return -1;
+ }
+ if (x1->v2 > x2->v2) {
+ return 1;
+ }
+ if (x1->v2 < x2->v2) {
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Create edges based on known verts and faces,
+ * this function is only used when loading very old blend files */
+static void mesh_calc_edges_mdata(const MVert * /*allvert*/,
+ const MFace *allface,
+ MLoop *allloop,
+ const MPoly *allpoly,
+ int /*totvert*/,
+ int totface,
+ int /*totloop*/,
+ int totpoly,
+ const bool use_old,
+ MEdge **r_medge,
+ int *r_totedge)
+{
+ const MPoly *mpoly;
+ const MFace *mface;
+ MEdge *medge, *med;
+ EdgeHash *hash;
+ struct EdgeSort *edsort, *ed;
+ int a, totedge = 0;
+ uint totedge_final = 0;
+ uint edge_index;
+
+ /* we put all edges in array, sort them, and detect doubles that way */
+
+ for (a = totface, mface = allface; a > 0; a--, mface++) {
+ if (mface->v4) {
+ totedge += 4;
+ }
+ else if (mface->v3) {
+ totedge += 3;
+ }
+ else {
+ totedge += 1;
+ }
+ }
+
+ if (totedge == 0) {
+ /* flag that mesh has edges */
+ (*r_medge) = (MEdge *)MEM_callocN(0, __func__);
+ (*r_totedge) = 0;
+ return;
+ }
+
+ ed = edsort = (EdgeSort *)MEM_mallocN(totedge * sizeof(struct EdgeSort), "EdgeSort");
+
+ for (a = totface, mface = allface; a > 0; a--, mface++) {
+ to_edgesort(ed++, mface->v1, mface->v2, !mface->v3, mface->edcode & ME_V1V2);
+ if (mface->v4) {
+ to_edgesort(ed++, mface->v2, mface->v3, 0, mface->edcode & ME_V2V3);
+ to_edgesort(ed++, mface->v3, mface->v4, 0, mface->edcode & ME_V3V4);
+ to_edgesort(ed++, mface->v4, mface->v1, 0, mface->edcode & ME_V4V1);
+ }
+ else if (mface->v3) {
+ to_edgesort(ed++, mface->v2, mface->v3, 0, mface->edcode & ME_V2V3);
+ to_edgesort(ed++, mface->v3, mface->v1, 0, mface->edcode & ME_V3V1);
+ }
+ }
+
+ qsort(edsort, totedge, sizeof(struct EdgeSort), vergedgesort);
+
+ /* count final amount */
+ for (a = totedge, ed = edsort; a > 1; a--, ed++) {
+ /* edge is unique when it differs from next edge, or is last */
+ if (ed->v1 != (ed + 1)->v1 || ed->v2 != (ed + 1)->v2) {
+ totedge_final++;
+ }
+ }
+ totedge_final++;
+
+ medge = (MEdge *)MEM_callocN(sizeof(MEdge) * totedge_final, __func__);
+
+ for (a = totedge, med = medge, ed = edsort; a > 1; a--, ed++) {
+ /* edge is unique when it differs from next edge, or is last */
+ if (ed->v1 != (ed + 1)->v1 || ed->v2 != (ed + 1)->v2) {
+ med->v1 = ed->v1;
+ med->v2 = ed->v2;
+ if (use_old == false || ed->is_draw) {
+ med->flag = ME_EDGEDRAW;
+ }
+ if (ed->is_loose) {
+ med->flag |= ME_LOOSEEDGE;
+ }
+
+ /* order is swapped so extruding this edge as a surface won't flip face normals
+ * with cyclic curves */
+ if (ed->v1 + 1 != ed->v2) {
+ SWAP(uint, med->v1, med->v2);
+ }
+ med++;
+ }
+ else {
+ /* Equal edge, merge the draw-flag. */
+ (ed + 1)->is_draw |= ed->is_draw;
+ }
+ }
+ /* last edge */
+ med->v1 = ed->v1;
+ med->v2 = ed->v2;
+ med->flag = ME_EDGEDRAW;
+ if (ed->is_loose) {
+ med->flag |= ME_LOOSEEDGE;
+ }
+
+ MEM_freeN(edsort);
+
+ /* set edge members of mloops */
+ hash = BLI_edgehash_new_ex(__func__, totedge_final);
+ for (edge_index = 0, med = medge; edge_index < totedge_final; edge_index++, med++) {
+ BLI_edgehash_insert(hash, med->v1, med->v2, POINTER_FROM_UINT(edge_index));
+ }
+
+ mpoly = allpoly;
+ for (a = 0; a < totpoly; a++, mpoly++) {
+ MLoop *ml, *ml_next;
+ int i = mpoly->totloop;
+
+ ml_next = allloop + mpoly->loopstart; /* first loop */
+ ml = &ml_next[i - 1]; /* last loop */
+
+ while (i-- != 0) {
+ ml->e = POINTER_AS_UINT(BLI_edgehash_lookup(hash, ml->v, ml_next->v));
+ ml = ml_next;
+ ml_next++;
+ }
+ }
+
+ BLI_edgehash_free(hash, nullptr);
+
+ *r_medge = medge;
+ *r_totedge = totedge_final;
+}
+
+void BKE_mesh_calc_edges_legacy(Mesh *me, const bool use_old)
+{
+ using namespace blender;
+ MEdge *medge;
+ int totedge = 0;
+ const Span<MVert> verts = me->verts();
+ const Span<MPoly> polys = me->polys();
+ MutableSpan<MLoop> loops = me->loops_for_write();
+
+ mesh_calc_edges_mdata(verts.data(),
+ (MFace *)CustomData_get_layer(&me->fdata, CD_MFACE),
+ loops.data(),
+ polys.data(),
+ verts.size(),
+ me->totface,
+ loops.size(),
+ polys.size(),
+ use_old,
+ &medge,
+ &totedge);
+
+ if (totedge == 0) {
+ /* flag that mesh has edges */
+ me->totedge = 0;
+ return;
+ }
+
+ medge = (MEdge *)CustomData_add_layer(&me->edata, CD_MEDGE, CD_ASSIGN, medge, totedge);
+ me->totedge = totedge;
+
+ BKE_mesh_strip_loose_faces(me);
+}
+
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name CD Flag Initialization
+ * \{ */
+
+void BKE_mesh_do_versions_cd_flag_init(Mesh *mesh)
+{
+ using namespace blender;
+ if (UNLIKELY(mesh->cd_flag)) {
+ return;
+ }
+
+ const Span<MVert> verts = mesh->verts();
+ const Span<MEdge> edges = mesh->edges();
+
+ for (const MVert &vert : verts) {
+ if (vert.bweight_legacy != 0) {
+ mesh->cd_flag |= ME_CDFLAG_VERT_BWEIGHT;
+ break;
+ }
+ }
+
+ for (const MEdge &edge : edges) {
+ if (edge.bweight_legacy != 0) {
+ mesh->cd_flag |= ME_CDFLAG_EDGE_BWEIGHT;
+ if (mesh->cd_flag & ME_CDFLAG_EDGE_CREASE) {
+ break;
+ }
+ }
+ if (edge.crease_legacy != 0) {
+ mesh->cd_flag |= ME_CDFLAG_EDGE_CREASE;
+ if (mesh->cd_flag & ME_CDFLAG_EDGE_BWEIGHT) {
+ break;
+ }
+ }
+ }
+}
+
+/** \} */
+
+/* -------------------------------------------------------------------- */
/** \name NGon Tessellation (NGon to MFace Conversion)
* \{ */
@@ -278,6 +530,115 @@ static void convert_mfaces_to_mpolys(ID *id,
#undef ME_FGON
}
+static void update_active_fdata_layers(CustomData *fdata, CustomData *ldata)
+{
+ int act;
+
+ if (CustomData_has_layer(ldata, CD_MLOOPUV)) {
+ act = CustomData_get_active_layer(ldata, CD_MLOOPUV);
+ CustomData_set_layer_active(fdata, CD_MTFACE, act);
+
+ act = CustomData_get_render_layer(ldata, CD_MLOOPUV);
+ CustomData_set_layer_render(fdata, CD_MTFACE, act);
+
+ act = CustomData_get_clone_layer(ldata, CD_MLOOPUV);
+ CustomData_set_layer_clone(fdata, CD_MTFACE, act);
+
+ act = CustomData_get_stencil_layer(ldata, CD_MLOOPUV);
+ CustomData_set_layer_stencil(fdata, CD_MTFACE, act);
+ }
+
+ if (CustomData_has_layer(ldata, CD_PROP_BYTE_COLOR)) {
+ act = CustomData_get_active_layer(ldata, CD_PROP_BYTE_COLOR);
+ CustomData_set_layer_active(fdata, CD_MCOL, act);
+
+ act = CustomData_get_render_layer(ldata, CD_PROP_BYTE_COLOR);
+ CustomData_set_layer_render(fdata, CD_MCOL, act);
+
+ act = CustomData_get_clone_layer(ldata, CD_PROP_BYTE_COLOR);
+ CustomData_set_layer_clone(fdata, CD_MCOL, act);
+
+ act = CustomData_get_stencil_layer(ldata, CD_PROP_BYTE_COLOR);
+ CustomData_set_layer_stencil(fdata, CD_MCOL, act);
+ }
+}
+
+#ifndef NDEBUG
+/**
+ * Debug check, used to assert when we expect layers to be in/out of sync.
+ *
+ * \param fallback: Use when there are no layers to handle,
+ * since callers may expect success or failure.
+ */
+static bool check_matching_legacy_layer_counts(CustomData *fdata, CustomData *ldata, bool fallback)
+{
+ int a_num = 0, b_num = 0;
+# define LAYER_CMP(l_a, t_a, l_b, t_b) \
+ ((a_num += CustomData_number_of_layers(l_a, t_a)) == \
+ (b_num += CustomData_number_of_layers(l_b, t_b)))
+
+ if (!LAYER_CMP(ldata, CD_MLOOPUV, fdata, CD_MTFACE)) {
+ return false;
+ }
+ if (!LAYER_CMP(ldata, CD_PROP_BYTE_COLOR, fdata, CD_MCOL)) {
+ return false;
+ }
+ if (!LAYER_CMP(ldata, CD_PREVIEW_MLOOPCOL, fdata, CD_PREVIEW_MCOL)) {
+ return false;
+ }
+ if (!LAYER_CMP(ldata, CD_ORIGSPACE_MLOOP, fdata, CD_ORIGSPACE)) {
+ return false;
+ }
+ if (!LAYER_CMP(ldata, CD_NORMAL, fdata, CD_TESSLOOPNORMAL)) {
+ return false;
+ }
+ if (!LAYER_CMP(ldata, CD_TANGENT, fdata, CD_TANGENT)) {
+ return false;
+ }
+
+# undef LAYER_CMP
+
+ /* if no layers are on either CustomData's,
+ * then there was nothing to do... */
+ return a_num ? true : fallback;
+}
+#endif
+
+static void add_mface_layers(CustomData *fdata, CustomData *ldata, int total)
+{
+ /* avoid accumulating extra layers */
+ BLI_assert(!check_matching_legacy_layer_counts(fdata, ldata, false));
+
+ for (int i = 0; i < ldata->totlayer; i++) {
+ if (ldata->layers[i].type == CD_MLOOPUV) {
+ CustomData_add_layer_named(
+ fdata, CD_MTFACE, CD_SET_DEFAULT, nullptr, total, ldata->layers[i].name);
+ }
+ if (ldata->layers[i].type == CD_PROP_BYTE_COLOR) {
+ CustomData_add_layer_named(
+ fdata, CD_MCOL, CD_SET_DEFAULT, nullptr, total, ldata->layers[i].name);
+ }
+ else if (ldata->layers[i].type == CD_PREVIEW_MLOOPCOL) {
+ CustomData_add_layer_named(
+ fdata, CD_PREVIEW_MCOL, CD_SET_DEFAULT, nullptr, total, ldata->layers[i].name);
+ }
+ else if (ldata->layers[i].type == CD_ORIGSPACE_MLOOP) {
+ CustomData_add_layer_named(
+ fdata, CD_ORIGSPACE, CD_SET_DEFAULT, nullptr, total, ldata->layers[i].name);
+ }
+ else if (ldata->layers[i].type == CD_NORMAL) {
+ CustomData_add_layer_named(
+ fdata, CD_TESSLOOPNORMAL, CD_SET_DEFAULT, nullptr, total, ldata->layers[i].name);
+ }
+ else if (ldata->layers[i].type == CD_TANGENT) {
+ CustomData_add_layer_named(
+ fdata, CD_TANGENT, CD_SET_DEFAULT, nullptr, total, ldata->layers[i].name);
+ }
+ }
+
+ update_active_fdata_layers(fdata, ldata);
+}
+
static void mesh_ensure_tessellation_customdata(Mesh *me)
{
if (UNLIKELY((me->totface != 0) && (me->totpoly == 0))) {
@@ -296,7 +657,7 @@ static void mesh_ensure_tessellation_customdata(Mesh *me)
if (tottex_tessface != tottex_original || totcol_tessface != totcol_original) {
BKE_mesh_tessface_clear(me);
- BKE_mesh_add_mface_layers(&me->fdata, &me->ldata, me->totface);
+ add_mface_layers(&me->fdata, &me->ldata, me->totface);
/* TODO: add some `--debug-mesh` option. */
if (G.debug & G_DEBUG) {
@@ -784,7 +1145,7 @@ static int mesh_tessface_calc(CustomData *fdata,
/* #CD_ORIGINDEX will contain an array of indices from tessellation-faces to the polygons
* they are directly tessellated from. */
CustomData_add_layer(fdata, CD_ORIGINDEX, CD_ASSIGN, mface_to_poly_map, totface);
- BKE_mesh_add_mface_layers(fdata, ldata, totface);
+ add_mface_layers(fdata, ldata, totface);
/* NOTE: quad detection issue - fourth vertidx vs fourth loopidx:
* Polygons take care of their loops ordering, hence not of their vertices ordering.
@@ -840,82 +1201,6 @@ void BKE_mesh_tessface_ensure(struct Mesh *mesh)
}
}
-#ifndef NDEBUG
-/**
- * Debug check, used to assert when we expect layers to be in/out of sync.
- *
- * \param fallback: Use when there are no layers to handle,
- * since callers may expect success or failure.
- */
-static bool check_matching_legacy_layer_counts(CustomData *fdata, CustomData *ldata, bool fallback)
-{
- int a_num = 0, b_num = 0;
-# define LAYER_CMP(l_a, t_a, l_b, t_b) \
- ((a_num += CustomData_number_of_layers(l_a, t_a)) == \
- (b_num += CustomData_number_of_layers(l_b, t_b)))
-
- if (!LAYER_CMP(ldata, CD_MLOOPUV, fdata, CD_MTFACE)) {
- return false;
- }
- if (!LAYER_CMP(ldata, CD_PROP_BYTE_COLOR, fdata, CD_MCOL)) {
- return false;
- }
- if (!LAYER_CMP(ldata, CD_PREVIEW_MLOOPCOL, fdata, CD_PREVIEW_MCOL)) {
- return false;
- }
- if (!LAYER_CMP(ldata, CD_ORIGSPACE_MLOOP, fdata, CD_ORIGSPACE)) {
- return false;
- }
- if (!LAYER_CMP(ldata, CD_NORMAL, fdata, CD_TESSLOOPNORMAL)) {
- return false;
- }
- if (!LAYER_CMP(ldata, CD_TANGENT, fdata, CD_TANGENT)) {
- return false;
- }
-
-# undef LAYER_CMP
-
- /* if no layers are on either CustomData's,
- * then there was nothing to do... */
- return a_num ? true : fallback;
-}
-#endif
-
-void BKE_mesh_add_mface_layers(CustomData *fdata, CustomData *ldata, int total)
-{
- /* avoid accumulating extra layers */
- BLI_assert(!check_matching_legacy_layer_counts(fdata, ldata, false));
-
- for (int i = 0; i < ldata->totlayer; i++) {
- if (ldata->layers[i].type == CD_MLOOPUV) {
- CustomData_add_layer_named(
- fdata, CD_MTFACE, CD_SET_DEFAULT, nullptr, total, ldata->layers[i].name);
- }
- if (ldata->layers[i].type == CD_PROP_BYTE_COLOR) {
- CustomData_add_layer_named(
- fdata, CD_MCOL, CD_SET_DEFAULT, nullptr, total, ldata->layers[i].name);
- }
- else if (ldata->layers[i].type == CD_PREVIEW_MLOOPCOL) {
- CustomData_add_layer_named(
- fdata, CD_PREVIEW_MCOL, CD_SET_DEFAULT, nullptr, total, ldata->layers[i].name);
- }
- else if (ldata->layers[i].type == CD_ORIGSPACE_MLOOP) {
- CustomData_add_layer_named(
- fdata, CD_ORIGSPACE, CD_SET_DEFAULT, nullptr, total, ldata->layers[i].name);
- }
- else if (ldata->layers[i].type == CD_NORMAL) {
- CustomData_add_layer_named(
- fdata, CD_TESSLOOPNORMAL, CD_SET_DEFAULT, nullptr, total, ldata->layers[i].name);
- }
- else if (ldata->layers[i].type == CD_TANGENT) {
- CustomData_add_layer_named(
- fdata, CD_TANGENT, CD_SET_DEFAULT, nullptr, total, ldata->layers[i].name);
- }
- }
-
- CustomData_bmesh_update_active_layers(fdata, ldata);
-}
-
/** \} */
/* -------------------------------------------------------------------- */
diff --git a/source/blender/blenkernel/intern/mesh_mirror.c b/source/blender/blenkernel/intern/mesh_mirror.c
index 261bc3d150b..ce3fc5d99c8 100644
--- a/source/blender/blenkernel/intern/mesh_mirror.c
+++ b/source/blender/blenkernel/intern/mesh_mirror.c
@@ -152,8 +152,8 @@ Mesh *BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(MirrorModifierData *mmd,
/* tmp is a transform from coords relative to the object's own origin,
* to coords relative to the mirror object origin */
- invert_m4_m4(tmp, mirror_ob->obmat);
- mul_m4_m4m4(tmp, tmp, ob->obmat);
+ invert_m4_m4(tmp, mirror_ob->object_to_world);
+ mul_m4_m4m4(tmp, tmp, ob->object_to_world);
/* itmp is the reverse transform back to origin-relative coordinates */
invert_m4_m4(itmp, tmp);
@@ -169,9 +169,9 @@ Mesh *BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(MirrorModifierData *mmd,
/* Account for non-uniform scale in `ob`, see: T87592. */
float ob_scale[3] = {
- len_squared_v3(ob->obmat[0]),
- len_squared_v3(ob->obmat[1]),
- len_squared_v3(ob->obmat[2]),
+ len_squared_v3(ob->object_to_world[0]),
+ len_squared_v3(ob->object_to_world[1]),
+ len_squared_v3(ob->object_to_world[2]),
};
/* Scale to avoid precision loss with extreme values. */
const float ob_scale_max = max_fff(UNPACK3(ob_scale));
diff --git a/source/blender/blenkernel/intern/mesh_remesh_voxel.cc b/source/blender/blenkernel/intern/mesh_remesh_voxel.cc
index 62354c83df1..0887e26148a 100644
--- a/source/blender/blenkernel/intern/mesh_remesh_voxel.cc
+++ b/source/blender/blenkernel/intern/mesh_remesh_voxel.cc
@@ -19,6 +19,7 @@
#include "BLI_math_vec_types.hh"
#include "BLI_math_vector.h"
#include "BLI_span.hh"
+#include "BLI_task.hh"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
@@ -302,17 +303,20 @@ void BKE_mesh_remesh_reproject_paint_mask(Mesh *target, const Mesh *source)
&target->vdata, CD_PAINT_MASK, CD_CONSTRUCT, nullptr, target->totvert);
}
- for (int i = 0; i < target->totvert; i++) {
- float from_co[3];
- BVHTreeNearest nearest;
- nearest.index = -1;
- nearest.dist_sq = FLT_MAX;
- copy_v3_v3(from_co, target_verts[i].co);
- BLI_bvhtree_find_nearest(bvhtree.tree, from_co, &nearest, bvhtree.nearest_callback, &bvhtree);
- if (nearest.index != -1) {
- target_mask[i] = source_mask[nearest.index];
+ blender::threading::parallel_for(IndexRange(target->totvert), 4096, [&](const IndexRange range) {
+ for (const int i : range) {
+ float from_co[3];
+ BVHTreeNearest nearest;
+ nearest.index = -1;
+ nearest.dist_sq = FLT_MAX;
+ copy_v3_v3(from_co, target_verts[i].co);
+ BLI_bvhtree_find_nearest(
+ bvhtree.tree, from_co, &nearest, bvhtree.nearest_callback, &bvhtree);
+ if (nearest.index != -1) {
+ target_mask[i] = source_mask[nearest.index];
+ }
}
- }
+ });
free_bvhtree_from_mesh(&bvhtree);
}
@@ -344,21 +348,24 @@ void BKE_remesh_reproject_sculpt_face_sets(Mesh *target, const Mesh *source)
BVHTreeFromMesh bvhtree = {nullptr};
BKE_bvhtree_from_mesh_get(&bvhtree, source, BVHTREE_FROM_LOOPTRI, 2);
- for (int i = 0; i < target->totpoly; i++) {
- float from_co[3];
- BVHTreeNearest nearest;
- nearest.index = -1;
- nearest.dist_sq = FLT_MAX;
- const MPoly *mpoly = &target_polys[i];
- BKE_mesh_calc_poly_center(mpoly, &target_loops[mpoly->loopstart], target_verts, from_co);
- BLI_bvhtree_find_nearest(bvhtree.tree, from_co, &nearest, bvhtree.nearest_callback, &bvhtree);
- if (nearest.index != -1) {
- dst[i] = src[looptri[nearest.index].poly];
- }
- else {
- dst[i] = 1;
+ blender::threading::parallel_for(IndexRange(target->totpoly), 2048, [&](const IndexRange range) {
+ for (const int i : range) {
+ float from_co[3];
+ BVHTreeNearest nearest;
+ nearest.index = -1;
+ nearest.dist_sq = FLT_MAX;
+ const MPoly *mpoly = &target_polys[i];
+ BKE_mesh_calc_poly_center(mpoly, &target_loops[mpoly->loopstart], target_verts, from_co);
+ BLI_bvhtree_find_nearest(
+ bvhtree.tree, from_co, &nearest, bvhtree.nearest_callback, &bvhtree);
+ if (nearest.index != -1) {
+ dst[i] = src[looptri[nearest.index].poly];
+ }
+ else {
+ dst[i] = 1;
+ }
}
- }
+ });
free_bvhtree_from_mesh(&bvhtree);
dst_face_sets.finish();
}
@@ -399,85 +406,87 @@ void BKE_remesh_reproject_vertex_paint(Mesh *target, const Mesh *source)
MVert *target_verts = (MVert *)CustomData_get_layer(&target->vdata, CD_MVERT);
if (domain == ATTR_DOMAIN_POINT) {
- for (int i = 0; i < target->totvert; i++) {
- BVHTreeNearest nearest;
- nearest.index = -1;
- nearest.dist_sq = FLT_MAX;
- BLI_bvhtree_find_nearest(
- bvhtree.tree, target_verts[i].co, &nearest, bvhtree.nearest_callback, &bvhtree);
-
- if (nearest.index != -1) {
- memcpy(POINTER_OFFSET(target_data, size_t(i) * data_size),
- POINTER_OFFSET(source_data, size_t(nearest.index) * data_size),
- data_size);
- }
- }
+ blender::threading::parallel_for(
+ IndexRange(target->totvert), 4096, [&](const IndexRange range) {
+ for (const int i : range) {
+ BVHTreeNearest nearest;
+ nearest.index = -1;
+ nearest.dist_sq = FLT_MAX;
+ BLI_bvhtree_find_nearest(
+ bvhtree.tree, target_verts[i].co, &nearest, bvhtree.nearest_callback, &bvhtree);
+
+ if (nearest.index != -1) {
+ memcpy(POINTER_OFFSET(target_data, size_t(i) * data_size),
+ POINTER_OFFSET(source_data, size_t(nearest.index) * data_size),
+ data_size);
+ }
+ }
+ });
}
else {
/* Lazily init vertex -> loop maps. */
if (!source_lmap) {
- const MPoly *source_polys = (MPoly *)CustomData_get_layer(&source->pdata, CD_MPOLY);
- const MLoop *source_loops = (MLoop *)CustomData_get_layer(&source->ldata, CD_MLOOP);
- const MPoly *target_polys = (MPoly *)CustomData_get_layer(&target->pdata, CD_MPOLY);
- const MLoop *target_loops = (MLoop *)CustomData_get_layer(&target->ldata, CD_MLOOP);
-
BKE_mesh_vert_loop_map_create(&source_lmap,
&source_lmap_mem,
- source_polys,
- source_loops,
+ source->polys().data(),
+ source->loops().data(),
source->totvert,
source->totpoly,
source->totloop);
BKE_mesh_vert_loop_map_create(&target_lmap,
&target_lmap_mem,
- target_polys,
- target_loops,
+ target->polys().data(),
+ target->loops().data(),
target->totvert,
target->totpoly,
target->totloop);
}
- for (int i = 0; i < target->totvert; i++) {
- BVHTreeNearest nearest;
- nearest.index = -1;
- nearest.dist_sq = FLT_MAX;
- BLI_bvhtree_find_nearest(
- bvhtree.tree, target_verts[i].co, &nearest, bvhtree.nearest_callback, &bvhtree);
-
- if (nearest.index == -1) {
- continue;
- }
-
- MeshElemMap *source_loops = source_lmap + nearest.index;
- MeshElemMap *target_loops = target_lmap + i;
-
- if (target_loops->count == 0 || source_loops->count == 0) {
- continue;
- }
-
- /*
- * Average color data for loops around the source vertex into
- * the first target loop around the target vertex
- */
-
- CustomData_interp(source_cdata,
- target_cdata,
- source_loops->indices,
- nullptr,
- nullptr,
- source_loops->count,
- target_loops->indices[0]);
-
- void *elem = POINTER_OFFSET(target_data, size_t(target_loops->indices[0]) * data_size);
-
- /* Copy to rest of target loops. */
- for (int j = 1; j < target_loops->count; j++) {
- memcpy(POINTER_OFFSET(target_data, size_t(target_loops->indices[j]) * data_size),
- elem,
- data_size);
- }
- }
+ blender::threading::parallel_for(
+ IndexRange(target->totvert), 2048, [&](const IndexRange range) {
+ for (const int i : range) {
+ BVHTreeNearest nearest;
+ nearest.index = -1;
+ nearest.dist_sq = FLT_MAX;
+ BLI_bvhtree_find_nearest(
+ bvhtree.tree, target_verts[i].co, &nearest, bvhtree.nearest_callback, &bvhtree);
+
+ if (nearest.index == -1) {
+ continue;
+ }
+
+ MeshElemMap *source_loops = source_lmap + nearest.index;
+ MeshElemMap *target_loops = target_lmap + i;
+
+ if (target_loops->count == 0 || source_loops->count == 0) {
+ continue;
+ }
+
+ /*
+ * Average color data for loops around the source vertex into
+ * the first target loop around the target vertex
+ */
+
+ CustomData_interp(source_cdata,
+ target_cdata,
+ source_loops->indices,
+ nullptr,
+ nullptr,
+ source_loops->count,
+ target_loops->indices[0]);
+
+ void *elem = POINTER_OFFSET(target_data,
+ size_t(target_loops->indices[0]) * data_size);
+
+ /* Copy to rest of target loops. */
+ for (int j = 1; j < target_loops->count; j++) {
+ memcpy(POINTER_OFFSET(target_data, size_t(target_loops->indices[j]) * data_size),
+ elem,
+ data_size);
+ }
+ }
+ });
}
}
diff --git a/source/blender/blenkernel/intern/mesh_validate.cc b/source/blender/blenkernel/intern/mesh_validate.cc
index 9b140171912..9cd3b6e9e9e 100644
--- a/source/blender/blenkernel/intern/mesh_validate.cc
+++ b/source/blender/blenkernel/intern/mesh_validate.cc
@@ -1315,216 +1315,6 @@ void BKE_mesh_strip_loose_edges(Mesh *me)
/** \name Mesh Edge Calculation
* \{ */
-/* make edges in a Mesh, for outside of editmode */
-
-struct EdgeSort {
- uint v1, v2;
- char is_loose, is_draw;
-};
-
-/* edges have to be added with lowest index first for sorting */
-static void to_edgesort(struct EdgeSort *ed, uint v1, uint v2, char is_loose, short is_draw)
-{
- if (v1 < v2) {
- ed->v1 = v1;
- ed->v2 = v2;
- }
- else {
- ed->v1 = v2;
- ed->v2 = v1;
- }
- ed->is_loose = is_loose;
- ed->is_draw = is_draw;
-}
-
-static int vergedgesort(const void *v1, const void *v2)
-{
- const struct EdgeSort *x1 = static_cast<const struct EdgeSort *>(v1);
- const struct EdgeSort *x2 = static_cast<const struct EdgeSort *>(v2);
-
- if (x1->v1 > x2->v1) {
- return 1;
- }
- if (x1->v1 < x2->v1) {
- return -1;
- }
- if (x1->v2 > x2->v2) {
- return 1;
- }
- if (x1->v2 < x2->v2) {
- return -1;
- }
-
- return 0;
-}
-
-/* Create edges based on known verts and faces,
- * this function is only used when loading very old blend files */
-
-static void mesh_calc_edges_mdata(const MVert * /*allvert*/,
- const MFace *allface,
- MLoop *allloop,
- const MPoly *allpoly,
- int /*totvert*/,
- int totface,
- int /*totloop*/,
- int totpoly,
- const bool use_old,
- MEdge **r_medge,
- int *r_totedge)
-{
- const MPoly *mpoly;
- const MFace *mface;
- MEdge *medge, *med;
- EdgeHash *hash;
- struct EdgeSort *edsort, *ed;
- int a, totedge = 0;
- uint totedge_final = 0;
- uint edge_index;
-
- /* we put all edges in array, sort them, and detect doubles that way */
-
- for (a = totface, mface = allface; a > 0; a--, mface++) {
- if (mface->v4) {
- totedge += 4;
- }
- else if (mface->v3) {
- totedge += 3;
- }
- else {
- totedge += 1;
- }
- }
-
- if (totedge == 0) {
- /* flag that mesh has edges */
- (*r_medge) = (MEdge *)MEM_callocN(0, __func__);
- (*r_totedge) = 0;
- return;
- }
-
- ed = edsort = (EdgeSort *)MEM_mallocN(totedge * sizeof(struct EdgeSort), "EdgeSort");
-
- for (a = totface, mface = allface; a > 0; a--, mface++) {
- to_edgesort(ed++, mface->v1, mface->v2, !mface->v3, mface->edcode & ME_V1V2);
- if (mface->v4) {
- to_edgesort(ed++, mface->v2, mface->v3, 0, mface->edcode & ME_V2V3);
- to_edgesort(ed++, mface->v3, mface->v4, 0, mface->edcode & ME_V3V4);
- to_edgesort(ed++, mface->v4, mface->v1, 0, mface->edcode & ME_V4V1);
- }
- else if (mface->v3) {
- to_edgesort(ed++, mface->v2, mface->v3, 0, mface->edcode & ME_V2V3);
- to_edgesort(ed++, mface->v3, mface->v1, 0, mface->edcode & ME_V3V1);
- }
- }
-
- qsort(edsort, totedge, sizeof(struct EdgeSort), vergedgesort);
-
- /* count final amount */
- for (a = totedge, ed = edsort; a > 1; a--, ed++) {
- /* edge is unique when it differs from next edge, or is last */
- if (ed->v1 != (ed + 1)->v1 || ed->v2 != (ed + 1)->v2) {
- totedge_final++;
- }
- }
- totedge_final++;
-
- medge = (MEdge *)MEM_callocN(sizeof(MEdge) * totedge_final, __func__);
-
- for (a = totedge, med = medge, ed = edsort; a > 1; a--, ed++) {
- /* edge is unique when it differs from next edge, or is last */
- if (ed->v1 != (ed + 1)->v1 || ed->v2 != (ed + 1)->v2) {
- med->v1 = ed->v1;
- med->v2 = ed->v2;
- if (use_old == false || ed->is_draw) {
- med->flag = ME_EDGEDRAW | ME_EDGERENDER;
- }
- if (ed->is_loose) {
- med->flag |= ME_LOOSEEDGE;
- }
-
- /* order is swapped so extruding this edge as a surface won't flip face normals
- * with cyclic curves */
- if (ed->v1 + 1 != ed->v2) {
- SWAP(uint, med->v1, med->v2);
- }
- med++;
- }
- else {
- /* Equal edge, merge the draw-flag. */
- (ed + 1)->is_draw |= ed->is_draw;
- }
- }
- /* last edge */
- med->v1 = ed->v1;
- med->v2 = ed->v2;
- med->flag = ME_EDGEDRAW;
- if (ed->is_loose) {
- med->flag |= ME_LOOSEEDGE;
- }
- med->flag |= ME_EDGERENDER;
-
- MEM_freeN(edsort);
-
- /* set edge members of mloops */
- hash = BLI_edgehash_new_ex(__func__, totedge_final);
- for (edge_index = 0, med = medge; edge_index < totedge_final; edge_index++, med++) {
- BLI_edgehash_insert(hash, med->v1, med->v2, POINTER_FROM_UINT(edge_index));
- }
-
- mpoly = allpoly;
- for (a = 0; a < totpoly; a++, mpoly++) {
- MLoop *ml, *ml_next;
- int i = mpoly->totloop;
-
- ml_next = allloop + mpoly->loopstart; /* first loop */
- ml = &ml_next[i - 1]; /* last loop */
-
- while (i-- != 0) {
- ml->e = POINTER_AS_UINT(BLI_edgehash_lookup(hash, ml->v, ml_next->v));
- ml = ml_next;
- ml_next++;
- }
- }
-
- BLI_edgehash_free(hash, nullptr);
-
- *r_medge = medge;
- *r_totedge = totedge_final;
-}
-
-void BKE_mesh_calc_edges_legacy(Mesh *me, const bool use_old)
-{
- MEdge *medge;
- int totedge = 0;
- const Span<MVert> verts = me->verts();
- const Span<MPoly> polys = me->polys();
- MutableSpan<MLoop> loops = me->loops_for_write();
-
- mesh_calc_edges_mdata(verts.data(),
- (MFace *)CustomData_get_layer(&me->fdata, CD_MFACE),
- loops.data(),
- polys.data(),
- verts.size(),
- me->totface,
- loops.size(),
- polys.size(),
- use_old,
- &medge,
- &totedge);
-
- if (totedge == 0) {
- /* flag that mesh has edges */
- me->totedge = 0;
- return;
- }
-
- medge = (MEdge *)CustomData_add_layer(&me->edata, CD_MEDGE, CD_ASSIGN, medge, totedge);
- me->totedge = totedge;
-
- BKE_mesh_strip_loose_faces(me);
-}
-
void BKE_mesh_calc_edges_loose(Mesh *mesh)
{
const Span<MLoop> loops = mesh->loops();
@@ -1579,7 +1369,7 @@ void BKE_mesh_calc_edges_tessface(Mesh *mesh)
BLI_edgesetIterator_step(ehi), i++, med++, index++) {
BLI_edgesetIterator_getKey(ehi, &med->v1, &med->v2);
- med->flag = ME_EDGEDRAW | ME_EDGERENDER;
+ med->flag = ME_EDGEDRAW;
*index = ORIGINDEX_NONE;
}
BLI_edgesetIterator_free(ehi);
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 326f239a95a..c0aff204069 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -2055,7 +2055,7 @@ bool BKE_nla_tweakmode_enter(AnimData *adt)
}
/* If block is already in tweak-mode, just leave, but we should report
- * that this block is in tweak-mode (as our returncode). */
+ * that this block is in tweak-mode (as our return-code). */
if (adt->flag & ADT_NLA_EDIT_ON) {
return true;
}
diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc
index 8f8cd02e119..aa6ca37f48c 100644
--- a/source/blender/blenkernel/intern/node.cc
+++ b/source/blender/blenkernel/intern/node.cc
@@ -3381,10 +3381,18 @@ struct bNodeSocket *ntreeAddSocketInterfaceFromSocket(bNodeTree *ntree,
bNode *from_node,
bNodeSocket *from_sock)
{
- bNodeSocket *iosock = ntreeAddSocketInterface(ntree,
- static_cast<eNodeSocketInOut>(from_sock->in_out),
- from_sock->idname,
- DATA_(from_sock->name));
+ return ntreeAddSocketInterfaceFromSocketWithName(
+ ntree, from_node, from_sock, from_sock->idname, from_sock->name);
+}
+
+struct bNodeSocket *ntreeAddSocketInterfaceFromSocketWithName(bNodeTree *ntree,
+ bNode *from_node,
+ bNodeSocket *from_sock,
+ const char *idname,
+ const char *name)
+{
+ bNodeSocket *iosock = ntreeAddSocketInterface(
+ ntree, static_cast<eNodeSocketInOut>(from_sock->in_out), idname, DATA_(name));
if (iosock) {
if (iosock->typeinfo->interface_from_socket) {
iosock->typeinfo->interface_from_socket(ntree, iosock, from_node, from_sock);
@@ -4338,12 +4346,6 @@ void node_type_socket_templates(struct bNodeType *ntype,
}
}
-void node_type_init(struct bNodeType *ntype,
- void (*initfunc)(struct bNodeTree *ntree, struct bNode *node))
-{
- ntype->initfunc = initfunc;
-}
-
void node_type_size(struct bNodeType *ntype, int width, int minwidth, int maxwidth)
{
ntype->width = width;
@@ -4391,33 +4393,6 @@ void node_type_storage(bNodeType *ntype,
ntype->freefunc = freefunc;
}
-void node_type_update(struct bNodeType *ntype,
- void (*updatefunc)(struct bNodeTree *ntree, struct bNode *node))
-{
- ntype->updatefunc = updatefunc;
-}
-
-void node_type_group_update(struct bNodeType *ntype,
- void (*group_update_func)(struct bNodeTree *ntree, struct bNode *node))
-{
- ntype->group_update_func = group_update_func;
-}
-
-void node_type_exec(struct bNodeType *ntype,
- NodeInitExecFunction init_exec_fn,
- NodeFreeExecFunction free_exec_fn,
- NodeExecFunction exec_fn)
-{
- ntype->init_exec_fn = init_exec_fn;
- ntype->free_exec_fn = free_exec_fn;
- ntype->exec_fn = exec_fn;
-}
-
-void node_type_gpu(struct bNodeType *ntype, NodeGPUExecFunction gpu_fn)
-{
- ntype->gpu_fn = gpu_fn;
-}
-
/* callbacks for undefined types */
static bool node_undefined_poll(bNodeType * /*ntype*/,
diff --git a/source/blender/blenkernel/intern/object.cc b/source/blender/blenkernel/intern/object.cc
index d98f5e85028..9085a54d86f 100644
--- a/source/blender/blenkernel/intern/object.cc
+++ b/source/blender/blenkernel/intern/object.cc
@@ -1330,14 +1330,14 @@ void BKE_object_modifier_hook_reset(Object *ob, HookModifierData *hmd)
/* Calculate the world-space matrix for the pose-channel target first,
* then carry on as usual. */
- mul_m4_m4m4(mat, hmd->object->obmat, pchan->pose_mat);
+ mul_m4_m4m4(mat, hmd->object->object_to_world, pchan->pose_mat);
invert_m4_m4(imat, mat);
- mul_m4_m4m4(hmd->parentinv, imat, ob->obmat);
+ mul_m4_m4m4(hmd->parentinv, imat, ob->object_to_world);
}
else {
- invert_m4_m4(hmd->object->imat, hmd->object->obmat);
- mul_m4_m4m4(hmd->parentinv, hmd->object->imat, ob->obmat);
+ invert_m4_m4(hmd->object->world_to_object, hmd->object->object_to_world);
+ mul_m4_m4m4(hmd->parentinv, hmd->object->world_to_object, ob->object_to_world);
}
}
}
@@ -1355,14 +1355,14 @@ void BKE_object_modifier_gpencil_hook_reset(Object *ob, HookGpencilModifierData
/* Calculate the world-space matrix for the pose-channel target first,
* then carry on as usual. */
- mul_m4_m4m4(mat, hmd->object->obmat, pchan->pose_mat);
+ mul_m4_m4m4(mat, hmd->object->object_to_world, pchan->pose_mat);
invert_m4_m4(imat, mat);
- mul_m4_m4m4(hmd->parentinv, imat, ob->obmat);
+ mul_m4_m4m4(hmd->parentinv, imat, ob->object_to_world);
}
else {
- invert_m4_m4(hmd->object->imat, hmd->object->obmat);
- mul_m4_m4m4(hmd->parentinv, hmd->object->imat, ob->obmat);
+ invert_m4_m4(hmd->object->world_to_object, hmd->object->object_to_world);
+ mul_m4_m4m4(hmd->parentinv, hmd->object->world_to_object, ob->object_to_world);
}
}
@@ -2541,6 +2541,28 @@ Object *BKE_object_pose_armature_get(Object *ob)
return nullptr;
}
+Object *BKE_object_pose_armature_get_with_wpaint_check(Object *ob)
+{
+ /* When not in weight paint mode. */
+ if (ob) {
+ switch (ob->type) {
+ case OB_MESH: {
+ if ((ob->mode & OB_MODE_WEIGHT_PAINT) == 0) {
+ return nullptr;
+ }
+ break;
+ }
+ case OB_GPENCIL: {
+ if ((ob->mode & OB_MODE_WEIGHT_GPENCIL) == 0) {
+ return nullptr;
+ }
+ break;
+ }
+ }
+ }
+ return BKE_object_pose_armature_get(ob);
+}
+
Object *BKE_object_pose_armature_get_visible(Object *ob,
const Scene *scene,
ViewLayer *view_layer,
@@ -3102,10 +3124,10 @@ void BKE_object_matrix_local_get(struct Object *ob, float r_mat[4][4])
BKE_object_get_parent_matrix(ob, ob->parent, par_imat);
invert_m4(par_imat);
- mul_m4_m4m4(r_mat, par_imat, ob->obmat);
+ mul_m4_m4m4(r_mat, par_imat, ob->object_to_world);
}
else {
- copy_m4_m4(r_mat, ob->obmat);
+ copy_m4_m4(r_mat, ob->object_to_world);
}
}
@@ -3359,32 +3381,32 @@ void BKE_object_get_parent_matrix(Object *ob, Object *par, float r_parentmat[4][
}
if (ok) {
- mul_m4_m4m4(r_parentmat, par->obmat, tmat);
+ mul_m4_m4m4(r_parentmat, par->object_to_world, tmat);
}
else {
- copy_m4_m4(r_parentmat, par->obmat);
+ copy_m4_m4(r_parentmat, par->object_to_world);
}
break;
}
case PARBONE:
ob_parbone(ob, par, tmat);
- mul_m4_m4m4(r_parentmat, par->obmat, tmat);
+ mul_m4_m4m4(r_parentmat, par->object_to_world, tmat);
break;
case PARVERT1:
unit_m4(r_parentmat);
give_parvert(par, ob->par1, vec);
- mul_v3_m4v3(r_parentmat[3], par->obmat, vec);
+ mul_v3_m4v3(r_parentmat[3], par->object_to_world, vec);
break;
case PARVERT3:
ob_parvert3(ob, par, tmat);
- mul_m4_m4m4(r_parentmat, par->obmat, tmat);
+ mul_m4_m4m4(r_parentmat, par->object_to_world, tmat);
break;
case PARSKEL:
- copy_m4_m4(r_parentmat, par->obmat);
+ copy_m4_m4(r_parentmat, par->object_to_world);
break;
}
}
@@ -3422,7 +3444,7 @@ static void solve_parenting(
/* origin, for help line */
if (set_origin) {
if ((ob->partype & PARTYPE) == PARSKEL) {
- copy_v3_v3(ob->runtime.parent_display_origin, par->obmat[3]);
+ copy_v3_v3(ob->runtime.parent_display_origin, par->object_to_world[3]);
}
else {
copy_v3_v3(ob->runtime.parent_display_origin, totmat[3]);
@@ -3441,10 +3463,10 @@ static void object_where_is_calc_ex(Depsgraph *depsgraph,
Object *par = ob->parent;
/* calculate parent matrix */
- solve_parenting(ob, par, true, ob->obmat, r_originmat);
+ solve_parenting(ob, par, true, ob->object_to_world, r_originmat);
}
else {
- BKE_object_to_mat4(ob, ob->obmat);
+ BKE_object_to_mat4(ob, ob->object_to_world);
}
/* try to fall back to the scene rigid body world if none given */
@@ -3461,7 +3483,7 @@ static void object_where_is_calc_ex(Depsgraph *depsgraph,
}
/* set negative scale flag in object */
- if (is_negative_m4(ob->obmat)) {
+ if (is_negative_m4(ob->object_to_world)) {
ob->transflag |= OB_NEG_SCALE;
}
else {
@@ -3507,7 +3529,7 @@ void BKE_object_workob_calc_parent(Depsgraph *depsgraph, Scene *scene, Object *o
{
BKE_object_workob_clear(workob);
- unit_m4(workob->obmat);
+ unit_m4(workob->object_to_world);
unit_m4(workob->parentinv);
unit_m4(workob->constinv);
@@ -3599,7 +3621,7 @@ void BKE_object_apply_parent_inverse(struct Object *ob)
* `inv(parent) @ world = parentinv`
* `parentinv = inv(parent) @ world`
*
- * NOTE: If `ob->obmat` has shear, then this `parentinv` is insufficient because
+ * NOTE: If `ob->object_to_world` has shear, then this `parentinv` is insufficient because
* `parent @ parentinv => shearless result`
*
* Thus, local will have shear which cannot be decomposed into TRS:
@@ -3628,7 +3650,7 @@ void BKE_object_apply_parent_inverse(struct Object *ob)
copy_m4_m4(ob_local, ob->parentinv);
invert_m4(ob_local);
mul_m4_m4_post(ob_local, par_imat);
- mul_m4_m4_post(ob_local, ob->obmat);
+ mul_m4_m4_post(ob_local, ob->object_to_world);
/* Send use_compat=False so the rotation is predictable. */
BKE_object_apply_mat4(ob, ob_local, false, false);
@@ -3793,7 +3815,7 @@ void BKE_object_dimensions_get(Object *ob, float r_vec[3])
const BoundBox *bb = BKE_object_boundbox_get(ob);
if (bb) {
float3 scale;
- mat4_to_size(scale, ob->obmat);
+ mat4_to_size(scale, ob->object_to_world);
r_vec[0] = fabsf(scale[0]) * (bb->vec[4][0] - bb->vec[0][0]);
r_vec[1] = fabsf(scale[1]) * (bb->vec[2][1] - bb->vec[0][1]);
@@ -3850,19 +3872,19 @@ void BKE_object_minmax(Object *ob, float r_min[3], float r_max[3], const bool us
case OB_FONT:
case OB_SURF: {
const BoundBox bb = *BKE_curve_boundbox_get(ob);
- BKE_boundbox_minmax(&bb, ob->obmat, r_min, r_max);
+ BKE_boundbox_minmax(&bb, ob->object_to_world, r_min, r_max);
changed = true;
break;
}
case OB_MESH: {
const BoundBox bb = *BKE_mesh_boundbox_get(ob);
- BKE_boundbox_minmax(&bb, ob->obmat, r_min, r_max);
+ BKE_boundbox_minmax(&bb, ob->object_to_world, r_min, r_max);
changed = true;
break;
}
case OB_GPENCIL: {
const BoundBox bb = *BKE_gpencil_boundbox_get(ob);
- BKE_boundbox_minmax(&bb, ob->obmat, r_min, r_max);
+ BKE_boundbox_minmax(&bb, ob->object_to_world, r_min, r_max);
changed = true;
break;
}
@@ -3875,7 +3897,7 @@ void BKE_object_minmax(Object *ob, float r_min[3], float r_max[3], const bool us
for (v = 0; v < lt->pntsv; v++) {
for (u = 0; u < lt->pntsu; u++, bp++) {
float3 vec;
- mul_v3_m4v3(vec, ob->obmat, bp->vec);
+ mul_v3_m4v3(vec, ob->object_to_world, bp->vec);
minmax_v3v3_v3(r_min, r_max, vec);
}
}
@@ -3890,7 +3912,8 @@ void BKE_object_minmax(Object *ob, float r_min[3], float r_max[3], const bool us
case OB_MBALL: {
float ob_min[3], ob_max[3];
- changed = BKE_mball_minmax_ex((const MetaBall *)ob->data, ob_min, ob_max, ob->obmat, 0);
+ changed = BKE_mball_minmax_ex(
+ (const MetaBall *)ob->data, ob_min, ob_max, ob->object_to_world, 0);
if (changed) {
minmax_v3v3_v3(r_min, r_max, ob_min);
minmax_v3v3_v3(r_min, r_max, ob_max);
@@ -3899,20 +3922,20 @@ void BKE_object_minmax(Object *ob, float r_min[3], float r_max[3], const bool us
}
case OB_CURVES: {
const BoundBox bb = *BKE_curves_boundbox_get(ob);
- BKE_boundbox_minmax(&bb, ob->obmat, r_min, r_max);
+ BKE_boundbox_minmax(&bb, ob->object_to_world, r_min, r_max);
changed = true;
break;
}
case OB_POINTCLOUD: {
const BoundBox bb = *BKE_pointcloud_boundbox_get(ob);
- BKE_boundbox_minmax(&bb, ob->obmat, r_min, r_max);
+ BKE_boundbox_minmax(&bb, ob->object_to_world, r_min, r_max);
changed = true;
break;
}
case OB_VOLUME: {
const BoundBox bb = *BKE_volume_boundbox_get(ob);
- BKE_boundbox_minmax(&bb, ob->obmat, r_min, r_max);
+ BKE_boundbox_minmax(&bb, ob->object_to_world, r_min, r_max);
changed = true;
break;
}
@@ -3926,14 +3949,14 @@ void BKE_object_minmax(Object *ob, float r_min[3], float r_max[3], const bool us
size *= ob->empty_drawsize;
}
- minmax_v3v3_v3(r_min, r_max, ob->obmat[3]);
+ minmax_v3v3_v3(r_min, r_max, ob->object_to_world[3]);
float3 vec;
- copy_v3_v3(vec, ob->obmat[3]);
+ copy_v3_v3(vec, ob->object_to_world[3]);
add_v3_v3(vec, size);
minmax_v3v3_v3(r_min, r_max, vec);
- copy_v3_v3(vec, ob->obmat[3]);
+ copy_v3_v3(vec, ob->object_to_world[3]);
sub_v3_v3(vec, size);
minmax_v3v3_v3(r_min, r_max, vec);
}
@@ -3980,12 +4003,12 @@ bool BKE_object_empty_image_data_is_visible_in_view3d(const Object *ob, const Re
* however the issue with empty objects being visible when viewed from the side
* is only noticeable in orthographic views. */
float3 view_dir;
- sub_v3_v3v3(view_dir, rv3d->viewinv[3], ob->obmat[3]);
- dot = dot_v3v3(ob->obmat[2], view_dir);
+ sub_v3_v3v3(view_dir, rv3d->viewinv[3], ob->object_to_world[3]);
+ dot = dot_v3v3(ob->object_to_world[2], view_dir);
eps = 0.0f;
}
else {
- dot = dot_v3v3(ob->obmat[2], rv3d->viewinv[2]);
+ dot = dot_v3v3(ob->object_to_world[2], rv3d->viewinv[2]);
eps = 1e-5f;
}
if (visibility_flag & OB_EMPTY_IMAGE_HIDE_BACK) {
@@ -4002,7 +4025,7 @@ bool BKE_object_empty_image_data_is_visible_in_view3d(const Object *ob, const Re
if (visibility_flag & OB_EMPTY_IMAGE_HIDE_NON_AXIS_ALIGNED) {
float3 proj, ob_z_axis;
- normalize_v3_v3(ob_z_axis, ob->obmat[2]);
+ normalize_v3_v3(ob_z_axis, ob->object_to_world[2]);
project_plane_v3_v3v3(proj, ob_z_axis, rv3d->viewinv[2]);
const float proj_length_sq = len_squared_v3(proj);
if (proj_length_sq > 1e-5f) {
@@ -4194,7 +4217,7 @@ void BKE_scene_foreach_display_point(Depsgraph *depsgraph,
DEG_ITER_OBJECT_FLAG_DUPLI;
DEG_OBJECT_ITER_BEGIN (&deg_iter_settings, ob) {
if ((ob->base_flag & BASE_SELECTED) != 0) {
- BKE_object_foreach_display_point(ob, ob->obmat, func_cb, user_data);
+ BKE_object_foreach_display_point(ob, ob->object_to_world, func_cb, user_data);
}
}
DEG_OBJECT_ITER_END;
@@ -4237,10 +4260,10 @@ void *BKE_object_tfm_backup(Object *ob)
copy_v3_v3(obtfm->drotAxis, ob->drotAxis);
obtfm->rotAngle = ob->rotAngle;
obtfm->drotAngle = ob->drotAngle;
- copy_m4_m4(obtfm->obmat, ob->obmat);
+ copy_m4_m4(obtfm->obmat, ob->object_to_world);
copy_m4_m4(obtfm->parentinv, ob->parentinv);
copy_m4_m4(obtfm->constinv, ob->constinv);
- copy_m4_m4(obtfm->imat, ob->imat);
+ copy_m4_m4(obtfm->imat, ob->world_to_object);
return (void *)obtfm;
}
@@ -4260,10 +4283,10 @@ void BKE_object_tfm_restore(Object *ob, void *obtfm_pt)
copy_v3_v3(ob->drotAxis, obtfm->drotAxis);
ob->rotAngle = obtfm->rotAngle;
ob->drotAngle = obtfm->drotAngle;
- copy_m4_m4(ob->obmat, obtfm->obmat);
+ copy_m4_m4(ob->object_to_world, obtfm->obmat);
copy_m4_m4(ob->parentinv, obtfm->parentinv);
copy_m4_m4(ob->constinv, obtfm->constinv);
- copy_m4_m4(ob->imat, obtfm->imat);
+ copy_m4_m4(ob->world_to_object, obtfm->imat);
}
/** \} */
@@ -5291,7 +5314,7 @@ KDTree_3d *BKE_object_as_kdtree(Object *ob, int *r_tot)
for (i = 0; i < verts.size(); i++) {
if (index[i] != ORIGINDEX_NONE) {
float co[3];
- mul_v3_m4v3(co, ob->obmat, verts[i].co);
+ mul_v3_m4v3(co, ob->object_to_world, verts[i].co);
BLI_kdtree_3d_insert(tree, index[i], co);
tot++;
}
@@ -5305,7 +5328,7 @@ KDTree_3d *BKE_object_as_kdtree(Object *ob, int *r_tot)
for (i = 0; i < tot; i++) {
float co[3];
- mul_v3_m4v3(co, ob->obmat, verts[i].co);
+ mul_v3_m4v3(co, ob->object_to_world, verts[i].co);
BLI_kdtree_3d_insert(tree, i, co);
}
}
@@ -5334,7 +5357,7 @@ KDTree_3d *BKE_object_as_kdtree(Object *ob, int *r_tot)
a = nu->pntsu;
while (a--) {
float co[3];
- mul_v3_m4v3(co, ob->obmat, bezt->vec[1]);
+ mul_v3_m4v3(co, ob->object_to_world, bezt->vec[1]);
BLI_kdtree_3d_insert(tree, i++, co);
bezt++;
}
@@ -5346,7 +5369,7 @@ KDTree_3d *BKE_object_as_kdtree(Object *ob, int *r_tot)
a = nu->pntsu * nu->pntsv;
while (a--) {
float co[3];
- mul_v3_m4v3(co, ob->obmat, bp->vec);
+ mul_v3_m4v3(co, ob->object_to_world, bp->vec);
BLI_kdtree_3d_insert(tree, i++, co);
bp++;
}
@@ -5369,7 +5392,7 @@ KDTree_3d *BKE_object_as_kdtree(Object *ob, int *r_tot)
for (bp = lt->def; i < tot; bp++) {
float co[3];
- mul_v3_m4v3(co, ob->obmat, bp->vec);
+ mul_v3_m4v3(co, ob->object_to_world, bp->vec);
BLI_kdtree_3d_insert(tree, i++, co);
}
diff --git a/source/blender/blenkernel/intern/object_dupli.cc b/source/blender/blenkernel/intern/object_dupli.cc
index d43eff6f9b4..a41f7c8bce4 100644
--- a/source/blender/blenkernel/intern/object_dupli.cc
+++ b/source/blender/blenkernel/intern/object_dupli.cc
@@ -197,7 +197,8 @@ static bool copy_dupli_context(DupliContext *r_ctx,
/**
* Generate a dupli instance.
*
- * \param mat: is transform of the object relative to current context (including #Object.obmat).
+ * \param mat: is transform of the object relative to current context (including
+ * #Object.object_to_world).
*/
static DupliObject *make_dupli(const DupliContext *ctx,
Object *ob,
@@ -296,7 +297,7 @@ static DupliObject *make_dupli(const DupliContext *ctx,
/**
* Recursive dupli-objects.
*
- * \param space_mat: is the local dupli-space (excluding dupli #Object.obmat).
+ * \param space_mat: is the local dupli-space (excluding dupli #Object.object_to_world).
*/
static void make_recursive_duplis(const DupliContext *ctx,
Object *ob,
@@ -468,8 +469,8 @@ static void make_duplis_collection(const DupliContext *ctx)
/* Combine collection offset and `obmat`. */
unit_m4(collection_mat);
sub_v3_v3(collection_mat[3], collection->instance_offset);
- mul_m4_m4m4(collection_mat, ob->obmat, collection_mat);
- /* Don't access 'ob->obmat' from now on. */
+ mul_m4_m4m4(collection_mat, ob->object_to_world, collection_mat);
+ /* Don't access 'ob->object_to_world' from now on. */
eEvaluationMode mode = DEG_get_mode(ctx->depsgraph);
FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN (collection, cob, mode) {
@@ -477,7 +478,7 @@ static void make_duplis_collection(const DupliContext *ctx)
float mat[4][4];
/* Collection dupli-offset, should apply after everything else. */
- mul_m4_m4m4(mat, collection_mat, cob->obmat);
+ mul_m4_m4m4(mat, collection_mat, cob->object_to_world);
make_dupli(ctx, cob, mat, _base_id);
@@ -584,11 +585,11 @@ static DupliObject *vertex_dupli(const DupliContext *ctx,
/* Make offset relative to inst_ob using relative child transform. */
mul_mat3_m4_v3(child_imat, obmat[3]);
/* Apply `obmat` _after_ the local vertex transform. */
- mul_m4_m4m4(obmat, inst_ob->obmat, obmat);
+ mul_m4_m4m4(obmat, inst_ob->object_to_world, obmat);
/* Space matrix is constructed by removing `obmat` transform,
* this yields the world-space transform for recursive duplis. */
- mul_m4_m4m4(space_mat, obmat, inst_ob->imat);
+ mul_m4_m4m4(space_mat, obmat, inst_ob->world_to_object);
DupliObject *dob = make_dupli(ctx, inst_ob, obmat, index);
@@ -608,10 +609,10 @@ static void make_child_duplis_verts_from_mesh(const DupliContext *ctx,
const MVert *mvert = vdd->mvert;
const int totvert = vdd->totvert;
- invert_m4_m4(inst_ob->imat, inst_ob->obmat);
+ invert_m4_m4(inst_ob->world_to_object, inst_ob->object_to_world);
/* Relative transform from parent to child space. */
float child_imat[4][4];
- mul_m4_m4m4(child_imat, inst_ob->imat, ctx->object->obmat);
+ mul_m4_m4m4(child_imat, inst_ob->world_to_object, ctx->object->object_to_world);
for (int i = 0; i < totvert; i++) {
DupliObject *dob = vertex_dupli(
@@ -630,10 +631,10 @@ static void make_child_duplis_verts_from_editmesh(const DupliContext *ctx,
BMEditMesh *em = vdd->em;
const bool use_rotation = vdd->params.use_rotation;
- invert_m4_m4(inst_ob->imat, inst_ob->obmat);
+ invert_m4_m4(inst_ob->world_to_object, inst_ob->object_to_world);
/* Relative transform from parent to child space. */
float child_imat[4][4];
- mul_m4_m4m4(child_imat, inst_ob->imat, ctx->object->obmat);
+ mul_m4_m4m4(child_imat, inst_ob->world_to_object, ctx->object->object_to_world);
BMVert *v;
BMIter iter;
@@ -758,7 +759,7 @@ static void make_duplis_font(const DupliContext *ctx)
return;
}
- copy_m4_m4(pmat, par->obmat);
+ copy_m4_m4(pmat, par->object_to_world);
/* In `par` the family name is stored, use this to find the other objects. */
@@ -803,7 +804,7 @@ static void make_duplis_font(const DupliContext *ctx)
mul_m4_v3(pmat, vec);
- copy_m4_m4(obmat, par->obmat);
+ copy_m4_m4(obmat, par->object_to_world);
if (UNLIKELY(ct->rot != 0.0f)) {
float rmat[4][4];
@@ -919,7 +920,7 @@ static void make_duplis_geometry_set_impl(const DupliContext *ctx,
make_dupli(ctx_for_instance, &object, matrix, id, &geometry_set, i);
float space_matrix[4][4];
- mul_m4_m4m4(space_matrix, instance_offset_matrices[i].values, object.imat);
+ mul_m4_m4m4(space_matrix, instance_offset_matrices[i].values, object.world_to_object);
mul_m4_m4_pre(space_matrix, parent_transform);
make_recursive_duplis(ctx_for_instance, &object, space_matrix, id, &geometry_set, i);
break;
@@ -951,7 +952,7 @@ static void make_duplis_geometry_set_impl(const DupliContext *ctx,
}
float instance_matrix[4][4];
- mul_m4_m4m4(instance_matrix, collection_matrix, object->obmat);
+ mul_m4_m4m4(instance_matrix, collection_matrix, object->object_to_world);
make_dupli(&sub_ctx, object, instance_matrix, object_id++);
make_recursive_duplis(&sub_ctx, object, collection_matrix, object_id++);
@@ -986,7 +987,7 @@ static void make_duplis_geometry_set_impl(const DupliContext *ctx,
static void make_duplis_geometry_set(const DupliContext *ctx)
{
const GeometrySet *geometry_set = ctx->object->runtime.geometry_set_eval;
- make_duplis_geometry_set_impl(ctx, *geometry_set, ctx->object->obmat, false, false);
+ make_duplis_geometry_set_impl(ctx, *geometry_set, ctx->object->object_to_world, false, false);
}
static const DupliGenerator gen_dupli_geometry_set = {
@@ -1092,11 +1093,11 @@ static DupliObject *face_dupli(const DupliContext *ctx,
}
/* Apply `obmat` _after_ the local face transform. */
- mul_m4_m4m4(obmat, inst_ob->obmat, obmat);
+ mul_m4_m4m4(obmat, inst_ob->object_to_world, obmat);
/* Space matrix is constructed by removing `obmat` transform,
* this yields the world-space transform for recursive duplis. */
- mul_m4_m4m4(space_mat, obmat, inst_ob->imat);
+ mul_m4_m4m4(space_mat, obmat, inst_ob->world_to_object);
DupliObject *dob = make_dupli(ctx, inst_ob, obmat, index);
@@ -1176,9 +1177,9 @@ static void make_child_duplis_faces_from_mesh(const DupliContext *ctx,
float child_imat[4][4];
- invert_m4_m4(inst_ob->imat, inst_ob->obmat);
+ invert_m4_m4(inst_ob->world_to_object, inst_ob->object_to_world);
/* Relative transform from parent to child space. */
- mul_m4_m4m4(child_imat, inst_ob->imat, ctx->object->obmat);
+ mul_m4_m4m4(child_imat, inst_ob->world_to_object, ctx->object->object_to_world);
const float scale_fac = ctx->object->instance_faces_scale;
for (a = 0, mp = mpoly; a < totface; a++, mp++) {
@@ -1216,9 +1217,9 @@ static void make_child_duplis_faces_from_editmesh(const DupliContext *ctx,
BLI_assert((vert_coords == nullptr) || (em->bm->elem_index_dirty & BM_VERT) == 0);
- invert_m4_m4(inst_ob->imat, inst_ob->obmat);
+ invert_m4_m4(inst_ob->world_to_object, inst_ob->object_to_world);
/* Relative transform from parent to child space. */
- mul_m4_m4m4(child_imat, inst_ob->imat, ctx->object->obmat);
+ mul_m4_m4m4(child_imat, inst_ob->world_to_object, ctx->object->object_to_world);
const float scale_fac = ctx->object->instance_faces_scale;
BM_ITER_MESH_INDEX (f, &iter, em->bm, BM_FACES_OF_MESH, a) {
@@ -1347,8 +1348,9 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem
sim.ob = par;
sim.psys = psys;
sim.psmd = psys_get_modifier(par, psys);
- /* Make sure emitter `imat` is in global coordinates instead of render view coordinates. */
- invert_m4_m4(par->imat, par->obmat);
+ /* Make sure emitter `world_to_object` is in global coordinates instead of render view
+ * coordinates. */
+ invert_m4_m4(par->world_to_object, par->object_to_world);
/* First check for loops (particle system object used as dupli-object). */
if (part->ren_as == PART_DRAW_OB) {
@@ -1535,7 +1537,7 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem
b = 0;
FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN (
part->instance_collection, object, mode) {
- copy_m4_m4(tmat, oblist[b]->obmat);
+ copy_m4_m4(tmat, oblist[b]->object_to_world);
/* Apply collection instance offset. */
sub_v3_v3(tmat[3], part->instance_collection->instance_offset);
@@ -1558,7 +1560,7 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem
}
else {
float obmat[4][4];
- copy_m4_m4(obmat, ob->obmat);
+ copy_m4_m4(obmat, ob->object_to_world);
float vec[3];
copy_v3_v3(vec, obmat[3]);
@@ -1752,7 +1754,7 @@ ListBase *object_duplilist_preview(Depsgraph *depsgraph,
*viewer_path)) {
ctx.preview_base_geometry = &viewer_log->geometry;
make_duplis_geometry_set_impl(
- &ctx, viewer_log->geometry, ob_eval->obmat, true, ob_eval->type == OB_CURVES);
+ &ctx, viewer_log->geometry, ob_eval->object_to_world, true, ob_eval->type == OB_CURVES);
}
}
return duplilist;
diff --git a/source/blender/blenkernel/intern/object_update.cc b/source/blender/blenkernel/intern/object_update.cc
index e53090bcffe..106c9594718 100644
--- a/source/blender/blenkernel/intern/object_update.cc
+++ b/source/blender/blenkernel/intern/object_update.cc
@@ -61,7 +61,7 @@ void BKE_object_eval_local_transform(Depsgraph *depsgraph, Object *ob)
DEG_debug_print_eval(depsgraph, __func__, ob->id.name, ob);
/* calculate local matrix */
- BKE_object_to_mat4(ob, ob->obmat);
+ BKE_object_to_mat4(ob, ob->object_to_world);
}
void BKE_object_eval_parent(Depsgraph *depsgraph, Object *ob)
@@ -78,18 +78,18 @@ void BKE_object_eval_parent(Depsgraph *depsgraph, Object *ob)
/* get local matrix (but don't calculate it, as that was done already!) */
/* XXX: redundant? */
- copy_m4_m4(locmat, ob->obmat);
+ copy_m4_m4(locmat, ob->object_to_world);
/* get parent effect matrix */
BKE_object_get_parent_matrix(ob, par, totmat);
/* total */
mul_m4_m4m4(tmat, totmat, ob->parentinv);
- mul_m4_m4m4(ob->obmat, tmat, locmat);
+ mul_m4_m4m4(ob->object_to_world, tmat, locmat);
/* origin, for help line */
if ((ob->partype & PARTYPE) == PARSKEL) {
- copy_v3_v3(ob->runtime.parent_display_origin, par->obmat[3]);
+ copy_v3_v3(ob->runtime.parent_display_origin, par->object_to_world[3]);
}
else {
copy_v3_v3(ob->runtime.parent_display_origin, totmat[3]);
@@ -121,9 +121,9 @@ void BKE_object_eval_transform_final(Depsgraph *depsgraph, Object *ob)
DEG_debug_print_eval(depsgraph, __func__, ob->id.name, ob);
/* Make sure inverse matrix is always up to date. This way users of it
* do not need to worry about recalculating it. */
- invert_m4_m4_safe(ob->imat, ob->obmat);
+ invert_m4_m4_safe(ob->world_to_object, ob->object_to_world);
/* Set negative scale flag in object. */
- if (is_negative_m4(ob->obmat)) {
+ if (is_negative_m4(ob->object_to_world)) {
ob->transflag |= OB_NEG_SCALE;
}
else {
@@ -257,8 +257,8 @@ void BKE_object_sync_to_original(Depsgraph *depsgraph, Object *object)
/* Base flags. */
object_orig->base_flag = object->base_flag;
/* Transformation flags. */
- copy_m4_m4(object_orig->obmat, object->obmat);
- copy_m4_m4(object_orig->imat, object->imat);
+ copy_m4_m4(object_orig->object_to_world, object->object_to_world);
+ copy_m4_m4(object_orig->world_to_object, object->world_to_object);
copy_m4_m4(object_orig->constinv, object->constinv);
object_orig->transflag = object->transflag;
object_orig->flag = object->flag;
diff --git a/source/blender/blenkernel/intern/paint.cc b/source/blender/blenkernel/intern/paint.cc
index 965cd153d00..a39e53662aa 100644
--- a/source/blender/blenkernel/intern/paint.cc
+++ b/source/blender/blenkernel/intern/paint.cc
@@ -1201,7 +1201,7 @@ void BKE_paint_stroke_get_average(Scene *scene, Object *ob, float stroke[3])
mul_v3_v3fl(stroke, ups->average_stroke_accum, fac);
}
else {
- copy_v3_v3(stroke, ob->obmat[3]);
+ copy_v3_v3(stroke, ob->object_to_world[3]);
}
}
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index d6dd3cf0dbb..4a0a09bcf56 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -2370,8 +2370,8 @@ void precalc_guides(ParticleSimulationData *sim, ListBase *effectors)
0,
0);
- mul_m4_v3(sim->ob->obmat, state.co);
- mul_mat3_m4_v3(sim->ob->obmat, state.vel);
+ mul_m4_v3(sim->ob->object_to_world, state.co);
+ mul_mat3_m4_v3(sim->ob->object_to_world, state.vel);
pd_point_from_particle(sim, pa, &state, &point);
@@ -2454,8 +2454,8 @@ bool do_guides(Depsgraph *depsgraph,
}
}
- mul_m4_v3(eff->ob->obmat, guidevec);
- mul_mat3_m4_v3(eff->ob->obmat, guidedir);
+ mul_m4_v3(eff->ob->object_to_world, guidevec);
+ mul_mat3_m4_v3(eff->ob->object_to_world, guidedir);
normalize_v3(guidedir);
@@ -2956,7 +2956,7 @@ static void psys_thread_create_path(ParticleTask *task,
psys_particle_on_emitter(
ctx->sim.psmd, cpa_from, cpa_num, DMCACHE_ISCHILD, cpa->fuv, foffset, co, 0, 0, 0, orco);
- mul_m4_v3(ob->obmat, co);
+ mul_m4_v3(ob->object_to_world, co);
for (w = 0; w < 4; w++) {
sub_v3_v3v3(off1[w], co, key[w]->co);
@@ -3419,7 +3419,7 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra, const bool use_re
/* dynamic hair is in object space */
/* keyed and baked are already in global space */
if (hair_mesh) {
- mul_m4_v3(sim->ob->obmat, ca->co);
+ mul_m4_v3(sim->ob->object_to_world, ca->co);
}
else if (!keyed && !baked && !(psys->flag & PSYS_GLOBAL_HAIR)) {
mul_m4_v3(hairmat, ca->co);
@@ -3929,7 +3929,7 @@ void psys_mat_hair_to_global(
psys_mat_hair_to_object(ob, mesh, from, pa, facemat);
- mul_m4_m4m4(hairmat, ob->obmat, facemat);
+ mul_m4_m4m4(hairmat, ob->object_to_world, facemat);
}
/************************************************/
@@ -4290,7 +4290,7 @@ static void get_cpa_texture(Mesh *mesh,
case TEXCO_OBJECT:
copy_v3_v3(texvec, par->state.co);
if (mtex->object) {
- mul_m4_v3(mtex->object->imat, texvec);
+ mul_m4_v3(mtex->object->world_to_object, texvec);
}
break;
case TEXCO_UV:
@@ -4378,7 +4378,7 @@ void psys_get_texture(
case TEXCO_OBJECT:
copy_v3_v3(texvec, pa->state.co);
if (mtex->object) {
- mul_m4_v3(mtex->object->imat, texvec);
+ mul_m4_v3(mtex->object->world_to_object, texvec);
}
break;
case TEXCO_UV:
@@ -4661,8 +4661,8 @@ void psys_get_particle_on_path(ParticleSimulationData *sim,
do_particle_interpolation(psys, p, pa, t, &pind, state);
if (pind.mesh) {
- mul_m4_v3(sim->ob->obmat, state->co);
- mul_mat3_m4_v3(sim->ob->obmat, state->vel);
+ mul_m4_v3(sim->ob->object_to_world, state->co);
+ mul_mat3_m4_v3(sim->ob->object_to_world, state->vel);
}
else if (!keyed && !cached && !(psys->flag & PSYS_GLOBAL_HAIR)) {
if ((pa->flag & PARS_REKEY) == 0) {
@@ -4685,7 +4685,7 @@ void psys_get_particle_on_path(ParticleSimulationData *sim,
}
}
else if (totchild) {
- // invert_m4_m4(imat, ob->obmat);
+ // invert_m4_m4(imat, ob->object_to_world);
/* interpolate childcache directly if it exists */
if (psys->childcache) {
@@ -4733,7 +4733,7 @@ void psys_get_particle_on_path(ParticleSimulationData *sim,
* positioning it accurately to the surface of the emitter. */
// copy_v3_v3(cpa_1st, co);
- // mul_m4_v3(ob->obmat, cpa_1st);
+ // mul_m4_v3(ob->object_to_world, cpa_1st);
pa = psys->particles + cpa->parent;
@@ -5170,7 +5170,7 @@ void psys_get_dupli_path_transform(ParticleSimulationData *sim,
}
if (psys->part->rotmode == PART_ROT_VEL) {
- transpose_m3_m4(nmat, ob->imat);
+ transpose_m3_m4(nmat, ob->world_to_object);
mul_m3_v3(nmat, nor);
normalize_v3(nor);
diff --git a/source/blender/blenkernel/intern/particle_child.c b/source/blender/blenkernel/intern/particle_child.c
index a890812cfc4..6cc7dbc70d0 100644
--- a/source/blender/blenkernel/intern/particle_child.c
+++ b/source/blender/blenkernel/intern/particle_child.c
@@ -187,7 +187,7 @@ static void do_kink_spiral(ParticleThreadContext *ctx,
zero_v3(kink_base);
kink_base[part->kink_axis] = 1.0f;
- mul_mat3_m4_v3(ctx->sim.ob->obmat, kink_base);
+ mul_mat3_m4_v3(ctx->sim.ob->object_to_world, kink_base);
/* Fill in invariant part of modifier context. */
ParticleChildModifierContext modifier_ctx = {NULL};
@@ -873,7 +873,7 @@ void do_child_modifiers(const ParticleChildModifierContext *modifier_ctx,
part->kink_flat,
part->kink,
part->kink_axis,
- sim->ob->obmat,
+ sim->ob->object_to_world,
smooth_start);
}
}
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index c72bbe2fd08..72094f8cf04 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -750,10 +750,10 @@ void psys_get_birth_coords(
/* particles live in global space so */
/* let's convert: */
/* -location */
- mul_m4_v3(ob->obmat, loc);
+ mul_m4_v3(ob->object_to_world, loc);
/* -normal */
- mul_mat3_m4_v3(ob->obmat, nor);
+ mul_mat3_m4_v3(ob->object_to_world, nor);
normalize_v3(nor);
/* -tangent */
@@ -771,7 +771,7 @@ void psys_get_birth_coords(
fac = -sinf((float)M_PI * (part->tanphase + phase));
madd_v3_v3fl(vtan, utan, fac);
- mul_mat3_m4_v3(ob->obmat, vtan);
+ mul_mat3_m4_v3(ob->object_to_world, vtan);
copy_v3_v3(utan, nor);
mul_v3_fl(utan, dot_v3v3(vtan, nor));
@@ -786,7 +786,7 @@ void psys_get_birth_coords(
r_vel[1] = 2.0f * (psys_frand(psys, p + 11) - 0.5f);
r_vel[2] = 2.0f * (psys_frand(psys, p + 12) - 0.5f);
- mul_mat3_m4_v3(ob->obmat, r_vel);
+ mul_mat3_m4_v3(ob->object_to_world, r_vel);
normalize_v3(r_vel);
}
@@ -796,7 +796,7 @@ void psys_get_birth_coords(
r_ave[1] = 2.0f * (psys_frand(psys, p + 14) - 0.5f);
r_ave[2] = 2.0f * (psys_frand(psys, p + 15) - 0.5f);
- mul_mat3_m4_v3(ob->obmat, r_ave);
+ mul_mat3_m4_v3(ob->object_to_world, r_ave);
normalize_v3(r_ave);
}
@@ -808,7 +808,7 @@ void psys_get_birth_coords(
r_rot[3] = 2.0f * (psys_frand(psys, p + 19) - 0.5f);
normalize_qt(r_rot);
- mat4_to_quat(rot, ob->obmat);
+ mat4_to_quat(rot, ob->object_to_world);
mul_qt_qtqt(r_rot, r_rot, rot);
}
@@ -822,7 +822,7 @@ void psys_get_birth_coords(
/* boids store direction in ave */
if (fabsf(nor[2]) == 1.0f) {
- sub_v3_v3v3(state->ave, loc, ob->obmat[3]);
+ sub_v3_v3v3(state->ave, loc, ob->object_to_world[3]);
normalize_v3(state->ave);
}
else {
@@ -868,15 +868,15 @@ void psys_get_birth_coords(
/* *emitter object orientation */
if (part->ob_vel[0] != 0.0f) {
- normalize_v3_v3(vec, ob->obmat[0]);
+ normalize_v3_v3(vec, ob->object_to_world[0]);
madd_v3_v3fl(vel, vec, part->ob_vel[0]);
}
if (part->ob_vel[1] != 0.0f) {
- normalize_v3_v3(vec, ob->obmat[1]);
+ normalize_v3_v3(vec, ob->object_to_world[1]);
madd_v3_v3fl(vel, vec, part->ob_vel[1]);
}
if (part->ob_vel[2] != 0.0f) {
- normalize_v3_v3(vec, ob->obmat[2]);
+ normalize_v3_v3(vec, ob->object_to_world[2]);
madd_v3_v3fl(vel, vec, part->ob_vel[2]);
}
@@ -924,7 +924,7 @@ void psys_get_birth_coords(
case PART_ROT_OB_X:
case PART_ROT_OB_Y:
case PART_ROT_OB_Z:
- copy_v3_v3(rot_vec, ob->obmat[part->rotmode - PART_ROT_OB_X]);
+ copy_v3_v3(rot_vec, ob->object_to_world[part->rotmode - PART_ROT_OB_X]);
use_global_space = false;
break;
default:
@@ -951,7 +951,7 @@ void psys_get_birth_coords(
float q_obmat[4];
float q_imat[4];
- mat4_to_quat(q_obmat, ob->obmat);
+ mat4_to_quat(q_obmat, ob->object_to_world);
invert_qt_qt_normalized(q_imat, q_obmat);
if (part->rotmode != PART_ROT_NOR_TAN) {
@@ -1639,7 +1639,7 @@ static void sph_springs_modify(ParticleSystem *psys, float dtime)
}
}
- /* Loop through springs backwaqrds - for efficient delete function */
+ /* Loop through springs backwards - for efficient delete function. */
for (i = psys->tot_fluidsprings - 1; i >= 0; i--) {
if (psys->fluid_springs[i].delete_flag) {
sph_spring_delete(psys, i);
@@ -3364,7 +3364,7 @@ static void hair_create_input_mesh(ParticleSimulationData *sim,
use_hair = psys_hair_use_simulation(pa, max_length);
psys_mat_hair_to_object(sim->ob, sim->psmd->mesh_final, psys->part->from, pa, hairmat);
- mul_m4_m4m4(root_mat, sim->ob->obmat, hairmat);
+ mul_m4_m4m4(root_mat, sim->ob->object_to_world, hairmat);
normalize_m4(root_mat);
bending_stiffness = CLAMPIS(
@@ -3555,7 +3555,7 @@ static void save_hair(ParticleSimulationData *sim, float UNUSED(cfra))
HairKey *key, *root;
PARTICLE_P;
- invert_m4_m4(ob->imat, ob->obmat);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
psys->lattice_deform_data = psys_create_lattice_deform_data(sim);
@@ -3577,7 +3577,7 @@ static void save_hair(ParticleSimulationData *sim, float UNUSED(cfra))
/* convert from global to geometry space */
copy_v3_v3(key->co, pa->state.co);
- mul_m4_v3(ob->imat, key->co);
+ mul_m4_v3(ob->world_to_object, key->co);
if (pa->totkey) {
sub_v3_v3(key->co, root->co);
@@ -4380,7 +4380,7 @@ static void particles_fluid_step(ParticleSimulationData *sim,
mul_v3_v3(pa->state.co, scaleAbs);
/* Match domain scale. */
- mul_m4_v3(ob->obmat, pa->state.co);
+ mul_m4_v3(ob->object_to_world, pa->state.co);
/* Add origin offset to particle position. */
zero_v3(tmp);
@@ -4764,7 +4764,7 @@ void particle_system_update(struct Depsgraph *depsgraph,
float cfra;
ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys);
- /* drawdata is outdated after ANY change */
+ /* Draw data is outdated after ANY change. */
if (psys->pdd) {
psys->pdd->flag &= ~PARTICLE_DRAW_DATA_UPDATED;
}
@@ -4963,7 +4963,7 @@ void particle_system_update(struct Depsgraph *depsgraph,
/* Save matrix for duplicators,
* at render-time the actual dupli-object's matrix is used so don't update! */
- invert_m4_m4(psys->imat, ob->obmat);
+ invert_m4_m4(psys->imat, ob->object_to_world);
BKE_particle_batch_cache_dirty_tag(psys, BKE_PARTICLE_BATCH_DIRTY_ALL);
}
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index ffc6bc8d7a3..5e91b23bce3 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -264,13 +264,13 @@ static RigidBodyCon *rigidbody_copy_constraint(const Object *ob, const int UNUSE
RigidBodyCon *rbcN = NULL;
if (ob->rigidbody_constraint) {
- /* just duplicate the whole struct first (to catch all the settings) */
+ /* Just duplicate the whole struct first (to catch all the settings). */
rbcN = MEM_dupallocN(ob->rigidbody_constraint);
- /* tag object as needing to be verified */
+ /* Tag object as needing to be verified. */
rbcN->flag |= RBC_FLAG_NEEDS_VALIDATE;
- /* clear out all the fields which need to be revalidated later */
+ /* Clear out all the fields which need to be re-validated later. */
rbcN->physics_constraint = NULL;
}
@@ -684,7 +684,7 @@ void BKE_rigidbody_calc_volume(Object *ob, float *r_vol)
if (totvert > 0 && tottri > 0) {
BKE_mesh_calc_volume(mvert, totvert, lt, tottri, mloop, &volume, NULL);
- const float volume_scale = mat4_to_volume_scale(ob->obmat);
+ const float volume_scale = mat4_to_volume_scale(ob->object_to_world);
volume *= fabsf(volume_scale);
}
}
@@ -809,7 +809,7 @@ static void rigidbody_validate_sim_object(RigidBodyWorld *rbw, Object *ob, bool
return;
}
- mat4_to_loc_quat(loc, rot, ob->obmat);
+ mat4_to_loc_quat(loc, rot, ob->object_to_world);
rbo->shared->physics_object = RB_body_new(rbo->shared->physics_shape, loc, rot);
@@ -974,7 +974,7 @@ static void rigidbody_validate_sim_constraint(RigidBodyWorld *rbw, Object *ob, b
rbc->physics_constraint = NULL;
}
- mat4_to_loc_quat(loc, rot, ob->obmat);
+ mat4_to_loc_quat(loc, rot, ob->object_to_world);
if (rb1 && rb2) {
switch (rbc->type) {
@@ -1266,7 +1266,7 @@ RigidBodyOb *BKE_rigidbody_create_object(Scene *scene, Object *ob, short type)
rbo->mesh_source = RBO_MESH_DEFORM;
/* set initial transform */
- mat4_to_loc_quat(rbo->pos, rbo->orn, ob->obmat);
+ mat4_to_loc_quat(rbo->pos, rbo->orn, ob->object_to_world);
/* flag cache as outdated */
BKE_rigidbody_cache_reset(rbw);
@@ -1689,7 +1689,7 @@ static void rigidbody_update_sim_ob(Depsgraph *depsgraph, Object *ob, RigidBodyO
if (!(rbo->flag & RBO_FLAG_KINEMATIC)) {
/* update scale for all non kinematic objects */
float new_scale[3], old_scale[3];
- mat4_to_size(new_scale, ob->obmat);
+ mat4_to_size(new_scale, ob->object_to_world);
RB_body_get_scale(rbo->shared->physics_object, old_scale);
/* Avoid updating collision shape AABBs if scale didn't change. */
@@ -1886,7 +1886,7 @@ static ListBase rigidbody_create_substep_data(RigidBodyWorld *rbw)
copy_v4_v4(data->old_rot, rot);
copy_v3_v3(data->old_scale, scale);
- mat4_decompose(loc, rot, scale, ob->obmat);
+ mat4_decompose(loc, rot, scale, ob->object_to_world);
copy_v3_v3(data->new_pos, loc);
copy_v4_v4(data->new_rot, rot);
@@ -2055,15 +2055,15 @@ void BKE_rigidbody_sync_transforms(RigidBodyWorld *rbw, Object *ob, float ctime)
quat_to_mat4(mat, rbo->orn);
copy_v3_v3(mat[3], rbo->pos);
- mat4_to_size(size, ob->obmat);
+ mat4_to_size(size, ob->object_to_world);
size_to_mat4(size_mat, size);
mul_m4_m4m4(mat, mat, size_mat);
- copy_m4_m4(ob->obmat, mat);
+ copy_m4_m4(ob->object_to_world, mat);
}
/* otherwise set rigid body transform to current obmat */
else {
- mat4_to_loc_quat(rbo->pos, rbo->orn, ob->obmat);
+ mat4_to_loc_quat(rbo->pos, rbo->orn, ob->object_to_world);
}
}
diff --git a/source/blender/blenkernel/intern/scene.cc b/source/blender/blenkernel/intern/scene.cc
index bd26075f81f..c921cf603de 100644
--- a/source/blender/blenkernel/intern/scene.cc
+++ b/source/blender/blenkernel/intern/scene.cc
@@ -2278,13 +2278,13 @@ int BKE_scene_base_iter_next(
if (iter->dupli_refob != *ob) {
if (iter->dupli_refob) {
/* Restore previous object's real matrix. */
- copy_m4_m4(iter->dupli_refob->obmat, iter->omat);
+ copy_m4_m4(iter->dupli_refob->object_to_world, iter->omat);
}
/* Backup new object's real matrix. */
iter->dupli_refob = *ob;
- copy_m4_m4(iter->omat, iter->dupli_refob->obmat);
+ copy_m4_m4(iter->omat, iter->dupli_refob->object_to_world);
}
- copy_m4_m4((*ob)->obmat, iter->dupob->mat);
+ copy_m4_m4((*ob)->object_to_world, iter->dupob->mat);
iter->dupob = iter->dupob->next;
}
@@ -2294,7 +2294,7 @@ int BKE_scene_base_iter_next(
if (iter->dupli_refob) {
/* Restore last object's real matrix. */
- copy_m4_m4(iter->dupli_refob->obmat, iter->omat);
+ copy_m4_m4(iter->dupli_refob->object_to_world, iter->omat);
iter->dupli_refob = nullptr;
}
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index b35031b9a88..efe423ccfc5 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -318,7 +318,7 @@ static ccd_Mesh *ccd_mesh_make(Object *ob)
/* OBBs for idea1 */
pccd_M->mima = MEM_mallocN(sizeof(ccdf_minmax) * pccd_M->tri_num, "ccd_Mesh_Faces_mima");
- /* anyhoo we need to walk the list of faces and find OBB they live in */
+ /* Anyhow we need to walk the list of faces and find OBB they live in. */
for (i = 0, mima = pccd_M->mima, vt = pccd_M->tri; i < pccd_M->tri_num; i++, mima++, vt++) {
const float *v;
@@ -413,7 +413,7 @@ static void ccd_mesh_update(Object *ob, ccd_Mesh *pccd_M)
pccd_M->bbmax[2] = max_ff(pccd_M->bbmax[2], v[2] + hull);
}
- /* anyhoo we need to walk the list of faces and find OBB they live in */
+ /* Anyhow we need to walk the list of faces and find OBB they live in. */
for (i = 0, mima = pccd_M->mima, vt = pccd_M->tri; i < pccd_M->tri_num; i++, mima++, vt++) {
const float *v;
@@ -2644,7 +2644,7 @@ static void springs_from_mesh(Object *ob)
bp = ob->soft->bpoint;
for (a = 0; a < me->totvert; a++, bp++) {
copy_v3_v3(bp->origS, verts[a].co);
- mul_m4_v3(ob->obmat, bp->origS);
+ mul_m4_v3(ob->object_to_world, bp->origS);
}
}
/* recalculate spring length for meshes here */
@@ -2809,9 +2809,9 @@ static float globallen(float *v1, float *v2, Object *ob)
{
float p1[3], p2[3];
copy_v3_v3(p1, v1);
- mul_m4_v3(ob->obmat, p1);
+ mul_m4_v3(ob->object_to_world, p1);
copy_v3_v3(p2, v2);
- mul_m4_v3(ob->obmat, p2);
+ mul_m4_v3(ob->object_to_world, p2);
return len_v3v3(p1, p2);
}
@@ -3073,12 +3073,13 @@ static void softbody_to_object(Object *ob, float (*vertexCos)[3], int numVerts,
SB_estimate_transform(ob, sb->lcom, sb->lrot, sb->lscale);
}
/* Inverse matrix is not up to date. */
- invert_m4_m4(ob->imat, ob->obmat);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
for (a = 0; a < numVerts; a++, bp++) {
copy_v3_v3(vertexCos[a], bp->pos);
if (local == 0) {
- mul_m4_v3(ob->imat, vertexCos[a]); /* softbody is in global coords, baked optionally not */
+ mul_m4_v3(ob->world_to_object,
+ vertexCos[a]); /* softbody is in global coords, baked optionally not */
}
}
}
@@ -3223,7 +3224,7 @@ static void softbody_update_positions(Object *ob,
/* copy the position of the goals at desired end time */
copy_v3_v3(bp->origE, vertexCos[a]);
/* vertexCos came from local world, go global */
- mul_m4_v3(ob->obmat, bp->origE);
+ mul_m4_v3(ob->object_to_world, bp->origE);
/* just to be save give bp->origT a defined value
* will be calculated in interpolate_exciter() */
copy_v3_v3(bp->origT, bp->origE);
@@ -3279,7 +3280,7 @@ static void softbody_reset(Object *ob, SoftBody *sb, float (*vertexCos)[3], int
for (a = 0, bp = sb->bpoint; a < numVerts; a++, bp++) {
copy_v3_v3(bp->pos, vertexCos[a]);
- mul_m4_v3(ob->obmat, bp->pos); /* Yep, soft-body is global coords. */
+ mul_m4_v3(ob->object_to_world, bp->pos); /* Yep, soft-body is global coords. */
copy_v3_v3(bp->origS, bp->pos);
copy_v3_v3(bp->origE, bp->pos);
copy_v3_v3(bp->origT, bp->pos);
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index d08fba0e657..51a20cf1e35 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -1025,7 +1025,7 @@ void BKE_sound_free_waveform(bSound *sound)
sound->tags &= ~SOUND_TAGS_WAVEFORM_NO_RELOAD;
}
-void BKE_sound_read_waveform(Main *bmain, bSound *sound, short *stop)
+void BKE_sound_read_waveform(Main *bmain, bSound *sound, bool *stop)
{
bool need_close_audio_handles = false;
if (sound->playback_handle == NULL) {
@@ -1041,8 +1041,11 @@ void BKE_sound_read_waveform(Main *bmain, bSound *sound, short *stop)
int length = info.length * SOUND_WAVE_SAMPLES_PER_SECOND;
waveform->data = MEM_mallocN(sizeof(float[3]) * length, "SoundWaveform.samples");
+ /* Ideally this would take a boolean argument. */
+ short stop_i16 = *stop;
waveform->length = AUD_readSound(
- sound->playback_handle, waveform->data, length, SOUND_WAVE_SAMPLES_PER_SECOND, stop);
+ sound->playback_handle, waveform->data, length, SOUND_WAVE_SAMPLES_PER_SECOND, &stop_i16);
+ *stop = stop_i16 != 0;
}
else {
/* Create an empty waveform here if the sound couldn't be
@@ -1129,9 +1132,9 @@ static void sound_update_base(Scene *scene, Object *object, void *new_set)
AUD_SequenceEntry_setConeAngleInner(strip->speaker_handle, speaker->cone_angle_inner);
AUD_SequenceEntry_setConeVolumeOuter(strip->speaker_handle, speaker->cone_volume_outer);
- mat4_to_quat(quat, object->obmat);
+ mat4_to_quat(quat, object->object_to_world);
AUD_SequenceEntry_setAnimationData(
- strip->speaker_handle, AUD_AP_LOCATION, scene->r.cfra, object->obmat[3], 1);
+ strip->speaker_handle, AUD_AP_LOCATION, scene->r.cfra, object->object_to_world[3], 1);
AUD_SequenceEntry_setAnimationData(
strip->speaker_handle, AUD_AP_ORIENTATION, scene->r.cfra, quat, 1);
AUD_SequenceEntry_setAnimationData(
@@ -1171,9 +1174,9 @@ void BKE_sound_update_scene(Depsgraph *depsgraph, Scene *scene)
}
if (scene->camera) {
- mat4_to_quat(quat, scene->camera->obmat);
+ mat4_to_quat(quat, scene->camera->object_to_world);
AUD_Sequence_setAnimationData(
- scene->sound_scene, AUD_AP_LOCATION, scene->r.cfra, scene->camera->obmat[3], 1);
+ scene->sound_scene, AUD_AP_LOCATION, scene->r.cfra, scene->camera->object_to_world[3], 1);
AUD_Sequence_setAnimationData(scene->sound_scene, AUD_AP_ORIENTATION, scene->r.cfra, quat, 1);
}
@@ -1381,7 +1384,7 @@ int BKE_sound_scene_playing(Scene *UNUSED(scene))
void BKE_sound_read_waveform(Main *bmain,
bSound *sound,
/* NOLINTNEXTLINE: readability-non-const-parameter. */
- short *stop)
+ bool *stop)
{
UNUSED_VARS(sound, stop, bmain);
}
diff --git a/source/blender/blenkernel/intern/subdiv_mesh.cc b/source/blender/blenkernel/intern/subdiv_mesh.cc
index 3b97c1f5e68..e1c434f2b2e 100644
--- a/source/blender/blenkernel/intern/subdiv_mesh.cc
+++ b/source/blender/blenkernel/intern/subdiv_mesh.cc
@@ -794,7 +794,7 @@ static void subdiv_copy_edge_data(SubdivMeshContext *ctx,
/* TODO: Ensure crease layer isn't copied to result. */
subdiv_edge->flag = 0;
if (!ctx->settings->use_optimal_display) {
- subdiv_edge->flag |= ME_EDGERENDER;
+ subdiv_edge->flag |= ME_EDGEDRAW;
}
if (ctx->edge_origindex != nullptr) {
ctx->edge_origindex[subdiv_edge_index] = ORIGINDEX_NONE;
@@ -804,7 +804,7 @@ static void subdiv_copy_edge_data(SubdivMeshContext *ctx,
const int coarse_edge_index = coarse_edge - ctx->coarse_edges;
CustomData_copy_data(
&ctx->coarse_mesh->edata, &ctx->subdiv_mesh->edata, coarse_edge_index, subdiv_edge_index, 1);
- subdiv_edge->flag |= ME_EDGERENDER;
+ subdiv_edge->flag |= ME_EDGEDRAW;
}
static void subdiv_mesh_edge(const SubdivForeachContext *foreach_context,
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index c37f4b1ea2f..80fb637b76e 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -962,7 +962,7 @@ static void ccgDM_copyFinalEdgeArray(DerivedMesh *dm, MEdge *medge)
int edgeSize = ccgSubSurf_getEdgeSize(ss);
uint i = 0;
short *edgeFlags = ccgdm->edgeFlags;
- const short ed_interior_flag = ccgdm->drawInteriorEdges ? (ME_EDGEDRAW | ME_EDGERENDER) : 0;
+ const short ed_interior_flag = ccgdm->drawInteriorEdges ? ME_EDGEDRAW : 0;
totface = ccgSubSurf_getNumFaces(ss);
for (index = 0; index < totface; index++) {
@@ -1005,11 +1005,11 @@ static void ccgDM_copyFinalEdgeArray(DerivedMesh *dm, MEdge *medge)
if (edgeFlags) {
if (edgeIdx != -1) {
- ed_flag |= ((edgeFlags[index] & (ME_SEAM | ME_SHARP)) | ME_EDGEDRAW | ME_EDGERENDER);
+ ed_flag |= ((edgeFlags[index] & (ME_SEAM | ME_SHARP)) | ME_EDGEDRAW);
}
}
else {
- ed_flag |= ME_EDGEDRAW | ME_EDGERENDER;
+ ed_flag |= ME_EDGEDRAW;
}
for (x = 0; x < edgeSize - 1; x++) {
diff --git a/source/blender/blenkernel/intern/tracking_solver.c b/source/blender/blenkernel/intern/tracking_solver.c
index 11041b4c0fd..e784c39ba08 100644
--- a/source/blender/blenkernel/intern/tracking_solver.c
+++ b/source/blender/blenkernel/intern/tracking_solver.c
@@ -56,8 +56,8 @@ typedef struct MovieReconstructContext {
} MovieReconstructContext;
typedef struct ReconstructProgressData {
- short *stop;
- short *do_update;
+ bool *stop;
+ bool *do_update;
float *progress;
char *stats_message;
int message_size;
@@ -465,8 +465,8 @@ static void reconstructionOptionsFromContext(libmv_ReconstructionOptions *recons
}
void BKE_tracking_reconstruction_solve(MovieReconstructContext *context,
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress,
char *stats_message,
int message_size)
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c
index f7ea4c81fbf..f5badfc9e94 100644
--- a/source/blender/blenkernel/intern/unit.c
+++ b/source/blender/blenkernel/intern/unit.c
@@ -715,7 +715,7 @@ static const char *unit_find_str(const char *str, const char *substr, bool case_
/* Weak unicode support!, so "µm" won't match up be replaced by "m"
* since non ascii utf8 values will NEVER return true */
isalpha_or_utf8(*BLI_str_find_prev_char_utf8(str_found, str)) == 0) {
- /* Next char cannot be alphanum. */
+ /* Next char cannot be alpha-numeric. */
int len_name = strlen(substr);
if (!isalpha_or_utf8(*(str_found + len_name))) {
diff --git a/source/blender/blenkernel/intern/vfont.c b/source/blender/blenkernel/intern/vfont.c
index 7ace1a3aa3b..9f48b9b9c4a 100644
--- a/source/blender/blenkernel/intern/vfont.c
+++ b/source/blender/blenkernel/intern/vfont.c
@@ -1310,14 +1310,14 @@ static bool vfont_to_curve(Object *ob,
float timeofs, sizefac;
if (ob != NULL) {
- invert_m4_m4(imat, ob->obmat);
+ invert_m4_m4(imat, ob->object_to_world);
}
else {
unit_m4(imat);
}
copy_m3_m4(imat3, imat);
- copy_m3_m4(cmat, cu->textoncurve->obmat);
+ copy_m3_m4(cmat, cu->textoncurve->object_to_world);
mul_m3_m3m3(cmat, cmat, imat3);
sizefac = normalize_v3(cmat[0]) / font_size;
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index ee827cd8cd4..d71db8f71a5 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -141,19 +141,18 @@ static int write_audio_frame(FFMpegContext *context)
frame->pts = context->audio_time / av_q2d(c->time_base);
frame->nb_samples = context->audio_input_samples;
frame->format = c->sample_fmt;
- frame->channels = c->channels;
- frame->channel_layout = c->channel_layout;
+ av_channel_layout_copy(&frame->ch_layout, &c->ch_layout);
if (context->audio_deinterleave) {
int channel, i;
uint8_t *temp;
- for (channel = 0; channel < c->channels; channel++) {
+ for (channel = 0; channel < c->ch_layout.nb_channels; channel++) {
for (i = 0; i < frame->nb_samples; i++) {
memcpy(context->audio_deinterleave_buffer +
(i + channel * frame->nb_samples) * context->audio_sample_size,
context->audio_input_buffer +
- (c->channels * i + channel) * context->audio_sample_size,
+ (c->ch_layout.nb_channels * i + channel) * context->audio_sample_size,
context->audio_sample_size);
}
}
@@ -164,10 +163,11 @@ static int write_audio_frame(FFMpegContext *context)
}
avcodec_fill_audio_frame(frame,
- c->channels,
+ c->ch_layout.nb_channels,
c->sample_fmt,
context->audio_input_buffer,
- context->audio_input_samples * c->channels * context->audio_sample_size,
+ context->audio_input_samples * c->ch_layout.nb_channels *
+ context->audio_sample_size,
1);
int success = 1;
@@ -944,23 +944,23 @@ static AVStream *alloc_audio_stream(FFMpegContext *context,
c->sample_rate = rd->ffcodecdata.audio_mixrate;
c->bit_rate = context->ffmpeg_audio_bitrate * 1000;
c->sample_fmt = AV_SAMPLE_FMT_S16;
- c->channels = rd->ffcodecdata.audio_channels;
+ c->ch_layout.nb_channels = rd->ffcodecdata.audio_channels;
switch (rd->ffcodecdata.audio_channels) {
case FFM_CHANNELS_MONO:
- c->channel_layout = AV_CH_LAYOUT_MONO;
+ av_channel_layout_from_mask(&c->ch_layout, AV_CH_LAYOUT_MONO);
break;
case FFM_CHANNELS_STEREO:
- c->channel_layout = AV_CH_LAYOUT_STEREO;
+ av_channel_layout_from_mask(&c->ch_layout, AV_CH_LAYOUT_STEREO);
break;
case FFM_CHANNELS_SURROUND4:
- c->channel_layout = AV_CH_LAYOUT_QUAD;
+ av_channel_layout_from_mask(&c->ch_layout, AV_CH_LAYOUT_QUAD);
break;
case FFM_CHANNELS_SURROUND51:
- c->channel_layout = AV_CH_LAYOUT_5POINT1_BACK;
+ av_channel_layout_from_mask(&c->ch_layout, AV_CH_LAYOUT_5POINT1_BACK);
break;
case FFM_CHANNELS_SURROUND71:
- c->channel_layout = AV_CH_LAYOUT_7POINT1;
+ av_channel_layout_from_mask(&c->ch_layout, AV_CH_LAYOUT_7POINT1);
break;
}
@@ -1027,7 +1027,7 @@ static AVStream *alloc_audio_stream(FFMpegContext *context,
* not sure if that is needed anymore, so let's try out if there are any
* complaints regarding some FFmpeg versions users might have. */
context->audio_input_samples = AV_INPUT_BUFFER_MIN_SIZE * 8 / c->bits_per_coded_sample /
- c->channels;
+ c->ch_layout.nb_channels;
}
else {
context->audio_input_samples = c->frame_size;
@@ -1037,11 +1037,11 @@ static AVStream *alloc_audio_stream(FFMpegContext *context,
context->audio_sample_size = av_get_bytes_per_sample(c->sample_fmt);
- context->audio_input_buffer = (uint8_t *)av_malloc(context->audio_input_samples * c->channels *
- context->audio_sample_size);
+ context->audio_input_buffer = (uint8_t *)av_malloc(
+ context->audio_input_samples * c->ch_layout.nb_channels * context->audio_sample_size);
if (context->audio_deinterleave) {
context->audio_deinterleave_buffer = (uint8_t *)av_malloc(
- context->audio_input_samples * c->channels * context->audio_sample_size);
+ context->audio_input_samples * c->ch_layout.nb_channels * context->audio_sample_size);
}
context->audio_time = 0.0f;
@@ -1432,7 +1432,7 @@ int BKE_ffmpeg_start(void *context_v,
AVCodecContext *c = context->audio_codec;
AUD_DeviceSpecs specs;
- specs.channels = c->channels;
+ specs.channels = c->ch_layout.nb_channels;
switch (av_get_packed_sample_fmt(c->sample_fmt)) {
case AV_SAMPLE_FMT_U8:
diff --git a/source/blender/blenlib/BLI_color_mix.hh b/source/blender/blenlib/BLI_color_mix.hh
index 322da2bf112..55989669f70 100644
--- a/source/blender/blenlib/BLI_color_mix.hh
+++ b/source/blender/blenlib/BLI_color_mix.hh
@@ -76,7 +76,7 @@ struct FloatTraits {
static inline BlendType max(BlendType a, BlendType b)
{
- return min_ff(a, b);
+ return max_ff(a, b);
}
/* Discretizes in steps of 1.0 / range */
diff --git a/source/blender/blenlib/BLI_lazy_threading.hh b/source/blender/blenlib/BLI_lazy_threading.hh
index b5a15919c89..4d04fe9e908 100644
--- a/source/blender/blenlib/BLI_lazy_threading.hh
+++ b/source/blender/blenlib/BLI_lazy_threading.hh
@@ -80,4 +80,15 @@ class HintReceiver {
~HintReceiver();
};
+/**
+ * Used to make sure that lazy-threading hints don't propagate through task isolation. This is
+ * necessary to avoid deadlocks when isolated regions are used together with e.g. task pools. For
+ * more info see the comment on #BLI_task_isolate.
+ */
+class ReceiverIsolation {
+ public:
+ ReceiverIsolation();
+ ~ReceiverIsolation();
+};
+
} // namespace blender::lazy_threading
diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h
index 7e1b7c2ba56..538474f58b6 100644
--- a/source/blender/blenlib/BLI_math_matrix.h
+++ b/source/blender/blenlib/BLI_math_matrix.h
@@ -624,7 +624,7 @@ void BLI_space_transform_apply_normal(const struct SpaceTransform *data, float n
void BLI_space_transform_invert_normal(const struct SpaceTransform *data, float no[3]);
#define BLI_SPACE_TRANSFORM_SETUP(data, local, target) \
- BLI_space_transform_from_matrices((data), (local)->obmat, (target)->obmat)
+ BLI_space_transform_from_matrices((data), (local)->object_to_world, (target)->object_to_world)
/** \} */
diff --git a/source/blender/blenlib/BLI_path_util.h b/source/blender/blenlib/BLI_path_util.h
index 6d411b51f85..4ea059391b6 100644
--- a/source/blender/blenlib/BLI_path_util.h
+++ b/source/blender/blenlib/BLI_path_util.h
@@ -202,7 +202,10 @@ const char *BLI_path_basename(const char *path) ATTR_NONNULL() ATTR_WARN_UNUSED_
* - 1 or -2: `path`
* - 2 or -1: `file.txt`
*
- * Ignores multiple slashes at any point in the path (including start/end).
+ * Ignored elements in the path:
+ * - Multiple slashes at any point in the path (including start/end).
+ * - Single '.' in the path: `/./` except for the beginning of the path
+ * where it's used to signify a $PWD relative path.
*/
bool BLI_path_name_at_index(const char *__restrict path,
int index,
@@ -364,6 +367,8 @@ bool BLI_path_make_safe(char *path) ATTR_NONNULL(1);
*
* Replaces path with the path of its parent directory, returning true if
* it was able to find a parent directory within the path.
+ *
+ * On success, the resulting path will always have a trailing slash.
*/
bool BLI_path_parent_dir(char *path) ATTR_NONNULL();
/**
diff --git a/source/blender/blenlib/BLI_string_utils.h b/source/blender/blenlib/BLI_string_utils.h
index df82e94ae2e..936e892a9e2 100644
--- a/source/blender/blenlib/BLI_string_utils.h
+++ b/source/blender/blenlib/BLI_string_utils.h
@@ -48,33 +48,6 @@ void BLI_string_split_suffix(const char *string, char *r_body, char *r_suf, size
void BLI_string_split_prefix(const char *string, char *r_pre, char *r_body, size_t str_len);
/**
- * Join strings, return newly allocated string.
- */
-char *BLI_string_join_array(char *result,
- size_t result_len,
- const char *strings[],
- uint strings_len) ATTR_NONNULL();
-/**
- * A version of #BLI_string_join that takes a separator which can be any character including '\0'.
- */
-char *BLI_string_join_array_by_sep_char(char *result,
- size_t result_len,
- char sep,
- const char *strings[],
- uint strings_len) ATTR_NONNULL();
-
-/**
- * Join an array of strings into a newly allocated, null terminated string.
- */
-char *BLI_string_join_arrayN(const char *strings[], uint strings_len) ATTR_WARN_UNUSED_RESULT
- ATTR_NONNULL();
-/**
- * A version of #BLI_string_joinN that takes a separator which can be any character including '\0'.
- */
-char *BLI_string_join_array_by_sep_charN(char sep,
- const char *strings[],
- uint strings_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
-/**
* A version of #BLI_string_join_array_by_sep_charN that takes a table array.
* The new location of each string is written into this array.
*/
@@ -82,17 +55,7 @@ char *BLI_string_join_array_by_sep_char_with_tableN(char sep,
char *table[],
const char *strings[],
uint strings_len) ATTR_NONNULL();
-/**
- * Take multiple arguments, pass as (array, length).
- */
-#define BLI_string_join(result, result_len, ...) \
- BLI_string_join_array( \
- result, result_len, ((const char *[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__))
-#define BLI_string_joinN(...) \
- BLI_string_join_arrayN(((const char *[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__))
-#define BLI_string_join_by_sep_charN(sep, ...) \
- BLI_string_join_array_by_sep_charN( \
- sep, ((const char *[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__))
+
#define BLI_string_join_by_sep_char_with_tableN(sep, table, ...) \
BLI_string_join_array_by_sep_char_with_tableN( \
sep, table, ((const char *[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__))
@@ -149,6 +112,360 @@ bool BLI_uniquename(struct ListBase *list,
int name_offset,
size_t name_len);
+/* Expand array functions. */
+
+/* Intentionally no comma after `_BLI_STRING_ARGS_0` to allow it to be empty. */
+#define _BLI_STRING_ARGS_1 _BLI_STRING_ARGS_0 const char *a
+#define _BLI_STRING_ARGS_2 _BLI_STRING_ARGS_1, const char *b
+#define _BLI_STRING_ARGS_3 _BLI_STRING_ARGS_2, const char *c
+#define _BLI_STRING_ARGS_4 _BLI_STRING_ARGS_3, const char *d
+#define _BLI_STRING_ARGS_5 _BLI_STRING_ARGS_4, const char *e
+#define _BLI_STRING_ARGS_6 _BLI_STRING_ARGS_5, const char *f
+#define _BLI_STRING_ARGS_7 _BLI_STRING_ARGS_6, const char *g
+#define _BLI_STRING_ARGS_8 _BLI_STRING_ARGS_7, const char *h
+#define _BLI_STRING_ARGS_9 _BLI_STRING_ARGS_8, const char *i
+#define _BLI_STRING_ARGS_10 _BLI_STRING_ARGS_9, const char *j
+
+/* ------------------------------------------------------------------------- */
+/** \name Implement: `BLI_string_join(..)`
+ * \{ */
+
+#define _BLI_STRING_ARGS_0 char *__restrict dst, const size_t dst_len,
+
+/**
+ * Join strings, return the length of the resulting string.
+ */
+size_t BLI_string_join_array(char *result,
+ size_t result_len,
+ const char *strings[],
+ uint strings_len) ATTR_NONNULL();
+
+#define BLI_string_join(...) VA_NARGS_CALL_OVERLOAD(_BLI_string_join_, __VA_ARGS__)
+
+BLI_INLINE size_t _BLI_string_join_3(_BLI_STRING_ARGS_1) ATTR_NONNULL();
+BLI_INLINE size_t _BLI_string_join_4(_BLI_STRING_ARGS_2) ATTR_NONNULL();
+BLI_INLINE size_t _BLI_string_join_5(_BLI_STRING_ARGS_3) ATTR_NONNULL();
+BLI_INLINE size_t _BLI_string_join_6(_BLI_STRING_ARGS_4) ATTR_NONNULL();
+BLI_INLINE size_t _BLI_string_join_7(_BLI_STRING_ARGS_5) ATTR_NONNULL();
+BLI_INLINE size_t _BLI_string_join_8(_BLI_STRING_ARGS_6) ATTR_NONNULL();
+BLI_INLINE size_t _BLI_string_join_9(_BLI_STRING_ARGS_7) ATTR_NONNULL();
+BLI_INLINE size_t _BLI_string_join_10(_BLI_STRING_ARGS_8) ATTR_NONNULL();
+BLI_INLINE size_t _BLI_string_join_11(_BLI_STRING_ARGS_9) ATTR_NONNULL();
+BLI_INLINE size_t _BLI_string_join_12(_BLI_STRING_ARGS_10) ATTR_NONNULL();
+
+BLI_INLINE size_t _BLI_string_join_3(_BLI_STRING_ARGS_1)
+{
+ const char *string_array[] = {a};
+ return BLI_string_join_array(dst, dst_len, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE size_t _BLI_string_join_4(_BLI_STRING_ARGS_2)
+{
+ const char *string_array[] = {a, b};
+ return BLI_string_join_array(dst, dst_len, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE size_t _BLI_string_join_5(_BLI_STRING_ARGS_3)
+{
+ const char *string_array[] = {a, b, c};
+ return BLI_string_join_array(dst, dst_len, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE size_t _BLI_string_join_6(_BLI_STRING_ARGS_4)
+{
+ const char *string_array[] = {a, b, c, d};
+ return BLI_string_join_array(dst, dst_len, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE size_t _BLI_string_join_7(_BLI_STRING_ARGS_5)
+{
+ const char *string_array[] = {a, b, c, d, e};
+ return BLI_string_join_array(dst, dst_len, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE size_t _BLI_string_join_8(_BLI_STRING_ARGS_6)
+{
+ const char *string_array[] = {a, b, c, d, e, f};
+ return BLI_string_join_array(dst, dst_len, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE size_t _BLI_string_join_9(_BLI_STRING_ARGS_7)
+{
+ const char *string_array[] = {a, b, c, d, e, f, g};
+ return BLI_string_join_array(dst, dst_len, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE size_t _BLI_string_join_10(_BLI_STRING_ARGS_8)
+{
+ const char *string_array[] = {a, b, c, d, e, f, g, h};
+ return BLI_string_join_array(dst, dst_len, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE size_t _BLI_string_join_11(_BLI_STRING_ARGS_9)
+{
+ const char *string_array[] = {a, b, c, d, e, f, g, h, i};
+ return BLI_string_join_array(dst, dst_len, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE size_t _BLI_string_join_12(_BLI_STRING_ARGS_10)
+{
+ const char *string_array[] = {a, b, c, d, e, f, g, h, i, j};
+ return BLI_string_join_array(dst, dst_len, string_array, ARRAY_SIZE(string_array));
+}
+
+#undef _BLI_STRING_ARGS_0
+
+/** \} */
+
+/* ------------------------------------------------------------------------- */
+/** \name Implement: `BLI_string_joinN(..)`
+ * \{ */
+
+/**
+ * Join an array of strings into a newly allocated, null terminated string.
+ */
+char *BLI_string_join_arrayN(const char *strings[], uint strings_len) ATTR_WARN_UNUSED_RESULT
+ ATTR_NONNULL();
+
+#define BLI_string_joinN(...) VA_NARGS_CALL_OVERLOAD(_BLI_string_joinN_, __VA_ARGS__)
+
+#define _BLI_STRING_ARGS_0
+
+BLI_INLINE char *_BLI_string_joinN_1(_BLI_STRING_ARGS_1) ATTR_NONNULL();
+BLI_INLINE char *_BLI_string_joinN_2(_BLI_STRING_ARGS_2) ATTR_NONNULL();
+BLI_INLINE char *_BLI_string_joinN_3(_BLI_STRING_ARGS_3) ATTR_NONNULL();
+BLI_INLINE char *_BLI_string_joinN_4(_BLI_STRING_ARGS_4) ATTR_NONNULL();
+BLI_INLINE char *_BLI_string_joinN_5(_BLI_STRING_ARGS_5) ATTR_NONNULL();
+BLI_INLINE char *_BLI_string_joinN_6(_BLI_STRING_ARGS_6) ATTR_NONNULL();
+BLI_INLINE char *_BLI_string_joinN_7(_BLI_STRING_ARGS_7) ATTR_NONNULL();
+BLI_INLINE char *_BLI_string_joinN_8(_BLI_STRING_ARGS_8) ATTR_NONNULL();
+BLI_INLINE char *_BLI_string_joinN_9(_BLI_STRING_ARGS_9) ATTR_NONNULL();
+BLI_INLINE char *_BLI_string_joinN_10(_BLI_STRING_ARGS_10) ATTR_NONNULL();
+
+BLI_INLINE char *_BLI_string_joinN_1(_BLI_STRING_ARGS_1)
+{
+ const char *string_array[] = {a};
+ return BLI_string_join_arrayN(string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE char *_BLI_string_joinN_2(_BLI_STRING_ARGS_2)
+{
+ const char *string_array[] = {a, b};
+ return BLI_string_join_arrayN(string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE char *_BLI_string_joinN_3(_BLI_STRING_ARGS_3)
+{
+ const char *string_array[] = {a, b, c};
+ return BLI_string_join_arrayN(string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE char *_BLI_string_joinN_4(_BLI_STRING_ARGS_4)
+{
+ const char *string_array[] = {a, b, c, d};
+ return BLI_string_join_arrayN(string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE char *_BLI_string_joinN_5(_BLI_STRING_ARGS_5)
+{
+ const char *string_array[] = {a, b, c, d, e};
+ return BLI_string_join_arrayN(string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE char *_BLI_string_joinN_6(_BLI_STRING_ARGS_6)
+{
+ const char *string_array[] = {a, b, c, d, e, f};
+ return BLI_string_join_arrayN(string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE char *_BLI_string_joinN_7(_BLI_STRING_ARGS_7)
+{
+ const char *string_array[] = {a, b, c, d, e, f, g};
+ return BLI_string_join_arrayN(string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE char *_BLI_string_joinN_8(_BLI_STRING_ARGS_8)
+{
+ const char *string_array[] = {a, b, c, d, e, f, g, h};
+ return BLI_string_join_arrayN(string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE char *_BLI_string_joinN_9(_BLI_STRING_ARGS_9)
+{
+ const char *string_array[] = {a, b, c, d, e, f, g, h, i};
+ return BLI_string_join_arrayN(string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE char *_BLI_string_joinN_10(_BLI_STRING_ARGS_10)
+{
+ const char *string_array[] = {a, b, c, d, e, f, g, h, i, j};
+ return BLI_string_join_arrayN(string_array, ARRAY_SIZE(string_array));
+}
+
+#undef _BLI_STRING_ARGS_0
+
+/** \} */
+
+/* ------------------------------------------------------------------------- */
+/** \name Implement: `BLI_string_join_by_sep_char(..)`
+ * \{ */
+
+/**
+ * A version of #BLI_string_join_array that takes a separator which can be any character
+ * including '\0'.
+ */
+size_t BLI_string_join_array_by_sep_char(char *result,
+ size_t result_len,
+ char sep,
+ const char *strings[],
+ uint strings_len) ATTR_NONNULL();
+
+#define BLI_string_join_by_sep_char(...) \
+ VA_NARGS_CALL_OVERLOAD(_BLI_string_join_by_sep_char_, __VA_ARGS__)
+
+#define _BLI_STRING_ARGS_0 char *__restrict dst, const size_t dst_len, const char sep,
+
+BLI_INLINE size_t _BLI_string_join_by_sep_char_4(_BLI_STRING_ARGS_1) ATTR_NONNULL();
+BLI_INLINE size_t _BLI_string_join_by_sep_char_5(_BLI_STRING_ARGS_2) ATTR_NONNULL();
+BLI_INLINE size_t _BLI_string_join_by_sep_char_6(_BLI_STRING_ARGS_3) ATTR_NONNULL();
+BLI_INLINE size_t _BLI_string_join_by_sep_char_7(_BLI_STRING_ARGS_4) ATTR_NONNULL();
+BLI_INLINE size_t _BLI_string_join_by_sep_char_8(_BLI_STRING_ARGS_5) ATTR_NONNULL();
+BLI_INLINE size_t _BLI_string_join_by_sep_char_9(_BLI_STRING_ARGS_6) ATTR_NONNULL();
+BLI_INLINE size_t _BLI_string_join_by_sep_char_10(_BLI_STRING_ARGS_7) ATTR_NONNULL();
+BLI_INLINE size_t _BLI_string_join_by_sep_char_11(_BLI_STRING_ARGS_8) ATTR_NONNULL();
+BLI_INLINE size_t _BLI_string_join_by_sep_char_12(_BLI_STRING_ARGS_9) ATTR_NONNULL();
+BLI_INLINE size_t _BLI_string_join_by_sep_char_13(_BLI_STRING_ARGS_10) ATTR_NONNULL();
+
+BLI_INLINE size_t _BLI_string_join_by_sep_char_4(_BLI_STRING_ARGS_1)
+{
+ const char *string_array[] = {a};
+ return BLI_string_join_array_by_sep_char(
+ dst, dst_len, sep, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE size_t _BLI_string_join_by_sep_char_5(_BLI_STRING_ARGS_2)
+{
+ const char *string_array[] = {a, b};
+ return BLI_string_join_array_by_sep_char(
+ dst, dst_len, sep, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE size_t _BLI_string_join_by_sep_char_6(_BLI_STRING_ARGS_3)
+{
+ const char *string_array[] = {a, b, c};
+ return BLI_string_join_array_by_sep_char(
+ dst, dst_len, sep, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE size_t _BLI_string_join_by_sep_char_7(_BLI_STRING_ARGS_4)
+{
+ const char *string_array[] = {a, b, c, d};
+ return BLI_string_join_array_by_sep_char(
+ dst, dst_len, sep, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE size_t _BLI_string_join_by_sep_char_8(_BLI_STRING_ARGS_5)
+{
+ const char *string_array[] = {a, b, c, d, e};
+ return BLI_string_join_array_by_sep_char(
+ dst, dst_len, sep, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE size_t _BLI_string_join_by_sep_char_9(_BLI_STRING_ARGS_6)
+{
+ const char *string_array[] = {a, b, c, d, e, f};
+ return BLI_string_join_array_by_sep_char(
+ dst, dst_len, sep, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE size_t _BLI_string_join_by_sep_char_10(_BLI_STRING_ARGS_7)
+{
+ const char *string_array[] = {a, b, c, d, e, f, g};
+ return BLI_string_join_array_by_sep_char(
+ dst, dst_len, sep, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE size_t _BLI_string_join_by_sep_char_11(_BLI_STRING_ARGS_8)
+{
+ const char *string_array[] = {a, b, c, d, e, f, g, h};
+ return BLI_string_join_array_by_sep_char(
+ dst, dst_len, sep, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE size_t _BLI_string_join_by_sep_char_12(_BLI_STRING_ARGS_9)
+{
+ const char *string_array[] = {a, b, c, d, e, f, g, h, i};
+ return BLI_string_join_array_by_sep_char(
+ dst, dst_len, sep, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE size_t _BLI_string_join_by_sep_char_13(_BLI_STRING_ARGS_10)
+{
+ const char *string_array[] = {a, b, c, d, e, f, g, h, i, j};
+ return BLI_string_join_array_by_sep_char(
+ dst, dst_len, sep, string_array, ARRAY_SIZE(string_array));
+}
+
+#undef _BLI_STRING_ARGS_0
+
+/** \} */
+
+/* ------------------------------------------------------------------------- */
+/** \name Implement: `BLI_string_join_by_sep_charN(..)`
+ * \{ */
+
+/**
+ * A version of #BLI_string_join_by_sep_char that takes a separator which can be any character
+ * including '\0'.
+ */
+char *BLI_string_join_array_by_sep_charN(char sep,
+ const char *strings[],
+ uint strings_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+
+#define BLI_string_join_by_sep_charN(...) \
+ VA_NARGS_CALL_OVERLOAD(_BLI_string_join_by_sep_charN_, __VA_ARGS__)
+
+#define _BLI_STRING_ARGS_0 const char sep,
+
+BLI_INLINE char *_BLI_string_join_by_sep_charN_2(_BLI_STRING_ARGS_1) ATTR_NONNULL();
+BLI_INLINE char *_BLI_string_join_by_sep_charN_3(_BLI_STRING_ARGS_2) ATTR_NONNULL();
+BLI_INLINE char *_BLI_string_join_by_sep_charN_4(_BLI_STRING_ARGS_3) ATTR_NONNULL();
+BLI_INLINE char *_BLI_string_join_by_sep_charN_5(_BLI_STRING_ARGS_4) ATTR_NONNULL();
+BLI_INLINE char *_BLI_string_join_by_sep_charN_6(_BLI_STRING_ARGS_5) ATTR_NONNULL();
+BLI_INLINE char *_BLI_string_join_by_sep_charN_7(_BLI_STRING_ARGS_6) ATTR_NONNULL();
+BLI_INLINE char *_BLI_string_join_by_sep_charN_8(_BLI_STRING_ARGS_7) ATTR_NONNULL();
+BLI_INLINE char *_BLI_string_join_by_sep_charN_9(_BLI_STRING_ARGS_8) ATTR_NONNULL();
+BLI_INLINE char *_BLI_string_join_by_sep_charN_10(_BLI_STRING_ARGS_9) ATTR_NONNULL();
+BLI_INLINE char *_BLI_string_join_by_sep_charN_11(_BLI_STRING_ARGS_10) ATTR_NONNULL();
+
+BLI_INLINE char *_BLI_string_join_by_sep_charN_2(_BLI_STRING_ARGS_1)
+{
+ const char *string_array[] = {a};
+ return BLI_string_join_array_by_sep_charN(sep, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE char *_BLI_string_join_by_sep_charN_3(_BLI_STRING_ARGS_2)
+{
+ const char *string_array[] = {a, b};
+ return BLI_string_join_array_by_sep_charN(sep, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE char *_BLI_string_join_by_sep_charN_4(_BLI_STRING_ARGS_3)
+{
+ const char *string_array[] = {a, b, c};
+ return BLI_string_join_array_by_sep_charN(sep, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE char *_BLI_string_join_by_sep_charN_5(_BLI_STRING_ARGS_4)
+{
+ const char *string_array[] = {a, b, c, d};
+ return BLI_string_join_array_by_sep_charN(sep, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE char *_BLI_string_join_by_sep_charN_6(_BLI_STRING_ARGS_5)
+{
+ const char *string_array[] = {a, b, c, d, e};
+ return BLI_string_join_array_by_sep_charN(sep, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE char *_BLI_string_join_by_sep_charN_7(_BLI_STRING_ARGS_6)
+{
+ const char *string_array[] = {a, b, c, d, e, f};
+ return BLI_string_join_array_by_sep_charN(sep, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE char *_BLI_string_join_by_sep_charN_8(_BLI_STRING_ARGS_7)
+{
+ const char *string_array[] = {a, b, c, d, e, f, g};
+ return BLI_string_join_array_by_sep_charN(sep, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE char *_BLI_string_join_by_sep_charN_9(_BLI_STRING_ARGS_8)
+{
+ const char *string_array[] = {a, b, c, d, e, f, g, h};
+ return BLI_string_join_array_by_sep_charN(sep, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE char *_BLI_string_join_by_sep_charN_10(_BLI_STRING_ARGS_9)
+{
+ const char *string_array[] = {a, b, c, d, e, f, g, h, i};
+ return BLI_string_join_array_by_sep_charN(sep, string_array, ARRAY_SIZE(string_array));
+}
+BLI_INLINE char *_BLI_string_join_by_sep_charN_11(_BLI_STRING_ARGS_10)
+{
+ const char *string_array[] = {a, b, c, d, e, f, g, h, i, j};
+ return BLI_string_join_array_by_sep_charN(sep, string_array, ARRAY_SIZE(string_array));
+}
+
+/** \} */
+
+#undef _BLI_STRING_ARGS_0
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/blenlib/BLI_task.hh b/source/blender/blenlib/BLI_task.hh
index 9f9a57be634..e7d9a21439a 100644
--- a/source/blender/blenlib/BLI_task.hh
+++ b/source/blender/blenlib/BLI_task.hh
@@ -129,6 +129,7 @@ void parallel_invoke(const bool use_threading, Functions &&...functions)
template<typename Function> void isolate_task(const Function &function)
{
#ifdef WITH_TBB
+ lazy_threading::ReceiverIsolation isolation;
tbb::this_task_arena::isolate(function);
#else
function();
diff --git a/source/blender/blenlib/BLI_uvproject.h b/source/blender/blenlib/BLI_uvproject.h
index 75f39de6b7f..a94fd796121 100644
--- a/source/blender/blenlib/BLI_uvproject.h
+++ b/source/blender/blenlib/BLI_uvproject.h
@@ -15,7 +15,7 @@ struct ProjCameraInfo;
/**
* Create UV info from the camera, needs to be freed.
*
- * \param rotmat: can be `obedit->obmat` when uv project is used.
+ * \param rotmat: can be `obedit->object_to_world` when uv project is used.
* \param winx, winy: can be from `scene->r.xsch / ysch`.
*/
struct ProjCameraInfo *BLI_uvproject_camera_info(struct Object *ob,
diff --git a/source/blender/blenlib/intern/lazy_threading.cc b/source/blender/blenlib/intern/lazy_threading.cc
index 803fd81a96d..4f6d3a75ecc 100644
--- a/source/blender/blenlib/intern/lazy_threading.cc
+++ b/source/blender/blenlib/intern/lazy_threading.cc
@@ -1,30 +1,50 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "BLI_lazy_threading.hh"
+#include "BLI_stack.hh"
#include "BLI_vector.hh"
namespace blender::lazy_threading {
/**
- * This is a #RawVector so that it can be destructed after Blender checks for memory leaks.
+ * This uses a "raw" stack and vector so that it can be destructed after Blender checks for memory
+ * leaks. A new list of receivers is created whenever an isolated region is entered to avoid
+ * deadlocks.
*/
-thread_local RawVector<FunctionRef<void()>, 0> hint_receivers;
+using HintReceivers = RawStack<RawVector<FunctionRef<void()>, 0>, 0>;
+thread_local HintReceivers hint_receivers = []() {
+ HintReceivers receivers;
+ /* Make sure there is always at least one vector. */
+ receivers.push_as();
+ return receivers;
+}();
void send_hint()
{
- for (const FunctionRef<void()> &fn : hint_receivers) {
+ for (const FunctionRef<void()> &fn : hint_receivers.peek()) {
fn();
}
}
HintReceiver::HintReceiver(const FunctionRef<void()> fn)
{
- hint_receivers.append(fn);
+ hint_receivers.peek().append(fn);
}
HintReceiver::~HintReceiver()
{
- hint_receivers.pop_last();
+ hint_receivers.peek().pop_last();
+}
+
+ReceiverIsolation::ReceiverIsolation()
+{
+ hint_receivers.push_as();
+}
+
+ReceiverIsolation::~ReceiverIsolation()
+{
+ BLI_assert(hint_receivers.peek().is_empty());
+ hint_receivers.pop();
}
} // namespace blender::lazy_threading
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index b16cf8ea161..d13f3fe5ced 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -153,6 +153,19 @@ void BLI_path_normalize(const char *relabase, char *path)
*/
#ifdef WIN32
+
+ while ((start = strstr(path, "\\.\\"))) {
+ eind = start + strlen("\\.\\") - 1;
+ memmove(start, eind, strlen(eind) + 1);
+ }
+
+ /* remove two consecutive backslashes, but skip the UNC prefix,
+ * which needs to be preserved */
+ while ((start = strstr(path + BLI_path_unc_prefix_len(path), "\\\\"))) {
+ eind = start + strlen("\\\\") - 1;
+ memmove(start, eind, strlen(eind) + 1);
+ }
+
while ((start = strstr(path, "\\..\\"))) {
eind = start + strlen("\\..\\") - 1;
a = start - path - 1;
@@ -170,18 +183,18 @@ void BLI_path_normalize(const char *relabase, char *path)
}
}
- while ((start = strstr(path, "\\.\\"))) {
- eind = start + strlen("\\.\\") - 1;
+#else
+
+ while ((start = strstr(path, "/./"))) {
+ eind = start + (3 - 1) /* strlen("/./") - 1 */;
memmove(start, eind, strlen(eind) + 1);
}
- /* remove two consecutive backslashes, but skip the UNC prefix,
- * which needs to be preserved */
- while ((start = strstr(path + BLI_path_unc_prefix_len(path), "\\\\"))) {
- eind = start + strlen("\\\\") - 1;
+ while ((start = strstr(path, "//"))) {
+ eind = start + (2 - 1) /* strlen("//") - 1 */;
memmove(start, eind, strlen(eind) + 1);
}
-#else
+
while ((start = strstr(path, "/../"))) {
a = start - path - 1;
if (a > 0) {
@@ -206,15 +219,6 @@ void BLI_path_normalize(const char *relabase, char *path)
}
}
- while ((start = strstr(path, "/./"))) {
- eind = start + (3 - 1) /* strlen("/./") - 1 */;
- memmove(start, eind, strlen(eind) + 1);
- }
-
- while ((start = strstr(path, "//"))) {
- eind = start + (2 - 1) /* strlen("//") - 1 */;
- memmove(start, eind, strlen(eind) + 1);
- }
#endif
}
@@ -622,18 +626,28 @@ bool BLI_path_suffix(char *string, size_t maxlen, const char *suffix, const char
bool BLI_path_parent_dir(char *path)
{
- const char parent_dir[] = {'.', '.', SEP, '\0'}; /* "../" or "..\\" */
- char tmp[FILE_MAX + 4];
-
- BLI_path_join(tmp, sizeof(tmp), path, parent_dir);
- BLI_path_normalize(NULL, tmp); /* does all the work of normalizing the path for us */
-
- if (!BLI_path_extension_check(tmp, parent_dir)) {
- strcpy(path, tmp); /* We assume the parent directory is always shorter. */
- return true;
+ /* Use #BLI_path_name_at_index instead of checking if the strings ends with `parent_dir`
+ * to ensure the logic isn't confused by:
+ * - Directory names that happen to end with `..`.
+ * - When `path` is empty, the contents will be `../`
+ * which would cause checking for a tailing `/../` fail.
+ * Extracting the span of the final directory avoids both these issues. */
+ int tail_ofs = 0, tail_len = 0;
+ if (!BLI_path_name_at_index(path, -1, &tail_ofs, &tail_len)) {
+ return false;
+ }
+ if (tail_len == 1) {
+ /* Last path is ".", as normalize should remove this, it's safe to assume failure.
+ * This happens when the input a single period (possibly with slashes before or after). */
+ if (path[tail_ofs] == '.') {
+ return false;
+ }
}
- return false;
+ /* Input paths should already be normalized if `..` is part of the path. */
+ BLI_assert(!((tail_len == 2) && (path[tail_ofs] == '.') && (path[tail_ofs + 1] == '.')));
+ path[tail_ofs] = '\0';
+ return true;
}
bool BLI_path_parent_dir_until_exists(char *dir)
@@ -1482,6 +1496,27 @@ size_t BLI_path_join_array(char *__restrict dst,
return ofs;
}
+#ifdef WIN32
+ /* Special case "//" for relative paths, don't use separator #SEP
+ * as this has a special meaning on both WIN32 & UNIX.
+ * Without this check joining `"//", "path"`. results in `"//\path"`. */
+ if (ofs != 0) {
+ size_t i;
+ for (i = 0; i < ofs; i++) {
+ if (dst[i] != '/') {
+ break;
+ }
+ }
+ if (i == ofs) {
+ /* All slashes, keep them as-is, and join the remaining path array. */
+ return path_array_num > 1 ?
+ BLI_path_join_array(
+ dst + ofs, dst_len - ofs, &path_array[1], path_array_num - 1) :
+ ofs;
+ }
+ }
+#endif
+
/* Remove trailing slashes, unless there are *only* trailing slashes
* (allow `//` or `//some_path` as the first argument). */
bool has_trailing_slash = false;
@@ -1552,39 +1587,47 @@ const char *BLI_path_basename(const char *path)
return filename ? filename + 1 : path;
}
-bool BLI_path_name_at_index(const char *__restrict path,
- const int index,
- int *__restrict r_offset,
- int *__restrict r_len)
+static bool path_name_at_index_forward(const char *__restrict path,
+ const int index,
+ int *__restrict r_offset,
+ int *__restrict r_len)
{
- if (index >= 0) {
- int index_step = 0;
- int prev = -1;
- int i = 0;
- while (true) {
- const char c = path[i];
- if (ELEM(c, SEP, '\0')) {
- if (prev + 1 != i) {
- prev += 1;
+ BLI_assert(index >= 0);
+ int index_step = 0;
+ int prev = -1;
+ int i = 0;
+ while (true) {
+ const char c = path[i];
+ if (ELEM(c, SEP, '\0')) {
+ if (prev + 1 != i) {
+ prev += 1;
+ /* Skip '/./' (behave as if they don't exist). */
+ if (!((i - prev == 1) && (prev != 0) && (path[prev] == '.'))) {
if (index_step == index) {
*r_offset = prev;
*r_len = i - prev;
- // printf("!!! %d %d\n", start, end);
return true;
}
index_step += 1;
}
- if (c == '\0') {
- break;
- }
- prev = i;
}
- i += 1;
+ if (c == '\0') {
+ break;
+ }
+ prev = i;
}
- return false;
+ i += 1;
}
+ return false;
+}
- /* negative number, reverse where -1 is the last element */
+static bool path_name_at_index_backward(const char *__restrict path,
+ const int index,
+ int *__restrict r_offset,
+ int *__restrict r_len)
+{
+ /* Negative number, reverse where -1 is the last element. */
+ BLI_assert(index < 0);
int index_step = -1;
int prev = strlen(path);
int i = prev - 1;
@@ -1593,12 +1636,15 @@ bool BLI_path_name_at_index(const char *__restrict path,
if (ELEM(c, SEP, '\0')) {
if (prev - 1 != i) {
i += 1;
- if (index_step == index) {
- *r_offset = i;
- *r_len = prev - i;
- return true;
+ /* Skip '/./' (behave as if they don't exist). */
+ if (!((prev - i == 1) && (i != 0) && (path[i] == '.'))) {
+ if (index_step == index) {
+ *r_offset = i;
+ *r_len = prev - i;
+ return true;
+ }
+ index_step -= 1;
}
- index_step -= 1;
}
if (c == '\0') {
break;
@@ -1610,6 +1656,15 @@ bool BLI_path_name_at_index(const char *__restrict path,
return false;
}
+bool BLI_path_name_at_index(const char *__restrict path,
+ const int index,
+ int *__restrict r_offset,
+ int *__restrict r_len)
+{
+ return (index >= 0) ? path_name_at_index_forward(path, index, r_offset, r_len) :
+ path_name_at_index_backward(path, index, r_offset, r_len);
+}
+
bool BLI_path_contains(const char *container_path, const char *containee_path)
{
char container_native[PATH_MAX];
diff --git a/source/blender/blenlib/intern/string_utils.c b/source/blender/blenlib/intern/string_utils.c
index 0b9baaff3e9..27734d2f429 100644
--- a/source/blender/blenlib/intern/string_utils.c
+++ b/source/blender/blenlib/intern/string_utils.c
@@ -344,10 +344,10 @@ bool BLI_uniquename(
*
* \{ */
-char *BLI_string_join_array(char *result,
- size_t result_len,
- const char *strings[],
- uint strings_len)
+size_t BLI_string_join_array(char *result,
+ size_t result_len,
+ const char *strings[],
+ uint strings_len)
{
char *c = result;
char *c_end = &result[result_len - 1];
@@ -358,10 +358,10 @@ char *BLI_string_join_array(char *result,
}
}
*c = '\0';
- return c;
+ return (size_t)(c - result);
}
-char *BLI_string_join_array_by_sep_char(
+size_t BLI_string_join_array_by_sep_char(
char *result, size_t result_len, char sep, const char *strings[], uint strings_len)
{
char *c = result;
@@ -378,7 +378,7 @@ char *BLI_string_join_array_by_sep_char(
}
}
*c = '\0';
- return c;
+ return (size_t)(c - result);
}
char *BLI_string_join_arrayN(const char *strings[], uint strings_len)
diff --git a/source/blender/blenlib/intern/task_scheduler.cc b/source/blender/blenlib/intern/task_scheduler.cc
index 1f7747453c1..5b056df78b4 100644
--- a/source/blender/blenlib/intern/task_scheduler.cc
+++ b/source/blender/blenlib/intern/task_scheduler.cc
@@ -8,6 +8,7 @@
#include "MEM_guardedalloc.h"
+#include "BLI_lazy_threading.hh"
#include "BLI_task.h"
#include "BLI_threads.h"
@@ -67,6 +68,7 @@ int BLI_task_scheduler_num_threads()
void BLI_task_isolate(void (*func)(void *userdata), void *userdata)
{
#ifdef WITH_TBB
+ blender::lazy_threading::ReceiverIsolation isolation;
tbb::this_task_arena::isolate([&] { func(userdata); });
#else
func(userdata);
diff --git a/source/blender/blenlib/intern/uvproject.c b/source/blender/blenlib/intern/uvproject.c
index 347166bd57d..0398bf0b3fe 100644
--- a/source/blender/blenlib/intern/uvproject.c
+++ b/source/blender/blenlib/intern/uvproject.c
@@ -129,7 +129,7 @@ ProjCameraInfo *BLI_uvproject_camera_info(Object *ob, float rotmat[4][4], float
uci.camsize = uci.do_persp ? tanf(uci.camangle) : camera->ortho_scale;
/* account for scaled cameras */
- copy_m4_m4(uci.caminv, ob->obmat);
+ copy_m4_m4(uci.caminv, ob->object_to_world);
normalize_m4(uci.caminv);
if (invert_m4(uci.caminv)) {
diff --git a/source/blender/blenlib/tests/BLI_path_util_test.cc b/source/blender/blenlib/tests/BLI_path_util_test.cc
index 1241c71cf94..9d5422d62ff 100644
--- a/source/blender/blenlib/tests/BLI_path_util_test.cc
+++ b/source/blender/blenlib/tests/BLI_path_util_test.cc
@@ -9,65 +9,158 @@
#include "BLI_string.h"
/* -------------------------------------------------------------------- */
-/* tests */
+/** \name Local Utilities
+ * \{ */
-/* BLI_path_normalize */
-#ifndef _WIN32
-TEST(path_util, Clean)
+static void str_replace_char_with_relative_exception(char *str, char src, char dst)
{
- /* "/./" -> "/" */
- {
- char path[FILE_MAX] = "/a/./b/./c/./";
- BLI_path_normalize(nullptr, path);
- EXPECT_STREQ("/a/b/c/", path);
+ /* Always keep "//" or more leading slashes (special meaning). */
+ if (src == '/') {
+ if (str[0] == '/' && str[1] == '/') {
+ str += 2;
+ while (*str == '/') {
+ str++;
+ }
+ }
}
+ BLI_str_replace_char(str, src, dst);
+}
- {
- char path[FILE_MAX] = "/./././";
- BLI_path_normalize(nullptr, path);
- EXPECT_STREQ("/", path);
+static char *str_replace_char_strdup(const char *str, char src, char dst)
+{
+ if (str == nullptr) {
+ return nullptr;
}
+ char *str_dupe = strdup(str);
+ BLI_str_replace_char(str_dupe, src, dst);
+ return str_dupe;
+}
- {
- char path[FILE_MAX] = "/a/./././b/";
- BLI_path_normalize(nullptr, path);
- EXPECT_STREQ("/a/b/", path);
- }
+/** \} */
- /* "//" -> "/" */
- {
- char path[FILE_MAX] = "a////";
- BLI_path_normalize(nullptr, path);
- EXPECT_STREQ("a/", path);
- }
+/* -------------------------------------------------------------------- */
+/** \name Tests for: #BLI_path_normalize
+ * \{ */
- if (false) /* FIXME */
- {
- char path[FILE_MAX] = "./a////";
- BLI_path_normalize(nullptr, path);
- EXPECT_STREQ("./a/", path);
- }
+#define NORMALIZE_WITH_BASEDIR(input, input_base, output) \
+ { \
+ char path[FILE_MAX] = input; \
+ const char *input_base_test = input_base; \
+ if (SEP == '\\') { \
+ str_replace_char_with_relative_exception(path, '/', '\\'); \
+ input_base_test = str_replace_char_strdup(input_base_test, '/', '\\'); \
+ } \
+ BLI_path_normalize(input_base_test, path); \
+ if (SEP == '\\') { \
+ BLI_str_replace_char(path, '\\', '/'); \
+ if (input_base_test) { \
+ free((void *)input_base_test); \
+ } \
+ } \
+ EXPECT_STREQ(output, path); \
+ } \
+ ((void)0)
- /* "foo/bar/../" -> "foo/" */
- {
- char path[FILE_MAX] = "/a/b/c/../../../";
- BLI_path_normalize(nullptr, path);
- EXPECT_STREQ("/", path);
- }
+#define NORMALIZE(input, output) NORMALIZE_WITH_BASEDIR(input, nullptr, output)
- {
- char path[FILE_MAX] = "/a/../a/b/../b/c/../c/";
- BLI_path_normalize(nullptr, path);
- EXPECT_STREQ("/a/b/c/", path);
- }
+/* #BLI_path_normalize: "/./" -> "/" */
+TEST(path_util, Clean_Dot)
+{
+ NORMALIZE("/./", "/");
+ NORMALIZE("/a/./b/./c/./", "/a/b/c/");
+ NORMALIZE("/./././", "/");
+ NORMALIZE("/a/./././b/", "/a/b/");
+}
+/* #BLI_path_normalize: complex "/./" -> "/", "//" -> "/", "./path/../" -> "./". */
+TEST(path_util, Clean_Complex)
+{
+ NORMALIZE("/a/./b/./c/./.././.././", "/a/");
+ NORMALIZE("/a//.//b//.//c//.//..//.//..//.//", "/a/");
+}
+/* #BLI_path_normalize: "//" -> "/" */
+TEST(path_util, Clean_DoubleSlash)
+{
+ NORMALIZE("//", "//"); /* Exception, double forward slash. */
+ NORMALIZE(".//", "./");
+ NORMALIZE("a////", "a/");
+ NORMALIZE("./a////", "./a/");
+}
+/* #BLI_path_normalize: "foo/bar/../" -> "foo/" */
+TEST(path_util, Clean_Parent)
+{
+ NORMALIZE("/a/b/c/../../../", "/");
+ NORMALIZE("/a/../a/b/../b/c/../c/", "/a/b/c/");
+ NORMALIZE_WITH_BASEDIR("//../", "/a/b/c/", "/a/b/");
+}
- {
- char path[FILE_MAX] = "//../";
- BLI_path_normalize("/a/b/c/", path);
- EXPECT_STREQ("/a/b/", path);
- }
+#undef NORMALIZE_WITH_BASEDIR
+#undef NORMALIZE
+
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Tests for: #BLI_path_parent_dir
+ * \{ */
+
+#define PARENT_DIR(input, output) \
+ { \
+ char path[FILE_MAX] = input; \
+ if (SEP == '\\') { \
+ BLI_str_replace_char(path, '/', '\\'); \
+ } \
+ BLI_path_parent_dir(path); \
+ if (SEP == '\\') { \
+ BLI_str_replace_char(path, '\\', '/'); \
+ } \
+ EXPECT_STREQ(output, path); \
+ } \
+ ((void)0)
+
+TEST(path_util, ParentDir_Simple)
+{
+ PARENT_DIR("/a/b/", "/a/");
+ PARENT_DIR("/a/b", "/a/");
+ PARENT_DIR("/a", "/");
+}
+
+TEST(path_util, ParentDir_NOP)
+{
+ PARENT_DIR("/", "/");
+ PARENT_DIR("", "");
+ PARENT_DIR(".", ".");
+ PARENT_DIR("./", "./");
+ PARENT_DIR(".//", ".//");
+ PARENT_DIR("./.", "./.");
}
-#endif
+
+TEST(path_util, ParentDir_TrailingPeriod)
+{
+ /* Ensure trailing dots aren't confused with parent path. */
+ PARENT_DIR("/.../.../.../", "/.../.../");
+ PARENT_DIR("/.../.../...", "/.../.../");
+
+ PARENT_DIR("/a../b../c../", "/a../b../");
+ PARENT_DIR("/a../b../c..", "/a../b../");
+
+ PARENT_DIR("/a./b./c./", "/a./b./");
+ PARENT_DIR("/a./b./c.", "/a./b./");
+}
+
+TEST(path_util, ParentDir_Complex)
+{
+ PARENT_DIR("./a/", "./");
+ PARENT_DIR("./a", "./");
+ PARENT_DIR("../a/", "../");
+ PARENT_DIR("../a", "../");
+}
+
+#undef PARENT_DIR
+
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Tests for: #BLI_path_name_at_index
+ * \{ */
#define AT_INDEX(str_input, index_input, str_expect) \
{ \
@@ -91,7 +184,6 @@ TEST(path_util, Clean)
} \
((void)0)
-/* BLI_path_name_at_index */
TEST(path_util, NameAtIndex_Single)
{
AT_INDEX("/a", 0, "a");
@@ -167,6 +259,64 @@ TEST(path_util, NameAtIndex_MiscNeg)
AT_INDEX("/how/now/brown/cow/", 4, nullptr);
}
+#define TEST_STR "./a/./b/./c/."
+
+TEST(path_util, NameAtIndex_SingleDot)
+{
+ AT_INDEX(TEST_STR, 0, ".");
+ AT_INDEX(TEST_STR, 1, "a");
+ AT_INDEX(TEST_STR, 2, "b");
+ AT_INDEX(TEST_STR, 3, "c");
+ AT_INDEX(TEST_STR, 4, nullptr);
+}
+
+TEST(path_util, NameAtIndex_SingleDotNeg)
+{
+ AT_INDEX(TEST_STR, -5, nullptr);
+ AT_INDEX(TEST_STR, -4, ".");
+ AT_INDEX(TEST_STR, -3, "a");
+ AT_INDEX(TEST_STR, -2, "b");
+ AT_INDEX(TEST_STR, -1, "c");
+}
+
+#undef TEST_STR
+
+#define TEST_STR ".//a//.//b//.//c//.//"
+
+TEST(path_util, NameAtIndex_SingleDotDoubleSlash)
+{
+ AT_INDEX(TEST_STR, 0, ".");
+ AT_INDEX(TEST_STR, 1, "a");
+ AT_INDEX(TEST_STR, 2, "b");
+ AT_INDEX(TEST_STR, 3, "c");
+ AT_INDEX(TEST_STR, 4, nullptr);
+}
+
+TEST(path_util, NameAtIndex_SingleDotDoubleSlashNeg)
+{
+ AT_INDEX(TEST_STR, -5, nullptr);
+ AT_INDEX(TEST_STR, -4, ".");
+ AT_INDEX(TEST_STR, -3, "a");
+ AT_INDEX(TEST_STR, -2, "b");
+ AT_INDEX(TEST_STR, -1, "c");
+}
+
+#undef TEST_STR
+
+TEST(path_util, NameAtIndex_SingleDotSeries)
+{
+ AT_INDEX("abc/././/././xyz", 0, "abc");
+ AT_INDEX("abc/././/././xyz", 1, "xyz");
+ AT_INDEX("abc/././/././xyz", 2, nullptr);
+}
+
+TEST(path_util, NameAtIndex_SingleDotSeriesNeg)
+{
+ AT_INDEX("abc/././/././xyz", -3, nullptr);
+ AT_INDEX("abc/././/././xyz", -2, "abc");
+ AT_INDEX("abc/././/././xyz", -1, "xyz");
+}
+
TEST(path_util, NameAtIndex_MiscComplex)
{
AT_INDEX("how//now/brown/cow", 0, "how");
@@ -205,6 +355,12 @@ TEST(path_util, NameAtIndex_NoneComplexNeg)
#undef AT_INDEX
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Tests for: #BLI_path_join
+ * \{ */
+
/* For systems with `/` path separator (non WIN32). */
#define JOIN_FORWARD_SLASH(str_expect, out_size, ...) \
{ \
@@ -252,7 +408,6 @@ TEST(path_util, NameAtIndex_NoneComplexNeg)
# define JOIN JOIN_FORWARD_SLASH
#endif
-/* BLI_path_join */
TEST(path_util, JoinNop)
{
JOIN("", 100, "");
@@ -346,7 +501,12 @@ TEST(path_util, JoinRelativePrefix)
#undef JOIN_BACK_SLASH
#undef JOIN_FORWARD_SLASH
-/* BLI_path_frame */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Tests for: #BLI_path_frame
+ * \{ */
+
TEST(path_util, Frame)
{
bool ret;
@@ -423,7 +583,12 @@ TEST(path_util, Frame)
}
}
-/* BLI_split_dirfile */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Tests for: #BLI_split_dirfile
+ * \{ */
+
TEST(path_util, SplitDirfile)
{
{
@@ -479,6 +644,12 @@ TEST(path_util, SplitDirfile)
}
}
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Tests for: #BLI_path_frame_strip
+ * \{ */
+
#define PATH_FRAME_STRIP(input_path, expect_path, expect_ext) \
{ \
char path[FILE_MAX]; \
@@ -490,7 +661,6 @@ TEST(path_util, SplitDirfile)
} \
((void)0)
-/* BLI_path_frame_strip */
TEST(path_util, PathFrameStrip)
{
PATH_FRAME_STRIP("", "", "");
@@ -502,6 +672,12 @@ TEST(path_util, PathFrameStrip)
}
#undef PATH_FRAME_STRIP
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Tests for: #BLI_path_extension_check
+ * \{ */
+
#define PATH_EXTENSION_CHECK(input_path, input_ext, expect_ext) \
{ \
const bool ret = BLI_path_extension_check(input_path, input_ext); \
@@ -514,7 +690,6 @@ TEST(path_util, PathFrameStrip)
} \
((void)0)
-/* BLI_path_extension_check */
TEST(path_util, PathExtensionCheck)
{
PATH_EXTENSION_CHECK("a/b/c.exe", ".exe", ".exe");
@@ -540,6 +715,12 @@ TEST(path_util, PathExtensionCheck)
}
#undef PATH_EXTENSION_CHECK
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Tests for: #BLI_path_frame_check_chars
+ * \{ */
+
#define PATH_FRAME_CHECK_CHARS(input_path, expect_hasChars) \
{ \
const bool ret = BLI_path_frame_check_chars(input_path); \
@@ -552,7 +733,6 @@ TEST(path_util, PathExtensionCheck)
} \
((void)0)
-/* BLI_path_frame_check_chars */
TEST(path_util, PathFrameCheckChars)
{
PATH_FRAME_CHECK_CHARS("a#", true);
@@ -572,6 +752,12 @@ TEST(path_util, PathFrameCheckChars)
}
#undef PATH_FRAME_CHECK_CHARS
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Tests for: #BLI_path_frame_range
+ * \{ */
+
#define PATH_FRAME_RANGE(input_path, sta, end, digits, expect_outpath) \
{ \
char path[FILE_MAX]; \
@@ -588,7 +774,6 @@ TEST(path_util, PathFrameCheckChars)
} \
((void)0)
-/* BLI_path_frame_range */
TEST(path_util, PathFrameRange)
{
int dummy = -1;
@@ -604,6 +789,12 @@ TEST(path_util, PathFrameRange)
}
#undef PATH_FRAME_RANGE
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Tests for: #BLI_path_frame_get
+ * \{ */
+
#define PATH_FRAME_GET(input_path, expect_frame, expect_numdigits, expect_pathisvalid) \
{ \
char path[FILE_MAX]; \
@@ -621,7 +812,6 @@ TEST(path_util, PathFrameRange)
} \
((void)0)
-/* BLI_path_frame_get */
TEST(path_util, PathFrameGet)
{
PATH_FRAME_GET("001.avi", 1, 3, true);
@@ -633,7 +823,12 @@ TEST(path_util, PathFrameGet)
}
#undef PATH_FRAME_GET
-/* BLI_path_extension */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Tests for: #BLI_path_extension
+ * \{ */
+
TEST(path_util, PathExtension)
{
EXPECT_EQ(nullptr, BLI_path_extension("some.def/file"));
@@ -647,62 +842,88 @@ TEST(path_util, PathExtension)
EXPECT_STREQ(".001", BLI_path_extension("Text.001"));
}
-/* BLI_path_rel. */
-#ifndef _WIN32
+/** \} */
-# define PATH_REL(abs_path, ref_path, rel_path) \
- { \
- char path[FILE_MAX]; \
- BLI_strncpy(path, abs_path, sizeof(path)); \
- BLI_path_rel(path, ref_path); \
- EXPECT_STREQ(rel_path, path); \
+/* -------------------------------------------------------------------- */
+/** \name Tests for: #BLI_path_rel
+ * \{ */
+
+#define PATH_REL(abs_path, ref_path, rel_path) \
+ { \
+ char path[FILE_MAX]; \
+ const char *ref_path_test = ref_path; \
+ BLI_strncpy(path, abs_path, sizeof(path)); \
+ if (SEP == '\\') { \
+ BLI_str_replace_char(path, '/', '\\'); \
+ ref_path_test = str_replace_char_strdup(ref_path_test, '/', '\\'); \
+ } \
+ BLI_path_rel(path, ref_path_test); \
+ if (SEP == '\\') { \
+ BLI_str_replace_char(path, '\\', '/'); \
+ free((void *)ref_path_test); \
} \
- void(0)
+ EXPECT_STREQ(rel_path, path); \
+ } \
+ void(0)
-TEST(path_util, PathRelPath)
+#ifdef WIN32
+# define ABS_PREFIX "C:"
+#else
+# define ABS_PREFIX ""
+#endif
+
+TEST(path_util, PathRelPath_Simple)
{
- PATH_REL("/foo/bar/blender.blend", "/foo/bar/", "//blender.blend");
- PATH_REL("/foo/bar/blender.blend", "/foo/bar", "//bar/blender.blend");
+ PATH_REL(ABS_PREFIX "/foo/bar/blender.blend", ABS_PREFIX "/foo/bar/", "//blender.blend");
+}
- /* Check for potential buffer overflows. */
- {
- char abs_path_in[FILE_MAX];
- abs_path_in[0] = '/';
- for (int i = 1; i < FILE_MAX - 1; i++) {
- abs_path_in[i] = 'A';
- }
- abs_path_in[FILE_MAX - 1] = '\0';
- char abs_path_out[FILE_MAX];
- abs_path_out[0] = '/';
- abs_path_out[1] = '/';
- for (int i = 2; i < FILE_MAX - 1; i++) {
- abs_path_out[i] = 'A';
- }
- abs_path_out[FILE_MAX - 1] = '\0';
- PATH_REL(abs_path_in, "/", abs_path_out);
-
- const char *ref_path_in = "/foo/bar/";
- const size_t ref_path_in_len = strlen(ref_path_in);
- strcpy(abs_path_in, ref_path_in);
- for (int i = ref_path_in_len; i < FILE_MAX - 1; i++) {
- abs_path_in[i] = 'A';
- }
- abs_path_in[FILE_MAX - 1] = '\0';
- abs_path_out[0] = '/';
- abs_path_out[1] = '/';
- for (int i = 2; i < FILE_MAX - (int(ref_path_in_len) - 1); i++) {
- abs_path_out[i] = 'A';
- }
- abs_path_out[FILE_MAX - (ref_path_in_len - 1)] = '\0';
- PATH_REL(abs_path_in, ref_path_in, abs_path_out);
+TEST(path_util, PathRelPath_SimpleSubdir)
+{
+ PATH_REL(ABS_PREFIX "/foo/bar/blender.blend", ABS_PREFIX "/foo/bar", "//bar/blender.blend");
+}
+
+TEST(path_util, PathRelPath_BufferOverflowRoot)
+{
+ char abs_path_in[FILE_MAX];
+ const char *abs_prefix = ABS_PREFIX "/";
+ for (int i = STRNCPY_RLEN(abs_path_in, abs_prefix); i < FILE_MAX - 1; i++) {
+ abs_path_in[i] = 'A';
+ }
+ abs_path_in[FILE_MAX - 1] = '\0';
+ char abs_path_out[FILE_MAX];
+ for (int i = STRNCPY_RLEN(abs_path_out, "//"); i < FILE_MAX - 1; i++) {
+ abs_path_out[i] = 'A';
+ }
+ abs_path_out[FILE_MAX - std::max((strlen(abs_prefix) - 1), size_t(1))] = '\0';
+ PATH_REL(abs_path_in, abs_prefix, abs_path_out);
+}
+
+TEST(path_util, PathRelPath_BufferOverflowSubdir)
+{
+ char abs_path_in[FILE_MAX];
+ const char *ref_path_in = ABS_PREFIX "/foo/bar/";
+ const size_t ref_path_in_len = strlen(ref_path_in);
+ for (int i = STRNCPY_RLEN(abs_path_in, ref_path_in); i < FILE_MAX - 1; i++) {
+ abs_path_in[i] = 'A';
}
+ abs_path_in[FILE_MAX - 1] = '\0';
+ char abs_path_out[FILE_MAX];
+ for (int i = STRNCPY_RLEN(abs_path_out, "//"); i < FILE_MAX - (int(ref_path_in_len) - 1); i++) {
+ abs_path_out[i] = 'A';
+ }
+ abs_path_out[FILE_MAX - std::max((ref_path_in_len - 1), size_t(1))] = '\0';
+ PATH_REL(abs_path_in, ref_path_in, abs_path_out);
}
-# undef PATH_REL
+#undef PATH_REL
+#undef ABS_PREFIX
-#endif
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Tests for: #BLI_path_contains
+ * \{ */
-/* BLI_path_contains */
TEST(path_util, PathContains)
{
EXPECT_TRUE(BLI_path_contains("/some/path", "/some/path")) << "A path contains itself";
@@ -731,4 +952,6 @@ TEST(path_util, PathContains_Windows_case_insensitive)
EXPECT_TRUE(BLI_path_contains("C:\\some\\path", "c:\\SOME\\path\\inside"))
<< "On Windows path comparison should ignore case";
}
-#endif
+#endif /* WIN32 */
+
+/** \} */
diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c
index e4a93762da4..cdb63bd8075 100644
--- a/source/blender/blenloader/intern/versioning_260.c
+++ b/source/blender/blenloader/intern/versioning_260.c
@@ -44,6 +44,7 @@
#include "BKE_image.h"
#include "BKE_main.h" /* for Main */
#include "BKE_mesh.h" /* for ME_ defines (patching) */
+#include "BKE_mesh_legacy_convert.h"
#include "BKE_modifier.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
diff --git a/source/blender/blenloader/intern/versioning_300.cc b/source/blender/blenloader/intern/versioning_300.cc
index a2bd7fd2fd1..65094655cfe 100644
--- a/source/blender/blenloader/intern/versioning_300.cc
+++ b/source/blender/blenloader/intern/versioning_300.cc
@@ -3653,6 +3653,25 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain)
}
}
+ if (!MAIN_VERSION_ATLEAST(bmain, 304, 6)) {
+ LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) {
+ if (ntree->type != NTREE_GEOMETRY) {
+ continue;
+ }
+ LISTBASE_FOREACH (bNode *, node, &ntree->nodes) {
+ if (node->type != GEO_NODE_SAMPLE_CURVE) {
+ continue;
+ }
+ static_cast<NodeGeometryCurveSample *>(node->storage)->use_all_curves = true;
+ static_cast<NodeGeometryCurveSample *>(node->storage)->data_type = CD_PROP_FLOAT;
+ bNodeSocket *curve_socket = nodeFindSocket(node, SOCK_IN, "Curve");
+ BLI_assert(curve_socket != nullptr);
+ STRNCPY(curve_socket->name, "Curves");
+ STRNCPY(curve_socket->identifier, "Curves");
+ }
+ }
+ }
+
/**
* Versioning code until next subversion bump goes here.
*
diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c
index 9a0568a3589..23d514a7b12 100644
--- a/source/blender/blenloader/intern/versioning_legacy.c
+++ b/source/blender/blenloader/intern/versioning_legacy.c
@@ -62,6 +62,7 @@
#include "BKE_object.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
+#include "BKE_mesh_legacy_convert.h"
#include "SEQ_iterator.h"
#include "SEQ_sequencer.h"
diff --git a/source/blender/bmesh/intern/bmesh_construct.c b/source/blender/bmesh/intern/bmesh_construct.c
index 8125130490a..cff8eb5a2f7 100644
--- a/source/blender/bmesh/intern/bmesh_construct.c
+++ b/source/blender/bmesh/intern/bmesh_construct.c
@@ -732,8 +732,7 @@ short BM_edge_flag_to_mflag(BMEdge *e)
return (((hflag & BM_ELEM_SEAM) ? ME_SEAM : 0) | ((hflag & BM_ELEM_DRAW) ? ME_EDGEDRAW : 0) |
((hflag & BM_ELEM_SMOOTH) == 0 ? ME_SHARP : 0) |
- (BM_edge_is_wire(e) ? ME_LOOSEEDGE : 0) | /* not typical */
- ME_EDGERENDER);
+ (BM_edge_is_wire(e) ? ME_LOOSEEDGE : 0));
}
char BM_face_flag_to_mflag(BMFace *f)
{
diff --git a/source/blender/bmesh/operators/bmo_bridge.c b/source/blender/bmesh/operators/bmo_bridge.c
index 8240fbc53c1..b6520fb48b3 100644
--- a/source/blender/bmesh/operators/bmo_bridge.c
+++ b/source/blender/bmesh/operators/bmo_bridge.c
@@ -14,6 +14,13 @@
#include "intern/bmesh_operators_private.h" /* own include */
+/**
+ * TODO(@campbellbarton): Many connected edge loops can cause an error attempting
+ * to create faces with duplicate vertices. While this needs to be investigated,
+ * it's simple enough to check for this case, see: T102232.
+ */
+#define USE_DUPLICATE_FACE_VERT_CHECK
+
#define EDGE_MARK 4
#define EDGE_OUT 8
#define FACE_OUT 16
@@ -386,61 +393,84 @@ static void bridge_loop_pair(BMesh *bm,
f_example = l_a ? l_a->f : (l_b ? l_b->f : NULL);
if (v_b != v_b_next) {
- BMVert *v_arr[4] = {v_b, v_b_next, v_a_next, v_a};
- f = BM_face_exists(v_arr, 4);
- if (f == NULL) {
- /* copy if loop data if its is missing on one ring */
- f = BM_face_create_verts(bm, v_arr, 4, NULL, BM_CREATE_NOP, true);
-
- l_iter = BM_FACE_FIRST_LOOP(f);
- if (l_b) {
- BM_elem_attrs_copy(bm, bm, l_b, l_iter);
- }
- l_iter = l_iter->next;
- if (l_b_next) {
- BM_elem_attrs_copy(bm, bm, l_b_next, l_iter);
- }
- l_iter = l_iter->next;
- if (l_a_next) {
- BM_elem_attrs_copy(bm, bm, l_a_next, l_iter);
- }
- l_iter = l_iter->next;
- if (l_a) {
- BM_elem_attrs_copy(bm, bm, l_a, l_iter);
+#ifdef USE_DUPLICATE_FACE_VERT_CHECK /* Only check for duplicates between loops. */
+ BLI_assert((v_b != v_b_next) && (v_a_next != v_a));
+ if (UNLIKELY(ELEM(v_b, v_a_next, v_a) || ELEM(v_b_next, v_a_next, v_a))) {
+ f = NULL;
+ }
+ else
+#endif
+ {
+ BMVert *v_arr[4] = {v_b, v_b_next, v_a_next, v_a};
+ f = BM_face_exists(v_arr, 4);
+ if (f == NULL) {
+ /* copy if loop data if its is missing on one ring */
+ f = BM_face_create_verts(bm, v_arr, 4, NULL, BM_CREATE_NOP, true);
+
+ l_iter = BM_FACE_FIRST_LOOP(f);
+ if (l_b) {
+ BM_elem_attrs_copy(bm, bm, l_b, l_iter);
+ }
+ l_iter = l_iter->next;
+ if (l_b_next) {
+ BM_elem_attrs_copy(bm, bm, l_b_next, l_iter);
+ }
+ l_iter = l_iter->next;
+ if (l_a_next) {
+ BM_elem_attrs_copy(bm, bm, l_a_next, l_iter);
+ }
+ l_iter = l_iter->next;
+ if (l_a) {
+ BM_elem_attrs_copy(bm, bm, l_a, l_iter);
+ }
}
}
}
else {
- BMVert *v_arr[3] = {v_b, v_a_next, v_a};
- f = BM_face_exists(v_arr, 3);
- if (f == NULL) {
- /* fan-fill a triangle */
- f = BM_face_create_verts(bm, v_arr, 3, NULL, BM_CREATE_NOP, true);
-
- l_iter = BM_FACE_FIRST_LOOP(f);
- if (l_b) {
- BM_elem_attrs_copy(bm, bm, l_b, l_iter);
- }
- l_iter = l_iter->next;
- if (l_a_next) {
- BM_elem_attrs_copy(bm, bm, l_a_next, l_iter);
- }
- l_iter = l_iter->next;
- if (l_a) {
- BM_elem_attrs_copy(bm, bm, l_a, l_iter);
+#ifdef USE_DUPLICATE_FACE_VERT_CHECK /* Only check for duplicates between loops. */
+ BLI_assert(v_a_next != v_a);
+ if (UNLIKELY(ELEM(v_b, v_a_next, v_a))) {
+ f = NULL;
+ }
+ else
+#endif
+ {
+ BMVert *v_arr[3] = {v_b, v_a_next, v_a};
+ f = BM_face_exists(v_arr, 3);
+ if (f == NULL) {
+ /* fan-fill a triangle */
+ f = BM_face_create_verts(bm, v_arr, 3, NULL, BM_CREATE_NOP, true);
+
+ l_iter = BM_FACE_FIRST_LOOP(f);
+ if (l_b) {
+ BM_elem_attrs_copy(bm, bm, l_b, l_iter);
+ }
+ l_iter = l_iter->next;
+ if (l_a_next) {
+ BM_elem_attrs_copy(bm, bm, l_a_next, l_iter);
+ }
+ l_iter = l_iter->next;
+ if (l_a) {
+ BM_elem_attrs_copy(bm, bm, l_a, l_iter);
+ }
}
}
}
- if (f_example && (f_example != f)) {
- BM_elem_attrs_copy(bm, bm, f_example, f);
- }
- BMO_face_flag_enable(bm, f, FACE_OUT);
- BM_elem_flag_enable(f, BM_ELEM_TAG);
+#ifdef USE_DUPLICATE_FACE_VERT_CHECK
+ if (f != NULL)
+#endif
+ {
+ if (f_example && (f_example != f)) {
+ BM_elem_attrs_copy(bm, bm, f_example, f);
+ }
+ BMO_face_flag_enable(bm, f, FACE_OUT);
+ BM_elem_flag_enable(f, BM_ELEM_TAG);
- /* tag all edges of the face, untag the loop edges after */
- if (use_edgeout) {
- bm_face_edges_tag_out(bm, f);
+ /* tag all edges of the face, untag the loop edges after */
+ if (use_edgeout) {
+ bm_face_edges_tag_out(bm, f);
+ }
}
if (el_a_next == el_a_first) {
diff --git a/source/blender/compositor/realtime_compositor/CMakeLists.txt b/source/blender/compositor/realtime_compositor/CMakeLists.txt
index bab0b5385ec..b4352248b5b 100644
--- a/source/blender/compositor/realtime_compositor/CMakeLists.txt
+++ b/source/blender/compositor/realtime_compositor/CMakeLists.txt
@@ -3,6 +3,7 @@
set(INC
.
algorithms
+ cached_resources
../../blenkernel
../../blenlib
../../gpu
@@ -10,6 +11,7 @@ set(INC
../../makesdna
../../makesrna
../../nodes
+ ../../render
../../gpu/intern
../../../../intern/guardedalloc
)
@@ -31,6 +33,7 @@ set(SRC
intern/shader_node.cc
intern/shader_operation.cc
intern/simple_operation.cc
+ intern/static_cache_manager.cc
intern/static_shader_manager.cc
intern/texture_pool.cc
intern/utilities.cc
@@ -51,6 +54,7 @@ set(SRC
COM_shader_node.hh
COM_shader_operation.hh
COM_simple_operation.hh
+ COM_static_cache_manager.hh
COM_static_shader_manager.hh
COM_texture_pool.hh
COM_utilities.hh
@@ -58,14 +62,149 @@ set(SRC
algorithms/intern/algorithm_parallel_reduction.cc
algorithms/COM_algorithm_parallel_reduction.hh
+
+ cached_resources/intern/morphological_distance_feather_weights.cc
+ cached_resources/intern/symmetric_blur_weights.cc
+ cached_resources/intern/symmetric_separable_blur_weights.cc
+
+ cached_resources/COM_cached_resource.hh
+ cached_resources/COM_morphological_distance_feather_weights.hh
+ cached_resources/COM_symmetric_blur_weights.hh
+ cached_resources/COM_symmetric_separable_blur_weights.hh
)
set(LIB
bf_gpu
bf_nodes
bf_imbuf
+ bf_render
bf_blenlib
bf_blenkernel
)
+set(GLSL_SRC
+ shaders/compositor_alpha_crop.glsl
+ shaders/compositor_bilateral_blur.glsl
+ shaders/compositor_blur.glsl
+ shaders/compositor_blur_variable_size.glsl
+ shaders/compositor_bokeh_image.glsl
+ shaders/compositor_box_mask.glsl
+ shaders/compositor_convert.glsl
+ shaders/compositor_despeckle.glsl
+ shaders/compositor_directional_blur.glsl
+ shaders/compositor_edge_filter.glsl
+ shaders/compositor_ellipse_mask.glsl
+ shaders/compositor_filter.glsl
+ shaders/compositor_flip.glsl
+ shaders/compositor_image_crop.glsl
+ shaders/compositor_morphological_distance.glsl
+ shaders/compositor_morphological_distance_feather.glsl
+ shaders/compositor_morphological_distance_threshold.glsl
+ shaders/compositor_morphological_step.glsl
+ shaders/compositor_normalize.glsl
+ shaders/compositor_parallel_reduction.glsl
+ shaders/compositor_projector_lens_distortion.glsl
+ shaders/compositor_realize_on_domain.glsl
+ shaders/compositor_screen_lens_distortion.glsl
+ shaders/compositor_set_alpha.glsl
+ shaders/compositor_split_viewer.glsl
+ shaders/compositor_symmetric_blur.glsl
+ shaders/compositor_symmetric_separable_blur.glsl
+ shaders/compositor_tone_map_photoreceptor.glsl
+ shaders/compositor_tone_map_simple.glsl
+
+ shaders/library/gpu_shader_compositor_alpha_over.glsl
+ shaders/library/gpu_shader_compositor_blur_common.glsl
+ shaders/library/gpu_shader_compositor_bright_contrast.glsl
+ shaders/library/gpu_shader_compositor_channel_matte.glsl
+ shaders/library/gpu_shader_compositor_chroma_matte.glsl
+ shaders/library/gpu_shader_compositor_color_balance.glsl
+ shaders/library/gpu_shader_compositor_color_correction.glsl
+ shaders/library/gpu_shader_compositor_color_matte.glsl
+ shaders/library/gpu_shader_compositor_color_spill.glsl
+ shaders/library/gpu_shader_compositor_color_to_luminance.glsl
+ shaders/library/gpu_shader_compositor_difference_matte.glsl
+ shaders/library/gpu_shader_compositor_distance_matte.glsl
+ shaders/library/gpu_shader_compositor_exposure.glsl
+ shaders/library/gpu_shader_compositor_gamma.glsl
+ shaders/library/gpu_shader_compositor_hue_correct.glsl
+ shaders/library/gpu_shader_compositor_hue_saturation_value.glsl
+ shaders/library/gpu_shader_compositor_invert.glsl
+ shaders/library/gpu_shader_compositor_luminance_matte.glsl
+ shaders/library/gpu_shader_compositor_main.glsl
+ shaders/library/gpu_shader_compositor_map_value.glsl
+ shaders/library/gpu_shader_compositor_normal.glsl
+ shaders/library/gpu_shader_compositor_posterize.glsl
+ shaders/library/gpu_shader_compositor_separate_combine.glsl
+ shaders/library/gpu_shader_compositor_set_alpha.glsl
+ shaders/library/gpu_shader_compositor_store_output.glsl
+ shaders/library/gpu_shader_compositor_texture_utilities.glsl
+ shaders/library/gpu_shader_compositor_type_conversion.glsl
+)
+
+set(GLSL_C)
+foreach(GLSL_FILE ${GLSL_SRC})
+ data_to_c_simple(${GLSL_FILE} GLSL_C)
+endforeach()
+
+blender_add_lib(bf_compositor_shaders "${GLSL_C}" "" "" "")
+
+list(APPEND LIB
+ bf_compositor_shaders
+)
+
+set(GLSL_SOURCE_CONTENT "")
+foreach(GLSL_FILE ${GLSL_SRC})
+ get_filename_component(GLSL_FILE_NAME ${GLSL_FILE} NAME)
+ string(REPLACE "." "_" GLSL_FILE_NAME_UNDERSCORES ${GLSL_FILE_NAME})
+ string(APPEND GLSL_SOURCE_CONTENT "SHADER_SOURCE\(datatoc_${GLSL_FILE_NAME_UNDERSCORES}, \"${GLSL_FILE_NAME}\", \"${GLSL_FILE}\"\)\n")
+endforeach()
+
+set(glsl_source_list_file "${CMAKE_CURRENT_BINARY_DIR}/glsl_compositor_source_list.h")
+file(GENERATE OUTPUT ${glsl_source_list_file} CONTENT "${GLSL_SOURCE_CONTENT}")
+list(APPEND SRC ${glsl_source_list_file})
+list(APPEND INC ${CMAKE_CURRENT_BINARY_DIR})
+
+target_include_directories(bf_compositor_shaders PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
+
+set(SRC_SHADER_CREATE_INFOS
+ shaders/infos/compositor_alpha_crop_info.hh
+ shaders/infos/compositor_bilateral_blur_info.hh
+ shaders/infos/compositor_blur_info.hh
+ shaders/infos/compositor_blur_variable_size_info.hh
+ shaders/infos/compositor_bokeh_image_info.hh
+ shaders/infos/compositor_box_mask_info.hh
+ shaders/infos/compositor_convert_info.hh
+ shaders/infos/compositor_despeckle_info.hh
+ shaders/infos/compositor_directional_blur_info.hh
+ shaders/infos/compositor_edge_filter_info.hh
+ shaders/infos/compositor_ellipse_mask_info.hh
+ shaders/infos/compositor_filter_info.hh
+ shaders/infos/compositor_flip_info.hh
+ shaders/infos/compositor_image_crop_info.hh
+ shaders/infos/compositor_morphological_distance_feather_info.hh
+ shaders/infos/compositor_morphological_distance_info.hh
+ shaders/infos/compositor_morphological_distance_threshold_info.hh
+ shaders/infos/compositor_morphological_step_info.hh
+ shaders/infos/compositor_normalize_info.hh
+ shaders/infos/compositor_parallel_reduction_info.hh
+ shaders/infos/compositor_projector_lens_distortion_info.hh
+ shaders/infos/compositor_realize_on_domain_info.hh
+ shaders/infos/compositor_screen_lens_distortion_info.hh
+ shaders/infos/compositor_set_alpha_info.hh
+ shaders/infos/compositor_split_viewer_info.hh
+ shaders/infos/compositor_symmetric_blur_info.hh
+ shaders/infos/compositor_symmetric_separable_blur_info.hh
+ shaders/infos/compositor_tone_map_photoreceptor_info.hh
+ shaders/infos/compositor_tone_map_simple_info.hh
+)
+
+set(SHADER_CREATE_INFOS_CONTENT "")
+foreach(DESCRIPTOR_FILE ${SRC_SHADER_CREATE_INFOS})
+ string(APPEND SHADER_CREATE_INFOS_CONTENT "#include \"${DESCRIPTOR_FILE}\"\n")
+endforeach()
+
+set(shader_create_info_list_file "${CMAKE_CURRENT_BINARY_DIR}/compositor_shader_create_info_list.hh")
+file(GENERATE OUTPUT ${shader_create_info_list_file} CONTENT "${SHADER_CREATE_INFOS_CONTENT}")
+
blender_add_lib(bf_realtime_compositor "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/compositor/realtime_compositor/COM_context.hh b/source/blender/compositor/realtime_compositor/COM_context.hh
index b5c8cea641f..80fb4f70ca4 100644
--- a/source/blender/compositor/realtime_compositor/COM_context.hh
+++ b/source/blender/compositor/realtime_compositor/COM_context.hh
@@ -9,6 +9,7 @@
#include "GPU_texture.h"
+#include "COM_static_cache_manager.hh"
#include "COM_static_shader_manager.hh"
#include "COM_texture_pool.hh"
@@ -22,14 +23,17 @@ namespace blender::realtime_compositor {
* providing input data like render passes and the active scene, as well as references to the data
* where the output of the evaluator will be written. The class also provides a reference to the
* texture pool which should be implemented by the caller and provided during construction.
- * Finally, the class have an instance of a static shader manager for convenient shader
- * acquisition. */
+ * Finally, the class have an instance of a static shader manager and a static resource manager
+ * for acquiring cached shaders and resources efficiently. */
class Context {
private:
/* A texture pool that can be used to allocate textures for the compositor efficiently. */
TexturePool &texture_pool_;
/* A static shader manager that can be used to acquire shaders for the compositor efficiently. */
StaticShaderManager shader_manager_;
+ /* A static cache manager that can be used to acquire cached resources for the compositor
+ * efficiently. */
+ StaticCacheManager cache_manager_;
public:
Context(TexturePool &texture_pool);
@@ -67,6 +71,9 @@ class Context {
/* Get a reference to the static shader manager of this context. */
StaticShaderManager &shader_manager();
+
+ /* Get a reference to the static cache manager of this context. */
+ StaticCacheManager &cache_manager();
};
} // namespace blender::realtime_compositor
diff --git a/source/blender/compositor/realtime_compositor/COM_result.hh b/source/blender/compositor/realtime_compositor/COM_result.hh
index a16d68bb92d..f5ecc4c2112 100644
--- a/source/blender/compositor/realtime_compositor/COM_result.hh
+++ b/source/blender/compositor/realtime_compositor/COM_result.hh
@@ -14,7 +14,9 @@
namespace blender::realtime_compositor {
/* Possible data types that operations can operate on. They either represent the base type of the
- * result texture or a single value result. */
+ * result texture or a single value result. The color type represents an RGBA color. And the vector
+ * type represents a generic 4-component vector, which can encode two 2D vectors, one 3D vector
+ * with the last component ignored, or other dimensional data. */
enum class ResultType : uint8_t {
Float,
Vector,
@@ -85,7 +87,7 @@ class Result {
* is a texture. */
union {
float float_value_;
- float3 vector_value_;
+ float4 vector_value_;
float4 color_value_;
};
/* The domain of the result. This only matters if the result was a texture. See the discussion in
@@ -157,7 +159,7 @@ class Result {
/* If the result is a single value result of type vector, return its vector value. Otherwise, an
* uninitialized value is returned. */
- float3 get_vector_value() const;
+ float4 get_vector_value() const;
/* If the result is a single value result of type color, return its color value. Otherwise, an
* uninitialized value is returned. */
@@ -167,7 +169,7 @@ class Result {
float get_float_value_default(float default_value) const;
/* Same as get_vector_value but returns a default value if the result is not a single value. */
- float3 get_vector_value_default(const float3 &default_value) const;
+ float4 get_vector_value_default(const float4 &default_value) const;
/* Same as get_color_value but returns a default value if the result is not a single value. */
float4 get_color_value_default(const float4 &default_value) const;
@@ -178,7 +180,7 @@ class Result {
/* If the result is a single value result of type vector, set its vector value and upload it to
* the texture. Otherwise, an undefined behavior is invoked. */
- void set_vector_value(const float3 &value);
+ void set_vector_value(const float4 &value);
/* If the result is a single value result of type color, set its color value and upload it to the
* texture. Otherwise, an undefined behavior is invoked. */
diff --git a/source/blender/compositor/realtime_compositor/COM_static_cache_manager.hh b/source/blender/compositor/realtime_compositor/COM_static_cache_manager.hh
new file mode 100644
index 00000000000..20fbb156879
--- /dev/null
+++ b/source/blender/compositor/realtime_compositor/COM_static_cache_manager.hh
@@ -0,0 +1,77 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#pragma once
+
+#include <memory>
+
+#include "BLI_map.hh"
+#include "BLI_math_vec_types.hh"
+
+#include "COM_morphological_distance_feather_weights.hh"
+#include "COM_symmetric_blur_weights.hh"
+#include "COM_symmetric_separable_blur_weights.hh"
+
+namespace blender::realtime_compositor {
+
+/* -------------------------------------------------------------------------------------------------
+ * Static Cache Manager
+ *
+ * A static cache manager is a collection of cached resources that can be retrieved when needed and
+ * created if not already available. In particular, each cached resource type has its own Map in
+ * the class, where all instances of that cached resource type are stored and tracked. See the
+ * CachedResource class for more information.
+ *
+ * The manager deletes the cached resources that are no longer needed. A cached resource is said to
+ * be not needed when it was not used in the previous evaluation. This is done through the
+ * following mechanism:
+ *
+ * - Before every evaluation, do the following:
+ * 1. All resources whose CachedResource::needed flag is false are deleted.
+ * 2. The CachedResource::needed flag of all remaining resources is set to false.
+ * - During evaluation, when retrieving any cached resource, set its CachedResource::needed flag to
+ * true.
+ *
+ * In effect, any resource that was used in the previous evaluation but was not used in the current
+ * evaluation will be deleted before the next evaluation. This mechanism is implemented in the
+ * reset() method of the class, which should be called before every evaluation. */
+class StaticCacheManager {
+ private:
+ /* A map that stores all SymmetricBlurWeights cached resources. */
+ Map<SymmetricBlurWeightsKey, std::unique_ptr<SymmetricBlurWeights>> symmetric_blur_weights_;
+
+ /* A map that stores all SymmetricSeparableBlurWeights cached resources. */
+ Map<SymmetricSeparableBlurWeightsKey, std::unique_ptr<SymmetricSeparableBlurWeights>>
+ symmetric_separable_blur_weights_;
+
+ /* A map that stores all MorphologicalDistanceFeatherWeights cached resources. */
+ Map<MorphologicalDistanceFeatherWeightsKey, std::unique_ptr<MorphologicalDistanceFeatherWeights>>
+ morphological_distance_feather_weights_;
+
+ public:
+ /* Reset the cache manager by deleting the cached resources that are no longer needed because
+ * they weren't used in the last evaluation and prepare the remaining cached resources to track
+ * their needed status in the next evaluation. See the class description for more information.
+ * This should be called before every evaluation. */
+ void reset();
+
+ /* Check if there is an available SymmetricBlurWeights cached resource with the given parameters
+ * in the manager, if one exists, return it, otherwise, return a newly created one and add it to
+ * the manager. In both cases, tag the cached resource as needed to keep it cached for the next
+ * evaluation. */
+ SymmetricBlurWeights &get_symmetric_blur_weights(int type, float2 radius);
+
+ /* Check if there is an available SymmetricSeparableBlurWeights cached resource with the given
+ * parameters in the manager, if one exists, return it, otherwise, return a newly created one and
+ * add it to the manager. In both cases, tag the cached resource as needed to keep it cached for
+ * the next evaluation. */
+ SymmetricSeparableBlurWeights &get_symmetric_separable_blur_weights(int type, float radius);
+
+ /* Check if there is an available MorphologicalDistanceFeatherWeights cached resource with the
+ * given parameters in the manager, if one exists, return it, otherwise, return a newly created
+ * one and add it to the manager. In both cases, tag the cached resource as needed to keep it
+ * cached for the next evaluation. */
+ MorphologicalDistanceFeatherWeights &get_morphological_distance_feather_weights(int type,
+ int radius);
+};
+
+} // namespace blender::realtime_compositor
diff --git a/source/blender/compositor/realtime_compositor/COM_texture_pool.hh b/source/blender/compositor/realtime_compositor/COM_texture_pool.hh
index cc6641d288f..c68219b0279 100644
--- a/source/blender/compositor/realtime_compositor/COM_texture_pool.hh
+++ b/source/blender/compositor/realtime_compositor/COM_texture_pool.hh
@@ -60,8 +60,8 @@ class TexturePool {
/* Shorthand for acquire with GPU_RGBA16F format. */
GPUTexture *acquire_color(int2 size);
- /* Shorthand for acquire with GPU_RGBA16F format. Identical to acquire_color because vectors
- * are stored in RGBA textures, due to the limited support for RGB textures. */
+ /* Shorthand for acquire with GPU_RGBA16F format. Identical to acquire_color because vectors are
+ * 4D, and are thus stored in RGBA textures. */
GPUTexture *acquire_vector(int2 size);
/* Shorthand for acquire with GPU_R16F format. */
diff --git a/source/blender/compositor/realtime_compositor/cached_resources/COM_cached_resource.hh b/source/blender/compositor/realtime_compositor/cached_resources/COM_cached_resource.hh
new file mode 100644
index 00000000000..fe3158ef52d
--- /dev/null
+++ b/source/blender/compositor/realtime_compositor/cached_resources/COM_cached_resource.hh
@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#pragma once
+
+namespace blender::realtime_compositor {
+
+/* -------------------------------------------------------------------------------------------------
+ * Cached Resource.
+ *
+ * A cached resource is any resource that can be cached across compositor evaluations and across
+ * multiple operations. Cached resources are managed by an instance of a StaticCacheManager and are
+ * freed when they are no longer needed, a state which is represented by the `needed` member in the
+ * class. For more information on the caching mechanism, see the StaticCacheManager class.
+ *
+ * To add a new cached resource:
+ *
+ * - Create a derived class from CachedResource to represent the resource.
+ * - Create a key class that can be used in a Map to identify the resource.
+ * - Add a new Map to StaticCacheManager mapping the key to the resource.
+ * - Reset the contents of the added map in StaticCacheManager::reset.
+ * - Add an appropriate getter method in StaticCacheManager.
+ *
+ * See the existing cached resources for reference. */
+class CachedResource {
+ public:
+ /* A flag that represents the needed status of the cached resource. See the StaticCacheManager
+ * class for more information on how this member is utilized in the caching mechanism. */
+ bool needed = true;
+};
+
+} // namespace blender::realtime_compositor
diff --git a/source/blender/compositor/realtime_compositor/cached_resources/COM_morphological_distance_feather_weights.hh b/source/blender/compositor/realtime_compositor/cached_resources/COM_morphological_distance_feather_weights.hh
new file mode 100644
index 00000000000..cd6827bdd6b
--- /dev/null
+++ b/source/blender/compositor/realtime_compositor/cached_resources/COM_morphological_distance_feather_weights.hh
@@ -0,0 +1,61 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#pragma once
+
+#include <cstdint>
+
+#include "GPU_shader.h"
+#include "GPU_texture.h"
+
+#include "COM_cached_resource.hh"
+
+namespace blender::realtime_compositor {
+
+/* ------------------------------------------------------------------------------------------------
+ * Morphological Distance Feather Key.
+ */
+class MorphologicalDistanceFeatherWeightsKey {
+ public:
+ int type;
+ float radius;
+
+ MorphologicalDistanceFeatherWeightsKey(int type, float radius);
+
+ uint64_t hash() const;
+};
+
+bool operator==(const MorphologicalDistanceFeatherWeightsKey &a,
+ const MorphologicalDistanceFeatherWeightsKey &b);
+
+/* -------------------------------------------------------------------------------------------------
+ * Morphological Distance Feather Weights.
+ *
+ * A cached resource that computes and caches 1D GPU textures containing the weights of the
+ * separable Gaussian filter of the given radius as well as an inverse distance falloff of the
+ * given type and radius. The weights and falloffs are symmetric, because the Gaussian and falloff
+ * functions are all even functions. Consequently, only the positive half of the filter is computed
+ * and the shader takes that into consideration. */
+class MorphologicalDistanceFeatherWeights : public CachedResource {
+ private:
+ GPUTexture *weights_texture_ = nullptr;
+ GPUTexture *distance_falloffs_texture_ = nullptr;
+
+ public:
+ MorphologicalDistanceFeatherWeights(int type, int radius);
+
+ ~MorphologicalDistanceFeatherWeights();
+
+ void compute_weights(int radius);
+
+ void compute_distance_falloffs(int type, int radius);
+
+ void bind_weights_as_texture(GPUShader *shader, const char *texture_name) const;
+
+ void unbind_weights_as_texture() const;
+
+ void bind_distance_falloffs_as_texture(GPUShader *shader, const char *texture_name) const;
+
+ void unbind_distance_falloffs_as_texture() const;
+};
+
+} // namespace blender::realtime_compositor
diff --git a/source/blender/compositor/realtime_compositor/cached_resources/COM_symmetric_blur_weights.hh b/source/blender/compositor/realtime_compositor/cached_resources/COM_symmetric_blur_weights.hh
new file mode 100644
index 00000000000..05d3c7c6f3e
--- /dev/null
+++ b/source/blender/compositor/realtime_compositor/cached_resources/COM_symmetric_blur_weights.hh
@@ -0,0 +1,52 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#pragma once
+
+#include <cstdint>
+
+#include "BLI_math_vec_types.hh"
+
+#include "GPU_shader.h"
+#include "GPU_texture.h"
+
+#include "COM_cached_resource.hh"
+
+namespace blender::realtime_compositor {
+
+/* ------------------------------------------------------------------------------------------------
+ * Symmetric Blur Weights Key.
+ */
+class SymmetricBlurWeightsKey {
+ public:
+ int type;
+ float2 radius;
+
+ SymmetricBlurWeightsKey(int type, float2 radius);
+
+ uint64_t hash() const;
+};
+
+bool operator==(const SymmetricBlurWeightsKey &a, const SymmetricBlurWeightsKey &b);
+
+/* -------------------------------------------------------------------------------------------------
+ * Symmetric Blur Weights.
+ *
+ * A cached resource that computes and caches a 2D GPU texture containing the weights of the filter
+ * of the given type and radius. The filter is assumed to be symmetric, because the filter
+ * functions are evaluated on the normalized distance to the center. Consequently, only the upper
+ * right quadrant are computed and the shader takes that into consideration. */
+class SymmetricBlurWeights : public CachedResource {
+ private:
+ GPUTexture *texture_ = nullptr;
+
+ public:
+ SymmetricBlurWeights(int type, float2 radius);
+
+ ~SymmetricBlurWeights();
+
+ void bind_as_texture(GPUShader *shader, const char *texture_name) const;
+
+ void unbind_as_texture() const;
+};
+
+} // namespace blender::realtime_compositor
diff --git a/source/blender/compositor/realtime_compositor/cached_resources/COM_symmetric_separable_blur_weights.hh b/source/blender/compositor/realtime_compositor/cached_resources/COM_symmetric_separable_blur_weights.hh
new file mode 100644
index 00000000000..85e75e4535d
--- /dev/null
+++ b/source/blender/compositor/realtime_compositor/cached_resources/COM_symmetric_separable_blur_weights.hh
@@ -0,0 +1,53 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#pragma once
+
+#include <cstdint>
+
+#include "BLI_math_vec_types.hh"
+
+#include "GPU_shader.h"
+#include "GPU_texture.h"
+
+#include "COM_cached_resource.hh"
+
+namespace blender::realtime_compositor {
+
+/* ------------------------------------------------------------------------------------------------
+ * Symmetric Separable Blur Weights Key.
+ */
+class SymmetricSeparableBlurWeightsKey {
+ public:
+ int type;
+ float radius;
+
+ SymmetricSeparableBlurWeightsKey(int type, float radius);
+
+ uint64_t hash() const;
+};
+
+bool operator==(const SymmetricSeparableBlurWeightsKey &a,
+ const SymmetricSeparableBlurWeightsKey &b);
+
+/* -------------------------------------------------------------------------------------------------
+ * Symmetric Separable Blur Weights.
+ *
+ * A cached resource that computes and caches a 1D GPU texture containing the weights of the
+ * separable filter of the given type and radius. The filter is assumed to be symmetric, because
+ * the filter functions are all even functions. Consequently, only the positive half of the filter
+ * is computed and the shader takes that into consideration. */
+class SymmetricSeparableBlurWeights : public CachedResource {
+ private:
+ GPUTexture *texture_ = nullptr;
+
+ public:
+ SymmetricSeparableBlurWeights(int type, float radius);
+
+ ~SymmetricSeparableBlurWeights();
+
+ void bind_as_texture(GPUShader *shader, const char *texture_name) const;
+
+ void unbind_as_texture() const;
+};
+
+} // namespace blender::realtime_compositor
diff --git a/source/blender/compositor/realtime_compositor/cached_resources/intern/morphological_distance_feather_weights.cc b/source/blender/compositor/realtime_compositor/cached_resources/intern/morphological_distance_feather_weights.cc
new file mode 100644
index 00000000000..eac88b907b8
--- /dev/null
+++ b/source/blender/compositor/realtime_compositor/cached_resources/intern/morphological_distance_feather_weights.cc
@@ -0,0 +1,159 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <cmath>
+#include <cstdint>
+
+#include "BLI_array.hh"
+#include "BLI_hash.hh"
+#include "BLI_index_range.hh"
+
+#include "RE_pipeline.h"
+
+#include "DNA_scene_types.h"
+
+#include "GPU_shader.h"
+#include "GPU_texture.h"
+
+#include "COM_morphological_distance_feather_weights.hh"
+
+namespace blender::realtime_compositor {
+
+/* --------------------------------------------------------------------
+ * Morphological Distance Feather Weights Key.
+ */
+
+MorphologicalDistanceFeatherWeightsKey::MorphologicalDistanceFeatherWeightsKey(int type,
+ float radius)
+ : type(type), radius(radius)
+{
+}
+
+uint64_t MorphologicalDistanceFeatherWeightsKey::hash() const
+{
+ return get_default_hash_2(type, radius);
+}
+
+bool operator==(const MorphologicalDistanceFeatherWeightsKey &a,
+ const MorphologicalDistanceFeatherWeightsKey &b)
+{
+ return a.type == b.type && a.radius == b.radius;
+}
+
+/* --------------------------------------------------------------------
+ * Morphological Distance Feather Weights.
+ */
+
+MorphologicalDistanceFeatherWeights::MorphologicalDistanceFeatherWeights(int type, int radius)
+{
+ compute_weights(radius);
+ compute_distance_falloffs(type, radius);
+}
+
+MorphologicalDistanceFeatherWeights::~MorphologicalDistanceFeatherWeights()
+{
+ GPU_texture_free(weights_texture_);
+ GPU_texture_free(distance_falloffs_texture_);
+}
+
+void MorphologicalDistanceFeatherWeights::compute_weights(int radius)
+{
+ /* The size of filter is double the radius plus 1, but since the filter is symmetric, we only
+ * compute half of it and no doubling happens. We add 1 to make sure the filter size is always
+ * odd and there is a center weight. */
+ const int size = radius + 1;
+ Array<float> weights(size);
+
+ float sum = 0.0f;
+
+ /* First, compute the center weight. */
+ const float center_weight = RE_filter_value(R_FILTER_GAUSS, 0.0f);
+ weights[0] = center_weight;
+ sum += center_weight;
+
+ /* Second, compute the other weights in the positive direction, making sure to add double the
+ * weight to the sum of weights because the filter is symmetric and we only loop over half of
+ * it. Skip the center weight already computed by dropping the front index. */
+ const float scale = radius > 0.0f ? 1.0f / radius : 0.0f;
+ for (const int i : weights.index_range().drop_front(1)) {
+ const float weight = RE_filter_value(R_FILTER_GAUSS, i * scale);
+ weights[i] = weight;
+ sum += weight * 2.0f;
+ }
+
+ /* Finally, normalize the weights. */
+ for (const int i : weights.index_range()) {
+ weights[i] /= sum;
+ }
+
+ weights_texture_ = GPU_texture_create_1d("Weights", size, 1, GPU_R16F, weights.data());
+}
+
+/* Computes a falloff that is equal to 1 at an input of zero and decrease to zero at an input of 1,
+ * with the rate of decrease depending on the falloff type. */
+static float compute_distance_falloff(int type, float x)
+{
+ x = 1.0f - x;
+
+ switch (type) {
+ case PROP_SMOOTH:
+ return 3.0f * x * x - 2.0f * x * x * x;
+ case PROP_SPHERE:
+ return std::sqrt(2.0f * x - x * x);
+ case PROP_ROOT:
+ return std::sqrt(x);
+ case PROP_SHARP:
+ return x * x;
+ case PROP_INVSQUARE:
+ return x * (2.0f - x);
+ case PROP_LIN:
+ return x;
+ default:
+ BLI_assert_unreachable();
+ return x;
+ }
+}
+
+void MorphologicalDistanceFeatherWeights::compute_distance_falloffs(int type, int radius)
+{
+ /* The size of the distance falloffs is double the radius plus 1, but since the falloffs are
+ * symmetric, we only compute half of them and no doubling happens. We add 1 to make sure the
+ * falloffs size is always odd and there is a center falloff. */
+ const int size = radius + 1;
+ Array<float> falloffs(size);
+
+ /* Compute the distance falloffs in the positive direction only, because the falloffs are
+ * symmetric. */
+ const float scale = radius > 0.0f ? 1.0f / radius : 0.0f;
+ for (const int i : falloffs.index_range()) {
+ falloffs[i] = compute_distance_falloff(type, i * scale);
+ }
+
+ distance_falloffs_texture_ = GPU_texture_create_1d(
+ "Distance Factors", size, 1, GPU_R16F, falloffs.data());
+}
+
+void MorphologicalDistanceFeatherWeights::bind_weights_as_texture(GPUShader *shader,
+ const char *texture_name) const
+{
+ const int texture_image_unit = GPU_shader_get_texture_binding(shader, texture_name);
+ GPU_texture_bind(weights_texture_, texture_image_unit);
+}
+
+void MorphologicalDistanceFeatherWeights::unbind_weights_as_texture() const
+{
+ GPU_texture_unbind(weights_texture_);
+}
+
+void MorphologicalDistanceFeatherWeights::bind_distance_falloffs_as_texture(
+ GPUShader *shader, const char *texture_name) const
+{
+ const int texture_image_unit = GPU_shader_get_texture_binding(shader, texture_name);
+ GPU_texture_bind(distance_falloffs_texture_, texture_image_unit);
+}
+
+void MorphologicalDistanceFeatherWeights::unbind_distance_falloffs_as_texture() const
+{
+ GPU_texture_unbind(distance_falloffs_texture_);
+}
+
+} // namespace blender::realtime_compositor
diff --git a/source/blender/compositor/realtime_compositor/cached_resources/intern/symmetric_blur_weights.cc b/source/blender/compositor/realtime_compositor/cached_resources/intern/symmetric_blur_weights.cc
new file mode 100644
index 00000000000..a22d32a8e18
--- /dev/null
+++ b/source/blender/compositor/realtime_compositor/cached_resources/intern/symmetric_blur_weights.cc
@@ -0,0 +1,115 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <cstdint>
+
+#include "BLI_array.hh"
+#include "BLI_hash.hh"
+#include "BLI_index_range.hh"
+#include "BLI_math_vec_types.hh"
+#include "BLI_math_vector.hh"
+
+#include "RE_pipeline.h"
+
+#include "GPU_shader.h"
+#include "GPU_texture.h"
+
+#include "COM_symmetric_blur_weights.hh"
+
+namespace blender::realtime_compositor {
+
+/* --------------------------------------------------------------------
+ * Symmetric Blur Weights Key.
+ */
+
+SymmetricBlurWeightsKey::SymmetricBlurWeightsKey(int type, float2 radius)
+ : type(type), radius(radius)
+{
+}
+
+uint64_t SymmetricBlurWeightsKey::hash() const
+{
+ return get_default_hash_3(type, radius.x, radius.y);
+}
+
+bool operator==(const SymmetricBlurWeightsKey &a, const SymmetricBlurWeightsKey &b)
+{
+ return a.type == b.type && a.radius == b.radius;
+}
+
+/* --------------------------------------------------------------------
+ * Symmetric Blur Weights.
+ */
+
+SymmetricBlurWeights::SymmetricBlurWeights(int type, float2 radius)
+{
+ /* The full size of filter is double the radius plus 1, but since the filter is symmetric, we
+ * only compute a single quadrant of it and so no doubling happens. We add 1 to make sure the
+ * filter size is always odd and there is a center weight. */
+ const float2 scale = math::safe_divide(float2(1.0f), radius);
+ const int2 size = int2(math::ceil(radius)) + int2(1);
+ Array<float> weights(size.x * size.y);
+
+ float sum = 0.0f;
+
+ /* First, compute the center weight. */
+ const float center_weight = RE_filter_value(type, 0.0f);
+ weights[0] = center_weight;
+ sum += center_weight;
+
+ /* Then, compute the weights along the positive x axis, making sure to add double the weight to
+ * the sum of weights because the filter is symmetric and we only loop over the positive half
+ * of the x axis. Skip the center weight already computed by dropping the front index. */
+ for (const int x : IndexRange(size.x).drop_front(1)) {
+ const float weight = RE_filter_value(type, x * scale.x);
+ weights[x] = weight;
+ sum += weight * 2.0f;
+ }
+
+ /* Then, compute the weights along the positive y axis, making sure to add double the weight to
+ * the sum of weights because the filter is symmetric and we only loop over the positive half
+ * of the y axis. Skip the center weight already computed by dropping the front index. */
+ for (const int y : IndexRange(size.y).drop_front(1)) {
+ const float weight = RE_filter_value(type, y * scale.y);
+ weights[size.x * y] = weight;
+ sum += weight * 2.0f;
+ }
+
+ /* Then, compute the other weights in the upper right quadrant, making sure to add quadruple
+ * the weight to the sum of weights because the filter is symmetric and we only loop over one
+ * quadrant of it. Skip the weights along the y and x axis already computed by dropping the
+ * front index. */
+ for (const int y : IndexRange(size.y).drop_front(1)) {
+ for (const int x : IndexRange(size.x).drop_front(1)) {
+ const float weight = RE_filter_value(type, math::length(float2(x, y) * scale));
+ weights[size.x * y + x] = weight;
+ sum += weight * 4.0f;
+ }
+ }
+
+ /* Finally, normalize the weights. */
+ for (const int y : IndexRange(size.y)) {
+ for (const int x : IndexRange(size.x)) {
+ weights[size.x * y + x] /= sum;
+ }
+ }
+
+ texture_ = GPU_texture_create_2d("Weights", size.x, size.y, 1, GPU_R16F, weights.data());
+}
+
+SymmetricBlurWeights::~SymmetricBlurWeights()
+{
+ GPU_texture_free(texture_);
+}
+
+void SymmetricBlurWeights::bind_as_texture(GPUShader *shader, const char *texture_name) const
+{
+ const int texture_image_unit = GPU_shader_get_texture_binding(shader, texture_name);
+ GPU_texture_bind(texture_, texture_image_unit);
+}
+
+void SymmetricBlurWeights::unbind_as_texture() const
+{
+ GPU_texture_unbind(texture_);
+}
+
+} // namespace blender::realtime_compositor
diff --git a/source/blender/compositor/realtime_compositor/cached_resources/intern/symmetric_separable_blur_weights.cc b/source/blender/compositor/realtime_compositor/cached_resources/intern/symmetric_separable_blur_weights.cc
new file mode 100644
index 00000000000..b8c47d5a5d0
--- /dev/null
+++ b/source/blender/compositor/realtime_compositor/cached_resources/intern/symmetric_separable_blur_weights.cc
@@ -0,0 +1,93 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <cstdint>
+
+#include "BLI_array.hh"
+#include "BLI_hash.hh"
+#include "BLI_index_range.hh"
+#include "BLI_math_base.hh"
+
+#include "RE_pipeline.h"
+
+#include "GPU_shader.h"
+#include "GPU_texture.h"
+
+#include "COM_symmetric_separable_blur_weights.hh"
+
+namespace blender::realtime_compositor {
+
+/* --------------------------------------------------------------------
+ * Symmetric Separable Blur Weights Key.
+ */
+
+SymmetricSeparableBlurWeightsKey::SymmetricSeparableBlurWeightsKey(int type, float radius)
+ : type(type), radius(radius)
+{
+}
+
+uint64_t SymmetricSeparableBlurWeightsKey::hash() const
+{
+ return get_default_hash_2(type, radius);
+}
+
+bool operator==(const SymmetricSeparableBlurWeightsKey &a,
+ const SymmetricSeparableBlurWeightsKey &b)
+{
+ return a.type == b.type && a.radius == b.radius;
+}
+
+/* --------------------------------------------------------------------
+ * Symmetric Separable Blur Weights.
+ */
+
+SymmetricSeparableBlurWeights::SymmetricSeparableBlurWeights(int type, float radius)
+{
+ /* The size of filter is double the radius plus 1, but since the filter is symmetric, we only
+ * compute half of it and no doubling happens. We add 1 to make sure the filter size is always
+ * odd and there is a center weight. */
+ const int size = math::ceil(radius) + 1;
+ Array<float> weights(size);
+
+ float sum = 0.0f;
+
+ /* First, compute the center weight. */
+ const float center_weight = RE_filter_value(type, 0.0f);
+ weights[0] = center_weight;
+ sum += center_weight;
+
+ /* Second, compute the other weights in the positive direction, making sure to add double the
+ * weight to the sum of weights because the filter is symmetric and we only loop over half of
+ * it. Skip the center weight already computed by dropping the front index. */
+ const float scale = radius > 0.0f ? 1.0f / radius : 0.0f;
+ for (const int i : weights.index_range().drop_front(1)) {
+ const float weight = RE_filter_value(type, i * scale);
+ weights[i] = weight;
+ sum += weight * 2.0f;
+ }
+
+ /* Finally, normalize the weights. */
+ for (const int i : weights.index_range()) {
+ weights[i] /= sum;
+ }
+
+ texture_ = GPU_texture_create_1d("Weights", size, 1, GPU_R16F, weights.data());
+}
+
+SymmetricSeparableBlurWeights::~SymmetricSeparableBlurWeights()
+{
+ GPU_texture_free(texture_);
+}
+
+void SymmetricSeparableBlurWeights::bind_as_texture(GPUShader *shader,
+ const char *texture_name) const
+{
+ const int texture_image_unit = GPU_shader_get_texture_binding(shader, texture_name);
+ GPU_texture_bind(texture_, texture_image_unit);
+}
+
+void SymmetricSeparableBlurWeights::unbind_as_texture() const
+{
+ GPU_texture_unbind(texture_);
+}
+
+} // namespace blender::realtime_compositor
diff --git a/source/blender/compositor/realtime_compositor/intern/context.cc b/source/blender/compositor/realtime_compositor/intern/context.cc
index 924398f6747..0b123a2c271 100644
--- a/source/blender/compositor/realtime_compositor/intern/context.cc
+++ b/source/blender/compositor/realtime_compositor/intern/context.cc
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "COM_context.hh"
+#include "COM_static_cache_manager.hh"
#include "COM_static_shader_manager.hh"
#include "COM_texture_pool.hh"
@@ -32,4 +33,9 @@ StaticShaderManager &Context::shader_manager()
return shader_manager_;
}
+StaticCacheManager &Context::cache_manager()
+{
+ return cache_manager_;
+}
+
} // namespace blender::realtime_compositor
diff --git a/source/blender/compositor/realtime_compositor/intern/conversion_operation.cc b/source/blender/compositor/realtime_compositor/intern/conversion_operation.cc
index 3743b9bba87..dd585aedec6 100644
--- a/source/blender/compositor/realtime_compositor/intern/conversion_operation.cc
+++ b/source/blender/compositor/realtime_compositor/intern/conversion_operation.cc
@@ -96,7 +96,7 @@ ConvertFloatToVectorOperation::ConvertFloatToVectorOperation(Context &context)
void ConvertFloatToVectorOperation::execute_single(const Result &input, Result &output)
{
- output.set_vector_value(float3(input.get_float_value()));
+ output.set_vector_value(float4(float3(input.get_float_value()), 0.0f));
}
GPUShader *ConvertFloatToVectorOperation::get_conversion_shader() const
@@ -175,7 +175,7 @@ ConvertColorToVectorOperation::ConvertColorToVectorOperation(Context &context)
void ConvertColorToVectorOperation::execute_single(const Result &input, Result &output)
{
float4 color = input.get_color_value();
- output.set_vector_value(float3(color));
+ output.set_vector_value(float4(float3(color), 0.0f));
}
GPUShader *ConvertColorToVectorOperation::get_conversion_shader() const
@@ -200,7 +200,7 @@ ConvertVectorToFloatOperation::ConvertVectorToFloatOperation(Context &context)
void ConvertVectorToFloatOperation::execute_single(const Result &input, Result &output)
{
- float3 vector = input.get_vector_value();
+ float4 vector = input.get_vector_value();
output.set_float_value((vector[0] + vector[1] + vector[2]) / 3.0f);
}
@@ -226,7 +226,7 @@ ConvertVectorToColorOperation::ConvertVectorToColorOperation(Context &context)
void ConvertVectorToColorOperation::execute_single(const Result &input, Result &output)
{
- output.set_color_value(float4(input.get_vector_value(), 1.0f));
+ output.set_color_value(float4(float3(input.get_vector_value()), 1.0f));
}
GPUShader *ConvertVectorToColorOperation::get_conversion_shader() const
diff --git a/source/blender/compositor/realtime_compositor/intern/evaluator.cc b/source/blender/compositor/realtime_compositor/intern/evaluator.cc
index 48457bec199..1cd7d4f8951 100644
--- a/source/blender/compositor/realtime_compositor/intern/evaluator.cc
+++ b/source/blender/compositor/realtime_compositor/intern/evaluator.cc
@@ -28,6 +28,7 @@ Evaluator::Evaluator(Context &context, bNodeTree &node_tree)
void Evaluator::evaluate()
{
+ context_.cache_manager().reset();
context_.texture_pool().reset();
if (!is_compiled_) {
diff --git a/source/blender/compositor/realtime_compositor/intern/input_single_value_operation.cc b/source/blender/compositor/realtime_compositor/intern/input_single_value_operation.cc
index b3cc86b5f79..99f7cd90557 100644
--- a/source/blender/compositor/realtime_compositor/intern/input_single_value_operation.cc
+++ b/source/blender/compositor/realtime_compositor/intern/input_single_value_operation.cc
@@ -38,7 +38,7 @@ void InputSingleValueOperation::execute()
break;
case ResultType::Vector:
result.set_vector_value(
- float3(bsocket->default_value_typed<bNodeSocketValueVector>()->value));
+ float4(float3(bsocket->default_value_typed<bNodeSocketValueVector>()->value), 0.0f));
break;
case ResultType::Color:
result.set_color_value(float4(bsocket->default_value_typed<bNodeSocketValueRGBA>()->value));
diff --git a/source/blender/compositor/realtime_compositor/intern/result.cc b/source/blender/compositor/realtime_compositor/intern/result.cc
index 8059367d211..d89f1c86167 100644
--- a/source/blender/compositor/realtime_compositor/intern/result.cc
+++ b/source/blender/compositor/realtime_compositor/intern/result.cc
@@ -62,7 +62,7 @@ void Result::allocate_invalid()
set_float_value(0.0f);
break;
case ResultType::Vector:
- set_vector_value(float3(0.0f));
+ set_vector_value(float4(0.0f));
break;
case ResultType::Color:
set_color_value(float4(0.0f));
@@ -125,7 +125,7 @@ float Result::get_float_value() const
return float_value_;
}
-float3 Result::get_vector_value() const
+float4 Result::get_vector_value() const
{
return vector_value_;
}
@@ -143,7 +143,7 @@ float Result::get_float_value_default(float default_value) const
return default_value;
}
-float3 Result::get_vector_value_default(const float3 &default_value) const
+float4 Result::get_vector_value_default(const float4 &default_value) const
{
if (is_single_value()) {
return get_vector_value();
@@ -165,7 +165,7 @@ void Result::set_float_value(float value)
GPU_texture_update(texture_, GPU_DATA_FLOAT, &float_value_);
}
-void Result::set_vector_value(const float3 &value)
+void Result::set_vector_value(const float4 &value)
{
vector_value_ = value;
GPU_texture_update(texture_, GPU_DATA_FLOAT, vector_value_);
diff --git a/source/blender/compositor/realtime_compositor/intern/static_cache_manager.cc b/source/blender/compositor/realtime_compositor/intern/static_cache_manager.cc
new file mode 100644
index 00000000000..da78412a815
--- /dev/null
+++ b/source/blender/compositor/realtime_compositor/intern/static_cache_manager.cc
@@ -0,0 +1,74 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <memory>
+
+#include "BLI_math_vec_types.hh"
+
+#include "COM_morphological_distance_feather_weights.hh"
+#include "COM_symmetric_blur_weights.hh"
+#include "COM_symmetric_separable_blur_weights.hh"
+
+#include "COM_static_cache_manager.hh"
+
+namespace blender::realtime_compositor {
+
+/* --------------------------------------------------------------------
+ * Static Cache Manager.
+ */
+
+void StaticCacheManager::reset()
+{
+ /* First, delete all resources that are no longer needed. */
+ symmetric_blur_weights_.remove_if([](auto item) { return !item.value->needed; });
+ symmetric_separable_blur_weights_.remove_if([](auto item) { return !item.value->needed; });
+ morphological_distance_feather_weights_.remove_if([](auto item) { return !item.value->needed; });
+
+ /* Second, reset the needed status of the remaining resources to false to ready them to track
+ * their needed status for the next evaluation. */
+ for (auto &value : symmetric_blur_weights_.values()) {
+ value->needed = false;
+ }
+ for (auto &value : symmetric_separable_blur_weights_.values()) {
+ value->needed = false;
+ }
+ for (auto &value : morphological_distance_feather_weights_.values()) {
+ value->needed = false;
+ }
+}
+
+SymmetricBlurWeights &StaticCacheManager::get_symmetric_blur_weights(int type, float2 radius)
+{
+ const SymmetricBlurWeightsKey key(type, radius);
+
+ auto &weights = *symmetric_blur_weights_.lookup_or_add_cb(
+ key, [&]() { return std::make_unique<SymmetricBlurWeights>(type, radius); });
+
+ weights.needed = true;
+ return weights;
+}
+
+SymmetricSeparableBlurWeights &StaticCacheManager::get_symmetric_separable_blur_weights(
+ int type, float radius)
+{
+ const SymmetricSeparableBlurWeightsKey key(type, radius);
+
+ auto &weights = *symmetric_separable_blur_weights_.lookup_or_add_cb(
+ key, [&]() { return std::make_unique<SymmetricSeparableBlurWeights>(type, radius); });
+
+ weights.needed = true;
+ return weights;
+}
+
+MorphologicalDistanceFeatherWeights &StaticCacheManager::
+ get_morphological_distance_feather_weights(int type, int radius)
+{
+ const MorphologicalDistanceFeatherWeightsKey key(type, radius);
+
+ auto &weights = *morphological_distance_feather_weights_.lookup_or_add_cb(
+ key, [&]() { return std::make_unique<MorphologicalDistanceFeatherWeights>(type, radius); });
+
+ weights.needed = true;
+ return weights;
+}
+
+} // namespace blender::realtime_compositor
diff --git a/source/blender/compositor/realtime_compositor/intern/texture_pool.cc b/source/blender/compositor/realtime_compositor/intern/texture_pool.cc
index 6bf2041e6ba..4b476574d72 100644
--- a/source/blender/compositor/realtime_compositor/intern/texture_pool.cc
+++ b/source/blender/compositor/realtime_compositor/intern/texture_pool.cc
@@ -64,7 +64,7 @@ GPUTexture *TexturePool::acquire_color(int2 size)
GPUTexture *TexturePool::acquire_vector(int2 size)
{
- /* Vectors are stored in RGBA textures because RGB textures have limited support. */
+ /* Vectors are 4D, and are thus stored in RGBA textures. */
return acquire(size, GPU_RGBA16F);
}
diff --git a/source/blender/gpu/shaders/compositor/compositor_alpha_crop.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_alpha_crop.glsl
index d55c8efd4c6..d55c8efd4c6 100644
--- a/source/blender/gpu/shaders/compositor/compositor_alpha_crop.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_alpha_crop.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_bilateral_blur.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_bilateral_blur.glsl
index c7c5ada7a9f..c7c5ada7a9f 100644
--- a/source/blender/gpu/shaders/compositor/compositor_bilateral_blur.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_bilateral_blur.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_blur.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_blur.glsl
index c7ac620f99b..c7ac620f99b 100644
--- a/source/blender/gpu/shaders/compositor/compositor_blur.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_blur.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_blur_variable_size.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_blur_variable_size.glsl
index 9383bbf9825..9383bbf9825 100644
--- a/source/blender/gpu/shaders/compositor/compositor_blur_variable_size.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_blur_variable_size.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_bokeh_image.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_bokeh_image.glsl
index 6e98aa9fe17..6e98aa9fe17 100644
--- a/source/blender/gpu/shaders/compositor/compositor_bokeh_image.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_bokeh_image.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_box_mask.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_box_mask.glsl
index fad23f28fde..fad23f28fde 100644
--- a/source/blender/gpu/shaders/compositor/compositor_box_mask.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_box_mask.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_convert.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_convert.glsl
index 044fb057ca5..044fb057ca5 100644
--- a/source/blender/gpu/shaders/compositor/compositor_convert.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_convert.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_despeckle.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_despeckle.glsl
index e4743d69d17..e4743d69d17 100644
--- a/source/blender/gpu/shaders/compositor/compositor_despeckle.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_despeckle.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_directional_blur.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_directional_blur.glsl
index 1805cb5a7f5..1805cb5a7f5 100644
--- a/source/blender/gpu/shaders/compositor/compositor_directional_blur.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_directional_blur.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_edge_filter.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_edge_filter.glsl
index 67e27c22602..67e27c22602 100644
--- a/source/blender/gpu/shaders/compositor/compositor_edge_filter.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_edge_filter.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_ellipse_mask.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_ellipse_mask.glsl
index 28f725067e0..28f725067e0 100644
--- a/source/blender/gpu/shaders/compositor/compositor_ellipse_mask.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_ellipse_mask.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_filter.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_filter.glsl
index e501c563dda..e501c563dda 100644
--- a/source/blender/gpu/shaders/compositor/compositor_filter.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_filter.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_flip.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_flip.glsl
index 919c454ee63..919c454ee63 100644
--- a/source/blender/gpu/shaders/compositor/compositor_flip.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_flip.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_image_crop.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_image_crop.glsl
index f20e033dee4..f20e033dee4 100644
--- a/source/blender/gpu/shaders/compositor/compositor_image_crop.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_image_crop.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_morphological_distance.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_morphological_distance.glsl
index 09f896b7a9d..09f896b7a9d 100644
--- a/source/blender/gpu/shaders/compositor/compositor_morphological_distance.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_morphological_distance.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_morphological_distance_feather.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_morphological_distance_feather.glsl
index acdd8a40342..acdd8a40342 100644
--- a/source/blender/gpu/shaders/compositor/compositor_morphological_distance_feather.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_morphological_distance_feather.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_morphological_distance_threshold.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_morphological_distance_threshold.glsl
index e6625e7419f..e6625e7419f 100644
--- a/source/blender/gpu/shaders/compositor/compositor_morphological_distance_threshold.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_morphological_distance_threshold.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_morphological_step.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_morphological_step.glsl
index 6992bc2afa5..6992bc2afa5 100644
--- a/source/blender/gpu/shaders/compositor/compositor_morphological_step.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_morphological_step.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_normalize.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_normalize.glsl
index 53dfeb01730..53dfeb01730 100644
--- a/source/blender/gpu/shaders/compositor/compositor_normalize.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_normalize.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_parallel_reduction.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_parallel_reduction.glsl
index f6f84aa24c1..f6f84aa24c1 100644
--- a/source/blender/gpu/shaders/compositor/compositor_parallel_reduction.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_parallel_reduction.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_projector_lens_distortion.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_projector_lens_distortion.glsl
index ab44dac93e6..ab44dac93e6 100644
--- a/source/blender/gpu/shaders/compositor/compositor_projector_lens_distortion.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_projector_lens_distortion.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_realize_on_domain.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_realize_on_domain.glsl
index b8561e5f059..b8561e5f059 100644
--- a/source/blender/gpu/shaders/compositor/compositor_realize_on_domain.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_realize_on_domain.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_screen_lens_distortion.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_screen_lens_distortion.glsl
index dc572ea5aaf..dc572ea5aaf 100644
--- a/source/blender/gpu/shaders/compositor/compositor_screen_lens_distortion.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_screen_lens_distortion.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_set_alpha.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_set_alpha.glsl
index 7dd40581790..7dd40581790 100644
--- a/source/blender/gpu/shaders/compositor/compositor_set_alpha.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_set_alpha.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_split_viewer.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_split_viewer.glsl
index 866b9045da2..866b9045da2 100644
--- a/source/blender/gpu/shaders/compositor/compositor_split_viewer.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_split_viewer.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_symmetric_blur.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_symmetric_blur.glsl
index df08991a35c..df08991a35c 100644
--- a/source/blender/gpu/shaders/compositor/compositor_symmetric_blur.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_symmetric_blur.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_symmetric_separable_blur.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_symmetric_separable_blur.glsl
index ab0c7baa787..ab0c7baa787 100644
--- a/source/blender/gpu/shaders/compositor/compositor_symmetric_separable_blur.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_symmetric_separable_blur.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_tone_map_photoreceptor.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_tone_map_photoreceptor.glsl
index 167006585ca..167006585ca 100644
--- a/source/blender/gpu/shaders/compositor/compositor_tone_map_photoreceptor.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_tone_map_photoreceptor.glsl
diff --git a/source/blender/gpu/shaders/compositor/compositor_tone_map_simple.glsl b/source/blender/compositor/realtime_compositor/shaders/compositor_tone_map_simple.glsl
index ce42d021dd1..ce42d021dd1 100644
--- a/source/blender/gpu/shaders/compositor/compositor_tone_map_simple.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/compositor_tone_map_simple.glsl
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_alpha_crop_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_alpha_crop_info.hh
index 11f2f329cd8..11f2f329cd8 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_alpha_crop_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_alpha_crop_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_bilateral_blur_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_bilateral_blur_info.hh
index 301cd6acd9e..301cd6acd9e 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_bilateral_blur_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_bilateral_blur_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_blur_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_blur_info.hh
index 36b772aa486..36b772aa486 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_blur_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_blur_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_blur_variable_size_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_blur_variable_size_info.hh
index 05b6385fd1e..05b6385fd1e 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_blur_variable_size_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_blur_variable_size_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_bokeh_image_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_bokeh_image_info.hh
index 3541de53070..3541de53070 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_bokeh_image_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_bokeh_image_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_box_mask_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_box_mask_info.hh
index ecb253bbab1..ecb253bbab1 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_box_mask_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_box_mask_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_convert_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_convert_info.hh
index 35e60056736..35e60056736 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_convert_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_convert_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_despeckle_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_despeckle_info.hh
index df86c3a8258..df86c3a8258 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_despeckle_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_despeckle_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_directional_blur_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_directional_blur_info.hh
index bb9199dcd26..bb9199dcd26 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_directional_blur_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_directional_blur_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_edge_filter_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_edge_filter_info.hh
index 916ec62bdba..916ec62bdba 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_edge_filter_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_edge_filter_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_ellipse_mask_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_ellipse_mask_info.hh
index 52db91c94e5..52db91c94e5 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_ellipse_mask_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_ellipse_mask_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_filter_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_filter_info.hh
index 9d565cf4b8a..9d565cf4b8a 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_filter_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_filter_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_flip_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_flip_info.hh
index db831518cb7..db831518cb7 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_flip_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_flip_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_image_crop_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_image_crop_info.hh
index e7736744c40..e7736744c40 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_image_crop_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_image_crop_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_morphological_distance_feather_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_morphological_distance_feather_info.hh
index 9f17f60129d..9f17f60129d 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_morphological_distance_feather_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_morphological_distance_feather_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_morphological_distance_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_morphological_distance_info.hh
index fc960e119e5..fc960e119e5 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_morphological_distance_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_morphological_distance_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_morphological_distance_threshold_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_morphological_distance_threshold_info.hh
index b1d64f61b80..b1d64f61b80 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_morphological_distance_threshold_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_morphological_distance_threshold_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_morphological_step_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_morphological_step_info.hh
index e97ffd9feea..e97ffd9feea 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_morphological_step_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_morphological_step_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_normalize_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_normalize_info.hh
index 02fdc424014..02fdc424014 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_normalize_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_normalize_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_parallel_reduction_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_parallel_reduction_info.hh
index e2252b14758..e2252b14758 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_parallel_reduction_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_parallel_reduction_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_projector_lens_distortion_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_projector_lens_distortion_info.hh
index 98fe1731703..98fe1731703 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_projector_lens_distortion_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_projector_lens_distortion_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_realize_on_domain_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_realize_on_domain_info.hh
index 4528649ae98..4528649ae98 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_realize_on_domain_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_realize_on_domain_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_screen_lens_distortion_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_screen_lens_distortion_info.hh
index c42f2b328d4..c42f2b328d4 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_screen_lens_distortion_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_screen_lens_distortion_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_set_alpha_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_set_alpha_info.hh
index ca28194e921..ca28194e921 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_set_alpha_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_set_alpha_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_split_viewer_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_split_viewer_info.hh
index d5793b0ce59..d5793b0ce59 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_split_viewer_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_split_viewer_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_symmetric_blur_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_symmetric_blur_info.hh
index 8ba2b4e04ef..8ba2b4e04ef 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_symmetric_blur_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_symmetric_blur_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_symmetric_separable_blur_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_symmetric_separable_blur_info.hh
index 57247dba4b8..57247dba4b8 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_symmetric_separable_blur_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_symmetric_separable_blur_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_tone_map_photoreceptor_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_tone_map_photoreceptor_info.hh
index a460c9d58a6..a460c9d58a6 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_tone_map_photoreceptor_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_tone_map_photoreceptor_info.hh
diff --git a/source/blender/gpu/shaders/compositor/infos/compositor_tone_map_simple_info.hh b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_tone_map_simple_info.hh
index 2b220af9460..2b220af9460 100644
--- a/source/blender/gpu/shaders/compositor/infos/compositor_tone_map_simple_info.hh
+++ b/source/blender/compositor/realtime_compositor/shaders/infos/compositor_tone_map_simple_info.hh
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_alpha_over.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_alpha_over.glsl
index 8e3e033147f..8e3e033147f 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_alpha_over.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_alpha_over.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_blur_common.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_blur_common.glsl
index e404c03bbb0..e404c03bbb0 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_blur_common.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_blur_common.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_bright_contrast.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_bright_contrast.glsl
index ce71b4fd8a4..ce71b4fd8a4 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_bright_contrast.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_bright_contrast.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_channel_matte.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_channel_matte.glsl
index f2dcc9543f2..f2dcc9543f2 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_channel_matte.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_channel_matte.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_chroma_matte.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_chroma_matte.glsl
index 5d6bea0c9db..5d6bea0c9db 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_chroma_matte.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_chroma_matte.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_color_balance.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_color_balance.glsl
index bffb94cdedb..bffb94cdedb 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_color_balance.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_color_balance.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_color_correction.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_color_correction.glsl
index 9b4858f03be..9b4858f03be 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_color_correction.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_color_correction.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_color_matte.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_color_matte.glsl
index 038471bc1bc..038471bc1bc 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_color_matte.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_color_matte.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_color_spill.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_color_spill.glsl
index 0adad53ad80..0adad53ad80 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_color_spill.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_color_spill.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_color_to_luminance.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_color_to_luminance.glsl
index bcdd625bd4f..bcdd625bd4f 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_color_to_luminance.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_color_to_luminance.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_difference_matte.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_difference_matte.glsl
index d769cadce3c..d769cadce3c 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_difference_matte.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_difference_matte.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_distance_matte.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_distance_matte.glsl
index 9beed66826c..9beed66826c 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_distance_matte.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_distance_matte.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_exposure.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_exposure.glsl
index f246635a91e..f246635a91e 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_exposure.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_exposure.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_gamma.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_gamma.glsl
index 53070d4b0e2..53070d4b0e2 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_gamma.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_gamma.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_hue_correct.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_hue_correct.glsl
index 99eb125cdf2..99eb125cdf2 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_hue_correct.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_hue_correct.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_hue_saturation_value.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_hue_saturation_value.glsl
index dd5eb33d318..dd5eb33d318 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_hue_saturation_value.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_hue_saturation_value.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_invert.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_invert.glsl
index 59be746da7f..59be746da7f 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_invert.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_invert.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_luminance_matte.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_luminance_matte.glsl
index 3647ac583fe..3647ac583fe 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_luminance_matte.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_luminance_matte.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_main.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_main.glsl
index 27624223dbc..27624223dbc 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_main.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_main.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_map_value.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_map_value.glsl
index 20874b4ef44..20874b4ef44 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_map_value.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_map_value.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_normal.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_normal.glsl
index a2e3b6c4aaa..a2e3b6c4aaa 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_normal.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_normal.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_posterize.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_posterize.glsl
index ee8ae234abe..ee8ae234abe 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_posterize.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_posterize.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_separate_combine.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_separate_combine.glsl
index d72d2260394..d72d2260394 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_separate_combine.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_separate_combine.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_set_alpha.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_set_alpha.glsl
index 95380d1ed0f..95380d1ed0f 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_set_alpha.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_set_alpha.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_store_output.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_store_output.glsl
index 7fba26907b5..7fba26907b5 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_store_output.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_store_output.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_texture_utilities.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_texture_utilities.glsl
index 128fc6aeaf5..128fc6aeaf5 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_texture_utilities.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_texture_utilities.glsl
diff --git a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_type_conversion.glsl b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_type_conversion.glsl
index 75c76fd7341..75c76fd7341 100644
--- a/source/blender/gpu/shaders/compositor/library/gpu_shader_compositor_type_conversion.glsl
+++ b/source/blender/compositor/realtime_compositor/shaders/library/gpu_shader_compositor_type_conversion.glsl
diff --git a/source/blender/depsgraph/intern/depsgraph_query_iter.cc b/source/blender/depsgraph/intern/depsgraph_query_iter.cc
index 4636011e18b..34df9a537e1 100644
--- a/source/blender/depsgraph/intern/depsgraph_query_iter.cc
+++ b/source/blender/depsgraph/intern/depsgraph_query_iter.cc
@@ -191,8 +191,8 @@ bool deg_iterator_duplis_step(DEGObjectIterData *data)
bool is_neg_scale = is_negative_m4(dob->mat);
SET_FLAG_FROM_TEST(data->temp_dupli_object.transflag, is_neg_scale, OB_NEG_SCALE);
- copy_m4_m4(data->temp_dupli_object.obmat, dob->mat);
- invert_m4_m4(data->temp_dupli_object.imat, data->temp_dupli_object.obmat);
+ copy_m4_m4(data->temp_dupli_object.object_to_world, dob->mat);
+ invert_m4_m4(data->temp_dupli_object.world_to_object, data->temp_dupli_object.object_to_world);
data->next_object = &data->temp_dupli_object;
BLI_assert(deg::deg_validate_copy_on_write_datablock(&data->temp_dupli_object.id));
return true;
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
index a5b29ae56a9..62a9158928d 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
@@ -284,7 +284,7 @@ void invalidate_tagged_evaluated_transform(ID *id)
switch (id_type) {
case ID_OB: {
Object *object = (Object *)id;
- copy_vn_fl((float *)object->obmat, 16, NAN);
+ copy_vn_fl((float *)object->object_to_world, 16, NAN);
break;
}
default:
diff --git a/source/blender/draw/CMakeLists.txt b/source/blender/draw/CMakeLists.txt
index 4010b491141..5902dc18165 100644
--- a/source/blender/draw/CMakeLists.txt
+++ b/source/blender/draw/CMakeLists.txt
@@ -24,6 +24,8 @@ set(INC
../render
../render/intern
../compositor/realtime_compositor
+ ../compositor/realtime_compositor/algorithms
+ ../compositor/realtime_compositor/cached_resources
../windowmanager
../../../intern/atomic
diff --git a/source/blender/draw/engines/eevee/eevee_depth_of_field.c b/source/blender/draw/engines/eevee/eevee_depth_of_field.c
index 0d14a0c5f61..caa63b9c54c 100644
--- a/source/blender/draw/engines/eevee/eevee_depth_of_field.c
+++ b/source/blender/draw/engines/eevee/eevee_depth_of_field.c
@@ -189,7 +189,7 @@ int EEVEE_depth_of_field_init(EEVEE_ViewLayerData *UNUSED(sldata),
const DRWContextState *draw_ctx = DRW_context_state_get();
const Scene *scene_eval = DEG_get_evaluated_scene(draw_ctx->depsgraph);
- Camera *cam = (camera != NULL) ? camera->data : NULL;
+ Camera *cam = (camera != NULL && camera->type == OB_CAMERA) ? camera->data : NULL;
if (cam && (cam->dof.flag & CAM_DOF_ENABLED)) {
RegionView3D *rv3d = draw_ctx->rv3d;
diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.c b/source/blender/draw/engines/eevee/eevee_lightcache.c
index 9bf0cce2af2..26a264c1716 100644
--- a/source/blender/draw/engines/eevee/eevee_lightcache.c
+++ b/source/blender/draw/engines/eevee/eevee_lightcache.c
@@ -142,7 +142,7 @@ typedef struct EEVEE_LightBake {
struct GPUTexture *dummy_layer_color;
int total, done; /* to compute progress */
- short *stop, *do_update;
+ bool *stop, *do_update;
float *progress;
/** For only handling the resources. */
@@ -778,7 +778,7 @@ wmJob *EEVEE_lightbake_job_create(struct wmWindowManager *wm,
}
if (old_lbake->stop != NULL) {
- *old_lbake->stop = 1;
+ *old_lbake->stop = true;
}
BLI_mutex_unlock(old_lbake->mutex);
}
@@ -1359,13 +1359,13 @@ static bool lightbake_do_sample(EEVEE_LightBake *lbake,
DRW_custom_pipeline(&draw_engine_eevee_type, depsgraph, render_callback, lbake);
lbake->done += 1;
*lbake->progress = lbake->done / (float)lbake->total;
- *lbake->do_update = 1;
+ *lbake->do_update = true;
eevee_lightbake_context_disable(lbake);
return true;
}
-void EEVEE_lightbake_job(void *custom_data, short *stop, short *do_update, float *progress)
+void EEVEE_lightbake_job(void *custom_data, bool *stop, bool *do_update, float *progress)
{
EEVEE_LightBake *lbake = (EEVEE_LightBake *)custom_data;
Depsgraph *depsgraph = lbake->depsgraph;
@@ -1394,8 +1394,8 @@ void EEVEE_lightbake_job(void *custom_data, short *stop, short *do_update, float
/* Resource allocation can fail. Early exit in this case. */
if (lbake->lcache->flag & LIGHTCACHE_INVALID) {
- *lbake->stop = 1;
- *lbake->do_update = 1;
+ *lbake->stop = true;
+ *lbake->do_update = true;
lbake->lcache->flag &= ~LIGHTCACHE_BAKING;
eevee_lightbake_context_disable(lbake);
eevee_lightbake_delete_resources(lbake);
diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.h b/source/blender/draw/engines/eevee/eevee_lightcache.h
index 4e94e1914a7..73961f1919d 100644
--- a/source/blender/draw/engines/eevee/eevee_lightcache.h
+++ b/source/blender/draw/engines/eevee/eevee_lightcache.h
@@ -42,7 +42,7 @@ void *EEVEE_lightbake_job_data_alloc(struct Main *bmain,
int frame);
void EEVEE_lightbake_job_data_free(void *custom_data);
void EEVEE_lightbake_update(void *custom_data);
-void EEVEE_lightbake_job(void *custom_data, short *stop, short *do_update, float *progress);
+void EEVEE_lightbake_job(void *custom_data, bool *stop, bool *do_update, float *progress);
/**
* This is to update the world irradiance and reflection contribution from
diff --git a/source/blender/draw/engines/eevee/eevee_lightprobes.c b/source/blender/draw/engines/eevee/eevee_lightprobes.c
index 942ab5502c7..eb111610706 100644
--- a/source/blender/draw/engines/eevee/eevee_lightprobes.c
+++ b/source/blender/draw/engines/eevee/eevee_lightprobes.c
@@ -403,7 +403,7 @@ static bool eevee_lightprobes_culling_test(Object *ob)
const float max[3] = {1.0f, 1.0f, 1.0f};
BKE_boundbox_init_from_minmax(&bbox, min, max);
- copy_m4_m4(tmp, ob->obmat);
+ copy_m4_m4(tmp, ob->object_to_world);
normalize_v3(tmp[2]);
mul_v3_fl(tmp[2], probe->distinf);
@@ -445,7 +445,7 @@ void EEVEE_lightprobes_cache_add(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata
/* Debug Display */
DRWCallBuffer *grp = vedata->stl->g_data->planar_display_shgrp;
if (grp && (probe->flag & LIGHTPROBE_FLAG_SHOW_DATA)) {
- DRW_buffer_add_entry(grp, &pinfo->num_planar, ob->obmat);
+ DRW_buffer_add_entry(grp, &pinfo->num_planar, ob->object_to_world);
}
pinfo->num_planar++;
@@ -488,30 +488,30 @@ void EEVEE_lightprobes_grid_data_from_object(Object *ob, EEVEE_LightGrid *egrid,
mul_v3_v3fl(half_cell_dim, cell_dim, 0.5f);
/* Matrix converting world space to cell ranges. */
- invert_m4_m4(egrid->mat, ob->obmat);
+ invert_m4_m4(egrid->mat, ob->object_to_world);
/* First cell. */
copy_v3_fl(egrid->corner, -1.0f);
add_v3_v3(egrid->corner, half_cell_dim);
- mul_m4_v3(ob->obmat, egrid->corner);
+ mul_m4_v3(ob->object_to_world, egrid->corner);
/* Opposite neighbor cell. */
copy_v3_fl3(egrid->increment_x, cell_dim[0], 0.0f, 0.0f);
add_v3_v3(egrid->increment_x, half_cell_dim);
add_v3_fl(egrid->increment_x, -1.0f);
- mul_m4_v3(ob->obmat, egrid->increment_x);
+ mul_m4_v3(ob->object_to_world, egrid->increment_x);
sub_v3_v3(egrid->increment_x, egrid->corner);
copy_v3_fl3(egrid->increment_y, 0.0f, cell_dim[1], 0.0f);
add_v3_v3(egrid->increment_y, half_cell_dim);
add_v3_fl(egrid->increment_y, -1.0f);
- mul_m4_v3(ob->obmat, egrid->increment_y);
+ mul_m4_v3(ob->object_to_world, egrid->increment_y);
sub_v3_v3(egrid->increment_y, egrid->corner);
copy_v3_fl3(egrid->increment_z, 0.0f, 0.0f, cell_dim[2]);
add_v3_v3(egrid->increment_z, half_cell_dim);
add_v3_fl(egrid->increment_z, -1.0f);
- mul_m4_v3(ob->obmat, egrid->increment_z);
+ mul_m4_v3(ob->object_to_world, egrid->increment_z);
sub_v3_v3(egrid->increment_z, egrid->corner);
/* Visibility bias */
@@ -527,7 +527,7 @@ void EEVEE_lightprobes_cube_data_from_object(Object *ob, EEVEE_LightProbe *eprob
LightProbe *probe = (LightProbe *)ob->data;
/* Update transforms */
- copy_v3_v3(eprobe->position, ob->obmat[3]);
+ copy_v3_v3(eprobe->position, ob->object_to_world[3]);
/* Attenuation */
eprobe->attenuation_type = probe->attenuation_type;
@@ -535,7 +535,7 @@ void EEVEE_lightprobes_cube_data_from_object(Object *ob, EEVEE_LightProbe *eprob
unit_m4(eprobe->attenuationmat);
scale_m4_fl(eprobe->attenuationmat, probe->distinf);
- mul_m4_m4m4(eprobe->attenuationmat, ob->obmat, eprobe->attenuationmat);
+ mul_m4_m4m4(eprobe->attenuationmat, ob->object_to_world, eprobe->attenuationmat);
invert_m4(eprobe->attenuationmat);
/* Parallax */
@@ -550,7 +550,7 @@ void EEVEE_lightprobes_cube_data_from_object(Object *ob, EEVEE_LightProbe *eprob
scale_m4_fl(eprobe->parallaxmat, probe->distinf);
}
- mul_m4_m4m4(eprobe->parallaxmat, ob->obmat, eprobe->parallaxmat);
+ mul_m4_m4m4(eprobe->parallaxmat, ob->object_to_world, eprobe->parallaxmat);
invert_m4(eprobe->parallaxmat);
}
@@ -566,8 +566,8 @@ void EEVEE_lightprobes_planar_data_from_object(Object *ob,
vis_test->cached = false;
/* Computing mtx : matrix that mirror position around object's XY plane. */
- normalize_m4_m4(normat, ob->obmat); /* object > world */
- invert_m4_m4(imat, normat); /* world > object */
+ normalize_m4_m4(normat, ob->object_to_world); /* object > world */
+ invert_m4_m4(imat, normat); /* world > object */
/* XY reflection plane */
imat[0][2] = -imat[0][2];
imat[1][2] = -imat[1][2];
@@ -576,38 +576,38 @@ void EEVEE_lightprobes_planar_data_from_object(Object *ob,
mul_m4_m4m4(eplanar->mtx, normat, imat); /* world > object > mirrored obj > world */
/* Compute clip plane equation / normal. */
- copy_v3_v3(eplanar->plane_equation, ob->obmat[2]);
+ copy_v3_v3(eplanar->plane_equation, ob->object_to_world[2]);
normalize_v3(eplanar->plane_equation); /* plane normal */
- eplanar->plane_equation[3] = -dot_v3v3(eplanar->plane_equation, ob->obmat[3]);
+ eplanar->plane_equation[3] = -dot_v3v3(eplanar->plane_equation, ob->object_to_world[3]);
eplanar->clipsta = probe->clipsta;
/* Compute XY clip planes. */
- normalize_v3_v3(eplanar->clip_vec_x, ob->obmat[0]);
- normalize_v3_v3(eplanar->clip_vec_y, ob->obmat[1]);
+ normalize_v3_v3(eplanar->clip_vec_x, ob->object_to_world[0]);
+ normalize_v3_v3(eplanar->clip_vec_y, ob->object_to_world[1]);
float vec[3] = {0.0f, 0.0f, 0.0f};
vec[0] = 1.0f;
vec[1] = 0.0f;
vec[2] = 0.0f;
- mul_m4_v3(ob->obmat, vec); /* Point on the edge */
+ mul_m4_v3(ob->object_to_world, vec); /* Point on the edge */
eplanar->clip_edge_x_pos = dot_v3v3(eplanar->clip_vec_x, vec);
vec[0] = 0.0f;
vec[1] = 1.0f;
vec[2] = 0.0f;
- mul_m4_v3(ob->obmat, vec); /* Point on the edge */
+ mul_m4_v3(ob->object_to_world, vec); /* Point on the edge */
eplanar->clip_edge_y_pos = dot_v3v3(eplanar->clip_vec_y, vec);
vec[0] = -1.0f;
vec[1] = 0.0f;
vec[2] = 0.0f;
- mul_m4_v3(ob->obmat, vec); /* Point on the edge */
+ mul_m4_v3(ob->object_to_world, vec); /* Point on the edge */
eplanar->clip_edge_x_neg = dot_v3v3(eplanar->clip_vec_x, vec);
vec[0] = 0.0f;
vec[1] = -1.0f;
vec[2] = 0.0f;
- mul_m4_v3(ob->obmat, vec); /* Point on the edge */
+ mul_m4_v3(ob->object_to_world, vec); /* Point on the edge */
eplanar->clip_edge_y_neg = dot_v3v3(eplanar->clip_vec_y, vec);
/* Facing factors */
diff --git a/source/blender/draw/engines/eevee/eevee_lights.c b/source/blender/draw/engines/eevee/eevee_lights.c
index 312305a31f7..f8250f9520d 100644
--- a/source/blender/draw/engines/eevee/eevee_lights.c
+++ b/source/blender/draw/engines/eevee/eevee_lights.c
@@ -132,7 +132,7 @@ static void eevee_light_setup(Object *ob, EEVEE_Light *evli)
const float light_threshold = draw_ctx->scene->eevee.light_threshold;
/* Position */
- copy_v3_v3(evli->position, ob->obmat[3]);
+ copy_v3_v3(evli->position, ob->object_to_world[3]);
/* Color */
copy_v3_v3(evli->color, &la->r);
@@ -153,7 +153,7 @@ static void eevee_light_setup(Object *ob, EEVEE_Light *evli)
evli->invsqrdist_volume = 1.0f / max_ff(1e-4f, square_f(att_radius_volume));
/* Vectors */
- normalize_m4_m4_ex(mat, ob->obmat, scale);
+ normalize_m4_m4_ex(mat, ob->object_to_world, scale);
copy_v3_v3(evli->forwardvec, mat[2]);
normalize_v3(evli->forwardvec);
negate_v3(evli->forwardvec);
diff --git a/source/blender/draw/engines/eevee/eevee_motion_blur.c b/source/blender/draw/engines/eevee/eevee_motion_blur.c
index a3ca19c88e1..9f7fb1c154c 100644
--- a/source/blender/draw/engines/eevee/eevee_motion_blur.c
+++ b/source/blender/draw/engines/eevee/eevee_motion_blur.c
@@ -292,7 +292,7 @@ void EEVEE_motion_blur_curves_cache_populate(EEVEE_ViewLayerData *UNUSED(sldata)
int mb_step = effects->motion_blur_step;
/* Store transform. */
- copy_m4_m4(mb_data->obmat[mb_step], ob->obmat);
+ copy_m4_m4(mb_data->obmat[mb_step], ob->object_to_world);
EEVEE_HairMotionData *mb_curves = EEVEE_motion_blur_curves_data_get(mb_data);
@@ -362,7 +362,7 @@ void EEVEE_motion_blur_cache_populate(EEVEE_ViewLayerData *UNUSED(sldata),
if (mb_data) {
int mb_step = effects->motion_blur_step;
/* Store transform. */
- copy_m4_m4(mb_data->obmat[mb_step], ob->obmat);
+ copy_m4_m4(mb_data->obmat[mb_step], ob->object_to_world);
EEVEE_GeometryMotionData *mb_geom = EEVEE_motion_blur_geometry_data_get(mb_data);
diff --git a/source/blender/draw/engines/eevee/eevee_shadows.c b/source/blender/draw/engines/eevee/eevee_shadows.c
index 9e571b1d15b..1cf3c7c6da1 100644
--- a/source/blender/draw/engines/eevee/eevee_shadows.c
+++ b/source/blender/draw/engines/eevee/eevee_shadows.c
@@ -153,7 +153,7 @@ void EEVEE_shadows_caster_register(EEVEE_ViewLayerData *sldata, Object *ob)
for (int i = 0; i < 8; i++) {
float vec[3];
copy_v3_v3(vec, bb->vec[i]);
- mul_m4_v3(ob->obmat, vec);
+ mul_m4_v3(ob->object_to_world, vec);
minmax_v3v3_v3(min, max, vec);
}
diff --git a/source/blender/draw/engines/eevee/eevee_volumes.c b/source/blender/draw/engines/eevee/eevee_volumes.c
index 05b2bafdb3a..872696a8b7c 100644
--- a/source/blender/draw/engines/eevee/eevee_volumes.c
+++ b/source/blender/draw/engines/eevee/eevee_volumes.c
@@ -299,7 +299,7 @@ void EEVEE_volumes_cache_object_add(EEVEE_ViewLayerData *sldata,
}
float size[3];
- mat4_to_size(size, ob->obmat);
+ mat4_to_size(size, ob->object_to_world);
/* Check if any of the axes have 0 length. (see T69070) */
const float epsilon = 1e-8f;
if ((size[0] < epsilon) || (size[1] < epsilon) || (size[2] < epsilon)) {
diff --git a/source/blender/draw/engines/eevee_next/eevee_light.cc b/source/blender/draw/engines/eevee_next/eevee_light.cc
index 8a5de15229d..aa8268dbaa7 100644
--- a/source/blender/draw/engines/eevee_next/eevee_light.cc
+++ b/source/blender/draw/engines/eevee_next/eevee_light.cc
@@ -58,7 +58,7 @@ void Light::sync(/* ShadowModule &shadows , */ const Object *ob, float threshold
this->influence_radius_invsqr_volume = 1.0f / square_f(max_ff(influence_radius_volume, 1e-8f));
this->color = float3(&la->r) * la->energy;
- normalize_m4_m4_ex(this->object_mat.ptr(), ob->obmat, scale);
+ normalize_m4_m4_ex(this->object_mat.ptr(), ob->object_to_world, scale);
/* Make sure we have consistent handedness (in case of negatively scaled Z axis). */
float3 cross = math::cross(float3(this->_right), float3(this->_up));
if (math::dot(cross, float3(this->_back)) < 0.0f) {
diff --git a/source/blender/draw/engines/eevee_next/eevee_pipeline.cc b/source/blender/draw/engines/eevee_next/eevee_pipeline.cc
index e6b37b4ad47..0242f732f27 100644
--- a/source/blender/draw/engines/eevee_next/eevee_pipeline.cc
+++ b/source/blender/draw/engines/eevee_next/eevee_pipeline.cc
@@ -182,7 +182,7 @@ PassMain::Sub *ForwardPipeline::prepass_transparent_add(const Object *ob,
if (blender_mat->blend_flag & MA_BL_CULL_BACKFACE) {
state |= DRW_STATE_CULL_BACK;
}
- float sorting_value = math::dot(float3(ob->obmat[3]), camera_forward_);
+ float sorting_value = math::dot(float3(ob->object_to_world[3]), camera_forward_);
PassMain::Sub *pass = &transparent_ps_.sub(GPU_material_get_name(gpumat), sorting_value);
pass->state_set(state);
pass->material_set(*inst_.manager, gpumat);
@@ -197,7 +197,7 @@ PassMain::Sub *ForwardPipeline::material_transparent_add(const Object *ob,
if (blender_mat->blend_flag & MA_BL_CULL_BACKFACE) {
state |= DRW_STATE_CULL_BACK;
}
- float sorting_value = math::dot(float3(ob->obmat[3]), camera_forward_);
+ float sorting_value = math::dot(float3(ob->object_to_world[3]), camera_forward_);
PassMain::Sub *pass = &transparent_ps_.sub(GPU_material_get_name(gpumat), sorting_value);
pass->state_set(state);
pass->material_set(*inst_.manager, gpumat);
diff --git a/source/blender/draw/engines/eevee_next/eevee_velocity.cc b/source/blender/draw/engines/eevee_next/eevee_velocity.cc
index b9a78e8547e..52401c8003e 100644
--- a/source/blender/draw/engines/eevee_next/eevee_velocity.cc
+++ b/source/blender/draw/engines/eevee_next/eevee_velocity.cc
@@ -106,16 +106,16 @@ bool VelocityModule::step_object_sync(Object *ob,
vel.obj.ofs[step_] = object_steps_usage[step_]++;
vel.obj.resource_id = resource_handle.resource_index();
vel.id = (ID *)ob->data;
- object_steps[step_]->get_or_resize(vel.obj.ofs[step_]) = ob->obmat;
+ object_steps[step_]->get_or_resize(vel.obj.ofs[step_]) = ob->object_to_world;
if (step_ == STEP_CURRENT) {
/* Replace invalid steps. Can happen if object was hidden in one of those steps. */
if (vel.obj.ofs[STEP_PREVIOUS] == -1) {
vel.obj.ofs[STEP_PREVIOUS] = object_steps_usage[STEP_PREVIOUS]++;
- object_steps[STEP_PREVIOUS]->get_or_resize(vel.obj.ofs[STEP_PREVIOUS]) = ob->obmat;
+ object_steps[STEP_PREVIOUS]->get_or_resize(vel.obj.ofs[STEP_PREVIOUS]) = ob->object_to_world;
}
if (vel.obj.ofs[STEP_NEXT] == -1) {
vel.obj.ofs[STEP_NEXT] = object_steps_usage[STEP_NEXT]++;
- object_steps[STEP_NEXT]->get_or_resize(vel.obj.ofs[STEP_NEXT]) = ob->obmat;
+ object_steps[STEP_NEXT]->get_or_resize(vel.obj.ofs[STEP_NEXT]) = ob->object_to_world;
}
}
diff --git a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
index a41918e7e0d..06bf531cded 100644
--- a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
@@ -39,9 +39,9 @@ GPENCIL_tObject *gpencil_object_cache_add(GPENCIL_PrivateData *pd, Object *ob)
tgp_ob->layers.first = tgp_ob->layers.last = NULL;
tgp_ob->vfx.first = tgp_ob->vfx.last = NULL;
- tgp_ob->camera_z = dot_v3v3(pd->camera_z_axis, ob->obmat[3]);
+ tgp_ob->camera_z = dot_v3v3(pd->camera_z_axis, ob->object_to_world[3]);
tgp_ob->is_drawmode3d = (gpd->draw_mode == GP_DRAWMODE_3D) || pd->draw_depth_only;
- tgp_ob->object_scale = mat4_to_scale(ob->obmat);
+ tgp_ob->object_scale = mat4_to_scale(ob->object_to_world);
/* Check if any material with holdout flag enabled. */
tgp_ob->do_mat_holdout = false;
@@ -71,7 +71,7 @@ GPENCIL_tObject *gpencil_object_cache_add(GPENCIL_PrivateData *pd, Object *ob)
add_v3_fl(size, 1e-8f);
rescale_m4(mat, size);
/* BBox space to World. */
- mul_m4_m4m4(mat, ob->obmat, mat);
+ mul_m4_m4m4(mat, ob->object_to_world, mat);
if (DRW_view_is_persp_get(NULL)) {
/* BBox center to camera vector. */
sub_v3_v3v3(tgp_ob->plane_normal, pd->camera_pos, mat[3]);
@@ -96,9 +96,9 @@ GPENCIL_tObject *gpencil_object_cache_add(GPENCIL_PrivateData *pd, Object *ob)
unit_m4(tgp_ob->plane_mat);
copy_v3_v3(tgp_ob->plane_mat[2], tgp_ob->plane_normal);
orthogonalize_m4(tgp_ob->plane_mat, 2);
- mul_mat3_m4_v3(ob->obmat, size);
+ mul_mat3_m4_v3(ob->object_to_world, size);
float radius = len_v3(size);
- mul_m4_v3(ob->obmat, center);
+ mul_m4_v3(ob->object_to_world, center);
rescale_m4(tgp_ob->plane_mat, (float[3]){radius, radius, radius});
copy_v3_v3(tgp_ob->plane_mat[3], center);
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_data.c b/source/blender/draw/engines/gpencil/gpencil_draw_data.c
index e54ac99a888..1ebf3982a12 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_data.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_data.c
@@ -380,27 +380,27 @@ void gpencil_light_pool_populate(GPENCIL_LightPool *lightpool, Object *ob)
float(*mat)[4] = (float(*)[4])gp_light->right;
if (la->type == LA_SPOT) {
- copy_m4_m4(mat, ob->imat);
+ copy_m4_m4(mat, ob->world_to_object);
gp_light->type = GP_LIGHT_TYPE_SPOT;
gp_light->spot_size = cosf(la->spotsize * 0.5f);
gp_light->spot_blend = (1.0f - gp_light->spot_size) * la->spotblend;
}
else if (la->type == LA_AREA) {
/* Simulate area lights using a spot light. */
- normalize_m4_m4(mat, ob->obmat);
+ normalize_m4_m4(mat, ob->object_to_world);
invert_m4(mat);
gp_light->type = GP_LIGHT_TYPE_SPOT;
gp_light->spot_size = cosf(M_PI_2);
gp_light->spot_blend = (1.0f - gp_light->spot_size) * 1.0f;
}
else if (la->type == LA_SUN) {
- normalize_v3_v3(gp_light->forward, ob->obmat[2]);
+ normalize_v3_v3(gp_light->forward, ob->object_to_world[2]);
gp_light->type = GP_LIGHT_TYPE_SUN;
}
else {
gp_light->type = GP_LIGHT_TYPE_POINT;
}
- copy_v4_v4(gp_light->position, ob->obmat[3]);
+ copy_v4_v4(gp_light->position, ob->object_to_world[3]);
copy_v3_v3(gp_light->color, &la->r);
mul_v3_fl(gp_light->color, la->energy * light_power_get(la));
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 78e658d35eb..6a4312e572a 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -289,7 +289,7 @@ void GPENCIL_cache_init(void *ved)
DRW_shgroup_call_procedural_triangles(grp, NULL, 1);
}
- Camera *cam = (pd->camera != NULL) ? pd->camera->data : NULL;
+ Camera *cam = (pd->camera != NULL && pd->camera->type == OB_CAMERA) ? pd->camera->data : NULL;
/* Pseudo DOF setup. */
if (cam && (cam->dof.flag & CAM_DOF_ENABLED)) {
diff --git a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
index a7d8570dbaa..9b1129e77be 100644
--- a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
+++ b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
@@ -96,7 +96,7 @@ static void gpencil_vfx_blur(BlurShaderFxData *fx, Object *ob, gpIterVfxData *it
float winmat[4][4], persmat[4][4];
float blur_size[2] = {fx->radius[0], fx->radius[1]};
DRW_view_persmat_get(NULL, persmat, false);
- const float w = fabsf(mul_project_m4_v3_zfac(persmat, ob->obmat[3]));
+ const float w = fabsf(mul_project_m4_v3_zfac(persmat, ob->object_to_world[3]));
if (fx->flag & FX_BLUR_DOF_MODE) {
/* Compute circle of confusion size. */
@@ -108,7 +108,7 @@ static void gpencil_vfx_blur(BlurShaderFxData *fx, Object *ob, gpIterVfxData *it
DRW_view_winmat_get(NULL, winmat, false);
const float *vp_size = DRW_viewport_size_get();
float world_pixel_scale = 1.0f / GPENCIL_PIXEL_FACTOR;
- float scale = mat4_to_scale(ob->obmat);
+ float scale = mat4_to_scale(ob->object_to_world);
float distance_factor = world_pixel_scale * scale * winmat[1][1] * vp_size[1] / w;
mul_v2_fl(blur_size, distance_factor);
}
@@ -175,11 +175,11 @@ static void gpencil_vfx_rim(RimShaderFxData *fx, Object *ob, gpIterVfxData *iter
const float *vp_size = DRW_viewport_size_get();
const float *vp_size_inv = DRW_viewport_invert_size_get();
- const float w = fabsf(mul_project_m4_v3_zfac(persmat, ob->obmat[3]));
+ const float w = fabsf(mul_project_m4_v3_zfac(persmat, ob->object_to_world[3]));
/* Modify by distance to camera and object scale. */
float world_pixel_scale = 1.0f / GPENCIL_PIXEL_FACTOR;
- float scale = mat4_to_scale(ob->obmat);
+ float scale = mat4_to_scale(ob->object_to_world);
float distance_factor = (world_pixel_scale * scale * winmat[1][1] * vp_size[1]) / w;
mul_v2_fl(offset, distance_factor);
mul_v2_v2(offset, vp_size_inv);
@@ -248,8 +248,8 @@ static void gpencil_vfx_pixelize(PixelShaderFxData *fx, Object *ob, gpIterVfxDat
mul_v2_v2(pixel_size, vp_size_inv);
/* Fixed pixelisation center from object center. */
- const float w = fabsf(mul_project_m4_v3_zfac(persmat, ob->obmat[3]));
- mul_v3_m4v3(ob_center, persmat, ob->obmat[3]);
+ const float w = fabsf(mul_project_m4_v3_zfac(persmat, ob->object_to_world[3]));
+ mul_v3_m4v3(ob_center, persmat, ob->object_to_world[3]);
mul_v3_fl(ob_center, 1.0f / w);
const bool use_antialiasing = ((fx->flag & FX_PIXEL_FILTER_NEAREST) == 0);
@@ -260,7 +260,7 @@ static void gpencil_vfx_pixelize(PixelShaderFxData *fx, Object *ob, gpIterVfxDat
/* Modify by distance to camera and object scale. */
float world_pixel_scale = 1.0f / GPENCIL_PIXEL_FACTOR;
- float scale = mat4_to_scale(ob->obmat);
+ float scale = mat4_to_scale(ob->object_to_world);
mul_v2_fl(pixel_size, (world_pixel_scale * scale * winmat[1][1] * vp_size[1]) / w);
/* Center to texel */
@@ -310,7 +310,9 @@ static void gpencil_vfx_shadow(ShadowShaderFxData *fx, Object *ob, gpIterVfxData
const float *vp_size_inv = DRW_viewport_invert_size_get();
const float ratio = vp_size_inv[1] / vp_size_inv[0];
- copy_v3_v3(rot_center, (use_obj_pivot && fx->object) ? fx->object->obmat[3] : ob->obmat[3]);
+ copy_v3_v3(rot_center,
+ (use_obj_pivot && fx->object) ? fx->object->object_to_world[3] :
+ ob->object_to_world[3]);
const float w = fabsf(mul_project_m4_v3_zfac(persmat, rot_center));
mul_v3_m4v3(rot_center, persmat, rot_center);
@@ -318,7 +320,7 @@ static void gpencil_vfx_shadow(ShadowShaderFxData *fx, Object *ob, gpIterVfxData
/* Modify by distance to camera and object scale. */
float world_pixel_scale = 1.0f / GPENCIL_PIXEL_FACTOR;
- float scale = mat4_to_scale(ob->obmat);
+ float scale = mat4_to_scale(ob->object_to_world);
float distance_factor = (world_pixel_scale * scale * winmat[1][1] * vp_size[1]) / w;
mul_v2_fl(offset, distance_factor);
mul_v2_v2(offset, vp_size_inv);
@@ -485,13 +487,13 @@ static void gpencil_vfx_wave(WaveShaderFxData *fx, Object *ob, gpIterVfxData *it
const float *vp_size = DRW_viewport_size_get();
const float *vp_size_inv = DRW_viewport_invert_size_get();
- const float w = fabsf(mul_project_m4_v3_zfac(persmat, ob->obmat[3]));
- mul_v3_m4v3(wave_center, persmat, ob->obmat[3]);
+ const float w = fabsf(mul_project_m4_v3_zfac(persmat, ob->object_to_world[3]));
+ mul_v3_m4v3(wave_center, persmat, ob->object_to_world[3]);
mul_v3_fl(wave_center, 1.0f / w);
/* Modify by distance to camera and object scale. */
float world_pixel_scale = 1.0f / GPENCIL_PIXEL_FACTOR;
- float scale = mat4_to_scale(ob->obmat);
+ float scale = mat4_to_scale(ob->object_to_world);
float distance_factor = (world_pixel_scale * scale * winmat[1][1] * vp_size[1]) / w;
wave_center[0] = wave_center[0] * 0.5f + 0.5f;
@@ -542,7 +544,7 @@ static void gpencil_vfx_swirl(SwirlShaderFxData *fx, Object *UNUSED(ob), gpIterV
DRW_view_persmat_get(NULL, persmat, false);
const float *vp_size = DRW_viewport_size_get();
- copy_v3_v3(swirl_center, fx->object->obmat[3]);
+ copy_v3_v3(swirl_center, fx->object->object_to_world[3]);
const float w = fabsf(mul_project_m4_v3_zfac(persmat, swirl_center));
mul_v3_m4v3(swirl_center, persmat, swirl_center);
@@ -550,7 +552,7 @@ static void gpencil_vfx_swirl(SwirlShaderFxData *fx, Object *UNUSED(ob), gpIterV
/* Modify by distance to camera and object scale. */
float world_pixel_scale = 1.0f / GPENCIL_PIXEL_FACTOR;
- float scale = mat4_to_scale(fx->object->obmat);
+ float scale = mat4_to_scale(fx->object->object_to_world);
float distance_factor = (world_pixel_scale * scale * winmat[1][1] * vp_size[1]) / w;
mul_v2_fl(swirl_center, 0.5f);
diff --git a/source/blender/draw/engines/overlay/overlay_armature.cc b/source/blender/draw/engines/overlay/overlay_armature.cc
index 0cf9d91804a..8c9587e7a9a 100644
--- a/source/blender/draw/engines/overlay/overlay_armature.cc
+++ b/source/blender/draw/engines/overlay/overlay_armature.cc
@@ -441,7 +441,7 @@ static void drw_shgroup_bone_octahedral(ArmatureDrawContext *ctx,
const float outline_color[4])
{
BoneInstanceData inst_data;
- mul_m4_m4m4(inst_data.mat, ctx->ob->obmat, bone_mat);
+ mul_m4_m4m4(inst_data.mat, ctx->ob->object_to_world, bone_mat);
if (ctx->solid) {
OVERLAY_bone_instance_data_set_color(&inst_data, bone_color);
OVERLAY_bone_instance_data_set_color_hint(&inst_data, hint_color);
@@ -461,7 +461,7 @@ static void drw_shgroup_bone_box(ArmatureDrawContext *ctx,
const float outline_color[4])
{
BoneInstanceData inst_data;
- mul_m4_m4m4(inst_data.mat, ctx->ob->obmat, bone_mat);
+ mul_m4_m4m4(inst_data.mat, ctx->ob->object_to_world, bone_mat);
if (ctx->solid) {
OVERLAY_bone_instance_data_set_color(&inst_data, bone_color);
OVERLAY_bone_instance_data_set_color_hint(&inst_data, hint_color);
@@ -479,9 +479,9 @@ static void drw_shgroup_bone_wire(ArmatureDrawContext *ctx,
const float color[4])
{
float head[3], tail[3];
- mul_v3_m4v3(head, ctx->ob->obmat, bone_mat[3]);
+ mul_v3_m4v3(head, ctx->ob->object_to_world, bone_mat[3]);
add_v3_v3v3(tail, bone_mat[3], bone_mat[1]);
- mul_m4_v3(ctx->ob->obmat, tail);
+ mul_m4_v3(ctx->ob->object_to_world, tail);
DRW_buffer_add_entry(ctx->wire, head, color);
DRW_buffer_add_entry(ctx->wire, tail, color);
@@ -496,9 +496,9 @@ static void drw_shgroup_bone_stick(ArmatureDrawContext *ctx,
const float col_tail[4])
{
float head[3], tail[3];
- mul_v3_m4v3(head, ctx->ob->obmat, bone_mat[3]);
+ mul_v3_m4v3(head, ctx->ob->object_to_world, bone_mat[3]);
add_v3_v3v3(tail, bone_mat[3], bone_mat[1]);
- mul_m4_v3(ctx->ob->obmat, tail);
+ mul_m4_v3(ctx->ob->object_to_world, tail);
DRW_buffer_add_entry(ctx->stick, head, tail, col_wire, col_bone, col_head, col_tail);
}
@@ -517,11 +517,11 @@ static void drw_shgroup_bone_envelope_distance(ArmatureDrawContext *ctx,
mul_m4_v4(bone_mat, head_sph);
mul_m4_v4(bone_mat, tail_sph);
mul_m4_v4(bone_mat, xaxis);
- mul_m4_v4(ctx->ob->obmat, head_sph);
- mul_m4_v4(ctx->ob->obmat, tail_sph);
- mul_m4_v4(ctx->ob->obmat, xaxis);
+ mul_m4_v4(ctx->ob->object_to_world, head_sph);
+ mul_m4_v4(ctx->ob->object_to_world, tail_sph);
+ mul_m4_v4(ctx->ob->object_to_world, xaxis);
sub_v3_v3(xaxis, head_sph);
- float obscale = mat4_to_scale(ctx->ob->obmat);
+ float obscale = mat4_to_scale(ctx->ob->object_to_world);
head_sph[3] = *radius_head * obscale;
head_sph[3] += *distance * obscale;
tail_sph[3] = *radius_tail * obscale;
@@ -544,10 +544,10 @@ static void drw_shgroup_bone_envelope(ArmatureDrawContext *ctx,
mul_m4_v4(bone_mat, head_sph);
mul_m4_v4(bone_mat, tail_sph);
mul_m4_v4(bone_mat, xaxis);
- mul_m4_v4(ctx->ob->obmat, head_sph);
- mul_m4_v4(ctx->ob->obmat, tail_sph);
- mul_m4_v4(ctx->ob->obmat, xaxis);
- float obscale = mat4_to_scale(ctx->ob->obmat);
+ mul_m4_v4(ctx->ob->object_to_world, head_sph);
+ mul_m4_v4(ctx->ob->object_to_world, tail_sph);
+ mul_m4_v4(ctx->ob->object_to_world, xaxis);
+ float obscale = mat4_to_scale(ctx->ob->object_to_world);
head_sph[3] = *radius_head * obscale;
tail_sph[3] = *radius_tail * obscale;
@@ -651,7 +651,7 @@ static void drw_shgroup_bone_custom_solid_mesh(ArmatureDrawContext *ctx,
DRWCallBuffer *buf;
if (surf || edges || ledges) {
- mul_m4_m4m4(inst_data.mat, ctx->ob->obmat, bone_mat);
+ mul_m4_m4m4(inst_data.mat, ctx->ob->object_to_world, bone_mat);
}
if (surf && ctx->custom_solid) {
@@ -692,7 +692,7 @@ static void drw_shgroup_bone_custom_mesh_wire(ArmatureDrawContext *ctx,
if (geom) {
DRWCallBuffer *buf = custom_bone_instance_shgroup(ctx, ctx->custom_wire, geom);
BoneInstanceData inst_data;
- mul_m4_m4m4(inst_data.mat, ctx->ob->obmat, bone_mat);
+ mul_m4_m4m4(inst_data.mat, ctx->ob->object_to_world, bone_mat);
OVERLAY_bone_instance_data_set_color_hint(&inst_data, color);
OVERLAY_bone_instance_data_set_color(&inst_data, color);
DRW_buffer_add_entry_struct(buf, inst_data.mat);
@@ -724,7 +724,7 @@ static void drw_shgroup_custom_bone_curve(ArmatureDrawContext *ctx,
if (ledges) {
BoneInstanceData inst_data;
- mul_m4_m4m4(inst_data.mat, ctx->ob->obmat, bone_mat);
+ mul_m4_m4m4(inst_data.mat, ctx->ob->object_to_world, bone_mat);
DRWCallBuffer *buf = custom_bone_instance_shgroup(ctx, ctx->custom_wire, ledges);
OVERLAY_bone_instance_data_set_color_hint(&inst_data, outline_color);
@@ -785,7 +785,7 @@ static void drw_shgroup_bone_custom_empty(ArmatureDrawContext *ctx,
{
const float final_color[4] = {color[0], color[1], color[2], 1.0f};
float mat[4][4];
- mul_m4_m4m4(mat, ctx->ob->obmat, bone_mat);
+ mul_m4_m4m4(mat, ctx->ob->object_to_world, bone_mat);
switch (custom->empty_drawtype) {
case OB_PLAINAXES:
@@ -811,7 +811,7 @@ static void drw_shgroup_bone_point(ArmatureDrawContext *ctx,
const float outline_color[4])
{
BoneInstanceData inst_data;
- mul_m4_m4m4(inst_data.mat, ctx->ob->obmat, bone_mat);
+ mul_m4_m4m4(inst_data.mat, ctx->ob->object_to_world, bone_mat);
if (ctx->point_solid) {
OVERLAY_bone_instance_data_set_color(&inst_data, bone_color);
OVERLAY_bone_instance_data_set_color_hint(&inst_data, hint_color);
@@ -829,7 +829,7 @@ static void drw_shgroup_bone_axes(ArmatureDrawContext *ctx,
const float color[4])
{
float mat[4][4];
- mul_m4_m4m4(mat, ctx->ob->obmat, bone_mat);
+ mul_m4_m4m4(mat, ctx->ob->object_to_world, bone_mat);
/* Move to bone tail. */
add_v3_v3(mat[3], mat[1]);
OVERLAY_empty_shape(ctx->extras, mat, 0.25f, OB_ARROWS, color);
@@ -842,8 +842,8 @@ static void drw_shgroup_bone_relationship_lines_ex(ArmatureDrawContext *ctx,
const float color[4])
{
float s[3], e[3];
- mul_v3_m4v3(s, ctx->ob->obmat, start);
- mul_v3_m4v3(e, ctx->ob->obmat, end);
+ mul_v3_m4v3(s, ctx->ob->object_to_world, start);
+ mul_v3_m4v3(e, ctx->ob->object_to_world, end);
/* reverse order to have less stipple overlap */
OVERLAY_extra_line_dashed(ctx->extras, s, e, color);
}
@@ -1909,7 +1909,7 @@ static void draw_bone_degrees_of_freedom(ArmatureDrawContext *ctx, bPoseChannel
mul_m4_m4m4(posetrans, posetrans, tmp);
/* into world space. */
- mul_m4_m4m4(inst_data.mat, ctx->ob->obmat, posetrans);
+ mul_m4_m4m4(inst_data.mat, ctx->ob->object_to_world, posetrans);
if ((pchan->ikflag & BONE_IK_XLIMIT) && (pchan->ikflag & BONE_IK_ZLIMIT)) {
bone_instance_data_set_angle_minmax(
@@ -2079,7 +2079,7 @@ static void draw_bone_name(ArmatureDrawContext *ctx,
float *head = pchan ? pchan->pose_head : eBone->head;
float *tail = pchan ? pchan->pose_tail : eBone->tail;
mid_v3_v3v3(vec, head, tail);
- mul_m4_v3(ctx->ob->obmat, vec);
+ mul_m4_v3(ctx->ob->object_to_world, vec);
DRW_text_cache_add(dt,
vec,
@@ -2177,7 +2177,8 @@ static bool pchan_culling_test_envelope(const DRWView *view,
BoundSphere bsphere;
pchan_culling_calc_bsphere(ob, pchan, &bsphere);
bsphere.radius += max_ff(pchan->bone->rad_head, pchan->bone->rad_tail) *
- mat4_to_size_max_axis(ob->obmat) * mat4_to_size_max_axis(pchan->disp_mat);
+ mat4_to_size_max_axis(ob->object_to_world) *
+ mat4_to_size_max_axis(pchan->disp_mat);
return DRW_culling_sphere_test(view, &bsphere);
}
@@ -2188,13 +2189,13 @@ static bool pchan_culling_test_bbone(const DRWView *view,
const bArmature *arm = static_cast<bArmature *>(ob->data);
BLI_assert(arm->drawtype == ARM_B_BONE);
UNUSED_VARS_NDEBUG(arm);
- const float ob_scale = mat4_to_size_max_axis(ob->obmat);
+ const float ob_scale = mat4_to_size_max_axis(ob->object_to_world);
const Mat4 *bbones_mat = (const Mat4 *)pchan->draw_data->bbone_matrix;
for (int i = pchan->bone->segments; i--; bbones_mat++) {
BoundSphere bsphere;
float size[3];
mat4_to_size(size, bbones_mat->mat);
- mul_v3_m4v3(bsphere.center, ob->obmat, bbones_mat->mat[3]);
+ mul_v3_m4v3(bsphere.center, ob->object_to_world, bbones_mat->mat[3]);
bsphere.radius = len_v3(size) * ob_scale;
if (DRW_culling_sphere_test(view, &bsphere)) {
return true;
diff --git a/source/blender/draw/engines/overlay/overlay_edit_text.cc b/source/blender/draw/engines/overlay/overlay_edit_text.cc
index ebadaa530e4..d1bca705ae6 100644
--- a/source/blender/draw/engines/overlay/overlay_edit_text.cc
+++ b/source/blender/draw/engines/overlay/overlay_edit_text.cc
@@ -119,7 +119,7 @@ static void edit_text_cache_populate_select(OVERLAY_Data *vedata, Object *ob)
add_v2_v2(box[3], &sb->x);
}
v2_quad_corners_to_mat4(box, final_mat);
- mul_m4_m4m4(final_mat, ob->obmat, final_mat);
+ mul_m4_m4m4(final_mat, ob->object_to_world, final_mat);
DRW_shgroup_call_obmat(pd->edit_text_selection_grp, geom, final_mat);
}
@@ -134,7 +134,7 @@ static void edit_text_cache_populate_cursor(OVERLAY_Data *vedata, Object *ob)
float mat[4][4];
v2_quad_corners_to_mat4(cursor, mat);
- mul_m4_m4m4(mat, ob->obmat, mat);
+ mul_m4_m4m4(mat, ob->object_to_world, mat);
struct GPUBatch *geom = DRW_cache_quad_get();
DRW_shgroup_call_obmat(pd->edit_text_cursor_grp, geom, mat);
@@ -162,7 +162,7 @@ static void edit_text_cache_populate_boxes(OVERLAY_Data *vedata, Object *ob)
vecs[3][1] -= tb->h;
for (int j = 0; j < 4; j++) {
- mul_v3_m4v3(vecs[j], ob->obmat, vecs[j]);
+ mul_v3_m4v3(vecs[j], ob->object_to_world, vecs[j]);
}
for (int j = 0; j < 4; j++) {
OVERLAY_extra_line_dashed(cb, vecs[j], vecs[(j + 1) % 4], color);
diff --git a/source/blender/draw/engines/overlay/overlay_extra.cc b/source/blender/draw/engines/overlay/overlay_extra.cc
index 114123ab36e..27afe49a17b 100644
--- a/source/blender/draw/engines/overlay/overlay_extra.cc
+++ b/source/blender/draw/engines/overlay/overlay_extra.cc
@@ -331,7 +331,7 @@ void OVERLAY_empty_cache_populate(OVERLAY_Data *vedata, Object *ob)
case OB_EMPTY_CONE:
case OB_ARROWS:
DRW_object_wire_theme_get(ob, view_layer, &color);
- OVERLAY_empty_shape(cb, ob->obmat, ob->empty_drawsize, ob->empty_drawtype, color);
+ OVERLAY_empty_shape(cb, ob->object_to_world, ob->empty_drawsize, ob->empty_drawtype, color);
break;
case OB_EMPTY_IMAGE:
OVERLAY_image_empty_cache_populate(vedata, ob);
@@ -372,7 +372,7 @@ static void OVERLAY_bounds(OVERLAY_ExtraCallBuffers *cb,
case OB_BOUND_BOX:
size_to_mat4(tmp, size);
copy_v3_v3(tmp[3], center);
- mul_m4_m4m4(tmp, ob->obmat, tmp);
+ mul_m4_m4m4(tmp, ob->object_to_world, tmp);
DRW_buffer_add_entry(cb->empty_cube, color, tmp);
break;
case OB_BOUND_SPHERE:
@@ -380,7 +380,7 @@ static void OVERLAY_bounds(OVERLAY_ExtraCallBuffers *cb,
size[1] = size[2] = size[0];
size_to_mat4(tmp, size);
copy_v3_v3(tmp[3], center);
- mul_m4_m4m4(tmp, ob->obmat, tmp);
+ mul_m4_m4m4(tmp, ob->object_to_world, tmp);
DRW_buffer_add_entry(cb->empty_sphere, color, tmp);
break;
case OB_BOUND_CYLINDER:
@@ -388,7 +388,7 @@ static void OVERLAY_bounds(OVERLAY_ExtraCallBuffers *cb,
size[1] = size[0];
size_to_mat4(tmp, size);
copy_v3_v3(tmp[3], center);
- mul_m4_m4m4(tmp, ob->obmat, tmp);
+ mul_m4_m4m4(tmp, ob->object_to_world, tmp);
DRW_buffer_add_entry(cb->empty_cylinder, color, tmp);
break;
case OB_BOUND_CONE:
@@ -399,7 +399,7 @@ static void OVERLAY_bounds(OVERLAY_ExtraCallBuffers *cb,
/* Cone batch has base at 0 and is pointing towards +Y. */
swap_v3_v3(tmp[1], tmp[2]);
tmp[3][2] -= size[2];
- mul_m4_m4m4(tmp, ob->obmat, tmp);
+ mul_m4_m4m4(tmp, ob->object_to_world, tmp);
DRW_buffer_add_entry(cb->empty_cone, color, tmp);
break;
case OB_BOUND_CAPSULE:
@@ -408,14 +408,14 @@ static void OVERLAY_bounds(OVERLAY_ExtraCallBuffers *cb,
scale_m4_fl(tmp, size[0]);
copy_v2_v2(tmp[3], center);
tmp[3][2] = center[2] + max_ff(0.0f, size[2] - size[0]);
- mul_m4_m4m4(final_mat, ob->obmat, tmp);
+ mul_m4_m4m4(final_mat, ob->object_to_world, tmp);
DRW_buffer_add_entry(cb->empty_capsule_cap, color, final_mat);
negate_v3(tmp[2]);
tmp[3][2] = center[2] - max_ff(0.0f, size[2] - size[0]);
- mul_m4_m4m4(final_mat, ob->obmat, tmp);
+ mul_m4_m4m4(final_mat, ob->object_to_world, tmp);
DRW_buffer_add_entry(cb->empty_capsule_cap, color, final_mat);
tmp[2][2] = max_ff(0.0f, size[2] * 2.0f - size[0] * 2.0f);
- mul_m4_m4m4(final_mat, ob->obmat, tmp);
+ mul_m4_m4m4(final_mat, ob->object_to_world, tmp);
DRW_buffer_add_entry(cb->empty_capsule_body, color, final_mat);
break;
}
@@ -489,7 +489,7 @@ static void OVERLAY_texture_space(OVERLAY_ExtraCallBuffers *cb, Object *ob, cons
unit_m4(mat);
}
- mul_m4_m4m4(mat, ob->obmat, mat);
+ mul_m4_m4m4(mat, ob->object_to_world, mat);
DRW_buffer_add_entry(cb->empty_cube, color, mat);
}
@@ -511,7 +511,7 @@ static void OVERLAY_forcefield(OVERLAY_ExtraCallBuffers *cb, Object *ob, ViewLay
};
} instdata;
- copy_m4_m4(instdata.mat, ob->obmat);
+ copy_m4_m4(instdata.mat, ob->object_to_world);
instdata.size_x = instdata.size_y = instdata.size_z = ob->empty_drawsize;
switch (pd->forcefield) {
@@ -531,16 +531,16 @@ static void OVERLAY_forcefield(OVERLAY_ExtraCallBuffers *cb, Object *ob, ViewLay
instdata.size_x = instdata.size_y = instdata.size_z = pd->f_strength;
float pos[4];
BKE_where_on_path(ob, 0.0f, pos, nullptr, nullptr, nullptr, nullptr);
- copy_v3_v3(instdata.pos, ob->obmat[3]);
+ copy_v3_v3(instdata.pos, ob->object_to_world[3]);
translate_m4(instdata.mat, pos[0], pos[1], pos[2]);
DRW_buffer_add_entry(cb->field_curve, color, &instdata);
BKE_where_on_path(ob, 1.0f, pos, nullptr, nullptr, nullptr, nullptr);
- copy_v3_v3(instdata.pos, ob->obmat[3]);
+ copy_v3_v3(instdata.pos, ob->object_to_world[3]);
translate_m4(instdata.mat, pos[0], pos[1], pos[2]);
DRW_buffer_add_entry(cb->field_sphere_limit, color, &instdata);
/* Restore */
- copy_v3_v3(instdata.pos, ob->obmat[3]);
+ copy_v3_v3(instdata.pos, ob->object_to_world[3]);
}
break;
}
@@ -625,7 +625,7 @@ void OVERLAY_light_cache_populate(OVERLAY_Data *vedata, Object *ob)
};
} instdata;
- copy_m4_m4(instdata.mat, ob->obmat);
+ copy_m4_m4(instdata.mat, ob->object_to_world);
/* FIXME / TODO: clip_end has no meaning nowadays.
* In EEVEE, Only clip_sta is used shadow-mapping.
* Clip end is computed automatically based on light power.
@@ -708,7 +708,7 @@ void OVERLAY_lightprobe_cache_populate(OVERLAY_Data *vedata, Object *ob)
};
} instdata;
- copy_m4_m4(instdata.mat, ob->obmat);
+ copy_m4_m4(instdata.mat, ob->object_to_world);
switch (prb->type) {
case LIGHTPROBE_TYPE_CUBE:
@@ -720,15 +720,15 @@ void OVERLAY_lightprobe_cache_populate(OVERLAY_Data *vedata, Object *ob)
if (show_influence) {
char shape = (prb->attenuation_type == LIGHTPROBE_SHAPE_BOX) ? OB_CUBE : OB_EMPTY_SPHERE;
float f = 1.0f - prb->falloff;
- OVERLAY_empty_shape(cb, ob->obmat, prb->distinf, shape, color_p);
- OVERLAY_empty_shape(cb, ob->obmat, prb->distinf * f, shape, color_p);
+ OVERLAY_empty_shape(cb, ob->object_to_world, prb->distinf, shape, color_p);
+ OVERLAY_empty_shape(cb, ob->object_to_world, prb->distinf * f, shape, color_p);
}
if (show_parallax) {
char shape = (prb->parallax_type == LIGHTPROBE_SHAPE_BOX) ? OB_CUBE : OB_EMPTY_SPHERE;
float dist = ((prb->flag & LIGHTPROBE_FLAG_CUSTOM_PARALLAX) != 0) ? prb->distpar :
prb->distinf;
- OVERLAY_empty_shape(cb, ob->obmat, dist, shape, color_p);
+ OVERLAY_empty_shape(cb, ob->object_to_world, dist, shape, color_p);
}
break;
case LIGHTPROBE_TYPE_GRID:
@@ -738,8 +738,8 @@ void OVERLAY_lightprobe_cache_populate(OVERLAY_Data *vedata, Object *ob)
if (show_influence) {
float f = 1.0f - prb->falloff;
- OVERLAY_empty_shape(cb, ob->obmat, 1.0 + prb->distinf, OB_CUBE, color_p);
- OVERLAY_empty_shape(cb, ob->obmat, 1.0 + prb->distinf * f, OB_CUBE, color_p);
+ OVERLAY_empty_shape(cb, ob->object_to_world, 1.0 + prb->distinf, OB_CUBE, color_p);
+ OVERLAY_empty_shape(cb, ob->object_to_world, 1.0 + prb->distinf * f, OB_CUBE, color_p);
}
/* Data dots */
@@ -777,7 +777,7 @@ void OVERLAY_lightprobe_cache_populate(OVERLAY_Data *vedata, Object *ob)
zero_v3(instdata.mat[2]);
DRW_buffer_add_entry(cb->empty_cube, color_p, &instdata);
- normalize_m4_m4(instdata.mat, ob->obmat);
+ normalize_m4_m4(instdata.mat, ob->object_to_world);
OVERLAY_empty_shape(cb, instdata.mat, ob->empty_drawsize, OB_SINGLE_ARROW, color_p);
break;
}
@@ -797,7 +797,7 @@ void OVERLAY_speaker_cache_populate(OVERLAY_Data *vedata, Object *ob)
float *color_p;
DRW_object_wire_theme_get(ob, view_layer, &color_p);
- DRW_buffer_add_entry(cb->speaker, color_p, ob->obmat);
+ DRW_buffer_add_entry(cb->speaker, color_p, ob->object_to_world);
}
/** \} */
@@ -890,7 +890,7 @@ static void camera_view3d_reconstruction(
float object_imat[4][4];
invert_m4_m4(object_imat, object_mat);
- mul_m4_m4m4(tracking_object_mat, ob->obmat, object_imat);
+ mul_m4_m4m4(tracking_object_mat, ob->object_to_world, object_imat);
}
ListBase *tracksbase = BKE_tracking_object_get_tracks(tracking, tracking_object);
@@ -1132,14 +1132,17 @@ void OVERLAY_camera_cache_populate(OVERLAY_Data *vedata, Object *ob)
DRW_object_wire_theme_get(ob, view_layer, &color_p);
copy_v4_v4(instdata.color, color_p);
- normalize_m4_m4(instdata.mat, ob->obmat);
+ normalize_m4_m4(instdata.mat, ob->object_to_world);
/* BKE_camera_multiview_model_matrix already accounts for scale, don't do it here. */
if (is_selection_camera_stereo) {
copy_v3_fl(scale, 1.0f);
}
else {
- copy_v3_fl3(scale, len_v3(ob->obmat[0]), len_v3(ob->obmat[1]), len_v3(ob->obmat[2]));
+ copy_v3_fl3(scale,
+ len_v3(ob->object_to_world[0]),
+ len_v3(ob->object_to_world[1]),
+ len_v3(ob->object_to_world[2]));
/* Avoid division by 0. */
if (ELEM(0.0f, scale[0], scale[1], scale[2])) {
return;
@@ -1255,7 +1258,7 @@ static void OVERLAY_relationship_lines(OVERLAY_ExtraCallBuffers *cb,
if (ob->parent && (DRW_object_visibility_in_active_context(ob->parent) & OB_VISIBLE_SELF)) {
float *parent_pos = ob->runtime.parent_display_origin;
- OVERLAY_extra_line_dashed(cb, parent_pos, ob->obmat[3], relation_color);
+ OVERLAY_extra_line_dashed(cb, parent_pos, ob->object_to_world[3], relation_color);
}
/* Drawing the hook lines. */
@@ -1263,9 +1266,9 @@ static void OVERLAY_relationship_lines(OVERLAY_ExtraCallBuffers *cb,
if (md->type == eModifierType_Hook) {
HookModifierData *hmd = (HookModifierData *)md;
float center[3];
- mul_v3_m4v3(center, ob->obmat, hmd->cent);
+ mul_v3_m4v3(center, ob->object_to_world, hmd->cent);
if (hmd->object) {
- OVERLAY_extra_line_dashed(cb, hmd->object->obmat[3], center, relation_color);
+ OVERLAY_extra_line_dashed(cb, hmd->object->object_to_world[3], center, relation_color);
}
OVERLAY_extra_point(cb, center, relation_color);
}
@@ -1275,10 +1278,12 @@ static void OVERLAY_relationship_lines(OVERLAY_ExtraCallBuffers *cb,
Object *rbc_ob1 = ob->rigidbody_constraint->ob1;
Object *rbc_ob2 = ob->rigidbody_constraint->ob2;
if (rbc_ob1 && (DRW_object_visibility_in_active_context(rbc_ob1) & OB_VISIBLE_SELF)) {
- OVERLAY_extra_line_dashed(cb, rbc_ob1->obmat[3], ob->obmat[3], relation_color);
+ OVERLAY_extra_line_dashed(
+ cb, rbc_ob1->object_to_world[3], ob->object_to_world[3], relation_color);
}
if (rbc_ob2 && (DRW_object_visibility_in_active_context(rbc_ob2) & OB_VISIBLE_SELF)) {
- OVERLAY_extra_line_dashed(cb, rbc_ob2->obmat[3], ob->obmat[3], relation_color);
+ OVERLAY_extra_line_dashed(
+ cb, rbc_ob2->object_to_world[3], ob->object_to_world[3], relation_color);
}
}
@@ -1307,7 +1312,8 @@ static void OVERLAY_relationship_lines(OVERLAY_ExtraCallBuffers *cb,
}
if (camob) {
- OVERLAY_extra_line_dashed(cb, camob->obmat[3], ob->obmat[3], constraint_color);
+ OVERLAY_extra_line_dashed(
+ cb, camob->object_to_world[3], ob->object_to_world[3], constraint_color);
}
}
else {
@@ -1330,7 +1336,7 @@ static void OVERLAY_relationship_lines(OVERLAY_ExtraCallBuffers *cb,
else {
unit_m4(ct->matrix);
}
- OVERLAY_extra_line_dashed(cb, ct->matrix[3], ob->obmat[3], constraint_color);
+ OVERLAY_extra_line_dashed(cb, ct->matrix[3], ob->object_to_world[3], constraint_color);
}
BKE_constraint_targets_flush(curcon, &targets, true);
@@ -1387,7 +1393,7 @@ static void OVERLAY_volume_extra(OVERLAY_ExtraCallBuffers *cb,
copy_v3_v3(voxel_cubemat[3], min);
/* move small cube into the domain (otherwise its centered on vertex of domain object) */
translate_m4(voxel_cubemat, 1.0f, 1.0f, 1.0f);
- mul_m4_m4m4(voxel_cubemat, ob->obmat, voxel_cubemat);
+ mul_m4_m4m4(voxel_cubemat, ob->object_to_world, voxel_cubemat);
DRW_buffer_add_entry(cb->empty_cube, color, voxel_cubemat);
}
@@ -1493,15 +1499,15 @@ static void OVERLAY_object_center(OVERLAY_ExtraCallBuffers *cb,
const bool is_library = ID_REAL_USERS(&ob->id) > 1 || ID_IS_LINKED(ob);
BKE_view_layer_synced_ensure(scene, view_layer);
if (ob == BKE_view_layer_active_object_get(view_layer)) {
- DRW_buffer_add_entry(cb->center_active, ob->obmat[3]);
+ DRW_buffer_add_entry(cb->center_active, ob->object_to_world[3]);
}
else if (ob->base_flag & BASE_SELECTED) {
DRWCallBuffer *cbuf = (is_library) ? cb->center_selected_lib : cb->center_selected;
- DRW_buffer_add_entry(cbuf, ob->obmat[3]);
+ DRW_buffer_add_entry(cbuf, ob->object_to_world[3]);
}
else if (pd->v3d_flag & V3D_DRAW_CENTERS) {
DRWCallBuffer *cbuf = (is_library) ? cb->center_deselected_lib : cb->center_deselected;
- DRW_buffer_add_entry(cbuf, ob->obmat[3]);
+ DRW_buffer_add_entry(cbuf, ob->object_to_world[3]);
}
}
@@ -1513,7 +1519,7 @@ static void OVERLAY_object_name(Object *ob, int theme_id)
UI_GetThemeColor4ubv(theme_id, color);
DRW_text_cache_add(dt,
- ob->obmat[3],
+ ob->object_to_world[3],
ob->id.name + 2,
strlen(ob->id.name + 2),
10,
@@ -1571,7 +1577,7 @@ void OVERLAY_extra_cache_populate(OVERLAY_Data *vedata, Object *ob)
/* Helpers for when we're transforming origins. */
if (draw_xform) {
const float color_xform[4] = {0.15f, 0.15f, 0.15f, 0.7f};
- DRW_buffer_add_entry(cb->origin_xform, color_xform, ob->obmat);
+ DRW_buffer_add_entry(cb->origin_xform, color_xform, ob->object_to_world);
}
/* don't show object extras in set's */
if (!from_dupli) {
@@ -1591,7 +1597,7 @@ void OVERLAY_extra_cache_populate(OVERLAY_Data *vedata, Object *ob)
OVERLAY_collision(cb, ob, color);
}
if (ob->dtx & OB_AXIS) {
- DRW_buffer_add_entry(cb->empty_axes, color, ob->obmat);
+ DRW_buffer_add_entry(cb->empty_axes, color, ob->object_to_world);
}
if (draw_volume) {
OVERLAY_volume_extra(cb, vedata, ob, md, scene, color);
diff --git a/source/blender/draw/engines/overlay/overlay_gpencil.cc b/source/blender/draw/engines/overlay/overlay_gpencil.cc
index 30765b30ce6..f5988d91e72 100644
--- a/source/blender/draw/engines/overlay/overlay_gpencil.cc
+++ b/source/blender/draw/engines/overlay/overlay_gpencil.cc
@@ -243,7 +243,7 @@ void OVERLAY_gpencil_cache_init(OVERLAY_Data *vedata)
copy_v3_v3(col_grid, gpd->grid.color);
col_grid[3] = max_ff(v3d->overlay.gpencil_grid_opacity, 0.01f);
- copy_m4_m4(mat, ob->obmat);
+ copy_m4_m4(mat, ob->object_to_world);
/* Rotate and scale except align to cursor. */
bGPDlayer *gpl = BKE_gpencil_layer_active_get(gpd);
@@ -286,7 +286,7 @@ void OVERLAY_gpencil_cache_init(OVERLAY_Data *vedata)
copy_v3_v3(mat[3], cursor->location);
}
else if (ts->gpencil_v3d_align & GP_PROJECT_VIEWSPACE) {
- copy_v3_v3(mat[3], ob->obmat[3]);
+ copy_v3_v3(mat[3], ob->object_to_world[3]);
}
translate_m4(mat, gpd->grid.offset[0], gpd->grid.offset[1], 0.0f);
@@ -397,7 +397,7 @@ static void overlay_gpencil_draw_stroke_color_name(bGPDlayer * /*gpl*/,
UI_GetThemeColor4ubv(theme_id, color);
float fpt[3];
- mul_v3_m4v3(fpt, ob->obmat, &pt->x);
+ mul_v3_m4v3(fpt, ob->object_to_world, &pt->x);
struct DRWTextStore *dt = DRW_text_cache_ensure();
DRW_text_cache_add(dt,
diff --git a/source/blender/draw/engines/overlay/overlay_image.cc b/source/blender/draw/engines/overlay/overlay_image.cc
index f42867622e4..7b99bd6bd18 100644
--- a/source/blender/draw/engines/overlay/overlay_image.cc
+++ b/source/blender/draw/engines/overlay/overlay_image.cc
@@ -392,7 +392,7 @@ void OVERLAY_image_empty_cache_populate(OVERLAY_Data *vedata, Object *ob)
float image_aspect[2];
overlay_image_calc_aspect(ima, size, image_aspect);
- copy_m4_m4(mat, ob->obmat);
+ copy_m4_m4(mat, ob->object_to_world);
mul_v3_fl(mat[0], image_aspect[0] * 0.5f * ob->empty_drawsize);
mul_v3_fl(mat[1], image_aspect[1] * 0.5f * ob->empty_drawsize);
madd_v3_v3fl(mat[3], mat[0], ob->ima_ofs[0] * 2.0f + 1.0f);
diff --git a/source/blender/draw/engines/overlay/overlay_lattice.cc b/source/blender/draw/engines/overlay/overlay_lattice.cc
index 7b59aa78c89..72c3335d871 100644
--- a/source/blender/draw/engines/overlay/overlay_lattice.cc
+++ b/source/blender/draw/engines/overlay/overlay_lattice.cc
@@ -52,7 +52,7 @@ void OVERLAY_lattice_cache_populate(OVERLAY_Data *vedata, Object *ob)
DRW_object_wire_theme_get(ob, draw_ctx->view_layer, &color);
struct GPUBatch *geom = DRW_cache_lattice_wire_get(ob, false);
- OVERLAY_extra_wire(cb, geom, ob->obmat, color);
+ OVERLAY_extra_wire(cb, geom, ob->object_to_world, color);
}
void OVERLAY_edit_lattice_draw(OVERLAY_Data *vedata)
diff --git a/source/blender/draw/engines/overlay/overlay_metaball.cc b/source/blender/draw/engines/overlay/overlay_metaball.cc
index 2fc6910fe44..dd0a862337e 100644
--- a/source/blender/draw/engines/overlay/overlay_metaball.cc
+++ b/source/blender/draw/engines/overlay/overlay_metaball.cc
@@ -45,10 +45,10 @@ static void metaball_instance_data_set(
BoneInstanceData *data, Object *ob, const float *pos, const float radius, const float color[4])
{
/* Bone point radius is 0.05. Compensate for that. */
- mul_v3_v3fl(data->mat[0], ob->obmat[0], radius / 0.05f);
- mul_v3_v3fl(data->mat[1], ob->obmat[1], radius / 0.05f);
- mul_v3_v3fl(data->mat[2], ob->obmat[2], radius / 0.05f);
- mul_v3_m4v3(data->mat[3], ob->obmat, pos);
+ mul_v3_v3fl(data->mat[0], ob->object_to_world[0], radius / 0.05f);
+ mul_v3_v3fl(data->mat[1], ob->object_to_world[1], radius / 0.05f);
+ mul_v3_v3fl(data->mat[2], ob->object_to_world[2], radius / 0.05f);
+ mul_v3_m4v3(data->mat[3], ob->object_to_world, pos);
/* WATCH: Reminder, alpha is wire-size. */
OVERLAY_bone_instance_data_set_color(data, color);
}
diff --git a/source/blender/draw/engines/overlay/overlay_outline.cc b/source/blender/draw/engines/overlay/overlay_outline.cc
index 3213fe144e9..c2df665eba3 100644
--- a/source/blender/draw/engines/overlay/overlay_outline.cc
+++ b/source/blender/draw/engines/overlay/overlay_outline.cc
@@ -43,7 +43,7 @@ static void gpencil_depth_plane(Object *ob, float r_plane[4])
add_v3_fl(size, 1e-8f);
rescale_m4(mat, size);
/* BBox space to World. */
- mul_m4_m4m4(mat, ob->obmat, mat);
+ mul_m4_m4m4(mat, ob->object_to_world, mat);
/* BBox center in world space. */
copy_v3_v3(center, mat[3]);
/* View Vector. */
@@ -188,7 +188,7 @@ static void gpencil_layer_cache_populate(bGPDlayer *gpl,
const bool is_screenspace = (gpd->flag & GP_DATA_STROKE_KEEPTHICKNESS) != 0;
const bool is_stroke_order_3d = (gpd->draw_mode == GP_DRAWMODE_3D);
- float object_scale = mat4_to_scale(iter->ob->obmat);
+ float object_scale = mat4_to_scale(iter->ob->object_to_world);
/* Negate thickness sign to tag that strokes are in screen space.
* Convert to world units (by default, 1 meter = 2000 pixels). */
float thickness_scale = (is_screenspace) ? -1.0f : (gpd->pixfactor / 2000.0f);
diff --git a/source/blender/draw/engines/overlay/overlay_viewer_attribute.cc b/source/blender/draw/engines/overlay/overlay_viewer_attribute.cc
index c0d74ea73f3..fd1657b3d59 100644
--- a/source/blender/draw/engines/overlay/overlay_viewer_attribute.cc
+++ b/source/blender/draw/engines/overlay/overlay_viewer_attribute.cc
@@ -90,7 +90,7 @@ static void populate_cache_for_instance(Object &object,
DRWShadingGroup *sub_grp = DRW_shgroup_create_sub(pd.viewer_attribute_instance_grp);
DRW_shgroup_uniform_vec4_copy(sub_grp, "ucolor", color);
GPUBatch *batch = DRW_cache_curve_edge_wire_get(&object);
- DRW_shgroup_call_obmat(sub_grp, batch, object.obmat);
+ DRW_shgroup_call_obmat(sub_grp, batch, object.object_to_world);
break;
}
case OB_CURVES: {
@@ -135,7 +135,7 @@ static void populate_cache_for_geometry(Object &object,
if (curves.attributes().contains(".viewer")) {
GPUBatch *batch = DRW_cache_curve_edge_wire_viewer_attribute_get(&object);
DRW_shgroup_uniform_float_copy(pd.viewer_attribute_curve_grp, "opacity", opacity);
- DRW_shgroup_call_obmat(pd.viewer_attribute_curve_grp, batch, object.obmat);
+ DRW_shgroup_call_obmat(pd.viewer_attribute_curve_grp, batch, object.object_to_world);
}
break;
}
diff --git a/source/blender/draw/engines/overlay/overlay_wireframe.cc b/source/blender/draw/engines/overlay/overlay_wireframe.cc
index 7ee0e89f2f9..7053d0039cf 100644
--- a/source/blender/draw/engines/overlay/overlay_wireframe.cc
+++ b/source/blender/draw/engines/overlay/overlay_wireframe.cc
@@ -132,12 +132,12 @@ static void wireframe_hair_cache_populate(OVERLAY_Data *vedata, Object *ob, Part
if (collection != nullptr) {
sub_v3_v3(dupli_mat[3], collection->instance_offset);
}
- mul_m4_m4m4(dupli_mat, dupli_parent->obmat, dupli_mat);
+ mul_m4_m4m4(dupli_mat, dupli_parent->object_to_world, dupli_mat);
}
else {
- copy_m4_m4(dupli_mat, dupli_object->ob->obmat);
+ copy_m4_m4(dupli_mat, dupli_object->ob->object_to_world);
invert_m4(dupli_mat);
- mul_m4_m4m4(dupli_mat, ob->obmat, dupli_mat);
+ mul_m4_m4m4(dupli_mat, ob->object_to_world, dupli_mat);
}
}
else {
@@ -217,7 +217,7 @@ void OVERLAY_wireframe_cache_populate(OVERLAY_Data *vedata,
}
if (geom) {
- OVERLAY_extra_wire(cb, geom, ob->obmat, color);
+ OVERLAY_extra_wire(cb, geom, ob->object_to_world, color);
}
}
@@ -230,12 +230,12 @@ void OVERLAY_wireframe_cache_populate(OVERLAY_Data *vedata,
if (dupli->wire_shgrp == cb->extra_loose_points) {
float *color;
DRW_object_wire_theme_get(ob, draw_ctx->view_layer, &color);
- OVERLAY_extra_loose_points(cb, dupli->wire_geom, ob->obmat, color);
+ OVERLAY_extra_loose_points(cb, dupli->wire_geom, ob->object_to_world, color);
}
else if (dupli->wire_shgrp == cb->extra_wire) {
float *color;
DRW_object_wire_theme_get(ob, draw_ctx->view_layer, &color);
- OVERLAY_extra_wire(cb, dupli->wire_geom, ob->obmat, color);
+ OVERLAY_extra_wire(cb, dupli->wire_geom, ob->object_to_world, color);
}
else {
DRW_shgroup_call(dupli->wire_shgrp, dupli->wire_geom, ob);
@@ -264,7 +264,7 @@ void OVERLAY_wireframe_cache_populate(OVERLAY_Data *vedata,
struct GPUBatch *geom = DRW_cache_object_face_wireframe_get(ob);
if (geom) {
- OVERLAY_extra_loose_points(cb, geom, ob->obmat, color);
+ OVERLAY_extra_loose_points(cb, geom, ob->object_to_world, color);
}
return;
}
@@ -318,14 +318,14 @@ void OVERLAY_wireframe_cache_populate(OVERLAY_Data *vedata,
if (is_mesh_verts_only) {
geom = DRW_cache_mesh_all_verts_get(ob);
if (geom) {
- OVERLAY_extra_loose_points(cb, geom, ob->obmat, color);
+ OVERLAY_extra_loose_points(cb, geom, ob->object_to_world, color);
shgrp = cb->extra_loose_points;
}
}
else {
geom = DRW_cache_mesh_loose_edges_get(ob);
if (geom) {
- OVERLAY_extra_wire(cb, geom, ob->obmat, color);
+ OVERLAY_extra_wire(cb, geom, ob->object_to_world, color);
shgrp = cb->extra_wire;
}
}
diff --git a/source/blender/draw/engines/select/select_engine.c b/source/blender/draw/engines/select/select_engine.c
index 026a1f52ac1..07e2a42b808 100644
--- a/source/blender/draw/engines/select/select_engine.c
+++ b/source/blender/draw/engines/select/select_engine.c
@@ -205,7 +205,7 @@ static void select_cache_populate(void *vedata, Object *ob)
struct Mesh *me = ob->data;
if (e_data.context.select_mode & SCE_SELECT_FACE) {
struct GPUBatch *geom_faces = DRW_mesh_batch_cache_get_triangles_with_select_id(me);
- DRW_shgroup_call_obmat(stl->g_data->shgrp_depth_only, geom_faces, ob->obmat);
+ DRW_shgroup_call_obmat(stl->g_data->shgrp_depth_only, geom_faces, ob->object_to_world);
}
else if (ob->dt >= OB_SOLID) {
#ifdef USE_CAGE_OCCLUSION
@@ -213,17 +213,17 @@ static void select_cache_populate(void *vedata, Object *ob)
#else
struct GPUBatch *geom_faces = DRW_mesh_batch_cache_get_surface(me);
#endif
- DRW_shgroup_call_obmat(stl->g_data->shgrp_depth_only, geom_faces, ob->obmat);
+ DRW_shgroup_call_obmat(stl->g_data->shgrp_depth_only, geom_faces, ob->object_to_world);
}
if (e_data.context.select_mode & SCE_SELECT_EDGE) {
struct GPUBatch *geom_edges = DRW_mesh_batch_cache_get_edges_with_select_id(me);
- DRW_shgroup_call_obmat(stl->g_data->shgrp_depth_only, geom_edges, ob->obmat);
+ DRW_shgroup_call_obmat(stl->g_data->shgrp_depth_only, geom_edges, ob->object_to_world);
}
if (e_data.context.select_mode & SCE_SELECT_VERTEX) {
struct GPUBatch *geom_verts = DRW_mesh_batch_cache_get_verts_with_select_id(me);
- DRW_shgroup_call_obmat(stl->g_data->shgrp_depth_only, geom_verts, ob->obmat);
+ DRW_shgroup_call_obmat(stl->g_data->shgrp_depth_only, geom_verts, ob->object_to_world);
}
return;
}
@@ -231,7 +231,7 @@ static void select_cache_populate(void *vedata, Object *ob)
float min[3], max[3];
select_id_object_min_max(ob, min, max);
- if (DRW_culling_min_max_test(stl->g_data->view_subregion, ob->obmat, min, max)) {
+ if (DRW_culling_min_max_test(stl->g_data->view_subregion, ob->object_to_world, min, max)) {
if (sel_data == NULL) {
sel_data = (SELECTID_ObjectData *)DRW_drawdata_ensure(
&ob->id, &draw_engine_select_type, sizeof(SELECTID_ObjectData), NULL, NULL);
diff --git a/source/blender/draw/engines/workbench/workbench_effect_dof.c b/source/blender/draw/engines/workbench/workbench_effect_dof.c
index 58d49cf226e..a7247f4e9a6 100644
--- a/source/blender/draw/engines/workbench/workbench_effect_dof.c
+++ b/source/blender/draw/engines/workbench/workbench_effect_dof.c
@@ -128,7 +128,7 @@ void workbench_dof_engine_init(WORKBENCH_Data *vedata)
camera = wpd->cam_original_ob;
}
- Camera *cam = camera != NULL ? camera->data : NULL;
+ Camera *cam = camera != NULL && camera->type == OB_CAMERA ? camera->data : NULL;
if ((wpd->shading.flag & V3D_SHADING_DEPTH_OF_FIELD) == 0 || (cam == NULL) ||
((cam->dof.flag & CAM_DOF_ENABLED) == 0)) {
wpd->dof_enabled = false;
diff --git a/source/blender/draw/engines/workbench/workbench_materials.c b/source/blender/draw/engines/workbench/workbench_materials.c
index 4744c0db6ce..7c5e8313532 100644
--- a/source/blender/draw/engines/workbench/workbench_materials.c
+++ b/source/blender/draw/engines/workbench/workbench_materials.c
@@ -88,14 +88,14 @@ BLI_INLINE Material *workbench_object_material_get(Object *ob, int mat_nr)
BLI_INLINE void workbench_material_get_image(
Object *ob, int mat_nr, Image **r_image, ImageUser **r_iuser, eGPUSamplerState *r_sampler)
{
- bNode *node;
+ const bNode *node;
*r_sampler = 0;
ED_object_get_active_image(ob, mat_nr, r_image, r_iuser, &node, NULL);
if (node && *r_image) {
switch (node->type) {
case SH_NODE_TEX_IMAGE: {
- NodeTexImage *storage = node->storage;
+ const NodeTexImage *storage = node->storage;
const bool use_filter = (storage->interpolation != SHD_INTERP_CLOSEST);
const bool use_repeat = (storage->extension == SHD_IMAGE_EXTENSION_REPEAT);
const bool use_clip = (storage->extension == SHD_IMAGE_EXTENSION_CLIP);
@@ -105,7 +105,7 @@ BLI_INLINE void workbench_material_get_image(
break;
}
case SH_NODE_TEX_ENVIRONMENT: {
- NodeTexEnvironment *storage = node->storage;
+ const NodeTexEnvironment *storage = node->storage;
const bool use_filter = (storage->interpolation != SHD_INTERP_CLOSEST);
SET_FLAG_FROM_TEST(*r_sampler, use_filter, GPU_SAMPLER_FILTER);
break;
diff --git a/source/blender/draw/engines/workbench/workbench_shadow.c b/source/blender/draw/engines/workbench/workbench_shadow.c
index 0b34e849049..211c0e27418 100644
--- a/source/blender/draw/engines/workbench/workbench_shadow.c
+++ b/source/blender/draw/engines/workbench/workbench_shadow.c
@@ -172,7 +172,7 @@ static const BoundBox *workbench_shadow_object_shadow_bbox_get(WORKBENCH_Private
{
if (oed->shadow_bbox_dirty || wpd->shadow_changed) {
float tmp_mat[4][4];
- mul_m4_m4m4(tmp_mat, wpd->shadow_inv, ob->obmat);
+ mul_m4_m4m4(tmp_mat, wpd->shadow_inv, ob->object_to_world);
/* Get AABB in shadow space. */
INIT_MINMAX(oed->shadow_min, oed->shadow_max);
@@ -307,7 +307,8 @@ void workbench_shadow_cache_populate(WORKBENCH_Data *data, Object *ob, const boo
NULL);
if (workbench_shadow_object_cast_visible_shadow(wpd, ob, engine_object_data)) {
- mul_v3_mat3_m4v3(engine_object_data->shadow_dir, ob->imat, wpd->shadow_direction_ws);
+ mul_v3_mat3_m4v3(
+ engine_object_data->shadow_dir, ob->world_to_object, wpd->shadow_direction_ws);
DRWShadingGroup *grp;
bool use_shadow_pass_technique = !workbench_shadow_camera_in_object_shadow(
diff --git a/source/blender/draw/engines/workbench/workbench_volume.c b/source/blender/draw/engines/workbench/workbench_volume.c
index ce7773e7439..7c6df93f5a3 100644
--- a/source/blender/draw/engines/workbench/workbench_volume.c
+++ b/source/blender/draw/engines/workbench/workbench_volume.c
@@ -237,7 +237,7 @@ static void workbench_volume_object_cache_populate(WORKBENCH_Data *vedata,
/* Combined texture to object, and object to world transform. */
float texture_to_world[4][4];
- mul_m4_m4m4(texture_to_world, ob->obmat, grid->texture_to_object);
+ mul_m4_m4m4(texture_to_world, ob->object_to_world, grid->texture_to_object);
if (use_slice) {
float invviewmat[4][4];
@@ -291,7 +291,7 @@ static void workbench_volume_object_cache_populate(WORKBENCH_Data *vedata,
/* Compute density scale. */
const float density_scale = volume->display.density *
- BKE_volume_density_scale(volume, ob->obmat);
+ BKE_volume_density_scale(volume, ob->object_to_world);
DRW_shgroup_uniform_texture(grp, "densityTexture", grid->texture);
/* TODO: implement shadow texture, see manta_smoke_calc_transparency. */
diff --git a/source/blender/draw/intern/draw_cache_impl_curves.cc b/source/blender/draw/intern/draw_cache_impl_curves.cc
index c36b90ec32e..0322d048fa5 100644
--- a/source/blender/draw/intern/draw_cache_impl_curves.cc
+++ b/source/blender/draw/intern/draw_cache_impl_curves.cc
@@ -252,7 +252,7 @@ static void curves_batch_cache_fill_segments_proc_pos(
static void curves_batch_cache_ensure_procedural_pos(const Curves &curves,
CurvesEvalCache &cache,
- GPUMaterial *gpu_material)
+ GPUMaterial *UNUSED(gpu_material))
{
if (cache.proc_point_buf == nullptr || DRW_vbo_requested(cache.proc_point_buf)) {
/* Initialize vertex format. */
@@ -331,7 +331,7 @@ static void curves_batch_cache_ensure_procedural_final_attr(CurvesEvalCache &cac
const GPUVertFormat *format,
const int subdiv,
const int index,
- const char *name)
+ const char *UNUSED(name))
{
CurvesEvalFinalCache &final_cache = cache.final[subdiv];
final_cache.attributes_buf[index] = GPU_vertbuf_create_with_format_ex(
diff --git a/source/blender/draw/intern/draw_cache_impl_gpencil.cc b/source/blender/draw/intern/draw_cache_impl_gpencil.cc
index 3d6d2631186..6860fae744b 100644
--- a/source/blender/draw/intern/draw_cache_impl_gpencil.cc
+++ b/source/blender/draw/intern/draw_cache_impl_gpencil.cc
@@ -612,7 +612,7 @@ static void gpencil_sbuffer_stroke_ensure(bGPdata *gpd, bool do_fill)
for (int i = 0; i < vert_len; i++) {
ED_gpencil_tpoint_to_point(region, origin, &tpoints[i], &gps->points[i]);
- mul_m4_v3(ob->imat, &gps->points[i].x);
+ mul_m4_v3(ob->world_to_object, &gps->points[i].x);
bGPDspoint *pt = &gps->points[i];
copy_v4_v4(pt->vert_color, tpoints[i].vert_color);
}
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.cc b/source/blender/draw/intern/draw_cache_impl_mesh.cc
index 5ce658abfe4..031de3e4ef2 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.cc
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.cc
@@ -1889,7 +1889,7 @@ void DRW_mesh_batch_cache_create_requested(struct TaskGraph *task_graph,
is_editmode,
is_paint_mode,
is_mode_active,
- ob->obmat,
+ ob->object_to_world,
false,
true,
scene,
@@ -1906,7 +1906,7 @@ void DRW_mesh_batch_cache_create_requested(struct TaskGraph *task_graph,
is_editmode,
is_paint_mode,
is_mode_active,
- ob->obmat,
+ ob->object_to_world,
false,
false,
scene,
@@ -1922,7 +1922,7 @@ void DRW_mesh_batch_cache_create_requested(struct TaskGraph *task_graph,
is_editmode,
is_paint_mode,
is_mode_active,
- ob->obmat,
+ ob->object_to_world,
true,
false,
do_cage,
@@ -1943,7 +1943,7 @@ void DRW_mesh_batch_cache_create_requested(struct TaskGraph *task_graph,
is_editmode,
is_paint_mode,
is_mode_active,
- ob->obmat,
+ ob->object_to_world,
true,
false,
scene,
diff --git a/source/blender/draw/intern/draw_cache_impl_pointcloud.cc b/source/blender/draw/intern/draw_cache_impl_pointcloud.cc
index d64fc581942..ddbfe232361 100644
--- a/source/blender/draw/intern/draw_cache_impl_pointcloud.cc
+++ b/source/blender/draw/intern/draw_cache_impl_pointcloud.cc
@@ -38,7 +38,7 @@ using namespace blender;
/** \name GPUBatch cache management
* \{ */
-struct PointCloudBatchCache {
+struct PointCloudEvalCache {
/* Dot primitive types. */
GPUBatch *dots;
/* Triangle primitive types. */
@@ -69,10 +69,15 @@ struct PointCloudBatchCache {
* user preferences (`U.vbotimeout`) then garbage collection is performed.
*/
int last_attr_matching_time;
- /* settings to determine if cache is invalid */
- bool is_dirty;
int mat_len;
+};
+
+struct PointCloudBatchCache {
+ PointCloudEvalCache eval_cache;
+
+ /* settings to determine if cache is invalid */
+ bool is_dirty;
/**
* The draw cache extraction is currently not multi-threaded for multiple objects, but if it was,
@@ -94,7 +99,7 @@ static bool pointcloud_batch_cache_valid(PointCloud &pointcloud)
if (cache == nullptr) {
return false;
}
- if (cache->mat_len != DRW_pointcloud_material_count_get(&pointcloud)) {
+ if (cache->eval_cache.mat_len != DRW_pointcloud_material_count_get(&pointcloud)) {
return false;
}
return cache->is_dirty == false;
@@ -109,12 +114,12 @@ static void pointcloud_batch_cache_init(PointCloud &pointcloud)
pointcloud.batch_cache = cache;
}
else {
- memset(cache, 0, sizeof(*cache));
+ cache->eval_cache = {};
}
- cache->mat_len = DRW_pointcloud_material_count_get(&pointcloud);
- cache->surface_per_mat = static_cast<GPUBatch **>(
- MEM_callocN(sizeof(GPUBatch *) * cache->mat_len, __func__));
+ cache->eval_cache.mat_len = DRW_pointcloud_material_count_get(&pointcloud);
+ cache->eval_cache.surface_per_mat = static_cast<GPUBatch **>(
+ MEM_callocN(sizeof(GPUBatch *) * cache->eval_cache.mat_len, __func__));
cache->is_dirty = false;
}
@@ -137,10 +142,10 @@ void DRW_pointcloud_batch_cache_dirty_tag(PointCloud *pointcloud, int mode)
static void pointcloud_discard_attributes(PointCloudBatchCache &cache)
{
for (const int j : IndexRange(GPU_MAX_ATTR)) {
- GPU_VERTBUF_DISCARD_SAFE(cache.attributes_buf[j]);
+ GPU_VERTBUF_DISCARD_SAFE(cache.eval_cache.attributes_buf[j]);
}
- drw_attributes_clear(&cache.attr_used);
+ drw_attributes_clear(&cache.eval_cache.attr_used);
}
static void pointcloud_batch_cache_clear(PointCloud &pointcloud)
@@ -150,18 +155,18 @@ static void pointcloud_batch_cache_clear(PointCloud &pointcloud)
return;
}
- GPU_BATCH_DISCARD_SAFE(cache->dots);
- GPU_BATCH_DISCARD_SAFE(cache->surface);
- GPU_VERTBUF_DISCARD_SAFE(cache->pos_rad);
- GPU_VERTBUF_DISCARD_SAFE(cache->attr_viewer);
- GPU_INDEXBUF_DISCARD_SAFE(cache->geom_indices);
+ GPU_BATCH_DISCARD_SAFE(cache->eval_cache.dots);
+ GPU_BATCH_DISCARD_SAFE(cache->eval_cache.surface);
+ GPU_VERTBUF_DISCARD_SAFE(cache->eval_cache.pos_rad);
+ GPU_VERTBUF_DISCARD_SAFE(cache->eval_cache.attr_viewer);
+ GPU_INDEXBUF_DISCARD_SAFE(cache->eval_cache.geom_indices);
- if (cache->surface_per_mat) {
- for (int i = 0; i < cache->mat_len; i++) {
- GPU_BATCH_DISCARD_SAFE(cache->surface_per_mat[i]);
+ if (cache->eval_cache.surface_per_mat) {
+ for (int i = 0; i < cache->eval_cache.mat_len; i++) {
+ GPU_BATCH_DISCARD_SAFE(cache->eval_cache.surface_per_mat[i]);
}
}
- MEM_SAFE_FREE(cache->surface_per_mat);
+ MEM_SAFE_FREE(cache->eval_cache.surface_per_mat);
pointcloud_discard_attributes(*cache);
}
@@ -189,15 +194,16 @@ void DRW_pointcloud_batch_cache_free_old(PointCloud *pointcloud, int ctime)
bool do_discard = false;
- if (drw_attributes_overlap(&cache->attr_used_over_time, &cache->attr_used)) {
- cache->last_attr_matching_time = ctime;
+ if (drw_attributes_overlap(&cache->eval_cache.attr_used_over_time,
+ &cache->eval_cache.attr_used)) {
+ cache->eval_cache.last_attr_matching_time = ctime;
}
- if (ctime - cache->last_attr_matching_time > U.vbotimeout) {
+ if (ctime - cache->eval_cache.last_attr_matching_time > U.vbotimeout) {
do_discard = true;
}
- drw_attributes_clear(&cache->attr_used_over_time);
+ drw_attributes_clear(&cache->eval_cache.attr_used_over_time);
if (do_discard) {
pointcloud_discard_attributes(*cache);
@@ -235,7 +241,7 @@ static void pointcloud_extract_indices(const PointCloud &pointcloud, PointCloudB
}
}
- GPU_indexbuf_build_in_place(&builder, cache.geom_indices);
+ GPU_indexbuf_build_in_place(&builder, cache.eval_cache.geom_indices);
}
static void pointcloud_extract_position_and_radius(const PointCloud &pointcloud,
@@ -252,11 +258,11 @@ static void pointcloud_extract_position_and_radius(const PointCloud &pointcloud,
}
GPUUsageType usage_flag = GPU_USAGE_STATIC | GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY;
- GPU_vertbuf_init_with_format_ex(cache.pos_rad, &format, usage_flag);
+ GPU_vertbuf_init_with_format_ex(cache.eval_cache.pos_rad, &format, usage_flag);
- GPU_vertbuf_data_alloc(cache.pos_rad, positions.size());
- MutableSpan<float4> vbo_data{static_cast<float4 *>(GPU_vertbuf_get_data(cache.pos_rad)),
- pointcloud.totpoint};
+ GPU_vertbuf_data_alloc(cache.eval_cache.pos_rad, positions.size());
+ MutableSpan<float4> vbo_data{
+ static_cast<float4 *>(GPU_vertbuf_get_data(cache.eval_cache.pos_rad)), pointcloud.totpoint};
if (radii) {
const VArraySpan<float> radii_span(radii);
threading::parallel_for(vbo_data.index_range(), 4096, [&](IndexRange range) {
@@ -288,7 +294,7 @@ static void pointcloud_extract_attribute(const PointCloud &pointcloud,
{
using namespace blender;
- GPUVertBuf *&attr_buf = cache.attributes_buf[index];
+ GPUVertBuf *&attr_buf = cache.eval_cache.attributes_buf[index];
const bke::AttributeAccessor attributes = pointcloud.attributes();
@@ -322,8 +328,8 @@ static void pointcloud_extract_attribute(const PointCloud &pointcloud,
GPUVertBuf *pointcloud_position_and_radius_get(PointCloud *pointcloud)
{
PointCloudBatchCache *cache = pointcloud_batch_cache_get(*pointcloud);
- DRW_vbo_request(nullptr, &cache->pos_rad);
- return cache->pos_rad;
+ DRW_vbo_request(nullptr, &cache->eval_cache.pos_rad);
+ return cache->eval_cache.pos_rad;
}
GPUBatch **pointcloud_surface_shaded_get(PointCloud *pointcloud,
@@ -350,23 +356,23 @@ GPUBatch **pointcloud_surface_shaded_get(PointCloud *pointcloud,
}
}
- if (!drw_attributes_overlap(&cache->attr_used, &attrs_needed)) {
+ if (!drw_attributes_overlap(&cache->eval_cache.attr_used, &attrs_needed)) {
/* Some new attributes have been added, free all and start over. */
for (const int i : IndexRange(GPU_MAX_ATTR)) {
- GPU_VERTBUF_DISCARD_SAFE(cache->attributes_buf[i]);
+ GPU_VERTBUF_DISCARD_SAFE(cache->eval_cache.attributes_buf[i]);
}
- drw_attributes_merge(&cache->attr_used, &attrs_needed, cache->render_mutex);
+ drw_attributes_merge(&cache->eval_cache.attr_used, &attrs_needed, cache->render_mutex);
}
- drw_attributes_merge(&cache->attr_used_over_time, &attrs_needed, cache->render_mutex);
+ drw_attributes_merge(&cache->eval_cache.attr_used_over_time, &attrs_needed, cache->render_mutex);
- DRW_batch_request(&cache->surface_per_mat[0]);
- return cache->surface_per_mat;
+ DRW_batch_request(&cache->eval_cache.surface_per_mat[0]);
+ return cache->eval_cache.surface_per_mat;
}
GPUBatch *pointcloud_surface_get(PointCloud *pointcloud)
{
PointCloudBatchCache *cache = pointcloud_batch_cache_get(*pointcloud);
- return DRW_batch_request(&cache->surface);
+ return DRW_batch_request(&cache->eval_cache.surface);
}
/** \} */
@@ -379,7 +385,7 @@ GPUBatch *DRW_pointcloud_batch_cache_get_dots(Object *ob)
{
PointCloud &pointcloud = *static_cast<PointCloud *>(ob->data);
PointCloudBatchCache *cache = pointcloud_batch_cache_get(pointcloud);
- return DRW_batch_request(&cache->dots);
+ return DRW_batch_request(&cache->eval_cache.dots);
}
GPUVertBuf **DRW_pointcloud_evaluated_attribute(PointCloud *pointcloud, const char *name)
@@ -392,12 +398,12 @@ GPUVertBuf **DRW_pointcloud_evaluated_attribute(PointCloud *pointcloud, const ch
if (drw_custom_data_match_attribute(&pointcloud->pdata, name, &layer_index, &type)) {
DRW_Attributes attributes{};
drw_attributes_add_request(&attributes, name, type, layer_index, domain);
- drw_attributes_merge(&cache.attr_used, &attributes, cache.render_mutex);
+ drw_attributes_merge(&cache.eval_cache.attr_used, &attributes, cache.render_mutex);
}
int request_i = -1;
- for (const int i : IndexRange(cache.attr_used.num_requests)) {
- if (STREQ(cache.attr_used.requests[i].attribute_name, name)) {
+ for (const int i : IndexRange(cache.eval_cache.attr_used.num_requests)) {
+ if (STREQ(cache.eval_cache.attr_used.requests[i].attribute_name, name)) {
request_i = i;
break;
}
@@ -405,7 +411,7 @@ GPUVertBuf **DRW_pointcloud_evaluated_attribute(PointCloud *pointcloud, const ch
if (request_i == -1) {
return nullptr;
}
- return &cache.attributes_buf[request_i];
+ return &cache.eval_cache.attributes_buf[request_i];
}
int DRW_pointcloud_material_count_get(PointCloud *pointcloud)
@@ -418,33 +424,33 @@ void DRW_pointcloud_batch_cache_create_requested(Object *ob)
PointCloud *pointcloud = static_cast<PointCloud *>(ob->data);
PointCloudBatchCache &cache = *pointcloud_batch_cache_get(*pointcloud);
- if (DRW_batch_requested(cache.dots, GPU_PRIM_POINTS)) {
- DRW_vbo_request(cache.dots, &cache.pos_rad);
+ if (DRW_batch_requested(cache.eval_cache.dots, GPU_PRIM_POINTS)) {
+ DRW_vbo_request(cache.eval_cache.dots, &cache.eval_cache.pos_rad);
}
- if (DRW_batch_requested(cache.surface, GPU_PRIM_TRIS)) {
- DRW_ibo_request(cache.surface, &cache.geom_indices);
- DRW_vbo_request(cache.surface, &cache.pos_rad);
+ if (DRW_batch_requested(cache.eval_cache.surface, GPU_PRIM_TRIS)) {
+ DRW_ibo_request(cache.eval_cache.surface, &cache.eval_cache.geom_indices);
+ DRW_vbo_request(cache.eval_cache.surface, &cache.eval_cache.pos_rad);
}
- for (int i = 0; i < cache.mat_len; i++) {
- if (DRW_batch_requested(cache.surface_per_mat[i], GPU_PRIM_TRIS)) {
+ for (int i = 0; i < cache.eval_cache.mat_len; i++) {
+ if (DRW_batch_requested(cache.eval_cache.surface_per_mat[i], GPU_PRIM_TRIS)) {
/* TODO(fclem): Per material ranges. */
- DRW_ibo_request(cache.surface_per_mat[i], &cache.geom_indices);
+ DRW_ibo_request(cache.eval_cache.surface_per_mat[i], &cache.eval_cache.geom_indices);
}
}
- for (int j = 0; j < cache.attr_used.num_requests; j++) {
- DRW_vbo_request(nullptr, &cache.attributes_buf[j]);
+ for (int j = 0; j < cache.eval_cache.attr_used.num_requests; j++) {
+ DRW_vbo_request(nullptr, &cache.eval_cache.attributes_buf[j]);
- if (DRW_vbo_requested(cache.attributes_buf[j])) {
- pointcloud_extract_attribute(*pointcloud, cache, cache.attr_used.requests[j], j);
+ if (DRW_vbo_requested(cache.eval_cache.attributes_buf[j])) {
+ pointcloud_extract_attribute(*pointcloud, cache, cache.eval_cache.attr_used.requests[j], j);
}
}
- if (DRW_ibo_requested(cache.geom_indices)) {
+ if (DRW_ibo_requested(cache.eval_cache.geom_indices)) {
pointcloud_extract_indices(*pointcloud, cache);
}
- if (DRW_vbo_requested(cache.pos_rad)) {
+ if (DRW_vbo_requested(cache.eval_cache.pos_rad)) {
pointcloud_extract_position_and_radius(*pointcloud, cache);
}
}
diff --git a/source/blender/draw/intern/draw_command.cc b/source/blender/draw/intern/draw_command.cc
index 10dd63e05dc..6e999815e8d 100644
--- a/source/blender/draw/intern/draw_command.cc
+++ b/source/blender/draw/intern/draw_command.cc
@@ -166,7 +166,10 @@ void StateSet::execute(RecordingState &recording_state) const
*/
BLI_assert(DST.state_lock == 0);
- if (!assign_if_different(recording_state.pipeline_state, new_state)) {
+ bool state_changed = assign_if_different(recording_state.pipeline_state, new_state);
+ bool clip_changed = assign_if_different(recording_state.clip_plane_count, clip_plane_count);
+
+ if (!state_changed && !clip_changed) {
return;
}
@@ -190,12 +193,7 @@ void StateSet::execute(RecordingState &recording_state) const
}
/* TODO: this should be part of shader state. */
- if (new_state & DRW_STATE_CLIP_PLANES) {
- GPU_clip_distances(recording_state.view_clip_plane_count);
- }
- else {
- GPU_clip_distances(0);
- }
+ GPU_clip_distances(recording_state.clip_plane_count);
if (new_state & DRW_STATE_IN_FRONT_SELECT) {
/* XXX `GPU_depth_range` is not a perfect solution
diff --git a/source/blender/draw/intern/draw_command.hh b/source/blender/draw/intern/draw_command.hh
index ab180cc60b1..12c9916ee6d 100644
--- a/source/blender/draw/intern/draw_command.hh
+++ b/source/blender/draw/intern/draw_command.hh
@@ -39,7 +39,7 @@ struct RecordingState {
bool front_facing = true;
bool inverted_view = false;
DRWState pipeline_state = DRW_STATE_NO_DRAW;
- int view_clip_plane_count = 0;
+ int clip_plane_count = 0;
/** Used for gl_BaseInstance workaround. */
GPUStorageBuf *resource_id_buf = nullptr;
@@ -325,6 +325,7 @@ struct Clear {
struct StateSet {
DRWState new_state;
+ int clip_plane_count;
void execute(RecordingState &state) const;
std::string serialize() const;
@@ -482,7 +483,7 @@ class DrawMultiBuf {
ResourceHandle handle)
{
/* Custom draw-calls cannot be batched and will produce one group per draw. */
- const bool custom_group = (vertex_first != 0 || vertex_first != -1 || vertex_len != -1);
+ const bool custom_group = ((vertex_first != 0 && vertex_first != -1) || vertex_len != -1);
instance_len = instance_len != -1 ? instance_len : 1;
diff --git a/source/blender/draw/intern/draw_curves.cc b/source/blender/draw/intern/draw_curves.cc
index ee9045696be..ee9ed4666e0 100644
--- a/source/blender/draw/intern/draw_curves.cc
+++ b/source/blender/draw/intern/draw_curves.cc
@@ -390,7 +390,7 @@ DRWShadingGroup *DRW_shgroup_curves_create_sub(Object *object,
DRW_shgroup_uniform_int(shgrp, "hairStrandsRes", &curves_cache->final[subdiv].strands_res, 1);
DRW_shgroup_uniform_int_copy(shgrp, "hairThicknessRes", thickness_res);
DRW_shgroup_uniform_float_copy(shgrp, "hairRadShape", hair_rad_shape);
- DRW_shgroup_uniform_mat4_copy(shgrp, "hairDupliMatrix", object->obmat);
+ DRW_shgroup_uniform_mat4_copy(shgrp, "hairDupliMatrix", object->object_to_world);
DRW_shgroup_uniform_float_copy(shgrp, "hairRadRoot", hair_rad_root);
DRW_shgroup_uniform_float_copy(shgrp, "hairRadTip", hair_rad_tip);
DRW_shgroup_uniform_bool_copy(shgrp, "hairCloseTip", hair_close_tip);
diff --git a/source/blender/draw/intern/draw_hair.cc b/source/blender/draw/intern/draw_hair.cc
index 08e5d780cba..c5261f26f76 100644
--- a/source/blender/draw/intern/draw_hair.cc
+++ b/source/blender/draw/intern/draw_hair.cc
@@ -216,12 +216,12 @@ void DRW_hair_duplimat_get(Object *object,
if (collection != nullptr) {
sub_v3_v3(dupli_mat[3], collection->instance_offset);
}
- mul_m4_m4m4(dupli_mat, dupli_parent->obmat, dupli_mat);
+ mul_m4_m4m4(dupli_mat, dupli_parent->object_to_world, dupli_mat);
}
else {
- copy_m4_m4(dupli_mat, dupli_object->ob->obmat);
+ copy_m4_m4(dupli_mat, dupli_object->ob->object_to_world);
invert_m4(dupli_mat);
- mul_m4_m4m4(dupli_mat, object->obmat, dupli_mat);
+ mul_m4_m4m4(dupli_mat, object->object_to_world, dupli_mat);
}
}
else {
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index d0290426af3..4fcfec833eb 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -2801,7 +2801,7 @@ void DRW_draw_depth_object(
GPU_matrix_projection_set(rv3d->winmat);
GPU_matrix_set(rv3d->viewmat);
- GPU_matrix_mul(object->obmat);
+ GPU_matrix_mul(object->object_to_world);
/* Setup frame-buffer. */
GPUTexture *depth_tx = GPU_viewport_depth_texture(viewport);
@@ -2821,11 +2821,11 @@ void DRW_draw_depth_object(
const bool use_clipping_planes = RV3D_CLIPPING_ENABLED(v3d, rv3d);
if (use_clipping_planes) {
GPU_clip_distances(6);
- ED_view3d_clipping_local(rv3d, object->obmat);
+ ED_view3d_clipping_local(rv3d, object->object_to_world);
for (int i = 0; i < 6; i++) {
copy_v4_v4(planes.world[i], rv3d->clip_local[i]);
}
- copy_m4_m4(planes.ModelMatrix, object->obmat);
+ copy_m4_m4(planes.ModelMatrix, object->object_to_world);
}
drw_batch_cache_validate(object);
diff --git a/source/blender/draw/intern/draw_manager_data.cc b/source/blender/draw/intern/draw_manager_data.cc
index 792db9d0a6b..29b1493ec5e 100644
--- a/source/blender/draw/intern/draw_manager_data.cc
+++ b/source/blender/draw/intern/draw_manager_data.cc
@@ -678,7 +678,7 @@ BLI_INLINE void drw_call_matrix_init(DRWObjectMatrix *ob_mats, Object *ob, float
{
copy_m4_m4(ob_mats->model, obmat);
if (ob) {
- copy_m4_m4(ob_mats->modelinverse, ob->imat);
+ copy_m4_m4(ob_mats->modelinverse, ob->world_to_object);
}
else {
/* WATCH: Can be costly. */
@@ -724,8 +724,8 @@ static void drw_call_culling_init(DRWCullingState *cull, Object *ob)
float corner[3];
/* Get BoundSphere center and radius from the BoundBox. */
mid_v3_v3v3(cull->bsphere.center, bbox->vec[0], bbox->vec[6]);
- mul_v3_m4v3(corner, ob->obmat, bbox->vec[0]);
- mul_m4_v3(ob->obmat, cull->bsphere.center);
+ mul_v3_m4v3(corner, ob->object_to_world, bbox->vec[0]);
+ mul_m4_v3(ob->object_to_world, cull->bsphere.center);
cull->bsphere.radius = len_v3v3(cull->bsphere.center, corner);
/* Bypass test for very large objects (see T67319). */
@@ -1017,7 +1017,7 @@ void DRW_shgroup_call_ex(DRWShadingGroup *shgroup,
if (G.f & G_FLAG_PICKSEL) {
drw_command_set_select_id(shgroup, nullptr, DST.select_id);
}
- DRWResourceHandle handle = drw_resource_handle(shgroup, ob ? ob->obmat : obmat, ob);
+ DRWResourceHandle handle = drw_resource_handle(shgroup, ob ? ob->object_to_world : obmat, ob);
drw_command_draw(shgroup, geom, handle);
/* Culling data. */
@@ -1042,7 +1042,7 @@ void DRW_shgroup_call_range(
if (G.f & G_FLAG_PICKSEL) {
drw_command_set_select_id(shgroup, nullptr, DST.select_id);
}
- DRWResourceHandle handle = drw_resource_handle(shgroup, ob ? ob->obmat : nullptr, ob);
+ DRWResourceHandle handle = drw_resource_handle(shgroup, ob ? ob->object_to_world : nullptr, ob);
drw_command_draw_range(shgroup, geom, handle, v_sta, v_num);
}
@@ -1053,7 +1053,7 @@ void DRW_shgroup_call_instance_range(
if (G.f & G_FLAG_PICKSEL) {
drw_command_set_select_id(shgroup, nullptr, DST.select_id);
}
- DRWResourceHandle handle = drw_resource_handle(shgroup, ob ? ob->obmat : nullptr, ob);
+ DRWResourceHandle handle = drw_resource_handle(shgroup, ob ? ob->object_to_world : nullptr, ob);
drw_command_draw_intance_range(shgroup, geom, handle, i_sta, i_num);
}
@@ -1099,7 +1099,7 @@ static void drw_shgroup_call_procedural_add_ex(DRWShadingGroup *shgroup,
if (G.f & G_FLAG_PICKSEL) {
drw_command_set_select_id(shgroup, nullptr, DST.select_id);
}
- DRWResourceHandle handle = drw_resource_handle(shgroup, ob ? ob->obmat : nullptr, ob);
+ DRWResourceHandle handle = drw_resource_handle(shgroup, ob ? ob->object_to_world : nullptr, ob);
drw_command_draw_procedural(shgroup, geom, handle, vert_count);
}
@@ -1149,7 +1149,7 @@ void DRW_shgroup_call_procedural_indirect(DRWShadingGroup *shgroup,
if (G.f & G_FLAG_PICKSEL) {
drw_command_set_select_id(shgroup, nullptr, DST.select_id);
}
- DRWResourceHandle handle = drw_resource_handle(shgroup, ob ? ob->obmat : nullptr, ob);
+ DRWResourceHandle handle = drw_resource_handle(shgroup, ob ? ob->object_to_world : nullptr, ob);
drw_command_draw_indirect(shgroup, geom, handle, indirect_buf);
}
@@ -1159,7 +1159,7 @@ void DRW_shgroup_call_instances(DRWShadingGroup *shgroup, Object *ob, GPUBatch *
if (G.f & G_FLAG_PICKSEL) {
drw_command_set_select_id(shgroup, nullptr, DST.select_id);
}
- DRWResourceHandle handle = drw_resource_handle(shgroup, ob ? ob->obmat : nullptr, ob);
+ DRWResourceHandle handle = drw_resource_handle(shgroup, ob ? ob->object_to_world : nullptr, ob);
drw_command_draw_instance(shgroup, geom, handle, count, false);
}
@@ -1173,7 +1173,7 @@ void DRW_shgroup_call_instances_with_attrs(DRWShadingGroup *shgroup,
if (G.f & G_FLAG_PICKSEL) {
drw_command_set_select_id(shgroup, nullptr, DST.select_id);
}
- DRWResourceHandle handle = drw_resource_handle(shgroup, ob ? ob->obmat : nullptr, ob);
+ DRWResourceHandle handle = drw_resource_handle(shgroup, ob ? ob->object_to_world : nullptr, ob);
GPUBatch *batch = DRW_temp_batch_instance_request(
DST.vmempool->idatalist, nullptr, inst_attributes, geom);
drw_command_draw_instance(shgroup, batch, handle, 0, true);
@@ -1283,7 +1283,7 @@ static void drw_sculpt_get_frustum_planes(Object *ob, float planes[6][4])
* 4x4 matrix is done by multiplying with the transpose inverse.
* The inverse cancels out here since we transform by inverse(obmat). */
float tmat[4][4];
- transpose_m4_m4(tmat, ob->obmat);
+ transpose_m4_m4(tmat, ob->object_to_world);
for (int i = 0; i < 6; i++) {
mul_m4_v4(tmat, planes[i]);
}
@@ -1361,7 +1361,7 @@ static void drw_sculpt_generate_calls(DRWSculptCallbackData *scd)
if (SCULPT_DEBUG_BUFFERS) {
int debug_node_nr = 0;
- DRW_debug_modelmat(scd->ob->obmat);
+ DRW_debug_modelmat(scd->ob->object_to_world);
BKE_pbvh_draw_debug_cb(
pbvh,
(void (*)(PBVHNode * n, void *d, const float min[3], const float max[3], PBVHNodeFlags f))
diff --git a/source/blender/draw/intern/draw_manager_shader.c b/source/blender/draw/intern/draw_manager_shader.c
index 40b05dff51f..85701a10f4b 100644
--- a/source/blender/draw/intern/draw_manager_shader.c
+++ b/source/blender/draw/intern/draw_manager_shader.c
@@ -64,8 +64,8 @@ static void drw_deferred_shader_compilation_exec(
void *custom_data,
/* Cannot be const, this function implements wm_jobs_start_callback.
* NOLINTNEXTLINE: readability-non-const-parameter. */
- short *stop,
- short *UNUSED(do_update),
+ bool *stop,
+ bool *UNUSED(do_update),
float *UNUSED(progress))
{
GPU_render_begin();
diff --git a/source/blender/draw/intern/draw_manager_text.cc b/source/blender/draw/intern/draw_manager_text.cc
index 100ef528bc8..1244c46e166 100644
--- a/source/blender/draw/intern/draw_manager_text.cc
+++ b/source/blender/draw/intern/draw_manager_text.cc
@@ -305,11 +305,11 @@ void DRW_text_edit_mesh_measure_stats(ARegion *region,
if (clip_segment_v3_plane_n(v1, v2, clip_planes, 4, v1_clip, v2_clip)) {
mid_v3_v3v3(vmid, v1_clip, v2_clip);
- mul_m4_v3(ob->obmat, vmid);
+ mul_m4_v3(ob->object_to_world, vmid);
if (do_global) {
- mul_mat3_m4_v3(ob->obmat, v1);
- mul_mat3_m4_v3(ob->obmat, v2);
+ mul_mat3_m4_v3(ob->object_to_world, v1);
+ mul_mat3_m4_v3(ob->object_to_world, v2);
}
if (unit->system) {
@@ -373,7 +373,7 @@ void DRW_text_edit_mesh_measure_stats(ARegion *region,
float angle;
mid_v3_v3v3(vmid, v1_clip, v2_clip);
- mul_m4_v3(ob->obmat, vmid);
+ mul_m4_v3(ob->object_to_world, vmid);
if (use_coords) {
copy_v3_v3(no_a, poly_normals[BM_elem_index_get(l_a->f)]);
@@ -385,8 +385,8 @@ void DRW_text_edit_mesh_measure_stats(ARegion *region,
}
if (do_global) {
- mul_mat3_m4_v3(ob->imat, no_a);
- mul_mat3_m4_v3(ob->imat, no_b);
+ mul_mat3_m4_v3(ob->world_to_object, no_a);
+ mul_mat3_m4_v3(ob->world_to_object, no_b);
normalize_v3(no_a);
normalize_v3(no_b);
}
@@ -443,16 +443,16 @@ void DRW_text_edit_mesh_measure_stats(ARegion *region,
n += 3;
if (do_global) {
- mul_mat3_m4_v3(ob->obmat, v1);
- mul_mat3_m4_v3(ob->obmat, v2);
- mul_mat3_m4_v3(ob->obmat, v3);
+ mul_mat3_m4_v3(ob->object_to_world, v1);
+ mul_mat3_m4_v3(ob->object_to_world, v2);
+ mul_mat3_m4_v3(ob->object_to_world, v3);
}
area += area_tri_v3(v1, v2, v3);
}
mul_v3_fl(vmid, 1.0f / float(n));
- mul_m4_v3(ob->obmat, vmid);
+ mul_m4_v3(ob->object_to_world, vmid);
if (unit->system) {
numstr_len = BKE_unit_value_as_string(
@@ -522,9 +522,9 @@ void DRW_text_edit_mesh_measure_stats(ARegion *region,
copy_v3_v3(v2_local, v2);
if (do_global) {
- mul_mat3_m4_v3(ob->obmat, v1);
- mul_mat3_m4_v3(ob->obmat, v2);
- mul_mat3_m4_v3(ob->obmat, v3);
+ mul_mat3_m4_v3(ob->object_to_world, v1);
+ mul_mat3_m4_v3(ob->object_to_world, v2);
+ mul_mat3_m4_v3(ob->object_to_world, v3);
}
float angle = angle_v3v3v3(v1, v2, v3);
@@ -535,7 +535,7 @@ void DRW_text_edit_mesh_measure_stats(ARegion *region,
(is_rad) ? angle : RAD2DEGF(angle),
(is_rad) ? "r" : "°");
interp_v3_v3v3(fvec, vmid, v2_local, 0.8f);
- mul_m4_v3(ob->obmat, fvec);
+ mul_m4_v3(ob->object_to_world, fvec);
DRW_text_cache_add(dt, fvec, numstr, numstr_len, 0, 0, txt_flag, col);
}
}
@@ -566,7 +566,7 @@ void DRW_text_edit_mesh_measure_stats(ARegion *region,
copy_v3_v3(v1, v->co);
}
- mul_m4_v3(ob->obmat, v1);
+ mul_m4_v3(ob->object_to_world, v1);
numstr_len = BLI_snprintf_rlen(numstr, sizeof(numstr), "%d", i);
DRW_text_cache_add(dt, v1, numstr, numstr_len, 0, 0, txt_flag, col);
@@ -595,7 +595,7 @@ void DRW_text_edit_mesh_measure_stats(ARegion *region,
if (clip_segment_v3_plane_n(v1, v2, clip_planes, 4, v1_clip, v2_clip)) {
mid_v3_v3v3(vmid, v1_clip, v2_clip);
- mul_m4_v3(ob->obmat, vmid);
+ mul_m4_v3(ob->object_to_world, vmid);
numstr_len = BLI_snprintf_rlen(numstr, sizeof(numstr), "%d", i);
DRW_text_cache_add(
@@ -629,7 +629,7 @@ void DRW_text_edit_mesh_measure_stats(ARegion *region,
BM_face_calc_center_median(f, v1);
}
- mul_m4_v3(ob->obmat, v1);
+ mul_m4_v3(ob->object_to_world, v1);
numstr_len = BLI_snprintf_rlen(numstr, sizeof(numstr), "%d", i);
DRW_text_cache_add(dt, v1, numstr, numstr_len, 0, 0, txt_flag, col);
diff --git a/source/blender/draw/intern/draw_pass.hh b/source/blender/draw/intern/draw_pass.hh
index 892dfdddfcf..2c1fd16928e 100644
--- a/source/blender/draw/intern/draw_pass.hh
+++ b/source/blender/draw/intern/draw_pass.hh
@@ -159,8 +159,10 @@ class PassBase {
*
* IMPORTANT: This does not set the stencil mask/reference values. Add a call to state_stencil()
* to ensure correct behavior of stencil aware draws.
+ *
+ * TODO(fclem): clip_plane_count should be part of shader state.
*/
- void state_set(DRWState state);
+ void state_set(DRWState state, int clip_plane_count = 0);
/**
* Clear the current frame-buffer.
@@ -731,9 +733,13 @@ template<class T> inline void PassBase<T>::barrier(eGPUBarrier type)
/** \name State Implementation
* \{ */
-template<class T> inline void PassBase<T>::state_set(DRWState state)
+template<class T> inline void PassBase<T>::state_set(DRWState state, int clip_plane_count)
{
- create_command(Type::StateSet).state_set = {state};
+ /** \note This is for compatibility with the old clip plane API. */
+ if (clip_plane_count > 0) {
+ state |= DRW_STATE_CLIP_PLANES;
+ }
+ create_command(Type::StateSet).state_set = {state, clip_plane_count};
}
template<class T>
diff --git a/source/blender/draw/intern/draw_resource.hh b/source/blender/draw/intern/draw_resource.hh
index 2df38e32ed2..b8a0dbb8fa9 100644
--- a/source/blender/draw/intern/draw_resource.hh
+++ b/source/blender/draw/intern/draw_resource.hh
@@ -31,8 +31,8 @@
inline void ObjectMatrices::sync(const Object &object)
{
- model = object.obmat;
- model_inverse = object.imat;
+ model = object.object_to_world;
+ model_inverse = object.world_to_object;
}
inline void ObjectMatrices::sync(const float4x4 &model_matrix)
diff --git a/source/blender/draw/intern/draw_volume.cc b/source/blender/draw/intern/draw_volume.cc
index 2b4b0e3c089..5c1ce7c3111 100644
--- a/source/blender/draw/intern/draw_volume.cc
+++ b/source/blender/draw/intern/draw_volume.cc
@@ -127,7 +127,7 @@ static DRWShadingGroup *drw_volume_object_grids_init(Object *ob,
grp = DRW_shgroup_create_sub(grp);
- volume_infos.density_scale = BKE_volume_density_scale(volume, ob->obmat);
+ volume_infos.density_scale = BKE_volume_density_scale(volume, ob->object_to_world);
volume_infos.color_mul = float4(1.0f);
volume_infos.temperature_mul = 1.0f;
volume_infos.temperature_bias = 0.0f;
diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edge_fac.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edge_fac.cc
index a968bd07c87..de1f5181ac5 100644
--- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edge_fac.cc
+++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edge_fac.cc
@@ -66,7 +66,7 @@ static void extract_edge_fac_init(const MeshRenderData *mr,
* We could have a flag in the mesh instead or check the modifier stack. */
const MEdge *med = mr->medge;
for (int e_index = 0; e_index < mr->edge_len; e_index++, med++) {
- if ((med->flag & ME_EDGERENDER) == 0) {
+ if ((med->flag & ME_EDGEDRAW) == 0) {
data->use_edge_render = true;
break;
}
@@ -118,7 +118,7 @@ static void extract_edge_fac_iter_poly_mesh(const MeshRenderData *mr,
if (data->use_edge_render) {
const MEdge *med = &mr->medge[ml->e];
- data->vbo_data[ml_index] = (med->flag & ME_EDGERENDER) ? 255 : 0;
+ data->vbo_data[ml_index] = (med->flag & ME_EDGEDRAW) ? 255 : 0;
}
else {
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index 06a0077df9b..329bc2b46eb 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -329,6 +329,121 @@ short ANIM_get_normalization_flags(bAnimContext *ac)
return 0;
}
+static void fcurve_scene_coord_range_get(Scene *scene,
+ FCurve *fcu,
+ float *r_min_coord,
+ float *r_max_coord)
+{
+ float min_coord = FLT_MAX;
+ float max_coord = -FLT_MAX;
+ const bool use_preview_only = PRVRANGEON;
+
+ if (fcu->bezt || fcu->fpt) {
+ int start = 0;
+ int end = fcu->totvert;
+
+ if (use_preview_only) {
+ start = scene->r.psfra;
+ end = min_ii(scene->r.pefra + 1, fcu->totvert);
+ }
+
+ if (fcu->bezt) {
+ const BezTriple *bezt = fcu->bezt + start;
+ for (int i = start; i < end; i++, bezt++) {
+
+ if (i == 0) {
+ /* We ignore extrapolation flags and handle here, and use the
+ * control point position only. so we normalize "interesting"
+ * part of the curve.
+ *
+ * Here we handle left extrapolation.
+ */
+ max_coord = max_ff(max_coord, bezt->vec[1][1]);
+ min_coord = min_ff(min_coord, bezt->vec[1][1]);
+ }
+ else {
+ const BezTriple *prev_bezt = bezt - 1;
+ if (!ELEM(prev_bezt->ipo, BEZT_IPO_BEZ, BEZT_IPO_BACK, BEZT_IPO_ELASTIC)) {
+ /* The points on the curve will lie inside the start and end points.
+ * Calculate min/max using both previous and current CV.
+ */
+ max_coord = max_ff(max_coord, bezt->vec[1][1]);
+ min_coord = min_ff(min_coord, bezt->vec[1][1]);
+ max_coord = max_ff(max_coord, prev_bezt->vec[1][1]);
+ min_coord = min_ff(min_coord, prev_bezt->vec[1][1]);
+ }
+ else {
+ const int resol = fcu->driver ?
+ 32 :
+ min_ii((int)(5.0f * len_v2v2(bezt->vec[1], prev_bezt->vec[1])),
+ 32);
+ if (resol < 2) {
+ max_coord = max_ff(max_coord, prev_bezt->vec[1][1]);
+ min_coord = min_ff(min_coord, prev_bezt->vec[1][1]);
+ }
+ else {
+ if (!ELEM(prev_bezt->ipo, BEZT_IPO_BACK, BEZT_IPO_ELASTIC)) {
+ /* Calculate min/max using bezier forward differencing. */
+ float data[120];
+ float v1[2], v2[2], v3[2], v4[2];
+
+ v1[0] = prev_bezt->vec[1][0];
+ v1[1] = prev_bezt->vec[1][1];
+ v2[0] = prev_bezt->vec[2][0];
+ v2[1] = prev_bezt->vec[2][1];
+
+ v3[0] = bezt->vec[0][0];
+ v3[1] = bezt->vec[0][1];
+ v4[0] = bezt->vec[1][0];
+ v4[1] = bezt->vec[1][1];
+
+ BKE_fcurve_correct_bezpart(v1, v2, v3, v4);
+
+ BKE_curve_forward_diff_bezier(
+ v1[0], v2[0], v3[0], v4[0], data, resol, sizeof(float[3]));
+ BKE_curve_forward_diff_bezier(
+ v1[1], v2[1], v3[1], v4[1], data + 1, resol, sizeof(float[3]));
+
+ for (int j = 0; j <= resol; ++j) {
+ const float *fp = &data[j * 3];
+ max_coord = max_ff(max_coord, fp[1]);
+ min_coord = min_ff(min_coord, fp[1]);
+ }
+ }
+ else {
+ /* Calculate min/max using full fcurve evaluation.
+ * [slower than bezier forward differencing but evaluates Back/Elastic
+ * interpolation as well]. */
+ float step_size = (bezt->vec[1][0] - prev_bezt->vec[1][0]) / resol;
+ for (int j = 0; j <= resol; j++) {
+ float eval_time = prev_bezt->vec[1][0] + step_size * j;
+ float eval_value = evaluate_fcurve_only_curve(fcu, eval_time);
+ max_coord = max_ff(max_coord, eval_value);
+ min_coord = min_ff(min_coord, eval_value);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ else if (fcu->fpt) {
+ const FPoint *fpt = fcu->fpt + start;
+ for (int i = start; i < end; ++i, ++fpt) {
+ min_coord = min_ff(min_coord, fpt->vec[1]);
+ max_coord = max_ff(max_coord, fpt->vec[1]);
+ }
+ }
+ }
+
+ if (r_min_coord) {
+ *r_min_coord = min_coord;
+ }
+ if (r_max_coord) {
+ *r_max_coord = max_coord;
+ }
+}
+
static float normalization_factor_get(Scene *scene, FCurve *fcu, short flag, float *r_offset)
{
float factor = 1.0f, offset = 0.0f;
@@ -366,112 +481,23 @@ static float normalization_factor_get(Scene *scene, FCurve *fcu, short flag, flo
}
fcu->prev_norm_factor = 1.0f;
- if (fcu->bezt) {
- const bool use_preview_only = PRVRANGEON;
- const BezTriple *bezt;
- int i;
- float max_coord = -FLT_MAX;
- float min_coord = FLT_MAX;
- float range;
-
- if (fcu->totvert < 1) {
- return 1.0f;
- }
-
- for (i = 0, bezt = fcu->bezt; i < fcu->totvert; i++, bezt++) {
- if (use_preview_only && !IN_RANGE_INCL(bezt->vec[1][0], scene->r.psfra, scene->r.pefra)) {
- continue;
- }
-
- if (i == 0) {
- /* We ignore extrapolation flags and handle here, and use the
- * control point position only. so we normalize "interesting"
- * part of the curve.
- *
- * Here we handle left extrapolation.
- */
- max_coord = max_ff(max_coord, bezt->vec[1][1]);
- min_coord = min_ff(min_coord, bezt->vec[1][1]);
- }
- else {
- const BezTriple *prev_bezt = bezt - 1;
- if (!ELEM(prev_bezt->ipo, BEZT_IPO_BEZ, BEZT_IPO_BACK, BEZT_IPO_ELASTIC)) {
- /* The points on the curve will lie inside the start and end points.
- * Calculate min/max using both previous and current CV.
- */
- max_coord = max_ff(max_coord, bezt->vec[1][1]);
- min_coord = min_ff(min_coord, bezt->vec[1][1]);
- max_coord = max_ff(max_coord, prev_bezt->vec[1][1]);
- min_coord = min_ff(min_coord, prev_bezt->vec[1][1]);
- }
- else {
- const int resol = fcu->driver ?
- 32 :
- min_ii((int)(5.0f * len_v2v2(bezt->vec[1], prev_bezt->vec[1])),
- 32);
- if (resol < 2) {
- max_coord = max_ff(max_coord, prev_bezt->vec[1][1]);
- min_coord = min_ff(min_coord, prev_bezt->vec[1][1]);
- }
- else {
- if (!ELEM(prev_bezt->ipo, BEZT_IPO_BACK, BEZT_IPO_ELASTIC)) {
- /* Calculate min/max using bezier forward differencing. */
- float data[120];
- float v1[2], v2[2], v3[2], v4[2];
-
- v1[0] = prev_bezt->vec[1][0];
- v1[1] = prev_bezt->vec[1][1];
- v2[0] = prev_bezt->vec[2][0];
- v2[1] = prev_bezt->vec[2][1];
-
- v3[0] = bezt->vec[0][0];
- v3[1] = bezt->vec[0][1];
- v4[0] = bezt->vec[1][0];
- v4[1] = bezt->vec[1][1];
-
- BKE_fcurve_correct_bezpart(v1, v2, v3, v4);
-
- BKE_curve_forward_diff_bezier(
- v1[0], v2[0], v3[0], v4[0], data, resol, sizeof(float[3]));
- BKE_curve_forward_diff_bezier(
- v1[1], v2[1], v3[1], v4[1], data + 1, resol, sizeof(float[3]));
-
- for (int j = 0; j <= resol; ++j) {
- const float *fp = &data[j * 3];
- max_coord = max_ff(max_coord, fp[1]);
- min_coord = min_ff(min_coord, fp[1]);
- }
- }
- else {
- /* Calculate min/max using full fcurve evaluation.
- * [slower than bezier forward differencing but evaluates Back/Elastic interpolation
- * as well]. */
- float step_size = (bezt->vec[1][0] - prev_bezt->vec[1][0]) / resol;
- for (int j = 0; j <= resol; j++) {
- float eval_time = prev_bezt->vec[1][0] + step_size * j;
- float eval_value = evaluate_fcurve_only_curve(fcu, eval_time);
- max_coord = max_ff(max_coord, eval_value);
- min_coord = min_ff(min_coord, eval_value);
- }
- }
- }
- }
- }
- }
+ float max_coord = -FLT_MAX;
+ float min_coord = FLT_MAX;
+ fcurve_scene_coord_range_get(scene, fcu, &min_coord, &max_coord);
- if (max_coord > min_coord) {
- range = max_coord - min_coord;
- if (range > FLT_EPSILON) {
- factor = 2.0f / range;
- }
- offset = -min_coord - range / 2.0f;
- }
- else if (max_coord == min_coord) {
- factor = 1.0f;
- offset = -min_coord;
+ if (max_coord > min_coord) {
+ const float range = max_coord - min_coord;
+ if (range > FLT_EPSILON) {
+ factor = 2.0f / range;
}
+ offset = -min_coord - range / 2.0f;
+ }
+ else if (max_coord == min_coord) {
+ factor = 1.0f;
+ offset = -min_coord;
}
+
BLI_assert(factor != 0.0f);
if (r_offset) {
*r_offset = offset;
diff --git a/source/blender/editors/animation/anim_motion_paths.c b/source/blender/editors/animation/anim_motion_paths.c
index 23c1d68b4d6..4a83bb4c800 100644
--- a/source/blender/editors/animation/anim_motion_paths.c
+++ b/source/blender/editors/animation/anim_motion_paths.c
@@ -161,11 +161,11 @@ static void motionpaths_calc_bake_targets(ListBase *targets, int cframe)
}
/* Result must be in world-space. */
- mul_m4_v3(ob_eval->obmat, mpv->co);
+ mul_m4_v3(ob_eval->object_to_world, mpv->co);
}
else {
/* World-space object location. */
- copy_v3_v3(mpv->co, ob_eval->obmat[3]);
+ copy_v3_v3(mpv->co, ob_eval->object_to_world[3]);
}
float mframe = (float)(cframe);
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index c9957b38853..96a9604a6f5 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -1044,12 +1044,12 @@ static float *visualkey_get_values(
Object *ob = ptr->data;
/* Loc code is specific... */
if (strstr(identifier, "location")) {
- copy_v3_v3(buffer, ob->obmat[3]);
+ copy_v3_v3(buffer, ob->object_to_world[3]);
*r_count = 3;
return buffer;
}
- copy_m4_m4(tmat, ob->obmat);
+ copy_m4_m4(tmat, ob->object_to_world);
rotmode = ob->rotmode;
}
else if (ptr->type == &RNA_PoseBone) {
diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c
index 17484b2b0b7..806da5ee286 100644
--- a/source/blender/editors/armature/armature_add.c
+++ b/source/blender/editors/armature/armature_add.c
@@ -181,13 +181,13 @@ static int armature_click_extrude_exec(bContext *C, wmOperator *UNUSED(op))
const View3DCursor *curs = &scene->cursor;
copy_v3_v3(newbone->tail, curs->location);
- sub_v3_v3v3(newbone->tail, newbone->tail, obedit->obmat[3]);
+ sub_v3_v3v3(newbone->tail, newbone->tail, obedit->object_to_world[3]);
if (a == 1) {
newbone->tail[0] = -newbone->tail[0];
}
- copy_m3_m4(mat, obedit->obmat);
+ copy_m3_m4(mat, obedit->object_to_world);
invert_m3_m3(imat, mat);
mul_m3_v3(imat, newbone->tail);
@@ -1569,8 +1569,8 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op)
copy_v3_v3(curs, CTX_data_scene(C)->cursor.location);
/* Get inverse point for head and orientation for tail */
- invert_m4_m4(obedit->imat, obedit->obmat);
- mul_m4_v3(obedit->imat, curs);
+ invert_m4_m4(obedit->world_to_object, obedit->object_to_world);
+ mul_m4_v3(obedit->world_to_object, curs);
if (rv3d && (U.flag & USER_ADD_VIEWALIGNED)) {
copy_m3_m4(obmat, rv3d->viewmat);
@@ -1579,7 +1579,7 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op)
unit_m3(obmat);
}
- copy_m3_m4(viewmat, obedit->obmat);
+ copy_m3_m4(viewmat, obedit->object_to_world);
mul_m3_m3m3(totmat, obmat, viewmat);
invert_m3_m3(imat, totmat);
diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c
index 9e828ebd501..780e2fae00e 100644
--- a/source/blender/editors/armature/armature_edit.c
+++ b/source/blender/editors/armature/armature_edit.c
@@ -113,8 +113,8 @@ void ED_armature_origin_set(
/* Find the center-point. */
if (centermode == 2) {
copy_v3_v3(cent, cursor);
- invert_m4_m4(ob->imat, ob->obmat);
- mul_m4_v3(ob->imat, cent);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
+ mul_m4_v3(ob->world_to_object, cent);
}
else {
if (around == V3D_AROUND_CENTER_BOUNDS) {
@@ -154,7 +154,7 @@ void ED_armature_origin_set(
/* Adjust object location for new center-point. */
if (centermode && (is_editmode == false)) {
- mul_mat3_m4_v3(ob->obmat, cent); /* omit translation part */
+ mul_mat3_m4_v3(ob->object_to_world, cent); /* omit translation part */
add_v3_v3(ob->loc, cent);
}
}
@@ -282,16 +282,16 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op)
axis_flip = true;
}
- copy_m3_m4(imat, ob->obmat);
+ copy_m3_m4(imat, ob->object_to_world);
invert_m3(imat);
if (type == CALC_ROLL_CURSOR) { /* Cursor */
float cursor_local[3];
const View3DCursor *cursor = &scene->cursor;
- invert_m4_m4(ob->imat, ob->obmat);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
copy_v3_v3(cursor_local, cursor->location);
- mul_m4_v3(ob->imat, cursor_local);
+ mul_m4_v3(ob->world_to_object, cursor_local);
/* cursor */
for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
@@ -730,8 +730,8 @@ static int armature_fill_bones_exec(bContext *C, wmOperator *op)
ebp = points.first;
/* Get points - cursor (tail) */
- invert_m4_m4(obedit->imat, obedit->obmat);
- mul_v3_m4v3(curs, obedit->imat, scene->cursor.location);
+ invert_m4_m4(obedit->world_to_object, obedit->object_to_world);
+ mul_v3_m4v3(curs, obedit->world_to_object, scene->cursor.location);
/* Create a bone */
newbone = add_points_bone(obedit, ebp->vec, curs);
@@ -767,8 +767,8 @@ static int armature_fill_bones_exec(bContext *C, wmOperator *op)
float dist_sq_a, dist_sq_b;
/* get cursor location */
- invert_m4_m4(obedit->imat, obedit->obmat);
- mul_v3_m4v3(curs, obedit->imat, scene->cursor.location);
+ invert_m4_m4(obedit->world_to_object, obedit->object_to_world);
+ mul_v3_m4v3(curs, obedit->world_to_object, scene->cursor.location);
/* get distances */
dist_sq_a = len_squared_v3v3(ebp_a->vec, curs);
diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c
index 9f1883ccac0..fccf2964868 100644
--- a/source/blender/editors/armature/armature_relations.c
+++ b/source/blender/editors/armature/armature_relations.c
@@ -289,7 +289,7 @@ int ED_armature_join_objects_exec(bContext *C, wmOperator *op)
/* Inverse transform for all selected armatures in this object,
* See #object_join_exec for detailed comment on why the safe version is used. */
- invert_m4_m4_safe_ortho(oimat, ob_active->obmat);
+ invert_m4_m4_safe_ortho(oimat, ob_active->object_to_world);
/* Get edit-bones of active armature to add edit-bones to */
ED_armature_to_edit(arm);
@@ -321,7 +321,7 @@ int ED_armature_join_objects_exec(bContext *C, wmOperator *op)
// BASACT->flag &= ~OB_MODE_POSE;
/* Find the difference matrix */
- mul_m4_m4m4(mat, oimat, ob_iter->obmat);
+ mul_m4_m4m4(mat, oimat, ob_iter->object_to_world);
/* Copy bones and posechannels from the object to the edit armature */
for (pchan = opose->chanbase.first; pchan; pchan = pchann) {
diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c
index 6b8f790d30f..3ee0510ca7f 100644
--- a/source/blender/editors/armature/armature_select.c
+++ b/source/blender/editors/armature/armature_select.c
@@ -1601,8 +1601,8 @@ static const EnumPropertyItem prop_similar_types[] = {
static float bone_length_squared_worldspace_get(Object *ob, EditBone *ebone)
{
float v1[3], v2[3];
- mul_v3_mat3_m4v3(v1, ob->obmat, ebone->head);
- mul_v3_mat3_m4v3(v2, ob->obmat, ebone->tail);
+ mul_v3_mat3_m4v3(v1, ob->object_to_world, ebone->head);
+ mul_v3_mat3_m4v3(v2, ob->object_to_world, ebone->tail);
return len_squared_v3v3(v1, v2);
}
@@ -1650,8 +1650,8 @@ static void bone_direction_worldspace_get(Object *ob, EditBone *ebone, float *r_
copy_v3_v3(v1, ebone->head);
copy_v3_v3(v2, ebone->tail);
- mul_m4_v3(ob->obmat, v1);
- mul_m4_v3(ob->obmat, v2);
+ mul_m4_v3(ob->object_to_world, v1);
+ mul_m4_v3(ob->object_to_world, v2);
sub_v3_v3v3(r_dir, v1, v2);
normalize_v3(r_dir);
diff --git a/source/blender/editors/armature/armature_skinning.c b/source/blender/editors/armature/armature_skinning.c
index 6155aac621d..3c9c8cf05b3 100644
--- a/source/blender/editors/armature/armature_skinning.c
+++ b/source/blender/editors/armature/armature_skinning.c
@@ -365,8 +365,8 @@ static void add_verts_to_dgroups(ReportList *reports,
copy_v3_v3(tip[j], bone->arm_tail);
}
- mul_m4_v3(par->obmat, root[j]);
- mul_m4_v3(par->obmat, tip[j]);
+ mul_m4_v3(par->object_to_world, root[j]);
+ mul_m4_v3(par->object_to_world, tip[j]);
/* set selected */
if (wpmode) {
@@ -414,7 +414,7 @@ static void add_verts_to_dgroups(ReportList *reports,
if (!vertsfilled) {
copy_v3_v3(verts[i], mesh_verts[i].co);
}
- mul_m4_v3(ob->obmat, verts[i]);
+ mul_m4_v3(ob->object_to_world, verts[i]);
}
/* compute the weights based on gathered vertices and bones */
@@ -438,7 +438,7 @@ static void add_verts_to_dgroups(ReportList *reports,
root,
tip,
selected,
- mat4_to_scale(par->obmat));
+ mat4_to_scale(par->object_to_world));
}
/* only generated in some cases but can call anyway */
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index 567977e51c4..dfb9e8a79fa 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -1788,11 +1788,11 @@ void ED_mesh_deform_bind_callback(Object *object,
mmd_orig->bindcagecos = (float *)mdb.cagecos;
mmd_orig->verts_num = mdb.verts_num;
mmd_orig->cage_verts_num = mdb.cage_verts_num;
- copy_m4_m4(mmd_orig->bindmat, mmd_orig->object->obmat);
+ copy_m4_m4(mmd_orig->bindmat, mmd_orig->object->object_to_world);
/* transform bindcagecos to world space */
for (a = 0; a < mdb.cage_verts_num; a++) {
- mul_m4_v3(mmd_orig->object->obmat, mmd_orig->bindcagecos + a * 3);
+ mul_m4_v3(mmd_orig->object->object_to_world, mmd_orig->bindcagecos + a * 3);
}
/* free */
diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c
index f92b72bbb66..51071815823 100644
--- a/source/blender/editors/armature/pose_transform.c
+++ b/source/blender/editors/armature/pose_transform.c
@@ -77,10 +77,10 @@ static void applyarmature_fix_boneparents(const bContext *C, Scene *scene, Objec
/* apply current transform from parent (not yet destroyed),
* then calculate new parent inverse matrix
*/
- BKE_object_apply_mat4(ob, ob->obmat, false, false);
+ BKE_object_apply_mat4(ob, ob->object_to_world, false, false);
BKE_object_workob_calc_parent(depsgraph, scene, ob, &workob);
- invert_m4_m4(ob->parentinv, workob.obmat);
+ invert_m4_m4(ob->parentinv, workob.object_to_world);
}
}
}
diff --git a/source/blender/editors/asset/ED_asset_list.h b/source/blender/editors/asset/ED_asset_list.h
index b54f81004f2..3d2aaa3bda1 100644
--- a/source/blender/editors/asset/ED_asset_list.h
+++ b/source/blender/editors/asset/ED_asset_list.h
@@ -23,6 +23,7 @@ struct wmNotifier;
*/
void ED_assetlist_storage_fetch(const struct AssetLibraryReference *library_reference,
const struct bContext *C);
+bool ED_assetlist_is_loaded(const struct AssetLibraryReference *library_reference);
void ED_assetlist_ensure_previews_job(const struct AssetLibraryReference *library_reference,
const struct bContext *C);
void ED_assetlist_clear(const struct AssetLibraryReference *library_reference, struct bContext *C);
diff --git a/source/blender/editors/asset/intern/asset_list.cc b/source/blender/editors/asset/intern/asset_list.cc
index 7fdb924d769..bb72c5cc1bb 100644
--- a/source/blender/editors/asset/intern/asset_list.cc
+++ b/source/blender/editors/asset/intern/asset_list.cc
@@ -351,7 +351,7 @@ void AssetListStorage::fetch_library(const AssetLibraryReference &library_refere
void AssetListStorage::destruct()
{
- global_storage().~AssetListMap();
+ global_storage().clear();
}
AssetList *AssetListStorage::lookup_list(const AssetLibraryReference &library_ref)
@@ -422,6 +422,18 @@ void ED_assetlist_storage_fetch(const AssetLibraryReference *library_reference,
AssetListStorage::fetch_library(*library_reference, *C);
}
+bool ED_assetlist_is_loaded(const AssetLibraryReference *library_reference)
+{
+ AssetList *list = AssetListStorage::lookup_list(*library_reference);
+ if (!list) {
+ return false;
+ }
+ if (list->needsRefetch()) {
+ return false;
+ }
+ return true;
+}
+
void ED_assetlist_ensure_previews_job(const AssetLibraryReference *library_reference,
const bContext *C)
{
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 61e92f0a1c3..f9377503630 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -4999,7 +4999,7 @@ bool ed_editnurb_spin(
invert_m3_m3(persinv, persmat);
/* imat and center and size */
- copy_m3_m4(bmat, obedit->obmat);
+ copy_m3_m4(bmat, obedit->object_to_world);
invert_m3_m3(imat, bmat);
axis_angle_to_mat3(cmat, axis, M_PI_4);
@@ -5095,8 +5095,8 @@ static int spin_exec(bContext *C, wmOperator *op)
continue;
}
- invert_m4_m4(obedit->imat, obedit->obmat);
- mul_m4_v3(obedit->imat, cent);
+ invert_m4_m4(obedit->world_to_object, obedit->object_to_world);
+ mul_m4_v3(obedit->world_to_object, cent);
if (!ed_editnurb_spin(viewmat, v3d, obedit, axis, cent)) {
count_failed += 1;
@@ -5574,7 +5574,7 @@ static int add_vertex_exec(bContext *C, wmOperator *op)
RNA_float_get_array(op->ptr, "location", location);
- invert_m4_m4(imat, obedit->obmat);
+ invert_m4_m4(imat, obedit->object_to_world);
mul_m4_v3(imat, location);
if (ed_editcurve_addvert(cu, editnurb, v3d, location)) {
@@ -5614,10 +5614,10 @@ static int add_vertex_invoke(bContext *C, wmOperator *op, const wmEvent *event)
ED_curve_nurb_vert_selected_find(cu, vc.v3d, &nu, &bezt, &bp);
if (bezt) {
- mul_v3_m4v3(location, vc.obedit->obmat, bezt->vec[1]);
+ mul_v3_m4v3(location, vc.obedit->object_to_world, bezt->vec[1]);
}
else if (bp) {
- mul_v3_m4v3(location, vc.obedit->obmat, bp->vec);
+ mul_v3_m4v3(location, vc.obedit->object_to_world, bp->vec);
}
else {
copy_v3_v3(location, vc.scene->cursor.location);
@@ -5662,8 +5662,8 @@ static int add_vertex_invoke(bContext *C, wmOperator *op, const wmEvent *event)
/* get the plane */
float plane[4];
/* only normalize to avoid precision errors */
- normalize_v3_v3(plane, vc.obedit->obmat[2]);
- plane[3] = -dot_v3v3(plane, vc.obedit->obmat[3]);
+ normalize_v3_v3(plane, vc.obedit->object_to_world[2]);
+ plane[3] = -dot_v3v3(plane, vc.obedit->object_to_world[3]);
if (fabsf(dot_v3v3(view_dir, plane)) < eps) {
/* can't project on an aligned plane. */
@@ -6924,7 +6924,7 @@ int ED_curve_join_objects_exec(bContext *C, wmOperator *op)
/* Inverse transform for all selected curves in this object,
* See #object_join_exec for detailed comment on why the safe version is used. */
- invert_m4_m4_safe_ortho(imat, ob_active->obmat);
+ invert_m4_m4_safe_ortho(imat, ob_active->object_to_world);
Curve *cu_active = ob_active->data;
@@ -6936,7 +6936,7 @@ int ED_curve_join_objects_exec(bContext *C, wmOperator *op)
if (cu->nurb.first) {
/* watch it: switch order here really goes wrong */
- mul_m4_m4m4(cmat, imat, ob_iter->obmat);
+ mul_m4_m4m4(cmat, imat, ob_iter->object_to_world);
/* Compensate for different bevel depth. */
bool do_radius = false;
diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c
index 7632f1b1e64..af3d439dd2e 100644
--- a/source/blender/editors/curve/editcurve_paint.c
+++ b/source/blender/editors/curve/editcurve_paint.c
@@ -148,7 +148,7 @@ static void stroke_elem_pressure_set(const struct CurveDrawData *cdd,
const float adjust = stroke_elem_radius_from_pressure(cdd, pressure) -
stroke_elem_radius_from_pressure(cdd, selem->pressure);
madd_v3_v3fl(selem->location_local, selem->normal_local, adjust);
- mul_v3_m4v3(selem->location_world, cdd->vc.obedit->obmat, selem->location_local);
+ mul_v3_m4v3(selem->location_world, cdd->vc.obedit->object_to_world, selem->location_local);
}
selem->pressure = pressure;
}
@@ -245,11 +245,11 @@ static bool stroke_elem_project_fallback(const struct CurveDrawData *cdd,
cdd->vc.v3d, cdd->vc.region, location_fallback_depth, mval_fl, r_location_world);
zero_v3(r_normal_local);
}
- mul_v3_m4v3(r_location_local, cdd->vc.obedit->imat, r_location_world);
+ mul_v3_m4v3(r_location_local, cdd->vc.obedit->world_to_object, r_location_world);
if (!is_zero_v3(r_normal_world)) {
copy_v3_v3(r_normal_local, r_normal_world);
- mul_transposed_mat3_m4_v3(cdd->vc.obedit->obmat, r_normal_local);
+ mul_transposed_mat3_m4_v3(cdd->vc.obedit->object_to_world, r_normal_local);
normalize_v3(r_normal_local);
}
else {
@@ -304,7 +304,7 @@ static void curve_draw_stroke_from_operator_elem(wmOperator *op, PointerRNA *ite
RNA_float_get_array(itemptr, "mouse", selem->mval);
RNA_float_get_array(itemptr, "location", selem->location_world);
- mul_v3_m4v3(selem->location_local, cdd->vc.obedit->imat, selem->location_world);
+ mul_v3_m4v3(selem->location_local, cdd->vc.obedit->world_to_object, selem->location_world);
selem->pressure = RNA_float_get(itemptr, "pressure");
}
@@ -367,7 +367,7 @@ static void curve_draw_stroke_3d(const struct bContext *UNUSED(C),
/* scale to edit-mode space */
GPU_matrix_push();
- GPU_matrix_mul(obedit->obmat);
+ GPU_matrix_mul(obedit->object_to_world);
BLI_mempool_iternew(cdd->stroke_elem_pool, &iter);
for (selem = BLI_mempool_iterstep(&iter); selem; selem = BLI_mempool_iterstep(&iter)) {
@@ -445,7 +445,7 @@ static void curve_draw_event_add(wmOperator *op, const wmEvent *event)
struct CurveDrawData *cdd = op->customdata;
Object *obedit = cdd->vc.obedit;
- invert_m4_m4(obedit->imat, obedit->obmat);
+ invert_m4_m4(obedit->world_to_object, obedit->object_to_world);
struct StrokeElem *selem = BLI_mempool_calloc(cdd->stroke_elem_pool);
@@ -758,7 +758,7 @@ static int curve_draw_exec(bContext *C, wmOperator *op)
int stroke_len = BLI_mempool_len(cdd->stroke_elem_pool);
const bool is_3d = (cu->flag & CU_3D) != 0;
- invert_m4_m4(obedit->imat, obedit->obmat);
+ invert_m4_m4(obedit->world_to_object, obedit->object_to_world);
if (BLI_mempool_len(cdd->stroke_elem_pool) == 0) {
curve_draw_stroke_from_operator(op);
@@ -1073,8 +1073,8 @@ static int curve_draw_invoke(bContext *C, wmOperator *op, const wmEvent *event)
if (CU_IS_2D(cu)) {
/* 2D overrides other options */
- plane_co = obedit->obmat[3];
- plane_no = obedit->obmat[2];
+ plane_co = obedit->object_to_world[3];
+ plane_no = obedit->object_to_world[2];
cdd->project.use_plane = true;
}
else {
diff --git a/source/blender/editors/curve/editcurve_pen.c b/source/blender/editors/curve/editcurve_pen.c
index f71173f951e..b57ce6fc7cf 100644
--- a/source/blender/editors/curve/editcurve_pen.c
+++ b/source/blender/editors/curve/editcurve_pen.c
@@ -152,8 +152,8 @@ static void update_location_for_2d_curve(const ViewContext *vc, float location[3
/* Get the plane. */
float plane[4];
/* Only normalize to avoid precision errors. */
- normalize_v3_v3(plane, vc->obedit->obmat[2]);
- plane[3] = -dot_v3v3(plane, vc->obedit->obmat[3]);
+ normalize_v3_v3(plane, vc->obedit->object_to_world[2]);
+ plane[3] = -dot_v3v3(plane, vc->obedit->object_to_world[3]);
if (fabsf(dot_v3v3(view_dir, plane)) < eps) {
/* Can't project on an aligned plane. */
@@ -173,7 +173,7 @@ static void update_location_for_2d_curve(const ViewContext *vc, float location[3
}
float imat[4][4];
- invert_m4_m4(imat, vc->obedit->obmat);
+ invert_m4_m4(imat, vc->obedit->object_to_world);
mul_m4_v3(imat, location);
if (CU_IS_2D(cu)) {
@@ -186,7 +186,7 @@ static void screenspace_to_worldspace(const ViewContext *vc,
const float depth[3],
float r_pos_3d[3])
{
- mul_v3_m4v3(r_pos_3d, vc->obedit->obmat, depth);
+ mul_v3_m4v3(r_pos_3d, vc->obedit->object_to_world, depth);
ED_view3d_win_to_3d(vc->v3d, vc->region, r_pos_3d, pos_2d, r_pos_3d);
update_location_for_2d_curve(vc, r_pos_3d);
}
@@ -1082,7 +1082,7 @@ static void extrude_points_from_selected_vertices(const ViewContext *vc,
float location[3];
if (sel_exists) {
- mul_v3_m4v3(location, vc->obedit->obmat, center);
+ mul_v3_m4v3(location, vc->obedit->object_to_world, center);
}
else {
copy_v3_v3(location, vc->scene->cursor.location);
diff --git a/source/blender/editors/curve/editcurve_select.c b/source/blender/editors/curve/editcurve_select.c
index 9c0c580f699..da742dd0c61 100644
--- a/source/blender/editors/curve/editcurve_select.c
+++ b/source/blender/editors/curve/editcurve_select.c
@@ -1517,7 +1517,7 @@ static void nurb_bezt_direction_worldspace_get(Object *ob,
{
float rsmat[3][3];
BKE_nurb_bezt_calc_normal(nu, bezt, r_dir);
- copy_m3_m4(rsmat, ob->obmat);
+ copy_m3_m4(rsmat, ob->object_to_world);
mul_m3_v3(rsmat, r_dir);
normalize_v3(r_dir);
}
@@ -1526,7 +1526,7 @@ static void nurb_bpoint_direction_worldspace_get(Object *ob, Nurb *nu, BPoint *b
{
float rsmat[3][3];
BKE_nurb_bpoint_calc_normal(nu, bp, r_dir);
- copy_m3_m4(rsmat, ob->obmat);
+ copy_m3_m4(rsmat, ob->object_to_world);
mul_m3_v3(rsmat, r_dir);
normalize_v3(r_dir);
}
diff --git a/source/blender/editors/curves/intern/curves_ops.cc b/source/blender/editors/curves/intern/curves_ops.cc
index 38b2b2071b8..1d2b1264477 100644
--- a/source/blender/editors/curves/intern/curves_ops.cc
+++ b/source/blender/editors/curves/intern/curves_ops.cc
@@ -435,7 +435,7 @@ static bke::CurvesGeometry particles_to_curves(Object &object, ParticleSystem &p
bke::CurvesGeometry curves(points_num, curves_num);
curves.offsets_for_write().copy_from(curve_offsets);
- const float4x4 object_to_world_mat = object.obmat;
+ const float4x4 object_to_world_mat = object.object_to_world;
const float4x4 world_to_object_mat = object_to_world_mat.inverted();
MutableSpan<float3> positions = curves.positions_for_write();
@@ -497,7 +497,7 @@ static int curves_convert_from_particle_system_exec(bContext *C, wmOperator * /*
Object *ob_new = BKE_object_add(&bmain, &scene, &view_layer, OB_CURVES, psys_eval->name);
Curves *curves_id = static_cast<Curves *>(ob_new->data);
- BKE_object_apply_mat4(ob_new, ob_from_orig->obmat, true, false);
+ BKE_object_apply_mat4(ob_new, ob_from_orig->object_to_world, true, false);
bke::CurvesGeometry::wrap(curves_id->geometry) = particles_to_curves(*ob_from_eval, *psys_eval);
DEG_relations_tag_update(&bmain);
diff --git a/source/blender/editors/gizmo_library/gizmo_library_presets.c b/source/blender/editors/gizmo_library/gizmo_library_presets.c
index 1ac4ce0bcdf..465c72dd44f 100644
--- a/source/blender/editors/gizmo_library/gizmo_library_presets.c
+++ b/source/blender/editors/gizmo_library/gizmo_library_presets.c
@@ -114,7 +114,7 @@ void ED_gizmo_draw_preset_facemap(
}
GPU_matrix_push();
- GPU_matrix_mul(ob->obmat);
+ GPU_matrix_mul(ob->object_to_world);
ED_draw_object_facemap(depsgraph, ob, color, facemap);
GPU_matrix_pop();
diff --git a/source/blender/editors/gpencil/gpencil_armature.c b/source/blender/editors/gpencil/gpencil_armature.c
index 5f5a4b41b27..2b7e09b7f05 100644
--- a/source/blender/editors/gpencil/gpencil_armature.c
+++ b/source/blender/editors/gpencil/gpencil_armature.c
@@ -329,8 +329,8 @@ static void gpencil_add_verts_to_dgroups(
copy_v3_v3(tip[j], bone->arm_tail);
}
- mul_m4_v3(ob_arm->obmat, root[j]);
- mul_m4_v3(ob_arm->obmat, tip[j]);
+ mul_m4_v3(ob_arm->object_to_world, root[j]);
+ mul_m4_v3(ob_arm->object_to_world, tip[j]);
selected[j] = 1;
@@ -364,7 +364,7 @@ static void gpencil_add_verts_to_dgroups(
/* transform stroke points to global space */
for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
copy_v3_v3(verts[i], &pt->x);
- mul_m4_v3(ob->obmat, verts[i]);
+ mul_m4_v3(ob->object_to_world, verts[i]);
}
/* loop groups and assign weight */
diff --git a/source/blender/editors/gpencil/gpencil_bake_animation.cc b/source/blender/editors/gpencil/gpencil_bake_animation.cc
index 1535fd614fe..4ef2cf9ffd6 100644
--- a/source/blender/editors/gpencil/gpencil_bake_animation.cc
+++ b/source/blender/editors/gpencil/gpencil_bake_animation.cc
@@ -222,7 +222,7 @@ static int gpencil_bake_grease_pencil_animation_exec(bContext *C, wmOperator *op
ushort local_view_bits = (v3d && v3d->localvd) ? v3d->local_view_uuid : 0;
ob_gpencil = ED_gpencil_add_object(C, scene->cursor.location, local_view_bits);
float invmat[4][4];
- invert_m4_m4(invmat, ob_gpencil->obmat);
+ invert_m4_m4(invmat, ob_gpencil->object_to_world);
bGPdata *gpd_dst = (bGPdata *)ob_gpencil->data;
gpd_dst->draw_mode = GP_DRAWMODE_2D;
@@ -323,7 +323,7 @@ static int gpencil_bake_grease_pencil_animation_exec(bContext *C, wmOperator *op
bGPDspoint *pt = &gps->points[j];
pt->runtime.idx_orig = 0;
pt->runtime.pt_orig = nullptr;
- mul_m4_v3(ob_eval->obmat, &pt->x);
+ mul_m4_v3(ob_eval->object_to_world, &pt->x);
mul_m4_v3(invmat, &pt->x);
}
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index c6d7eb294fb..0417694d7bd 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -2914,8 +2914,8 @@ int ED_gpencil_join_objects_exec(bContext *C, wmOperator *op)
float offset_global[3];
float offset_local[3];
- sub_v3_v3v3(offset_global, ob_active->loc, ob_iter->obmat[3]);
- copy_m3_m4(bmat, ob_active->obmat);
+ sub_v3_v3v3(offset_global, ob_active->loc, ob_iter->object_to_world[3]);
+ copy_m3_m4(bmat, ob_active->object_to_world);
/* Inverse transform for all selected curves in this object,
* See #object_join_exec for detailed comment on why the safe version is used. */
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 66f86a3e0c1..f9b40a4c79b 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -4162,7 +4162,7 @@ static int gpencil_stroke_outline_exec(bContext *C, wmOperator *op)
Scene *scene = CTX_data_scene(C);
Object *cam_ob = scene->camera;
if (cam_ob != NULL) {
- invert_m4_m4(viewmat, cam_ob->obmat);
+ invert_m4_m4(viewmat, cam_ob->object_to_world);
}
break;
}
@@ -4229,7 +4229,7 @@ static int gpencil_stroke_outline_exec(bContext *C, wmOperator *op)
/* Apply layer thickness change. */
gps_duplicate->thickness += gpl->line_change;
/* Apply object scale to thickness. */
- gps_duplicate->thickness *= mat4_to_scale(ob->obmat);
+ gps_duplicate->thickness *= mat4_to_scale(ob->object_to_world);
CLAMP_MIN(gps_duplicate->thickness, 1.0f);
/* Stroke. */
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index b94b413edc2..5c88e719b8c 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -317,7 +317,7 @@ static void add_endpoint_radius_help(tGPDfill *tgpf,
/* Rotate to object rotation. */
sub_v3_v3(&pt->x, endpoint);
- mul_mat3_m4_v3(tgpf->ob->obmat, &pt->x);
+ mul_mat3_m4_v3(tgpf->ob->object_to_world, &pt->x);
add_v3_v3(&pt->x, endpoint);
}
}
diff --git a/source/blender/editors/gpencil/gpencil_mesh.cc b/source/blender/editors/gpencil/gpencil_mesh.cc
index d847fbe2aea..2b01fce5bf8 100644
--- a/source/blender/editors/gpencil/gpencil_mesh.cc
+++ b/source/blender/editors/gpencil/gpencil_mesh.cc
@@ -299,7 +299,7 @@ static int gpencil_bake_mesh_animation_exec(bContext *C, wmOperator *op)
angle,
thickness,
offset,
- ob_eval->obmat,
+ ob_eval->object_to_world,
frame_offset,
use_seams,
use_faces,
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index a82288e3377..d2ed1720bf8 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -936,7 +936,7 @@ static bGPDstroke *gpencil_stroke_to_outline(tGPsdata *p, bGPDstroke *gps)
/* Apply layer thickness change. */
gps_duplicate->thickness += gpl->line_change;
/* Apply object scale to thickness. */
- gps_duplicate->thickness *= mat4_to_scale(p->ob->obmat);
+ gps_duplicate->thickness *= mat4_to_scale(p->ob->object_to_world);
CLAMP_MIN(gps_duplicate->thickness, 1.0f);
/* Stroke. */
diff --git a/source/blender/editors/gpencil/gpencil_sculpt_paint.c b/source/blender/editors/gpencil/gpencil_sculpt_paint.c
index 3b7336f41e8..37c1524c2ff 100644
--- a/source/blender/editors/gpencil/gpencil_sculpt_paint.c
+++ b/source/blender/editors/gpencil/gpencil_sculpt_paint.c
@@ -671,7 +671,7 @@ static bool gpencil_brush_pinch_apply(tGP_BrushEditData *gso,
/* 1) Make this point relative to the cursor/midpoint (dvec) */
float fpt[3];
- mul_v3_m4v3(fpt, gso->object->obmat, &pt->x);
+ mul_v3_m4v3(fpt, gso->object->object_to_world, &pt->x);
sub_v3_v3v3(vec, fpt, gso->dvec);
/* 2) Shrink the distance by pulling the point towards the midpoint
@@ -691,7 +691,7 @@ static bool gpencil_brush_pinch_apply(tGP_BrushEditData *gso,
/* 3) Translate back to original space, with the shrinkage applied */
add_v3_v3v3(fpt, gso->dvec, vec);
- mul_v3_m4v3(&pt->x, gso->object->imat, fpt);
+ mul_v3_m4v3(&pt->x, gso->object->world_to_object, fpt);
/* compute lock axis */
gpencil_sculpt_compute_lock_axis(gso, pt, save_pt);
@@ -743,12 +743,12 @@ static bool gpencil_brush_twist_apply(tGP_BrushEditData *gso,
/* Rotate point */
float fpt[3];
- mul_v3_m4v3(fpt, gso->object->obmat, &pt->x);
+ mul_v3_m4v3(fpt, gso->object->object_to_world, &pt->x);
sub_v3_v3v3(vec, fpt, gso->dvec); /* make relative to center
* (center is stored in dvec) */
mul_m3_v3(rmat, vec);
add_v3_v3v3(fpt, vec, gso->dvec); /* restore */
- mul_v3_m4v3(&pt->x, gso->object->imat, fpt);
+ mul_v3_m4v3(&pt->x, gso->object->world_to_object, fpt);
/* compute lock axis */
gpencil_sculpt_compute_lock_axis(gso, pt, save_pt);
@@ -1037,11 +1037,11 @@ static void gpencil_brush_clone_add(bContext *C, tGP_BrushEditData *gso)
*/
for (i = 0, pt = new_stroke->points; i < new_stroke->totpoints; i++, pt++) {
/* Rotate around center new position */
- mul_mat3_m4_v3(gso->object->obmat, &pt->x); /* only rotation component */
+ mul_mat3_m4_v3(gso->object->object_to_world, &pt->x); /* only rotation component */
/* assume that the delta can just be applied, and then everything works */
add_v3_v3(&pt->x, delta);
- mul_m4_v3(gso->object->imat, &pt->x);
+ mul_m4_v3(gso->object->world_to_object, &pt->x);
}
/* Store ref for later */
@@ -1172,7 +1172,7 @@ static bool gpencil_sculpt_brush_init(bContext *C, wmOperator *op)
gso->object = ob;
if (ob) {
float matrix[4][4];
- copy_m4_m4(matrix, ob->obmat);
+ copy_m4_m4(matrix, ob->object_to_world);
zero_axis_bias_m4(matrix);
invert_m4_m4(gso->inv_mat, matrix);
gso->vrgroup = gso->gpd->vertex_group_active_index - 1;
diff --git a/source/blender/editors/gpencil/gpencil_trace_ops.c b/source/blender/editors/gpencil/gpencil_trace_ops.c
index 36165c6b7c0..1a18e10412e 100644
--- a/source/blender/editors/gpencil/gpencil_trace_ops.c
+++ b/source/blender/editors/gpencil/gpencil_trace_ops.c
@@ -45,7 +45,7 @@
typedef struct TraceJob {
/* from wmJob */
struct Object *owner;
- short *stop, *do_update;
+ bool *stop, *do_update;
float *progress;
bContext *C;
@@ -198,7 +198,7 @@ static void trace_initialize_job_data(TraceJob *trace_job)
}
}
-static void trace_start_job(void *customdata, short *stop, short *do_update, float *progress)
+static void trace_start_job(void *customdata, bool *stop, bool *do_update, float *progress)
{
TraceJob *trace_job = customdata;
@@ -257,7 +257,7 @@ static void trace_start_job(void *customdata, short *stop, short *do_update, flo
trace_job->success = !trace_job->was_canceled;
*do_update = true;
- *stop = 0;
+ *stop = false;
}
static void trace_end_job(void *customdata)
@@ -339,7 +339,7 @@ static int gpencil_trace_image_exec(bContext *C, wmOperator *op)
ED_object_base_activate(job->C, job->base_active);
if ((job->image->source == IMA_SRC_FILE) || (job->frame_num > 0)) {
- short stop = 0, do_update = true;
+ bool stop = false, do_update = true;
float progress;
trace_start_job(job, &stop, &do_update, &progress);
trace_end_job(job);
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index cc13f667e48..7d814b43196 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -900,7 +900,7 @@ void ED_gpencil_drawing_reference_get(const Scene *scene,
}
else {
/* use object location */
- copy_v3_v3(r_vec, ob->obmat[3]);
+ copy_v3_v3(r_vec, ob->object_to_world[3]);
/* Apply layer offset. */
bGPdata *gpd = ob->data;
bGPDlayer *gpl = BKE_gpencil_layer_active_get(gpd);
@@ -984,7 +984,7 @@ void ED_gpencil_project_stroke_to_plane(const Scene *scene,
/* if object, apply object rotation */
if (ob && (ob->type == OB_GPENCIL)) {
float mat[4][4];
- copy_m4_m4(mat, ob->obmat);
+ copy_m4_m4(mat, ob->object_to_world);
/* move origin to cursor */
if ((ts->gpencil_v3d_align & GP_PROJECT_CURSOR) == 0) {
@@ -1206,7 +1206,7 @@ void ED_gpencil_project_point_to_plane(const Scene *scene,
/* if object, apply object rotation */
if (ob && (ob->type == OB_GPENCIL)) {
float mat[4][4];
- copy_m4_m4(mat, ob->obmat);
+ copy_m4_m4(mat, ob->object_to_world);
if ((ts->gpencil_v3d_align & GP_PROJECT_CURSOR) == 0) {
if (gpl != NULL) {
add_v3_v3(mat[3], gpl->location);
@@ -1233,7 +1233,7 @@ void ED_gpencil_project_point_to_plane(const Scene *scene,
/* move origin to object */
if ((ts->gpencil_v3d_align & GP_PROJECT_CURSOR) == 0) {
- copy_v3_v3(mat[3], ob->obmat[3]);
+ copy_v3_v3(mat[3], ob->object_to_world[3]);
}
mul_mat3_m4_v3(mat, plane_normal);
@@ -1365,16 +1365,16 @@ void ED_gpencil_reset_layers_parent(Depsgraph *depsgraph, Object *obact, bGPdata
if (gpl->parent != NULL) {
/* calculate new matrix */
if (ELEM(gpl->partype, PAROBJECT, PARSKEL)) {
- invert_m4_m4(cur_mat, gpl->parent->obmat);
- copy_v3_v3(gpl_loc, obact->obmat[3]);
+ invert_m4_m4(cur_mat, gpl->parent->object_to_world);
+ copy_v3_v3(gpl_loc, obact->object_to_world[3]);
}
else if (gpl->partype == PARBONE) {
bPoseChannel *pchan = BKE_pose_channel_find_name(gpl->parent->pose, gpl->parsubstr);
if (pchan) {
float tmp_mat[4][4];
- mul_m4_m4m4(tmp_mat, gpl->parent->obmat, pchan->pose_mat);
+ mul_m4_m4m4(tmp_mat, gpl->parent->object_to_world, pchan->pose_mat);
invert_m4_m4(cur_mat, tmp_mat);
- copy_v3_v3(gpl_loc, obact->obmat[3]);
+ copy_v3_v3(gpl_loc, obact->object_to_world[3]);
}
}
diff --git a/source/blender/editors/gpencil/gpencil_uv.c b/source/blender/editors/gpencil/gpencil_uv.c
index 51cb08cf592..0144ffa07c7 100644
--- a/source/blender/editors/gpencil/gpencil_uv.c
+++ b/source/blender/editors/gpencil/gpencil_uv.c
@@ -138,7 +138,7 @@ static bool gpencil_uv_transform_init(bContext *C, wmOperator *op)
opdata->array_loc = NULL;
opdata->array_rot = NULL;
opdata->array_scale = NULL;
- opdata->ob_scale = mat4_to_scale(opdata->ob->obmat);
+ opdata->ob_scale = mat4_to_scale(opdata->ob->object_to_world);
opdata->vinit_rotation[0] = 1.0f;
opdata->vinit_rotation[1] = 0.0f;
@@ -158,7 +158,7 @@ static bool gpencil_uv_transform_init(bContext *C, wmOperator *op)
float r_center[3];
gpencil_stroke_center(gps, r_center);
/* Add object location. */
- add_v3_v3(r_center, opdata->ob->obmat[3]);
+ add_v3_v3(r_center, opdata->ob->object_to_world[3]);
add_v3_v3(center, r_center);
i++;
}
diff --git a/source/blender/editors/include/ED_uvedit.h b/source/blender/editors/include/ED_uvedit.h
index b97cd6a9099..5fea8711a84 100644
--- a/source/blender/editors/include/ED_uvedit.h
+++ b/source/blender/editors/include/ED_uvedit.h
@@ -73,8 +73,8 @@ bool ED_object_get_active_image(struct Object *ob,
int mat_nr,
struct Image **r_ima,
struct ImageUser **r_iuser,
- struct bNode **r_node,
- struct bNodeTree **r_ntree);
+ const struct bNode **r_node,
+ const struct bNodeTree **r_ntree);
void ED_object_assign_active_image(struct Main *bmain,
struct Object *ob,
int mat_nr,
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 7e9422ff867..66b3d9fba6b 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -133,6 +133,8 @@ enum {
/** #uiBlock.flag (controls) */
enum {
UI_BLOCK_LOOP = 1 << 0,
+ /** Indicate that items in a popup are drawn with inverted order. Used for arrow key navigation
+ * so that it knows to invert the navigation direction to match the drawing order. */
UI_BLOCK_IS_FLIP = 1 << 1,
UI_BLOCK_NO_FLIP = 1 << 2,
UI_BLOCK_NUMSELECT = 1 << 3,
@@ -784,6 +786,9 @@ void UI_block_set_search_only(uiBlock *block, bool search_only);
* Can be called with C==NULL.
*/
void UI_block_free(const struct bContext *C, uiBlock *block);
+
+void UI_block_listen(const uiBlock *block, const struct wmRegionListenerParams *listener_params);
+
/**
* Can be called with C==NULL.
*/
@@ -2525,6 +2530,7 @@ void uiTemplateNodeView(uiLayout *layout,
struct bNodeTree *ntree,
struct bNode *node,
struct bNodeSocket *input);
+void uiTemplateNodeAssetMenuItems(uiLayout *layout, struct bContext *C, const char *catalog_path);
void uiTemplateTextureUser(uiLayout *layout, struct bContext *C);
/**
* Button to quickly show texture in Properties Editor texture tab.
@@ -3197,9 +3203,6 @@ void UI_interface_tag_script_reload(void);
/* Support click-drag motion which presses the button and closes a popover (like a menu). */
#define USE_UI_POPOVER_ONCE
-void UI_block_views_listen(const uiBlock *block,
- const struct wmRegionListenerParams *listener_params);
-
bool UI_view_item_is_active(const uiViewItemHandle *item_handle);
bool UI_view_item_matches(const uiViewItemHandle *a_handle, const uiViewItemHandle *b_handle);
/**
diff --git a/source/blender/editors/interface/eyedroppers/eyedropper_depth.c b/source/blender/editors/interface/eyedroppers/eyedropper_depth.c
index 3fb5a74944b..c6d950112b9 100644
--- a/source/blender/editors/interface/eyedroppers/eyedropper_depth.c
+++ b/source/blender/editors/interface/eyedroppers/eyedropper_depth.c
@@ -162,7 +162,7 @@ static void depthdropper_depth_sample_pt(bContext *C,
View3D *v3d = area->spacedata.first;
RegionView3D *rv3d = region->regiondata;
/* weak, we could pass in some reference point */
- const float *view_co = v3d->camera ? v3d->camera->obmat[3] : rv3d->viewinv[3];
+ const float *view_co = v3d->camera ? v3d->camera->object_to_world[3] : rv3d->viewinv[3];
const int mval[2] = {m_xy[0] - region->winrct.xmin, m_xy[1] - region->winrct.ymin};
copy_v2_v2_int(ddr->name_pos, mval);
diff --git a/source/blender/editors/interface/interface.cc b/source/blender/editors/interface/interface.cc
index 1f88d25af2b..331d1581db5 100644
--- a/source/blender/editors/interface/interface.cc
+++ b/source/blender/editors/interface/interface.cc
@@ -3474,6 +3474,7 @@ void UI_block_free(const bContext *C, uiBlock *block)
BLI_freelistN(&block->saferct);
BLI_freelistN(&block->color_pickers.list);
+ BLI_freelistN(&block->dynamic_listeners);
ui_block_free_button_groups(block);
ui_block_free_views(block);
@@ -3481,6 +3482,20 @@ void UI_block_free(const bContext *C, uiBlock *block)
MEM_freeN(block);
}
+void UI_block_listen(const uiBlock *block, const wmRegionListenerParams *listener_params)
+{
+ /* Don't need to let invisible blocks (old blocks from previous redraw) listen. */
+ if (!block->active) {
+ return;
+ }
+
+ LISTBASE_FOREACH (uiBlockDynamicListener *, listener, &block->dynamic_listeners) {
+ listener->listener_func(listener_params);
+ }
+
+ ui_block_views_listen(block, listener_params);
+}
+
void UI_blocklist_update_window_matrix(const bContext *C, const ListBase *lb)
{
ARegion *region = CTX_wm_region(C);
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 9a4f98ebcd6..a5e2cd02f3b 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -1309,8 +1309,8 @@ static void ui_id_preview_image_render_size(
const bContext *C, Scene *scene, ID *id, PreviewImage *pi, int size, const bool use_job);
static void ui_studiolight_icon_job_exec(void *customdata,
- short *UNUSED(stop),
- short *UNUSED(do_update),
+ bool *UNUSED(stop),
+ bool *UNUSED(do_update),
float *UNUSED(progress))
{
Icon **tmp = (Icon **)customdata;
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index 6ef81ad897e..982ac1753e1 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -477,6 +477,12 @@ typedef enum uiButtonGroupFlag {
} uiButtonGroupFlag;
ENUM_OPERATORS(uiButtonGroupFlag, UI_BUTTON_GROUP_PANEL_HEADER);
+typedef struct uiBlockDynamicListener {
+ struct uiBlockDynamicListener *next, *prev;
+
+ void (*listener_func)(const struct wmRegionListenerParams *params);
+} uiBlockDynamicListener;
+
struct uiBlock {
uiBlock *next, *prev;
@@ -499,6 +505,8 @@ struct uiBlock {
* state that is persistent over redraws (e.g. collapsed tree-view items). */
ListBase views;
+ ListBase dynamic_listeners; /* #uiBlockDynamicListener */
+
char name[UI_MAX_NAME_STR];
float winmat[4][4];
@@ -1540,6 +1548,8 @@ void ui_interface_tag_script_reload_queries(void);
/* interface_view.cc */
void ui_block_free_views(struct uiBlock *block);
+void ui_block_views_listen(const uiBlock *block,
+ const struct wmRegionListenerParams *listener_params);
uiViewHandle *ui_block_view_find_matching_in_old_block(const uiBlock *new_block,
const uiViewHandle *new_view);
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 496f72c089a..a456cef7be6 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -5814,6 +5814,14 @@ void UI_menutype_draw(bContext *C, MenuType *mt, struct uiLayout *layout)
printf("%s: opening menu \"%s\"\n", __func__, mt->idname);
}
+ if (mt->listener) {
+ /* Forward the menu type listener to the block we're drawing in. */
+ uiBlock *block = uiLayoutGetBlock(layout);
+ uiBlockDynamicListener *listener = MEM_mallocN(sizeof(*listener), "uiBlockDynamicListener");
+ listener->listener_func = mt->listener;
+ BLI_addtail(&block->dynamic_listeners, listener);
+ }
+
if (layout->context) {
CTX_store_set(C, layout->context);
}
diff --git a/source/blender/editors/interface/interface_panel.cc b/source/blender/editors/interface/interface_panel.cc
index 24d8281aad8..05b6ecf29d5 100644
--- a/source/blender/editors/interface/interface_panel.cc
+++ b/source/blender/editors/interface/interface_panel.cc
@@ -2026,7 +2026,7 @@ static void ui_panel_drag_collapse_handler_add(const bContext *C, const bool was
ui_panel_drag_collapse_handler,
ui_panel_drag_collapse_handler_remove,
dragcol_data,
- 0);
+ eWM_EventHandlerFlag(0));
}
/**
@@ -2510,8 +2510,12 @@ static void panel_handle_data_ensure(const bContext *C,
{
if (panel->activedata == nullptr) {
panel->activedata = MEM_callocN(sizeof(uiHandlePanelData), __func__);
- WM_event_add_ui_handler(
- C, &win->modalhandlers, ui_handler_panel, ui_handler_remove_panel, panel, 0);
+ WM_event_add_ui_handler(C,
+ &win->modalhandlers,
+ ui_handler_panel,
+ ui_handler_remove_panel,
+ panel,
+ eWM_EventHandlerFlag(0));
}
uiHandlePanelData *data = static_cast<uiHandlePanelData *>(panel->activedata);
diff --git a/source/blender/editors/interface/interface_region_menu_popup.cc b/source/blender/editors/interface/interface_region_menu_popup.cc
index 569f657a544..871fd5c6166 100644
--- a/source/blender/editors/interface/interface_region_menu_popup.cc
+++ b/source/blender/editors/interface/interface_region_menu_popup.cc
@@ -10,6 +10,7 @@
#include <cstdarg>
#include <cstdlib>
#include <cstring>
+#include <functional>
#include "MEM_guardedalloc.h"
@@ -166,28 +167,80 @@ struct uiPopupMenu {
uiBut *but;
ARegion *butregion;
+ /* Menu hash is created from this, to keep a memory of recently opened menus. */
+ const char *title;
+
int mx, my;
bool popup, slideout;
- uiMenuCreateFunc menu_func;
- void *menu_arg;
+ std::function<void(bContext *C, uiLayout *layout)> menu_func;
};
+/**
+ * \param title: Optional. If set, it will be used to store recently opened menus so they can be
+ * opened with the mouse over the last chosen entry again.
+ */
+static void ui_popup_menu_create_block(bContext *C,
+ uiPopupMenu *pup,
+ const char *title,
+ const char *block_name)
+{
+ const uiStyle *style = UI_style_get_dpi();
+
+ pup->block = UI_block_begin(C, nullptr, block_name, UI_EMBOSS_PULLDOWN);
+ if (!pup->but) {
+ pup->block->flag |= UI_BLOCK_NO_FLIP;
+ }
+ if (title && title[0]) {
+ pup->block->flag |= UI_BLOCK_POPUP_MEMORY;
+ pup->block->puphash = ui_popup_menu_hash(title);
+ }
+ pup->layout = UI_block_layout(
+ pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, UI_MENU_PADDING, style);
+
+ /* NOTE: this intentionally differs from the menu & sub-menu default because many operators
+ * use popups like this to select one of their options -
+ * where having invoke doesn't make sense.
+ * When the menu was opened from a button, use invoke still for compatibility. This used to be
+ * the default and changing now could cause issues. */
+ const wmOperatorCallContext opcontext = pup->but ? WM_OP_INVOKE_REGION_WIN :
+ WM_OP_EXEC_REGION_WIN;
+
+ uiLayoutSetOperatorContext(pup->layout, opcontext);
+
+ if (pup->but) {
+ if (pup->but->context) {
+ uiLayoutContextCopy(pup->layout, pup->but->context);
+ }
+ }
+}
+
static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, void *arg_pup)
{
uiPopupMenu *pup = static_cast<uiPopupMenu *>(arg_pup);
- if (pup->menu_func) {
- pup->block->handle = handle;
- pup->menu_func(C, pup->layout, pup->menu_arg);
- pup->block->handle = nullptr;
+ int minwidth = 0;
+
+ if (!pup->layout) {
+ ui_popup_menu_create_block(C, pup, pup->title, __func__);
+
+ if (pup->menu_func) {
+ pup->block->handle = handle;
+ pup->menu_func(C, pup->layout);
+ pup->block->handle = nullptr;
+ }
+
+ if (uiLayoutGetUnitsX(pup->layout) != 0.0f) {
+ /* Use the minimum width from the layout if it's set. */
+ minwidth = uiLayoutGetUnitsX(pup->layout) * UI_UNIT_X;
+ }
+
+ pup->layout = nullptr;
}
/* Find block minimum width. */
- int minwidth;
- if (uiLayoutGetUnitsX(pup->layout) != 0.0f) {
- /* Use the minimum width from the layout if it's set. */
- minwidth = uiLayoutGetUnitsX(pup->layout) * UI_UNIT_X;
+ if (minwidth) {
+ /* Skip. */
}
else if (pup->but) {
/* Minimum width to enforce. */
@@ -236,7 +289,7 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi
UI_block_flag_enable(block, UI_BLOCK_MOVEMOUSE_QUIT);
if (pup->popup) {
- int offset[2];
+ int offset[2] = {0, 0};
uiBut *but_activate = nullptr;
UI_block_flag_enable(block, UI_BLOCK_LOOP | UI_BLOCK_NUMSELECT);
@@ -244,36 +297,42 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi
UI_block_direction_set(block, direction);
/* offset the mouse position, possibly based on earlier selection */
- uiBut *bt;
- if ((block->flag & UI_BLOCK_POPUP_MEMORY) && (bt = ui_popup_menu_memory_get(block))) {
- /* position mouse on last clicked item, at 0.8*width of the
- * button, so it doesn't overlap the text too much, also note
- * the offset is negative because we are inverse moving the
- * block to be under the mouse */
- offset[0] = -(bt->rect.xmin + 0.8f * BLI_rctf_size_x(&bt->rect));
- offset[1] = -(bt->rect.ymin + 0.5f * UI_UNIT_Y);
-
- if (ui_but_is_editable(bt)) {
- but_activate = bt;
- }
- }
- else {
- /* position mouse at 0.8*width of the button and below the tile
- * on the first item */
- offset[0] = 0;
- LISTBASE_FOREACH (uiBut *, but_iter, &block->buttons) {
- offset[0] = min_ii(offset[0],
- -(but_iter->rect.xmin + 0.8f * BLI_rctf_size_x(&but_iter->rect)));
+ if (!handle->refresh) {
+ uiBut *bt;
+ if ((block->flag & UI_BLOCK_POPUP_MEMORY) && (bt = ui_popup_menu_memory_get(block))) {
+ /* position mouse on last clicked item, at 0.8*width of the
+ * button, so it doesn't overlap the text too much, also note
+ * the offset is negative because we are inverse moving the
+ * block to be under the mouse */
+ offset[0] = -(bt->rect.xmin + 0.8f * BLI_rctf_size_x(&bt->rect));
+ offset[1] = -(bt->rect.ymin + 0.5f * UI_UNIT_Y);
+
+ if (ui_but_is_editable(bt)) {
+ but_activate = bt;
+ }
}
+ else {
+ /* position mouse at 0.8*width of the button and below the tile
+ * on the first item */
+ offset[0] = 0;
+ LISTBASE_FOREACH (uiBut *, but_iter, &block->buttons) {
+ offset[0] = min_ii(offset[0],
+ -(but_iter->rect.xmin + 0.8f * BLI_rctf_size_x(&but_iter->rect)));
+ }
- offset[1] = 2.1 * UI_UNIT_Y;
+ offset[1] = 2.1 * UI_UNIT_Y;
- LISTBASE_FOREACH (uiBut *, but_iter, &block->buttons) {
- if (ui_but_is_editable(but_iter)) {
- but_activate = but_iter;
- break;
+ LISTBASE_FOREACH (uiBut *, but_iter, &block->buttons) {
+ if (ui_but_is_editable(but_iter)) {
+ but_activate = but_iter;
+ break;
+ }
}
}
+ copy_v2_v2_int(handle->prev_bounds_offset, offset);
+ }
+ else {
+ copy_v2_v2_int(offset, handle->prev_bounds_offset);
}
/* in rare cases this is needed since moving the popup
@@ -312,27 +371,35 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi
return pup->block;
}
-uiPopupBlockHandle *ui_popup_menu_create(
- bContext *C, ARegion *butregion, uiBut *but, uiMenuCreateFunc menu_func, void *arg)
+static void ui_block_free_func_POPUP(void *arg_pup)
+{
+ uiPopupMenu *pup = static_cast<uiPopupMenu *>(arg_pup);
+ MEM_delete(pup);
+}
+
+static uiPopupBlockHandle *ui_popup_menu_create(
+ bContext *C,
+ ARegion *butregion,
+ uiBut *but,
+ const char *title,
+ std::function<void(bContext *, uiLayout *)> menu_func)
{
wmWindow *window = CTX_wm_window(C);
- const uiStyle *style = UI_style_get_dpi();
- uiPopupMenu *pup = MEM_cnew<uiPopupMenu>(__func__);
- pup->block = UI_block_begin(C, nullptr, __func__, UI_EMBOSS_PULLDOWN);
- pup->block->flag |= UI_BLOCK_NUMSELECT; /* Default menus to numeric-selection. */
- pup->layout = UI_block_layout(
- pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, UI_MENU_PADDING, style);
- pup->slideout = but ? ui_block_is_menu(but->block) : false;
- pup->but = but;
- uiLayoutSetOperatorContext(pup->layout, WM_OP_INVOKE_REGION_WIN);
+ uiPopupMenu *pup = MEM_new<uiPopupMenu>(__func__);
+ pup->title = title;
+ /* menu is created from a callback */
+ pup->menu_func = menu_func;
+ if (but) {
+ pup->slideout = ui_block_is_menu(but->block);
+ pup->but = but;
+ }
if (!but) {
/* no button to start from, means we are a popup */
pup->mx = window->eventstate->xy[0];
pup->my = window->eventstate->xy[1];
pup->popup = true;
- pup->block->flag |= UI_BLOCK_NO_FLIP;
}
/* some enums reversing is strange, currently we have no good way to
* reverse some enum's but not others, so reverse all so the first menu
@@ -346,17 +413,10 @@ uiPopupBlockHandle *ui_popup_menu_create(
pup->block->flag |= UI_BLOCK_NO_FLIP;
}
#endif
- if (but->context) {
- uiLayoutContextCopy(pup->layout, but->context);
- }
}
- /* menu is created from a callback */
- pup->menu_func = menu_func;
- pup->menu_arg = arg;
-
uiPopupBlockHandle *handle = ui_popup_block_create(
- C, butregion, but, nullptr, ui_block_func_POPUP, pup, nullptr);
+ C, butregion, but, nullptr, ui_block_func_POPUP, pup, ui_block_free_func_POPUP);
if (!but) {
handle->popup = true;
@@ -365,68 +425,75 @@ uiPopupBlockHandle *ui_popup_menu_create(
WM_event_add_mousemove(window);
}
- MEM_freeN(pup);
-
return handle;
}
+uiPopupBlockHandle *ui_popup_menu_create(
+ bContext *C, ARegion *butregion, uiBut *but, uiMenuCreateFunc menu_func, void *arg)
+{
+ return ui_popup_menu_create(
+ C, butregion, but, nullptr, [menu_func, arg](bContext *C, uiLayout *layout) {
+ menu_func(C, layout, arg);
+ });
+}
+
/** \} */
/* -------------------------------------------------------------------- */
/** \name Popup Menu API with begin & end
* \{ */
+static void create_title_button(uiLayout *layout, const char *title, int icon)
+{
+ uiBlock *block = uiLayoutGetBlock(layout);
+ char titlestr[256];
+
+ if (icon) {
+ BLI_snprintf(titlestr, sizeof(titlestr), " %s", title);
+ uiDefIconTextBut(block,
+ UI_BTYPE_LABEL,
+ 0,
+ icon,
+ titlestr,
+ 0,
+ 0,
+ 200,
+ UI_UNIT_Y,
+ nullptr,
+ 0.0,
+ 0.0,
+ 0,
+ 0,
+ "");
+ }
+ else {
+ uiBut *but = uiDefBut(
+ block, UI_BTYPE_LABEL, 0, title, 0, 0, 200, UI_UNIT_Y, nullptr, 0.0, 0.0, 0, 0, "");
+ but->drawflag = UI_BUT_TEXT_LEFT;
+ }
+
+ uiItemS(layout);
+}
+
+/* Used to directly create a popup menu that is not refreshed on redraw. */
uiPopupMenu *UI_popup_menu_begin_ex(bContext *C,
const char *title,
const char *block_name,
int icon)
{
- const uiStyle *style = UI_style_get_dpi();
- uiPopupMenu *pup = MEM_cnew<uiPopupMenu>(__func__);
+ uiPopupMenu *pup = MEM_new<uiPopupMenu>(__func__);
- pup->block = UI_block_begin(C, nullptr, block_name, UI_EMBOSS_PULLDOWN);
- pup->block->flag |= UI_BLOCK_POPUP_MEMORY | UI_BLOCK_IS_FLIP;
- pup->block->puphash = ui_popup_menu_hash(title);
- pup->layout = UI_block_layout(
- pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, UI_MENU_PADDING, style);
+ pup->title = title;
- /* NOTE: this intentionally differs from the menu & sub-menu default because many operators
- * use popups like this to select one of their options -
- * where having invoke doesn't make sense */
- uiLayoutSetOperatorContext(pup->layout, WM_OP_EXEC_REGION_WIN);
+ ui_popup_menu_create_block(C, pup, title, block_name);
+ /* Further buttons will be laid out top to bottom by default. */
+ pup->block->flag |= UI_BLOCK_IS_FLIP;
/* create in advance so we can let buttons point to retval already */
pup->block->handle = MEM_cnew<uiPopupBlockHandle>(__func__);
- /* create title button */
if (title[0]) {
- char titlestr[256];
-
- if (icon) {
- BLI_snprintf(titlestr, sizeof(titlestr), " %s", title);
- uiDefIconTextBut(pup->block,
- UI_BTYPE_LABEL,
- 0,
- icon,
- titlestr,
- 0,
- 0,
- 200,
- UI_UNIT_Y,
- nullptr,
- 0.0,
- 0.0,
- 0,
- 0,
- "");
- }
- else {
- uiBut *but = uiDefBut(
- pup->block, UI_BTYPE_LABEL, 0, title, 0, 0, 200, UI_UNIT_Y, nullptr, 0.0, 0.0, 0, 0, "");
- but->drawflag = UI_BUT_TEXT_LEFT;
- }
-
- uiItemS(pup->layout);
+ create_title_button(pup->layout, title, icon);
}
return pup;
@@ -465,7 +532,7 @@ void UI_popup_menu_end(bContext *C, uiPopupMenu *pup)
UI_popup_handlers_add(C, &window->modalhandlers, menu, 0);
WM_event_add_mousemove(window);
- MEM_freeN(pup);
+ MEM_delete(pup);
}
bool UI_popup_menu_end_or_cancel(bContext *C, uiPopupMenu *pup)
@@ -477,7 +544,7 @@ bool UI_popup_menu_end_or_cancel(bContext *C, uiPopupMenu *pup)
UI_block_layout_resolve(pup->block, nullptr, nullptr);
MEM_freeN(pup->block->handle);
UI_block_free(C, pup->block);
- MEM_freeN(pup);
+ MEM_delete(pup);
return false;
}
@@ -541,6 +608,22 @@ void UI_popup_menu_reports(bContext *C, ReportList *reports)
}
}
+static void ui_popup_menu_create_from_menutype(bContext *C,
+ MenuType *mt,
+ const char *title,
+ const int icon)
+{
+ uiPopupBlockHandle *handle = ui_popup_menu_create(
+ C, nullptr, nullptr, title, [mt, title, icon](bContext *C, uiLayout *layout) -> void {
+ if (title && title[0]) {
+ create_title_button(layout, title, icon);
+ }
+ ui_item_menutype_func(C, layout, mt);
+ });
+
+ handle->can_refresh = true;
+}
+
int UI_popup_menu_invoke(bContext *C, const char *idname, ReportList *reports)
{
MenuType *mt = WM_menutype_find(idname, true);
@@ -554,14 +637,21 @@ int UI_popup_menu_invoke(bContext *C, const char *idname, ReportList *reports)
/* cancel but allow event to pass through, just like operators do */
return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH);
}
+ /* For now always recreate menus on redraw that were invoked with this function. Maybe we want to
+ * make that optional somehow. */
+ const bool allow_refresh = true;
- uiPopupMenu *pup = UI_popup_menu_begin(
- C, CTX_IFACE_(mt->translation_context, mt->label), ICON_NONE);
- uiLayout *layout = UI_popup_menu_layout(pup);
-
- UI_menutype_draw(C, mt, layout);
-
- UI_popup_menu_end(C, pup);
+ const char *title = CTX_IFACE_(mt->translation_context, mt->label);
+ if (allow_refresh) {
+ ui_popup_menu_create_from_menutype(C, mt, title, ICON_NONE);
+ }
+ else {
+ /* If no refresh is needed, create the block directly. */
+ uiPopupMenu *pup = UI_popup_menu_begin(C, title, ICON_NONE);
+ uiLayout *layout = UI_popup_menu_layout(pup);
+ UI_menutype_draw(C, mt, layout);
+ UI_popup_menu_end(C, pup);
+ }
return OPERATOR_INTERFACE;
}
diff --git a/source/blender/editors/interface/views/interface_view.cc b/source/blender/editors/interface/views/interface_view.cc
index c568a8cab74..71974b4d2f9 100644
--- a/source/blender/editors/interface/views/interface_view.cc
+++ b/source/blender/editors/interface/views/interface_view.cc
@@ -81,7 +81,7 @@ void ui_block_free_views(uiBlock *block)
}
}
-void UI_block_views_listen(const uiBlock *block, const wmRegionListenerParams *listener_params)
+void ui_block_views_listen(const uiBlock *block, const wmRegionListenerParams *listener_params)
{
ARegion *region = listener_params->region;
diff --git a/source/blender/editors/mesh/editface.cc b/source/blender/editors/mesh/editface.cc
index 888a8340d51..1c6d1747516 100644
--- a/source/blender/editors/mesh/editface.cc
+++ b/source/blender/editors/mesh/editface.cc
@@ -383,7 +383,7 @@ bool paintface_minmax(Object *ob, float r_min[3], float r_max[3])
return ok;
}
- copy_m3_m4(bmat, ob->obmat);
+ copy_m3_m4(bmat, ob->object_to_world);
const Span<MVert> verts = me->verts();
const Span<MPoly> polys = me->polys();
@@ -403,7 +403,7 @@ bool paintface_minmax(Object *ob, float r_min[3], float r_max[3])
const MLoop *ml = &loops[poly.loopstart];
for (int b = 0; b < poly.totloop; b++, ml++) {
mul_v3_m3v3(vec, bmat, verts[ml->v].co);
- add_v3_v3v3(vec, vec, ob->obmat[3]);
+ add_v3_v3v3(vec, vec, ob->object_to_world[3]);
minmax_v3v3_v3(r_min, r_max, vec);
}
diff --git a/source/blender/editors/mesh/editmesh_add_gizmo.c b/source/blender/editors/mesh/editmesh_add_gizmo.c
index f5090c0143d..03c6104bb0d 100644
--- a/source/blender/editors/mesh/editmesh_add_gizmo.c
+++ b/source/blender/editors/mesh/editmesh_add_gizmo.c
@@ -316,8 +316,8 @@ static int add_primitive_cube_gizmo_exec(bContext *C, wmOperator *op)
PropertyRNA *prop_matrix = RNA_struct_find_property(op->ptr, "matrix");
if (RNA_property_is_set(op->ptr, prop_matrix)) {
RNA_property_float_get_array(op->ptr, prop_matrix, &matrix[0][0]);
- invert_m4_m4(obedit->imat, obedit->obmat);
- mul_m4_m4m4(matrix, obedit->imat, matrix);
+ invert_m4_m4(obedit->world_to_object, obedit->object_to_world);
+ mul_m4_m4m4(matrix, obedit->world_to_object, matrix);
}
else {
/* For the first update the widget may not set the matrix. */
diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c
index 3284cd70646..92e993f74a2 100644
--- a/source/blender/editors/mesh/editmesh_bevel.c
+++ b/source/blender/editors/mesh/editmesh_bevel.c
@@ -170,7 +170,7 @@ static void edbm_bevel_update_status_text(bContext *C, wmOperator *op)
sizeof(status_text),
TIP_("%s: Confirm, "
"%s: Cancel, "
- "%s: Mode (%s), "
+ "%s: Width Type (%s), "
"%s: Width (%s), "
"%s: Segments (%d), "
"%s: Profile (%.3f), "
@@ -244,7 +244,7 @@ static bool edbm_bevel_init(bContext *C, wmOperator *op, const bool is_modal)
opdata->ob_store = MEM_malloc_arrayN(ob_store_len, sizeof(*opdata->ob_store), __func__);
for (uint ob_index = 0; ob_index < ob_store_len; ob_index++) {
Object *obedit = objects[ob_index];
- float scale = mat4_to_scale(obedit->obmat);
+ float scale = mat4_to_scale(obedit->object_to_world);
opdata->max_obj_scale = max_ff(opdata->max_obj_scale, scale);
BMEditMesh *em = BKE_editmesh_from_object(obedit);
if (em->bm->totvertsel > 0) {
diff --git a/source/blender/editors/mesh/editmesh_bisect.c b/source/blender/editors/mesh/editmesh_bisect.c
index 5c5a12b3e64..aab33678bec 100644
--- a/source/blender/editors/mesh/editmesh_bisect.c
+++ b/source/blender/editors/mesh/editmesh_bisect.c
@@ -314,9 +314,9 @@ static int mesh_bisect_exec(bContext *C, wmOperator *op)
copy_v3_v3(plane_co_local, plane_co);
copy_v3_v3(plane_no_local, plane_no);
- invert_m4_m4(imat, obedit->obmat);
+ invert_m4_m4(imat, obedit->object_to_world);
mul_m4_v3(imat, plane_co_local);
- mul_transposed_mat3_m4_v3(obedit->obmat, plane_no_local);
+ mul_transposed_mat3_m4_v3(obedit->object_to_world, plane_no_local);
BMOperator bmop;
EDBM_op_init(
diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c
index 55e9c32e41b..88bcefc5cc8 100644
--- a/source/blender/editors/mesh/editmesh_extrude.c
+++ b/source/blender/editors/mesh/editmesh_extrude.c
@@ -55,8 +55,8 @@ static void edbm_extrude_edge_exclude_mirror(
float mtx[4][4];
if (mmd->mirror_ob) {
float imtx[4][4];
- invert_m4_m4(imtx, mmd->mirror_ob->obmat);
- mul_m4_m4m4(mtx, imtx, obedit->obmat);
+ invert_m4_m4(imtx, mmd->mirror_ob->object_to_world);
+ mul_m4_m4m4(mtx, imtx, obedit->object_to_world);
}
BM_ITER_MESH (edge, &iter, bm, BM_EDGES_OF_MESH) {
@@ -293,7 +293,7 @@ static int edbm_extrude_repeat_exec(bContext *C, wmOperator *op)
Object *obedit = objects[ob_index];
BMEditMesh *em = BKE_editmesh_from_object(obedit);
- copy_m3_m4(tmat, obedit->obmat);
+ copy_m3_m4(tmat, obedit->object_to_world);
invert_m3(tmat);
mul_v3_m3v3(offset_local, tmat, offset);
@@ -736,7 +736,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, const w
}
mul_v3_fl(local_center, 1.0f / (float)local_verts_len);
- mul_m4_v3(vc.obedit->obmat, local_center);
+ mul_m4_v3(vc.obedit->object_to_world, local_center);
mul_v3_fl(local_center, (float)local_verts_len);
add_v3_v3(center, local_center);
@@ -761,11 +761,11 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, const w
continue;
}
- invert_m4_m4(vc.obedit->imat, vc.obedit->obmat);
+ invert_m4_m4(vc.obedit->world_to_object, vc.obedit->object_to_world);
ED_view3d_init_mats_rv3d(vc.obedit, vc.rv3d);
float local_center[3];
- mul_v3_m4v3(local_center, vc.obedit->imat, center);
+ mul_v3_m4v3(local_center, vc.obedit->world_to_object, center);
/* call extrude? */
if (verts_len != 0) {
@@ -810,11 +810,11 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, const w
float view_vec[3], cross[3];
/* convert the 2D normal into 3D */
- mul_mat3_m4_v3(vc.rv3d->viewinv, nor); /* World-space. */
- mul_mat3_m4_v3(vc.obedit->imat, nor); /* Local-space. */
+ mul_mat3_m4_v3(vc.rv3d->viewinv, nor); /* World-space. */
+ mul_mat3_m4_v3(vc.obedit->world_to_object, nor); /* Local-space. */
/* correct the normal to be aligned on the view plane */
- mul_v3_mat3_m4v3(view_vec, vc.obedit->imat, vc.rv3d->viewinv[2]);
+ mul_v3_mat3_m4v3(view_vec, vc.obedit->world_to_object, vc.rv3d->viewinv[2]);
cross_v3_v3v3(cross, nor, view_vec);
cross_v3_v3v3(nor, view_vec, cross);
normalize_v3(nor);
@@ -823,9 +823,9 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, const w
/* center */
copy_v3_v3(ofs, local_center);
- mul_m4_v3(vc.obedit->obmat, ofs); /* view space */
+ mul_m4_v3(vc.obedit->object_to_world, ofs); /* view space */
ED_view3d_win_to_3d_int(vc.v3d, vc.region, ofs, event->mval, ofs);
- mul_m4_v3(vc.obedit->imat, ofs); /* back in object space */
+ mul_m4_v3(vc.obedit->world_to_object, ofs); /* back in object space */
sub_v3_v3(ofs, local_center);
@@ -876,7 +876,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, const w
copy_v3_v3(local_center, cursor);
ED_view3d_win_to_3d_int(vc.v3d, vc.region, local_center, event->mval, local_center);
- mul_m4_v3(vc.obedit->imat, local_center); /* back in object space */
+ mul_m4_v3(vc.obedit->world_to_object, local_center); /* back in object space */
EDBM_op_init(vc.em, &bmop, op, "create_vert co=%v", local_center);
BMO_op_exec(vc.em->bm, &bmop);
diff --git a/source/blender/editors/mesh/editmesh_extrude_screw.c b/source/blender/editors/mesh/editmesh_extrude_screw.c
index be2d04b14a1..9d0bcfe4e90 100644
--- a/source/blender/editors/mesh/editmesh_extrude_screw.c
+++ b/source/blender/editors/mesh/editmesh_extrude_screw.c
@@ -102,11 +102,11 @@ static int edbm_screw_exec(bContext *C, wmOperator *op)
continue;
}
- copy_v3_v3(nor, obedit->obmat[2]);
+ copy_v3_v3(nor, obedit->object_to_world[2]);
/* calculate dvec */
- mul_v3_m4v3(v1_co_global, obedit->obmat, v1->co);
- mul_v3_m4v3(v2_co_global, obedit->obmat, v2->co);
+ mul_v3_m4v3(v1_co_global, obedit->object_to_world, v1->co);
+ mul_v3_m4v3(v2_co_global, obedit->object_to_world, v2->co);
sub_v3_v3v3(dvec, v1_co_global, v2_co_global);
mul_v3_fl(dvec, 1.0f / steps);
@@ -126,7 +126,7 @@ static int edbm_screw_exec(bContext *C, wmOperator *op)
dvec,
turns * steps,
DEG2RADF(360.0f * turns),
- obedit->obmat,
+ obedit->object_to_world,
false)) {
continue;
}
diff --git a/source/blender/editors/mesh/editmesh_extrude_spin.c b/source/blender/editors/mesh/editmesh_extrude_spin.c
index 1b9c98db5eb..756d7f73d10 100644
--- a/source/blender/editors/mesh/editmesh_extrude_spin.c
+++ b/source/blender/editors/mesh/editmesh_extrude_spin.c
@@ -77,7 +77,7 @@ static int edbm_spin_exec(bContext *C, wmOperator *op)
d,
steps,
-angle,
- obedit->obmat,
+ obedit->object_to_world,
use_normal_flip,
dupli,
use_auto_merge)) {
diff --git a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
index 687f06c8dcf..19e23f4f212 100644
--- a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
+++ b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
@@ -362,7 +362,7 @@ static void gizmo_mesh_spin_init_refresh(const bContext *C, wmGizmoGroup *gzgrou
}
if (totsel) {
mul_v3_fl(select_center, 1.0f / totsel);
- mul_m4_v3(obedit->obmat, select_center);
+ mul_m4_v3(obedit->object_to_world, select_center);
copy_v3_v3(ggd->data.select_center, select_center);
ggd->data.use_select_center = true;
}
diff --git a/source/blender/editors/mesh/editmesh_inset.c b/source/blender/editors/mesh/editmesh_inset.c
index 068e6215c26..fa4ae7f984c 100644
--- a/source/blender/editors/mesh/editmesh_inset.c
+++ b/source/blender/editors/mesh/editmesh_inset.c
@@ -136,7 +136,7 @@ static bool edbm_inset_init(bContext *C, wmOperator *op, const bool is_modal)
opdata->ob_store = MEM_malloc_arrayN(ob_store_len, sizeof(*opdata->ob_store), __func__);
for (uint ob_index = 0; ob_index < ob_store_len; ob_index++) {
Object *obedit = objects[ob_index];
- float scale = mat4_to_scale(obedit->obmat);
+ float scale = mat4_to_scale(obedit->object_to_world);
opdata->max_obj_scale = max_ff(opdata->max_obj_scale, scale);
BMEditMesh *em = BKE_editmesh_from_object(obedit);
if (em->bm->totvertsel > 0) {
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index a147594b25b..369162e80a3 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -586,9 +586,9 @@ static void knifetool_draw_angle(const KnifeTool_OpData *kcd,
float axis[3];
float arc_angle;
- const float inverse_average_scale = 1 /
- (kcd->curr.ob->obmat[0][0] + kcd->curr.ob->obmat[1][1] +
- kcd->curr.ob->obmat[2][2]);
+ const float inverse_average_scale = 1 / (kcd->curr.ob->object_to_world[0][0] +
+ kcd->curr.ob->object_to_world[1][1] +
+ kcd->curr.ob->object_to_world[2][2]);
const float px_scale =
3.0f * inverse_average_scale *
@@ -1194,7 +1194,7 @@ static void knife_bm_tri_cagecos_get_worldspace(const KnifeTool_OpData *kcd,
knife_bm_tri_cagecos_get(kcd, ob_index, tri_index, cos);
const Object *ob = kcd->objects[ob_index];
for (int i = 0; i < 3; i++) {
- mul_m4_v3(ob->obmat, cos[i]);
+ mul_m4_v3(ob->object_to_world, cos[i]);
}
}
@@ -1744,7 +1744,7 @@ static KnifeVert *get_bm_knife_vert(KnifeTool_OpData *kcd, BMVert *v, Object *ob
}
float cageco_ws[3];
- mul_v3_m4v3(cageco_ws, ob->obmat, cageco);
+ mul_v3_m4v3(cageco_ws, ob->object_to_world, cageco);
kfv = new_knife_vert(kcd, v->co, cageco_ws);
kfv->v = v;
@@ -2657,14 +2657,14 @@ static void calc_ortho_extent(KnifeTool_OpData *kcd)
if (cagecos) {
for (int i = 0; i < em->bm->totvert; i++) {
copy_v3_v3(ws, cagecos[i]);
- mul_m4_v3(ob->obmat, ws);
+ mul_m4_v3(ob->object_to_world, ws);
minmax_v3v3_v3(min, max, ws);
}
}
else {
BM_ITER_MESH (v, &iter, em->bm, BM_VERTS_OF_MESH) {
copy_v3_v3(ws, v->co);
- mul_m4_v3(ob->obmat, ws);
+ mul_m4_v3(ob->object_to_world, ws);
minmax_v3v3_v3(min, max, ws);
}
}
@@ -5072,7 +5072,7 @@ void EDBM_mesh_knife(ViewContext *vc,
BM_ITER_ELEM (f, &fiter, e, BM_FACES_OF_EDGE) {
float cent[3], cent_ss[2];
BM_face_calc_point_in_face(f, cent);
- mul_m4_v3(ob->obmat, cent);
+ mul_m4_v3(ob->object_to_world, cent);
knife_project_v2(kcd, cent, cent_ss);
if (edbm_mesh_knife_point_isect(polys, cent_ss)) {
BM_elem_flag_enable(f, BM_ELEM_TAG);
@@ -5113,7 +5113,7 @@ void EDBM_mesh_knife(ViewContext *vc,
if (found) {
float cent[3], cent_ss[2];
BM_face_calc_point_in_face(f, cent);
- mul_m4_v3(ob->obmat, cent);
+ mul_m4_v3(ob->object_to_world, cent);
knife_project_v2(kcd, cent, cent_ss);
if ((kcd->cut_through || point_is_visible(kcd, cent, cent_ss, (BMElem *)f)) &&
edbm_mesh_knife_point_isect(polys, cent_ss)) {
diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c
index 494e0ff4a27..9a91d7836fe 100644
--- a/source/blender/editors/mesh/editmesh_loopcut.c
+++ b/source/blender/editors/mesh/editmesh_loopcut.c
@@ -88,7 +88,7 @@ typedef struct RingSelOpData {
static void ringsel_draw(const bContext *UNUSED(C), ARegion *UNUSED(region), void *arg)
{
RingSelOpData *lcd = arg;
- EDBM_preselect_edgering_draw(lcd->presel_edgering, lcd->ob->obmat);
+ EDBM_preselect_edgering_draw(lcd->presel_edgering, lcd->ob->object_to_world);
}
static void edgering_select(RingSelOpData *lcd)
diff --git a/source/blender/editors/mesh/editmesh_polybuild.c b/source/blender/editors/mesh/editmesh_polybuild.c
index bf9664fa10d..cfd07a6ff35 100644
--- a/source/blender/editors/mesh/editmesh_polybuild.c
+++ b/source/blender/editors/mesh/editmesh_polybuild.c
@@ -124,7 +124,7 @@ static int edbm_polybuild_transform_at_cursor_invoke(bContext *C,
BMEditMesh *em = vc.em;
BMesh *bm = em->bm;
- invert_m4_m4(vc.obedit->imat, vc.obedit->obmat);
+ invert_m4_m4(vc.obedit->world_to_object, vc.obedit->object_to_world);
ED_view3d_init_mats_rv3d(vc.obedit, vc.rv3d);
if (!ele_act) {
@@ -192,7 +192,7 @@ static int edbm_polybuild_delete_at_cursor_invoke(bContext *C,
BMEditMesh *em = vc.em;
BMesh *bm = em->bm;
- invert_m4_m4(vc.obedit->imat, vc.obedit->obmat);
+ invert_m4_m4(vc.obedit->world_to_object, vc.obedit->object_to_world);
ED_view3d_init_mats_rv3d(vc.obedit, vc.rv3d);
if (!ele_act) {
@@ -286,7 +286,7 @@ static int edbm_polybuild_face_at_cursor_invoke(bContext *C, wmOperator *op, con
BMEditMesh *em = vc.em;
BMesh *bm = em->bm;
- invert_m4_m4(vc.obedit->imat, vc.obedit->obmat);
+ invert_m4_m4(vc.obedit->world_to_object, vc.obedit->object_to_world);
ED_view3d_init_mats_rv3d(vc.obedit, vc.rv3d);
edbm_selectmode_ensure(vc.scene, vc.em, SCE_SELECT_VERTEX);
@@ -294,9 +294,9 @@ static int edbm_polybuild_face_at_cursor_invoke(bContext *C, wmOperator *op, con
if (ele_act == NULL || ele_act->head.htype == BM_FACE) {
/* Just add vert */
copy_v3_v3(center, vc.scene->cursor.location);
- mul_v3_m4v3(center, vc.obedit->obmat, center);
+ mul_v3_m4v3(center, vc.obedit->object_to_world, center);
ED_view3d_win_to_3d_int(vc.v3d, vc.region, center, event->mval, center);
- mul_m4_v3(vc.obedit->imat, center);
+ mul_m4_v3(vc.obedit->world_to_object, center);
BMVert *v_new = BM_vert_create(bm, center, NULL, BM_CREATE_NOP);
edbm_flag_disable_all_multi(vc.scene, vc.view_layer, vc.v3d, BM_ELEM_SELECT);
@@ -309,9 +309,9 @@ static int edbm_polybuild_face_at_cursor_invoke(bContext *C, wmOperator *op, con
BMFace *f_reference = e_act->l ? e_act->l->f : NULL;
mid_v3_v3v3(center, e_act->v1->co, e_act->v2->co);
- mul_m4_v3(vc.obedit->obmat, center);
+ mul_m4_v3(vc.obedit->object_to_world, center);
ED_view3d_win_to_3d_int(vc.v3d, vc.region, center, event->mval, center);
- mul_m4_v3(vc.obedit->imat, center);
+ mul_m4_v3(vc.obedit->world_to_object, center);
if (f_reference->len == 3 && RNA_boolean_get(op->ptr, "create_quads")) {
const float fac = line_point_factor_v3(center, e_act->v1->co, e_act->v2->co);
BMVert *v_new = BM_edge_split(bm, e_act, e_act->v1, NULL, CLAMPIS(fac, 0.0f, 1.0f));
@@ -364,9 +364,9 @@ static int edbm_polybuild_face_at_cursor_invoke(bContext *C, wmOperator *op, con
BMFace *f_reference = e_pair[0]->l ? e_pair[0]->l->f : NULL;
- mul_v3_m4v3(center, vc.obedit->obmat, v_act->co);
+ mul_v3_m4v3(center, vc.obedit->object_to_world, v_act->co);
ED_view3d_win_to_3d_int(vc.v3d, vc.region, center, event->mval, center);
- mul_m4_v3(vc.obedit->imat, center);
+ mul_m4_v3(vc.obedit->world_to_object, center);
BMVert *v_quad[4];
v_quad[0] = v_act;
@@ -386,9 +386,9 @@ static int edbm_polybuild_face_at_cursor_invoke(bContext *C, wmOperator *op, con
}
else {
/* Just add edge */
- mul_m4_v3(vc.obedit->obmat, center);
+ mul_m4_v3(vc.obedit->object_to_world, center);
ED_view3d_win_to_3d_int(vc.v3d, vc.region, v_act->co, event->mval, center);
- mul_m4_v3(vc.obedit->imat, center);
+ mul_m4_v3(vc.obedit->world_to_object, center);
BMVert *v_new = BM_vert_create(bm, center, NULL, BM_CREATE_NOP);
@@ -464,7 +464,7 @@ static int edbm_polybuild_split_at_cursor_invoke(bContext *C,
BMEditMesh *em = vc.em;
BMesh *bm = em->bm;
- invert_m4_m4(vc.obedit->imat, vc.obedit->obmat);
+ invert_m4_m4(vc.obedit->world_to_object, vc.obedit->object_to_world);
ED_view3d_init_mats_rv3d(vc.obedit, vc.rv3d);
edbm_selectmode_ensure(vc.scene, vc.em, SCE_SELECT_VERTEX);
@@ -475,9 +475,9 @@ static int edbm_polybuild_split_at_cursor_invoke(bContext *C,
if (ele_act->head.htype == BM_EDGE) {
BMEdge *e_act = (BMEdge *)ele_act;
mid_v3_v3v3(center, e_act->v1->co, e_act->v2->co);
- mul_m4_v3(vc.obedit->obmat, center);
+ mul_m4_v3(vc.obedit->object_to_world, center);
ED_view3d_win_to_3d_int(vc.v3d, vc.region, center, event->mval, center);
- mul_m4_v3(vc.obedit->imat, center);
+ mul_m4_v3(vc.obedit->world_to_object, center);
const float fac = line_point_factor_v3(center, e_act->v1->co, e_act->v2->co);
BMVert *v_new = BM_edge_split(bm, e_act, e_act->v1, NULL, CLAMPIS(fac, 0.0f, 1.0f));
diff --git a/source/blender/editors/mesh/editmesh_preselect_elem.c b/source/blender/editors/mesh/editmesh_preselect_elem.c
index cf73e579700..5d8ce7cae44 100644
--- a/source/blender/editors/mesh/editmesh_preselect_elem.c
+++ b/source/blender/editors/mesh/editmesh_preselect_elem.c
@@ -243,9 +243,9 @@ static void view3d_preselect_update_preview_triangle_from_vert(struct EditMesh_P
}
if (e_pair[1] != NULL) {
- mul_v3_m4v3(center, vc->obedit->obmat, v_act->co);
+ mul_v3_m4v3(center, vc->obedit->object_to_world, v_act->co);
ED_view3d_win_to_3d_int(vc->v3d, vc->region, center, mval, center);
- mul_m4_v3(vc->obedit->imat, center);
+ mul_m4_v3(vc->obedit->world_to_object, center);
psel->preview_tris = MEM_mallocN(sizeof(*psel->preview_tris) * 2, __func__);
psel->preview_lines = MEM_mallocN(sizeof(*psel->preview_lines) * 4, __func__);
@@ -311,9 +311,9 @@ static void view3d_preselect_update_preview_triangle_from_edge(struct EditMesh_P
psel->preview_tris = MEM_mallocN(sizeof(*psel->preview_tris), __func__);
psel->preview_lines = MEM_mallocN(sizeof(*psel->preview_lines) * 3, __func__);
mid_v3_v3v3(center, eed->v1->co, eed->v2->co);
- mul_m4_v3(vc->obedit->obmat, center);
+ mul_m4_v3(vc->obedit->object_to_world, center);
ED_view3d_win_to_3d_int(vc->v3d, vc->region, center, mval, center);
- mul_m4_v3(vc->obedit->imat, center);
+ mul_m4_v3(vc->obedit->world_to_object, center);
copy_v3_v3(psel->preview_tris[0][0], eed->v1->co);
copy_v3_v3(psel->preview_tris[0][1], eed->v2->co);
diff --git a/source/blender/editors/mesh/editmesh_select.cc b/source/blender/editors/mesh/editmesh_select.cc
index 76d0bab8a52..2ef2772d404 100644
--- a/source/blender/editors/mesh/editmesh_select.cc
+++ b/source/blender/editors/mesh/editmesh_select.cc
@@ -1060,7 +1060,7 @@ bool EDBM_unified_findnearest_from_raycast(ViewContext *vc,
float imat3[3][3];
ED_view3d_viewcontext_init_object(vc, obedit);
- copy_m3_m4(imat3, obedit->obmat);
+ copy_m3_m4(imat3, obedit->object_to_world);
invert_m3(imat3);
const float(*coords)[3] = nullptr;
@@ -1085,7 +1085,8 @@ bool EDBM_unified_findnearest_from_raycast(ViewContext *vc,
for (uint j = 0; j < 2; j++) {
BMVert *v = *((&e->v1) + j);
float point[3];
- mul_v3_m4v3(point, obedit->obmat, coords ? coords[BM_elem_index_get(v)] : v->co);
+ mul_v3_m4v3(
+ point, obedit->object_to_world, coords ? coords[BM_elem_index_get(v)] : v->co);
const float dist_sq_test = dist_squared_to_ray_v3_normalized(
ray_origin, ray_direction, point);
if (dist_sq_test < dist_sq_best_vert) {
@@ -1114,7 +1115,7 @@ bool EDBM_unified_findnearest_from_raycast(ViewContext *vc,
else {
mid_v3_v3v3(point, e->v1->co, e->v2->co);
}
- mul_m4_v3(obedit->obmat, point);
+ mul_m4_v3(obedit->object_to_world, point);
const float dist_sq_test = dist_squared_to_ray_v3_normalized(
ray_origin, ray_direction, point);
if (dist_sq_test < dist_sq_best_edge) {
@@ -1139,7 +1140,8 @@ bool EDBM_unified_findnearest_from_raycast(ViewContext *vc,
BM_ITER_MESH (v, &viter, bm, BM_VERTS_OF_MESH) {
if (BM_elem_flag_test(v, BM_ELEM_HIDDEN) == false) {
float point[3];
- mul_v3_m4v3(point, obedit->obmat, coords ? coords[BM_elem_index_get(v)] : v->co);
+ mul_v3_m4v3(
+ point, obedit->object_to_world, coords ? coords[BM_elem_index_get(v)] : v->co);
const float dist_sq_test = dist_squared_to_ray_v3_normalized(
ray_origin, ray_direction, point);
if (dist_sq_test < dist_sq_best_vert) {
@@ -1169,7 +1171,7 @@ bool EDBM_unified_findnearest_from_raycast(ViewContext *vc,
else {
mid_v3_v3v3(point, e->v1->co, e->v2->co);
}
- mul_m4_v3(obedit->obmat, point);
+ mul_m4_v3(obedit->object_to_world, point);
const float dist_sq_test = dist_squared_to_ray_v3_normalized(
ray_origin, ray_direction, point);
if (dist_sq_test < dist_sq_best_edge) {
@@ -1198,7 +1200,7 @@ bool EDBM_unified_findnearest_from_raycast(ViewContext *vc,
else {
BM_face_calc_center_median(f, point);
}
- mul_m4_v3(obedit->obmat, point);
+ mul_m4_v3(obedit->object_to_world, point);
const float dist_sq_test = dist_squared_to_ray_v3_normalized(
ray_origin, ray_direction, point);
if (dist_sq_test < dist_sq_best_face) {
@@ -4947,7 +4949,7 @@ static int edbm_select_axis_exec(bContext *C, wmOperator *op)
{
float vertex_world[3];
- mul_v3_m4v3(vertex_world, obedit->obmat, v_act->co);
+ mul_v3_m4v3(vertex_world, obedit->object_to_world, v_act->co);
value = dot_v3v3(axis_vector, vertex_world);
}
@@ -4977,7 +4979,7 @@ static int edbm_select_axis_exec(bContext *C, wmOperator *op)
BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
if (!BM_elem_flag_test(v, BM_ELEM_HIDDEN | BM_ELEM_SELECT)) {
float v_iter_world[3];
- mul_v3_m4v3(v_iter_world, obedit_iter->obmat, v->co);
+ mul_v3_m4v3(v_iter_world, obedit_iter->object_to_world, v->co);
const float value_iter = dot_v3v3(axis_vector, v_iter_world);
switch (sign) {
case SELECT_AXIS_ALIGN:
diff --git a/source/blender/editors/mesh/editmesh_select_similar.c b/source/blender/editors/mesh/editmesh_select_similar.c
index 47c76b7709b..d9721db326a 100644
--- a/source/blender/editors/mesh/editmesh_select_similar.c
+++ b/source/blender/editors/mesh/editmesh_select_similar.c
@@ -135,9 +135,9 @@ static void face_to_plane(const Object *ob, BMFace *face, float r_plane[4])
{
float normal[3], co[3];
copy_v3_v3(normal, face->no);
- mul_transposed_mat3_m4_v3(ob->imat, normal);
+ mul_transposed_mat3_m4_v3(ob->world_to_object, normal);
normalize_v3(normal);
- mul_v3_m4v3(co, ob->obmat, BM_FACE_FIRST_LOOP(face)->v->co);
+ mul_v3_m4v3(co, ob->object_to_world, BM_FACE_FIRST_LOOP(face)->v->co);
plane_from_point_normal_v3(r_plane, co, normal);
}
@@ -206,7 +206,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op)
BMEditMesh *em = BKE_editmesh_from_object(ob);
BMesh *bm = em->bm;
Material ***material_array = NULL;
- invert_m4_m4(ob->imat, ob->obmat);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
int custom_data_offset = 0;
if (bm->totfacesel == 0) {
@@ -214,7 +214,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op)
}
float ob_m3[3][3];
- copy_m3_m4(ob_m3, ob->obmat);
+ copy_m3_m4(ob_m3, ob->object_to_world);
switch (type) {
case SIMFACE_MATERIAL: {
@@ -269,7 +269,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op)
case SIMFACE_NORMAL: {
float normal[3];
copy_v3_v3(normal, face->no);
- mul_transposed_mat3_m4_v3(ob->imat, normal);
+ mul_transposed_mat3_m4_v3(ob->world_to_object, normal);
normalize_v3(normal);
BLI_kdtree_3d_insert(tree_3d, tree_index++, normal);
break;
@@ -335,7 +335,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op)
int custom_data_offset;
float ob_m3[3][3];
- copy_m3_m4(ob_m3, ob->obmat);
+ copy_m3_m4(ob_m3, ob->object_to_world);
bool has_custom_data_layer = false;
switch (type) {
@@ -414,7 +414,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op)
case SIMFACE_NORMAL: {
float normal[3];
copy_v3_v3(normal, face->no);
- mul_transposed_mat3_m4_v3(ob->imat, normal);
+ mul_transposed_mat3_m4_v3(ob->world_to_object, normal);
normalize_v3(normal);
/* We are treating the normals as coordinates, the "nearest" one will
@@ -559,8 +559,8 @@ static void edge_pos_direction_worldspace_get(Object *ob, BMEdge *edge, float *r
copy_v3_v3(v1, edge->v1->co);
copy_v3_v3(v2, edge->v2->co);
- mul_m4_v3(ob->obmat, v1);
- mul_m4_v3(ob->obmat, v2);
+ mul_m4_v3(ob->object_to_world, v1);
+ mul_m4_v3(ob->object_to_world, v2);
sub_v3_v3v3(r_dir, v1, v2);
normalize_v3(r_dir);
@@ -586,8 +586,8 @@ static float edge_length_squared_worldspace_get(Object *ob, BMEdge *edge)
{
float v1[3], v2[3];
- mul_v3_mat3_m4v3(v1, ob->obmat, edge->v1->co);
- mul_v3_mat3_m4v3(v2, ob->obmat, edge->v2->co);
+ mul_v3_mat3_m4v3(v1, ob->object_to_world, edge->v1->co);
+ mul_v3_mat3_m4v3(v2, ob->object_to_world, edge->v2->co);
return len_squared_v3v3(v1, v2);
}
@@ -705,7 +705,7 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op)
}
float ob_m3[3][3], ob_m3_inv[3][3];
- copy_m3_m4(ob_m3, ob->obmat);
+ copy_m3_m4(ob_m3, ob->object_to_world);
invert_m3_m3(ob_m3_inv, ob_m3);
BMEdge *edge; /* Mesh edge. */
@@ -812,7 +812,7 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op)
}
float ob_m3[3][3], ob_m3_inv[3][3];
- copy_m3_m4(ob_m3, ob->obmat);
+ copy_m3_m4(ob_m3, ob->object_to_world);
invert_m3_m3(ob_m3_inv, ob_m3);
BMEdge *edge; /* Mesh edge. */
@@ -1028,7 +1028,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op)
BLI_bitmap *defbase_selected = NULL;
int defbase_len = 0;
- invert_m4_m4(ob->imat, ob->obmat);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
if (bm->totvertsel == 0) {
continue;
@@ -1067,7 +1067,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op)
case SIMVERT_NORMAL: {
float normal[3];
copy_v3_v3(normal, vert->no);
- mul_transposed_mat3_m4_v3(ob->imat, normal);
+ mul_transposed_mat3_m4_v3(ob->world_to_object, normal);
normalize_v3(normal);
BLI_kdtree_3d_insert(tree_3d, normal_tree_index++, normal);
@@ -1217,7 +1217,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op)
case SIMVERT_NORMAL: {
float normal[3];
copy_v3_v3(normal, vert->no);
- mul_transposed_mat3_m4_v3(ob->imat, normal);
+ mul_transposed_mat3_m4_v3(ob->world_to_object, normal);
normalize_v3(normal);
/* We are treating the normals as coordinates, the "nearest" one will
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 9f3ef8af17d..8b29472f687 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -3356,8 +3356,8 @@ static bool merge_target(BMEditMesh *em,
if (use_cursor) {
vco = scene->cursor.location;
copy_v3_v3(co, vco);
- invert_m4_m4(ob->imat, ob->obmat);
- mul_m4_v3(ob->imat, co);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
+ mul_m4_v3(ob->world_to_object, co);
}
else {
float fac;
@@ -6684,7 +6684,7 @@ static void sort_bmelem_flag(bContext *C,
int coidx = (action == SRT_VIEW_ZAXIS) ? 2 : 0;
/* Apply the view matrix to the object matrix. */
- mul_m4_m4m4(mat, rv3d->viewmat, ob->obmat);
+ mul_m4_m4m4(mat, rv3d->viewmat, ob->object_to_world);
if (totelem[0]) {
pb = pblock[0] = MEM_callocN(sizeof(char) * totelem[0], "sort_bmelem vert pblock");
@@ -6753,7 +6753,7 @@ static void sort_bmelem_flag(bContext *C,
copy_v3_v3(cur, scene->cursor.location);
- invert_m4_m4(mat, ob->obmat);
+ invert_m4_m4(mat, ob->object_to_world);
mul_m4_v3(mat, cur);
if (totelem[0]) {
diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c
index 4fc44f01ea0..f6ffbec094e 100644
--- a/source/blender/editors/mesh/editmesh_utils.c
+++ b/source/blender/editors/mesh/editmesh_utils.c
@@ -1858,7 +1858,7 @@ bool BMBVH_EdgeVisible(struct BMBVHTree *tree,
ED_view3d_win_to_segment_clipped(depsgraph, region, v3d, mval_f, origin, end, false);
- invert_m4_m4(invmat, obedit->obmat);
+ invert_m4_m4(invmat, obedit->object_to_world);
mul_m4_v3(invmat, origin);
copy_v3_v3(co1, e->v1->co);
@@ -1942,7 +1942,7 @@ void EDBM_project_snap_verts(
NULL,
co_proj,
NULL)) {
- mul_v3_m4v3(eve->co, obedit->imat, co_proj);
+ mul_v3_m4v3(eve->co, obedit->world_to_object, co_proj);
}
}
}
diff --git a/source/blender/editors/mesh/mesh_data.cc b/source/blender/editors/mesh/mesh_data.cc
index b468360ff9b..9901f4e1836 100644
--- a/source/blender/editors/mesh/mesh_data.cc
+++ b/source/blender/editors/mesh/mesh_data.cc
@@ -1191,7 +1191,7 @@ static void mesh_add_edges(Mesh *mesh, int len)
MutableSpan<MEdge> edges = mesh->edges_for_write();
for (MEdge &edge : edges.take_back(len)) {
- edge.flag = ME_EDGEDRAW | ME_EDGERENDER;
+ edge.flag = ME_EDGEDRAW;
}
bke::MutableAttributeAccessor attributes = mesh->attributes_for_write();
diff --git a/source/blender/editors/mesh/meshtools.cc b/source/blender/editors/mesh/meshtools.cc
index 4d75ab7f041..147c26e521f 100644
--- a/source/blender/editors/mesh/meshtools.cc
+++ b/source/blender/editors/mesh/meshtools.cc
@@ -132,7 +132,7 @@ static void join_mesh_single(Depsgraph *depsgraph,
float cmat[4][4];
/* Watch this: switch matrix multiplication order really goes wrong. */
- mul_m4_m4m4(cmat, imat, ob_src->obmat);
+ mul_m4_m4m4(cmat, imat, ob_src->object_to_world);
/* transform vertex coordinates into new space */
for (a = 0; a < me->totvert; a++, mvert++) {
@@ -386,7 +386,7 @@ int ED_mesh_join_objects_exec(bContext *C, wmOperator *op)
* NOTE: This doesn't apply recursive parenting. */
if (join_parent) {
ob->parent = nullptr;
- BKE_object_apply_mat4_ex(ob, ob->obmat, ob->parent, ob->parentinv, false);
+ BKE_object_apply_mat4_ex(ob, ob->object_to_world, ob->parent, ob->parentinv, false);
}
/* that way the active object is always selected */
@@ -594,7 +594,7 @@ int ED_mesh_join_objects_exec(bContext *C, wmOperator *op)
/* Inverse transform for all selected meshes in this object,
* See #object_join_exec for detailed comment on why the safe version is used. */
- invert_m4_m4_safe_ortho(imat, ob->obmat);
+ invert_m4_m4_safe_ortho(imat, ob->object_to_world);
/* Add back active mesh first.
* This allows to keep things similar as they were, as much as possible
diff --git a/source/blender/editors/object/object_add.cc b/source/blender/editors/object/object_add.cc
index f6eee7c0c9e..6075e4250eb 100644
--- a/source/blender/editors/object/object_add.cc
+++ b/source/blender/editors/object/object_add.cc
@@ -322,7 +322,7 @@ void ED_object_base_init_transform_on_add(Object *object, const float loc[3], co
copy_v3_v3(object->rot, rot);
}
- BKE_object_to_mat4(object, object->obmat);
+ BKE_object_to_mat4(object, object->object_to_world);
}
float ED_object_new_primitive_matrix(bContext *C,
@@ -342,14 +342,14 @@ float ED_object_new_primitive_matrix(bContext *C,
invert_m3(rmat);
/* inverse transform for initial rotation and object */
- copy_m3_m4(mat, obedit->obmat);
+ copy_m3_m4(mat, obedit->object_to_world);
mul_m3_m3m3(cmat, rmat, mat);
invert_m3_m3(imat, cmat);
copy_m4_m3(r_primmat, imat);
/* center */
copy_v3_v3(r_primmat[3], loc);
- sub_v3_v3v3(r_primmat[3], r_primmat[3], obedit->obmat[3]);
+ sub_v3_v3v3(r_primmat[3], r_primmat[3], obedit->object_to_world[3]);
invert_m3_m3(imat, mat);
mul_m3_v3(imat, r_primmat[3]);
@@ -2084,7 +2084,7 @@ static int object_curves_empty_hair_add_exec(bContext *C, wmOperator *op)
Object *curves_ob = ED_object_add_type(
C, OB_CURVES, nullptr, nullptr, nullptr, false, local_view_bits);
- BKE_object_apply_mat4(curves_ob, surface_ob->obmat, false, false);
+ BKE_object_apply_mat4(curves_ob, surface_ob->object_to_world, false, false);
/* Set surface object. */
Curves *curves_id = static_cast<Curves *>(curves_ob->data);
@@ -2561,8 +2561,8 @@ static void make_object_duplilist_real(bContext *C,
id_us_min((ID *)ob_dst->instance_collection);
ob_dst->instance_collection = nullptr;
- copy_m4_m4(ob_dst->obmat, dob->mat);
- BKE_object_apply_mat4(ob_dst, ob_dst->obmat, false, false);
+ copy_m4_m4(ob_dst->object_to_world, dob->mat);
+ BKE_object_apply_mat4(ob_dst, ob_dst->object_to_world, false, false);
BLI_ghash_insert(dupli_gh, dob, ob_dst);
if (parent_gh) {
@@ -3017,7 +3017,7 @@ static int object_convert_exec(bContext *C, wmOperator *op)
ushort local_view_bits = (v3d && v3d->localvd) ? v3d->local_view_uuid : 0;
float loc[3], size[3], rot[3][3], eul[3];
float matrix[4][4];
- mat4_to_loc_rot_size(loc, rot, size, ob->obmat);
+ mat4_to_loc_rot_size(loc, rot, size, ob->object_to_world);
mat3_to_eul(eul, rot);
Object *ob_gpencil = ED_gpencil_add_object(C, loc, local_view_bits);
@@ -3871,8 +3871,8 @@ static int object_add_named_exec(bContext *C, wmOperator *op)
PropertyRNA *prop_matrix = RNA_struct_find_property(op->ptr, "matrix");
if (RNA_property_is_set(op->ptr, prop_matrix)) {
Object *ob_add = basen->object;
- RNA_property_float_get_array(op->ptr, prop_matrix, &ob_add->obmat[0][0]);
- BKE_object_apply_mat4(ob_add, ob_add->obmat, true, true);
+ RNA_property_float_get_array(op->ptr, prop_matrix, &ob_add->object_to_world[0][0]);
+ BKE_object_apply_mat4(ob_add, ob_add->object_to_world, true, true);
DEG_id_tag_update(&ob_add->id, ID_RECALC_TRANSFORM);
}
@@ -3969,7 +3969,7 @@ static int object_transform_to_mouse_exec(bContext *C, wmOperator *op)
float mat_dst_unit[4][4];
float final_delta[4][4];
- normalize_m4_m4(mat_src_unit, ob->obmat);
+ normalize_m4_m4(mat_src_unit, ob->object_to_world);
normalize_m4_m4(mat_dst_unit, matrix);
invert_m4(mat_src_unit);
mul_m4_m4m4(final_delta, mat_dst_unit, mat_src_unit);
@@ -4124,7 +4124,7 @@ static int object_join_exec(bContext *C, wmOperator *op)
* If the zero scale is removed, the data on this axis remains un-scaled
* (something that wouldn't work for #invert_m4_m4_safe). */
float imat_test[4][4];
- if (!invert_m4_m4(imat_test, ob->obmat)) {
+ if (!invert_m4_m4(imat_test, ob->object_to_world)) {
BKE_report(op->reports,
RPT_WARNING,
"Active object final transform has one or more zero scaled axes");
diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c
index 4b6ce69294f..91641de1605 100644
--- a/source/blender/editors/object/object_bake.c
+++ b/source/blender/editors/object/object_bake.c
@@ -461,7 +461,7 @@ static void init_multiresbake_job(bContext *C, MultiresBakeJob *bkj)
CTX_DATA_END;
}
-static void multiresbake_startjob(void *bkv, short *stop, short *do_update, float *progress)
+static void multiresbake_startjob(void *bkv, bool *stop, bool *do_update, float *progress)
{
MultiresBakerJobData *data;
MultiresBakeJob *bkj = bkv;
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c
index 781866db6a0..d647578dc50 100644
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@ -106,7 +106,7 @@ typedef struct BakeAPIRender {
/* Progress Callbacks. */
float *progress;
- short *do_update;
+ bool *do_update;
/* Operator state. */
ReportList *reports;
@@ -150,12 +150,12 @@ static int bake_modal(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
* for exec() when there is no render job
* NOTE: this won't check for the escape key being pressed, but doing so isn't thread-safe.
*/
-static int bake_break(void *UNUSED(rjv))
+static bool bake_break(void *UNUSED(rjv))
{
if (G.is_break) {
- return 1;
+ return true;
}
- return 0;
+ return false;
}
static void bake_update_image(ScrArea *area, Image *image)
@@ -467,8 +467,8 @@ static bool bake_object_check(const Scene *scene,
}
for (int i = 0; i < ob->totcol; i++) {
- bNodeTree *ntree = NULL;
- bNode *node = NULL;
+ const bNodeTree *ntree = NULL;
+ const bNode *node = NULL;
const int mat_nr = i + 1;
Image *image;
ED_object_get_active_image(ob, mat_nr, &image, NULL, &node, &ntree);
@@ -1518,10 +1518,10 @@ static int bake(const BakeAPIRender *bkr,
highpoly[i].me = BKE_mesh_new_from_object(NULL, highpoly[i].ob_eval, false, false);
/* Low-poly to high-poly transformation matrix. */
- copy_m4_m4(highpoly[i].obmat, highpoly[i].ob->obmat);
+ copy_m4_m4(highpoly[i].obmat, highpoly[i].ob->object_to_world);
invert_m4_m4(highpoly[i].imat, highpoly[i].obmat);
- highpoly[i].is_flip_object = is_negative_m4(highpoly[i].ob->obmat);
+ highpoly[i].is_flip_object = is_negative_m4(highpoly[i].ob->object_to_world);
i++;
}
@@ -1540,18 +1540,19 @@ static int bake(const BakeAPIRender *bkr,
pixel_array_high = MEM_mallocN(sizeof(BakePixel) * targets.pixels_num,
"bake pixels high poly");
- if (!RE_bake_pixels_populate_from_objects(me_low_eval,
- pixel_array_low,
- pixel_array_high,
- highpoly,
- tot_highpoly,
- targets.pixels_num,
- ob_cage != NULL,
- bkr->cage_extrusion,
- bkr->max_ray_distance,
- ob_low_eval->obmat,
- (ob_cage ? ob_cage->obmat : ob_low_eval->obmat),
- me_cage_eval)) {
+ if (!RE_bake_pixels_populate_from_objects(
+ me_low_eval,
+ pixel_array_low,
+ pixel_array_high,
+ highpoly,
+ tot_highpoly,
+ targets.pixels_num,
+ ob_cage != NULL,
+ bkr->cage_extrusion,
+ bkr->max_ray_distance,
+ ob_low_eval->object_to_world,
+ (ob_cage ? ob_cage->object_to_world : ob_low_eval->object_to_world),
+ me_cage_eval)) {
BKE_report(reports, RPT_ERROR, "Error handling selected objects");
goto cleanup;
}
@@ -1629,7 +1630,7 @@ static int bake(const BakeAPIRender *bkr,
targets.result,
me_low_eval,
bkr->normal_swizzle,
- ob_low_eval->obmat);
+ ob_low_eval->object_to_world);
}
else {
/* From multi-resolution. */
@@ -1655,7 +1656,7 @@ static int bake(const BakeAPIRender *bkr,
targets.result,
(me_nores) ? me_nores : me_low_eval,
bkr->normal_swizzle,
- ob_low_eval->obmat);
+ ob_low_eval->object_to_world);
if (md) {
BKE_id_free(NULL, &me_nores->id);
@@ -1853,7 +1854,7 @@ finally:
return result;
}
-static void bake_startjob(void *bkv, short *UNUSED(stop), short *do_update, float *progress)
+static void bake_startjob(void *bkv, bool *UNUSED(stop), bool *do_update, float *progress)
{
BakeAPIRender *bkr = (BakeAPIRender *)bkv;
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index fa9ded0f989..1386da5dbde 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -2327,14 +2327,14 @@ static bool get_new_constraint_target(
/* Since by default, IK targets the tip of the last bone,
* use the tip of the active PoseChannel if adding a target for an IK Constraint. */
if (con_type == CONSTRAINT_TYPE_KINEMATIC) {
- mul_v3_m4v3(obt->loc, obact->obmat, pchanact->pose_tail);
+ mul_v3_m4v3(obt->loc, obact->object_to_world, pchanact->pose_tail);
}
else {
- mul_v3_m4v3(obt->loc, obact->obmat, pchanact->pose_head);
+ mul_v3_m4v3(obt->loc, obact->object_to_world, pchanact->pose_head);
}
}
else {
- copy_v3_v3(obt->loc, obact->obmat[3]);
+ copy_v3_v3(obt->loc, obact->object_to_world[3]);
}
/* restore, BKE_object_add sets active */
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index 27659042f50..d52c7f0b8d4 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -535,7 +535,7 @@ static int add_hook_object(const bContext *C,
ob = add_hook_object_new(bmain, scene, view_layer, v3d, obedit);
/* transform cent to global coords for loc */
- mul_v3_m4v3(ob->loc, obedit->obmat, cent);
+ mul_v3_m4v3(ob->loc, obedit->object_to_world, cent);
}
md = obedit->modifiers.first;
@@ -556,13 +556,13 @@ static int add_hook_object(const bContext *C,
unit_m4(pose_mat);
- invert_m4_m4(obedit->imat, obedit->obmat);
+ invert_m4_m4(obedit->world_to_object, obedit->object_to_world);
if (mode == OBJECT_ADDHOOK_NEWOB) {
/* pass */
}
else {
/* may overwrite with pose-bone location, below */
- mul_v3_m4v3(cent, obedit->imat, ob->obmat[3]);
+ mul_v3_m4v3(cent, obedit->world_to_object, ob->object_to_world[3]);
}
if (mode == OBJECT_ADDHOOK_SELOB_BONE) {
@@ -576,8 +576,8 @@ static int add_hook_object(const bContext *C,
pchan_act = BKE_pose_channel_active_if_layer_visible(ob);
if (LIKELY(pchan_act)) {
invert_m4_m4(pose_mat, pchan_act->pose_mat);
- mul_v3_m4v3(cent, ob->obmat, pchan_act->pose_mat[3]);
- mul_v3_m4v3(cent, obedit->imat, cent);
+ mul_v3_m4v3(cent, ob->object_to_world, pchan_act->pose_mat[3]);
+ mul_v3_m4v3(cent, obedit->world_to_object, cent);
}
}
else {
@@ -588,16 +588,16 @@ static int add_hook_object(const bContext *C,
copy_v3_v3(hmd->cent, cent);
/* matrix calculus */
- /* vert x (obmat x hook->imat) x hook->obmat x ob->imat */
+ /* vert x (obmat x hook->world_to_object) x hook->object_to_world x ob->world_to_object */
/* (parentinv ) */
Scene *scene_eval = DEG_get_evaluated_scene(depsgraph);
Object *object_eval = DEG_get_evaluated_object(depsgraph, ob);
BKE_object_transform_copy(object_eval, ob);
BKE_object_where_is_calc(depsgraph, scene_eval, object_eval);
- invert_m4_m4(object_eval->imat, object_eval->obmat);
+ invert_m4_m4(object_eval->world_to_object, object_eval->object_to_world);
/* apparently this call goes from right to left... */
- mul_m4_series(hmd->parentinv, pose_mat, object_eval->imat, obedit->obmat);
+ mul_m4_series(hmd->parentinv, pose_mat, object_eval->world_to_object, obedit->object_to_world);
DEG_relations_tag_update(bmain);
@@ -834,10 +834,10 @@ static int object_hook_recenter_exec(bContext *C, wmOperator *op)
}
/* recenter functionality */
- copy_m3_m4(bmat, ob->obmat);
+ copy_m3_m4(bmat, ob->object_to_world);
invert_m3_m3(imat, bmat);
- sub_v3_v3v3(hmd->cent, scene->cursor.location, ob->obmat[3]);
+ sub_v3_v3v3(hmd->cent, scene->cursor.location, ob->object_to_world[3]);
mul_m3_v3(imat, hmd->cent);
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
diff --git a/source/blender/editors/object/object_modifier.cc b/source/blender/editors/object/object_modifier.cc
index 85a35861329..a87e52db129 100644
--- a/source/blender/editors/object/object_modifier.cc
+++ b/source/blender/editors/object/object_modifier.cc
@@ -614,7 +614,7 @@ bool ED_object_modifier_convert_psys_to_mesh(ReportList * /*reports*/,
if (k) {
medge->v1 = cvert - 1;
medge->v2 = cvert;
- medge->flag = ME_EDGEDRAW | ME_EDGERENDER | ME_LOOSEEDGE;
+ medge->flag = ME_EDGEDRAW | ME_LOOSEEDGE;
medge++;
}
else {
@@ -633,7 +633,7 @@ bool ED_object_modifier_convert_psys_to_mesh(ReportList * /*reports*/,
if (k) {
medge->v1 = cvert - 1;
medge->v2 = cvert;
- medge->flag = ME_EDGEDRAW | ME_EDGERENDER | ME_LOOSEEDGE;
+ medge->flag = ME_EDGEDRAW | ME_LOOSEEDGE;
medge++;
}
else {
@@ -3023,7 +3023,7 @@ static bool ocean_bake_poll(bContext *C)
struct OceanBakeJob {
/* from wmJob */
struct Object *owner;
- short *stop, *do_update;
+ bool *stop, *do_update;
float *progress;
int current_frame;
struct OceanCache *och;
@@ -3062,7 +3062,7 @@ static void oceanbake_update(void *customdata, float progress, int *cancel)
*(oj->progress) = progress;
}
-static void oceanbake_startjob(void *customdata, short *stop, short *do_update, float *progress)
+static void oceanbake_startjob(void *customdata, bool *stop, bool *do_update, float *progress)
{
OceanBakeJob *oj = static_cast<OceanBakeJob *>(customdata);
@@ -3075,7 +3075,7 @@ static void oceanbake_startjob(void *customdata, short *stop, short *do_update,
BKE_ocean_bake(oj->ocean, oj->och, oceanbake_update, (void *)oj);
*do_update = true;
- *stop = 0;
+ *stop = false;
}
static void oceanbake_endjob(void *customdata)
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 5da19d76259..10068def991 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -272,7 +272,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
/* inverse parent matrix */
BKE_object_workob_calc_parent(depsgraph, scene, ob, &workob);
- invert_m4_m4(ob->parentinv, workob.obmat);
+ invert_m4_m4(ob->parentinv, workob.object_to_world);
}
else {
ob->partype = PARVERT1;
@@ -280,7 +280,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
/* inverse parent matrix */
BKE_object_workob_calc_parent(depsgraph, scene, ob, &workob);
- invert_m4_m4(ob->parentinv, workob.obmat);
+ invert_m4_m4(ob->parentinv, workob.object_to_world);
}
}
}
@@ -401,7 +401,7 @@ void ED_object_parent_clear(Object *ob, const int type)
/* remove parent, and apply the parented transform
* result as object's local transforms */
ob->parent = NULL;
- BKE_object_apply_mat4(ob, ob->obmat, true, false);
+ BKE_object_apply_mat4(ob, ob->object_to_world, true, false);
break;
}
case CLEAR_PARENT_INVERSE: {
@@ -584,7 +584,7 @@ bool ED_object_parent_set(ReportList *reports,
if (keep_transform) {
/* Was removed because of bug T23577,
* but this can be handy in some cases too T32616, so make optional. */
- BKE_object_apply_mat4(ob, ob->obmat, false, false);
+ BKE_object_apply_mat4(ob, ob->object_to_world, false, false);
}
/* Set the parent (except for follow-path constraint option). */
@@ -706,7 +706,7 @@ bool ED_object_parent_set(ReportList *reports,
BKE_constraint_target_matrix_get(
depsgraph, scene, con, 0, CONSTRAINT_OBTYPE_OBJECT, NULL, cmat, scene->r.cfra);
- sub_v3_v3v3(vec, ob->obmat[3], cmat[3]);
+ sub_v3_v3v3(vec, ob->object_to_world[3], cmat[3]);
copy_v3_v3(ob->loc, vec);
}
@@ -729,7 +729,7 @@ bool ED_object_parent_set(ReportList *reports,
ob->partype = PAROBJECT;
BKE_object_workob_calc_parent(depsgraph, scene, ob, &workob);
- invert_m4_m4(ob->parentinv, workob.obmat);
+ invert_m4_m4(ob->parentinv, workob.object_to_world);
}
else if (is_armature_parent && (ob->type == OB_GPENCIL) && (par->type == OB_ARMATURE)) {
if (partype == PAR_ARMATURE) {
@@ -747,7 +747,7 @@ bool ED_object_parent_set(ReportList *reports,
ob->partype = PAROBJECT;
BKE_object_workob_calc_parent(depsgraph, scene, ob, &workob);
- invert_m4_m4(ob->parentinv, workob.obmat);
+ invert_m4_m4(ob->parentinv, workob.object_to_world);
}
else if ((ob->type == OB_GPENCIL) && (par->type == OB_LATTICE)) {
/* Add Lattice modifier */
@@ -758,12 +758,12 @@ bool ED_object_parent_set(ReportList *reports,
ob->partype = PAROBJECT;
BKE_object_workob_calc_parent(depsgraph, scene, ob, &workob);
- invert_m4_m4(ob->parentinv, workob.obmat);
+ invert_m4_m4(ob->parentinv, workob.object_to_world);
}
else {
/* calculate inverse parent matrix */
BKE_object_workob_calc_parent(depsgraph, scene, ob, &workob);
- invert_m4_m4(ob->parentinv, workob.obmat);
+ invert_m4_m4(ob->parentinv, workob.object_to_world);
}
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
@@ -772,7 +772,7 @@ bool ED_object_parent_set(ReportList *reports,
static void parent_set_vert_find(KDTree_3d *tree, Object *child, int vert_par[3], bool is_tri)
{
- const float *co_find = child->obmat[3];
+ const float *co_find = child->object_to_world[3];
if (is_tri) {
KDTreeNearest_3d nearest[3];
int tot;
@@ -1186,7 +1186,7 @@ static int object_track_clear_exec(bContext *C, wmOperator *op)
}
if (type == CLEAR_TRACK_KEEP_TRANSFORM) {
- BKE_object_apply_mat4(ob, ob->obmat, true, true);
+ BKE_object_apply_mat4(ob, ob->object_to_world, true, true);
}
}
CTX_DATA_END;
diff --git a/source/blender/editors/object/object_remesh.cc b/source/blender/editors/object/object_remesh.cc
index 8358bf632d3..a50fb28805e 100644
--- a/source/blender/editors/object/object_remesh.cc
+++ b/source/blender/editors/object/object_remesh.cc
@@ -296,7 +296,7 @@ static void voxel_size_edit_draw(const bContext *C, ARegion * /*ar*/, void *arg)
uint pos3d = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
GPU_matrix_push();
- GPU_matrix_mul(cd->active_object->obmat);
+ GPU_matrix_mul(cd->active_object->object_to_world);
/* Draw Rect */
immUniformColor4f(0.9f, 0.9f, 0.9f, 0.8f);
@@ -494,10 +494,10 @@ static int voxel_size_edit_invoke(bContext *C, wmOperator *op, const wmEvent *ev
float view_normal[3] = {0.0f, 0.0f, 1.0f};
/* Calculate the view normal. */
- invert_m4_m4(active_object->imat, active_object->obmat);
+ invert_m4_m4(active_object->world_to_object, active_object->object_to_world);
copy_m3_m4(mat, rv3d->viewinv);
mul_m3_v3(mat, view_normal);
- copy_m3_m4(mat, active_object->imat);
+ copy_m3_m4(mat, active_object->world_to_object);
mul_m3_v3(mat, view_normal);
normalize_v3(view_normal);
@@ -535,7 +535,7 @@ static int voxel_size_edit_invoke(bContext *C, wmOperator *op, const wmEvent *ev
/* Project the selected face in the previous step of the Bounding Box. */
for (int i = 0; i < 4; i++) {
float preview_plane_world_space[3];
- mul_v3_m4v3(preview_plane_world_space, active_object->obmat, cd->preview_plane[i]);
+ mul_v3_m4v3(preview_plane_world_space, active_object->object_to_world, cd->preview_plane[i]);
ED_view3d_project_v2(region, preview_plane_world_space, preview_plane_proj[i]);
}
@@ -582,7 +582,7 @@ static int voxel_size_edit_invoke(bContext *C, wmOperator *op, const wmEvent *ev
/* Invert object scale. */
float scale[3];
- mat4_to_size(scale, active_object->obmat);
+ mat4_to_size(scale, active_object->object_to_world);
invert_v3(scale);
size_to_mat4(scale_mat, scale);
@@ -593,7 +593,7 @@ static int voxel_size_edit_invoke(bContext *C, wmOperator *op, const wmEvent *ev
/* Scale the text to constant viewport size. */
float text_pos_word_space[3];
- mul_v3_m4v3(text_pos_word_space, active_object->obmat, text_pos);
+ mul_v3_m4v3(text_pos_word_space, active_object->object_to_world, text_pos);
const float pixelsize = ED_view3d_pixel_size(rv3d, text_pos_word_space);
scale_m4_fl(scale_mat, pixelsize * 0.5f);
mul_m4_m4_post(cd->text_mat, scale_mat);
@@ -654,7 +654,7 @@ enum eSymmetryAxes {
struct QuadriFlowJob {
/* from wmJob */
struct Object *owner;
- short *stop, *do_update;
+ bool *stop, *do_update;
float *progress;
const struct wmOperator *op;
@@ -836,7 +836,7 @@ static Mesh *remesh_symmetry_mirror(Object *ob, Mesh *mesh, eSymmetryAxes symmet
return mesh_mirror;
}
-static void quadriflow_start_job(void *customdata, short *stop, short *do_update, float *progress)
+static void quadriflow_start_job(void *customdata, bool *stop, bool *do_update, float *progress)
{
QuadriFlowJob *qj = static_cast<QuadriFlowJob *>(customdata);
@@ -884,7 +884,7 @@ static void quadriflow_start_job(void *customdata, short *stop, short *do_update
if (new_mesh == nullptr) {
*do_update = true;
- *stop = 0;
+ *stop = false;
if (qj->success == 1) {
/* This is not a user cancellation event. */
qj->success = 0;
@@ -917,7 +917,7 @@ static void quadriflow_start_job(void *customdata, short *stop, short *do_update
BKE_mesh_batch_cache_dirty_tag(static_cast<Mesh *>(ob->data), BKE_MESH_BATCH_DIRTY_ALL);
*do_update = true;
- *stop = 0;
+ *stop = false;
}
static void quadriflow_end_job(void *customdata)
@@ -992,7 +992,7 @@ static int quadriflow_remesh_exec(bContext *C, wmOperator *op)
if (op->flag == 0) {
/* This is called directly from the exec operator, this operation is now blocking */
job->is_nonblocking_job = false;
- short stop = 0, do_update = true;
+ bool stop = false, do_update = true;
float progress;
quadriflow_start_job(job, &stop, &do_update, &progress);
quadriflow_end_job(job);
diff --git a/source/blender/editors/object/object_transform.cc b/source/blender/editors/object/object_transform.cc
index 6604e3da4d2..7d0b62db827 100644
--- a/source/blender/editors/object/object_transform.cc
+++ b/source/blender/editors/object/object_transform.cc
@@ -7,6 +7,7 @@
#include <cstdlib>
#include <cstring>
+#include <limits>
#include <numeric>
#include "DNA_anim_types.h"
@@ -527,9 +528,9 @@ static void ignore_parent_tx(Main *bmain, Depsgraph *depsgraph, Scene *scene, Ob
LISTBASE_FOREACH (Object *, ob_child, &bmain->objects) {
if (ob_child->parent == ob) {
Object *ob_child_eval = DEG_get_evaluated_object(depsgraph, ob_child);
- BKE_object_apply_mat4(ob_child_eval, ob_child_eval->obmat, true, false);
+ BKE_object_apply_mat4(ob_child_eval, ob_child_eval->object_to_world, true, false);
BKE_object_workob_calc_parent(depsgraph, scene, ob_child_eval, &workob);
- invert_m4_m4(ob_child->parentinv, workob.obmat);
+ invert_m4_m4(ob_child->parentinv, workob.object_to_world);
/* Copy result of BKE_object_apply_mat4(). */
BKE_object_transform_copy(ob_child, ob_child_eval);
/* Make sure evaluated object is in a consistent state with the original one.
@@ -660,11 +661,11 @@ static int apply_objects_internal(bContext *C,
if (do_multi_user) {
obact = CTX_data_active_object(C);
- invert_m4_m4(obact_invmat, obact->obmat);
+ invert_m4_m4(obact_invmat, obact->object_to_world);
Object workob;
BKE_object_workob_calc_parent(depsgraph, scene, obact, &workob);
- copy_m4_m4(obact_parent, workob.obmat);
+ copy_m4_m4(obact_parent, workob.object_to_world);
copy_m4_m4(obact_parentinv, obact->parentinv);
if (apply_objects_internal_need_single_user(C)) {
@@ -989,7 +990,7 @@ static int apply_objects_internal(bContext *C,
float _obmat[4][4], _iobmat[4][4];
float _mat[4][4];
- copy_m4_m4(_obmat, ob->obmat);
+ copy_m4_m4(_obmat, ob->object_to_world);
invert_m4_m4(_iobmat, _obmat);
copy_m4_m4(_mat, _obmat);
@@ -1075,7 +1076,7 @@ static int visual_transform_apply_exec(bContext *C, wmOperator * /*op*/)
CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) {
Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob);
BKE_object_where_is_calc(depsgraph, scene, ob_eval);
- BKE_object_apply_mat4(ob_eval, ob_eval->obmat, true, true);
+ BKE_object_apply_mat4(ob_eval, ob_eval->object_to_world, true, true);
BKE_object_transform_copy(ob, ob_eval);
/* update for any children that may get moved */
@@ -1274,8 +1275,8 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
if (centermode == ORIGIN_TO_CURSOR) {
copy_v3_v3(cent, cursor);
- invert_m4_m4(obedit->imat, obedit->obmat);
- mul_m4_v3(obedit->imat, cent);
+ invert_m4_m4(obedit->world_to_object, obedit->object_to_world);
+ mul_m4_v3(obedit->world_to_object, cent);
}
else {
if (around == V3D_AROUND_CENTER_BOUNDS) {
@@ -1342,8 +1343,8 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
if (centermode == ORIGIN_TO_CURSOR) {
copy_v3_v3(cent, cursor);
- invert_m4_m4(ob->imat, ob->obmat);
- mul_m4_v3(ob->imat, cent);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
+ mul_m4_v3(ob->world_to_object, cent);
}
if (ob->data == nullptr) {
@@ -1363,8 +1364,8 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
INIT_MINMAX(min, max);
BKE_object_minmax_dupli(depsgraph, scene, ob, min, max, true);
mid_v3_v3v3(cent, min, max);
- invert_m4_m4(ob->imat, ob->obmat);
- mul_m4_v3(ob->imat, cent);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
+ mul_m4_v3(ob->world_to_object, cent);
}
add_v3_v3(ob->instance_collection->instance_offset, cent);
@@ -1554,7 +1555,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
if (centermode == ORIGIN_TO_GEOMETRY) {
zero_v3(gpcenter);
BKE_gpencil_centroid_3d(gpd, gpcenter);
- add_v3_v3(gpcenter, ob->obmat[3]);
+ add_v3_v3(gpcenter, ob->object_to_world[3]);
}
if (centermode == ORIGIN_TO_CURSOR) {
copy_v3_v3(gpcenter, cursor);
@@ -1566,8 +1567,8 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
float offset_local[3];
int i;
- sub_v3_v3v3(offset_global, gpcenter, ob->obmat[3]);
- copy_m3_m4(bmat, obact->obmat);
+ sub_v3_v3v3(offset_global, gpcenter, ob->object_to_world[3]);
+ copy_m3_m4(bmat, obact->object_to_world);
invert_m3_m3(imat, bmat);
mul_m3_v3(imat, offset_global);
mul_v3_m3v3(offset_local, imat, offset_global);
@@ -1643,8 +1644,8 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
/* done */
}
else if (around == V3D_AROUND_CENTER_BOUNDS) {
- float3 min;
- float3 max;
+ float3 min(std::numeric_limits<float>::max());
+ float3 max(-std::numeric_limits<float>::max());
if (curves.bounds_min_max(min, max)) {
cent = math::midpoint(min, max);
}
@@ -1699,7 +1700,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
ob_other->flag |= OB_DONE;
DEG_id_tag_update(&ob_other->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
- mul_v3_mat3_m4v3(centn, ob_other->obmat, cent); /* omit translation part */
+ mul_v3_mat3_m4v3(centn, ob_other->object_to_world, cent); /* omit translation part */
add_v3_v3(ob_other->loc, centn);
Object *ob_other_eval = DEG_get_evaluated_object(depsgraph, ob_other);
@@ -1873,9 +1874,9 @@ static void object_transform_axis_target_calc_depth_init(XFormAxisData *xfd, con
int center_tot = 0;
for (XFormAxisItem &item : xfd->object_data) {
const Object *ob = item.ob;
- const float *ob_co_a = ob->obmat[3];
+ const float *ob_co_a = ob->object_to_world[3];
float ob_co_b[3];
- add_v3_v3v3(ob_co_b, ob->obmat[3], ob->obmat[2]);
+ add_v3_v3v3(ob_co_b, ob->object_to_world[3], ob->object_to_world[2]);
float view_isect[3], ob_isect[3];
if (isect_line_line_v3(view_co_a, view_co_b, ob_co_a, ob_co_b, view_isect, ob_isect)) {
add_v3_v3(center, view_isect);
@@ -1946,7 +1947,7 @@ static void object_apply_location(Object *ob, const float loc[3])
/* quick but weak */
Object ob_prev = blender::dna::shallow_copy(*ob);
float mat[4][4];
- copy_m4_m4(mat, ob->obmat);
+ copy_m4_m4(mat, ob->object_to_world);
copy_v3_v3(mat[3], loc);
BKE_object_apply_mat4(ob, mat, true, true);
copy_v3_v3(mat[3], ob->loc);
@@ -1961,7 +1962,7 @@ static bool object_orient_to_location(Object *ob,
const bool z_flip)
{
float delta[3];
- sub_v3_v3v3(delta, ob->obmat[3], location);
+ sub_v3_v3v3(delta, ob->object_to_world[3], location);
if (normalize_v3(delta) != 0.0f) {
if (z_flip) {
negate_v3(delta);
@@ -2139,7 +2140,7 @@ static int object_transform_axis_target_modal(bContext *C, wmOperator *op, const
float xform_rot_offset_inv_first[3][3];
for (const int i : xfd->object_data.index_range()) {
XFormAxisItem &item = xfd->object_data[i];
- copy_m3_m4(item.xform_rot_offset, item.ob->obmat);
+ copy_m3_m4(item.xform_rot_offset, item.ob->object_to_world);
normalize_m3(item.xform_rot_offset);
if (i == 0) {
@@ -2158,8 +2159,8 @@ static int object_transform_axis_target_modal(bContext *C, wmOperator *op, const
XFormAxisItem &item = xfd->object_data[i];
if (is_translate_init) {
float ob_axis[3];
- item.xform_dist = len_v3v3(item.ob->obmat[3], location_world);
- normalize_v3_v3(ob_axis, item.ob->obmat[2]);
+ item.xform_dist = len_v3v3(item.ob->object_to_world[3], location_world);
+ normalize_v3_v3(ob_axis, item.ob->object_to_world[2]);
/* Scale to avoid adding distance when moving between surfaces. */
if (normal_found) {
float scale = fabsf(dot_v3v3(ob_axis, normal));
@@ -2173,7 +2174,7 @@ static int object_transform_axis_target_modal(bContext *C, wmOperator *op, const
copy_v3_v3(target_normal, normal);
}
else {
- normalize_v3_v3(target_normal, item.ob->obmat[2]);
+ normalize_v3_v3(target_normal, item.ob->object_to_world[2]);
}
#ifdef USE_RELATIVE_ROTATION
@@ -2190,7 +2191,7 @@ static int object_transform_axis_target_modal(bContext *C, wmOperator *op, const
madd_v3_v3fl(loc, target_normal, item.xform_dist);
object_apply_location(item.ob, loc);
/* so orient behaves as expected */
- copy_v3_v3(item.ob->obmat[3], loc);
+ copy_v3_v3(item.ob->object_to_world[3], loc);
}
object_orient_to_location(
diff --git a/source/blender/editors/object/object_utils.c b/source/blender/editors/object/object_utils.c
index 50ba5b8af5f..1387282357f 100644
--- a/source/blender/editors/object/object_utils.c
+++ b/source/blender/editors/object/object_utils.c
@@ -114,20 +114,20 @@ bool ED_object_calc_active_center(Object *ob, const bool select_only, float r_ce
{
if (ob->mode & OB_MODE_EDIT) {
if (ED_object_calc_active_center_for_editmode(ob, select_only, r_center)) {
- mul_m4_v3(ob->obmat, r_center);
+ mul_m4_v3(ob->object_to_world, r_center);
return true;
}
return false;
}
if (ob->mode & OB_MODE_POSE) {
if (ED_object_calc_active_center_for_posemode(ob, select_only, r_center)) {
- mul_m4_v3(ob->obmat, r_center);
+ mul_m4_v3(ob->object_to_world, r_center);
return true;
}
return false;
}
if (!select_only || (ob->base_flag & BASE_SELECTED)) {
- copy_v3_v3(r_center, ob->obmat[3]);
+ copy_v3_v3(r_center, ob->object_to_world[3]);
return true;
}
return false;
@@ -245,11 +245,11 @@ void ED_object_xform_skip_child_container_item_ensure(struct XFormObjectSkipChil
if (!BLI_ghash_ensure_p(xcs->obchild_in_obmode_map, ob, &xf_p)) {
struct XFormObjectSkipChild *xf = MEM_mallocN(sizeof(*xf), __func__);
copy_m4_m4(xf->parentinv_orig, ob->parentinv);
- copy_m4_m4(xf->obmat_orig, ob->obmat);
- copy_m4_m4(xf->parent_obmat_orig, ob->parent->obmat);
- invert_m4_m4(xf->parent_obmat_inv_orig, ob->parent->obmat);
+ copy_m4_m4(xf->obmat_orig, ob->object_to_world);
+ copy_m4_m4(xf->parent_obmat_orig, ob->parent->object_to_world);
+ invert_m4_m4(xf->parent_obmat_inv_orig, ob->parent->object_to_world);
if (ob_parent_recurse) {
- copy_m4_m4(xf->parent_recurse_obmat_orig, ob_parent_recurse->obmat);
+ copy_m4_m4(xf->parent_recurse_obmat_orig, ob_parent_recurse->object_to_world);
}
xf->mode = mode;
xf->ob_parent_recurse = ob_parent_recurse;
@@ -274,14 +274,14 @@ void ED_object_xform_skip_child_container_update_all(struct XFormObjectSkipChild
if (xf->mode == XFORM_OB_SKIP_CHILD_PARENT_IS_XFORM) {
/* Parent is transformed, this isn't so compensate. */
Object *ob_parent_eval = DEG_get_evaluated_object(depsgraph, ob->parent);
- mul_m4_m4m4(dmat, xf->parent_obmat_inv_orig, ob_parent_eval->obmat);
+ mul_m4_m4m4(dmat, xf->parent_obmat_inv_orig, ob_parent_eval->object_to_world);
invert_m4(dmat);
}
else if (xf->mode == XFORM_OB_SKIP_CHILD_PARENT_IS_XFORM_INDIRECT) {
/* Calculate parent matrix (from the root transform). */
Object *ob_parent_recurse_eval = DEG_get_evaluated_object(depsgraph, xf->ob_parent_recurse);
float parent_recurse_obmat_inv[4][4];
- invert_m4_m4(parent_recurse_obmat_inv, ob_parent_recurse_eval->obmat);
+ invert_m4_m4(parent_recurse_obmat_inv, ob_parent_recurse_eval->object_to_world);
mul_m4_m4m4(dmat, xf->parent_recurse_obmat_orig, parent_recurse_obmat_inv);
invert_m4(dmat);
float parent_obmat_calc[4][4];
@@ -296,7 +296,7 @@ void ED_object_xform_skip_child_container_update_all(struct XFormObjectSkipChild
/* Transform this - without transform data. */
Object *ob_parent_recurse_eval = DEG_get_evaluated_object(depsgraph, xf->ob_parent_recurse);
float parent_recurse_obmat_inv[4][4];
- invert_m4_m4(parent_recurse_obmat_inv, ob_parent_recurse_eval->obmat);
+ invert_m4_m4(parent_recurse_obmat_inv, ob_parent_recurse_eval->object_to_world);
mul_m4_m4m4(dmat, xf->parent_recurse_obmat_orig, parent_recurse_obmat_inv);
invert_m4(dmat);
float obmat_calc[4][4];
@@ -350,7 +350,7 @@ void ED_object_data_xform_container_item_ensure(struct XFormObjectData_Container
void **xf_p;
if (!BLI_ghash_ensure_p(xds->obdata_in_obmode_map, ob->data, &xf_p)) {
struct XFormObjectData_Extra *xf = MEM_mallocN(sizeof(*xf), __func__);
- copy_m4_m4(xf->obmat_orig, ob->obmat);
+ copy_m4_m4(xf->obmat_orig, ob->object_to_world);
xf->ob = ob;
/* Result may be NULL, that's OK. */
xf->xod = ED_object_data_xform_create(ob->data);
@@ -378,7 +378,7 @@ void ED_object_data_xform_container_update_all(struct XFormObjectData_Container
Object *ob_eval = DEG_get_evaluated_object(depsgraph, xf->ob);
float imat[4][4], dmat[4][4];
invert_m4_m4(imat, xf->obmat_orig);
- mul_m4_m4m4(dmat, imat, ob_eval->obmat);
+ mul_m4_m4m4(dmat, imat, ob_eval->object_to_world);
invert_m4(dmat);
ED_object_data_xform_by_mat4(xf->xod, dmat);
diff --git a/source/blender/editors/object/object_warp.c b/source/blender/editors/object/object_warp.c
index a1d53cadd06..d1e6e7000d9 100644
--- a/source/blender/editors/object/object_warp.c
+++ b/source/blender/editors/object/object_warp.c
@@ -38,7 +38,7 @@ static void object_warp_calc_view_matrix(float r_mat_view[4][4],
mul_m4_m4m4(viewmat_roll, mat_offset, viewmat);
/* apply the view and the object matrix */
- mul_m4_m4m4(r_mat_view, viewmat_roll, obedit->obmat);
+ mul_m4_m4m4(r_mat_view, viewmat_roll, obedit->object_to_world);
/* get the view-space cursor */
mul_v3_m4v3(r_center_view, viewmat_roll, center);
diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c
index 41238eb171b..1a3f0f0f2ac 100644
--- a/source/blender/editors/physics/dynamicpaint_ops.c
+++ b/source/blender/editors/physics/dynamicpaint_ops.c
@@ -285,7 +285,7 @@ void DPAINT_OT_output_toggle(wmOperatorType *ot)
typedef struct DynamicPaintBakeJob {
/* from wmJob */
void *owner;
- short *stop, *do_update;
+ bool *stop, *do_update;
float *progress;
struct Main *bmain;
@@ -429,7 +429,7 @@ static void dynamicPaint_bakeImageSequence(DynamicPaintBakeJob *job)
ED_update_for_newframe(job->bmain, job->depsgraph);
}
-static void dpaint_bake_startjob(void *customdata, short *stop, short *do_update, float *progress)
+static void dpaint_bake_startjob(void *customdata, bool *stop, bool *do_update, float *progress)
{
DynamicPaintBakeJob *job = customdata;
@@ -450,7 +450,7 @@ static void dpaint_bake_startjob(void *customdata, short *stop, short *do_update
dynamicPaint_bakeImageSequence(job);
*do_update = true;
- *stop = 0;
+ *stop = false;
}
/*
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index e6d0aca7902..22295c260e2 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -3920,8 +3920,8 @@ static void brush_puff(PEData *data, int point_index, float mouse_distance)
mul_m4_v3(mat, co);
/* Use `kco` as the object space version of world-space `co`,
- * `ob->imat` is set before calling. */
- mul_v3_m4v3(kco, data->ob->imat, co);
+ * `ob->world_to_object` is set before calling. */
+ mul_v3_m4v3(kco, data->ob->world_to_object, co);
point_index = BLI_kdtree_3d_find_nearest(edit->emitter_field, kco, NULL);
if (point_index == -1) {
@@ -3930,7 +3930,7 @@ static void brush_puff(PEData *data, int point_index, float mouse_distance)
copy_v3_v3(co_root, co);
copy_v3_v3(no_root, &edit->emitter_cosnos[point_index * 6 + 3]);
- mul_mat3_m4_v3(data->ob->obmat, no_root); /* normal into global-space */
+ mul_mat3_m4_v3(data->ob->object_to_world, no_root); /* normal into global-space */
normalize_v3(no_root);
if (puff_volume) {
@@ -4010,14 +4010,14 @@ static void brush_puff(PEData *data, int point_index, float mouse_distance)
mul_m4_v3(mat, oco);
/* Use `kco` as the object space version of world-space `co`,
- * `ob->imat` is set before calling. */
- mul_v3_m4v3(kco, data->ob->imat, oco);
+ * `ob->world_to_object` is set before calling. */
+ mul_v3_m4v3(kco, data->ob->world_to_object, oco);
point_index = BLI_kdtree_3d_find_nearest(edit->emitter_field, kco, NULL);
if (point_index != -1) {
copy_v3_v3(onor, &edit->emitter_cosnos[point_index * 6 + 3]);
- mul_mat3_m4_v3(data->ob->obmat, onor); /* Normal into world-space. */
- mul_mat3_m4_v3(imat, onor); /* World-space into particle-space. */
+ mul_mat3_m4_v3(data->ob->object_to_world, onor); /* Normal into world-space. */
+ mul_mat3_m4_v3(imat, onor); /* World-space into particle-space. */
normalize_v3(onor);
}
else {
@@ -4412,7 +4412,7 @@ static int brush_add(const bContext *C, PEData *data, short number)
short size = pset->brush[PE_BRUSH_ADD].size;
RNG *rng;
- invert_m4_m4(imat, ob->obmat);
+ invert_m4_m4(imat, ob->object_to_world);
if (psys->flag & PSYS_GLOBAL_HAIR) {
return 0;
@@ -4797,7 +4797,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
data.combfac = 1.0f - data.combfac;
}
- invert_m4_m4(ob->imat, ob->obmat);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
ED_view3d_win_to_delta(region, xy_delta, bedit->zfac, vec);
data.dvec = vec;
@@ -4865,7 +4865,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
}
data.invert = (brush->invert ^ flip);
- invert_m4_m4(ob->imat, ob->obmat);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
foreach_mouse_hit_point(&data, brush_puff, selected);
}
@@ -4895,7 +4895,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
data.smoothfac = brush->strength;
- invert_m4_m4(ob->imat, ob->obmat);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
foreach_mouse_hit_key(&data, brush_smooth_get, selected);
@@ -5112,7 +5112,7 @@ static bool shape_cut_test_point(PEData *data, ParticleEditSettings *pset, Parti
userdata.num_hits = 0;
float co_shape[3];
- mul_v3_m4v3(co_shape, pset->shape_object->imat, key->co);
+ mul_v3_m4v3(co_shape, pset->shape_object->world_to_object, key->co);
BLI_bvhtree_ray_cast_all(
shape_bvh->tree, co_shape, dir, 0.0f, BVH_RAYCAST_DIST_MAX, point_inside_bvh_cb, &userdata);
@@ -5153,8 +5153,8 @@ static void shape_cut(PEData *data, int pa_index)
float dir_shape[3];
float len_shape;
- mul_v3_m4v3(co_curr_shape, pset->shape_object->imat, key->co);
- mul_v3_m4v3(co_next_shape, pset->shape_object->imat, (key + 1)->co);
+ mul_v3_m4v3(co_curr_shape, pset->shape_object->world_to_object, key->co);
+ mul_v3_m4v3(co_next_shape, pset->shape_object->world_to_object, (key + 1)->co);
sub_v3_v3v3(dir_shape, co_next_shape, co_curr_shape);
len_shape = normalize_v3(dir_shape);
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index 210757173eb..852156f9403 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -726,8 +726,8 @@ static bool remap_hair_emitter(Depsgraph *depsgraph,
edit_point = target_edit ? target_edit->points : NULL;
- invert_m4_m4(from_ob_imat, ob->obmat);
- invert_m4_m4(to_ob_imat, target_ob->obmat);
+ invert_m4_m4(from_ob_imat, ob->object_to_world);
+ invert_m4_m4(to_ob_imat, target_ob->object_to_world);
invert_m4_m4(from_imat, from_mat);
invert_m4_m4(to_imat, to_mat);
@@ -843,7 +843,7 @@ static bool remap_hair_emitter(Depsgraph *depsgraph,
float offset[3];
if (to_global) {
- copy_m4_m4(imat, target_ob->obmat);
+ copy_m4_m4(imat, target_ob->object_to_world);
}
else {
/* NOTE: using target_dm here, which is in target_ob object space and has full modifiers.
@@ -923,8 +923,8 @@ static bool connect_hair(Depsgraph *depsgraph, Scene *scene, Object *ob, Particl
ob,
psys,
psys->edit,
- ob->obmat,
- ob->obmat,
+ ob->object_to_world,
+ ob->object_to_world,
psys->flag & PSYS_GLOBAL_HAIR,
false);
if (ok) {
@@ -1174,8 +1174,8 @@ static bool copy_particle_systems_to_object(const bContext *C,
to_mat = I;
break;
case PAR_COPY_SPACE_WORLD:
- from_mat = ob_from->obmat;
- to_mat = ob_to->obmat;
+ from_mat = ob_from->object_to_world;
+ to_mat = ob_to->object_to_world;
break;
default:
/* should not happen */
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index 314796e96e4..d5e55c99444 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -61,7 +61,7 @@
typedef struct FluidJob {
/* from wmJob */
void *owner;
- short *stop, *do_update;
+ bool *stop, *do_update;
float *progress;
const char *type;
const char *name;
@@ -349,7 +349,7 @@ static void fluid_bake_endjob(void *customdata)
}
}
-static void fluid_bake_startjob(void *customdata, short *stop, short *do_update, float *progress)
+static void fluid_bake_startjob(void *customdata, bool *stop, bool *do_update, float *progress)
{
FluidJob *job = customdata;
FluidDomainSettings *fds = job->fmd->domain;
@@ -428,7 +428,7 @@ static void fluid_bake_startjob(void *customdata, short *stop, short *do_update,
*do_update = true;
}
if (stop) {
- *stop = 0;
+ *stop = false;
}
}
@@ -461,7 +461,7 @@ static void fluid_free_endjob(void *customdata)
}
}
-static void fluid_free_startjob(void *customdata, short *stop, short *do_update, float *progress)
+static void fluid_free_startjob(void *customdata, bool *stop, bool *do_update, float *progress)
{
FluidJob *job = customdata;
FluidDomainSettings *fds = job->fmd->domain;
@@ -504,7 +504,7 @@ static void fluid_free_startjob(void *customdata, short *stop, short *do_update,
#endif
*do_update = true;
- *stop = 0;
+ *stop = false;
/* Update scene so that viewport shows freed up scene */
ED_update_for_newframe(job->bmain, job->depsgraph);
diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c
index 97cd0d1d149..9fac93187ee 100644
--- a/source/blender/editors/physics/physics_pointcache.c
+++ b/source/blender/editors/physics/physics_pointcache.c
@@ -86,7 +86,7 @@ static bool ptcache_add_remove_poll(bContext *C)
typedef struct PointCacheJob {
wmWindowManager *wm;
void *owner;
- short *stop, *do_update;
+ bool *stop, *do_update;
float *progress;
PTCacheBaker *baker;
@@ -126,7 +126,7 @@ static void ptcache_job_update(void *customdata, float progress, int *cancel)
*(job->progress) = progress;
}
-static void ptcache_job_startjob(void *customdata, short *stop, short *do_update, float *progress)
+static void ptcache_job_startjob(void *customdata, bool *stop, bool *do_update, float *progress)
{
PointCacheJob *job = customdata;
@@ -144,7 +144,7 @@ static void ptcache_job_startjob(void *customdata, short *stop, short *do_update
BKE_ptcache_bake(job->baker);
*do_update = true;
- *stop = 0;
+ *stop = false;
}
static void ptcache_job_endjob(void *customdata)
diff --git a/source/blender/editors/render/render_internal.cc b/source/blender/editors/render/render_internal.cc
index e66cabbc9f8..b05f430d198 100644
--- a/source/blender/editors/render/render_internal.cc
+++ b/source/blender/editors/render/render_internal.cc
@@ -69,7 +69,7 @@
#include "render_intern.hh"
/* Render Callbacks */
-static int render_break(void *rjv);
+static bool render_break(void *rjv);
struct RenderJob {
Main *main;
@@ -87,8 +87,8 @@ struct RenderJob {
Image *image;
ImageUser iuser;
bool image_outdated;
- short *stop;
- short *do_update;
+ bool *stop;
+ bool *do_update;
float *progress;
ReportList *reports;
int orig_layer;
@@ -637,7 +637,7 @@ static void current_scene_update(void *rjv, Scene *scene)
rj->iuser.scene = scene;
}
-static void render_startjob(void *rjv, short *stop, short *do_update, float *progress)
+static void render_startjob(void *rjv, bool *stop, bool *do_update, float *progress)
{
RenderJob *rj = static_cast<RenderJob *>(rjv);
@@ -791,29 +791,29 @@ static void render_endjob(void *rjv)
}
/* called by render, check job 'stop' value or the global */
-static int render_breakjob(void *rjv)
+static bool render_breakjob(void *rjv)
{
RenderJob *rj = static_cast<RenderJob *>(rjv);
if (G.is_break) {
- return 1;
+ return true;
}
if (rj->stop && *(rj->stop)) {
- return 1;
+ return true;
}
- return 0;
+ return false;
}
/**
* For exec() when there is no render job
* NOTE: this won't check for the escape key being pressed, but doing so isn't thread-safe.
*/
-static int render_break(void * /*rjv*/)
+static bool render_break(void * /*rjv*/)
{
if (G.is_break) {
- return 1;
+ return true;
}
- return 0;
+ return false;
}
/* runs in thread, no cursor setting here works. careful with notifiers too (malloc conflicts) */
diff --git a/source/blender/editors/render/render_preview.cc b/source/blender/editors/render/render_preview.cc
index 140199209da..8e50e8c04d1 100644
--- a/source/blender/editors/render/render_preview.cc
+++ b/source/blender/editors/render/render_preview.cc
@@ -104,7 +104,7 @@ static void icon_copy_rect(ImBuf *ibuf, uint w, uint h, uint *rect);
struct ShaderPreview {
/* from wmJob */
void *owner;
- short *stop, *do_update;
+ bool *stop, *do_update;
Scene *scene;
ID *id, *id_copy;
@@ -785,7 +785,7 @@ static Object *object_preview_camera_create(Main *preview_main,
float rotmat[3][3];
float dummyscale[3];
- mat4_to_loc_rot_size(camera->loc, rotmat, dummyscale, preview_object->obmat);
+ mat4_to_loc_rot_size(camera->loc, rotmat, dummyscale, preview_object->object_to_world);
/* Camera is Y up, so needs additional rotations to obliquely face the front. */
float drotmat[3][3];
@@ -1047,7 +1047,7 @@ static void shader_preview_update(void *spv, RenderResult * /*rr*/, struct rcti
}
/* called by renderer, checks job value */
-static int shader_preview_break(void *spv)
+static bool shader_preview_break(void *spv)
{
ShaderPreview *sp = static_cast<ShaderPreview *>(spv);
@@ -1223,7 +1223,7 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs
}
/* runs inside thread for material and icons */
-static void shader_preview_startjob(void *customdata, short *stop, short *do_update)
+static void shader_preview_startjob(void *customdata, bool *stop, bool *do_update)
{
ShaderPreview *sp = static_cast<ShaderPreview *>(customdata);
@@ -1408,7 +1408,7 @@ static void set_alpha(char *cp, int sizex, int sizey, char alpha)
}
}
-static void icon_preview_startjob(void *customdata, short *stop, short *do_update)
+static void icon_preview_startjob(void *customdata, bool *stop, bool *do_update)
{
ShaderPreview *sp = static_cast<ShaderPreview *>(customdata);
@@ -1488,8 +1488,8 @@ static void icon_preview_startjob(void *customdata, short *stop, short *do_updat
* does not run two of them at the same time. */
static void common_preview_startjob(void *customdata,
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float * /*progress*/)
{
ShaderPreview *sp = static_cast<ShaderPreview *>(customdata);
@@ -1509,8 +1509,8 @@ static void common_preview_startjob(void *customdata,
static void other_id_types_preview_render(IconPreview *ip,
IconPreviewSize *cur_size,
const ePreviewRenderMethod pr_method,
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress)
{
ShaderPreview *sp = MEM_cnew<ShaderPreview>("Icon ShaderPreview");
@@ -1570,8 +1570,8 @@ static int icon_previewimg_size_index_get(const IconPreviewSize *icon_size,
}
static void icon_preview_startjob_all_sizes(void *customdata,
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress)
{
IconPreview *ip = (IconPreview *)customdata;
@@ -1735,7 +1735,7 @@ class PreviewLoadJob {
void push_load_request(PreviewImage *preview, eIconSizes icon_size);
private:
- static void run_fn(void *customdata, short *stop, short *do_update, float *progress);
+ static void run_fn(void *customdata, bool *stop, bool *do_update, float *progress);
static void update_fn(void *customdata);
static void end_fn(void *customdata);
static void free_fn(void *customdata);
@@ -1755,7 +1755,8 @@ PreviewLoadJob::~PreviewLoadJob()
PreviewLoadJob &PreviewLoadJob::ensure_job(wmWindowManager *wm, wmWindow *win)
{
- wmJob *wm_job = WM_jobs_get(wm, win, nullptr, "Load Previews", 0, WM_JOB_TYPE_LOAD_PREVIEW);
+ wmJob *wm_job = WM_jobs_get(
+ wm, win, nullptr, "Load Previews", eWM_JobFlag(0), WM_JOB_TYPE_LOAD_PREVIEW);
if (!WM_jobs_is_running(wm_job)) {
PreviewLoadJob *job_data = MEM_new<PreviewLoadJob>("PreviewLoadJobData");
@@ -1776,7 +1777,7 @@ void PreviewLoadJob::load_jobless(PreviewImage *preview, const eIconSizes icon_s
job_data.push_load_request(preview, icon_size);
- short stop = 0, do_update = 0;
+ bool stop = false, do_update = false;
float progress = 0;
run_fn(&job_data, &stop, &do_update, &progress);
update_fn(&job_data);
@@ -1798,7 +1799,7 @@ void PreviewLoadJob::push_load_request(PreviewImage *preview, const eIconSizes i
BLI_thread_queue_push(todo_queue_, &requested_previews_.back());
}
-void PreviewLoadJob::run_fn(void *customdata, short *stop, short *do_update, float * /*progress*/)
+void PreviewLoadJob::run_fn(void *customdata, bool *stop, bool *do_update, float * /*progress*/)
{
PreviewLoadJob *job_data = static_cast<PreviewLoadJob *>(customdata);
@@ -1936,7 +1937,7 @@ void ED_preview_icon_render(
}
IconPreview ip = {nullptr};
- short stop = false, update = false;
+ bool stop = false, update = false;
float progress = 0.0f;
ED_preview_ensure_dbase();
diff --git a/source/blender/editors/render/render_shading.cc b/source/blender/editors/render/render_shading.cc
index 83ce447e8cf..e5c2b9702e5 100644
--- a/source/blender/editors/render/render_shading.cc
+++ b/source/blender/editors/render/render_shading.cc
@@ -1398,7 +1398,7 @@ static int light_cache_bake_exec(bContext *C, wmOperator *op)
light_cache_bake_tag_cache(scene, op);
- short stop = 0, do_update;
+ bool stop = false, do_update;
float progress; /* Not actually used. */
EEVEE_lightbake_job(rj, &stop, &do_update, &progress);
EEVEE_lightbake_job_data_free(rj);
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 8db968cbb8a..a62e027ba03 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -147,7 +147,7 @@ void ED_region_do_listen(wmRegionListenerParams *params)
}
LISTBASE_FOREACH (uiBlock *, block, &region->uiblocks) {
- UI_block_views_listen(block, params);
+ UI_block_listen(block, params);
}
LISTBASE_FOREACH (uiList *, list, &region->ui_lists) {
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_brush.cc b/source/blender/editors/sculpt_paint/curves_sculpt_brush.cc
index e276bae6697..8172eb8a5d7 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_brush.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_brush.cc
@@ -185,7 +185,7 @@ std::optional<CurvesBrush3D> sample_curves_3d_brush(const Depsgraph &depsgraph,
/* Shorten ray when the surface object is hit. */
if (surface_object_eval != nullptr) {
- const float4x4 surface_to_world_mat = surface_object->obmat;
+ const float4x4 surface_to_world_mat = surface_object->object_to_world;
const float4x4 world_to_surface_mat = surface_to_world_mat.inverted();
Mesh *surface_eval = BKE_object_get_evaluated_mesh(surface_object_eval);
@@ -218,7 +218,7 @@ std::optional<CurvesBrush3D> sample_curves_3d_brush(const Depsgraph &depsgraph,
}
}
- const float4x4 curves_to_world_mat = curves_object.obmat;
+ const float4x4 curves_to_world_mat = curves_object.object_to_world;
const float4x4 world_to_curves_mat = curves_to_world_mat.inverted();
const float3 center_ray_start_cu = world_to_curves_mat * center_ray_start_wo;
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
index 6366da310b6..df7dd871a94 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
@@ -220,8 +220,10 @@ static int sculpt_curves_stroke_invoke(bContext *C, wmOperator *op, const wmEven
int return_value = op->type->modal(C, op, event);
if (return_value == OPERATOR_FINISHED) {
- paint_stroke_free(C, op, op_data->stroke);
- MEM_delete(op_data);
+ if (op->customdata != nullptr) {
+ paint_stroke_free(C, op, op_data->stroke);
+ MEM_delete(op_data);
+ }
return OPERATOR_FINISHED;
}
@@ -236,16 +238,19 @@ static int sculpt_curves_stroke_modal(bContext *C, wmOperator *op, const wmEvent
int return_value = paint_stroke_modal(C, op, event, &op_data->stroke);
if (ELEM(return_value, OPERATOR_FINISHED, OPERATOR_CANCELLED)) {
MEM_delete(op_data);
+ op->customdata = nullptr;
}
return return_value;
}
static void sculpt_curves_stroke_cancel(bContext *C, wmOperator *op)
{
- SculptCurvesBrushStrokeData *op_data = static_cast<SculptCurvesBrushStrokeData *>(
- op->customdata);
- paint_stroke_cancel(C, op, op_data->stroke);
- MEM_delete(op_data);
+ if (op->customdata != nullptr) {
+ SculptCurvesBrushStrokeData *op_data = static_cast<SculptCurvesBrushStrokeData *>(
+ op->customdata);
+ paint_stroke_cancel(C, op, op_data->stroke);
+ MEM_delete(op_data);
+ }
}
static void SCULPT_CURVES_OT_brush_stroke(struct wmOperatorType *ot)
@@ -786,7 +791,7 @@ static void select_grow_invoke_per_curve(Curves &curves_id,
});
});
- float4x4 curves_to_world_mat = curves_ob.obmat;
+ float4x4 curves_to_world_mat = curves_ob.object_to_world;
float4x4 world_to_curves_mat = curves_to_world_mat.inverted();
float4x4 projection;
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 71ec444098e..b85b878af7d 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -1071,7 +1071,7 @@ static void cursor_draw_tiling_preview(const uint gpuattr,
for (int dim = 0; dim < 3; dim++) {
location[dim] = cur[dim] * step[dim] + orgLoc[dim];
}
- cursor_draw_point_screen_space(gpuattr, region, location, ob->obmat, 3);
+ cursor_draw_point_screen_space(gpuattr, region, location, ob->object_to_world, 3);
}
}
}
@@ -1092,7 +1092,7 @@ static void cursor_draw_point_with_symmetry(const uint gpuattr,
/* Axis Symmetry. */
flip_v3_v3(location, true_location, (char)i);
- cursor_draw_point_screen_space(gpuattr, region, location, ob->obmat, 3);
+ cursor_draw_point_screen_space(gpuattr, region, location, ob->object_to_world, 3);
/* Tiling. */
cursor_draw_tiling_preview(gpuattr, region, location, sd, ob, radius);
@@ -1107,7 +1107,7 @@ static void cursor_draw_point_with_symmetry(const uint gpuattr,
mul_m4_v3(symm_rot_mat, location);
cursor_draw_tiling_preview(gpuattr, region, location, sd, ob, radius);
- cursor_draw_point_screen_space(gpuattr, region, location, ob->obmat, 3);
+ cursor_draw_point_screen_space(gpuattr, region, location, ob->object_to_world, 3);
}
}
}
@@ -1334,7 +1334,7 @@ static void paint_cursor_update_pixel_radius(PaintCursorContext *pcontext)
}
copy_v3_v3(pcontext->scene_space_location, pcontext->location);
- mul_m4_v3(pcontext->vc.obact->obmat, pcontext->scene_space_location);
+ mul_m4_v3(pcontext->vc.obact->object_to_world, pcontext->scene_space_location);
}
else {
Sculpt *sd = CTX_data_tool_settings(pcontext->C)->sculpt;
@@ -1464,7 +1464,7 @@ static void paint_cursor_drawing_setup_cursor_space(PaintCursorContext *pcontext
float cursor_trans[4][4], cursor_rot[4][4];
const float z_axis[4] = {0.0f, 0.0f, 1.0f, 0.0f};
float quat[4];
- copy_m4_m4(cursor_trans, pcontext->vc.obact->obmat);
+ copy_m4_m4(cursor_trans, pcontext->vc.obact->object_to_world);
translate_m4(cursor_trans, pcontext->location[0], pcontext->location[1], pcontext->location[2]);
rotation_between_vecs_to_quat(quat, z_axis, pcontext->normal);
quat_to_mat4(cursor_rot, quat);
@@ -1508,7 +1508,7 @@ static void paint_cursor_pose_brush_origins_draw(PaintCursorContext *pcontext)
cursor_draw_point_screen_space(pcontext->pos,
pcontext->region,
ss->pose_ik_chain_preview->segments[i].initial_orig,
- pcontext->vc.obact->obmat,
+ pcontext->vc.obact->object_to_world,
3);
}
}
@@ -1526,7 +1526,7 @@ static void paint_cursor_preview_boundary_data_pivot_draw(PaintCursorContext *pc
pcontext->pos,
pcontext->region,
SCULPT_vertex_co_get(pcontext->ss, pcontext->ss->boundary_preview->pivot_vertex),
- pcontext->vc.obact->obmat,
+ pcontext->vc.obact->object_to_world,
3);
}
@@ -1634,7 +1634,7 @@ static void paint_cursor_draw_3d_view_brush_cursor_inactive(PaintCursorContext *
pcontext->pos,
pcontext->region,
SCULPT_vertex_co_get(pcontext->ss, pcontext->ss->expand_cache->initial_active_vertex),
- pcontext->vc.obact->obmat,
+ pcontext->vc.obact->object_to_world,
2);
}
@@ -1656,7 +1656,7 @@ static void paint_cursor_draw_3d_view_brush_cursor_inactive(PaintCursorContext *
NULL);
GPU_matrix_push();
- GPU_matrix_mul(pcontext->vc.obact->obmat);
+ GPU_matrix_mul(pcontext->vc.obact->object_to_world);
/* Drawing Cursor overlays in 3D object space. */
if (is_brush_tool && brush->sculpt_tool == SCULPT_TOOL_GRAB &&
@@ -1747,7 +1747,7 @@ static void paint_cursor_cursor_draw_3d_view_brush_cursor_active(PaintCursorCont
NULL,
NULL);
GPU_matrix_push();
- GPU_matrix_mul(pcontext->vc.obact->obmat);
+ GPU_matrix_mul(pcontext->vc.obact->object_to_world);
/* Draw the special active cursors different tools may have. */
diff --git a/source/blender/editors/sculpt_paint/paint_curve.c b/source/blender/editors/sculpt_paint/paint_curve.c
index 22d6626ab16..26f76d46f85 100644
--- a/source/blender/editors/sculpt_paint/paint_curve.c
+++ b/source/blender/editors/sculpt_paint/paint_curve.c
@@ -44,7 +44,7 @@ bool paint_curve_poll(bContext *C)
RegionView3D *rv3d = CTX_wm_region_view3d(C);
SpaceImage *sima;
- if (rv3d && !(ob && ((ob->mode & OB_MODE_ALL_PAINT) != 0))) {
+ if (rv3d && !(ob && ((ob->mode & (OB_MODE_ALL_PAINT | OB_MODE_SCULPT_CURVES)) != 0))) {
return false;
}
@@ -676,6 +676,9 @@ static int paintcurve_draw_exec(bContext *C, wmOperator *UNUSED(op))
case PAINT_MODE_SCULPT:
name = "SCULPT_OT_brush_stroke";
break;
+ case PAINT_MODE_SCULPT_CURVES:
+ name = "SCULPT_CURVES_OT_brush_stroke";
+ break;
default:
return OPERATOR_PASS_THROUGH;
}
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index d9aa11a2847..ea33449f0dd 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -3684,7 +3684,7 @@ static void proj_paint_state_viewport_init(ProjPaintState *ps, const char symmet
ps->viewDir[1] = 0.0f;
ps->viewDir[2] = 1.0f;
- copy_m4_m4(ps->obmat, ps->ob->obmat);
+ copy_m4_m4(ps->obmat, ps->ob->object_to_world);
if (symmetry_flag) {
int i;
@@ -3742,7 +3742,7 @@ static void proj_paint_state_viewport_init(ProjPaintState *ps, const char symmet
CameraParams params;
/* viewmat & viewinv */
- copy_m4_m4(viewinv, cam_ob_eval->obmat);
+ copy_m4_m4(viewinv, cam_ob_eval->object_to_world);
normalize_m4(viewinv);
invert_m4_m4(viewmat, viewinv);
@@ -4462,7 +4462,7 @@ static void project_paint_begin(const bContext *C,
if (ps->source == PROJ_SRC_VIEW) {
/* faster clipping lookups */
- ED_view3d_clipping_local(ps->rv3d, ps->ob->obmat);
+ ED_view3d_clipping_local(ps->rv3d, ps->ob->object_to_world);
}
ps->do_face_sel = ((((Mesh *)ps->ob->data)->editflag & ME_EDIT_PAINT_FACE_SEL) != 0);
diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c
index 571ebd79764..ce7db91571c 100644
--- a/source/blender/editors/sculpt_paint/paint_mask.c
+++ b/source/blender/editors/sculpt_paint/paint_mask.c
@@ -348,7 +348,7 @@ static void sculpt_gesture_context_init_common(bContext *C,
copy_m3_m4(mat, sgcontext->vc.rv3d->viewinv);
mul_m3_v3(mat, view_dir);
normalize_v3_v3(sgcontext->world_space_view_normal, view_dir);
- copy_m3_m4(mat, ob->imat);
+ copy_m3_m4(mat, ob->world_to_object);
mul_m3_v3(mat, view_dir);
normalize_v3_v3(sgcontext->true_view_normal, view_dir);
@@ -460,12 +460,12 @@ static void sculpt_gesture_line_plane_from_tri(float *r_plane,
{
float normal[3];
normal_tri_v3(normal, p1, p2, p3);
- mul_v3_mat3_m4v3(normal, sgcontext->vc.obact->imat, normal);
+ mul_v3_mat3_m4v3(normal, sgcontext->vc.obact->world_to_object, normal);
if (flip) {
mul_v3_fl(normal, -1.0f);
}
float plane_point_object_space[3];
- mul_v3_m4v3(plane_point_object_space, sgcontext->vc.obact->imat, p1);
+ mul_v3_m4v3(plane_point_object_space, sgcontext->vc.obact->world_to_object, p1);
plane_from_point_normal_v3(r_plane, plane_point_object_space, normal);
}
@@ -1009,11 +1009,12 @@ static void sculpt_gesture_trim_shape_origin_normal_get(SculptGestureContext *sg
copy_v3_v3(r_normal, sgcontext->world_space_view_normal);
break;
case SCULPT_GESTURE_TRIM_ORIENTATION_SURFACE:
- mul_v3_m4v3(r_origin, sgcontext->vc.obact->obmat, sgcontext->ss->gesture_initial_location);
+ mul_v3_m4v3(
+ r_origin, sgcontext->vc.obact->object_to_world, sgcontext->ss->gesture_initial_location);
/* Transforming the normal does not take non uniform scaling into account. Sculpt mode is not
* expected to work on object with non uniform scaling. */
copy_v3_v3(r_normal, sgcontext->ss->gesture_initial_normal);
- mul_mat3_m4_v3(sgcontext->vc.obact->obmat, r_normal);
+ mul_mat3_m4_v3(sgcontext->vc.obact->object_to_world, r_normal);
break;
}
}
@@ -1044,7 +1045,7 @@ static void sculpt_gesture_trim_calculate_depth(SculptGestureContext *sgcontext)
* mesh, coordinates are first calculated in world space, then converted to object space to
* store them. */
float world_space_vco[3];
- mul_v3_m4v3(world_space_vco, vc->obact->obmat, vco);
+ mul_v3_m4v3(world_space_vco, vc->obact->object_to_world, vco);
const float dist = dist_signed_to_plane_v3(world_space_vco, shape_plane);
trim_operation->depth_front = min_ff(dist, trim_operation->depth_front);
trim_operation->depth_back = max_ff(dist, trim_operation->depth_back);
@@ -1052,8 +1053,9 @@ static void sculpt_gesture_trim_calculate_depth(SculptGestureContext *sgcontext)
if (trim_operation->use_cursor_depth) {
float world_space_gesture_initial_location[3];
- mul_v3_m4v3(
- world_space_gesture_initial_location, vc->obact->obmat, ss->gesture_initial_location);
+ mul_v3_m4v3(world_space_gesture_initial_location,
+ vc->obact->object_to_world,
+ ss->gesture_initial_location);
float mid_point_depth;
if (trim_operation->orientation == SCULPT_GESTURE_TRIM_ORIENTATION_VIEW) {
@@ -1132,7 +1134,7 @@ static void sculpt_gesture_trim_geometry_generate(SculptGestureContext *sgcontex
sculpt_gesture_trim_shape_origin_normal_get(sgcontext, shape_origin, shape_normal);
plane_from_point_normal_v3(shape_plane, shape_origin, shape_normal);
- const float(*ob_imat)[4] = vc->obact->imat;
+ const float(*ob_imat)[4] = vc->obact->world_to_object;
/* Write vertices coordinates for the front face. */
MVert *verts = BKE_mesh_verts_for_write(trim_operation->mesh);
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index bc4c6dc4148..97f5bd77d47 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -564,7 +564,7 @@ static void paint_brush_stroke_add_step(
if (SCULPT_stroke_get_location(
C, world_space_position, stroke->last_mouse_position, stroke->original)) {
copy_v3_v3(stroke->last_world_space_position, world_space_position);
- mul_m4_v3(stroke->vc.obact->obmat, stroke->last_world_space_position);
+ mul_m4_v3(stroke->vc.obact->object_to_world, stroke->last_world_space_position);
}
else {
add_v3_v3(stroke->last_world_space_position, stroke->last_scene_spacing_delta);
@@ -681,8 +681,9 @@ static float paint_space_stroke_spacing(bContext *C,
if (paint_stroke_use_scene_spacing(brush, mode)) {
if (!BKE_brush_use_locked_size(scene, brush)) {
float last_object_space_position[3];
- mul_v3_m4v3(
- last_object_space_position, stroke->vc.obact->imat, stroke->last_world_space_position);
+ mul_v3_m4v3(last_object_space_position,
+ stroke->vc.obact->world_to_object,
+ stroke->last_world_space_position);
size_clamp = paint_calc_object_space_radius(&stroke->vc, last_object_space_position, size);
}
else {
@@ -825,7 +826,7 @@ static int paint_space_stroke(bContext *C,
if (use_scene_spacing) {
float world_space_position[3];
bool hit = SCULPT_stroke_get_location(C, world_space_position, final_mouse, stroke->original);
- mul_m4_v3(stroke->vc.obact->obmat, world_space_position);
+ mul_m4_v3(stroke->vc.obact->object_to_world, world_space_position);
if (hit && stroke->stroke_over_mesh) {
sub_v3_v3v3(d_world_space_position, world_space_position, stroke->last_world_space_position);
length = len_v3(d_world_space_position);
@@ -1216,8 +1217,8 @@ static void paint_line_strokes_spacing(bContext *C,
C, world_space_position_old, old_pos, stroke->original);
bool hit_new = SCULPT_stroke_get_location(
C, world_space_position_new, new_pos, stroke->original);
- mul_m4_v3(stroke->vc.obact->obmat, world_space_position_old);
- mul_m4_v3(stroke->vc.obact->obmat, world_space_position_new);
+ mul_m4_v3(stroke->vc.obact->object_to_world, world_space_position_old);
+ mul_m4_v3(stroke->vc.obact->object_to_world, world_space_position_new);
if (hit_old && hit_new && stroke->stroke_over_mesh) {
sub_v3_v3v3(d_world_space_position, world_space_position_new, world_space_position_old);
length = len_v3(d_world_space_position);
@@ -1360,7 +1361,7 @@ static bool paint_stroke_curve_end(bContext *C, wmOperator *op, PaintStroke *str
if (paint_stroke_use_scene_spacing(br, BKE_paintmode_get_active_from_context(C))) {
stroke->stroke_over_mesh = SCULPT_stroke_get_location(
C, stroke->last_world_space_position, data + 2 * j, stroke->original);
- mul_m4_v3(stroke->vc.obact->obmat, stroke->last_world_space_position);
+ mul_m4_v3(stroke->vc.obact->object_to_world, stroke->last_world_space_position);
}
stroke->stroke_started = stroke->test_start(C, op, stroke->last_mouse_position);
@@ -1492,7 +1493,7 @@ int paint_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event, PaintS
if (paint_stroke_use_scene_spacing(br, mode)) {
stroke->stroke_over_mesh = SCULPT_stroke_get_location(
C, stroke->last_world_space_position, sample_average.mouse, stroke->original);
- mul_m4_v3(stroke->vc.obact->obmat, stroke->last_world_space_position);
+ mul_m4_v3(stroke->vc.obact->object_to_world, stroke->last_world_space_position);
}
stroke->stroke_started = stroke->test_start(C, op, sample_average.mouse);
BLI_assert((stroke->stroke_started & ~1) == 0); /* 0/1 */
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c
index ce4a5151a20..f87ca073c82 100644
--- a/source/blender/editors/sculpt_paint/paint_utils.c
+++ b/source/blender/editors/sculpt_paint/paint_utils.c
@@ -135,12 +135,12 @@ float paint_calc_object_space_radius(ViewContext *vc, const float center[3], flo
float delta[3], scale, loc[3];
const float xy_delta[2] = {pixel_radius, 0.0f};
- mul_v3_m4v3(loc, ob->obmat, center);
+ mul_v3_m4v3(loc, ob->object_to_world, center);
const float zfac = ED_view3d_calc_zfac(vc->rv3d, loc);
ED_view3d_win_to_delta(vc->region, xy_delta, zfac, delta);
- scale = fabsf(mat4_to_scale(ob->obmat));
+ scale = fabsf(mat4_to_scale(ob->object_to_world));
scale = (scale == 0.0f) ? 1.0f : scale;
return len_v3(delta) / scale;
@@ -297,7 +297,7 @@ static void imapaint_pick_uv(
GPU_matrix_model_view_get(matrix);
GPU_matrix_projection_get(proj);
view[0] = view[1] = 0;
- mul_m4_m4m4(matrix, matrix, ob_eval->obmat);
+ mul_m4_m4m4(matrix, matrix, ob_eval->object_to_world);
mul_m4_m4m4(matrix, proj, matrix);
minabsw = 1e10;
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.cc b/source/blender/editors/sculpt_paint/paint_vertex.cc
index acd8b1a6bb1..8e790ac435e 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.cc
+++ b/source/blender/editors/sculpt_paint/paint_vertex.cc
@@ -1647,10 +1647,10 @@ static void vwpaint_update_cache_invariants(
/* cache projection matrix */
ED_view3d_ob_project_mat_get(cache->vc->rv3d, ob, cache->projection_mat);
- invert_m4_m4(ob->imat, ob->obmat);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
copy_m3_m4(mat, cache->vc->rv3d->viewinv);
mul_m3_v3(mat, view_dir);
- copy_m3_m4(mat, ob->imat);
+ copy_m3_m4(mat, ob->world_to_object);
mul_m3_v3(mat, view_dir);
normalize_v3_v3(cache->true_view_normal, view_dir);
@@ -2518,7 +2518,7 @@ static void wpaint_stroke_update_step(bContext *C,
ED_view3d_init_mats_rv3d(ob, vc->rv3d);
/* load projection matrix */
- mul_m4_m4m4(mat, vc->rv3d->persmat, ob->obmat);
+ mul_m4_m4m4(mat, vc->rv3d->persmat, ob->object_to_world);
Mesh *mesh = static_cast<Mesh *>(ob->data);
@@ -2556,7 +2556,7 @@ static void wpaint_stroke_update_step(bContext *C,
/* Calculate pivot for rotation around selection if needed.
* also needed for "Frame Selected" on last stroke. */
float loc_world[3];
- mul_v3_m4v3(loc_world, ob->obmat, ss->cache->true_location);
+ mul_v3_m4v3(loc_world, ob->object_to_world, ss->cache->true_location);
paint_last_stroke_update(scene, loc_world);
BKE_mesh_batch_cache_dirty_tag(mesh, BKE_MESH_BATCH_DIRTY_ALL);
@@ -3847,7 +3847,7 @@ static void vpaint_stroke_update_step_intern(bContext *C, PaintStroke *stroke, P
ED_view3d_init_mats_rv3d(ob, vc->rv3d);
/* load projection matrix */
- mul_m4_m4m4(mat, vc->rv3d->persmat, ob->obmat);
+ mul_m4_m4m4(mat, vc->rv3d->persmat, ob->object_to_world);
swap_m4m4(vc->rv3d->persmat, mat);
@@ -3870,7 +3870,7 @@ static void vpaint_stroke_update_step_intern(bContext *C, PaintStroke *stroke, P
/* Calculate pivot for rotation around selection if needed.
* also needed for "Frame Selected" on last stroke. */
float loc_world[3];
- mul_v3_m4v3(loc_world, ob->obmat, ss->cache->true_location);
+ mul_v3_m4v3(loc_world, ob->object_to_world, ss->cache->true_location);
paint_last_stroke_update(scene, loc_world);
ED_region_tag_redraw(vc->region);
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 34d0158f187..3477285814e 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -2773,14 +2773,14 @@ static void calc_local_y(ViewContext *vc, const float center[3], float y[3])
float loc[3];
const float xy_delta[2] = {0.0f, 1.0f};
- mul_v3_m4v3(loc, ob->imat, center);
+ mul_v3_m4v3(loc, ob->world_to_object, center);
const float zfac = ED_view3d_calc_zfac(vc->rv3d, loc);
ED_view3d_win_to_delta(vc->region, xy_delta, zfac, y);
normalize_v3(y);
add_v3_v3(y, ob->loc);
- mul_m4_v3(ob->imat, y);
+ mul_m4_v3(ob->world_to_object, y);
}
static void calc_brush_local_mat(const Brush *brush, Object *ob, float local_mat[4][4])
@@ -2792,8 +2792,8 @@ static void calc_brush_local_mat(const Brush *brush, Object *ob, float local_mat
float angle, v[3];
float up[3];
- /* Ensure `ob->imat` is up to date. */
- invert_m4_m4(ob->imat, ob->obmat);
+ /* Ensure `ob->world_to_object` is up to date. */
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
/* Initialize last column of matrix. */
mat[0][3] = 0.0f;
@@ -2833,13 +2833,13 @@ void SCULPT_tilt_apply_to_normal(float r_normal[3], StrokeCache *cache, const fl
return;
}
const float rot_max = M_PI_2 * tilt_strength * SCULPT_TILT_SENSITIVITY;
- mul_v3_mat3_m4v3(r_normal, cache->vc->obact->obmat, r_normal);
+ mul_v3_mat3_m4v3(r_normal, cache->vc->obact->object_to_world, r_normal);
float normal_tilt_y[3];
rotate_v3_v3v3fl(normal_tilt_y, r_normal, cache->vc->rv3d->viewinv[0], cache->y_tilt * rot_max);
float normal_tilt_xy[3];
rotate_v3_v3v3fl(
normal_tilt_xy, normal_tilt_y, cache->vc->rv3d->viewinv[1], cache->x_tilt * rot_max);
- mul_v3_mat3_m4v3(r_normal, cache->vc->obact->imat, normal_tilt_xy);
+ mul_v3_mat3_m4v3(r_normal, cache->vc->obact->world_to_object, normal_tilt_xy);
normalize_v3(r_normal);
}
@@ -3284,7 +3284,7 @@ static void sculpt_topology_update(Sculpt *sd,
/* Update average stroke position. */
copy_v3_v3(location, ss->cache->true_location);
- mul_m4_v3(ob->obmat, location);
+ mul_m4_v3(ob->object_to_world, location);
}
static void do_brush_action_task_cb(void *__restrict userdata,
@@ -3615,7 +3615,7 @@ static void do_brush_action(Sculpt *sd,
/* Update average stroke position. */
copy_v3_v3(location, ss->cache->true_location);
- mul_m4_v3(ob->obmat, location);
+ mul_m4_v3(ob->object_to_world, location);
add_v3_v3(ups->average_stroke_accum, location);
ups->average_stroke_counter++;
@@ -4201,8 +4201,8 @@ static void sculpt_init_mirror_clipping(Object *ob, SculptSession *ss)
/* Store matrix for mirror object clipping. */
if (mmd->mirror_ob) {
float imtx_mirror_ob[4][4];
- invert_m4_m4(imtx_mirror_ob, mmd->mirror_ob->obmat);
- mul_m4_m4m4(ss->cache->clip_mirror_mtx, imtx_mirror_ob, ob->obmat);
+ invert_m4_m4(imtx_mirror_ob, mmd->mirror_ob->object_to_world);
+ mul_m4_m4m4(ss->cache->clip_mirror_mtx, imtx_mirror_ob, ob->object_to_world);
}
}
}
@@ -4354,10 +4354,10 @@ static void sculpt_update_cache_invariants(
/* Cache projection matrix. */
ED_view3d_ob_project_mat_get(cache->vc->rv3d, ob, cache->projection_mat);
- invert_m4_m4(ob->imat, ob->obmat);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
copy_m3_m4(mat, cache->vc->rv3d->viewinv);
mul_m3_v3(mat, viewDir);
- copy_m3_m4(mat, ob->imat);
+ copy_m3_m4(mat, ob->world_to_object);
mul_m3_v3(mat, viewDir);
normalize_v3_v3(cache->true_view_normal, viewDir);
@@ -4373,7 +4373,7 @@ static void sculpt_update_cache_invariants(
if (sd->gravity_object) {
Object *gravity_object = sd->gravity_object;
- copy_v3_v3(cache->true_gravity_direction, gravity_object->obmat[2]);
+ copy_v3_v3(cache->true_gravity_direction, gravity_object->object_to_world[2]);
}
else {
cache->true_gravity_direction[0] = cache->true_gravity_direction[1] = 0.0f;
@@ -4527,27 +4527,27 @@ static void sculpt_update_brush_delta(UnifiedPaintSettings *ups, Object *ob, Bru
}
/* Compute 3d coordinate at same z from original location + mval. */
- mul_v3_m4v3(loc, ob->obmat, cache->orig_grab_location);
+ mul_v3_m4v3(loc, ob->object_to_world, cache->orig_grab_location);
ED_view3d_win_to_3d(cache->vc->v3d, cache->vc->region, loc, mval, grab_location);
/* Compute delta to move verts by. */
if (!SCULPT_stroke_is_first_brush_step_of_symmetry_pass(ss->cache)) {
if (sculpt_needs_delta_from_anchored_origin(brush)) {
sub_v3_v3v3(delta, grab_location, cache->old_grab_location);
- invert_m4_m4(imat, ob->obmat);
+ invert_m4_m4(imat, ob->object_to_world);
mul_mat3_m4_v3(imat, delta);
add_v3_v3(cache->grab_delta, delta);
}
else if (sculpt_needs_delta_for_tip_orientation(brush)) {
if (brush->flag & BRUSH_ANCHORED) {
float orig[3];
- mul_v3_m4v3(orig, ob->obmat, cache->orig_grab_location);
+ mul_v3_m4v3(orig, ob->object_to_world, cache->orig_grab_location);
sub_v3_v3v3(cache->grab_delta, grab_location, orig);
}
else {
sub_v3_v3v3(cache->grab_delta, grab_location, cache->old_grab_location);
}
- invert_m4_m4(imat, ob->obmat);
+ invert_m4_m4(imat, ob->object_to_world);
mul_mat3_m4_v3(imat, cache->grab_delta);
}
else {
@@ -4592,7 +4592,7 @@ static void sculpt_update_brush_delta(UnifiedPaintSettings *ups, Object *ob, Bru
/* Handle 'rake' */
cache->is_rake_rotation_valid = false;
- invert_m4_m4(imat, ob->obmat);
+ invert_m4_m4(imat, ob->object_to_world);
mul_mat3_m4_v3(imat, grab_location);
if (SCULPT_stroke_is_first_brush_step_of_symmetry_pass(ss->cache)) {
@@ -4913,7 +4913,7 @@ float SCULPT_raycast_init(ViewContext *vc,
ED_view3d_win_to_segment_clipped(
vc->depsgraph, vc->region, vc->v3d, mval, ray_start, ray_end, true);
- invert_m4_m4(obimat, ob->obmat);
+ invert_m4_m4(obimat, ob->object_to_world);
mul_m4_v3(obimat, ray_start);
mul_m4_v3(obimat, ray_end);
@@ -5021,10 +5021,10 @@ bool SCULPT_cursor_geometry_info_update(bContext *C,
float radius;
/* Update cursor data in SculptSession. */
- invert_m4_m4(ob->imat, ob->obmat);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
copy_m3_m4(mat, vc.rv3d->viewinv);
mul_m3_v3(mat, viewDir);
- copy_m3_m4(mat, ob->imat);
+ copy_m3_m4(mat, ob->world_to_object);
mul_m3_v3(mat, viewDir);
normalize_v3_v3(ss->cursor_view_normal, viewDir);
copy_v3_v3(ss->cursor_normal, srd.face_normal);
@@ -5512,7 +5512,8 @@ static void sculpt_stroke_update_step(bContext *C,
sculpt_restore_mesh(sd, ob);
if (sd->flags & (SCULPT_DYNTOPO_DETAIL_CONSTANT | SCULPT_DYNTOPO_DETAIL_MANUAL)) {
- float object_space_constant_detail = 1.0f / (sd->constant_detail * mat4_to_scale(ob->obmat));
+ float object_space_constant_detail = 1.0f / (sd->constant_detail *
+ mat4_to_scale(ob->object_to_world));
BKE_pbvh_bmesh_detail_size_set(ss->pbvh, object_space_constant_detail);
}
else if (sd->flags & SCULPT_DYNTOPO_DETAIL_BRUSH) {
diff --git a/source/blender/editors/sculpt_paint/sculpt_brush_types.c b/source/blender/editors/sculpt_paint/sculpt_brush_types.c
index 92541d10a59..666fa884e03 100644
--- a/source/blender/editors/sculpt_paint/sculpt_brush_types.c
+++ b/source/blender/editors/sculpt_paint/sculpt_brush_types.c
@@ -1441,6 +1441,9 @@ static void do_rotate_brush_task_cb_ex(void *__restrict userdata,
if (!sculpt_brush_test_sq_fn(&test, orig_data.co)) {
continue;
}
+
+ SCULPT_automasking_node_update(ss, &automask_data, &vd);
+
float vec[3], rot[3][3];
const float fade = bstrength * SCULPT_brush_strength_factor(ss,
brush,
diff --git a/source/blender/editors/sculpt_paint/sculpt_cloth.c b/source/blender/editors/sculpt_paint/sculpt_cloth.c
index b6bb4c185f9..cf7e1d027f7 100644
--- a/source/blender/editors/sculpt_paint/sculpt_cloth.c
+++ b/source/blender/editors/sculpt_paint/sculpt_cloth.c
@@ -667,15 +667,15 @@ static void cloth_brush_solve_collision(Object *object,
BVHTreeRayHit hit;
float obmat_inv[4][4];
- invert_m4_m4(obmat_inv, object->obmat);
+ invert_m4_m4(obmat_inv, object->object_to_world);
for (collider_cache = cloth_sim->collider_list->first; collider_cache;
collider_cache = collider_cache->next) {
float ray_start[3], ray_normal[3];
float pos_world_space[3], prev_pos_world_space[3];
- mul_v3_m4v3(pos_world_space, object->obmat, cloth_sim->pos[i]);
- mul_v3_m4v3(prev_pos_world_space, object->obmat, cloth_sim->last_iteration_pos[i]);
+ mul_v3_m4v3(pos_world_space, object->object_to_world, cloth_sim->pos[i]);
+ mul_v3_m4v3(prev_pos_world_space, object->object_to_world, cloth_sim->last_iteration_pos[i]);
sub_v3_v3v3(ray_normal, pos_world_space, prev_pos_world_space);
copy_v3_v3(ray_start, prev_pos_world_space);
hit.index = -1;
@@ -1419,7 +1419,7 @@ static void cloth_filter_apply_forces_task_cb(void *__restrict userdata,
float sculpt_gravity[3] = {0.0f};
if (sd->gravity_object) {
- copy_v3_v3(sculpt_gravity, sd->gravity_object->obmat[2]);
+ copy_v3_v3(sculpt_gravity, sd->gravity_object->object_to_world[2]);
}
else {
sculpt_gravity[2] = -1.0f;
diff --git a/source/blender/editors/sculpt_paint/sculpt_detail.c b/source/blender/editors/sculpt_paint/sculpt_detail.c
index 6dd718d6a0c..0e46fd50f3b 100644
--- a/source/blender/editors/sculpt_paint/sculpt_detail.c
+++ b/source/blender/editors/sculpt_paint/sculpt_detail.c
@@ -102,7 +102,8 @@ static int sculpt_detail_flood_fill_exec(bContext *C, wmOperator *op)
size = max_fff(dim[0], dim[1], dim[2]);
/* Update topology size. */
- float object_space_constant_detail = 1.0f / (sd->constant_detail * mat4_to_scale(ob->obmat));
+ float object_space_constant_detail = 1.0f /
+ (sd->constant_detail * mat4_to_scale(ob->object_to_world));
BKE_pbvh_bmesh_detail_size_set(ss->pbvh, object_space_constant_detail);
SCULPT_undo_push_begin(ob, op);
@@ -223,7 +224,7 @@ static void sample_detail_dyntopo(bContext *C, ViewContext *vc, const int mval[2
if (srd.hit && srd.edge_length > 0.0f) {
/* Convert edge length to world space detail resolution. */
- sd->constant_detail = 1 / (srd.edge_length * mat4_to_scale(ob->obmat));
+ sd->constant_detail = 1 / (srd.edge_length * mat4_to_scale(ob->object_to_world));
}
}
@@ -473,8 +474,8 @@ static void dyntopo_detail_size_parallel_lines_draw(uint pos3d,
bool flip,
const float angle)
{
- float object_space_constant_detail = 1.0f /
- (cd->detail_size * mat4_to_scale(cd->active_object->obmat));
+ float object_space_constant_detail = 1.0f / (cd->detail_size *
+ mat4_to_scale(cd->active_object->object_to_world));
/* The constant detail represents the maximum edge length allowed before subdividing it. If the
* triangle grid preview is created with this value it will represent an ideal mesh density where
@@ -592,7 +593,8 @@ static void dyntopo_detail_size_sample_from_surface(Object *ob,
if (num_neighbors > 0) {
const float avg_edge_len = len_accum / num_neighbors;
/* Use 0.7 as the average of min and max dyntopo edge length. */
- const float detail_size = 0.7f / (avg_edge_len * mat4_to_scale(cd->active_object->obmat));
+ const float detail_size = 0.7f /
+ (avg_edge_len * mat4_to_scale(cd->active_object->object_to_world));
cd->detail_size = clamp_f(detail_size, 1.0f, 500.0f);
}
}
@@ -716,7 +718,7 @@ static int dyntopo_detail_size_edit_invoke(bContext *C, wmOperator *op, const wm
float cursor_trans[4][4], cursor_rot[4][4];
const float z_axis[4] = {0.0f, 0.0f, 1.0f, 0.0f};
float quat[4];
- copy_m4_m4(cursor_trans, active_object->obmat);
+ copy_m4_m4(cursor_trans, active_object->object_to_world);
translate_m4(
cursor_trans, ss->cursor_location[0], ss->cursor_location[1], ss->cursor_location[2]);
diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set.cc b/source/blender/editors/sculpt_paint/sculpt_face_set.cc
index 8fb4dea668e..40835172be9 100644
--- a/source/blender/editors/sculpt_paint/sculpt_face_set.cc
+++ b/source/blender/editors/sculpt_paint/sculpt_face_set.cc
@@ -917,7 +917,7 @@ static int sculpt_face_sets_change_visibility_exec(bContext *C, wmOperator *op)
UnifiedPaintSettings *ups = &CTX_data_tool_settings(C)->unified_paint_settings;
float location[3];
copy_v3_v3(location, SCULPT_active_vertex_co_get(ss));
- mul_m4_v3(ob->obmat, location);
+ mul_m4_v3(ob->object_to_world, location);
copy_v3_v3(ups->average_stroke_accum, location);
ups->average_stroke_counter = 1;
ups->last_stroke_valid = true;
diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c
index 1fa53eaa006..c158cf33f6d 100644
--- a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c
+++ b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c
@@ -146,8 +146,8 @@ void SCULPT_filter_cache_init(bContext *C,
0, ss->filter_cache->totnode, &data, filter_cache_init_task_cb, &settings);
/* Setup orientation matrices. */
- copy_m4_m4(ss->filter_cache->obmat, ob->obmat);
- invert_m4_m4(ss->filter_cache->obmat_inv, ob->obmat);
+ copy_m4_m4(ss->filter_cache->obmat, ob->object_to_world);
+ invert_m4_m4(ss->filter_cache->obmat_inv, ob->object_to_world);
Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
ViewContext vc;
@@ -203,7 +203,7 @@ void SCULPT_filter_cache_init(bContext *C,
/* Update last stroke location */
- mul_m4_v3(ob->obmat, co);
+ mul_m4_v3(ob->object_to_world, co);
add_v3_v3(ups->average_stroke_accum, co);
ups->average_stroke_counter++;
@@ -221,10 +221,10 @@ void SCULPT_filter_cache_init(bContext *C,
ED_view3d_ob_project_mat_get(vc.rv3d, ob, projection_mat);
- invert_m4_m4(ob->imat, ob->obmat);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
copy_m3_m4(mat, vc.rv3d->viewinv);
mul_m3_v3(mat, viewDir);
- copy_m3_m4(mat, ob->imat);
+ copy_m3_m4(mat, ob->world_to_object);
mul_m3_v3(mat, viewDir);
normalize_v3_v3(ss->filter_cache->view_normal, viewDir);
}
diff --git a/source/blender/editors/sculpt_paint/sculpt_ops.c b/source/blender/editors/sculpt_paint/sculpt_ops.c
index a740ec2773b..8affb0e9d53 100644
--- a/source/blender/editors/sculpt_paint/sculpt_ops.c
+++ b/source/blender/editors/sculpt_paint/sculpt_ops.c
@@ -323,7 +323,7 @@ void ED_object_sculptmode_enter_ex(Main *bmain,
BKE_report(
reports, RPT_WARNING, "Object has non-uniform scale, sculpting may be unpredictable");
}
- else if (is_negative_m4(ob->obmat)) {
+ else if (is_negative_m4(ob->object_to_world)) {
BKE_report(reports, RPT_WARNING, "Object has negative scale, sculpting may be unpredictable");
}
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c
index 9a690f36aab..10a037a1c3c 100644
--- a/source/blender/editors/space_clip/clip_editor.c
+++ b/source/blender/editors/space_clip/clip_editor.c
@@ -676,8 +676,8 @@ typedef struct PrefetchQueue {
SpinLock spin;
- short *stop;
- short *do_update;
+ bool *stop;
+ bool *do_update;
float *progress;
} PrefetchQueue;
@@ -819,7 +819,7 @@ static uchar *prefetch_thread_next_frame(PrefetchQueue *queue,
(queue->initial_frame - queue->current_frame);
}
- *queue->do_update = 1;
+ *queue->do_update = true;
*queue->progress = (float)frames_processed / (queue->end_frame - queue->start_frame);
}
}
@@ -868,7 +868,7 @@ static void prefetch_task_func(TaskPool *__restrict pool, void *task_data)
if (!result) {
/* no more space in the cache, stop reading frames */
- *queue->stop = 1;
+ *queue->stop = true;
break;
}
}
@@ -880,8 +880,8 @@ static void start_prefetch_threads(MovieClip *clip,
int end_frame,
short render_size,
short render_flag,
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress)
{
int tot_thread = BLI_task_scheduler_num_threads();
@@ -918,7 +918,7 @@ static bool prefetch_movie_frame(MovieClip *clip,
int frame,
short render_size,
short render_flag,
- short *stop)
+ bool *stop)
{
MovieClipUser user = *DNA_struct_default_get(MovieClipUser);
@@ -940,14 +940,14 @@ static bool prefetch_movie_frame(MovieClip *clip,
if (!result) {
/* no more space in the cache, we could stop prefetching here */
- *stop = 1;
+ *stop = true;
}
IMB_freeImBuf(ibuf);
}
else {
/* error reading frame, fair enough stop attempting further reading */
- *stop = 1;
+ *stop = true;
}
}
@@ -961,8 +961,8 @@ static void do_prefetch_movie(MovieClip *clip,
int end_frame,
short render_size,
short render_flag,
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress)
{
int frame;
@@ -976,7 +976,7 @@ static void do_prefetch_movie(MovieClip *clip,
frames_processed++;
- *do_update = 1;
+ *do_update = true;
*progress = (float)frames_processed / (end_frame - start_frame);
}
@@ -988,12 +988,12 @@ static void do_prefetch_movie(MovieClip *clip,
frames_processed++;
- *do_update = 1;
+ *do_update = true;
*progress = (float)frames_processed / (end_frame - start_frame);
}
}
-static void prefetch_startjob(void *pjv, short *stop, short *do_update, float *progress)
+static void prefetch_startjob(void *pjv, bool *stop, bool *do_update, float *progress)
{
PrefetchJob *pj = pjv;
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c
index 486f9f9ccb0..2c0668625a0 100644
--- a/source/blender/editors/space_clip/clip_ops.c
+++ b/source/blender/editors/space_clip/clip_ops.c
@@ -1219,8 +1219,8 @@ static void do_movie_proxy(void *pjv,
int UNUSED(build_count),
int *build_undistort_sizes,
int build_undistort_count,
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress)
{
ProxyJob *pj = pjv;
@@ -1285,8 +1285,8 @@ typedef struct ProxyQueue {
int efra;
SpinLock spin;
- const short *stop;
- short *do_update;
+ const bool *stop;
+ bool *do_update;
float *progress;
} ProxyQueue;
@@ -1343,7 +1343,7 @@ static uchar *proxy_thread_next_frame(ProxyQueue *queue,
queue->cfra++;
close(file);
- *queue->do_update = 1;
+ *queue->do_update = true;
*queue->progress = (float)(queue->cfra - queue->sfra) / (queue->efra - queue->sfra);
}
BLI_spin_unlock(&queue->spin);
@@ -1392,8 +1392,8 @@ static void do_sequence_proxy(void *pjv,
int build_undistort_count,
/* Cannot be const, because it is assigned to a non-const variable.
* NOLINTNEXTLINE: readability-non-const-parameter. */
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress)
{
ProxyJob *pj = pjv;
@@ -1452,7 +1452,7 @@ static void do_sequence_proxy(void *pjv,
MEM_freeN(handles);
}
-static void proxy_startjob(void *pjv, short *stop, short *do_update, float *progress)
+static void proxy_startjob(void *pjv, bool *stop, bool *do_update, float *progress)
{
ProxyJob *pj = pjv;
MovieClip *clip = pj->clip;
diff --git a/source/blender/editors/space_clip/tracking_ops_solve.c b/source/blender/editors/space_clip/tracking_ops_solve.c
index bfa45053e96..ddfcaa282e3 100644
--- a/source/blender/editors/space_clip/tracking_ops_solve.c
+++ b/source/blender/editors/space_clip/tracking_ops_solve.c
@@ -87,7 +87,7 @@ static void solve_camera_updatejob(void *scv)
BLI_strncpy(tracking->stats->message, scj->stats_message, sizeof(tracking->stats->message));
}
-static void solve_camera_startjob(void *scv, short *stop, short *do_update, float *progress)
+static void solve_camera_startjob(void *scv, bool *stop, bool *do_update, float *progress)
{
SolveCameraJob *scj = (SolveCameraJob *)scv;
BKE_tracking_reconstruction_solve(
diff --git a/source/blender/editors/space_clip/tracking_ops_track.c b/source/blender/editors/space_clip/tracking_ops_track.c
index f6fd2980c19..2753af609e7 100644
--- a/source/blender/editors/space_clip/tracking_ops_track.c
+++ b/source/blender/editors/space_clip/tracking_ops_track.c
@@ -204,8 +204,8 @@ static void track_markers_startjob(
void *tmv,
/* Cannot be const, this function implements wm_jobs_start_callback.
* NOLINTNEXTLINE: readability-non-const-parameter. */
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress)
{
TrackMarkersJob *tmj = (TrackMarkersJob *)tmv;
@@ -353,7 +353,7 @@ static int track_markers(bContext *C, wmOperator *op, bool use_job)
return OPERATOR_RUNNING_MODAL;
}
- short stop = 0, do_update = 0;
+ bool stop = false, do_update = false;
float progress = 0.0f;
track_markers_startjob(tmj, &stop, &do_update, &progress);
track_markers_endjob(tmj);
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index f68d329329f..6d7365fa136 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -1309,6 +1309,18 @@ static int bookmark_move_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
+static bool file_bookmark_move_poll(bContext *C)
+{
+ SpaceFile *sfile = CTX_wm_space_file(C);
+
+ /* Bookmarks are for file browsing only (not asset browsing). */
+ if (!ED_operator_file_browsing_active(C)) {
+ return false;
+ }
+
+ return sfile->bookmarknr != -1;
+}
+
void FILE_OT_bookmark_move(wmOperatorType *ot)
{
static const EnumPropertyItem slot_move[] = {
@@ -1325,8 +1337,7 @@ void FILE_OT_bookmark_move(wmOperatorType *ot)
/* api callbacks */
ot->exec = bookmark_move_exec;
- /* Bookmarks are for file browsing only (not asset browsing). */
- ot->poll = ED_operator_file_browsing_active;
+ ot->poll = file_bookmark_move_poll;
/* flags */
ot->flag = OPTYPE_REGISTER; /* No undo! */
diff --git a/source/blender/editors/space_file/filelist.cc b/source/blender/editors/space_file/filelist.cc
index 3257534f94d..9ca5b1da7da 100644
--- a/source/blender/editors/space_file/filelist.cc
+++ b/source/blender/editors/space_file/filelist.cc
@@ -31,6 +31,7 @@
#include "BLI_linklist.h"
#include "BLI_math.h"
#include "BLI_stack.h"
+#include "BLI_string_utils.h"
#include "BLI_task.h"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
@@ -245,7 +246,7 @@ struct FileList {
bool (*check_dir_fn)(struct FileList *, char *, const bool);
/* Fill filelist (to be called by read job). */
- void (*read_job_fn)(struct FileListReadJob *, short *, short *, float *);
+ void (*read_job_fn)(struct FileListReadJob *, bool *, bool *, float *);
/* Filter an entry of current filelist. */
bool (*filter_fn)(struct FileListInternEntry *, const char *, FileListFilter *);
@@ -294,24 +295,24 @@ enum {
static ImBuf *gSpecialFileImages[SPECIAL_IMG_MAX];
static void filelist_readjob_main(FileListReadJob *job_params,
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress);
static void filelist_readjob_lib(FileListReadJob *job_params,
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress);
static void filelist_readjob_dir(FileListReadJob *job_params,
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress);
static void filelist_readjob_asset_library(FileListReadJob *job_params,
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress);
static void filelist_readjob_main_assets(FileListReadJob *job_params,
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress);
/* helper, could probably go in BKE actually? */
@@ -3400,7 +3401,7 @@ struct FileListReadJob {
static void filelist_readjob_append_entries(FileListReadJob *job_params,
ListBase *from_entries,
int from_entries_num,
- short *do_update)
+ bool *do_update)
{
BLI_assert(BLI_listbase_count(from_entries) == from_entries_num);
if (from_entries_num <= 0) {
@@ -3455,8 +3456,8 @@ static bool filelist_readjob_should_recurse_into_entry(const int max_recursion,
static void filelist_readjob_recursive_dir_add_items(const bool do_lib,
FileListReadJob *job_params,
- const short *stop,
- short *do_update,
+ const bool *stop,
+ bool *do_update,
float *progress)
{
FileList *filelist = job_params->tmp_filelist; /* Use the thread-safe filelist queue. */
@@ -3542,9 +3543,10 @@ static void filelist_readjob_recursive_dir_add_items(const bool do_lib,
LISTBASE_FOREACH (FileListInternEntry *, entry, &entries) {
entry->uid = filelist_uid_generate(filelist);
- /* When loading entries recursive, the rel_path should be relative from the root dir.
- * we combine the relative path to the subdir with the relative path of the entry. */
- BLI_path_join(dir, sizeof(dir), rel_subdir, entry->relpath);
+ /* When loading entries recursive, the `rel_path` should be relative from the root dir.
+ * we combine the relative path to the `subdir` with the relative path of the entry.
+ * Using #BLI_path_join works but isn't needed as `rel_subdir` has a trailing slash. */
+ BLI_string_join(dir, sizeof(dir), rel_subdir, entry->relpath);
MEM_freeN(entry->relpath);
entry->relpath = BLI_strdup(dir + 2); /* + 2 to remove '//'
* added by BLI_path_rel to rel_subdir. */
@@ -3553,8 +3555,9 @@ static void filelist_readjob_recursive_dir_add_items(const bool do_lib,
if (filelist_readjob_should_recurse_into_entry(
max_recursion, is_lib, recursion_level, entry)) {
- /* We have a directory we want to list, add it to todo list! */
- BLI_path_join(dir, sizeof(dir), root, entry->relpath);
+ /* We have a directory we want to list, add it to todo list!
+ * Using #BLI_path_join works but isn't needed as `root` has a trailing slash. */
+ BLI_string_join(dir, sizeof(dir), root, entry->relpath);
BLI_path_normalize_dir(job_params->main_name, dir, sizeof(dir));
td_dir = static_cast<TodoDir *>(BLI_stack_push_r(todo_dirs));
td_dir->level = recursion_level + 1;
@@ -3591,8 +3594,8 @@ static void filelist_readjob_recursive_dir_add_items(const bool do_lib,
static void filelist_readjob_do(const bool do_lib,
FileListReadJob *job_params,
- const short *stop,
- short *do_update,
+ const bool *stop,
+ bool *do_update,
float *progress)
{
FileList *filelist = job_params->tmp_filelist; /* Use the thread-safe filelist queue. */
@@ -3608,16 +3611,16 @@ static void filelist_readjob_do(const bool do_lib,
}
static void filelist_readjob_dir(FileListReadJob *job_params,
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress)
{
filelist_readjob_do(false, job_params, stop, do_update, progress);
}
static void filelist_readjob_lib(FileListReadJob *job_params,
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress)
{
filelist_readjob_do(true, job_params, stop, do_update, progress);
@@ -3640,7 +3643,7 @@ static void filelist_asset_library_path(const FileListReadJob *job_params,
/**
* Load asset library data, which currently means loading the asset catalogs for the library.
*/
-static void filelist_readjob_load_asset_library_data(FileListReadJob *job_params, short *do_update)
+static void filelist_readjob_load_asset_library_data(FileListReadJob *job_params, bool *do_update)
{
FileList *tmp_filelist = job_params->tmp_filelist; /* Use the thread-safe filelist queue. */
@@ -3664,8 +3667,8 @@ static void filelist_readjob_load_asset_library_data(FileListReadJob *job_params
}
static void filelist_readjob_main_assets_add_items(FileListReadJob *job_params,
- short * /*stop*/,
- short *do_update,
+ bool * /*stop*/,
+ bool *do_update,
float * /*progress*/)
{
FileList *filelist = job_params->tmp_filelist; /* Use the thread-safe filelist queue. */
@@ -3726,8 +3729,8 @@ static bool filelist_contains_main(const FileList *filelist, const Main *bmain)
}
static void filelist_readjob_asset_library(FileListReadJob *job_params,
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress)
{
FileList *filelist = job_params->tmp_filelist; /* Use the thread-safe filelist queue. */
@@ -3750,8 +3753,8 @@ static void filelist_readjob_asset_library(FileListReadJob *job_params,
}
static void filelist_readjob_main(FileListReadJob *job_params,
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress)
{
/* TODO! */
@@ -3759,8 +3762,8 @@ static void filelist_readjob_main(FileListReadJob *job_params,
}
static void filelist_readjob_main_assets(FileListReadJob *job_params,
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress)
{
FileList *filelist = job_params->tmp_filelist; /* Use the thread-safe filelist queue. */
@@ -3788,7 +3791,7 @@ static bool filelist_readjob_is_partial_read(const FileListReadJob *read_job)
* some current entries are kept and we just call the readjob to update the main files (see
* #FileListReadJob.only_main_data).
*/
-static void filelist_readjob_startjob(void *flrjv, short *stop, short *do_update, float *progress)
+static void filelist_readjob_startjob(void *flrjv, bool *stop, bool *do_update, float *progress)
{
FileListReadJob *flrj = static_cast<FileListReadJob *>(flrjv);
@@ -3936,8 +3939,8 @@ void filelist_readjob_start(FileList *filelist, const int space_notifier, const
const bool no_threads = (filelist->tags & FILELIST_TAGS_NO_THREADS) || flrj->only_main_data;
if (no_threads) {
- short dummy_stop = false;
- short dummy_do_update = false;
+ bool dummy_stop = false;
+ bool dummy_do_update = false;
float dummy_progress = 0.0f;
/* Single threaded execution. Just directly call the callbacks. */
diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c
index cea53908d4f..959f8b01ec8 100644
--- a/source/blender/editors/space_file/fsmenu.c
+++ b/source/blender/editors/space_file/fsmenu.c
@@ -1147,8 +1147,8 @@ static void fsmenu_bookmark_validate_job_startjob(
void *fsmenuv,
/* Cannot be const, this function implements wm_jobs_start_callback.
* NOLINTNEXTLINE: readability-non-const-parameter. */
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *UNUSED(progress))
{
FSMenu *fsmenu = fsmenuv;
diff --git a/source/blender/editors/space_node/CMakeLists.txt b/source/blender/editors/space_node/CMakeLists.txt
index d7eccbf0b68..ff9e5352d0a 100644
--- a/source/blender/editors/space_node/CMakeLists.txt
+++ b/source/blender/editors/space_node/CMakeLists.txt
@@ -29,6 +29,7 @@ set(INC
set(SRC
add_node_search.cc
+ add_menu_assets.cc
drawnode.cc
link_drag_search.cc
node_add.cc
diff --git a/source/blender/editors/space_node/add_menu_assets.cc b/source/blender/editors/space_node/add_menu_assets.cc
new file mode 100644
index 00000000000..5458a25d74a
--- /dev/null
+++ b/source/blender/editors/space_node/add_menu_assets.cc
@@ -0,0 +1,317 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include "BLI_multi_value_map.hh"
+
+#include "DNA_screen_types.h"
+#include "DNA_space_types.h"
+
+#include "BKE_asset.h"
+#include "BKE_asset_catalog.hh"
+#include "BKE_asset_library.hh"
+#include "BKE_idprop.h"
+#include "BKE_screen.h"
+
+#include "BLT_translation.h"
+
+#include "RNA_access.h"
+#include "RNA_prototypes.h"
+
+#include "ED_asset.h"
+#include "ED_screen.h"
+
+#include "node_intern.hh"
+
+namespace blender::ed::space_node {
+
+static bool node_add_menu_poll(const bContext *C, MenuType * /*mt*/)
+{
+ return CTX_wm_space_node(C);
+}
+
+static void node_add_menu_assets_listen_fn(const wmRegionListenerParams *params)
+{
+ const wmNotifier *wmn = params->notifier;
+ ARegion *region = params->region;
+
+ switch (wmn->category) {
+ case NC_ASSET:
+ if (wmn->data == ND_ASSET_LIST_READING) {
+ ED_region_tag_refresh_ui(region);
+ }
+ break;
+ }
+}
+
+struct LibraryAsset {
+ AssetLibraryReference library_ref;
+ AssetHandle handle;
+};
+
+struct LibraryCatalog {
+ bke::AssetLibrary *library;
+ const bke::AssetCatalog *catalog;
+};
+
+struct AssetItemTree {
+ bke::AssetCatalogTree catalogs;
+ MultiValueMap<bke::AssetCatalogPath, LibraryAsset> assets_per_path;
+ Map<const bke::AssetCatalogTreeItem *, bke::AssetCatalogPath> full_catalog_per_tree_item;
+};
+
+static bool all_loading_finished()
+{
+ for (const AssetLibraryReference &library : bke::all_valid_asset_library_refs()) {
+ if (!ED_assetlist_is_loaded(&library)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+static AssetItemTree build_catalog_tree(const bContext &C, const bNodeTree *node_tree)
+{
+ if (!node_tree) {
+ return {};
+ }
+ const Main &bmain = *CTX_data_main(&C);
+ const Vector<AssetLibraryReference> all_libraries = bke::all_valid_asset_library_refs();
+
+ /* Merge catalogs from all libraries to deduplicate menu items. Also store the catalog and
+ * library for each asset ID in order to use them later when retrieving assets and removing
+ * empty catalogs. */
+ Map<bke::CatalogID, LibraryCatalog> id_to_catalog_map;
+ bke::AssetCatalogTree catalogs_from_all_libraries;
+ for (const AssetLibraryReference &library_ref : all_libraries) {
+ if (bke::AssetLibrary *library = BKE_asset_library_load(&bmain, library_ref)) {
+ if (bke::AssetCatalogTree *tree = library->catalog_service->get_catalog_tree()) {
+ tree->foreach_item([&](bke::AssetCatalogTreeItem &item) {
+ const bke::CatalogID &id = item.get_catalog_id();
+ bke::AssetCatalog *catalog = library->catalog_service->find_catalog(id);
+ catalogs_from_all_libraries.insert_item(*catalog);
+ id_to_catalog_map.add(item.get_catalog_id(), LibraryCatalog{library, catalog});
+ });
+ }
+ }
+ }
+
+ /* Find all the matching node group assets for every catalog path. */
+ MultiValueMap<bke::AssetCatalogPath, LibraryAsset> assets_per_path;
+ for (const AssetLibraryReference &library_ref : all_libraries) {
+ AssetFilterSettings type_filter{};
+ type_filter.id_types = FILTER_ID_NT;
+
+ ED_assetlist_storage_fetch(&library_ref, &C);
+ ED_assetlist_ensure_previews_job(&library_ref, &C);
+ ED_assetlist_iterate(library_ref, [&](AssetHandle asset) {
+ if (!ED_asset_filter_matches_asset(&type_filter, &asset)) {
+ return true;
+ }
+ const AssetMetaData &meta_data = *ED_asset_handle_get_metadata(&asset);
+ const IDProperty *tree_type = BKE_asset_metadata_idprop_find(&meta_data, "type");
+ if (tree_type == nullptr || IDP_Int(tree_type) != node_tree->type) {
+ return true;
+ }
+ if (BLI_uuid_is_nil(meta_data.catalog_id)) {
+ return true;
+ }
+ const LibraryCatalog *library_catalog = id_to_catalog_map.lookup_ptr(meta_data.catalog_id);
+ if (library_catalog == nullptr) {
+ return true;
+ }
+ assets_per_path.add(library_catalog->catalog->path, LibraryAsset{library_ref, asset});
+ return true;
+ });
+ }
+
+ /* Build the final tree without any of the catalogs that don't have proper node group assets. */
+ bke::AssetCatalogTree catalogs_with_node_assets;
+ catalogs_from_all_libraries.foreach_item([&](bke::AssetCatalogTreeItem &item) {
+ if (!assets_per_path.lookup(item.catalog_path()).is_empty()) {
+ const bke::CatalogID &id = item.get_catalog_id();
+ const LibraryCatalog &library_catalog = id_to_catalog_map.lookup(id);
+ bke::AssetCatalog *catalog = library_catalog.library->catalog_service->find_catalog(id);
+ catalogs_with_node_assets.insert_item(*catalog);
+ }
+ });
+
+ /* Build another map storing full asset paths for each tree item, in order to have stable
+ * pointers to asset catalog paths to use for context pointers. This is necessary because
+ * #bke::AssetCatalogTreeItem doesn't store its full path directly. */
+ Map<const bke::AssetCatalogTreeItem *, bke::AssetCatalogPath> full_catalog_per_tree_item;
+ catalogs_with_node_assets.foreach_item([&](bke::AssetCatalogTreeItem &item) {
+ full_catalog_per_tree_item.add_new(&item, item.catalog_path());
+ });
+
+ return {std::move(catalogs_with_node_assets),
+ std::move(assets_per_path),
+ std::move(full_catalog_per_tree_item)};
+}
+
+static void node_add_catalog_assets_draw(const bContext *C, Menu *menu)
+{
+ bScreen &screen = *CTX_wm_screen(C);
+ const SpaceNode &snode = *CTX_wm_space_node(C);
+ if (!snode.runtime->assets_for_menu) {
+ BLI_assert_unreachable();
+ return;
+ }
+ AssetItemTree &tree = *snode.runtime->assets_for_menu;
+ const bNodeTree *edit_tree = snode.edittree;
+ if (!edit_tree) {
+ return;
+ }
+
+ const PointerRNA menu_path_ptr = CTX_data_pointer_get(C, "asset_catalog_path");
+ if (RNA_pointer_is_null(&menu_path_ptr)) {
+ return;
+ }
+ const bke::AssetCatalogPath &menu_path = *static_cast<const bke::AssetCatalogPath *>(
+ menu_path_ptr.data);
+
+ const Span<LibraryAsset> asset_items = tree.assets_per_path.lookup(menu_path);
+ bke::AssetCatalogTreeItem *catalog_item = tree.catalogs.find_item(menu_path);
+ BLI_assert(catalog_item != nullptr);
+
+ if (asset_items.is_empty() && !catalog_item->has_children()) {
+ return;
+ }
+
+ uiLayout *layout = menu->layout;
+ uiItemS(layout);
+
+ for (const LibraryAsset &item : asset_items) {
+ uiLayout *col = uiLayoutColumn(layout, false);
+ PointerRNA file{
+ &screen.id, &RNA_FileSelectEntry, const_cast<FileDirEntry *>(item.handle.file_data)};
+ uiLayoutSetContextPointer(col, "active_file", &file);
+
+ PointerRNA library_ptr{&screen.id,
+ &RNA_AssetLibraryReference,
+ const_cast<AssetLibraryReference *>(&item.library_ref)};
+ uiLayoutSetContextPointer(col, "asset_library_ref", &library_ptr);
+
+ uiItemO(col, ED_asset_handle_get_name(&item.handle), ICON_NONE, "NODE_OT_add_group_asset");
+ }
+
+ catalog_item->foreach_child([&](bke::AssetCatalogTreeItem &child_item) {
+ const bke::AssetCatalogPath &path = tree.full_catalog_per_tree_item.lookup(&child_item);
+ PointerRNA path_ptr{
+ &screen.id, &RNA_AssetCatalogPath, const_cast<bke::AssetCatalogPath *>(&path)};
+ uiLayout *col = uiLayoutColumn(layout, false);
+ uiLayoutSetContextPointer(col, "asset_catalog_path", &path_ptr);
+ uiItemM(col, "NODE_MT_node_add_catalog_assets", path.name().c_str(), ICON_NONE);
+ });
+}
+
+static void add_root_catalogs_draw(const bContext *C, Menu *menu)
+{
+ bScreen &screen = *CTX_wm_screen(C);
+ SpaceNode &snode = *CTX_wm_space_node(C);
+ const bNodeTree *edit_tree = snode.edittree;
+ uiLayout *layout = menu->layout;
+
+ snode.runtime->assets_for_menu = std::make_shared<AssetItemTree>(
+ build_catalog_tree(*C, edit_tree));
+
+ const bool loading_finished = all_loading_finished();
+
+ AssetItemTree &tree = *snode.runtime->assets_for_menu;
+ if (tree.catalogs.is_empty() && loading_finished) {
+ return;
+ }
+
+ uiItemS(layout);
+
+ if (!loading_finished) {
+ uiItemL(layout, IFACE_("Loading Asset Libraries"), ICON_INFO);
+ }
+
+ /* Avoid adding a separate root catalog when the assets have already been added to one of the
+ * builtin menus.
+ * TODO: The need to define the builtin menu labels here is completely non-ideal. We don't have
+ * any UI introspection that can do this though. This can be solved in the near future by
+ * removing the need to define the add menu completely, instead using a per-node-type path which
+ * can be merged with catalog tree.
+ */
+ static Set<std::string> all_builtin_menus = []() {
+ Set<std::string> menus;
+ menus.add_new("Attribute");
+ menus.add_new("Color");
+ menus.add_new("Curve");
+ menus.add_new("Curve Primitives");
+ menus.add_new("Curve Topology");
+ menus.add_new("Geometry");
+ menus.add_new("Input");
+ menus.add_new("Instances");
+ menus.add_new("Material");
+ menus.add_new("Mesh");
+ menus.add_new("Mesh Primitives");
+ menus.add_new("Mesh Topology");
+ menus.add_new("Output");
+ menus.add_new("Point");
+ menus.add_new("Text");
+ menus.add_new("Texture");
+ menus.add_new("Utilities");
+ menus.add_new("UV");
+ menus.add_new("Vector");
+ menus.add_new("Volume");
+ menus.add_new("Group");
+ menus.add_new("Layout");
+ return menus;
+ }();
+
+ tree.catalogs.foreach_root_item([&](bke::AssetCatalogTreeItem &item) {
+ if (all_builtin_menus.contains(item.get_name())) {
+ return;
+ }
+ const bke::AssetCatalogPath &path = tree.full_catalog_per_tree_item.lookup(&item);
+ PointerRNA path_ptr{
+ &screen.id, &RNA_AssetCatalogPath, const_cast<bke::AssetCatalogPath *>(&path)};
+ uiLayout *col = uiLayoutColumn(layout, false);
+ uiLayoutSetContextPointer(col, "asset_catalog_path", &path_ptr);
+ uiItemM(col, "NODE_MT_node_add_catalog_assets", path.name().c_str(), ICON_NONE);
+ });
+}
+
+MenuType add_catalog_assets_menu_type()
+{
+ MenuType type{};
+ BLI_strncpy(type.idname, "NODE_MT_node_add_catalog_assets", sizeof(type.idname));
+ type.poll = node_add_menu_poll;
+ type.draw = node_add_catalog_assets_draw;
+ type.listener = node_add_menu_assets_listen_fn;
+ return type;
+}
+
+MenuType add_root_catalogs_menu_type()
+{
+ MenuType type{};
+ BLI_strncpy(type.idname, "NODE_MT_node_add_root_catalogs", sizeof(type.idname));
+ type.poll = node_add_menu_poll;
+ type.draw = add_root_catalogs_draw;
+ type.listener = node_add_menu_assets_listen_fn;
+ return type;
+}
+
+} // namespace blender::ed::space_node
+
+/* Note: This is only necessary because Python can't set an asset catalog path context item. */
+void uiTemplateNodeAssetMenuItems(uiLayout *layout, bContext *C, const char *catalog_path)
+{
+ using namespace blender;
+ using namespace blender::ed::space_node;
+ bScreen &screen = *CTX_wm_screen(C);
+ SpaceNode &snode = *CTX_wm_space_node(C);
+ AssetItemTree &tree = *snode.runtime->assets_for_menu;
+ const bke::AssetCatalogTreeItem *item = tree.catalogs.find_root_item(catalog_path);
+ if (!item) {
+ return;
+ }
+ const bke::AssetCatalogPath &path = tree.full_catalog_per_tree_item.lookup(item);
+ PointerRNA path_ptr{
+ &screen.id, &RNA_AssetCatalogPath, const_cast<bke::AssetCatalogPath *>(&path)};
+ uiItemS(layout);
+ uiLayout *col = uiLayoutColumn(layout, false);
+ uiLayoutSetContextPointer(col, "asset_catalog_path", &path_ptr);
+ uiItemMContents(col, "NODE_MT_node_add_catalog_assets");
+}
diff --git a/source/blender/editors/space_node/node_add.cc b/source/blender/editors/space_node/node_add.cc
index 07eecff320a..41f70a6d8cf 100644
--- a/source/blender/editors/space_node/node_add.cc
+++ b/source/blender/editors/space_node/node_add.cc
@@ -30,6 +30,7 @@
#include "DEG_depsgraph_build.h"
+#include "ED_asset.h"
#include "ED_node.h" /* own include */
#include "ED_render.h"
#include "ED_screen.h"
@@ -244,38 +245,36 @@ void NODE_OT_add_reroute(wmOperatorType *ot)
/** \name Add Node Group Operator
* \{ */
-static bNodeTree *node_add_group_get_and_poll_group_node_tree(Main *bmain,
- wmOperator *op,
- bNodeTree *ntree)
+static bool node_group_add_poll(const bNodeTree &node_tree,
+ const bNodeTree &node_group,
+ ReportList &reports)
{
- bNodeTree *node_group = reinterpret_cast<bNodeTree *>(
- WM_operator_properties_id_lookup_from_name_or_session_uuid(bmain, op->ptr, ID_NT));
- if (!node_group) {
- return nullptr;
+ if (node_group.type != node_tree.type) {
+ return false;
}
const char *disabled_hint = nullptr;
- if ((node_group->type != ntree->type) || !nodeGroupPoll(ntree, node_group, &disabled_hint)) {
+ if (!nodeGroupPoll(&node_tree, &node_group, &disabled_hint)) {
if (disabled_hint) {
- BKE_reportf(op->reports,
+ BKE_reportf(&reports,
RPT_ERROR,
"Can not add node group '%s' to '%s':\n %s",
- node_group->id.name + 2,
- ntree->id.name + 2,
+ node_group.id.name + 2,
+ node_tree.id.name + 2,
disabled_hint);
}
else {
- BKE_reportf(op->reports,
+ BKE_reportf(&reports,
RPT_ERROR,
"Can not add node group '%s' to '%s'",
- node_group->id.name + 2,
- ntree->id.name + 2);
+ node_group.id.name + 2,
+ node_tree.id.name + 2);
}
- return nullptr;
+ return false;
}
- return node_group;
+ return true;
}
static int node_add_group_exec(bContext *C, wmOperator *op)
@@ -284,10 +283,14 @@ static int node_add_group_exec(bContext *C, wmOperator *op)
SpaceNode *snode = CTX_wm_space_node(C);
bNodeTree *ntree = snode->edittree;
- bNodeTree *node_group = node_add_group_get_and_poll_group_node_tree(bmain, op, ntree);
+ bNodeTree *node_group = reinterpret_cast<bNodeTree *>(
+ WM_operator_properties_id_lookup_from_name_or_session_uuid(bmain, op->ptr, ID_NT));
if (!node_group) {
return OPERATOR_CANCELLED;
}
+ if (!node_group_add_poll(*ntree, *node_group, *op->reports)) {
+ return OPERATOR_CANCELLED;
+ }
ED_preview_kill_jobs(CTX_wm_manager(C), CTX_data_main(C));
@@ -320,9 +323,8 @@ static bool node_add_group_poll(bContext *C)
}
const SpaceNode *snode = CTX_wm_space_node(C);
if (snode->edittree->type == NTREE_CUSTOM) {
- CTX_wm_operator_poll_msg_set(C,
- "This node editor displays a custom (Python defined) node tree. "
- "Dropping node groups isn't supported for this");
+ CTX_wm_operator_poll_msg_set(
+ C, "Adding node groups isn't supported for custom (Python defined) node trees");
return false;
}
return true;
@@ -367,6 +369,105 @@ void NODE_OT_add_group(wmOperatorType *ot)
/** \} */
/* -------------------------------------------------------------------- */
+/** \name Add Node Group Asset Operator
+ * \{ */
+
+static bool add_node_group_asset(const bContext &C,
+ const AssetLibraryReference &library_ref,
+ const AssetHandle asset,
+ ReportList &reports)
+{
+ Main &bmain = *CTX_data_main(&C);
+ SpaceNode &snode = *CTX_wm_space_node(&C);
+ bNodeTree &edit_tree = *snode.edittree;
+
+ bNodeTree *node_group = reinterpret_cast<bNodeTree *>(
+ asset::get_local_id_from_asset_or_append_and_reuse(bmain, library_ref, asset));
+ if (!node_group) {
+ return false;
+ }
+ if (!node_group_add_poll(edit_tree, *node_group, reports)) {
+ /* Remove the node group if it was newly appended but can't be added to the tree. */
+ id_us_plus(&node_group->id);
+ BKE_id_free_us(&bmain, node_group);
+ return false;
+ }
+
+ ED_preview_kill_jobs(CTX_wm_manager(&C), CTX_data_main(&C));
+
+ bNode *group_node = add_node(
+ C, ntreeTypeFind(node_group->idname)->group_idname, snode.runtime->cursor);
+ if (!group_node) {
+ BKE_report(&reports, RPT_WARNING, "Could not add node group");
+ return false;
+ }
+ /* By default, don't show the data-block selector since it's not usually necessary for assets. */
+ group_node->flag &= ~NODE_OPTIONS;
+
+ group_node->id = &node_group->id;
+ id_us_plus(group_node->id);
+ BKE_ntree_update_tag_node_property(&edit_tree, group_node);
+
+ nodeSetActive(&edit_tree, group_node);
+ ED_node_tree_propagate_change(&C, &bmain, nullptr);
+ DEG_relations_tag_update(&bmain);
+
+ return true;
+}
+
+static int node_add_group_asset_invoke(bContext *C, wmOperator *op, const wmEvent *event)
+{
+ ARegion &region = *CTX_wm_region(C);
+ SpaceNode &snode = *CTX_wm_space_node(C);
+
+ const AssetLibraryReference *library_ref = CTX_wm_asset_library_ref(C);
+ if (!library_ref) {
+ return OPERATOR_CANCELLED;
+ }
+ bool is_valid;
+ const AssetHandle handle = CTX_wm_asset_handle(C, &is_valid);
+ if (!is_valid) {
+ return OPERATOR_CANCELLED;
+ }
+
+ /* Convert mouse coordinates to v2d space. */
+ UI_view2d_region_to_view(&region.v2d,
+ event->mval[0],
+ event->mval[1],
+ &snode.runtime->cursor[0],
+ &snode.runtime->cursor[1]);
+
+ snode.runtime->cursor /= UI_DPI_FAC;
+
+ if (!add_node_group_asset(*C, *library_ref, handle, *op->reports)) {
+ return OPERATOR_CANCELLED;
+ }
+
+ wmOperatorType *ot = WM_operatortype_find("NODE_OT_translate_attach_remove_on_cancel", true);
+ BLI_assert(ot);
+ PointerRNA ptr;
+ WM_operator_properties_create_ptr(&ptr, ot);
+ WM_operator_name_call_ptr(C, ot, WM_OP_INVOKE_DEFAULT, &ptr, nullptr);
+ WM_operator_properties_free(&ptr);
+
+ return OPERATOR_FINISHED;
+}
+
+void NODE_OT_add_group_asset(wmOperatorType *ot)
+{
+ ot->name = "Add Node Group Asset";
+ ot->description = "Add a node group asset to the active node tree";
+ ot->idname = "NODE_OT_add_group_asset";
+
+ ot->invoke = node_add_group_asset_invoke;
+ ot->poll = node_add_group_poll;
+
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
+}
+
+/** \} */
+
+/* -------------------------------------------------------------------- */
/** \name Add Node Object Operator
* \{ */
@@ -393,7 +494,7 @@ static int node_add_object_exec(bContext *C, wmOperator *op)
bNodeSocket *sock = nodeFindSocket(object_node, SOCK_IN, "Object");
if (!sock) {
- BKE_report(op->reports, RPT_WARNING, "Could not find node object socket");
+ BLI_assert_unreachable();
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/space_node/node_edit.cc b/source/blender/editors/space_node/node_edit.cc
index 48b3d711bdf..e6eba45d45e 100644
--- a/source/blender/editors/space_node/node_edit.cc
+++ b/source/blender/editors/space_node/node_edit.cc
@@ -89,8 +89,8 @@ struct CompoJob {
Depsgraph *compositor_depsgraph;
bNodeTree *localtree;
/* Jon system integration. */
- const short *stop;
- short *do_update;
+ const bool *stop;
+ bool *do_update;
float *progress;
};
@@ -166,7 +166,7 @@ static int compo_get_recalc_flags(const bContext *C)
}
/* called by compo, only to check job 'stop' value */
-static int compo_breakjob(void *cjv)
+static bool compo_breakjob(void *cjv)
{
CompoJob *cj = (CompoJob *)cjv;
@@ -250,8 +250,8 @@ static void compo_progressjob(void *cjv, float progress)
static void compo_startjob(void *cjv,
/* Cannot be const, this function implements wm_jobs_start_callback.
* NOLINTNEXTLINE: readability-non-const-parameter. */
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress)
{
CompoJob *cj = (CompoJob *)cjv;
diff --git a/source/blender/editors/space_node/node_group.cc b/source/blender/editors/space_node/node_group.cc
index aedceb1d368..329f78860a4 100644
--- a/source/blender/editors/space_node/node_group.cc
+++ b/source/blender/editors/space_node/node_group.cc
@@ -14,6 +14,7 @@
#include "BLI_linklist.h"
#include "BLI_listbase.h"
+#include "BLI_map.hh"
#include "BLI_math_vec_types.hh"
#include "BLI_string.h"
#include "BLI_vector.hh"
@@ -735,6 +736,74 @@ static int node_get_selected_minmax(
return totselect;
}
+/**
+ * Redirect a link that are connecting a non-selected node to selected one.
+ * Create new socket or reuse an existing one that was connected from the same input.
+ * The output sockets of group nodes usually have consciously given names so they have
+ * precedence over socket names the link points to.
+ *
+ * \param ntree: The node tree that the node group is being created from.
+ * \param ngroup: The node tree of the new node group.
+ * \param gnode: The new group node in the original tree.
+ * \param input_node: The input node of the new node group.
+ * \param link: The incoming link that needs to be altered.
+ * \param reusable_sockets: Map for input socket interface lookup.
+ */
+static void node_group_make_redirect_incoming_link(
+ bNodeTree &ntree,
+ bNodeTree *ngroup,
+ bNode *gnode,
+ bNode *input_node,
+ bNodeLink *link,
+ Map<bNodeSocket *, bNodeSocket *> &reusable_sockets)
+{
+ bNodeSocket *input_socket = reusable_sockets.lookup_default(link->fromsock, nullptr);
+ if (input_socket) {
+ /* The incoming link is from a socket that has already been linked to
+ * a socket interface of the input node.
+ * Change the source of the link to the previously created socket interface.
+ * Move the link into the node tree of the new group. */
+ link->fromnode = input_node;
+ link->fromsock = input_socket;
+ BLI_remlink(&ntree.links, link);
+ BLI_addtail(&ngroup->links, link);
+ }
+ else {
+ bNode *node_for_typeinfo = nullptr;
+ bNodeSocket *socket_for_typeinfo = nullptr;
+ /* Find a socket where typeinfo and name may come from. */
+ node_socket_skip_reroutes(
+ &ntree.links, link->tonode, link->tosock, &node_for_typeinfo, &socket_for_typeinfo);
+ bNodeSocket *socket_for_naming = socket_for_typeinfo;
+
+ /* Use the name of group node output sockets. */
+ if (ELEM(link->fromnode->type, NODE_GROUP_INPUT, NODE_GROUP, NODE_CUSTOM_GROUP)) {
+ socket_for_naming = link->fromsock;
+ }
+
+ bNodeSocket *iosock = ntreeAddSocketInterfaceFromSocketWithName(ngroup,
+ node_for_typeinfo,
+ socket_for_typeinfo,
+ socket_for_naming->idname,
+ socket_for_naming->name);
+
+ /* Update the group node and interface sockets so the new interface socket can be linked. */
+ node_group_update(&ntree, gnode);
+ node_group_input_update(ngroup, input_node);
+
+ /* Create new internal link. */
+ bNodeSocket *input_sock = node_group_input_find_socket(input_node, iosock->identifier);
+ nodeAddLink(ngroup, input_node, input_sock, link->tonode, link->tosock);
+
+ /* Redirect external link. */
+ link->tonode = gnode;
+ link->tosock = node_group_find_input_socket(gnode, iosock->identifier);
+
+ /* Remember which interface socket the link has been redirected to. */
+ reusable_sockets.add_new(link->fromsock, input_sock);
+ }
+}
+
static void node_group_make_insert_selected(const bContext &C, bNodeTree &ntree, bNode *gnode)
{
Main *bmain = CTX_data_main(&C);
@@ -834,6 +903,10 @@ static void node_group_make_insert_selected(const bContext &C, bNodeTree &ntree,
output_node->locy = -offsety;
/* relink external sockets */
+
+ /* A map from link sources to input sockets already connected. */
+ Map<bNodeSocket *, bNodeSocket *> reusable_sockets;
+
LISTBASE_FOREACH_MUTABLE (bNodeLink *, link, &ntree.links) {
const bool fromselect = node_group_make_use_node(*link->fromnode, gnode);
const bool toselect = node_group_make_use_node(*link->tonode, gnode);
@@ -851,24 +924,8 @@ static void node_group_make_insert_selected(const bContext &C, bNodeTree &ntree,
continue;
}
- bNodeSocket *link_sock;
- bNode *link_node;
- node_socket_skip_reroutes(&ntree.links, link->tonode, link->tosock, &link_node, &link_sock);
- bNodeSocket *iosock = ntreeAddSocketInterfaceFromSocket(ngroup, link_node, link_sock);
-
- /* update the group node and interface node sockets,
- * so the new interface socket can be linked.
- */
- node_group_update(&ntree, gnode);
- node_group_input_update(ngroup, input_node);
-
- /* create new internal link */
- bNodeSocket *input_sock = node_group_input_find_socket(input_node, iosock->identifier);
- nodeAddLink(ngroup, input_node, input_sock, link->tonode, link->tosock);
-
- /* redirect external link */
- link->tonode = gnode;
- link->tosock = node_group_find_input_socket(gnode, iosock->identifier);
+ node_group_make_redirect_incoming_link(
+ ntree, ngroup, gnode, input_node, link, reusable_sockets);
}
else if (fromselect && !toselect) {
/* Remove hidden links to not create unconnected sockets in the interface. */
diff --git a/source/blender/editors/space_node/node_intern.hh b/source/blender/editors/space_node/node_intern.hh
index 1c3026628a6..88be9a52c61 100644
--- a/source/blender/editors/space_node/node_intern.hh
+++ b/source/blender/editors/space_node/node_intern.hh
@@ -38,6 +38,8 @@ extern const char *node_context_dir[];
namespace blender::ed::space_node {
+struct AssetItemTree;
+
/** Temporary data used in node link drag modal operator. */
struct bNodeLinkDrag {
/** Links dragged by the operator. */
@@ -96,6 +98,15 @@ struct SpaceNode_Runtime {
/* XXX hack for translate_attach op-macros to pass data from transform op to insert_offset op */
/** Temporary data for node insert offset (in UI called Auto-offset). */
struct NodeInsertOfsData *iofsd;
+
+ /**
+ * Temporary data for node add menu in order to provide longer-term storage for context pointers.
+ * Recreated every time the root menu is opened. In the future this will be replaced with an "all
+ * libraries" cache in the asset system itself.
+ *
+ * Stored with a shared pointer so that it can be forward declared.
+ */
+ std::shared_ptr<AssetItemTree> assets_for_menu;
};
enum NodeResizeDirection {
@@ -253,6 +264,7 @@ bNode *add_static_node(const bContext &C, int type, const float2 &location);
void NODE_OT_add_reroute(wmOperatorType *ot);
void NODE_OT_add_search(wmOperatorType *ot);
void NODE_OT_add_group(wmOperatorType *ot);
+void NODE_OT_add_group_asset(wmOperatorType *ot);
void NODE_OT_add_object(wmOperatorType *ot);
void NODE_OT_add_collection(wmOperatorType *ot);
void NODE_OT_add_file(wmOperatorType *ot);
@@ -383,4 +395,9 @@ void invoke_node_link_drag_add_menu(bContext &C,
void invoke_add_node_search_menu(bContext &C, const float2 &cursor, bool use_transform);
+/* add_menu_assets.cc */
+
+MenuType add_catalog_assets_menu_type();
+MenuType add_root_catalogs_menu_type();
+
} // namespace blender::ed::space_node
diff --git a/source/blender/editors/space_node/node_ops.cc b/source/blender/editors/space_node/node_ops.cc
index d45c33a3c59..104d1acf3b4 100644
--- a/source/blender/editors/space_node/node_ops.cc
+++ b/source/blender/editors/space_node/node_ops.cc
@@ -78,6 +78,7 @@ void node_operatortypes()
WM_operatortype_append(NODE_OT_add_search);
WM_operatortype_append(NODE_OT_add_group);
+ WM_operatortype_append(NODE_OT_add_group_asset);
WM_operatortype_append(NODE_OT_add_object);
WM_operatortype_append(NODE_OT_add_collection);
WM_operatortype_append(NODE_OT_add_file);
diff --git a/source/blender/editors/space_node/space_node.cc b/source/blender/editors/space_node/space_node.cc
index ac49115959c..5754e77399f 100644
--- a/source/blender/editors/space_node/space_node.cc
+++ b/source/blender/editors/space_node/space_node.cc
@@ -1170,5 +1170,8 @@ void ED_spacetype_node()
art->draw = node_toolbar_region_draw;
BLI_addhead(&st->regiontypes, art);
+ WM_menutype_add(MEM_new<MenuType>(__func__, add_catalog_assets_menu_type()));
+ WM_menutype_add(MEM_new<MenuType>(__func__, add_root_catalogs_menu_type()));
+
BKE_spacetype_register(st);
}
diff --git a/source/blender/editors/space_sequencer/sequencer_channels_draw.c b/source/blender/editors/space_sequencer/sequencer_channels_draw.c
index 8abd7e424d1..901417c152f 100644
--- a/source/blender/editors/space_sequencer/sequencer_channels_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_channels_draw.c
@@ -357,6 +357,10 @@ void draw_channels(const bContext *C, ARegion *region)
SeqChannelDrawContext context;
channel_draw_context_init(C, region, &context);
+ if (round_fl_to_int(context.channel_height) == 0) {
+ return;
+ }
+
UI_view2d_view_ortho(context.v2d);
draw_channel_headers(&context);
diff --git a/source/blender/editors/space_sequencer/sequencer_drag_drop.c b/source/blender/editors/space_sequencer/sequencer_drag_drop.c
index c892e7d7e55..d43ce26d2a1 100644
--- a/source/blender/editors/space_sequencer/sequencer_drag_drop.c
+++ b/source/blender/editors/space_sequencer/sequencer_drag_drop.c
@@ -505,8 +505,8 @@ typedef struct DropJobData {
} DropJobData;
static void prefetch_data_fn(void *custom_data,
- short *UNUSED(stop),
- short *UNUSED(do_update),
+ bool *UNUSED(stop),
+ bool *UNUSED(do_update),
float *UNUSED(progress))
{
DropJobData *job_data = (DropJobData *)custom_data;
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index a6916f9d031..3a2c62326de 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -890,8 +890,7 @@ static size_t draw_seq_text_get_overlay_string(const Scene *scene,
BLI_assert(i <= ARRAY_SIZE(text_array));
- return BLI_string_join_array(r_overlay_string, overlay_string_len, text_array, i) -
- r_overlay_string;
+ return BLI_string_join_array(r_overlay_string, overlay_string_len, text_array, i);
}
/* Draw info text on a sequence strip. */
diff --git a/source/blender/editors/space_sequencer/sequencer_preview.c b/source/blender/editors/space_sequencer/sequencer_preview.c
index 2820edc95aa..2410055d76d 100644
--- a/source/blender/editors/space_sequencer/sequencer_preview.c
+++ b/source/blender/editors/space_sequencer/sequencer_preview.c
@@ -51,7 +51,7 @@ static void free_preview_job(void *data)
}
/* Only this runs inside thread. */
-static void preview_startjob(void *data, short *stop, short *do_update, float *progress)
+static void preview_startjob(void *data, bool *stop, bool *do_update, float *progress)
{
PreviewJob *pj = data;
PreviewJobAudio *previewjb;
diff --git a/source/blender/editors/space_sequencer/sequencer_proxy.c b/source/blender/editors/space_sequencer/sequencer_proxy.c
index c851d3a29d4..30817771015 100644
--- a/source/blender/editors/space_sequencer/sequencer_proxy.c
+++ b/source/blender/editors/space_sequencer/sequencer_proxy.c
@@ -118,7 +118,7 @@ static int sequencer_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op))
if (seq->flag & SELECT) {
ListBase queue = {NULL, NULL};
LinkData *link;
- short stop = 0, do_update;
+ bool stop = false, do_update;
float progress;
SEQ_proxy_rebuild_context(bmain, depsgraph, scene, seq, file_list, &queue, false);
@@ -126,7 +126,7 @@ static int sequencer_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op))
for (link = queue.first; link; link = link->next) {
struct SeqIndexBuildContext *context = link->data;
SEQ_proxy_rebuild(context, &stop, &do_update, &progress);
- SEQ_proxy_rebuild_finish(context, 0);
+ SEQ_proxy_rebuild_finish(context, false);
}
SEQ_relations_free_imbuf(scene, &ed->seqbase, false);
}
diff --git a/source/blender/editors/space_sequencer/sequencer_thumbnails.c b/source/blender/editors/space_sequencer/sequencer_thumbnails.c
index 460054f3b44..d1606b14152 100644
--- a/source/blender/editors/space_sequencer/sequencer_thumbnails.c
+++ b/source/blender/editors/space_sequencer/sequencer_thumbnails.c
@@ -132,8 +132,8 @@ static void seq_get_thumb_image_dimensions(Sequence *seq,
}
static void thumbnail_start_job(void *data,
- short *stop,
- short *UNUSED(do_update),
+ bool *stop,
+ bool *UNUSED(do_update),
float *UNUSED(progress))
{
ThumbnailDrawJob *tj = data;
diff --git a/source/blender/editors/space_view3d/space_view3d.cc b/source/blender/editors/space_view3d/space_view3d.cc
index 635fbd75d74..05fb0c6a720 100644
--- a/source/blender/editors/space_view3d/space_view3d.cc
+++ b/source/blender/editors/space_view3d/space_view3d.cc
@@ -175,11 +175,11 @@ bool ED_view3d_area_user_region(const ScrArea *area, const View3D *v3d, ARegion
void ED_view3d_init_mats_rv3d(const struct Object *ob, struct RegionView3D *rv3d)
{
/* local viewmat and persmat, to calculate projections */
- mul_m4_m4m4(rv3d->viewmatob, rv3d->viewmat, ob->obmat);
- mul_m4_m4m4(rv3d->persmatob, rv3d->persmat, ob->obmat);
+ mul_m4_m4m4(rv3d->viewmatob, rv3d->viewmat, ob->object_to_world);
+ mul_m4_m4m4(rv3d->persmatob, rv3d->persmat, ob->object_to_world);
/* initializes object space clipping, speeds up clip tests */
- ED_view3d_clipping_local(rv3d, ob->obmat);
+ ED_view3d_clipping_local(rv3d, ob->object_to_world);
}
void ED_view3d_init_mats_rv3d_gl(const struct Object *ob, struct RegionView3D *rv3d)
@@ -189,7 +189,7 @@ void ED_view3d_init_mats_rv3d_gl(const struct Object *ob, struct RegionView3D *r
/* We have to multiply instead of loading `viewmatob` to make
* it work with duplis using display-lists, otherwise it will
* override the dupli-matrix. */
- GPU_matrix_mul(ob->obmat);
+ GPU_matrix_mul(ob->object_to_world);
}
#ifdef DEBUG
@@ -710,7 +710,7 @@ static void view3d_ob_drop_matrix_from_snap(V3DSnapCursorState *snap_state,
copy_v3_v3(obmat_final[3], snap_data->loc);
float scale[3];
- mat4_to_size(scale, ob->obmat);
+ mat4_to_size(scale, ob->object_to_world);
rescale_m4(obmat_final, scale);
const BoundBox *bb = BKE_object_boundbox_get(ob);
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 4153f19f8be..f71ce54729c 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -474,7 +474,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
/* Location, X/Y/Z */
mul_v3_fl(median_basis.generic.location, 1.0f / (float)tot);
if (v3d->flag & V3D_GLOBAL_STATS) {
- mul_m4_v3(ob->obmat, median_basis.generic.location);
+ mul_m4_v3(ob->object_to_world, median_basis.generic.location);
}
if (has_meshdata) {
@@ -954,9 +954,9 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
memcpy(&ve_median_basis, &tfp->ve_median, sizeof(tfp->ve_median));
if (v3d->flag & V3D_GLOBAL_STATS) {
- invert_m4_m4(ob->imat, ob->obmat);
- mul_m4_v3(ob->imat, median_basis.generic.location);
- mul_m4_v3(ob->imat, ve_median_basis.generic.location);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
+ mul_m4_v3(ob->world_to_object, median_basis.generic.location);
+ mul_m4_v3(ob->world_to_object, ve_median_basis.generic.location);
}
sub_vn_vnvn((float *)&median_basis,
(float *)&ve_median_basis,
@@ -1215,7 +1215,7 @@ static void v3d_object_dimension_buts(bContext *C, uiLayout *layout, View3D *v3d
BKE_object_dimensions_get(ob, tfp->ob_dims);
copy_v3_v3(tfp->ob_dims_orig, tfp->ob_dims);
copy_v3_v3(tfp->ob_scale_orig, ob->scale);
- copy_m4_m4(tfp->ob_obmat_orig, ob->obmat);
+ copy_m4_m4(tfp->ob_obmat_orig, ob->object_to_world);
uiDefBut(block,
UI_BTYPE_LABEL,
diff --git a/source/blender/editors/space_view3d/view3d_camera_control.c b/source/blender/editors/space_view3d/view3d_camera_control.c
index b5962647278..299c8638b02 100644
--- a/source/blender/editors/space_view3d/view3d_camera_control.c
+++ b/source/blender/editors/space_view3d/view3d_camera_control.c
@@ -142,7 +142,7 @@ struct View3DCameraControl *ED_view3d_cameracontrol_acquire(Depsgraph *depsgraph
vctrl->obtfm = BKE_object_tfm_backup(ob_back);
BKE_object_where_is_calc(depsgraph, scene, v3d->camera);
- negate_v3_v3(rv3d->ofs, v3d->camera->obmat[3]);
+ negate_v3_v3(rv3d->ofs, v3d->camera->object_to_world[3]);
rv3d->dist = 0.0;
}
@@ -251,7 +251,7 @@ void ED_view3d_cameracontrol_update(View3DCameraControl *vctrl,
invert_m4_m4(prev_view_imat, vctrl->view_mat_prev);
mul_m4_m4m4(diff_mat, view_mat, prev_view_imat);
- mul_m4_m4m4(parent_mat, diff_mat, vctrl->root_parent->obmat);
+ mul_m4_m4m4(parent_mat, diff_mat, vctrl->root_parent->object_to_world);
if (object_apply_mat4_with_protect(vctrl->root_parent, parent_mat, false, rv3d, view_mat)) {
/* Calculate again since the view locking changes the matrix. */
diff --git a/source/blender/editors/space_view3d/view3d_draw.cc b/source/blender/editors/space_view3d/view3d_draw.cc
index 8a86889f2d0..31b26ba4cda 100644
--- a/source/blender/editors/space_view3d/view3d_draw.cc
+++ b/source/blender/editors/space_view3d/view3d_draw.cc
@@ -2066,7 +2066,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Depsgraph *depsgraph,
rv3d.persp = RV3D_CAMOB;
- copy_m4_m4(rv3d.viewinv, v3d.camera->obmat);
+ copy_m4_m4(rv3d.viewinv, v3d.camera->object_to_world);
normalize_m4(rv3d.viewinv);
invert_m4_m4(rv3d.viewmat, rv3d.viewinv);
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_armature.c b/source/blender/editors/space_view3d/view3d_gizmo_armature.c
index 4f73e2fada2..8a4301d1314 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_armature.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_armature.c
@@ -188,7 +188,7 @@ static void WIDGETGROUP_armature_spline_refresh(const bContext *C, wmGizmoGroup
bspline_group->handles[i].index = i;
float mat[4][4];
- mul_m4_m4m4(mat, ob->obmat, (i == 0) ? pchan->disp_mat : pchan->disp_tail_mat);
+ mul_m4_m4m4(mat, ob->object_to_world, (i == 0) ? pchan->disp_mat : pchan->disp_tail_mat);
copy_m4_m4(gz->matrix_space, mat);
/* need to set property here for undo. TODO: would prefer to do this in _init. */
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_camera.c b/source/blender/editors/space_view3d/view3d_gizmo_camera.c
index 952ef56710b..56a1f6212a0 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_camera.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_camera.c
@@ -85,7 +85,7 @@ static void WIDGETGROUP_camera_setup(const bContext *C, wmGizmoGroup *gzgroup)
struct CameraWidgetGroup *cagzgroup = MEM_callocN(sizeof(struct CameraWidgetGroup), __func__);
gzgroup->customdata = cagzgroup;
- negate_v3_v3(dir, ob->obmat[2]);
+ negate_v3_v3(dir, ob->object_to_world[2]);
/* dof distance */
{
@@ -138,11 +138,11 @@ static void WIDGETGROUP_camera_refresh(const bContext *C, wmGizmoGroup *gzgroup)
RNA_pointer_create(&ca->id, &RNA_Camera, ca, &camera_ptr);
- negate_v3_v3(dir, ob->obmat[2]);
+ negate_v3_v3(dir, ob->object_to_world[2]);
if ((ca->flag & CAM_SHOWLIMITS) && (v3d->gizmo_show_camera & V3D_GIZMO_SHOW_CAMERA_DOF_DIST)) {
- WM_gizmo_set_matrix_location(cagzgroup->dop_dist, ob->obmat[3]);
- WM_gizmo_set_matrix_rotation_from_yz_axis(cagzgroup->dop_dist, ob->obmat[1], dir);
+ WM_gizmo_set_matrix_location(cagzgroup->dop_dist, ob->object_to_world[3]);
+ WM_gizmo_set_matrix_rotation_from_yz_axis(cagzgroup->dop_dist, ob->object_to_world[1], dir);
WM_gizmo_set_scale(cagzgroup->dop_dist, ca->drawsize);
WM_gizmo_set_flag(cagzgroup->dop_dist, WM_GIZMO_HIDDEN, false);
@@ -183,17 +183,17 @@ static void WIDGETGROUP_camera_refresh(const bContext *C, wmGizmoGroup *gzgroup)
aspect[1] = (sensor_fit == CAMERA_SENSOR_FIT_HOR) ? aspy / aspx : 1.0f;
unit_m4(widget->matrix_basis);
- WM_gizmo_set_matrix_location(widget, ob->obmat[3]);
- WM_gizmo_set_matrix_rotation_from_yz_axis(widget, ob->obmat[1], dir);
+ WM_gizmo_set_matrix_location(widget, ob->object_to_world[3]);
+ WM_gizmo_set_matrix_rotation_from_yz_axis(widget, ob->object_to_world[1], dir);
if (is_ortho) {
scale_matrix = ca->ortho_scale * 0.5f;
}
else {
const float ob_scale_inv[3] = {
- 1.0f / len_v3(ob->obmat[0]),
- 1.0f / len_v3(ob->obmat[1]),
- 1.0f / len_v3(ob->obmat[2]),
+ 1.0f / len_v3(ob->object_to_world[0]),
+ 1.0f / len_v3(ob->object_to_world[1]),
+ 1.0f / len_v3(ob->object_to_world[2]),
};
const float ob_scale_uniform_inv = (ob_scale_inv[0] + ob_scale_inv[1] + ob_scale_inv[2]) /
3.0f;
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_empty.c b/source/blender/editors/space_view3d/view3d_gizmo_empty.c
index 41a763192ce..03fc7328e39 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_empty.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_empty.c
@@ -139,7 +139,7 @@ static void WIDGETGROUP_empty_image_refresh(const bContext *C, wmGizmoGroup *gzg
BKE_view_layer_synced_ensure(scene, view_layer);
Object *ob = BKE_view_layer_active_object_get(view_layer);
- copy_m4_m4(gz->matrix_basis, ob->obmat);
+ copy_m4_m4(gz->matrix_basis, ob->object_to_world);
RNA_enum_set(gz->ptr,
"transform",
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_forcefield.c b/source/blender/editors/space_view3d/view3d_gizmo_forcefield.c
index 58b43301397..d194e2a6279 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_forcefield.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_forcefield.c
@@ -87,8 +87,8 @@ static void WIDGETGROUP_forcefield_refresh(const bContext *C, wmGizmoGroup *gzgr
PointerRNA field_ptr;
RNA_pointer_create(&ob->id, &RNA_FieldSettings, pd, &field_ptr);
- WM_gizmo_set_matrix_location(gz, ob->obmat[3]);
- WM_gizmo_set_matrix_rotation_from_z_axis(gz, ob->obmat[2]);
+ WM_gizmo_set_matrix_location(gz, ob->object_to_world[3]);
+ WM_gizmo_set_matrix_rotation_from_z_axis(gz, ob->object_to_world[2]);
WM_gizmo_set_matrix_offset_location(gz, ofs);
WM_gizmo_set_flag(gz, WM_GIZMO_HIDDEN, false);
WM_gizmo_target_property_def_rna(gz, "offset", &field_ptr, "strength", -1);
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_light.c b/source/blender/editors/space_view3d/view3d_gizmo_light.c
index 4401dbf7935..0b115bc0604 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_light.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_light.c
@@ -85,10 +85,10 @@ static void WIDGETGROUP_light_spot_refresh(const bContext *C, wmGizmoGroup *gzgr
Light *la = ob->data;
float dir[3];
- negate_v3_v3(dir, ob->obmat[2]);
+ negate_v3_v3(dir, ob->object_to_world[2]);
WM_gizmo_set_matrix_rotation_from_z_axis(gz, dir);
- WM_gizmo_set_matrix_location(gz, ob->obmat[3]);
+ WM_gizmo_set_matrix_location(gz, ob->object_to_world[3]);
/* need to set property here for undo. TODO: would prefer to do this in _init. */
PointerRNA lamp_ptr;
@@ -199,7 +199,7 @@ static void WIDGETGROUP_light_area_refresh(const bContext *C, wmGizmoGroup *gzgr
Light *la = ob->data;
wmGizmo *gz = wwrapper->gizmo;
- copy_m4_m4(gz->matrix_basis, ob->obmat);
+ copy_m4_m4(gz->matrix_basis, ob->object_to_world);
int flag = ED_GIZMO_CAGE2D_XFORM_FLAG_SCALE;
if (ELEM(la->area_shape, LA_AREA_SQUARE, LA_AREA_DISK)) {
@@ -296,7 +296,7 @@ static void WIDGETGROUP_light_target_draw_prepare(const bContext *C, wmGizmoGrou
Object *ob = BKE_view_layer_active_object_get(view_layer);
wmGizmo *gz = wwrapper->gizmo;
- normalize_m4_m4(gz->matrix_basis, ob->obmat);
+ normalize_m4_m4(gz->matrix_basis, ob->object_to_world);
unit_m4(gz->matrix_offset);
if (ob->type == OB_LAMP) {
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_preselect_type.cc b/source/blender/editors/space_view3d/view3d_gizmo_preselect_type.cc
index 793ada4f577..86aecfb6c34 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_preselect_type.cc
+++ b/source/blender/editors/space_view3d/view3d_gizmo_preselect_type.cc
@@ -97,7 +97,7 @@ static void gizmo_preselect_elem_draw(const bContext *C, wmGizmo *gz)
MeshElemGizmo3D *gz_ele = (MeshElemGizmo3D *)gz;
if (gz_ele->base_index != -1) {
Object *ob = gz_ele->bases[gz_ele->base_index]->object;
- EDBM_preselect_elem_draw(gz_ele->psel, ob->obmat);
+ EDBM_preselect_elem_draw(gz_ele->psel, ob->object_to_world);
}
}
@@ -185,7 +185,7 @@ static int gizmo_preselect_elem_test_select(bContext *C, wmGizmo *gz, const int
BMVert *vert = (BMVert *)eve_test;
float vert_p_co[2], vert_co[3];
const float mval_f[2] = {float(vc.mval[0]), float(vc.mval[1])};
- mul_v3_m4v3(vert_co, gz_ele->bases[base_index_vert]->object->obmat, vert->co);
+ mul_v3_m4v3(vert_co, gz_ele->bases[base_index_vert]->object->object_to_world, vert->co);
ED_view3d_project_v2(vc.region, vert_co, vert_p_co);
float len = len_v2v2(vert_p_co, mval_f);
if (len < 35) {
@@ -330,7 +330,7 @@ static void gizmo_preselect_edgering_draw(const bContext *C, wmGizmo *gz)
MeshEdgeRingGizmo3D *gz_ring = (MeshEdgeRingGizmo3D *)gz;
if (gz_ring->base_index != -1) {
Object *ob = gz_ring->bases[gz_ring->base_index]->object;
- EDBM_preselect_edgering_draw(gz_ring->psel, ob->obmat);
+ EDBM_preselect_edgering_draw(gz_ring->psel, ob->object_to_world);
}
}
diff --git a/source/blender/editors/space_view3d/view3d_iterators.cc b/source/blender/editors/space_view3d/view3d_iterators.cc
index 932563863fe..aaa817ec00c 100644
--- a/source/blender/editors/space_view3d/view3d_iterators.cc
+++ b/source/blender/editors/space_view3d/view3d_iterators.cc
@@ -307,7 +307,7 @@ void meshobject_foreachScreenVert(
&me->vdata, CD_PROP_BOOL, ".hide_vert");
if (clip_flag & V3D_PROJ_TEST_CLIP_BB) {
- ED_view3d_clipping_local(vc->rv3d, vc->obact->obmat);
+ ED_view3d_clipping_local(vc->rv3d, vc->obact->object_to_world);
}
BKE_mesh_foreach_mapped_vert(me, meshobject_foreachScreenVert__mapFunc, &data, MESH_FOREACH_NOP);
@@ -353,7 +353,8 @@ void mesh_foreachScreenVert(
data.clip_flag = clip_flag;
if (clip_flag & V3D_PROJ_TEST_CLIP_BB) {
- ED_view3d_clipping_local(vc->rv3d, vc->obedit->obmat); /* for local clipping lookups */
+ ED_view3d_clipping_local(vc->rv3d,
+ vc->obedit->object_to_world); /* for local clipping lookups */
}
BM_mesh_elem_table_ensure(vc->em->bm, BM_VERT);
@@ -422,7 +423,8 @@ void mesh_foreachScreenEdge(ViewContext *vc,
data.clip_flag = clip_flag;
if (clip_flag & V3D_PROJ_TEST_CLIP_BB) {
- ED_view3d_clipping_local(vc->rv3d, vc->obedit->obmat); /* for local clipping lookups */
+ ED_view3d_clipping_local(vc->rv3d,
+ vc->obedit->object_to_world); /* for local clipping lookups */
}
if (clip_flag & V3D_PROJ_TEST_CLIP_CONTENT) {
@@ -520,7 +522,8 @@ void mesh_foreachScreenEdge_clip_bb_segment(ViewContext *vc,
BM_mesh_elem_table_ensure(vc->em->bm, BM_EDGE);
if ((clip_flag & V3D_PROJ_TEST_CLIP_BB) && (vc->rv3d->clipbb != nullptr)) {
- ED_view3d_clipping_local(vc->rv3d, vc->obedit->obmat); /* for local clipping lookups. */
+ ED_view3d_clipping_local(vc->rv3d,
+ vc->obedit->object_to_world); /* for local clipping lookups. */
BKE_mesh_foreach_mapped_edge(
me, vc->em->bm->totedge, mesh_foreachScreenEdge_clip_bb_segment__mapFunc, &data);
}
@@ -612,7 +615,8 @@ void nurbs_foreachScreenVert(ViewContext *vc,
ED_view3d_check_mats_rv3d(vc->rv3d);
if (clip_flag & V3D_PROJ_TEST_CLIP_BB) {
- ED_view3d_clipping_local(vc->rv3d, vc->obedit->obmat); /* for local clipping lookups */
+ ED_view3d_clipping_local(vc->rv3d,
+ vc->obedit->object_to_world); /* for local clipping lookups */
}
LISTBASE_FOREACH (Nurb *, nu, nurbs) {
@@ -732,7 +736,7 @@ void lattice_foreachScreenVert(ViewContext *vc,
ED_view3d_check_mats_rv3d(vc->rv3d);
if (clip_flag & V3D_PROJ_TEST_CLIP_BB) {
- ED_view3d_clipping_local(vc->rv3d, obedit->obmat); /* for local clipping lookups */
+ ED_view3d_clipping_local(vc->rv3d, obedit->object_to_world); /* for local clipping lookups */
}
for (i = 0; i < N; i++, bp++, co += 3) {
diff --git a/source/blender/editors/space_view3d/view3d_navigate.c b/source/blender/editors/space_view3d/view3d_navigate.c
index 25073d02a7f..7d2beecd9a3 100644
--- a/source/blender/editors/space_view3d/view3d_navigate.c
+++ b/source/blender/editors/space_view3d/view3d_navigate.c
@@ -185,7 +185,7 @@ bool view3d_orbit_calc_center(bContext *C, float r_dyn_ofs[3])
copy_v3_v3(lastofs, stroke);
}
else {
- copy_v3_v3(lastofs, ob_act_eval->obmat[3]);
+ copy_v3_v3(lastofs, ob_act_eval->object_to_world[3]);
}
is_set = true;
}
@@ -199,7 +199,7 @@ bool view3d_orbit_calc_center(bContext *C, float r_dyn_ofs[3])
}
mul_v2_fl(lastofs, 1.0f / 4.0f);
- mul_m4_v3(ob_act_eval->obmat, lastofs);
+ mul_m4_v3(ob_act_eval->object_to_world, lastofs);
is_set = true;
}
@@ -219,11 +219,11 @@ bool view3d_orbit_calc_center(bContext *C, float r_dyn_ofs[3])
BKE_boundbox_calc_center_aabb(ob_eval->runtime.bb, cent);
- mul_m4_v3(ob_eval->obmat, cent);
+ mul_m4_v3(ob_eval->object_to_world, cent);
add_v3_v3(select_center, cent);
}
else {
- add_v3_v3(select_center, ob_eval->obmat[3]);
+ add_v3_v3(select_center, ob_eval->object_to_world[3]);
}
tot++;
}
@@ -626,7 +626,7 @@ static void view3d_object_calc_minmax(Depsgraph *depsgraph,
if (BKE_object_minmax_dupli(depsgraph, scene, ob_eval, min, max, false) == 0) {
/* Use if duplis aren't found. */
if (only_center) {
- minmax_v3v3_v3(min, max, ob_eval->obmat[3]);
+ minmax_v3v3_v3(min, max, ob_eval->object_to_world[3]);
}
else {
BKE_object_minmax(ob_eval, min, max, false);
@@ -934,8 +934,8 @@ static int viewselected_exec(bContext *C, wmOperator *op)
CTX_DATA_END;
if ((ob_eval) && (ok)) {
- mul_m4_v3(ob_eval->obmat, min);
- mul_m4_v3(ob_eval->obmat, max);
+ mul_m4_v3(ob_eval->object_to_world, min);
+ mul_m4_v3(ob_eval->object_to_world, max);
}
}
else if (is_face_map) {
diff --git a/source/blender/editors/space_view3d/view3d_navigate_smoothview.c b/source/blender/editors/space_view3d/view3d_navigate_smoothview.c
index 6b150d1e771..a5eee436fdb 100644
--- a/source/blender/editors/space_view3d/view3d_navigate_smoothview.c
+++ b/source/blender/editors/space_view3d/view3d_navigate_smoothview.c
@@ -259,7 +259,7 @@ void ED_view3d_smooth_view_ex(
Object *ob_camera_eval = DEG_get_evaluated_object(depsgraph, sview->camera);
if (sview->ofs != NULL) {
sms.dst.dist = ED_view3d_offset_distance(
- ob_camera_eval->obmat, sview->ofs, VIEW3D_DIST_FALLBACK);
+ ob_camera_eval->object_to_world, sview->ofs, VIEW3D_DIST_FALLBACK);
}
ED_view3d_from_object(ob_camera_eval, sms.dst.ofs, sms.dst.quat, &sms.dst.dist, &sms.dst.lens);
sms.to_camera = true; /* restore view3d values in end */
@@ -282,7 +282,8 @@ void ED_view3d_smooth_view_ex(
if (sview->camera_old) {
Object *ob_camera_old_eval = DEG_get_evaluated_object(depsgraph, sview->camera_old);
if (sview->ofs != NULL) {
- sms.src.dist = ED_view3d_offset_distance(ob_camera_old_eval->obmat, sview->ofs, 0.0f);
+ sms.src.dist = ED_view3d_offset_distance(
+ ob_camera_old_eval->object_to_world, sview->ofs, 0.0f);
}
ED_view3d_from_object(
ob_camera_old_eval, sms.src.ofs, sms.src.quat, &sms.src.dist, &sms.src.lens);
diff --git a/source/blender/editors/space_view3d/view3d_project.c b/source/blender/editors/space_view3d/view3d_project.c
index c5f951bd64c..2718f14c855 100644
--- a/source/blender/editors/space_view3d/view3d_project.c
+++ b/source/blender/editors/space_view3d/view3d_project.c
@@ -80,7 +80,7 @@ eV3DProjStatus ED_view3d_project_base(const struct ARegion *region,
float r_co[2])
{
eV3DProjStatus ret = ED_view3d_project_float_global(
- region, base->object->obmat[3], r_co, V3D_PROJ_TEST_CLIP_DEFAULT);
+ region, base->object->object_to_world[3], r_co, V3D_PROJ_TEST_CLIP_DEFAULT);
/* Prevent uninitialized values when projection fails,
* although the callers should check the return value. */
@@ -687,7 +687,7 @@ void ED_view3d_ob_project_mat_get(const RegionView3D *rv3d, const Object *ob, fl
{
float vmat[4][4];
- mul_m4_m4m4(vmat, rv3d->viewmat, ob->obmat);
+ mul_m4_m4m4(vmat, rv3d->viewmat, ob->object_to_world);
mul_m4_m4m4(r_pmat, rv3d->winmat, vmat);
}
diff --git a/source/blender/editors/space_view3d/view3d_select.cc b/source/blender/editors/space_view3d/view3d_select.cc
index 2a84d61c561..48a3cb386fd 100644
--- a/source/blender/editors/space_view3d/view3d_select.cc
+++ b/source/blender/editors/space_view3d/view3d_select.cc
@@ -2303,7 +2303,7 @@ static Base *mouse_select_object_center(ViewContext *vc, Base *startbase, const
if (BASE_SELECTABLE(v3d, base)) {
float screen_co[2];
if (ED_view3d_project_float_global(
- region, base->object->obmat[3], screen_co, V3D_PROJ_TEST_CLIP_DEFAULT) ==
+ region, base->object->object_to_world[3], screen_co, V3D_PROJ_TEST_CLIP_DEFAULT) ==
V3D_PROJ_RET_OK) {
float dist_test = len_manhattan_v2v2(mval_fl, screen_co);
if (base == oldbasact) {
@@ -2616,6 +2616,12 @@ static bool ed_object_select_pick(bContext *C,
Base *basact = nullptr;
const eObjectMode object_mode = oldbasact ? static_cast<eObjectMode>(oldbasact->object->mode) :
OB_MODE_OBJECT;
+ /* For the most part this is equivalent to `(object_mode & OB_MODE_POSE) != 0`
+ * however this logic should also run with weight-paint + pose selection.
+ * Without this, selection in weight-paint mode can de-select armatures which isn't useful,
+ * see: T101686. */
+ const bool has_pose_old = (oldbasact &&
+ BKE_object_pose_armature_get_with_wpaint_check(oldbasact->object));
/* When enabled, don't attempt any further selection. */
bool handled = false;
@@ -2654,7 +2660,7 @@ static bool ed_object_select_pick(bContext *C,
*
* This way prioritizing based on pose-mode has a bias to stay in pose-mode
* without having to enforce this through locking the object mode. */
- bool do_bones_get_priotity = (object_mode & OB_MODE_POSE) != 0;
+ bool do_bones_get_priotity = has_pose_old;
basact = (gpu->hits > 0) ? mouse_select_eval_buffer(&vc,
gpu->buffer,
@@ -2666,10 +2672,14 @@ static bool ed_object_select_pick(bContext *C,
nullptr;
}
+ /* See comment for `has_pose_old`, the same rationale applies here. */
+ const bool has_pose_new = (basact &&
+ BKE_object_pose_armature_get_with_wpaint_check(basact->object));
+
/* Select pose-bones or camera-tracks. */
if (((gpu->hits > 0) && gpu->has_bones) ||
/* Special case, even when there are no hits, pose logic may de-select all bones. */
- ((gpu->hits == 0) && (object_mode & OB_MODE_POSE))) {
+ ((gpu->hits == 0) && has_pose_old)) {
if (basact && (gpu->has_bones && (basact->object->type == OB_CAMERA))) {
MovieClip *clip = BKE_object_movieclip_get(scene, basact->object, false);
@@ -2729,7 +2739,7 @@ static bool ed_object_select_pick(bContext *C,
handled = true;
}
- else if ((object_mode & OB_MODE_POSE) && (basact->object->mode & OB_MODE_POSE)) {
+ else if (has_pose_old && has_pose_new) {
/* Within pose-mode, keep the current selection when switching pose bones,
* this is noticeable when in pose mode with multiple objects at once.
* Where selecting the bone of a different object would de-select this one.
@@ -2955,6 +2965,9 @@ static bool ed_wpaint_vertex_select_pick(bContext *C,
changed = true;
}
+ else {
+ select_vert.finish();
+ }
if (changed) {
paintvert_tag_select_update(C, obact);
@@ -4728,9 +4741,10 @@ static bool object_circle_select(ViewContext *vc,
LISTBASE_FOREACH (Base *, base, BKE_view_layer_object_bases_get(view_layer)) {
if (BASE_SELECTABLE(v3d, base) && ((base->flag & BASE_SELECTED) != select_flag)) {
float screen_co[2];
- if (ED_view3d_project_float_global(
- vc->region, base->object->obmat[3], screen_co, V3D_PROJ_TEST_CLIP_DEFAULT) ==
- V3D_PROJ_RET_OK) {
+ if (ED_view3d_project_float_global(vc->region,
+ base->object->object_to_world[3],
+ screen_co,
+ V3D_PROJ_TEST_CLIP_DEFAULT) == V3D_PROJ_RET_OK) {
if (len_squared_v2v2(mval_fl, screen_co) <= radius_squared) {
ED_object_base_select(base, select ? BA_SELECT : BA_DESELECT);
changed = true;
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index ee6b1886dc2..8c6f4387851 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -86,18 +86,18 @@ static int snap_sel_to_grid_exec(bContext *C, wmOperator *UNUSED(op))
}
if (tvs.transverts_tot != 0) {
- copy_m3_m4(bmat, obedit->obmat);
+ copy_m3_m4(bmat, obedit->object_to_world);
invert_m3_m3(imat, bmat);
tv = tvs.transverts;
for (a = 0; a < tvs.transverts_tot; a++, tv++) {
copy_v3_v3(vec, tv->loc);
mul_m3_v3(bmat, vec);
- add_v3_v3(vec, obedit->obmat[3]);
+ add_v3_v3(vec, obedit->object_to_world[3]);
vec[0] = gridf * floorf(0.5f + vec[0] / gridf);
vec[1] = gridf * floorf(0.5f + vec[1] / gridf);
vec[2] = gridf * floorf(0.5f + vec[2] / gridf);
- sub_v3_v3(vec, obedit->obmat[3]);
+ sub_v3_v3(vec, obedit->object_to_world[3]);
mul_m3_v3(imat, vec);
copy_v3_v3(tv->loc, vec);
@@ -118,7 +118,7 @@ static int snap_sel_to_grid_exec(bContext *C, wmOperator *UNUSED(op))
bPoseChannel *pchan_eval;
bArmature *arm_eval = ob_eval->data;
- invert_m4_m4(ob_eval->imat, ob_eval->obmat);
+ invert_m4_m4(ob_eval->world_to_object, ob_eval->object_to_world);
for (pchan_eval = ob_eval->pose->chanbase.first; pchan_eval; pchan_eval = pchan_eval->next) {
if (pchan_eval->bone->flag & BONE_SELECTED) {
@@ -129,12 +129,12 @@ static int snap_sel_to_grid_exec(bContext *C, wmOperator *UNUSED(op))
/* get nearest grid point to snap to */
copy_v3_v3(nLoc, pchan_eval->pose_mat[3]);
/* We must operate in world space! */
- mul_m4_v3(ob_eval->obmat, nLoc);
+ mul_m4_v3(ob_eval->object_to_world, nLoc);
vec[0] = gridf * floorf(0.5f + nLoc[0] / gridf);
vec[1] = gridf * floorf(0.5f + nLoc[1] / gridf);
vec[2] = gridf * floorf(0.5f + nLoc[2] / gridf);
/* Back in object space... */
- mul_m4_v3(ob_eval->imat, vec);
+ mul_m4_v3(ob_eval->world_to_object, vec);
/* Get location of grid point in pose space. */
BKE_armature_loc_pose_to_bone(pchan_eval, vec, vec);
@@ -214,9 +214,12 @@ static int snap_sel_to_grid_exec(bContext *C, wmOperator *UNUSED(op))
for (int ob_index = 0; ob_index < objects_eval_len; ob_index++) {
Object *ob_eval = objects_eval[ob_index];
Object *ob = DEG_get_original_object(ob_eval);
- vec[0] = -ob_eval->obmat[3][0] + gridf * floorf(0.5f + ob_eval->obmat[3][0] / gridf);
- vec[1] = -ob_eval->obmat[3][1] + gridf * floorf(0.5f + ob_eval->obmat[3][1] / gridf);
- vec[2] = -ob_eval->obmat[3][2] + gridf * floorf(0.5f + ob_eval->obmat[3][2] / gridf);
+ vec[0] = -ob_eval->object_to_world[3][0] +
+ gridf * floorf(0.5f + ob_eval->object_to_world[3][0] / gridf);
+ vec[1] = -ob_eval->object_to_world[3][1] +
+ gridf * floorf(0.5f + ob_eval->object_to_world[3][1] / gridf);
+ vec[2] = -ob_eval->object_to_world[3][2] +
+ gridf * floorf(0.5f + ob_eval->object_to_world[3][2] / gridf);
if (ob->parent) {
float originmat[3][3];
@@ -343,11 +346,11 @@ static bool snap_selected_to_location(bContext *C,
}
if (tvs.transverts_tot != 0) {
- copy_m3_m4(bmat, obedit->obmat);
+ copy_m3_m4(bmat, obedit->object_to_world);
invert_m3_m3(imat, bmat);
/* get the cursor in object space */
- sub_v3_v3v3(snap_target_local, snap_target_global, obedit->obmat[3]);
+ sub_v3_v3v3(snap_target_local, snap_target_global, obedit->object_to_world[3]);
mul_m3_v3(imat, snap_target_local);
if (use_offset) {
@@ -384,8 +387,8 @@ static bool snap_selected_to_location(bContext *C,
bArmature *arm = ob->data;
float snap_target_local[3];
- invert_m4_m4(ob->imat, ob->obmat);
- mul_v3_m4v3(snap_target_local, ob->imat, snap_target_global);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
+ mul_v3_m4v3(snap_target_local, ob->world_to_object, snap_target_global);
for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
if ((pchan->bone->flag & BONE_SELECTED) && PBONE_VISIBLE(arm, pchan->bone) &&
@@ -409,10 +412,10 @@ static bool snap_selected_to_location(bContext *C,
float cursor_pose[3];
if (use_offset) {
- mul_v3_m4v3(cursor_pose, ob->obmat, pchan->pose_mat[3]);
+ mul_v3_m4v3(cursor_pose, ob->object_to_world, pchan->pose_mat[3]);
add_v3_v3(cursor_pose, offset_global);
- mul_m4_v3(ob->imat, cursor_pose);
+ mul_m4_v3(ob->world_to_object, cursor_pose);
BKE_armature_loc_pose_to_bone(pchan, cursor_pose, cursor_pose);
}
else {
@@ -510,13 +513,13 @@ static bool snap_selected_to_location(bContext *C,
float cursor_parent[3]; /* parent-relative */
if (use_offset) {
- add_v3_v3v3(cursor_parent, ob->obmat[3], offset_global);
+ add_v3_v3v3(cursor_parent, ob->object_to_world[3], offset_global);
}
else {
copy_v3_v3(cursor_parent, snap_target_global);
}
- sub_v3_v3(cursor_parent, ob->obmat[3]);
+ sub_v3_v3(cursor_parent, ob->object_to_world[3]);
if (ob->parent) {
float originmat[3][3], parentmat[4][4];
@@ -730,7 +733,7 @@ static void bundle_midpoint(Scene *scene, Object *ob, float r_vec[3])
tracking = &clip->tracking;
- copy_m4_m4(cammat, ob->obmat);
+ copy_m4_m4(cammat, ob->object_to_world);
BKE_tracking_get_camera_object_matrix(ob, mat);
@@ -809,13 +812,13 @@ static bool snap_curs_to_sel_ex(bContext *C, const int pivot_point, float r_curs
count += tvs.transverts_tot;
if (tvs.transverts_tot != 0) {
Object *obedit_eval = DEG_get_evaluated_object(depsgraph, obedit);
- copy_m3_m4(bmat, obedit_eval->obmat);
+ copy_m3_m4(bmat, obedit_eval->object_to_world);
tv = tvs.transverts;
for (int i = 0; i < tvs.transverts_tot; i++, tv++) {
copy_v3_v3(vec, tv->loc);
mul_m3_v3(bmat, vec);
- add_v3_v3(vec, obedit_eval->obmat[3]);
+ add_v3_v3(vec, obedit_eval->object_to_world[3]);
add_v3_v3(centroid, vec);
minmax_v3v3_v3(min, max, vec);
}
@@ -835,7 +838,7 @@ static bool snap_curs_to_sel_ex(bContext *C, const int pivot_point, float r_curs
if (arm->layer & pchan->bone->layer) {
if (pchan->bone->flag & BONE_SELECTED) {
copy_v3_v3(vec, pchan->pose_head);
- mul_m4_v3(obact_eval->obmat, vec);
+ mul_m4_v3(obact_eval->object_to_world, vec);
add_v3_v3(centroid, vec);
minmax_v3v3_v3(min, max, vec);
count++;
@@ -845,7 +848,7 @@ static bool snap_curs_to_sel_ex(bContext *C, const int pivot_point, float r_curs
}
else {
FOREACH_SELECTED_OBJECT_BEGIN (view_layer_eval, v3d, ob_eval) {
- copy_v3_v3(vec, ob_eval->obmat[3]);
+ copy_v3_v3(vec, ob_eval->object_to_world[3]);
/* special case for camera -- snap to bundles */
if (ob_eval->type == OB_CAMERA) {
@@ -1008,7 +1011,7 @@ bool ED_view3d_minmax_verts(Object *obedit, float r_min[3], float r_max[3])
float ob_min[3], ob_max[3];
bool changed;
- changed = BKE_mball_minmax_ex(obedit->data, ob_min, ob_max, obedit->obmat, SELECT);
+ changed = BKE_mball_minmax_ex(obedit->data, ob_min, ob_max, obedit->object_to_world, SELECT);
if (changed) {
minmax_v3v3_v3(r_min, r_max, ob_min);
minmax_v3v3_v3(r_min, r_max, ob_max);
@@ -1024,13 +1027,13 @@ bool ED_view3d_minmax_verts(Object *obedit, float r_min[3], float r_max[3])
return false;
}
- copy_m3_m4(bmat, obedit->obmat);
+ copy_m3_m4(bmat, obedit->object_to_world);
tv = tvs.transverts;
for (int a = 0; a < tvs.transverts_tot; a++, tv++) {
copy_v3_v3(vec, (tv->flag & TX_VERT_USE_MAPLOC) ? tv->maploc : tv->loc);
mul_m3_v3(bmat, vec);
- add_v3_v3(vec, obedit->obmat[3]);
+ add_v3_v3(vec, obedit->object_to_world[3]);
add_v3_v3(centroid, vec);
minmax_v3v3_v3(r_min, r_max, vec);
}
diff --git a/source/blender/editors/space_view3d/view3d_utils.c b/source/blender/editors/space_view3d/view3d_utils.c
index 1fc16939f3f..fc26e6b4a06 100644
--- a/source/blender/editors/space_view3d/view3d_utils.c
+++ b/source/blender/editors/space_view3d/view3d_utils.c
@@ -281,7 +281,7 @@ void ED_view3d_clipping_calc(
/* optionally transform to object space */
if (ob) {
float imat[4][4];
- invert_m4_m4(imat, ob->obmat);
+ invert_m4_m4(imat, ob->object_to_world);
for (int val = 0; val < 8; val++) {
mul_m4_v3(imat, bb->vec[val]);
@@ -291,7 +291,7 @@ void ED_view3d_clipping_calc(
/* verify if we have negative scale. doing the transform before cross
* product flips the sign of the vector compared to doing cross product
* before transform then, so we correct for that. */
- int flip_sign = (ob) ? is_negative_m4(ob->obmat) : false;
+ int flip_sign = (ob) ? is_negative_m4(ob->object_to_world) : false;
ED_view3d_clipping_calc_from_boundbox(planes, bb, flip_sign);
}
@@ -466,7 +466,8 @@ void ED_view3d_persp_switch_from_camera(const Depsgraph *depsgraph,
if (v3d->camera) {
Object *ob_camera_eval = DEG_get_evaluated_object(depsgraph, v3d->camera);
- rv3d->dist = ED_view3d_offset_distance(ob_camera_eval->obmat, rv3d->ofs, VIEW3D_DIST_FALLBACK);
+ rv3d->dist = ED_view3d_offset_distance(
+ ob_camera_eval->object_to_world, rv3d->ofs, VIEW3D_DIST_FALLBACK);
ED_view3d_from_object(ob_camera_eval, rv3d->ofs, rv3d->viewquat, &rv3d->dist, NULL);
}
@@ -558,7 +559,7 @@ void ED_view3d_camera_lock_init_ex(const Depsgraph *depsgraph,
if (calc_dist) {
/* using a fallback dist is OK here since ED_view3d_from_object() compensates for it */
rv3d->dist = ED_view3d_offset_distance(
- ob_camera_eval->obmat, rv3d->ofs, VIEW3D_DIST_FALLBACK);
+ ob_camera_eval->object_to_world, rv3d->ofs, VIEW3D_DIST_FALLBACK);
}
ED_view3d_from_object(ob_camera_eval, rv3d->ofs, rv3d->viewquat, &rv3d->dist, NULL);
}
@@ -592,12 +593,12 @@ bool ED_view3d_camera_lock_sync(const Depsgraph *depsgraph, View3D *v3d, RegionV
ED_view3d_to_m4(view_mat, rv3d->ofs, rv3d->viewquat, rv3d->dist);
- normalize_m4_m4(tmat, ob_camera_eval->obmat);
+ normalize_m4_m4(tmat, ob_camera_eval->object_to_world);
invert_m4_m4(imat, tmat);
mul_m4_m4m4(diff_mat, view_mat, imat);
- mul_m4_m4m4(parent_mat, diff_mat, root_parent_eval->obmat);
+ mul_m4_m4m4(parent_mat, diff_mat, root_parent_eval->object_to_world);
BKE_object_tfm_protected_backup(root_parent, &obtfm);
BKE_object_apply_mat4(root_parent, parent_mat, true, false);
@@ -1508,7 +1509,7 @@ void ED_view3d_to_m4(float mat[4][4], const float ofs[3], const float quat[4], c
void ED_view3d_from_object(const Object *ob, float ofs[3], float quat[4], float *dist, float *lens)
{
- ED_view3d_from_m4(ob->obmat, ofs, quat, dist);
+ ED_view3d_from_m4(ob->object_to_world, ofs, quat, dist);
if (lens) {
CameraParams params;
@@ -1555,7 +1556,7 @@ static bool view3d_camera_to_view_selected_impl(struct Main *bmain,
is_ortho_camera = true;
}
- copy_m4_m4(obmat_new, camera_ob_eval->obmat);
+ copy_m4_m4(obmat_new, camera_ob_eval->object_to_world);
copy_v3_v3(obmat_new[3], co);
/* only touch location */
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index d0db4de0c47..c630a1a5653 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -365,7 +365,7 @@ static void obmat_to_viewmat(RegionView3D *rv3d, Object *ob)
rv3d->view = RV3D_VIEW_USER; /* don't show the grid */
- normalize_m4_m4(bmat, ob->obmat);
+ normalize_m4_m4(bmat, ob->object_to_world);
invert_m4_m4(rv3d->viewmat, bmat);
/* view quat calculation, needed for add object */
@@ -404,12 +404,12 @@ void view3d_viewmatrix_set(Depsgraph *depsgraph,
Object *ob_eval = DEG_get_evaluated_object(depsgraph, v3d->ob_center);
float vec[3];
- copy_v3_v3(vec, ob_eval->obmat[3]);
+ copy_v3_v3(vec, ob_eval->object_to_world[3]);
if (ob_eval->type == OB_ARMATURE && v3d->ob_center_bone[0]) {
bPoseChannel *pchan = BKE_pose_channel_find_name(ob_eval->pose, v3d->ob_center_bone);
if (pchan) {
copy_v3_v3(vec, pchan->pose_mat[3]);
- mul_m4_v3(ob_eval->obmat, vec);
+ mul_m4_v3(ob_eval->object_to_world, vec);
}
}
translate_m4(rv3d->viewmat, -vec[0], -vec[1], -vec[2]);
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h
index 90f2795184b..1e260ecd292 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -469,7 +469,8 @@ typedef struct TransDataContainer {
/**
* Store matrix, this avoids having to have duplicate check all over
- * Typically: 'obedit->obmat' or 'poseobj->obmat', but may be used elsewhere too.
+ * Typically: 'obedit->object_to_world' or 'poseobj->object_to_world', but may be used elsewhere
+ * too.
*/
bool use_local_mat;
diff --git a/source/blender/editors/transform/transform_convert.c b/source/blender/editors/transform/transform_convert.c
index 7a68ee1bfbf..a5b2442f11c 100644
--- a/source/blender/editors/transform/transform_convert.c
+++ b/source/blender/editors/transform/transform_convert.c
@@ -981,7 +981,7 @@ static void init_TransDataContainers(TransInfo *t,
if (tc->use_local_mat) {
BLI_assert((t->flag & T_2D_EDIT) == 0);
- copy_m4_m4(tc->mat, objects[i]->obmat);
+ copy_m4_m4(tc->mat, objects[i]->object_to_world);
copy_m3_m4(tc->mat3, tc->mat);
/* for non-invertible scale matrices, invert_m4_m4_fallback()
* can still provide a valid pivot */
@@ -1235,8 +1235,8 @@ void transform_convert_clip_mirror_modifier_apply(TransDataContainer *tc)
if (mmd->mirror_ob) {
float obinv[4][4];
- invert_m4_m4(obinv, mmd->mirror_ob->obmat);
- mul_m4_m4m4(mtx, obinv, ob->obmat);
+ invert_m4_m4(obinv, mmd->mirror_ob->object_to_world);
+ mul_m4_m4m4(mtx, obinv, ob->object_to_world);
invert_m4_m4(imtx, mtx);
}
diff --git a/source/blender/editors/transform/transform_convert_armature.c b/source/blender/editors/transform/transform_convert_armature.c
index 6fd25d26c31..2e37f6b7c34 100644
--- a/source/blender/editors/transform/transform_convert_armature.c
+++ b/source/blender/editors/transform/transform_convert_armature.c
@@ -593,7 +593,7 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
td->ext->rotOrder = pchan->rotmode;
/* proper way to get parent transform + own transform + constraints transform */
- copy_m3_m4(omat, ob->obmat);
+ copy_m3_m4(omat, ob->object_to_world);
/* New code, using "generic" BKE_bone_parent_transform_calc_from_pchan(). */
{
@@ -955,7 +955,7 @@ static void createTransArmatureVerts(bContext *UNUSED(C), TransInfo *t)
bool mirror = ((arm->flag & ARM_MIRROR_EDIT) != 0);
BoneInitData *bid = tc->custom.type.data;
- copy_m3_m4(mtx, tc->obedit->obmat);
+ copy_m3_m4(mtx, tc->obedit->object_to_world);
pseudoinverse_m3_m3(smtx, mtx, PSEUDOINVERSE_EPSILON);
td = tc->data = MEM_callocN(tc->data_len * sizeof(TransData), "TransEditBone");
diff --git a/source/blender/editors/transform/transform_convert_curve.c b/source/blender/editors/transform/transform_convert_curve.c
index 404b1293208..13ba28ec3d0 100644
--- a/source/blender/editors/transform/transform_convert_curve.c
+++ b/source/blender/editors/transform/transform_convert_curve.c
@@ -174,7 +174,7 @@ static void createTransCurveVerts(bContext *UNUSED(C), TransInfo *t)
transform_mode_use_local_origins(t));
float mtx[3][3], smtx[3][3];
- copy_m3_m4(mtx, tc->obedit->obmat);
+ copy_m3_m4(mtx, tc->obedit->object_to_world);
pseudoinverse_m3_m3(smtx, mtx, PSEUDOINVERSE_EPSILON);
TransData *td = tc->data;
diff --git a/source/blender/editors/transform/transform_convert_lattice.c b/source/blender/editors/transform/transform_convert_lattice.c
index b77538dc249..e9b3401974b 100644
--- a/source/blender/editors/transform/transform_convert_lattice.c
+++ b/source/blender/editors/transform/transform_convert_lattice.c
@@ -66,7 +66,7 @@ static void createTransLatticeVerts(bContext *UNUSED(C), TransInfo *t)
}
tc->data = MEM_callocN(tc->data_len * sizeof(TransData), "TransObData(Lattice EditMode)");
- copy_m3_m4(mtx, tc->obedit->obmat);
+ copy_m3_m4(mtx, tc->obedit->object_to_world);
pseudoinverse_m3_m3(smtx, mtx, PSEUDOINVERSE_EPSILON);
td = tc->data;
diff --git a/source/blender/editors/transform/transform_convert_mball.c b/source/blender/editors/transform/transform_convert_mball.c
index 7ae93524d0b..c90052e9e8c 100644
--- a/source/blender/editors/transform/transform_convert_mball.c
+++ b/source/blender/editors/transform/transform_convert_mball.c
@@ -61,7 +61,7 @@ static void createTransMBallVerts(bContext *UNUSED(C), TransInfo *t)
tx = tc->data_ext = MEM_callocN(tc->data_len * sizeof(TransDataExtension),
"MetaElement_TransExtension");
- copy_m3_m4(mtx, tc->obedit->obmat);
+ copy_m3_m4(mtx, tc->obedit->object_to_world);
pseudoinverse_m3_m3(smtx, mtx, PSEUDOINVERSE_EPSILON);
for (ml = mb->editelems->first; ml; ml = ml->next) {
diff --git a/source/blender/editors/transform/transform_convert_mesh.c b/source/blender/editors/transform/transform_convert_mesh.c
index 7e237c9eb32..3192b1b6786 100644
--- a/source/blender/editors/transform/transform_convert_mesh.c
+++ b/source/blender/editors/transform/transform_convert_mesh.c
@@ -1527,7 +1527,7 @@ static void createTransEditVerts(bContext *UNUSED(C), TransInfo *t)
em, calc_single_islands, calc_island_center, calc_island_axismtx, &island_data);
}
- copy_m3_m4(mtx, tc->obedit->obmat);
+ copy_m3_m4(mtx, tc->obedit->object_to_world);
/* we use a pseudo-inverse so that when one of the axes is scaled to 0,
* matrix inversion still works and we can still moving along the other */
pseudoinverse_m3_m3(smtx, mtx, PSEUDOINVERSE_EPSILON);
diff --git a/source/blender/editors/transform/transform_convert_mesh_edge.c b/source/blender/editors/transform/transform_convert_mesh_edge.c
index 0ce4c592f53..fd62b199345 100644
--- a/source/blender/editors/transform/transform_convert_mesh_edge.c
+++ b/source/blender/editors/transform/transform_convert_mesh_edge.c
@@ -62,7 +62,7 @@ static void createTransEdge(bContext *UNUSED(C), TransInfo *t)
td = tc->data = MEM_callocN(tc->data_len * sizeof(TransData), "TransCrease");
- copy_m3_m4(mtx, tc->obedit->obmat);
+ copy_m3_m4(mtx, tc->obedit->object_to_world);
pseudoinverse_m3_m3(smtx, mtx, PSEUDOINVERSE_EPSILON);
/* create data we need */
diff --git a/source/blender/editors/transform/transform_convert_mesh_skin.c b/source/blender/editors/transform/transform_convert_mesh_skin.c
index 376e559181e..cb6108a4c45 100644
--- a/source/blender/editors/transform/transform_convert_mesh_skin.c
+++ b/source/blender/editors/transform/transform_convert_mesh_skin.c
@@ -130,7 +130,7 @@ static void createTransMeshSkin(bContext *UNUSED(C), TransInfo *t)
em, calc_single_islands, calc_island_center, calc_island_axismtx, &island_data);
}
- copy_m3_m4(mtx, tc->obedit->obmat);
+ copy_m3_m4(mtx, tc->obedit->object_to_world);
/* we use a pseudo-inverse so that when one of the axes is scaled to 0,
* matrix inversion still works and we can still moving along the other */
pseudoinverse_m3_m3(smtx, mtx, PSEUDOINVERSE_EPSILON);
diff --git a/source/blender/editors/transform/transform_convert_mesh_vert_cdata.c b/source/blender/editors/transform/transform_convert_mesh_vert_cdata.c
index 59836180166..d253261f458 100644
--- a/source/blender/editors/transform/transform_convert_mesh_vert_cdata.c
+++ b/source/blender/editors/transform/transform_convert_mesh_vert_cdata.c
@@ -131,7 +131,7 @@ static void createTransMeshVertCData(bContext *UNUSED(C), TransInfo *t)
em, calc_single_islands, calc_island_center, calc_island_axismtx, &island_data);
}
- copy_m3_m4(mtx, tc->obedit->obmat);
+ copy_m3_m4(mtx, tc->obedit->object_to_world);
/* we use a pseudo-inverse so that when one of the axes is scaled to 0,
* matrix inversion still works and we can still moving along the other */
pseudoinverse_m3_m3(smtx, mtx, PSEUDOINVERSE_EPSILON);
diff --git a/source/blender/editors/transform/transform_convert_object.c b/source/blender/editors/transform/transform_convert_object.c
index 0dcfd7206ad..55f7cd9b23d 100644
--- a/source/blender/editors/transform/transform_convert_object.c
+++ b/source/blender/editors/transform/transform_convert_object.c
@@ -158,14 +158,14 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
copy_qt_qt(td->ext->oquat, ob->quat);
}
/* update object's loc/rot to get current rigid body transform */
- mat4_to_loc_rot_size(ob->loc, rot, scale, ob->obmat);
+ mat4_to_loc_rot_size(ob->loc, rot, scale, ob->object_to_world);
sub_v3_v3(ob->loc, ob->dloc);
BKE_object_mat3_to_rot(ob, rot, false); /* drot is already corrected here */
}
}
/* axismtx has the real orientation */
- transform_orientations_create_from_axis(td->axismtx, UNPACK3(ob->obmat));
+ transform_orientations_create_from_axis(td->axismtx, UNPACK3(ob->object_to_world));
if (t->orient_type_mask & (1 << V3D_ORIENT_GIMBAL)) {
if (!gimbal_axis_object(ob, td->ext->axismtx_gimbal)) {
copy_m3_m3(td->ext->axismtx_gimbal, td->axismtx);
@@ -192,7 +192,7 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
* More proper solution would be to make a shallow copy of the object and
* evaluate that, and access matrix of that evaluated copy of the object.
* Might be more tricky than it sounds, if some logic later on accesses the
- * object matrix via td->ob->obmat. */
+ * object matrix via td->ob->object_to_world. */
Object *object_eval = DEG_get_evaluated_object(t->depsgraph, ob);
if (skip_invert == false && constinv == false) {
object_eval->transflag |= OB_NO_CONSTRAINTS; /* BKE_object_where_is_calc checks this */
@@ -208,7 +208,7 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
}
/* Copy newly evaluated fields to the original object, similar to how
* active dependency graph will do it. */
- copy_m4_m4(ob->obmat, object_eval->obmat);
+ copy_m4_m4(ob->object_to_world, object_eval->object_to_world);
/* Only copy negative scale flag, this is the only flag which is modified by
* the BKE_object_where_is_calc(). The rest of the flags we need to keep,
* otherwise we might lose dupli flags (see T61787). */
@@ -258,9 +258,9 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
copy_v3_v3(td->ext->isize, ob->scale);
copy_v3_v3(td->ext->dscale, ob->dscale);
- copy_v3_v3(td->center, ob->obmat[3]);
+ copy_v3_v3(td->center, ob->object_to_world[3]);
- copy_m4_m4(td->ext->obmat, ob->obmat);
+ copy_m4_m4(td->ext->obmat, ob->object_to_world);
/* is there a need to set the global<->data space conversion matrices? */
if (ob->parent || constinv) {
@@ -271,7 +271,7 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
* done, as it doesn't work well.
*/
BKE_object_to_mat3(ob, obmtx);
- copy_m3_m4(totmat, ob->obmat);
+ copy_m3_m4(totmat, ob->object_to_world);
/* If the object scale is zero on any axis, this might result in a zero matrix.
* In this case, the transformation would not do anything, see: T50103. */
diff --git a/source/blender/editors/transform/transform_convert_object_texspace.c b/source/blender/editors/transform/transform_convert_object_texspace.c
index 839bf6b77b3..b4c1c134d49 100644
--- a/source/blender/editors/transform/transform_convert_object_texspace.c
+++ b/source/blender/editors/transform/transform_convert_object_texspace.c
@@ -67,8 +67,8 @@ static void createTransTexspace(bContext *UNUSED(C), TransInfo *t)
td->flag = TD_SELECTED;
td->ob = ob;
- copy_m3_m4(td->mtx, ob->obmat);
- copy_m3_m4(td->axismtx, ob->obmat);
+ copy_m3_m4(td->mtx, ob->object_to_world);
+ copy_m3_m4(td->axismtx, ob->object_to_world);
normalize_m3(td->axismtx);
pseudoinverse_m3_m3(td->smtx, td->mtx, PSEUDOINVERSE_EPSILON);
diff --git a/source/blender/editors/transform/transform_convert_particle.c b/source/blender/editors/transform/transform_convert_particle.c
index 3e056b6a048..e6ff730d4d1 100644
--- a/source/blender/editors/transform/transform_convert_particle.c
+++ b/source/blender/editors/transform/transform_convert_particle.c
@@ -95,7 +95,7 @@ static void createTransParticleVerts(bContext *UNUSED(C), TransInfo *t)
unit_m4(mat);
- invert_m4_m4(ob->imat, ob->obmat);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
for (i = 0, point = edit->points; i < edit->totpoint; i++, point++) {
TransData *head, *tail;
diff --git a/source/blender/editors/transform/transform_convert_sculpt.c b/source/blender/editors/transform/transform_convert_sculpt.c
index f4f2e2a1c6e..cdbf497c584 100644
--- a/source/blender/editors/transform/transform_convert_sculpt.c
+++ b/source/blender/editors/transform/transform_convert_sculpt.c
@@ -49,7 +49,7 @@ static void createTransSculpt(bContext *C, TransInfo *t)
td->flag = TD_SELECTED;
copy_v3_v3(td->center, ss->pivot_pos);
- mul_m4_v3(ob->obmat, td->center);
+ mul_m4_v3(ob->object_to_world, td->center);
td->ob = ob;
td->loc = ss->pivot_pos;
@@ -60,16 +60,16 @@ static void createTransSculpt(bContext *C, TransInfo *t)
}
float obmat_inv[3][3];
- copy_m3_m4(obmat_inv, ob->obmat);
+ copy_m3_m4(obmat_inv, ob->object_to_world);
invert_m3(obmat_inv);
td->ext->rot = NULL;
td->ext->rotAxis = NULL;
td->ext->rotAngle = NULL;
td->ext->quat = ss->pivot_rot;
- copy_m4_m4(td->ext->obmat, ob->obmat);
+ copy_m4_m4(td->ext->obmat, ob->object_to_world);
copy_m3_m3(td->ext->l_smtx, obmat_inv);
- copy_m3_m4(td->ext->r_mtx, ob->obmat);
+ copy_m3_m4(td->ext->r_mtx, ob->object_to_world);
copy_m3_m3(td->ext->r_smtx, obmat_inv);
copy_qt_qt(td->ext->iquat, ss->pivot_rot);
@@ -83,8 +83,8 @@ static void createTransSculpt(bContext *C, TransInfo *t)
copy_v3_v3(td->ext->isize, ss->init_pivot_scale);
copy_m3_m3(td->smtx, obmat_inv);
- copy_m3_m4(td->mtx, ob->obmat);
- copy_m3_m4(td->axismtx, ob->obmat);
+ copy_m3_m4(td->mtx, ob->object_to_world);
+ copy_m3_m4(td->axismtx, ob->object_to_world);
BLI_assert(!(t->options & CTX_PAINT_CURVE));
ED_sculpt_init_transform(C, ob, t->mval, t->undo_name);
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 301eac4536e..e1f93bf881b 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -1063,7 +1063,7 @@ bool calculateCenterActive(TransInfo *t, bool select_only, float r_center[3])
}
if (tc->obedit) {
if (ED_object_calc_active_center_for_editmode(tc->obedit, select_only, r_center)) {
- mul_m4_v3(tc->obedit->obmat, r_center);
+ mul_m4_v3(tc->obedit->object_to_world, r_center);
return true;
}
}
@@ -1071,7 +1071,7 @@ bool calculateCenterActive(TransInfo *t, bool select_only, float r_center[3])
BKE_view_layer_synced_ensure(t->scene, t->view_layer);
Object *ob = BKE_view_layer_active_object_get(t->view_layer);
if (ED_object_calc_active_center_for_posemode(ob, select_only, r_center)) {
- mul_m4_v3(ob->obmat, r_center);
+ mul_m4_v3(ob->object_to_world, r_center);
return true;
}
}
@@ -1088,7 +1088,7 @@ bool calculateCenterActive(TransInfo *t, bool select_only, float r_center[3])
BKE_view_layer_synced_ensure(t->scene, t->view_layer);
Base *base = BKE_view_layer_active_base_get(t->view_layer);
if (base && ((!select_only) || ((base->flag & BASE_SELECTED) != 0))) {
- copy_v3_v3(r_center, base->object->obmat[3]);
+ copy_v3_v3(r_center, base->object->object_to_world[3]);
return true;
}
}
diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c
index f3d17559a63..71a449ad10c 100644
--- a/source/blender/editors/transform/transform_gizmo_3d.c
+++ b/source/blender/editors/transform/transform_gizmo_3d.c
@@ -581,12 +581,12 @@ bool gimbal_axis_pose(Object *ob, const bPoseChannel *pchan, float gmat[3][3])
mul_m3_m3m3(mat, parent_mat, tmat);
/* needed if object transformation isn't identity */
- copy_m3_m4(obmat, ob->obmat);
+ copy_m3_m4(obmat, ob->object_to_world);
mul_m3_m3m3(gmat, obmat, mat);
}
else {
/* needed if object transformation isn't identity */
- copy_m3_m4(obmat, ob->obmat);
+ copy_m3_m4(obmat, ob->object_to_world);
mul_m3_m3m3(gmat, obmat, tmat);
}
@@ -608,7 +608,7 @@ bool gimbal_axis_object(Object *ob, float gmat[3][3])
if (ob->parent) {
float parent_mat[3][3];
- copy_m3_m4(parent_mat, ob->parent->obmat);
+ copy_m3_m4(parent_mat, ob->parent->object_to_world);
normalize_m3(parent_mat);
mul_m3_m3m3(gmat, parent_mat, gmat);
}
@@ -675,14 +675,14 @@ int ED_transform_calc_gizmo_stats(const bContext *C,
copy_m3_m4(tbounds->axis, rv3d->twmat);
if (params->use_local_axis && (ob && ob->mode & (OB_MODE_EDIT | OB_MODE_POSE))) {
float diff_mat[3][3];
- copy_m3_m4(diff_mat, ob->obmat);
+ copy_m3_m4(diff_mat, ob->object_to_world);
normalize_m3(diff_mat);
invert_m3(diff_mat);
mul_m3_m3m3(tbounds->axis, tbounds->axis, diff_mat);
normalize_m3(tbounds->axis);
tbounds->use_matrix_space = true;
- copy_m4_m4(tbounds->matrix_space, ob->obmat);
+ copy_m4_m4(tbounds->matrix_space, ob->object_to_world);
}
if (is_gp_edit) {
@@ -751,7 +751,7 @@ int ED_transform_calc_gizmo_stats(const bContext *C,
#define FOREACH_EDIT_OBJECT_BEGIN(ob_iter, use_mat_local) \
{ \
- invert_m4_m4(obedit->imat, obedit->obmat); \
+ invert_m4_m4(obedit->world_to_object, obedit->object_to_world); \
uint objects_len = 0; \
Object **objects = BKE_view_layer_array_from_objects_in_edit_mode( \
scene, view_layer, CTX_wm_view3d(C), &objects_len); \
@@ -780,7 +780,7 @@ int ED_transform_calc_gizmo_stats(const bContext *C,
float mat_local[4][4];
if (use_mat_local) {
- mul_m4_m4m4(mat_local, obedit->imat, ob_iter->obmat);
+ mul_m4_m4m4(mat_local, obedit->world_to_object, ob_iter->object_to_world);
}
BM_ITER_MESH (eve, &iter, bm, BM_VERTS_OF_MESH) {
@@ -800,7 +800,7 @@ int ED_transform_calc_gizmo_stats(const bContext *C,
float mat_local[4][4];
if (use_mat_local) {
- mul_m4_m4m4(mat_local, obedit->imat, ob_iter->obmat);
+ mul_m4_m4m4(mat_local, obedit->world_to_object, ob_iter->object_to_world);
}
LISTBASE_FOREACH (EditBone *, ebo, arm->edbo) {
if (EBONE_VISIBLE(arm, ebo)) {
@@ -833,7 +833,7 @@ int ED_transform_calc_gizmo_stats(const bContext *C,
float mat_local[4][4];
if (use_mat_local) {
- mul_m4_m4m4(mat_local, obedit->imat, ob_iter->obmat);
+ mul_m4_m4m4(mat_local, obedit->world_to_object, ob_iter->object_to_world);
}
nu = nurbs->first;
@@ -893,7 +893,7 @@ int ED_transform_calc_gizmo_stats(const bContext *C,
float mat_local[4][4];
if (use_mat_local) {
- mul_m4_m4m4(mat_local, obedit->imat, ob_iter->obmat);
+ mul_m4_m4m4(mat_local, obedit->world_to_object, ob_iter->object_to_world);
}
LISTBASE_FOREACH (MetaElem *, ml, mb->editelems) {
@@ -913,7 +913,7 @@ int ED_transform_calc_gizmo_stats(const bContext *C,
float mat_local[4][4];
if (use_mat_local) {
- mul_m4_m4m4(mat_local, obedit->imat, ob_iter->obmat);
+ mul_m4_m4m4(mat_local, obedit->world_to_object, ob_iter->object_to_world);
}
while (a--) {
@@ -933,13 +933,13 @@ int ED_transform_calc_gizmo_stats(const bContext *C,
/* selection center */
if (totsel) {
mul_v3_fl(tbounds->center, 1.0f / (float)totsel); /* centroid! */
- mul_m4_v3(obedit->obmat, tbounds->center);
- mul_m4_v3(obedit->obmat, tbounds->min);
- mul_m4_v3(obedit->obmat, tbounds->max);
+ mul_m4_v3(obedit->object_to_world, tbounds->center);
+ mul_m4_v3(obedit->object_to_world, tbounds->min);
+ mul_m4_v3(obedit->object_to_world, tbounds->max);
}
}
else if (ob && (ob->mode & OB_MODE_POSE)) {
- invert_m4_m4(ob->imat, ob->obmat);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
uint objects_len = 0;
Object **objects = BKE_object_pose_array_get(scene, view_layer, v3d, &objects_len);
@@ -954,7 +954,7 @@ int ED_transform_calc_gizmo_stats(const bContext *C,
float mat_local[4][4];
if (use_mat_local) {
- mul_m4_m4m4(mat_local, ob->imat, ob_iter->obmat);
+ mul_m4_m4m4(mat_local, ob->world_to_object, ob_iter->object_to_world);
}
/* Use channels to get stats. */
@@ -971,18 +971,18 @@ int ED_transform_calc_gizmo_stats(const bContext *C,
if (totsel) {
mul_v3_fl(tbounds->center, 1.0f / (float)totsel); /* centroid! */
- mul_m4_v3(ob->obmat, tbounds->center);
- mul_m4_v3(ob->obmat, tbounds->min);
- mul_m4_v3(ob->obmat, tbounds->max);
+ mul_m4_v3(ob->object_to_world, tbounds->center);
+ mul_m4_v3(ob->object_to_world, tbounds->min);
+ mul_m4_v3(ob->object_to_world, tbounds->max);
}
}
else if (ob && (ob->mode & OB_MODE_ALL_PAINT)) {
if (ob->mode & OB_MODE_SCULPT) {
totsel = 1;
- calc_tw_center_with_matrix(tbounds, ob->sculpt->pivot_pos, false, ob->obmat);
- mul_m4_v3(ob->obmat, tbounds->center);
- mul_m4_v3(ob->obmat, tbounds->min);
- mul_m4_v3(ob->obmat, tbounds->max);
+ calc_tw_center_with_matrix(tbounds, ob->sculpt->pivot_pos, false, ob->object_to_world);
+ mul_m4_v3(ob->object_to_world, tbounds->center);
+ mul_m4_v3(ob->object_to_world, tbounds->min);
+ mul_m4_v3(ob->object_to_world, tbounds->max);
}
}
else if (ob && ob->mode & OB_MODE_PARTICLE_EDIT) {
@@ -1037,12 +1037,12 @@ int ED_transform_calc_gizmo_stats(const bContext *C,
}
if (params->use_only_center || (bb == NULL)) {
- calc_tw_center(tbounds, base->object->obmat[3]);
+ calc_tw_center(tbounds, base->object->object_to_world[3]);
}
else {
for (uint j = 0; j < 8; j++) {
float co[3];
- mul_v3_m4v3(co, base->object->obmat, bb->vec[j]);
+ mul_v3_m4v3(co, base->object->object_to_world, bb->vec[j]);
calc_tw_center(tbounds, co);
}
}
diff --git a/source/blender/editors/transform/transform_mode.c b/source/blender/editors/transform/transform_mode.c
index 2eaeaf92c86..aeceedf0690 100644
--- a/source/blender/editors/transform/transform_mode.c
+++ b/source/blender/editors/transform/transform_mode.c
@@ -1041,7 +1041,7 @@ void ElementResize(const TransInfo *t,
if (t->options & CTX_POSE_BONE) {
/* Without this, the resulting location of scaled bones aren't correct,
* especially noticeable scaling root or disconnected bones around the cursor, see T92515. */
- mul_mat3_m4_v3(tc->poseobj->obmat, vec);
+ mul_mat3_m4_v3(tc->poseobj->object_to_world, vec);
}
mul_m3_v3(td->smtx, vec);
}
diff --git a/source/blender/editors/transform/transform_mode_edge_slide.c b/source/blender/editors/transform/transform_mode_edge_slide.c
index 5baf06006d9..5cdb4d3bf61 100644
--- a/source/blender/editors/transform/transform_mode_edge_slide.c
+++ b/source/blender/editors/transform/transform_mode_edge_slide.c
@@ -1149,7 +1149,7 @@ void drawEdgeSlide(TransInfo *t)
GPU_blend(GPU_BLEND_ALPHA);
GPU_matrix_push();
- GPU_matrix_mul(TRANS_DATA_CONTAINER_FIRST_OK(t)->obedit->obmat);
+ GPU_matrix_mul(TRANS_DATA_CONTAINER_FIRST_OK(t)->obedit->object_to_world);
uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT);
diff --git a/source/blender/editors/transform/transform_mode_vert_slide.c b/source/blender/editors/transform/transform_mode_vert_slide.c
index d7c4d862b23..a54888fe515 100644
--- a/source/blender/editors/transform/transform_mode_vert_slide.c
+++ b/source/blender/editors/transform/transform_mode_vert_slide.c
@@ -167,7 +167,7 @@ static void calcVertSlideMouseActiveEdges(struct TransInfo *t, const int mval[2]
float dir_dot;
sub_v3_v3v3(tdir, sv->co_orig_3d, sv->co_link_orig_3d[j]);
- mul_mat3_m4_v3(TRANS_DATA_CONTAINER_FIRST_OK(t)->obedit->obmat, tdir);
+ mul_mat3_m4_v3(TRANS_DATA_CONTAINER_FIRST_OK(t)->obedit->object_to_world, tdir);
project_plane_v3_v3v3(tdir, tdir, t->viewinv[2]);
normalize_v3(tdir);
@@ -382,7 +382,7 @@ void drawVertSlide(TransInfo *t)
GPU_blend(GPU_BLEND_ALPHA);
GPU_matrix_push();
- GPU_matrix_mul(TRANS_DATA_CONTAINER_FIRST_OK(t)->obedit->obmat);
+ GPU_matrix_mul(TRANS_DATA_CONTAINER_FIRST_OK(t)->obedit->object_to_world);
GPU_line_width(line_size);
@@ -437,15 +437,16 @@ void drawVertSlide(TransInfo *t)
xy_delta[0] = t->mval[0] - t->mouse.imval[0];
xy_delta[1] = t->mval[1] - t->mouse.imval[1];
- mul_v3_m4v3(
- co_orig_3d, TRANS_DATA_CONTAINER_FIRST_OK(t)->obedit->obmat, curr_sv->co_orig_3d);
+ mul_v3_m4v3(co_orig_3d,
+ TRANS_DATA_CONTAINER_FIRST_OK(t)->obedit->object_to_world,
+ curr_sv->co_orig_3d);
zfac = ED_view3d_calc_zfac(t->region->regiondata, co_orig_3d);
ED_view3d_win_to_delta(t->region, xy_delta, zfac, co_dest_3d);
- invert_m4_m4(TRANS_DATA_CONTAINER_FIRST_OK(t)->obedit->imat,
- TRANS_DATA_CONTAINER_FIRST_OK(t)->obedit->obmat);
- mul_mat3_m4_v3(TRANS_DATA_CONTAINER_FIRST_OK(t)->obedit->imat, co_dest_3d);
+ invert_m4_m4(TRANS_DATA_CONTAINER_FIRST_OK(t)->obedit->world_to_object,
+ TRANS_DATA_CONTAINER_FIRST_OK(t)->obedit->object_to_world);
+ mul_mat3_m4_v3(TRANS_DATA_CONTAINER_FIRST_OK(t)->obedit->world_to_object, co_dest_3d);
add_v3_v3(co_dest_3d, curr_sv->co_orig_3d);
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 212df5978e4..66fee01f864 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -126,7 +126,7 @@ static TransformOrientation *createObjectSpace(bContext *C,
ob = base->object;
- copy_m3_m4(mat, ob->obmat);
+ copy_m3_m4(mat, ob->object_to_world);
normalize_m3(mat);
/* use object name if no name is given */
@@ -532,7 +532,7 @@ short ED_transform_calc_orientation_from_type_ex(const Scene *scene,
ED_getTransformOrientationMatrix(scene, view_layer, v3d, ob, obedit, pivot_point, r_mat);
}
else {
- transform_orientations_create_from_axis(r_mat, UNPACK3(ob->obmat));
+ transform_orientations_create_from_axis(r_mat, UNPACK3(ob->object_to_world));
}
break;
}
@@ -764,7 +764,7 @@ int getTransformOrientation_ex(const Scene *scene,
float imat[3][3], mat[3][3];
/* we need the transpose of the inverse for a normal... */
- copy_m3_m4(imat, ob->obmat);
+ copy_m3_m4(imat, ob->object_to_world);
invert_m3_m3(mat, imat);
transpose_m3(mat);
@@ -1192,8 +1192,8 @@ int getTransformOrientation_ex(const Scene *scene,
if (result == ORIENTATION_EDGE) {
float tvec[3];
- mul_mat3_m4_v3(ob->obmat, normal);
- mul_mat3_m4_v3(ob->obmat, plane);
+ mul_mat3_m4_v3(ob->object_to_world, normal);
+ mul_mat3_m4_v3(ob->object_to_world, plane);
/* align normal to edge direction (so normal is perpendicular to the plane).
* 'ORIENTATION_EDGE' will do the other way around.
@@ -1235,7 +1235,7 @@ int getTransformOrientation_ex(const Scene *scene,
/* use for both active & all */
if (ok) {
/* we need the transpose of the inverse for a normal... */
- copy_m3_m4(imat, ob->obmat);
+ copy_m3_m4(imat, ob->object_to_world);
invert_m3_m3(mat, imat);
transpose_m3(mat);
@@ -1267,8 +1267,8 @@ int getTransformOrientation_ex(const Scene *scene,
}
if (ok) {
- copy_v3_v3(normal, ob->obmat[2]);
- copy_v3_v3(plane, ob->obmat[1]);
+ copy_v3_v3(normal, ob->object_to_world[2]);
+ copy_v3_v3(plane, ob->object_to_world[1]);
}
}
result = ORIENTATION_NORMAL;
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index 672d947936d..11cb57dc911 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -372,7 +372,7 @@ static bool applyFaceProject(TransInfo *t, TransDataContainer *tc, TransData *td
}
else if (t->options & CTX_OBJECT) {
BKE_object_eval_transform_all(t->depsgraph, t->scene, td->ob);
- copy_v3_v3(iloc, td->ob->obmat[3]);
+ copy_v3_v3(iloc, td->ob->object_to_world[3]);
}
if (ED_view3d_project_float_global(t->region, iloc, mval_fl, V3D_PROJ_TEST_NOP) !=
@@ -444,7 +444,7 @@ static void applyFaceNearest(TransInfo *t, TransDataContainer *tc, TransData *td
}
else if (t->options & CTX_OBJECT) {
BKE_object_eval_transform_all(t->depsgraph, t->scene, td->ob);
- copy_v3_v3(init_loc, td->ob->obmat[3]);
+ copy_v3_v3(init_loc, td->ob->object_to_world[3]);
}
eSnapMode hit = ED_transform_snap_object_project_view3d(
diff --git a/source/blender/editors/transform/transform_snap_object.cc b/source/blender/editors/transform/transform_snap_object.cc
index 7971e1ca9af..87c467d44d8 100644
--- a/source/blender/editors/transform/transform_snap_object.cc
+++ b/source/blender/editors/transform/transform_snap_object.cc
@@ -35,6 +35,7 @@
#include "BKE_layer.h"
#include "BKE_mesh.h"
#include "BKE_mesh_runtime.h"
+#include "BKE_mesh_wrapper.h"
#include "BKE_object.h"
#include "BKE_tracking.h"
@@ -61,41 +62,6 @@ enum eViewProj {
VIEW_PROJ_PERSP = -1,
};
-/* SnapObjectContext.cache.mesh_map */
-struct SnapData_Mesh {
- /* Loose edges, loose verts. */
- BVHTree *bvhtree[2];
- bool cached[2];
-
- /* Looptris. */
- BVHTreeFromMesh treedata_mesh;
-
- const MPoly *poly;
- bool has_looptris;
- bool has_loose_edge;
- bool has_loose_vert;
-
- void clear()
- {
- for (int i = 0; i < ARRAY_SIZE(this->bvhtree); i++) {
- if (!this->cached[i]) {
- BLI_bvhtree_free(this->bvhtree[i]);
- }
- this->bvhtree[i] = nullptr;
- }
- free_bvhtree_from_mesh(&this->treedata_mesh);
- }
-
- ~SnapData_Mesh()
- {
- this->clear();
- }
-
-#ifdef WITH_CXX_GUARDEDALLOC
- MEM_CXX_CLASS_ALLOC_FUNCS("SnapData_Mesh")
-#endif
-};
-
/* SnapObjectContext.cache.editmesh_map */
struct SnapData_EditMesh {
/* Verts, Edges. */
@@ -134,7 +100,6 @@ struct SnapObjectContext {
int flag;
- Map<const Object *, std::unique_ptr<SnapData_Mesh>> mesh_caches;
Map<const BMEditMesh *, std::unique_ptr<SnapData_EditMesh>> editmesh_caches;
/* Filter data, returns true to check this value */
@@ -161,6 +126,28 @@ struct SnapObjectContext {
eSnapMode snap_to_flag;
bool has_occlusion_plane; /* Ignore plane of occlusion in curves. */
} runtime;
+
+ /* Output. */
+ struct {
+ /* Location of snapped point on target surface. */
+ float loc[3];
+ /* Normal of snapped point on target surface. */
+ float no[3];
+ /* Index of snapped element on target object (-1 when no valid index is found). */
+ int index;
+ /* Matrix of target object (may not be #Object.object_to_world with dupli-instances). */
+ float obmat[4][4];
+ /* List of #SnapObjectHitDepth (caller must free). */
+ ListBase *hit_list;
+ /* Snapped object. */
+ Object *ob;
+ /* Snapped data. */
+ ID *data;
+
+ float dist_sq;
+
+ bool is_edit;
+ } ret;
};
/** \} */
@@ -176,37 +163,48 @@ struct SnapObjectContext {
* - In rare cases there is no evaluated mesh available and a null result doesn't imply an
* edit-mesh, so callers need to account for a null edit-mesh too, see: T96536.
*/
-static const Mesh *mesh_for_snap(Object *ob_eval, eSnapEditType edit_mode_type, bool *r_use_hide)
+static ID *data_for_snap(Object *ob_eval, eSnapEditType edit_mode_type, bool *r_use_hide)
{
- const Mesh *me_eval = BKE_object_get_evaluated_mesh(ob_eval);
bool use_hide = false;
- if (BKE_object_is_in_editmode(ob_eval)) {
- if (edit_mode_type == SNAP_GEOM_EDIT) {
- return nullptr;
- }
- const Mesh *editmesh_eval_final = BKE_object_get_editmesh_eval_final(ob_eval);
- const Mesh *editmesh_eval_cage = BKE_object_get_editmesh_eval_cage(ob_eval);
+ switch (ob_eval->type) {
+ case OB_MESH: {
+ Mesh *me_eval = BKE_object_get_evaluated_mesh(ob_eval);
+ if (BKE_object_is_in_editmode(ob_eval)) {
+ if (edit_mode_type == SNAP_GEOM_EDIT) {
+ return nullptr;
+ }
+
+ Mesh *editmesh_eval_final = BKE_object_get_editmesh_eval_final(ob_eval);
+ Mesh *editmesh_eval_cage = BKE_object_get_editmesh_eval_cage(ob_eval);
- if ((edit_mode_type == SNAP_GEOM_FINAL) && editmesh_eval_final) {
- if (editmesh_eval_final->runtime->wrapper_type == ME_WRAPPER_TYPE_BMESH) {
- return nullptr;
+ if ((edit_mode_type == SNAP_GEOM_FINAL) && editmesh_eval_final) {
+ if (editmesh_eval_final->runtime->wrapper_type == ME_WRAPPER_TYPE_BMESH) {
+ return nullptr;
+ }
+ me_eval = editmesh_eval_final;
+ use_hide = true;
+ }
+ else if ((edit_mode_type == SNAP_GEOM_CAGE) && editmesh_eval_cage) {
+ if (editmesh_eval_cage->runtime->wrapper_type == ME_WRAPPER_TYPE_BMESH) {
+ return nullptr;
+ }
+ me_eval = editmesh_eval_cage;
+ use_hide = true;
+ }
}
- me_eval = editmesh_eval_final;
- use_hide = true;
- }
- else if ((edit_mode_type == SNAP_GEOM_CAGE) && editmesh_eval_cage) {
- if (editmesh_eval_cage->runtime->wrapper_type == ME_WRAPPER_TYPE_BMESH) {
- return nullptr;
+ if (r_use_hide) {
+ *r_use_hide = use_hide;
}
- me_eval = editmesh_eval_cage;
- use_hide = true;
+ return (ID *)me_eval;
}
+ default:
+ break;
}
if (r_use_hide) {
*r_use_hide = use_hide;
}
- return me_eval;
+ return (ID *)ob_eval->data;
}
/** \} */
@@ -236,96 +234,32 @@ static void snap_editmesh_minmax(SnapObjectContext *sctx,
}
}
-static SnapData_Mesh *snap_object_data_mesh_get(SnapObjectContext *sctx,
- Object *ob_eval,
- const Mesh *me_eval,
- bool use_hide)
+static void snap_object_data_mesh_get(SnapObjectContext *sctx,
+ Object *ob_eval,
+ const Mesh *me_eval,
+ bool use_hide,
+ BVHTreeFromMesh *r_treedata)
{
- SnapData_Mesh *sod;
- bool init = false;
-
const Span<MVert> verts = me_eval->verts();
- const Span<MEdge> edges = me_eval->edges();
const Span<MPoly> polys = me_eval->polys();
const Span<MLoop> loops = me_eval->loops();
- if (std::unique_ptr<SnapData_Mesh> *sod_p = sctx->mesh_caches.lookup_ptr(ob_eval)) {
- sod = sod_p->get();
- bool is_dirty = false;
- if (sod->treedata_mesh.tree && sod->treedata_mesh.cached &&
- !bvhcache_has_tree(me_eval->runtime->bvh_cache, sod->treedata_mesh.tree)) {
- /* The tree is owned by the Mesh and may have been freed since we last used. */
- is_dirty = true;
- }
- else if (sod->bvhtree[0] && sod->cached[0] &&
- !bvhcache_has_tree(me_eval->runtime->bvh_cache, sod->bvhtree[0])) {
- /* The tree is owned by the Mesh and may have been freed since we last used. */
- is_dirty = true;
- }
- else if (sod->bvhtree[1] && sod->cached[1] &&
- !bvhcache_has_tree(me_eval->runtime->bvh_cache, sod->bvhtree[1])) {
- /* The tree is owned by the Mesh and may have been freed since we last used. */
- is_dirty = true;
- }
- else if (sod->treedata_mesh.looptri != me_eval->looptris().data()) {
- is_dirty = true;
- }
- else if (sod->treedata_mesh.vert != verts.data()) {
- is_dirty = true;
- }
- else if (sod->treedata_mesh.loop != loops.data()) {
- is_dirty = true;
- }
- else if (sod->treedata_mesh.edge != edges.data()) {
- is_dirty = true;
- }
- else if (sod->poly != polys.data()) {
- is_dirty = true;
- }
-
- if (is_dirty) {
- sod->clear();
- init = true;
- }
- }
- else {
- if (ob_eval->type == OB_MESH) {
- /* Any existing #SnapData_EditMesh is now invalid. */
- sctx->editmesh_caches.remove(BKE_editmesh_from_object(ob_eval));
- }
-
- std::unique_ptr<SnapData_Mesh> sod_ptr = std::make_unique<SnapData_Mesh>();
- sod = sod_ptr.get();
- sctx->mesh_caches.add_new(ob_eval, std::move(sod_ptr));
-
- init = true;
+ if (ob_eval->type == OB_MESH) {
+ /* Any existing #SnapData_EditMesh is now invalid. */
+ sctx->editmesh_caches.remove(BKE_editmesh_from_object(ob_eval));
}
- if (init) {
- /* The BVHTree from looptris is always required. */
- BLI_assert(sod->treedata_mesh.tree == nullptr);
- BKE_bvhtree_from_mesh_get(&sod->treedata_mesh,
- me_eval,
- use_hide ? BVHTREE_FROM_LOOPTRI_NO_HIDDEN : BVHTREE_FROM_LOOPTRI,
- 4);
-
- BLI_assert(sod->treedata_mesh.vert == verts.data());
- BLI_assert(!verts.data() || sod->treedata_mesh.vert_normals);
- BLI_assert(sod->treedata_mesh.loop == loops.data());
- BLI_assert(!polys.data() || sod->treedata_mesh.looptri);
+ /* The BVHTree from looptris is always required. */
+ BKE_bvhtree_from_mesh_get(
+ r_treedata, me_eval, use_hide ? BVHTREE_FROM_LOOPTRI_NO_HIDDEN : BVHTREE_FROM_LOOPTRI, 4);
- sod->has_looptris = sod->treedata_mesh.tree != nullptr;
+ BLI_assert(r_treedata->vert == verts.data());
+ BLI_assert(!verts.data() || r_treedata->vert_normals);
+ BLI_assert(r_treedata->loop == loops.data());
+ BLI_assert(!polys.data() || r_treedata->looptri);
+ BLI_assert(!r_treedata->tree || r_treedata->looptri);
- /* Required for snapping with occlusion. */
- sod->treedata_mesh.edge = edges.data();
- sod->poly = polys.data();
-
- /* Start assuming that it has each of these element types. */
- sod->has_loose_edge = true;
- sod->has_loose_vert = true;
- }
-
- return sod;
+ UNUSED_VARS_NDEBUG(verts, polys, loops);
}
/* Searches for the #Mesh_Runtime associated with the object that is most likely to be updated due
@@ -352,9 +286,6 @@ static SnapData_EditMesh *snap_object_data_editmesh_get(SnapObjectContext *sctx,
SnapData_EditMesh *sod;
bool init = false;
- /* Any existing #SnapData_Mesh is now invalid. */
- sctx->mesh_caches.remove(ob_eval);
-
if (std::unique_ptr<SnapData_EditMesh> *sod_p = sctx->editmesh_caches.lookup_ptr(em)) {
sod = sod_p->get();
bool is_dirty = false;
@@ -411,15 +342,6 @@ static SnapData_EditMesh *snap_object_data_editmesh_get(SnapObjectContext *sctx,
return sod;
}
-static BVHTreeFromMesh *snap_object_data_mesh_treedata_get(SnapObjectContext *sctx,
- Object *ob_eval,
- const Mesh *me_eval,
- bool use_hide)
-{
- SnapData_Mesh *sod = snap_object_data_mesh_get(sctx, ob_eval, me_eval, use_hide);
- return &sod->treedata_mesh;
-}
-
static BVHTreeFromEditMesh *snap_object_data_editmesh_treedata_get(SnapObjectContext *sctx,
Object *ob_eval,
BMEditMesh *em)
@@ -473,12 +395,14 @@ static BVHTreeFromEditMesh *snap_object_data_editmesh_treedata_get(SnapObjectCon
/** \name Iterator
* \{ */
-using IterSnapObjsCallback = void (*)(SnapObjectContext *sctx,
- const SnapObjectParams *params,
- Object *ob_eval,
- const float obmat[4][4],
- bool is_object_active,
- void *data);
+using IterSnapObjsCallback = eSnapMode (*)(SnapObjectContext *sctx,
+ const SnapObjectParams *params,
+ Object *ob_eval,
+ ID *ob_data,
+ const float obmat[4][4],
+ bool is_object_active,
+ bool use_hide,
+ void *data);
static bool snap_object_is_snappable(const SnapObjectContext *sctx,
const eSnapTargetSelect snap_target_select,
@@ -538,11 +462,14 @@ static bool snap_object_is_snappable(const SnapObjectContext *sctx,
/**
* Walks through all objects in the scene to create the list of objects to snap.
*/
-static void iter_snap_objects(SnapObjectContext *sctx,
- const SnapObjectParams *params,
- IterSnapObjsCallback sob_callback,
- void *data)
+static eSnapMode iter_snap_objects(SnapObjectContext *sctx,
+ const SnapObjectParams *params,
+ IterSnapObjsCallback sob_callback,
+ void *data)
{
+ eSnapMode ret = SCE_SNAP_MODE_NONE;
+ eSnapMode tmp;
+
Scene *scene = DEG_get_input_scene(sctx->runtime.depsgraph);
ViewLayer *view_layer = DEG_get_input_view_layer(sctx->runtime.depsgraph);
const eSnapTargetSelect snap_target_select = params->snap_target_select;
@@ -560,13 +487,34 @@ static void iter_snap_objects(SnapObjectContext *sctx,
ListBase *lb = object_duplilist(sctx->runtime.depsgraph, sctx->scene, obj_eval);
LISTBASE_FOREACH (DupliObject *, dupli_ob, lb) {
BLI_assert(DEG_is_evaluated_object(dupli_ob->ob));
- sob_callback(sctx, params, dupli_ob->ob, dupli_ob->mat, is_object_active, data);
+ if ((tmp = sob_callback(sctx,
+ params,
+ dupli_ob->ob,
+ dupli_ob->ob_data,
+ dupli_ob->mat,
+ is_object_active,
+ false,
+ data)) != SCE_SNAP_MODE_NONE) {
+ ret = tmp;
+ }
}
free_object_duplilist(lb);
}
- sob_callback(sctx, params, obj_eval, obj_eval->obmat, is_object_active, data);
+ bool use_hide = false;
+ ID *ob_data = data_for_snap(obj_eval, params->edit_mode_type, &use_hide);
+ if ((tmp = sob_callback(sctx,
+ params,
+ obj_eval,
+ ob_data,
+ obj_eval->object_to_world,
+ is_object_active,
+ use_hide,
+ data)) != SCE_SNAP_MODE_NONE) {
+ ret = tmp;
+ }
}
+ return ret;
}
/** \} */
@@ -767,14 +715,17 @@ static bool raycastMesh(SnapObjectContext *sctx,
}
/* Test BoundBox */
- const BoundBox *bb = BKE_object_boundbox_get(ob_eval);
- if (bb) {
- /* was BKE_boundbox_ray_hit_check, see: cf6ca226fa58 */
- if (!isect_ray_aabb_v3_simple(
- ray_start_local, ray_normal_local, bb->vec[0], bb->vec[6], &len_diff, nullptr)) {
- return retval;
+ if (ob_eval->data == me_eval) {
+ const BoundBox *bb = BKE_object_boundbox_get(ob_eval);
+ if (bb) {
+ /* was BKE_boundbox_ray_hit_check, see: cf6ca226fa58 */
+ if (!isect_ray_aabb_v3_simple(
+ ray_start_local, ray_normal_local, bb->vec[0], bb->vec[6], &len_diff, nullptr)) {
+ return retval;
+ }
}
}
+
/* We pass a temp ray_start, set from object's boundbox, to avoid precision issues with
* very far away ray_start values (as returned in case of ortho view3d), see T50486, T38358.
*/
@@ -787,23 +738,22 @@ static bool raycastMesh(SnapObjectContext *sctx,
len_diff = 0.0f;
}
- SnapData_Mesh *sod = snap_object_data_mesh_get(sctx, ob_eval, me_eval, use_hide);
+ BVHTreeFromMesh treedata;
+ snap_object_data_mesh_get(sctx, ob_eval, me_eval, use_hide, &treedata);
- BVHTreeFromMesh *treedata = &sod->treedata_mesh;
-
- if (treedata->tree == nullptr) {
+ if (treedata.tree == nullptr) {
return retval;
}
float timat[3][3]; /* transpose inverse matrix for normals */
transpose_m3_m4(timat, imat);
- BLI_assert(treedata->raycast_callback != nullptr);
+ BLI_assert(treedata.raycast_callback != nullptr);
if (r_hit_list) {
RayCastAll_Data data;
- data.bvhdata = treedata;
- data.raycast_callback = treedata->raycast_callback;
+ data.bvhdata = &treedata;
+ data.raycast_callback = treedata.raycast_callback;
data.obmat = obmat;
data.timat = timat;
data.len_diff = len_diff;
@@ -813,13 +763,8 @@ static bool raycastMesh(SnapObjectContext *sctx,
data.hit_list = r_hit_list;
data.retval = retval;
- BLI_bvhtree_ray_cast_all(treedata->tree,
- ray_start_local,
- ray_normal_local,
- 0.0f,
- *ray_depth,
- raycast_all_cb,
- &data);
+ BLI_bvhtree_ray_cast_all(
+ treedata.tree, ray_start_local, ray_normal_local, 0.0f, *ray_depth, raycast_all_cb, &data);
retval = data.retval;
}
@@ -828,15 +773,15 @@ static bool raycastMesh(SnapObjectContext *sctx,
hit.index = -1;
hit.dist = local_depth;
- if (BLI_bvhtree_ray_cast(treedata->tree,
+ if (BLI_bvhtree_ray_cast(treedata.tree,
ray_start_local,
ray_normal_local,
0.0f,
&hit,
params->use_backface_culling ?
mesh_looptri_raycast_backface_culling_cb :
- treedata->raycast_callback,
- treedata) != -1) {
+ treedata.raycast_callback,
+ &treedata) != -1) {
hit.dist += len_diff;
hit.dist /= local_scale;
if (hit.dist <= *ray_depth) {
@@ -855,7 +800,7 @@ static bool raycastMesh(SnapObjectContext *sctx,
retval = true;
if (r_index) {
- *r_index = treedata->looptri[hit.index].poly;
+ *r_index = treedata.looptri[hit.index].poly;
}
}
}
@@ -1007,26 +952,21 @@ struct RaycastObjUserData {
uint ob_index;
/* read/write args */
float *ray_depth;
- /* return args */
- float *r_loc;
- float *r_no;
- int *r_index;
- Object **r_ob;
- float (*r_obmat)[4];
- ListBase *r_hit_list;
+
bool use_occlusion_test;
- bool ret;
};
/**
* \note Duplicate args here are documented at #snapObjectsRay
*/
-static void raycast_obj_fn(SnapObjectContext *sctx,
- const SnapObjectParams *params,
- Object *ob_eval,
- const float obmat[4][4],
- bool is_object_active,
- void *data)
+static eSnapMode raycast_obj_fn(SnapObjectContext *sctx,
+ const SnapObjectParams *params,
+ Object *ob_eval,
+ ID *ob_data,
+ const float obmat[4][4],
+ bool is_object_active,
+ bool use_hide,
+ void *data)
{
RaycastObjUserData *dt = static_cast<RaycastObjUserData *>(data);
const uint ob_index = dt->ob_index++;
@@ -1035,92 +975,74 @@ static void raycast_obj_fn(SnapObjectContext *sctx,
float *ray_depth = dt->ray_depth;
bool retval = false;
+ bool is_edit = false;
if (use_occlusion_test) {
if (ELEM(ob_eval->dt, OB_BOUNDBOX, OB_WIRE)) {
/* Do not hit objects that are in wire or bounding box
* display mode. */
- return;
+ return SCE_SNAP_MODE_NONE;
}
}
- switch (ob_eval->type) {
- case OB_MESH: {
- const eSnapEditType edit_mode_type = params->edit_mode_type;
- bool use_hide = false;
- const Mesh *me_eval = mesh_for_snap(ob_eval, edit_mode_type, &use_hide);
- if (me_eval == nullptr) {
- BMEditMesh *em = BKE_editmesh_from_object(ob_eval);
- if (UNLIKELY(!em)) { /* See #mesh_for_snap doc-string. */
- return;
- }
- BLI_assert_msg(em == BKE_editmesh_from_object(DEG_get_original_object(ob_eval)),
- "Make sure there is only one pointer for looptris");
- retval = raycastEditMesh(sctx,
- params,
- dt->ray_start,
- dt->ray_dir,
- ob_eval,
- em,
- obmat,
- ob_index,
- ray_depth,
- dt->r_loc,
- dt->r_no,
- dt->r_index,
- dt->r_hit_list);
- break;
+ if (ob_data == nullptr) {
+ if (ob_eval->type == OB_MESH) {
+ BMEditMesh *em = BKE_editmesh_from_object(ob_eval);
+ if (UNLIKELY(!em)) { /* See #mesh_for_snap doc-string. */
+ return SCE_SNAP_MODE_NONE;
}
- retval = raycastMesh(sctx,
- params,
- dt->ray_start,
- dt->ray_dir,
- ob_eval,
- me_eval,
- obmat,
- ob_index,
- use_hide,
- ray_depth,
- dt->r_loc,
- dt->r_no,
- dt->r_index,
- dt->r_hit_list);
- break;
- }
- case OB_CURVES_LEGACY:
- case OB_SURF:
- case OB_FONT: {
- if (!is_object_active) {
- const Mesh *mesh_eval = BKE_object_get_evaluated_mesh(ob_eval);
- if (mesh_eval) {
- retval = raycastMesh(sctx,
- params,
- dt->ray_start,
- dt->ray_dir,
- ob_eval,
- mesh_eval,
- obmat,
- ob_index,
- false,
- ray_depth,
- dt->r_loc,
- dt->r_no,
- dt->r_index,
- dt->r_hit_list);
- }
+ if (raycastEditMesh(sctx,
+ params,
+ dt->ray_start,
+ dt->ray_dir,
+ ob_eval,
+ em,
+ obmat,
+ ob_index,
+ ray_depth,
+ sctx->ret.loc,
+ sctx->ret.no,
+ &sctx->ret.index,
+ sctx->ret.hit_list)) {
+ retval = true;
+ is_edit = true;
}
- break;
}
+ else {
+ return SCE_SNAP_MODE_NONE;
+ }
+ }
+ else if (GS(ob_data->name) != ID_ME) {
+ return SCE_SNAP_MODE_NONE;
+ }
+ else if (is_object_active && ELEM(ob_eval->type, OB_CURVES_LEGACY, OB_SURF, OB_FONT)) {
+ return SCE_SNAP_MODE_NONE;
+ }
+ else {
+ const Mesh *me_eval = (const Mesh *)ob_data;
+ retval = raycastMesh(sctx,
+ params,
+ dt->ray_start,
+ dt->ray_dir,
+ ob_eval,
+ me_eval,
+ obmat,
+ ob_index,
+ use_hide,
+ ray_depth,
+ sctx->ret.loc,
+ sctx->ret.no,
+ &sctx->ret.index,
+ sctx->ret.hit_list);
}
if (retval) {
- if (dt->r_ob) {
- *dt->r_ob = ob_eval;
- }
- if (dt->r_obmat) {
- copy_m4_m4(dt->r_obmat, obmat);
- }
- dt->ret = true;
+ copy_m4_m4(sctx->ret.obmat, obmat);
+ sctx->ret.ob = ob_eval;
+ sctx->ret.data = ob_data;
+ sctx->ret.is_edit = is_edit;
+ return SCE_SNAP_MODE_FACE_RAYCAST;
}
+ return SCE_SNAP_MODE_NONE;
}
/**
@@ -1136,17 +1058,6 @@ static void raycast_obj_fn(SnapObjectContext *sctx,
*
* \param ray_depth: maximum depth allowed for r_co,
* elements deeper than this value will be ignored.
- *
- * Output Args
- * -----------
- *
- * \param r_loc: Hit location.
- * \param r_no: Hit normal (optional).
- * \param r_index: Hit index or -1 when no valid index is found.
- * (currently only set to the polygon index when using `snap_to == SCE_SNAP_MODE_FACE_RAYCAST`).
- * \param r_ob: Hit object.
- * \param r_obmat: Object matrix (may not be #Object.obmat with dupli-instances).
- * \param r_hit_list: List of #SnapObjectHitDepth (caller must free).
*/
static bool raycastObjects(SnapObjectContext *sctx,
const SnapObjectParams *params,
@@ -1155,14 +1066,7 @@ static bool raycastObjects(SnapObjectContext *sctx,
/* read/write args */
/* Parameters below cannot be const, because they are assigned to a
* non-const variable (readability-non-const-parameter). */
- float *ray_depth /* NOLINT */,
- /* return args */
- float r_loc[3] /* NOLINT */,
- float r_no[3] /* NOLINT */,
- int *r_index /* NOLINT */,
- Object **r_ob,
- float r_obmat[4][4],
- ListBase *r_hit_list)
+ float *ray_depth /* NOLINT */)
{
const View3D *v3d = sctx->runtime.v3d;
if (params->use_occlusion_test && v3d && XRAY_FLAG_ENABLED(v3d)) {
@@ -1178,18 +1082,9 @@ static bool raycastObjects(SnapObjectContext *sctx,
data.ray_dir = ray_dir;
data.ob_index = 0;
data.ray_depth = ray_depth;
- data.r_loc = r_loc;
- data.r_no = r_no;
- data.r_index = r_index;
- data.r_ob = r_ob;
- data.r_obmat = r_obmat;
- data.r_hit_list = r_hit_list;
data.use_occlusion_test = params->use_occlusion_test;
- data.ret = false;
- iter_snap_objects(sctx, params, raycast_obj_fn, &data);
-
- return data.ret;
+ return iter_snap_objects(sctx, params, raycast_obj_fn, &data) != SCE_SNAP_MODE_NONE;
}
/** \} */
@@ -1201,15 +1096,6 @@ static bool raycastObjects(SnapObjectContext *sctx,
struct NearestWorldObjUserData {
const float *init_co;
const float *curr_co;
- /* return args */
- float *r_loc;
- float *r_no;
- int *r_index;
- float r_dist_sq;
- Object **r_ob;
- float (*r_obmat)[4];
- ListBase *r_hit_list;
- bool ret;
};
static void nearest_world_tree_co(BVHTree *tree,
@@ -1298,14 +1184,13 @@ static bool nearest_world_tree(SnapObjectContext * /*sctx*/,
float co_local[3];
float no_local[3];
- int index;
copy_v3_v3(co_local, init_co_local);
for (int i = 0; i < params->face_nearest_steps; i++) {
add_v3_v3(co_local, delta_local);
nearest_world_tree_co(
- tree, nearest_cb, treedata, co_local, co_local, no_local, &index, nullptr);
+ tree, nearest_cb, treedata, co_local, co_local, no_local, r_index, nullptr);
}
mul_v3_m4v3(r_loc, obmat, co_local);
@@ -1315,10 +1200,6 @@ static bool nearest_world_tree(SnapObjectContext * /*sctx*/,
normalize_v3(r_no);
}
- if (r_index) {
- *r_index = index;
- }
-
return true;
}
@@ -1335,16 +1216,17 @@ static bool nearest_world_mesh(SnapObjectContext *sctx,
float *r_no,
int *r_index)
{
- BVHTreeFromMesh *treedata = snap_object_data_mesh_treedata_get(sctx, ob_eval, me_eval, use_hide);
- if (treedata == nullptr || treedata->tree == nullptr) {
+ BVHTreeFromMesh treedata;
+ snap_object_data_mesh_get(sctx, ob_eval, me_eval, use_hide, &treedata);
+ if (treedata.tree == nullptr) {
return false;
}
return nearest_world_tree(sctx,
params,
- treedata->tree,
- treedata->nearest_callback,
- treedata,
+ treedata.tree,
+ treedata.nearest_callback,
+ &treedata,
obmat,
init_co,
curr_co,
@@ -1384,85 +1266,75 @@ static bool nearest_world_editmesh(SnapObjectContext *sctx,
r_no,
r_index);
}
-static void nearest_world_object_fn(SnapObjectContext *sctx,
- const struct SnapObjectParams *params,
- Object *ob_eval,
- const float obmat[4][4],
- bool is_object_active,
- void *data)
+static eSnapMode nearest_world_object_fn(SnapObjectContext *sctx,
+ const SnapObjectParams *params,
+ Object *ob_eval,
+ ID *ob_data,
+ const float obmat[4][4],
+ bool is_object_active,
+ bool use_hide,
+ void *data)
{
struct NearestWorldObjUserData *dt = static_cast<NearestWorldObjUserData *>(data);
bool retval = false;
- switch (ob_eval->type) {
- case OB_MESH: {
- const eSnapEditType edit_mode_type = params->edit_mode_type;
- bool use_hide = false;
- const Mesh *me_eval = mesh_for_snap(ob_eval, edit_mode_type, &use_hide);
- if (me_eval) {
- retval = nearest_world_mesh(sctx,
- params,
- ob_eval,
- me_eval,
- obmat,
- use_hide,
- dt->init_co,
- dt->curr_co,
- &dt->r_dist_sq,
- dt->r_loc,
- dt->r_no,
- dt->r_index);
+ bool is_edit = false;
+
+ if (ob_data == nullptr) {
+ if (ob_eval->type == OB_MESH) {
+ BMEditMesh *em = BKE_editmesh_from_object(ob_eval);
+ if (UNLIKELY(!em)) { /* See #data_for_snap doc-string. */
+ return SCE_SNAP_MODE_NONE;
}
- else {
- BMEditMesh *em = BKE_editmesh_from_object(ob_eval);
- BLI_assert_msg(em == BKE_editmesh_from_object(DEG_get_original_object(ob_eval)),
- "Make sure there is only one pointer for looptris");
- retval = nearest_world_editmesh(sctx,
- params,
- ob_eval,
- em,
- obmat,
- dt->init_co,
- dt->curr_co,
- &dt->r_dist_sq,
- dt->r_loc,
- dt->r_no,
- dt->r_index);
+ if (nearest_world_editmesh(sctx,
+ params,
+ ob_eval,
+ em,
+ obmat,
+ dt->init_co,
+ dt->curr_co,
+ &sctx->ret.dist_sq,
+ sctx->ret.loc,
+ sctx->ret.no,
+ &sctx->ret.index)) {
+ retval = true;
+ is_edit = true;
}
- break;
}
- case OB_CURVES_LEGACY:
- case OB_SURF:
- case OB_FONT:
- if (!is_object_active) {
- const Mesh *me_eval = BKE_object_get_evaluated_mesh(ob_eval);
- if (me_eval) {
- retval = nearest_world_mesh(sctx,
- params,
- ob_eval,
- me_eval,
- obmat,
- false,
- dt->init_co,
- dt->curr_co,
- &dt->r_dist_sq,
- dt->r_loc,
- dt->r_no,
- dt->r_index);
- }
- }
- break;
+ else {
+ return SCE_SNAP_MODE_NONE;
+ }
+ }
+ else if (GS(ob_data) != ID_ME) {
+ return SCE_SNAP_MODE_NONE;
+ }
+ else if (is_object_active && ELEM(ob_eval->type, OB_CURVES_LEGACY, OB_SURF, OB_FONT)) {
+ return SCE_SNAP_MODE_NONE;
+ }
+ else {
+ const Mesh *me_eval = (const Mesh *)ob_data;
+ retval = nearest_world_mesh(sctx,
+ params,
+ ob_eval,
+ me_eval,
+ obmat,
+ use_hide,
+ dt->init_co,
+ dt->curr_co,
+ &sctx->ret.dist_sq,
+ sctx->ret.loc,
+ sctx->ret.no,
+ &sctx->ret.index);
}
if (retval) {
- if (dt->r_ob) {
- *dt->r_ob = ob_eval;
- }
- if (dt->r_obmat) {
- copy_m4_m4(dt->r_obmat, obmat);
- }
- dt->ret = true;
+ copy_m4_m4(sctx->ret.obmat, obmat);
+ sctx->ret.ob = ob_eval;
+ sctx->ret.data = ob_data;
+ sctx->ret.is_edit = is_edit;
+ return SCE_SNAP_MODE_FACE_NEAREST;
}
+ return SCE_SNAP_MODE_NONE;
}
/**
@@ -1475,39 +1347,17 @@ static void nearest_world_object_fn(SnapObjectContext *sctx,
* \param params: Settings for snapping.
* \param init_co: Initial location of source point.
* \param prev_co: Current location of source point after transformation but before snapping.
- *
- * Output Args
- * -----------
- *
- * \param r_loc: Location of nearest point on target surface.
- * \param r_no: Normal of nearest point on target surface.
- * \param r_index: Index of nearest polygon on target surface.
- * \param r_ob: Nearest target object.
- * \param r_obmat: Nearest target matrix (may not be #Object.obmat with dupli-instances).
*/
static bool nearestWorldObjects(SnapObjectContext *sctx,
const struct SnapObjectParams *params,
const float init_co[3],
- const float curr_co[3],
- float *r_loc /* NOLINT */,
- float *r_no /* NOLINT */,
- int *r_index /* NOLINT */,
- Object **r_ob,
- float r_obmat[4][4])
+ const float curr_co[3])
{
NearestWorldObjUserData data = {};
data.init_co = init_co;
data.curr_co = curr_co;
- data.r_loc = r_loc;
- data.r_no = r_no;
- data.r_index = r_index;
- data.r_dist_sq = FLT_MAX;
- data.r_ob = r_ob;
- data.r_obmat = r_obmat;
- data.ret = false;
-
- iter_snap_objects(sctx, params, nearest_world_object_fn, &data);
- return data.ret;
+
+ return iter_snap_objects(sctx, params, nearest_world_object_fn, &data) != SCE_SNAP_MODE_NONE;
}
/** \} */
@@ -1854,7 +1704,7 @@ static void cb_snap_tri_verts(void *userdata,
}
}
-static void nearest2d_data_init_mesh(SnapData_Mesh *sod,
+static void nearest2d_data_init_mesh(const Mesh *mesh,
bool is_persp,
bool use_backface_culling,
Nearest2dUserData *r_nearest2d)
@@ -1865,11 +1715,11 @@ static void nearest2d_data_init_mesh(SnapData_Mesh *sod,
r_nearest2d->get_tri_verts_index = cb_mlooptri_verts_get;
r_nearest2d->get_tri_edges_index = cb_mlooptri_edges_get;
- r_nearest2d->vert = sod->treedata_mesh.vert;
- r_nearest2d->vert_normals = sod->treedata_mesh.vert_normals;
- r_nearest2d->edge = sod->treedata_mesh.edge;
- r_nearest2d->loop = sod->treedata_mesh.loop;
- r_nearest2d->looptri = sod->treedata_mesh.looptri;
+ r_nearest2d->vert = mesh->verts().data();
+ r_nearest2d->vert_normals = BKE_mesh_vertex_normals_ensure(mesh);
+ r_nearest2d->edge = mesh->edges().data();
+ r_nearest2d->loop = mesh->loops().data();
+ r_nearest2d->looptri = BKE_mesh_runtime_looptri_ensure(mesh);
r_nearest2d->is_persp = is_persp;
r_nearest2d->use_backface_culling = use_backface_culling;
@@ -1900,26 +1750,20 @@ static void nearest2d_data_init_editmesh(SnapData_EditMesh *sod,
static eSnapMode snap_mesh_polygon(SnapObjectContext *sctx,
const SnapObjectParams *params,
- Object *ob_eval,
- const float obmat[4][4],
/* read/write args */
- float *dist_px,
- /* return args */
- float r_loc[3],
- float r_no[3],
- int *r_index)
+ float *dist_px)
{
eSnapMode elem = SCE_SNAP_MODE_NONE;
float lpmat[4][4];
- mul_m4_m4m4(lpmat, sctx->runtime.pmat, obmat);
+ mul_m4_m4m4(lpmat, sctx->runtime.pmat, sctx->ret.obmat);
DistProjectedAABBPrecalc neasrest_precalc;
dist_squared_to_projected_aabb_precalc(
&neasrest_precalc, lpmat, sctx->runtime.win_size, sctx->runtime.mval);
float tobmat[4][4], clip_planes_local[MAX_CLIPPLANE_LEN][4];
- transpose_m4_m4(tobmat, obmat);
+ transpose_m4_m4(tobmat, sctx->ret.obmat);
for (int i = sctx->runtime.clip_plane_len; i--;) {
mul_v4_m4v4(clip_planes_local[i], tobmat, sctx->runtime.clip_plane[i]);
}
@@ -1929,23 +1773,23 @@ static eSnapMode snap_mesh_polygon(SnapObjectContext *sctx,
nearest.dist_sq = square_f(*dist_px);
Nearest2dUserData nearest2d;
- std::unique_ptr<SnapData_Mesh> *sod_mesh = sctx->mesh_caches.lookup_ptr(ob_eval);
- if (sod_mesh) {
- nearest2d_data_init_mesh(sod_mesh->get(),
+ const Mesh *mesh = sctx->ret.data && GS(sctx->ret.data->name) == ID_ME ?
+ (const Mesh *)sctx->ret.data :
+ nullptr;
+ if (mesh) {
+ nearest2d_data_init_mesh(mesh,
sctx->runtime.view_proj == VIEW_PROJ_PERSP,
params->use_backface_culling,
&nearest2d);
- BVHTreeFromMesh *treedata = &sod_mesh->get()->treedata_mesh;
-
- const MPoly *mp = &sod_mesh->get()->poly[*r_index];
- const MLoop *ml = &treedata->loop[mp->loopstart];
+ const MPoly *mp = &mesh->polys()[sctx->ret.index];
+ const MLoop *ml = &nearest2d.loop[mp->loopstart];
if (sctx->runtime.snap_to_flag & SCE_SNAP_MODE_EDGE) {
elem = SCE_SNAP_MODE_EDGE;
- BLI_assert(treedata->edge != nullptr);
+ BLI_assert(nearest2d.edge != nullptr);
for (int i = mp->totloop; i--; ml++) {
cb_snap_edge(&nearest2d,
- ml->e,
+ (int)ml->e,
&neasrest_precalc,
clip_planes_local,
sctx->runtime.clip_plane_len,
@@ -1956,7 +1800,7 @@ static eSnapMode snap_mesh_polygon(SnapObjectContext *sctx,
elem = SCE_SNAP_MODE_VERTEX;
for (int i = mp->totloop; i--; ml++) {
cb_snap_vert(&nearest2d,
- ml->v,
+ (int)ml->v,
&neasrest_precalc,
clip_planes_local,
sctx->runtime.clip_plane_len,
@@ -1964,10 +1808,10 @@ static eSnapMode snap_mesh_polygon(SnapObjectContext *sctx,
}
}
}
- else {
+ else if (sctx->ret.is_edit) {
/* The object's #BMEditMesh was used to snap instead. */
std::unique_ptr<SnapData_EditMesh> &sod_editmesh = sctx->editmesh_caches.lookup(
- BKE_editmesh_from_object(ob_eval));
+ BKE_editmesh_from_object(sctx->ret.ob));
BLI_assert(sod_editmesh.get() != nullptr);
nearest2d_data_init_editmesh(sod_editmesh.get(),
@@ -1978,7 +1822,7 @@ static eSnapMode snap_mesh_polygon(SnapObjectContext *sctx,
BMEditMesh *em = sod_editmesh->treedata_editmesh.em;
BM_mesh_elem_table_ensure(em->bm, BM_FACE);
- BMFace *f = BM_face_at_index(em->bm, *r_index);
+ BMFace *f = BM_face_at_index(em->bm, sctx->ret.index);
BMLoop *l_iter, *l_first;
l_iter = l_first = BM_FACE_FIRST_LOOP(f);
if (sctx->runtime.snap_to_flag & SCE_SNAP_MODE_EDGE) {
@@ -2012,19 +1856,19 @@ static eSnapMode snap_mesh_polygon(SnapObjectContext *sctx,
if (nearest.index != -1) {
*dist_px = sqrtf(nearest.dist_sq);
- copy_v3_v3(r_loc, nearest.co);
- mul_m4_v3(obmat, r_loc);
+ copy_v3_v3(sctx->ret.loc, nearest.co);
+ mul_m4_v3(sctx->ret.obmat, sctx->ret.loc);
- if (r_no) {
+ {
float imat[4][4];
- invert_m4_m4(imat, obmat);
+ invert_m4_m4(imat, sctx->ret.obmat);
- copy_v3_v3(r_no, nearest.no);
- mul_transposed_mat3_m4_v3(imat, r_no);
- normalize_v3(r_no);
+ copy_v3_v3(sctx->ret.no, nearest.no);
+ mul_transposed_mat3_m4_v3(imat, sctx->ret.no);
+ normalize_v3(sctx->ret.no);
}
- *r_index = nearest.index;
+ sctx->ret.index = nearest.index;
return elem;
}
@@ -2033,45 +1877,44 @@ static eSnapMode snap_mesh_polygon(SnapObjectContext *sctx,
static eSnapMode snap_mesh_edge_verts_mixed(SnapObjectContext *sctx,
const SnapObjectParams *params,
- Object *ob_eval,
- const float obmat[4][4],
float original_dist_px,
const float prev_co[3],
/* read/write args */
- float *dist_px,
- /* return args */
- float r_loc[3],
- float r_no[3],
- int *r_index)
+ float *dist_px)
{
eSnapMode elem = SCE_SNAP_MODE_EDGE;
- if (ob_eval->type != OB_MESH) {
+ if (sctx->ret.ob->type != OB_MESH) {
return elem;
}
Nearest2dUserData nearest2d;
{
- std::unique_ptr<SnapData_Mesh> *sod_mesh = sctx->mesh_caches.lookup_ptr(ob_eval);
- if (sod_mesh) {
- nearest2d_data_init_mesh(sod_mesh->get(),
+ const Mesh *mesh = sctx->ret.data && GS(sctx->ret.data->name) == ID_ME ?
+ (const Mesh *)sctx->ret.data :
+ nullptr;
+ if (mesh) {
+ nearest2d_data_init_mesh(mesh,
sctx->runtime.view_proj == VIEW_PROJ_PERSP,
params->use_backface_culling,
&nearest2d);
}
- else {
+ else if (sctx->ret.is_edit) {
/* The object's #BMEditMesh was used to snap instead. */
std::unique_ptr<SnapData_EditMesh> &sod_editmesh = sctx->editmesh_caches.lookup(
- BKE_editmesh_from_object(ob_eval));
+ BKE_editmesh_from_object(sctx->ret.ob));
nearest2d_data_init_editmesh(sod_editmesh.get(),
sctx->runtime.view_proj == VIEW_PROJ_PERSP,
params->use_backface_culling,
&nearest2d);
}
+ else {
+ return elem;
+ }
}
int vindex[2];
- nearest2d.get_edge_verts_index(*r_index, &nearest2d, vindex);
+ nearest2d.get_edge_verts_index(sctx->ret.index, &nearest2d, vindex);
const float *v_pair[2];
nearest2d.get_vert_co(vindex[0], &nearest2d, &v_pair[0]);
@@ -2080,7 +1923,7 @@ static eSnapMode snap_mesh_edge_verts_mixed(SnapObjectContext *sctx,
DistProjectedAABBPrecalc neasrest_precalc;
{
float lpmat[4][4];
- mul_m4_m4m4(lpmat, sctx->runtime.pmat, obmat);
+ mul_m4_m4m4(lpmat, sctx->runtime.pmat, sctx->ret.obmat);
dist_squared_to_projected_aabb_precalc(
&neasrest_precalc, lpmat, sctx->runtime.win_size, sctx->runtime.mval);
@@ -2118,12 +1961,12 @@ static eSnapMode snap_mesh_edge_verts_mixed(SnapObjectContext *sctx,
nearest.co)) {
nearest.index = vindex[v_id];
elem = SCE_SNAP_MODE_VERTEX;
- if (r_no) {
+ {
float imat[4][4];
- invert_m4_m4(imat, obmat);
- nearest2d.copy_vert_no(vindex[v_id], &nearest2d, r_no);
- mul_transposed_mat3_m4_v3(imat, r_no);
- normalize_v3(r_no);
+ invert_m4_m4(imat, sctx->ret.obmat);
+ nearest2d.copy_vert_no(vindex[v_id], &nearest2d, sctx->ret.no);
+ mul_transposed_mat3_m4_v3(imat, sctx->ret.no);
+ normalize_v3(sctx->ret.no);
}
}
}
@@ -2142,7 +1985,7 @@ static eSnapMode snap_mesh_edge_verts_mixed(SnapObjectContext *sctx,
vmid,
&nearest.dist_sq,
nearest.co)) {
- nearest.index = *r_index;
+ nearest.index = sctx->ret.index;
elem = SCE_SNAP_MODE_EDGE_MIDPOINT;
}
}
@@ -2151,8 +1994,8 @@ static eSnapMode snap_mesh_edge_verts_mixed(SnapObjectContext *sctx,
if (prev_co && (sctx->runtime.snap_to_flag & SCE_SNAP_MODE_EDGE_PERPENDICULAR)) {
float v_near[3], va_g[3], vb_g[3];
- mul_v3_m4v3(va_g, obmat, v_pair[0]);
- mul_v3_m4v3(vb_g, obmat, v_pair[1]);
+ mul_v3_m4v3(va_g, sctx->ret.obmat, v_pair[0]);
+ mul_v3_m4v3(vb_g, sctx->ret.obmat, v_pair[1]);
lambda = line_point_factor_v3(prev_co, va_g, vb_g);
if (IN_RANGE(lambda, 0.0f, 1.0f)) {
@@ -2169,7 +2012,7 @@ static eSnapMode snap_mesh_edge_verts_mixed(SnapObjectContext *sctx,
v_near,
&nearest.dist_sq,
nearest.co)) {
- nearest.index = *r_index;
+ nearest.index = sctx->ret.index;
elem = SCE_SNAP_MODE_EDGE_PERPENDICULAR;
}
}
@@ -2180,12 +2023,12 @@ static eSnapMode snap_mesh_edge_verts_mixed(SnapObjectContext *sctx,
if (nearest.index != -1) {
*dist_px = sqrtf(nearest.dist_sq);
- copy_v3_v3(r_loc, nearest.co);
+ copy_v3_v3(sctx->ret.loc, nearest.co);
if (elem != SCE_SNAP_MODE_EDGE_PERPENDICULAR) {
- mul_m4_v3(obmat, r_loc);
+ mul_m4_v3(sctx->ret.obmat, sctx->ret.loc);
}
- *r_index = nearest.index;
+ sctx->ret.index = nearest.index;
}
return elem;
@@ -2706,45 +2549,34 @@ static eSnapMode snapMesh(SnapObjectContext *sctx,
float dist_px_sq = square_f(*dist_px);
/* Test BoundBox */
- const BoundBox *bb = BKE_object_boundbox_get(ob_eval);
- if (bb &&
- !snap_bound_box_check_dist(
- bb->vec[0], bb->vec[6], lpmat, sctx->runtime.win_size, sctx->runtime.mval, dist_px_sq)) {
- return SCE_SNAP_MODE_NONE;
- }
-
- SnapData_Mesh *sod = snap_object_data_mesh_get(sctx, ob_eval, me_eval, use_hide);
-
- BVHTreeFromMesh *treedata, treedata_tmp;
- treedata = &sod->treedata_mesh;
-
- if (sod->has_loose_edge && sod->bvhtree[0] == nullptr) {
- sod->bvhtree[0] = BKE_bvhtree_from_mesh_get(
- &treedata_tmp, me_eval, BVHTREE_FROM_LOOSEEDGES, 2);
- if (sod->bvhtree[0] == nullptr) {
- sod->has_loose_edge = false;
+ if (ob_eval->data == me_eval) {
+ const BoundBox *bb = BKE_object_boundbox_get(ob_eval);
+ if (!snap_bound_box_check_dist(bb->vec[0],
+ bb->vec[6],
+ lpmat,
+ sctx->runtime.win_size,
+ sctx->runtime.mval,
+ dist_px_sq)) {
+ return SCE_SNAP_MODE_NONE;
}
- sod->cached[0] = treedata_tmp.cached;
}
+ BVHTreeFromMesh treedata, treedata_dummy;
+ snap_object_data_mesh_get(sctx, ob_eval, me_eval, use_hide, &treedata);
+
+ BVHTree *bvhtree[2] = {nullptr};
+ bvhtree[0] = BKE_bvhtree_from_mesh_get(&treedata_dummy, me_eval, BVHTREE_FROM_LOOSEEDGES, 2);
+ BLI_assert(treedata_dummy.cached);
if (sctx->runtime.snap_to_flag & SCE_SNAP_MODE_VERTEX) {
- if (sod->has_loose_vert && sod->bvhtree[1] == nullptr) {
- sod->bvhtree[1] = BKE_bvhtree_from_mesh_get(
- &treedata_tmp, me_eval, BVHTREE_FROM_LOOSEVERTS, 2);
- if (sod->bvhtree[1] == nullptr) {
- sod->has_loose_vert = false;
- }
- sod->cached[1] = treedata_tmp.cached;
- }
- }
- else {
- /* Not necessary, just to keep the data more consistent. */
- sod->has_loose_vert = false;
+ bvhtree[1] = BKE_bvhtree_from_mesh_get(&treedata_dummy, me_eval, BVHTREE_FROM_LOOSEVERTS, 2);
+ BLI_assert(treedata_dummy.cached);
}
Nearest2dUserData nearest2d;
- nearest2d_data_init_mesh(
- sod, sctx->runtime.view_proj == VIEW_PROJ_PERSP, params->use_backface_culling, &nearest2d);
+ nearest2d_data_init_mesh(me_eval,
+ sctx->runtime.view_proj == VIEW_PROJ_PERSP,
+ params->use_backface_culling,
+ &nearest2d);
BVHTreeNearest nearest{};
nearest.index = -1;
@@ -2759,9 +2591,10 @@ static eSnapMode snapMesh(SnapObjectContext *sctx,
mul_v4_m4v4(clip_planes_local[i], tobmat, sctx->runtime.clip_plane[i]);
}
- if (sod->bvhtree[1] && (sctx->runtime.snap_to_flag & SCE_SNAP_MODE_VERTEX)) {
+ if (bvhtree[1]) {
+ BLI_assert(sctx->runtime.snap_to_flag & SCE_SNAP_MODE_VERTEX);
/* snap to loose verts */
- BLI_bvhtree_find_nearest_projected(sod->bvhtree[1],
+ BLI_bvhtree_find_nearest_projected(bvhtree[1],
lpmat,
sctx->runtime.win_size,
sctx->runtime.mval,
@@ -2775,9 +2608,9 @@ static eSnapMode snapMesh(SnapObjectContext *sctx,
}
if (sctx->runtime.snap_to_flag & SCE_SNAP_MODE_EDGE) {
- if (sod->bvhtree[0]) {
+ if (bvhtree[0]) {
/* snap to loose edges */
- BLI_bvhtree_find_nearest_projected(sod->bvhtree[0],
+ BLI_bvhtree_find_nearest_projected(bvhtree[0],
lpmat,
sctx->runtime.win_size,
sctx->runtime.mval,
@@ -2788,9 +2621,9 @@ static eSnapMode snapMesh(SnapObjectContext *sctx,
&nearest2d);
}
- if (treedata->tree) {
+ if (treedata.tree) {
/* snap to looptris */
- BLI_bvhtree_find_nearest_projected(treedata->tree,
+ BLI_bvhtree_find_nearest_projected(treedata.tree,
lpmat,
sctx->runtime.win_size,
sctx->runtime.mval,
@@ -2807,9 +2640,9 @@ static eSnapMode snapMesh(SnapObjectContext *sctx,
}
else {
BLI_assert(sctx->runtime.snap_to_flag & SCE_SNAP_MODE_VERTEX);
- if (sod->bvhtree[0]) {
+ if (bvhtree[0]) {
/* snap to loose edge verts */
- BLI_bvhtree_find_nearest_projected(sod->bvhtree[0],
+ BLI_bvhtree_find_nearest_projected(bvhtree[0],
lpmat,
sctx->runtime.win_size,
sctx->runtime.mval,
@@ -2820,9 +2653,9 @@ static eSnapMode snapMesh(SnapObjectContext *sctx,
&nearest2d);
}
- if (treedata->tree) {
+ if (treedata.tree) {
/* snap to looptri verts */
- BLI_bvhtree_find_nearest_projected(treedata->tree,
+ BLI_bvhtree_find_nearest_projected(treedata.tree,
lpmat,
sctx->runtime.win_size,
sctx->runtime.mval,
@@ -3042,118 +2875,130 @@ static eSnapMode snapEditMesh(SnapObjectContext *sctx,
struct SnapObjUserData {
/* read/write args */
float *dist_px;
- /* return args */
- float *r_loc;
- float *r_no;
- int *r_index;
- Object **r_ob;
- float (*r_obmat)[4];
- eSnapMode ret;
};
/**
* \note Duplicate args here are documented at #snapObjectsRay
*/
-static void snap_obj_fn(SnapObjectContext *sctx,
- const SnapObjectParams *params,
- Object *ob_eval,
- const float obmat[4][4],
- bool is_object_active,
- void *data)
+static eSnapMode snap_obj_fn(SnapObjectContext *sctx,
+ const SnapObjectParams *params,
+ Object *ob_eval,
+ ID *ob_data,
+ const float obmat[4][4],
+ bool is_object_active,
+ bool use_hide,
+ void *data)
{
SnapObjUserData *dt = static_cast<SnapObjUserData *>(data);
eSnapMode retval = SCE_SNAP_MODE_NONE;
+ bool is_edit = false;
- switch (ob_eval->type) {
- case OB_MESH: {
- const eSnapEditType edit_mode_type = params->edit_mode_type;
- bool use_hide;
- const Mesh *me_eval = mesh_for_snap(ob_eval, edit_mode_type, &use_hide);
- if (me_eval == nullptr) {
- BMEditMesh *em = BKE_editmesh_from_object(ob_eval);
- if (UNLIKELY(!em)) { /* See #mesh_for_snap doc-string. */
- return;
- }
- BLI_assert_msg(em == BKE_editmesh_from_object(DEG_get_original_object(ob_eval)),
- "Make sure there is only one pointer for looptris");
- retval = snapEditMesh(
- sctx, params, ob_eval, em, obmat, dt->dist_px, dt->r_loc, dt->r_no, dt->r_index);
- break;
- }
- if (ob_eval->dt == OB_BOUNDBOX) {
- /* Do not snap to objects that are in bounding box display mode */
- return;
- }
-
- retval = snapMesh(sctx,
- params,
- ob_eval,
- me_eval,
- obmat,
- use_hide,
- dt->dist_px,
- dt->r_loc,
- dt->r_no,
- dt->r_index);
- break;
+ if (ob_data == nullptr && (ob_eval->type == OB_MESH)) {
+ BMEditMesh *em = BKE_editmesh_from_object(ob_eval);
+ if (UNLIKELY(!em)) { /* See #data_for_snap doc-string. */
+ return SCE_SNAP_MODE_NONE;
}
- case OB_ARMATURE:
- retval = snapArmature(sctx,
+ retval = snapEditMesh(sctx,
+ params,
+ ob_eval,
+ em,
+ obmat,
+ dt->dist_px,
+ sctx->ret.loc,
+ sctx->ret.no,
+ &sctx->ret.index);
+ if (retval) {
+ is_edit = true;
+ }
+ }
+ else if (ob_data == nullptr) {
+ retval = snap_object_center(
+ sctx, ob_eval, obmat, dt->dist_px, sctx->ret.loc, sctx->ret.no, &sctx->ret.index);
+ }
+ else {
+ switch (ob_eval->type) {
+ case OB_MESH: {
+ if (ob_eval->dt == OB_BOUNDBOX) {
+ /* Do not snap to objects that are in bounding box display mode */
+ return SCE_SNAP_MODE_NONE;
+ }
+ if (GS(ob_data->name) == ID_ME) {
+ retval = snapMesh(sctx,
params,
ob_eval,
+ (const Mesh *)ob_data,
obmat,
- is_object_active,
+ use_hide,
dt->dist_px,
- dt->r_loc,
- dt->r_no,
- dt->r_index);
- break;
- case OB_CURVES_LEGACY:
- case OB_SURF:
- if (ob_eval->type == OB_CURVES_LEGACY || BKE_object_is_in_editmode(ob_eval)) {
- retval = snapCurve(
- sctx, params, ob_eval, obmat, dt->dist_px, dt->r_loc, dt->r_no, dt->r_index);
- if (params->edit_mode_type != SNAP_GEOM_FINAL) {
- break;
+ sctx->ret.loc,
+ sctx->ret.no,
+ &sctx->ret.index);
}
+ break;
}
- ATTR_FALLTHROUGH;
- case OB_FONT: {
- const Mesh *mesh_eval = BKE_object_get_evaluated_mesh(ob_eval);
- if (mesh_eval) {
- retval |= snapMesh(sctx,
- params,
- ob_eval,
- mesh_eval,
- obmat,
- false,
- dt->dist_px,
- dt->r_loc,
- dt->r_no,
- dt->r_index);
+ case OB_ARMATURE:
+ retval = snapArmature(sctx,
+ params,
+ ob_eval,
+ obmat,
+ is_object_active,
+ dt->dist_px,
+ sctx->ret.loc,
+ sctx->ret.no,
+ &sctx->ret.index);
+ break;
+ case OB_CURVES_LEGACY:
+ case OB_SURF:
+ if (ob_eval->type == OB_CURVES_LEGACY || BKE_object_is_in_editmode(ob_eval)) {
+ retval = snapCurve(sctx,
+ params,
+ ob_eval,
+ obmat,
+ dt->dist_px,
+ sctx->ret.loc,
+ sctx->ret.no,
+ &sctx->ret.index);
+ if (params->edit_mode_type != SNAP_GEOM_FINAL) {
+ break;
+ }
+ }
+ ATTR_FALLTHROUGH;
+ case OB_FONT: {
+ const Mesh *mesh_eval = BKE_object_get_evaluated_mesh(ob_eval);
+ if (mesh_eval) {
+ retval |= snapMesh(sctx,
+ params,
+ ob_eval,
+ mesh_eval,
+ obmat,
+ false,
+ dt->dist_px,
+ sctx->ret.loc,
+ sctx->ret.no,
+ &sctx->ret.index);
+ }
+ break;
}
- break;
+ case OB_EMPTY:
+ case OB_GPENCIL:
+ case OB_LAMP:
+ retval = snap_object_center(
+ sctx, ob_eval, obmat, dt->dist_px, sctx->ret.loc, sctx->ret.no, &sctx->ret.index);
+ break;
+ case OB_CAMERA:
+ retval = snapCamera(
+ sctx, ob_eval, obmat, dt->dist_px, sctx->ret.loc, sctx->ret.no, &sctx->ret.index);
+ break;
}
- case OB_EMPTY:
- case OB_GPENCIL:
- case OB_LAMP:
- retval = snap_object_center(
- sctx, ob_eval, obmat, dt->dist_px, dt->r_loc, dt->r_no, dt->r_index);
- break;
- case OB_CAMERA:
- retval = snapCamera(sctx, ob_eval, obmat, dt->dist_px, dt->r_loc, dt->r_no, dt->r_index);
- break;
}
if (retval) {
- if (dt->r_ob) {
- *dt->r_ob = ob_eval;
- }
- if (dt->r_obmat) {
- copy_m4_m4(dt->r_obmat, obmat);
- }
- dt->ret = retval;
+ copy_m4_m4(sctx->ret.obmat, obmat);
+ sctx->ret.ob = ob_eval;
+ sctx->ret.data = ob_data;
+ sctx->ret.is_edit = is_edit;
}
+ return retval;
}
/**
@@ -3168,42 +3013,18 @@ static void snap_obj_fn(SnapObjectContext *sctx,
* ---------------
*
* \param dist_px: Maximum threshold distance (in pixels).
- *
- * Output Args
- * -----------
- *
- * \param r_loc: Hit location.
- * \param r_no: Hit normal (optional).
- * \param r_index: Hit index or -1 when no valid index is found.
- * (currently only set to the polygon index when using `snap_to == SCE_SNAP_MODE_FACE_RAYCAST`).
- * \param r_ob: Hit object.
- * \param r_obmat: Object matrix (may not be #Object.obmat with dupli-instances).
*/
static eSnapMode snapObjectsRay(SnapObjectContext *sctx,
const SnapObjectParams *params,
/* read/write args */
/* Parameters below cannot be const, because they are assigned to a
* non-const variable (readability-non-const-parameter). */
- float *dist_px /* NOLINT */,
- /* return args */
- float r_loc[3] /* NOLINT */,
- float r_no[3] /* NOLINT */,
- int *r_index /* NOLINT */,
- Object **r_ob,
- float r_obmat[4][4])
+ float *dist_px /* NOLINT */)
{
SnapObjUserData data = {};
data.dist_px = dist_px;
- data.r_loc = r_loc;
- data.r_no = r_no;
- data.r_ob = r_ob;
- data.r_index = r_index;
- data.r_obmat = r_obmat;
- data.ret = SCE_SNAP_MODE_NONE;
-
- iter_snap_objects(sctx, params, snap_obj_fn, &data);
- return data.ret;
+ return iter_snap_objects(sctx, params, snap_obj_fn, &data);
}
/** \} */
@@ -3258,17 +3079,33 @@ bool ED_transform_snap_object_project_ray_ex(SnapObjectContext *sctx,
sctx->runtime.depsgraph = depsgraph;
sctx->runtime.v3d = v3d;
- return raycastObjects(sctx,
- params,
- ray_start,
- ray_normal,
- ray_depth,
- r_loc,
- r_no,
- r_index,
- r_ob,
- r_obmat,
- nullptr);
+ zero_v3(sctx->ret.loc);
+ zero_v3(sctx->ret.no);
+ sctx->ret.index = -1;
+ zero_m4(sctx->ret.obmat);
+ sctx->ret.hit_list = nullptr;
+ sctx->ret.ob = nullptr;
+ sctx->ret.data = nullptr;
+ sctx->ret.dist_sq = FLT_MAX;
+ sctx->ret.is_edit = false;
+
+ if (raycastObjects(sctx, params, ray_start, ray_normal, ray_depth)) {
+ copy_v3_v3(r_loc, sctx->ret.loc);
+ if (r_no) {
+ copy_v3_v3(r_no, sctx->ret.no);
+ }
+ if (r_index) {
+ *r_index = sctx->ret.index;
+ }
+ if (r_ob) {
+ *r_ob = sctx->ret.ob;
+ }
+ if (r_obmat) {
+ copy_m4_m4(r_obmat, sctx->ret.obmat);
+ }
+ return true;
+ }
+ return false;
}
bool ED_transform_snap_object_project_ray_all(SnapObjectContext *sctx,
@@ -3284,6 +3121,16 @@ bool ED_transform_snap_object_project_ray_all(SnapObjectContext *sctx,
sctx->runtime.depsgraph = depsgraph;
sctx->runtime.v3d = v3d;
+ zero_v3(sctx->ret.loc);
+ zero_v3(sctx->ret.no);
+ sctx->ret.index = -1;
+ zero_m4(sctx->ret.obmat);
+ sctx->ret.hit_list = r_hit_list;
+ sctx->ret.ob = nullptr;
+ sctx->ret.data = nullptr;
+ sctx->ret.dist_sq = FLT_MAX;
+ sctx->ret.is_edit = false;
+
if (ray_depth == -1.0f) {
ray_depth = BVH_RAYCAST_DIST_MAX;
}
@@ -3292,28 +3139,17 @@ bool ED_transform_snap_object_project_ray_all(SnapObjectContext *sctx,
float ray_depth_prev = ray_depth;
#endif
- bool retval = raycastObjects(sctx,
- params,
- ray_start,
- ray_normal,
- &ray_depth,
- nullptr,
- nullptr,
- nullptr,
- nullptr,
- nullptr,
- r_hit_list);
-
- /* meant to be readonly for 'all' hits, ensure it is */
+ if (raycastObjects(sctx, params, ray_start, ray_normal, &ray_depth)) {
+ if (sort) {
+ BLI_listbase_sort(r_hit_list, hit_depth_cmp);
+ }
+ /* meant to be readonly for 'all' hits, ensure it is */
#ifdef DEBUG
- BLI_assert(ray_depth_prev == ray_depth);
+ BLI_assert(ray_depth_prev == ray_depth);
#endif
-
- if (sort) {
- BLI_listbase_sort(r_hit_list, hit_depth_cmp);
+ return true;
}
-
- return retval;
+ return false;
}
/**
@@ -3393,18 +3229,21 @@ static eSnapMode transform_snap_context_project_view3d_mixed_impl(SnapObjectCont
sctx->runtime.region = region;
sctx->runtime.v3d = v3d;
+ zero_v3(sctx->ret.loc);
+ zero_v3(sctx->ret.no);
+ sctx->ret.index = -1;
+ zero_m4(sctx->ret.obmat);
+ sctx->ret.hit_list = nullptr;
+ sctx->ret.ob = nullptr;
+ sctx->ret.data = nullptr;
+ sctx->ret.dist_sq = FLT_MAX;
+ sctx->ret.is_edit = false;
+
BLI_assert((snap_to_flag & SCE_SNAP_MODE_GEOM) != 0);
eSnapMode retval = SCE_SNAP_MODE_NONE;
bool has_hit = false;
- Object *ob_eval = nullptr;
- float loc[3];
- /* Not all snapping callbacks set the normal,
- * initialize this since any hit copies both the `loc` and `no`. */
- float no[3] = {0.0f, 0.0f, 0.0f};
- float obmat[4][4];
- int index = -1;
const RegionView3D *rv3d = static_cast<RegionView3D *>(region->regiondata);
@@ -3413,24 +3252,23 @@ static eSnapMode transform_snap_context_project_view3d_mixed_impl(SnapObjectCont
/* NOTE: if both face ray-cast and face nearest are enabled, first find result of nearest, then
* override with ray-cast. */
if ((snap_to_flag & SCE_SNAP_MODE_FACE_NEAREST) && !has_hit) {
- has_hit = nearestWorldObjects(
- sctx, params, init_co, prev_co, loc, no, &index, &ob_eval, obmat);
+ has_hit = nearestWorldObjects(sctx, params, init_co, prev_co);
if (has_hit) {
retval = SCE_SNAP_MODE_FACE_NEAREST;
- copy_v3_v3(r_loc, loc);
+ copy_v3_v3(r_loc, sctx->ret.loc);
if (r_no) {
- copy_v3_v3(r_no, no);
+ copy_v3_v3(r_no, sctx->ret.no);
}
if (r_ob) {
- *r_ob = ob_eval;
+ *r_ob = sctx->ret.ob;
}
if (r_obmat) {
- copy_m4_m4(r_obmat, obmat);
+ copy_m4_m4(r_obmat, sctx->ret.obmat);
}
if (r_index) {
- *r_index = index;
+ *r_index = sctx->ret.index;
}
}
}
@@ -3444,38 +3282,28 @@ static eSnapMode transform_snap_context_project_view3d_mixed_impl(SnapObjectCont
float dummy_ray_depth = BVH_RAYCAST_DIST_MAX;
- has_hit = raycastObjects(sctx,
- params,
- ray_start,
- ray_normal,
- &dummy_ray_depth,
- loc,
- no,
- &index,
- &ob_eval,
- obmat,
- nullptr);
+ has_hit = raycastObjects(sctx, params, ray_start, ray_normal, &dummy_ray_depth);
if (has_hit) {
if (r_face_nor) {
- copy_v3_v3(r_face_nor, no);
+ copy_v3_v3(r_face_nor, sctx->ret.no);
}
if (snap_to_flag & SCE_SNAP_MODE_FACE_RAYCAST) {
retval = SCE_SNAP_MODE_FACE_RAYCAST;
- copy_v3_v3(r_loc, loc);
+ copy_v3_v3(r_loc, sctx->ret.loc);
if (r_no) {
- copy_v3_v3(r_no, no);
+ copy_v3_v3(r_no, sctx->ret.no);
}
if (r_ob) {
- *r_ob = ob_eval;
+ *r_ob = sctx->ret.ob;
}
if (r_obmat) {
- copy_m4_m4(r_obmat, obmat);
+ copy_m4_m4(r_obmat, sctx->ret.obmat);
}
if (r_index) {
- *r_index = index;
+ *r_index = sctx->ret.index;
}
}
}
@@ -3512,11 +3340,11 @@ static eSnapMode transform_snap_context_project_view3d_mixed_impl(SnapObjectCont
sctx->runtime.has_occlusion_plane = false;
/* By convention we only snap to the original elements of a curve. */
- if (has_hit && ob_eval->type != OB_CURVES_LEGACY) {
+ if (has_hit && sctx->ret.ob->type != OB_CURVES_LEGACY) {
/* Compute the new clip_pane but do not add it yet. */
float new_clipplane[4];
- BLI_ASSERT_UNIT_V3(no);
- plane_from_point_normal_v3(new_clipplane, loc, no);
+ BLI_ASSERT_UNIT_V3(sctx->ret.no);
+ plane_from_point_normal_v3(new_clipplane, sctx->ret.loc, sctx->ret.no);
if (dot_v3v3(sctx->runtime.clip_plane[0], new_clipplane) > 0.0f) {
/* The plane is facing the wrong direction. */
negate_v4(new_clipplane);
@@ -3526,7 +3354,7 @@ static eSnapMode transform_snap_context_project_view3d_mixed_impl(SnapObjectCont
new_clipplane[3] += 0.01f;
/* Try to snap only to the polygon. */
- elem_test = snap_mesh_polygon(sctx, params, ob_eval, obmat, &dist_px_tmp, loc, no, &index);
+ elem_test = snap_mesh_polygon(sctx, params, &dist_px_tmp);
if (elem_test) {
elem = elem_test;
}
@@ -3540,7 +3368,7 @@ static eSnapMode transform_snap_context_project_view3d_mixed_impl(SnapObjectCont
sctx->runtime.has_occlusion_plane = true;
}
- elem_test = snapObjectsRay(sctx, params, &dist_px_tmp, loc, no, &index, &ob_eval, obmat);
+ elem_test = snapObjectsRay(sctx, params, &dist_px_tmp);
if (elem_test) {
elem = elem_test;
}
@@ -3549,25 +3377,24 @@ static eSnapMode transform_snap_context_project_view3d_mixed_impl(SnapObjectCont
(snap_to_flag & (SCE_SNAP_MODE_VERTEX | SCE_SNAP_MODE_EDGE_MIDPOINT |
SCE_SNAP_MODE_EDGE_PERPENDICULAR))) {
sctx->runtime.snap_to_flag = snap_to_flag;
- elem = snap_mesh_edge_verts_mixed(
- sctx, params, ob_eval, obmat, *dist_px, prev_co, &dist_px_tmp, loc, no, &index);
+ elem = snap_mesh_edge_verts_mixed(sctx, params, *dist_px, prev_co, &dist_px_tmp);
}
if (elem & snap_to_flag) {
retval = elem;
- copy_v3_v3(r_loc, loc);
+ copy_v3_v3(r_loc, sctx->ret.loc);
if (r_no) {
- copy_v3_v3(r_no, no);
+ copy_v3_v3(r_no, sctx->ret.no);
}
if (r_ob) {
- *r_ob = ob_eval;
+ *r_ob = sctx->ret.ob;
}
if (r_obmat) {
- copy_m4_m4(r_obmat, obmat);
+ copy_m4_m4(r_obmat, sctx->ret.obmat);
}
if (r_index) {
- *r_index = index;
+ *r_index = sctx->ret.index;
}
*dist_px = dist_px_tmp;
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index b65f4889347..0e77a8ba4ad 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -111,8 +111,8 @@ bool ED_object_get_active_image(Object *ob,
int mat_nr,
Image **r_ima,
ImageUser **r_iuser,
- bNode **r_node,
- bNodeTree **r_ntree)
+ const bNode **r_node,
+ const bNodeTree **r_ntree)
{
Material *ma = DEG_is_evaluated_object(ob) ? BKE_object_material_get_eval(ob, mat_nr) :
BKE_object_material_get(ob, mat_nr);
diff --git a/source/blender/editors/uvedit/uvedit_select.c b/source/blender/editors/uvedit/uvedit_select.c
index 7dd223a9252..777cc1d97e4 100644
--- a/source/blender/editors/uvedit/uvedit_select.c
+++ b/source/blender/editors/uvedit/uvedit_select.c
@@ -4705,7 +4705,7 @@ static int uv_select_similar_vert_exec(bContext *C, wmOperator *op)
const int cd_loop_uv_offset = CustomData_get_offset(&bm->ldata, CD_MLOOPUV);
float ob_m3[3][3];
- copy_m3_m4(ob_m3, ob->obmat);
+ copy_m3_m4(ob_m3, ob->object_to_world);
BMFace *face;
BMIter iter;
@@ -4742,7 +4742,7 @@ static int uv_select_similar_vert_exec(bContext *C, wmOperator *op)
bool changed = false;
const int cd_loop_uv_offset = CustomData_get_offset(&bm->ldata, CD_MLOOPUV);
float ob_m3[3][3];
- copy_m3_m4(ob_m3, ob->obmat);
+ copy_m3_m4(ob_m3, ob->object_to_world);
BMFace *face;
BMIter iter;
@@ -4818,7 +4818,7 @@ static int uv_select_similar_edge_exec(bContext *C, wmOperator *op)
const int cd_loop_uv_offset = CustomData_get_offset(&bm->ldata, CD_MLOOPUV);
float ob_m3[3][3];
- copy_m3_m4(ob_m3, ob->obmat);
+ copy_m3_m4(ob_m3, ob->object_to_world);
BMFace *face;
BMIter iter;
@@ -4859,7 +4859,7 @@ static int uv_select_similar_edge_exec(bContext *C, wmOperator *op)
bool changed = false;
const int cd_loop_uv_offset = CustomData_get_offset(&bm->ldata, CD_MLOOPUV);
float ob_m3[3][3];
- copy_m3_m4(ob_m3, ob->obmat);
+ copy_m3_m4(ob_m3, ob->object_to_world);
BMFace *face;
BMIter iter;
@@ -4927,7 +4927,7 @@ static int uv_select_similar_face_exec(bContext *C, wmOperator *op)
BMesh *bm = em->bm;
float ob_m3[3][3];
- copy_m3_m4(ob_m3, ob->obmat);
+ copy_m3_m4(ob_m3, ob->object_to_world);
const int cd_loop_uv_offset = CustomData_get_offset(&bm->ldata, CD_MLOOPUV);
@@ -4963,7 +4963,7 @@ static int uv_select_similar_face_exec(bContext *C, wmOperator *op)
const int cd_loop_uv_offset = CustomData_get_offset(&bm->ldata, CD_MLOOPUV);
float ob_m3[3][3];
- copy_m3_m4(ob_m3, ob->obmat);
+ copy_m3_m4(ob_m3, ob->object_to_world);
BMFace *face;
BMIter iter;
@@ -5053,7 +5053,7 @@ static int uv_select_similar_island_exec(bContext *C, wmOperator *op)
}
float ob_m3[3][3];
- copy_m3_m4(ob_m3, obedit->obmat);
+ copy_m3_m4(ob_m3, obedit->object_to_world);
int index;
LISTBASE_FOREACH_INDEX (struct FaceIsland *, island, &island_list_ptr[ob_index], index) {
@@ -5082,7 +5082,7 @@ static int uv_select_similar_island_exec(bContext *C, wmOperator *op)
continue;
}
float ob_m3[3][3];
- copy_m3_m4(ob_m3, obedit->obmat);
+ copy_m3_m4(ob_m3, obedit->object_to_world);
bool changed = false;
int index;
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index 92efaf79de7..071f1c44c6b 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -1388,8 +1388,8 @@ static void uv_map_transform_center(const Scene *scene,
}
case V3D_AROUND_CURSOR: /* cursor center */
{
- invert_m4_m4(ob->imat, ob->obmat);
- mul_v3_m4v3(r_center, ob->imat, scene->cursor.location);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
+ mul_v3_m4v3(r_center, ob->world_to_object, scene->cursor.location);
break;
}
case V3D_AROUND_ACTIVE: {
@@ -1439,7 +1439,7 @@ static void uv_map_rotation_matrix_ex(float result[4][4],
zero_v3(viewmatrix[3]);
/* get rotation of the current object matrix */
- copy_m4_m4(rotobj, ob->obmat);
+ copy_m4_m4(rotobj, ob->object_to_world);
zero_v3(rotobj[3]);
/* but shifting */
@@ -1948,7 +1948,7 @@ static int unwrap_exec(bContext *C, wmOperator *op)
continue;
}
- mat4_to_size(obsize, obedit->obmat);
+ mat4_to_size(obsize, obedit->object_to_world);
if (!(fabsf(obsize[0] - obsize[1]) < 1e-4f && fabsf(obsize[1] - obsize[2]) < 1e-4f)) {
if ((reported_errors & UNWRAP_ERROR_NONUNIFORM) == 0) {
BKE_report(op->reports,
@@ -1958,7 +1958,7 @@ static int unwrap_exec(bContext *C, wmOperator *op)
reported_errors |= UNWRAP_ERROR_NONUNIFORM;
}
}
- else if (is_negative_m4(obedit->obmat)) {
+ else if (is_negative_m4(obedit->object_to_world)) {
if ((reported_errors & UNWRAP_ERROR_NEGATIVE) == 0) {
BKE_report(
op->reports,
@@ -2538,7 +2538,7 @@ static int uv_from_view_exec(bContext *C, wmOperator *op)
float objects_pos_avg[4] = {0};
for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
- add_v4_v4(objects_pos_avg, objects[ob_index]->obmat[3]);
+ add_v4_v4(objects_pos_avg, objects[ob_index]->object_to_world[3]);
}
mul_v4_fl(objects_pos_avg, 1.0f / objects_len);
@@ -2576,7 +2576,7 @@ static int uv_from_view_exec(bContext *C, wmOperator *op)
const bool camera_bounds = RNA_boolean_get(op->ptr, "camera_bounds");
struct ProjCameraInfo *uci = BLI_uvproject_camera_info(
v3d->camera,
- obedit->obmat,
+ obedit->object_to_world,
camera_bounds ? (scene->r.xsch * scene->r.xasp) : 1.0f,
camera_bounds ? (scene->r.ysch * scene->r.yasp) : 1.0f);
@@ -2597,7 +2597,7 @@ static int uv_from_view_exec(bContext *C, wmOperator *op)
}
}
else {
- copy_m4_m4(rotmat, obedit->obmat);
+ copy_m4_m4(rotmat, obedit->object_to_world);
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
if (!BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
index 0d41b5a773d..53c2b1d235b 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
+++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
@@ -431,7 +431,7 @@ void BlenderFileLoader::insertShapeNode(Object *ob, Mesh *me, int id)
// Compute matrix including camera transform
float obmat[4][4], nmat[4][4];
- mul_m4_m4m4(obmat, viewmat, ob->obmat);
+ mul_m4_m4m4(obmat, viewmat, ob->object_to_world);
invert_m4_m4(nmat, obmat);
transpose_m4(nmat);
diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
index 06365c3799f..af9ef7f352e 100644
--- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
+++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
@@ -131,9 +131,9 @@ static void init_view(Render *re)
int ymax = re->disprect.ymax;
float thickness = 1.0f;
- switch (re->r.line_thickness_mode) {
+ switch (re->scene->r.line_thickness_mode) {
case R_LINE_THICKNESS_ABSOLUTE:
- thickness = re->r.unit_line_thickness * (re->r.size / 100.0f);
+ thickness = re->scene->r.unit_line_thickness * (re->r.size / 100.0f);
break;
case R_LINE_THICKNESS_RELATIVE:
thickness = height / 480.0f;
@@ -485,7 +485,7 @@ void FRS_composite_result(Render *re, ViewLayer *view_layer, Render *freestyle_r
return;
}
- rl = render_get_active_layer(freestyle_render, freestyle_render->result);
+ rl = render_get_single_layer(freestyle_render, freestyle_render->result);
if (!rl) {
if (G.debug & G_DEBUG_FREESTYLE) {
cout << "No source render layer to composite" << endl;
diff --git a/source/blender/freestyle/intern/python/BPy_BBox.cpp b/source/blender/freestyle/intern/python/BPy_BBox.cpp
index 8fb5f60eff7..30ff0af7c1e 100644
--- a/source/blender/freestyle/intern/python/BPy_BBox.cpp
+++ b/source/blender/freestyle/intern/python/BPy_BBox.cpp
@@ -65,43 +65,44 @@ static PyObject *BBox_repr(BPy_BBox *self)
/*-----------------------BPy_BBox type definition ------------------------------*/
PyTypeObject BBox_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "BBox", /* tp_name */
- sizeof(BPy_BBox), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)BBox_dealloc, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)BBox_repr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- BBox_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- nullptr, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)BBox_init, /* tp_init */
- nullptr, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "BBox",
+ /*tp_basicsize*/ sizeof(BPy_BBox),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)BBox_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)BBox_repr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ BBox_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ nullptr,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)BBox_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ PyType_GenericNew,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp
index 6b23565a23e..3f9e96ffa73 100644
--- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp
@@ -137,43 +137,44 @@ static PyGetSetDef BPy_BinaryPredicate0D_getseters[] = {
/*-----------------------BPy_BinaryPredicate0D type definition ------------------------------*/
PyTypeObject BinaryPredicate0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "BinaryPredicate0D", /* tp_name */
- sizeof(BPy_BinaryPredicate0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)BinaryPredicate0D___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)BinaryPredicate0D___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- (ternaryfunc)BinaryPredicate0D___call__, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- BinaryPredicate0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_BinaryPredicate0D_getseters, /* tp_getset */
- nullptr, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)BinaryPredicate0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "BinaryPredicate0D",
+ /*tp_basicsize*/ sizeof(BPy_BinaryPredicate0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)BinaryPredicate0D___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)BinaryPredicate0D___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ (ternaryfunc)BinaryPredicate0D___call__,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ BinaryPredicate0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_BinaryPredicate0D_getseters,
+ /*tp_base*/ nullptr,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)BinaryPredicate0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ PyType_GenericNew,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp
index 9e3e5979871..bf4bf2d099a 100644
--- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp
@@ -170,44 +170,45 @@ static PyGetSetDef BPy_BinaryPredicate1D_getseters[] = {
};
/*-----------------------BPy_BinaryPredicate1D type definition ------------------------------*/
+
PyTypeObject BinaryPredicate1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "BinaryPredicate1D", /* tp_name */
- sizeof(BPy_BinaryPredicate1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)BinaryPredicate1D___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)BinaryPredicate1D___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- (ternaryfunc)BinaryPredicate1D___call__, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- BinaryPredicate1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_BinaryPredicate1D_getseters, /* tp_getset */
- nullptr, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)BinaryPredicate1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ /*tp_name*/ PyVarObject_HEAD_INIT(nullptr, 0) "BinaryPredicate1D",
+ /*tp_basicsize*/ sizeof(BPy_BinaryPredicate1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)BinaryPredicate1D___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)BinaryPredicate1D___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ (ternaryfunc)BinaryPredicate1D___call__,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ BinaryPredicate1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_BinaryPredicate1D_getseters,
+ /*tp_base*/ nullptr,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)BinaryPredicate1D___init__,
+ /*tp_alloc*/ nullptr,
+ PyType_GenericNew, /*tp_new*/
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
index 7f71bbf1fdd..7bc3f2ea05a 100644
--- a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
+++ b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
@@ -522,43 +522,44 @@ static Py_hash_t FrsMaterial_hash(PyObject *self)
/*-----------------------BPy_FrsMaterial type definition ------------------------------*/
PyTypeObject FrsMaterial_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "Material", /* tp_name */
- sizeof(BPy_FrsMaterial), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)FrsMaterial_dealloc, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)FrsMaterial_repr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- (hashfunc)FrsMaterial_hash, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- FrsMaterial_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- (richcmpfunc)BPy_FrsMaterial_richcmpr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_FrsMaterial_getseters, /* tp_getset */
- nullptr, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)FrsMaterial_init, /* tp_init */
- nullptr, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "Material",
+ /*tp_basicsize*/ sizeof(BPy_FrsMaterial),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)FrsMaterial_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)FrsMaterial_repr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ (hashfunc)FrsMaterial_hash,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ FrsMaterial_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ (richcmpfunc)BPy_FrsMaterial_richcmpr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_FrsMaterial_getseters,
+ /*tp_base*/ nullptr,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)FrsMaterial_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ PyType_GenericNew,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp
index 684edb26a97..3a07fdb3d88 100644
--- a/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp
+++ b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp
@@ -316,43 +316,44 @@ static PyMethodDef BPy_FrsNoise_methods[] = {
/*-----------------------BPy_FrsNoise type definition ------------------------------*/
PyTypeObject FrsNoise_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "Noise", /* tp_name */
- sizeof(BPy_FrsNoise), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)FrsNoise_dealloc, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)FrsNoise_repr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- FrsNoise_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- BPy_FrsNoise_methods, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- nullptr, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)FrsNoise_init, /* tp_init */
- nullptr, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "Noise",
+ /*tp_basicsize*/ sizeof(BPy_FrsNoise),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)FrsNoise_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)FrsNoise_repr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ FrsNoise_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ BPy_FrsNoise_methods,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ nullptr,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)FrsNoise_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ PyType_GenericNew,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_Id.cpp b/source/blender/freestyle/intern/python/BPy_Id.cpp
index 66880d6185c..7745bc11512 100644
--- a/source/blender/freestyle/intern/python/BPy_Id.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Id.cpp
@@ -155,43 +155,44 @@ static PyGetSetDef BPy_Id_getseters[] = {
/*-----------------------BPy_Id type definition ------------------------------*/
PyTypeObject Id_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "Id", /* tp_name */
- sizeof(BPy_Id), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)Id_dealloc, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)Id_repr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Id_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- (richcmpfunc)Id_RichCompare, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_Id_getseters, /* tp_getset */
- nullptr, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Id_init, /* tp_init */
- nullptr, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "Id",
+ /*tp_basicsize*/ sizeof(BPy_Id),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)Id_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)Id_repr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ Id_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ (richcmpfunc)Id_RichCompare,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_Id_getseters,
+ /*tp_base*/ nullptr,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)Id_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ PyType_GenericNew,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
index 711cf9c6bab..dfebfd3ff73 100644
--- a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
+++ b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
@@ -139,43 +139,44 @@ PyDoc_STRVAR(IntegrationType_doc,
" last of the values obtained for the 0D elements.");
PyTypeObject IntegrationType_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "IntegrationType", /* tp_name */
- sizeof(PyLongObject), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- IntegrationType_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &PyLong_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- nullptr, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "IntegrationType",
+ /*tp_basicsize*/ sizeof(PyLongObject),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT,
+ /*tp_doc*/ IntegrationType_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &PyLong_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ nullptr,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
/*-----------------------BPy_IntegrationType instance definitions -------------------------*/
diff --git a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp
index 083fdbf58db..11ac078124a 100644
--- a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp
@@ -297,43 +297,44 @@ static PyGetSetDef BPy_Interface0D_getseters[] = {
/*-----------------------BPy_Interface0D type definition ------------------------------*/
PyTypeObject Interface0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "Interface0D", /* tp_name */
- sizeof(BPy_Interface0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)Interface0D_dealloc, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)Interface0D_repr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Interface0D_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- BPy_Interface0D_methods, /* tp_methods */
- nullptr, /* tp_members */
- BPy_Interface0D_getseters, /* tp_getset */
- nullptr, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Interface0D_init, /* tp_init */
- nullptr, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "Interface0D",
+ /*tp_basicsize*/ sizeof(BPy_Interface0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)Interface0D_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)Interface0D_repr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ Interface0D_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ BPy_Interface0D_methods,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_Interface0D_getseters,
+ /*tp_base*/ nullptr,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)Interface0D_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ PyType_GenericNew,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
index d636fb4e6b8..992d69ad594 100644
--- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
@@ -323,43 +323,44 @@ static PyGetSetDef BPy_Interface1D_getseters[] = {
/*-----------------------BPy_Interface1D type definition ------------------------------*/
PyTypeObject Interface1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "Interface1D", /* tp_name */
- sizeof(BPy_Interface1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)Interface1D_dealloc, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)Interface1D_repr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Interface1D_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- BPy_Interface1D_methods, /* tp_methods */
- nullptr, /* tp_members */
- BPy_Interface1D_getseters, /* tp_getset */
- nullptr, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Interface1D_init, /* tp_init */
- nullptr, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "Interface1D",
+ /*tp_basicsize*/ sizeof(BPy_Interface1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)Interface1D_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)Interface1D_repr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ Interface1D_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ BPy_Interface1D_methods,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_Interface1D_getseters,
+ /*tp_base*/ nullptr,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)Interface1D_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ PyType_GenericNew,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.cpp b/source/blender/freestyle/intern/python/BPy_Iterator.cpp
index b167faa15e5..f35c201d3eb 100644
--- a/source/blender/freestyle/intern/python/BPy_Iterator.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Iterator.cpp
@@ -212,43 +212,44 @@ static PyGetSetDef BPy_Iterator_getseters[] = {
/*-----------------------BPy_Iterator type definition ------------------------------*/
PyTypeObject Iterator_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "Iterator", /* tp_name */
- sizeof(BPy_Iterator), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)Iterator_dealloc, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)Iterator_repr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Iterator_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- BPy_Iterator_methods, /* tp_methods */
- nullptr, /* tp_members */
- BPy_Iterator_getseters, /* tp_getset */
- nullptr, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Iterator_init, /* tp_init */
- nullptr, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "Iterator",
+ /*tp_basicsize*/ sizeof(BPy_Iterator),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)Iterator_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)Iterator_repr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ Iterator_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ BPy_Iterator_methods,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_Iterator_getseters,
+ /*tp_base*/ nullptr,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)Iterator_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ PyType_GenericNew,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_MediumType.cpp b/source/blender/freestyle/intern/python/BPy_MediumType.cpp
index cf8e900e003..72bb8203077 100644
--- a/source/blender/freestyle/intern/python/BPy_MediumType.cpp
+++ b/source/blender/freestyle/intern/python/BPy_MediumType.cpp
@@ -29,43 +29,44 @@ PyDoc_STRVAR(MediumType_doc,
"* Stroke.OPAQUE_MEDIUM: To simulate an opaque medium (oil, spray...).");
PyTypeObject MediumType_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "MediumType", /* tp_name */
- sizeof(PyLongObject), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- MediumType_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &PyLong_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- nullptr, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "MediumType",
+ /*tp_basicsize*/ sizeof(PyLongObject),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT,
+ /*tp_doc*/ MediumType_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &PyLong_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ nullptr,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
/*-----------------------BPy_IntegrationType instance definitions -------------------------*/
diff --git a/source/blender/freestyle/intern/python/BPy_Nature.cpp b/source/blender/freestyle/intern/python/BPy_Nature.cpp
index 33c4ce17820..c06e6859514 100644
--- a/source/blender/freestyle/intern/python/BPy_Nature.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Nature.cpp
@@ -23,40 +23,42 @@ static PyObject *BPy_Nature_or(PyObject *a, PyObject *b);
/*-----------------------BPy_Nature number method definitions --------------------*/
static PyNumberMethods nature_as_number = {
- nullptr, /* binaryfunc nb_add */
- nullptr, /* binaryfunc nb_subtract */
- nullptr, /* binaryfunc nb_multiply */
- nullptr, /* binaryfunc nb_remainder */
- nullptr, /* binaryfunc nb_divmod */
- nullptr, /* ternaryfunc nb_power */
- nullptr, /* unaryfunc nb_negative */
- nullptr, /* unaryfunc nb_positive */
- nullptr, /* unaryfunc nb_absolute */
- nullptr, /* inquiry nb_bool */
- nullptr, /* unaryfunc nb_invert */
- nullptr, /* binaryfunc nb_lshift */
- nullptr, /* binaryfunc nb_rshift */
- (binaryfunc)BPy_Nature_and, /* binaryfunc nb_and */
- (binaryfunc)BPy_Nature_xor, /* binaryfunc nb_xor */
- (binaryfunc)BPy_Nature_or, /* binaryfunc nb_or */
- nullptr, /* unaryfunc nb_int */
- nullptr, /* void *nb_reserved */
- nullptr, /* unaryfunc nb_float */
- nullptr, /* binaryfunc nb_inplace_add */
- nullptr, /* binaryfunc nb_inplace_subtract */
- nullptr, /* binaryfunc nb_inplace_multiply */
- nullptr, /* binaryfunc nb_inplace_remainder */
- nullptr, /* ternaryfunc nb_inplace_power */
- nullptr, /* binaryfunc nb_inplace_lshift */
- nullptr, /* binaryfunc nb_inplace_rshift */
- nullptr, /* binaryfunc nb_inplace_and */
- nullptr, /* binaryfunc nb_inplace_xor */
- nullptr, /* binaryfunc nb_inplace_or */
- nullptr, /* binaryfunc nb_floor_divide */
- nullptr, /* binaryfunc nb_true_divide */
- nullptr, /* binaryfunc nb_inplace_floor_divide */
- nullptr, /* binaryfunc nb_inplace_true_divide */
- nullptr, /* unaryfunc nb_index */
+ /*nb_add*/ nullptr,
+ /*nb_subtract*/ nullptr,
+ /*nb_multiply*/ nullptr,
+ /*nb_remainder*/ nullptr,
+ /*nb_divmod*/ nullptr,
+ /*nb_power*/ nullptr,
+ /*nb_negative*/ nullptr,
+ /*nb_positive*/ nullptr,
+ /*nb_absolute*/ nullptr,
+ /*nb_bool*/ nullptr,
+ /*nb_invert*/ nullptr,
+ /*nb_lshift*/ nullptr,
+ /*nb_rshift*/ nullptr,
+ /*nb_and*/ (binaryfunc)BPy_Nature_and,
+ /*nb_xor*/ (binaryfunc)BPy_Nature_xor,
+ /*nb_or*/ (binaryfunc)BPy_Nature_or,
+ /*nb_int*/ nullptr,
+ /*nb_reserved*/ nullptr,
+ /*nb_float*/ nullptr,
+ /*nb_inplace_add*/ nullptr,
+ /*nb_inplace_subtract*/ nullptr,
+ /*nb_inplace_multiply*/ nullptr,
+ /*nb_inplace_remainder*/ nullptr,
+ /*nb_inplace_power*/ nullptr,
+ /*nb_inplace_lshift*/ nullptr,
+ /*nb_inplace_rshift*/ nullptr,
+ /*nb_inplace_and*/ nullptr,
+ /*nb_inplace_xor*/ nullptr,
+ /*nb_inplace_or*/ nullptr,
+ /*nb_floor_divide*/ nullptr,
+ /*nb_true_divide*/ nullptr,
+ /*nb_inplace_floor_divide*/ nullptr,
+ /*nb_inplace_true_divide*/ nullptr,
+ /*nb_index*/ nullptr,
+ /*nb_matrix_multiply*/ NULL,
+ /*nb_inplace_matrix_multiply*/ NULL,
};
/*-----------------------BPy_Nature docstring ------------------------------------*/
@@ -91,43 +93,44 @@ PyDoc_STRVAR(Nature_doc,
/*-----------------------BPy_Nature type definition ------------------------------*/
PyTypeObject Nature_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "Nature", /* tp_name */
- sizeof(PyLongObject), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- &nature_as_number, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- Nature_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &PyLong_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- nullptr, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "Nature",
+ /*tp_basicsize*/ sizeof(PyLongObject),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ &nature_as_number,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT,
+ /*tp_doc*/ Nature_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &PyLong_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ nullptr,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
/*-----------------------BPy_Nature instance definitions ----------------------------------*/
diff --git a/source/blender/freestyle/intern/python/BPy_Operators.cpp b/source/blender/freestyle/intern/python/BPy_Operators.cpp
index 860573016f2..df2312c8680 100644
--- a/source/blender/freestyle/intern/python/BPy_Operators.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Operators.cpp
@@ -756,43 +756,44 @@ static PyMethodDef BPy_Operators_methods[] = {
/*-----------------------BPy_Operators type definition ------------------------------*/
PyTypeObject Operators_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "Operators", /* tp_name */
- sizeof(BPy_Operators), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)Operators_dealloc, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- Operators_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- BPy_Operators_methods, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- nullptr, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- nullptr, /* tp_init */
- nullptr, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "Operators",
+ /*tp_basicsize*/ sizeof(BPy_Operators),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)Operators_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT,
+ /*tp_doc*/ Operators_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ BPy_Operators_methods,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ nullptr,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ nullptr,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ PyType_GenericNew,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_SShape.cpp b/source/blender/freestyle/intern/python/BPy_SShape.cpp
index 92867e36479..c3f4daf5d21 100644
--- a/source/blender/freestyle/intern/python/BPy_SShape.cpp
+++ b/source/blender/freestyle/intern/python/BPy_SShape.cpp
@@ -267,43 +267,44 @@ static PyGetSetDef BPy_SShape_getseters[] = {
/*-----------------------BPy_SShape type definition ------------------------------*/
PyTypeObject SShape_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "SShape", /* tp_name */
- sizeof(BPy_SShape), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)SShape_dealloc, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)SShape_repr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- SShape_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- BPy_SShape_methods, /* tp_methods */
- nullptr, /* tp_members */
- BPy_SShape_getseters, /* tp_getset */
- nullptr, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)SShape_init, /* tp_init */
- nullptr, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "SShape",
+ /*tp_basicsize*/ sizeof(BPy_SShape),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)SShape_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)SShape_repr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ SShape_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ BPy_SShape_methods,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_SShape_getseters,
+ /*tp_base*/ nullptr,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)SShape_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ PyType_GenericNew,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
index c68c30f9602..ed2af40545a 100644
--- a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
+++ b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
@@ -661,43 +661,44 @@ static PyGetSetDef BPy_StrokeAttribute_getseters[] = {
/*-----------------------BPy_StrokeAttribute type definition ------------------------------*/
PyTypeObject StrokeAttribute_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "StrokeAttribute", /* tp_name */
- sizeof(BPy_StrokeAttribute), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)StrokeAttribute_dealloc, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)StrokeAttribute_repr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- StrokeAttribute_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- BPy_StrokeAttribute_methods, /* tp_methods */
- nullptr, /* tp_members */
- BPy_StrokeAttribute_getseters, /* tp_getset */
- nullptr, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)StrokeAttribute_init, /* tp_init */
- nullptr, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "StrokeAttribute",
+ /*tp_basicsize*/ sizeof(BPy_StrokeAttribute),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)StrokeAttribute_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)StrokeAttribute_repr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ StrokeAttribute_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ BPy_StrokeAttribute_methods,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_StrokeAttribute_getseters,
+ /*tp_base*/ nullptr,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)StrokeAttribute_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ PyType_GenericNew,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp
index f9e1d0e86d3..42e8452a4b5 100644
--- a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp
+++ b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp
@@ -266,43 +266,44 @@ static PyGetSetDef BPy_StrokeShader_getseters[] = {
/*-----------------------BPy_StrokeShader type definition ------------------------------*/
PyTypeObject StrokeShader_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "StrokeShader", /* tp_name */
- sizeof(BPy_StrokeShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)StrokeShader___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)StrokeShader___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- StrokeShader___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- BPy_StrokeShader_methods, /* tp_methods */
- nullptr, /* tp_members */
- BPy_StrokeShader_getseters, /* tp_getset */
- nullptr, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)StrokeShader___init__, /* tp_init */
- nullptr, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "StrokeShader",
+ /*tp_basicsize*/ sizeof(BPy_StrokeShader),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)StrokeShader___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)StrokeShader___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ StrokeShader___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ BPy_StrokeShader_methods,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_StrokeShader_getseters,
+ /*tp_base*/ nullptr,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)StrokeShader___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ PyType_GenericNew,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp
index cf70c989054..a8f4c5e4f3a 100644
--- a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp
@@ -108,43 +108,44 @@ static PyGetSetDef BPy_UnaryFunction0D_getseters[] = {
/*-----------------------BPy_UnaryFunction0D type definition ------------------------------*/
PyTypeObject UnaryFunction0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0D", /* tp_name */
- sizeof(BPy_UnaryFunction0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction0D___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)UnaryFunction0D___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_UnaryFunction0D_getseters, /* tp_getset */
- nullptr, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- nullptr, /* tp_init */
- nullptr, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "UnaryFunction0D",
+ /*tp_basicsize*/ sizeof(BPy_UnaryFunction0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)UnaryFunction0D___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)UnaryFunction0D___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ UnaryFunction0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_UnaryFunction0D_getseters,
+ /*tp_base*/ nullptr,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ nullptr,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ PyType_GenericNew,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp
index 65604de1f83..a78c6a056e6 100644
--- a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp
@@ -102,43 +102,44 @@ static PyGetSetDef BPy_UnaryFunction1D_getseters[] = {
/*-----------------------BPy_UnaryFunction1D type definition ------------------------------*/
PyTypeObject UnaryFunction1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction1D", /* tp_name */
- sizeof(BPy_UnaryFunction1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction1D___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)UnaryFunction1D___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_UnaryFunction1D_getseters, /* tp_getset */
- nullptr, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- nullptr, /* tp_init */
- nullptr, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "UnaryFunction1D",
+ /*tp_basicsize*/ sizeof(BPy_UnaryFunction1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)UnaryFunction1D___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)UnaryFunction1D___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ UnaryFunction1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_UnaryFunction1D_getseters,
+ /*tp_base*/ nullptr,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ nullptr,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ PyType_GenericNew,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp
index b8169aae9cd..388f5d52ff0 100644
--- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp
@@ -151,43 +151,44 @@ static PyGetSetDef BPy_UnaryPredicate0D_getseters[] = {
/*-----------------------BPy_UnaryPredicate0D type definition ------------------------------*/
PyTypeObject UnaryPredicate0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "UnaryPredicate0D", /* tp_name */
- sizeof(BPy_UnaryPredicate0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryPredicate0D___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)UnaryPredicate0D___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- (ternaryfunc)UnaryPredicate0D___call__, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryPredicate0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_UnaryPredicate0D_getseters, /* tp_getset */
- nullptr, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryPredicate0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "UnaryPredicate0D",
+ /*tp_basicsize*/ sizeof(BPy_UnaryPredicate0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)UnaryPredicate0D___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)UnaryPredicate0D___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ (ternaryfunc)UnaryPredicate0D___call__,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ UnaryPredicate0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_UnaryPredicate0D_getseters,
+ /*tp_base*/ nullptr,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)UnaryPredicate0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ PyType_GenericNew,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp
index 94ff12a4b56..9240b4ed3ea 100644
--- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp
@@ -209,43 +209,44 @@ static PyGetSetDef BPy_UnaryPredicate1D_getseters[] = {
/*-----------------------BPy_UnaryPredicate1D type definition ------------------------------*/
PyTypeObject UnaryPredicate1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "UnaryPredicate1D", /* tp_name */
- sizeof(BPy_UnaryPredicate1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryPredicate1D___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)UnaryPredicate1D___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- (ternaryfunc)UnaryPredicate1D___call__, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryPredicate1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_UnaryPredicate1D_getseters, /* tp_getset */
- nullptr, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryPredicate1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "UnaryPredicate1D",
+ /*tp_basicsize*/ sizeof(BPy_UnaryPredicate1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)UnaryPredicate1D___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)UnaryPredicate1D___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ (ternaryfunc)UnaryPredicate1D___call__,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ UnaryPredicate1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_UnaryPredicate1D_getseters,
+ /*tp_base*/ nullptr,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)UnaryPredicate1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ PyType_GenericNew,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_ViewMap.cpp b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp
index bc000c5f1a7..31d6b89828e 100644
--- a/source/blender/freestyle/intern/python/BPy_ViewMap.cpp
+++ b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp
@@ -168,43 +168,44 @@ static PyGetSetDef BPy_ViewMap_getseters[] = {
/*-----------------------BPy_ViewMap type definition ------------------------------*/
PyTypeObject ViewMap_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ViewMap", /* tp_name */
- sizeof(BPy_ViewMap), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)ViewMap_dealloc, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)ViewMap_repr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ViewMap_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- BPy_ViewMap_methods, /* tp_methods */
- nullptr, /* tp_members */
- BPy_ViewMap_getseters, /* tp_getset */
- nullptr, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ViewMap_init, /* tp_init */
- nullptr, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ViewMap",
+ /*tp_basicsize*/ sizeof(BPy_ViewMap),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)ViewMap_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)ViewMap_repr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ViewMap_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ BPy_ViewMap_methods,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_ViewMap_getseters,
+ /*tp_base*/ nullptr,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ViewMap_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ PyType_GenericNew,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp
index 130526ac309..58c60e9b9fd 100644
--- a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp
+++ b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp
@@ -338,43 +338,44 @@ static PyGetSetDef BPy_ViewShape_getseters[] = {
/*-----------------------BPy_ViewShape type definition ------------------------------*/
PyTypeObject ViewShape_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ViewShape", /* tp_name */
- sizeof(BPy_ViewShape), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)ViewShape_dealloc, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)ViewShape_repr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ViewShape_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- BPy_ViewShape_methods, /* tp_methods */
- nullptr, /* tp_members */
- BPy_ViewShape_getseters, /* tp_getset */
- nullptr, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ViewShape_init, /* tp_init */
- nullptr, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ViewShape",
+ /*tp_basicsize*/ sizeof(BPy_ViewShape),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)ViewShape_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)ViewShape_repr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ViewShape_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ BPy_ViewShape_methods,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_ViewShape_getseters,
+ /*tp_base*/ nullptr,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ViewShape_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ PyType_GenericNew,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp
index a76b40fd847..58ff6eeafa4 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp
@@ -42,44 +42,45 @@ static int FalseBP1D___init__(BPy_FalseBP1D *self, PyObject *args, PyObject *kwd
}
/*-----------------------BPy_FalseBP1D type definition ------------------------------*/
+
PyTypeObject FalseBP1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "FalseBP1D", /* tp_name */
- sizeof(BPy_FalseBP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- FalseBP1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &BinaryPredicate1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)FalseBP1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ /*tp_name*/ PyVarObject_HEAD_INIT(nullptr, 0) "FalseBP1D",
+ /*tp_basicsize*/ sizeof(BPy_FalseBP1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ FalseBP1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &BinaryPredicate1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)FalseBP1D___init__,
+ /*tp_alloc*/ nullptr,
+ nullptr, /*tp_new*/
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp
index fe68e4ed3b8..55025c43c17 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp
@@ -45,43 +45,44 @@ static int Length2DBP1D___init__(BPy_Length2DBP1D *self, PyObject *args, PyObjec
/*-----------------------BPy_Length2DBP1D type definition ------------------------------*/
PyTypeObject Length2DBP1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "Length2DBP1D", /* tp_name */
- sizeof(BPy_Length2DBP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Length2DBP1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &BinaryPredicate1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Length2DBP1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "Length2DBP1D",
+ /*tp_basicsize*/ sizeof(BPy_Length2DBP1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ Length2DBP1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &BinaryPredicate1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)Length2DBP1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp
index 48b112aca6a..e202b661171 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp
@@ -44,43 +44,44 @@ static int SameShapeIdBP1D___init__(BPy_SameShapeIdBP1D *self, PyObject *args, P
/*-----------------------BPy_SameShapeIdBP1D type definition ------------------------------*/
PyTypeObject SameShapeIdBP1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "SameShapeIdBP1D", /* tp_name */
- sizeof(BPy_SameShapeIdBP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- SameShapeIdBP1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &BinaryPredicate1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)SameShapeIdBP1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "SameShapeIdBP1D",
+ /*tp_basicsize*/ sizeof(BPy_SameShapeIdBP1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ SameShapeIdBP1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &BinaryPredicate1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)SameShapeIdBP1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp
index 5bf588d30d6..7dfcd10b468 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp
@@ -44,43 +44,44 @@ static int TrueBP1D___init__(BPy_TrueBP1D *self, PyObject *args, PyObject *kwds)
/*-----------------------BPy_TrueBP1D type definition ------------------------------*/
PyTypeObject TrueBP1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "TrueBP1D", /* tp_name */
- sizeof(BPy_TrueBP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- TrueBP1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &BinaryPredicate1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)TrueBP1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "TrueBP1D",
+ /*tp_basicsize*/ sizeof(BPy_TrueBP1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ TrueBP1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &BinaryPredicate1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)TrueBP1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp
index 2a88efdb3ba..fd0d2dcfebd 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp
@@ -74,43 +74,44 @@ static int ViewMapGradientNormBP1D___init__(BPy_ViewMapGradientNormBP1D *self,
/*-----------------------BPy_ViewMapGradientNormBP1D type definition ----------------------------*/
PyTypeObject ViewMapGradientNormBP1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ViewMapGradientNormBP1D", /* tp_name */
- sizeof(BPy_ViewMapGradientNormBP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ViewMapGradientNormBP1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &BinaryPredicate1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ViewMapGradientNormBP1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ViewMapGradientNormBP1D",
+ /*tp_basicsize*/ sizeof(BPy_ViewMapGradientNormBP1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ViewMapGradientNormBP1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &BinaryPredicate1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ViewMapGradientNormBP1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
index a4067be3dc1..655f9cdce1e 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
@@ -221,44 +221,45 @@ static PyGetSetDef BPy_CurvePoint_getseters[] = {
};
/*-----------------------BPy_CurvePoint type definition ------------------------------*/
+
PyTypeObject CurvePoint_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "CurvePoint", /* tp_name */
- sizeof(BPy_CurvePoint), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- CurvePoint_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_CurvePoint_getseters, /* tp_getset */
- &Interface0D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)CurvePoint_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ /*tp_name*/ PyVarObject_HEAD_INIT(nullptr, 0) "CurvePoint",
+ /*tp_basicsize*/ sizeof(BPy_CurvePoint),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ CurvePoint_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_CurvePoint_getseters,
+ /*tp_base*/ &Interface0D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)CurvePoint_init,
+ /*tp_alloc*/ nullptr,
+ nullptr, /*tp_new*/
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
index 55faebc509c..9d3089e2bc2 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
@@ -440,44 +440,45 @@ static PyGetSetDef BPy_SVertex_getseters[] = {
};
/*-----------------------BPy_SVertex type definition ------------------------------*/
+
PyTypeObject SVertex_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "SVertex", /* tp_name */
- sizeof(BPy_SVertex), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- SVertex_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- BPy_SVertex_methods, /* tp_methods */
- nullptr, /* tp_members */
- BPy_SVertex_getseters, /* tp_getset */
- &Interface0D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)SVertex_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ /*tp_name*/ PyVarObject_HEAD_INIT(nullptr, 0) "SVertex",
+ /*tp_basicsize*/ sizeof(BPy_SVertex),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ SVertex_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ BPy_SVertex_methods,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_SVertex_getseters,
+ /*tp_base*/ &Interface0D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)SVertex_init,
+ /*tp_alloc*/ nullptr,
+ nullptr, /*tp_new*/
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp
index 7b9e7bd213a..07b399de1dc 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp
@@ -147,44 +147,45 @@ static PyGetSetDef BPy_ViewVertex_getseters[] = {
};
/*-----------------------BPy_ViewVertex type definition ------------------------------*/
+
PyTypeObject ViewVertex_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ViewVertex", /* tp_name */
- sizeof(BPy_ViewVertex), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ViewVertex_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- BPy_ViewVertex_methods, /* tp_methods */
- nullptr, /* tp_members */
- BPy_ViewVertex_getseters, /* tp_getset */
- &Interface0D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ViewVertex_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ /*tp_name*/ PyVarObject_HEAD_INIT(nullptr, 0) "ViewVertex",
+ /*tp_basicsize*/ sizeof(BPy_ViewVertex),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ViewVertex_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ BPy_ViewVertex_methods,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_ViewVertex_getseters,
+ /*tp_base*/ &Interface0D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ViewVertex_init,
+ /*tp_alloc*/ nullptr,
+ nullptr, /*tp_new*/
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
index 35eb95c6f23..f6edde778d4 100644
--- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
@@ -341,44 +341,45 @@ static PyGetSetDef BPy_StrokeVertex_getseters[] = {
};
/*-----------------------BPy_StrokeVertex type definition ------------------------------*/
+
PyTypeObject StrokeVertex_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "StrokeVertex", /* tp_name */
- sizeof(BPy_StrokeVertex), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- StrokeVertex_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_StrokeVertex_getseters, /* tp_getset */
- &CurvePoint_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)StrokeVertex_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ /*tp_name*/ PyVarObject_HEAD_INIT(nullptr, 0) "StrokeVertex",
+ /*tp_basicsize*/ sizeof(BPy_StrokeVertex),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ StrokeVertex_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_StrokeVertex_getseters,
+ /*tp_base*/ &CurvePoint_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)StrokeVertex_init,
+ /*tp_alloc*/ nullptr,
+ nullptr, /*tp_new*/
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp
index 59fead5f70c..5e597f5294b 100644
--- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp
@@ -92,44 +92,45 @@ static PyGetSetDef BPy_NonTVertex_getseters[] = {
};
/*-----------------------BPy_NonTVertex type definition ------------------------------*/
+
PyTypeObject NonTVertex_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "NonTVertex", /* tp_name */
- sizeof(BPy_NonTVertex), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- NonTVertex_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_NonTVertex_getseters, /* tp_getset */
- &ViewVertex_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)NonTVertex_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ /*tp_name*/ PyVarObject_HEAD_INIT(nullptr, 0) "NonTVertex",
+ /*tp_basicsize*/ sizeof(BPy_NonTVertex),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ NonTVertex_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_NonTVertex_getseters,
+ /*tp_base*/ &ViewVertex_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)NonTVertex_init,
+ /*tp_alloc*/ nullptr,
+ nullptr, /*tp_new*/
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp
index ca4908cae7b..737f1548826 100644
--- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp
@@ -202,44 +202,45 @@ static PyGetSetDef BPy_TVertex_getseters[] = {
};
/*-----------------------BPy_TVertex type definition ------------------------------*/
+
PyTypeObject TVertex_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "TVertex", /* tp_name */
- sizeof(BPy_TVertex), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- TVertex_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- BPy_TVertex_methods, /* tp_methods */
- nullptr, /* tp_members */
- BPy_TVertex_getseters, /* tp_getset */
- &ViewVertex_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)TVertex_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ /*tp_name*/ PyVarObject_HEAD_INIT(nullptr, 0) "TVertex",
+ /*tp_basicsize*/ sizeof(BPy_TVertex),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ TVertex_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ BPy_TVertex_methods,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_TVertex_getseters,
+ /*tp_base*/ &ViewVertex_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)TVertex_init,
+ /*tp_alloc*/ nullptr,
+ nullptr, /*tp_new*/
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
index f73c4a8fed5..c3884e73ebd 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
@@ -106,16 +106,16 @@ static PyObject *FEdge_sq_item(BPy_FEdge *self, int keynum)
}
static PySequenceMethods BPy_FEdge_as_sequence = {
- (lenfunc)FEdge_sq_length, /* sq_length */
- nullptr, /* sq_concat */
- nullptr, /* sq_repeat */
- (ssizeargfunc)FEdge_sq_item, /* sq_item */
- nullptr, /* sq_slice */
- nullptr, /* sq_ass_item */
- nullptr, /* *was* sq_ass_slice */
- nullptr, /* sq_contains */
- nullptr, /* sq_inplace_concat */
- nullptr, /* sq_inplace_repeat */
+ /*sq_length*/ (lenfunc)FEdge_sq_length,
+ /*sq_concat*/ nullptr,
+ /*sq_repeat*/ nullptr,
+ /*sq_item*/ (ssizeargfunc)FEdge_sq_item,
+ /*was_sq_slice*/ nullptr, /* DEPRECATED. */
+ /*sq_ass_item*/ nullptr,
+ /*was_sq_ass_slice*/ nullptr, /* DEPRECATED. */
+ /*sq_contains*/ nullptr,
+ /*sq_inplace_concat*/ nullptr,
+ /*sq_inplace_repeat*/ nullptr,
};
/*----------------------FEdge get/setters ----------------------------*/
@@ -342,43 +342,44 @@ static PyGetSetDef BPy_FEdge_getseters[] = {
/*-----------------------BPy_FEdge type definition ------------------------------*/
PyTypeObject FEdge_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "FEdge", /* tp_name */
- sizeof(BPy_FEdge), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- &BPy_FEdge_as_sequence, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- FEdge_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_FEdge_getseters, /* tp_getset */
- &Interface1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)FEdge_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "FEdge",
+ /*tp_basicsize*/ sizeof(BPy_FEdge),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ &BPy_FEdge_as_sequence,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ FEdge_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_FEdge_getseters,
+ /*tp_base*/ &Interface1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)FEdge_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
index 1e69ae65605..cc6e6cb7d53 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
@@ -174,43 +174,44 @@ static PyGetSetDef BPy_FrsCurve_getseters[] = {
/*-----------------------BPy_FrsCurve type definition ------------------------------*/
PyTypeObject FrsCurve_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "Curve", /* tp_name */
- sizeof(BPy_FrsCurve), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- FrsCurve_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- BPy_FrsCurve_methods, /* tp_methods */
- nullptr, /* tp_members */
- BPy_FrsCurve_getseters, /* tp_getset */
- &Interface1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)FrsCurve_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "Curve",
+ /*tp_basicsize*/ sizeof(BPy_FrsCurve),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ FrsCurve_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ BPy_FrsCurve_methods,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_FrsCurve_getseters,
+ /*tp_base*/ &Interface1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)FrsCurve_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
index 6f90406d74d..2156a91b1f2 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
@@ -474,56 +474,57 @@ static PyGetSetDef BPy_Stroke_getseters[] = {
/*-----------------------BPy_Stroke type definition ------------------------------*/
static PySequenceMethods BPy_Stroke_as_sequence = {
- (lenfunc)Stroke_sq_length, /* sq_length */
- nullptr, /* sq_concat */
- nullptr, /* sq_repeat */
- (ssizeargfunc)Stroke_sq_item, /* sq_item */
- nullptr, /* sq_slice */
- nullptr, /* sq_ass_item */
- nullptr, /* *was* sq_ass_slice */
- nullptr, /* sq_contains */
- nullptr, /* sq_inplace_concat */
- nullptr, /* sq_inplace_repeat */
+ /*sq_length*/ (lenfunc)Stroke_sq_length,
+ /*sq_concat*/ nullptr,
+ /*sq_repeat*/ nullptr,
+ /*sq_item*/ (ssizeargfunc)Stroke_sq_item,
+ /*was_sq_slice*/ nullptr, /* DEPRECATED. */
+ /*sq_ass_item*/ nullptr,
+ /*was_sq_ass_slice*/ nullptr, /* DEPRECATED. */
+ /*sq_contains*/ nullptr,
+ /*sq_inplace_concat*/ nullptr,
+ /*sq_inplace_repeat*/ nullptr,
};
PyTypeObject Stroke_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "Stroke", /* tp_name */
- sizeof(BPy_Stroke), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- &BPy_Stroke_as_sequence, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Stroke_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- (getiterfunc)Stroke_iter, /* tp_iter */
- nullptr, /* tp_iternext */
- BPy_Stroke_methods, /* tp_methods */
- nullptr, /* tp_members */
- BPy_Stroke_getseters, /* tp_getset */
- &Interface1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Stroke_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "Stroke",
+ /*tp_basicsize*/ sizeof(BPy_Stroke),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ &BPy_Stroke_as_sequence,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ Stroke_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ (getiterfunc)Stroke_iter,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ BPy_Stroke_methods,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_Stroke_getseters,
+ /*tp_base*/ &Interface1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)Stroke_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
index 1ad8c503782..f15b3c3050a 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
@@ -368,43 +368,44 @@ static PyGetSetDef BPy_ViewEdge_getseters[] = {
/*-----------------------BPy_ViewEdge type definition ------------------------------*/
PyTypeObject ViewEdge_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ViewEdge", /* tp_name */
- sizeof(BPy_ViewEdge), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ViewEdge_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- BPy_ViewEdge_methods, /* tp_methods */
- nullptr, /* tp_members */
- BPy_ViewEdge_getseters, /* tp_getset */
- &Interface1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ViewEdge_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ViewEdge",
+ /*tp_basicsize*/ sizeof(BPy_ViewEdge),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ViewEdge_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ BPy_ViewEdge_methods,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_ViewEdge_getseters,
+ /*tp_base*/ &Interface1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ViewEdge_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
index 5f98252844f..e69572687ca 100644
--- a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
@@ -134,43 +134,44 @@ static PyMethodDef BPy_Chain_methods[] = {
/*-----------------------BPy_Chain type definition ------------------------------*/
PyTypeObject Chain_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "Chain", /* tp_name */
- sizeof(BPy_Chain), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Chain_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- BPy_Chain_methods, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &FrsCurve_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Chain_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "Chain",
+ /*tp_basicsize*/ sizeof(BPy_Chain),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ Chain_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ BPy_Chain_methods,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &FrsCurve_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)Chain_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp
index aae8d5514c9..bb8c8f42042 100644
--- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp
@@ -390,43 +390,44 @@ static PyGetSetDef BPy_FEdgeSharp_getseters[] = {
/*-----------------------BPy_FEdgeSharp type definition ------------------------------*/
PyTypeObject FEdgeSharp_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "FEdgeSharp", /* tp_name */
- sizeof(BPy_FEdgeSharp), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- FEdgeSharp_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_FEdgeSharp_getseters, /* tp_getset */
- &FEdge_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)FEdgeSharp_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "FEdgeSharp",
+ /*tp_basicsize*/ sizeof(BPy_FEdgeSharp),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ FEdgeSharp_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_FEdgeSharp_getseters,
+ /*tp_base*/ &FEdge_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)FEdgeSharp_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
index 6516ad8af9c..47f0aff8374 100644
--- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
@@ -239,43 +239,44 @@ static PyGetSetDef BPy_FEdgeSmooth_getseters[] = {
/*-----------------------BPy_FEdgeSmooth type definition ------------------------------*/
PyTypeObject FEdgeSmooth_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "FEdgeSmooth", /* tp_name */
- sizeof(BPy_FEdgeSmooth), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- FEdgeSmooth_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_FEdgeSmooth_getseters, /* tp_getset */
- &FEdge_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)FEdgeSmooth_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "FEdgeSmooth",
+ /*tp_basicsize*/ sizeof(BPy_FEdgeSmooth),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ FEdgeSmooth_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_FEdgeSmooth_getseters,
+ /*tp_base*/ &FEdge_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)FEdgeSmooth_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
index 883eb3b0beb..ba17a92ca0d 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
@@ -169,43 +169,44 @@ static PyGetSetDef BPy_AdjacencyIterator_getseters[] = {
/*-----------------------BPy_AdjacencyIterator type definition ------------------------------*/
PyTypeObject AdjacencyIterator_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "AdjacencyIterator", /* tp_name */
- sizeof(BPy_AdjacencyIterator), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- AdjacencyIterator_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- (getiterfunc)AdjacencyIterator_iter, /* tp_iter */
- (iternextfunc)AdjacencyIterator_iternext, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_AdjacencyIterator_getseters, /* tp_getset */
- &Iterator_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)AdjacencyIterator_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "AdjacencyIterator",
+ /*tp_basicsize*/ sizeof(BPy_AdjacencyIterator),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ AdjacencyIterator_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ (getiterfunc)AdjacencyIterator_iter,
+ /*tp_iternext*/ (iternextfunc)AdjacencyIterator_iternext,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_AdjacencyIterator_getseters,
+ /*tp_base*/ &Iterator_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)AdjacencyIterator_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp
index 1960d33ea88..4d35cdabee9 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp
@@ -151,43 +151,44 @@ static void ChainPredicateIterator_dealloc(BPy_ChainPredicateIterator *self)
/*-----------------------BPy_ChainPredicateIterator type definition ----------------------------*/
PyTypeObject ChainPredicateIterator_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ChainPredicateIterator", /* tp_name */
- sizeof(BPy_ChainPredicateIterator), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)ChainPredicateIterator_dealloc, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ChainPredicateIterator_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &ChainingIterator_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ChainPredicateIterator_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ChainPredicateIterator",
+ /*tp_basicsize*/ sizeof(BPy_ChainPredicateIterator),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)ChainPredicateIterator_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ChainPredicateIterator_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &ChainingIterator_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ChainPredicateIterator_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp
index 784ee87cc06..ea4ab4b5a7b 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp
@@ -105,43 +105,44 @@ static int ChainSilhouetteIterator_init(BPy_ChainSilhouetteIterator *self,
/*-----------------------BPy_ChainSilhouetteIterator type definition ----------------------------*/
PyTypeObject ChainSilhouetteIterator_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ChainSilhouetteIterator", /* tp_name */
- sizeof(BPy_ChainSilhouetteIterator), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ChainSilhouetteIterator_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &ChainingIterator_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ChainSilhouetteIterator_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ChainSilhouetteIterator",
+ /*tp_basicsize*/ sizeof(BPy_ChainSilhouetteIterator),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ChainSilhouetteIterator_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &ChainingIterator_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ChainSilhouetteIterator_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp
index c38a8a9314c..3fde8abe1f9 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp
@@ -238,43 +238,44 @@ static PyGetSetDef BPy_ChainingIterator_getseters[] = {
/*-----------------------BPy_ChainingIterator type definition ------------------------------*/
PyTypeObject ChainingIterator_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ChainingIterator", /* tp_name */
- sizeof(BPy_ChainingIterator), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ChainingIterator_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- BPy_ChainingIterator_methods, /* tp_methods */
- nullptr, /* tp_members */
- BPy_ChainingIterator_getseters, /* tp_getset */
- &ViewEdgeIterator_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ChainingIterator___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ChainingIterator",
+ /*tp_basicsize*/ sizeof(BPy_ChainingIterator),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ChainingIterator_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ BPy_ChainingIterator_methods,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_ChainingIterator_getseters,
+ /*tp_base*/ &ViewEdgeIterator_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ChainingIterator___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
index c5b7d0f96da..180a3e00a9b 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
@@ -119,43 +119,44 @@ static PyGetSetDef BPy_CurvePointIterator_getseters[] = {
/*-----------------------BPy_CurvePointIterator type definition ------------------------------*/
PyTypeObject CurvePointIterator_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "CurvePointIterator", /* tp_name */
- sizeof(BPy_CurvePointIterator), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- CurvePointIterator_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_CurvePointIterator_getseters, /* tp_getset */
- &Iterator_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)CurvePointIterator_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "CurvePointIterator",
+ /*tp_basicsize*/ sizeof(BPy_CurvePointIterator),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ CurvePointIterator_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_CurvePointIterator_getseters,
+ /*tp_base*/ &Iterator_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)CurvePointIterator_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
index 6e4b1832c72..9d12de9efb7 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
@@ -192,43 +192,44 @@ static PyGetSetDef BPy_Interface0DIterator_getseters[] = {
/*-----------------------BPy_Interface0DIterator type definition ------------------------------*/
PyTypeObject Interface0DIterator_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "Interface0DIterator", /* tp_name */
- sizeof(BPy_Interface0DIterator), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Interface0DIterator_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- (getiterfunc)Interface0DIterator_iter, /* tp_iter */
- (iternextfunc)Interface0DIterator_iternext, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_Interface0DIterator_getseters, /* tp_getset */
- &Iterator_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Interface0DIterator_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "Interface0DIterator",
+ /*tp_basicsize*/ sizeof(BPy_Interface0DIterator),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ Interface0DIterator_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ (getiterfunc)Interface0DIterator_iter,
+ /*tp_iternext*/ (iternextfunc)Interface0DIterator_iternext,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_Interface0DIterator_getseters,
+ /*tp_base*/ &Iterator_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)Interface0DIterator_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
index 09b40dc01e3..78b8cd07fb4 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
@@ -146,43 +146,44 @@ static PyGetSetDef BPy_SVertexIterator_getseters[] = {
/*-----------------------BPy_SVertexIterator type definition ------------------------------*/
PyTypeObject SVertexIterator_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "SVertexIterator", /* tp_name */
- sizeof(BPy_SVertexIterator), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- SVertexIterator_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_SVertexIterator_getseters, /* tp_getset */
- &Iterator_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)SVertexIterator_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "SVertexIterator",
+ /*tp_basicsize*/ sizeof(BPy_SVertexIterator),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ SVertexIterator_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_SVertexIterator_getseters,
+ /*tp_base*/ &Iterator_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)SVertexIterator_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
index 4cfaa51d794..abbaae19b9e 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
@@ -277,43 +277,44 @@ static PyGetSetDef BPy_StrokeVertexIterator_getseters[] = {
/*-----------------------BPy_StrokeVertexIterator type definition ------------------------------*/
PyTypeObject StrokeVertexIterator_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "StrokeVertexIterator", /* tp_name */
- sizeof(BPy_StrokeVertexIterator), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- StrokeVertexIterator_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- (getiterfunc)StrokeVertexIterator_iter, /* tp_iter */
- (iternextfunc)StrokeVertexIterator_iternext, /* tp_iternext */
- BPy_StrokeVertexIterator_methods, /* tp_methods */
- nullptr, /* tp_members */
- BPy_StrokeVertexIterator_getseters, /* tp_getset */
- &Iterator_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)StrokeVertexIterator_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "StrokeVertexIterator",
+ /*tp_basicsize*/ sizeof(BPy_StrokeVertexIterator),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ StrokeVertexIterator_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ (getiterfunc)StrokeVertexIterator_iter,
+ /*tp_iternext*/ (iternextfunc)StrokeVertexIterator_iternext,
+ /*tp_methods*/ BPy_StrokeVertexIterator_methods,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_StrokeVertexIterator_getseters,
+ /*tp_base*/ &Iterator_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)StrokeVertexIterator_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
index 937a7103c66..7d1691d577f 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
@@ -222,43 +222,44 @@ static PyGetSetDef BPy_ViewEdgeIterator_getseters[] = {
/*-----------------------BPy_ViewEdgeIterator type definition ------------------------------*/
PyTypeObject ViewEdgeIterator_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ViewEdgeIterator", /* tp_name */
- sizeof(BPy_ViewEdgeIterator), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ViewEdgeIterator_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- BPy_ViewEdgeIterator_methods, /* tp_methods */
- nullptr, /* tp_members */
- BPy_ViewEdgeIterator_getseters, /* tp_getset */
- &Iterator_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ViewEdgeIterator_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ViewEdgeIterator",
+ /*tp_basicsize*/ sizeof(BPy_ViewEdgeIterator),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ViewEdgeIterator_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ BPy_ViewEdgeIterator_methods,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_ViewEdgeIterator_getseters,
+ /*tp_base*/ &Iterator_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ViewEdgeIterator_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
index f503494b898..7dad62818f4 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
@@ -128,43 +128,44 @@ static PyGetSetDef BPy_orientedViewEdgeIterator_getseters[] = {
/*-----------------------BPy_orientedViewEdgeIterator type definition ---------------------------*/
PyTypeObject orientedViewEdgeIterator_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "orientedViewEdgeIterator", /* tp_name */
- sizeof(BPy_orientedViewEdgeIterator), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- orientedViewEdgeIterator_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- (getiterfunc)orientedViewEdgeIterator_iter, /* tp_iter */
- (iternextfunc)orientedViewEdgeIterator_iternext, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_orientedViewEdgeIterator_getseters, /* tp_getset */
- &Iterator_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)orientedViewEdgeIterator_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "orientedViewEdgeIterator",
+ /*tp_basicsize*/ sizeof(BPy_orientedViewEdgeIterator),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ orientedViewEdgeIterator_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ (getiterfunc)orientedViewEdgeIterator_iter,
+ /*tp_iternext*/ (iternextfunc)orientedViewEdgeIterator_iternext,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_orientedViewEdgeIterator_getseters,
+ /*tp_base*/ &Iterator_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)orientedViewEdgeIterator_init,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp
index ce8c62374a6..d54e305c963 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp
@@ -55,43 +55,44 @@ static int BackboneStretcherShader___init__(BPy_BackboneStretcherShader *self,
/*-----------------------BPy_BackboneStretcherShader type definition ----------------------------*/
PyTypeObject BackboneStretcherShader_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "BackboneStretcherShader", /* tp_name */
- sizeof(BPy_BackboneStretcherShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- BackboneStretcherShader___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)BackboneStretcherShader___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "BackboneStretcherShader",
+ /*tp_basicsize*/ sizeof(BPy_BackboneStretcherShader),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ BackboneStretcherShader___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &StrokeShader_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)BackboneStretcherShader___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp
index 3970fdbe511..23de68b3cf4 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp
@@ -55,43 +55,44 @@ static int BezierCurveShader___init__(BPy_BezierCurveShader *self, PyObject *arg
/*-----------------------BPy_BezierCurveShader type definition ------------------------------*/
PyTypeObject BezierCurveShader_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "BezierCurveShader", /* tp_name */
- sizeof(BPy_BezierCurveShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- BezierCurveShader___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)BezierCurveShader___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "BezierCurveShader",
+ /*tp_basicsize*/ sizeof(BPy_BezierCurveShader),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ BezierCurveShader___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &StrokeShader_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)BezierCurveShader___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp
index b1d413bb426..c0dfebfaf37 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp
@@ -75,43 +75,44 @@ static int BlenderTextureShader___init__(BPy_BlenderTextureShader *self,
/*-----------------------BPy_BlenderTextureShader type definition ------------------------------*/
PyTypeObject BlenderTextureShader_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "BlenderTextureShader", /* tp_name */
- sizeof(BPy_BlenderTextureShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- BlenderTextureShader___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)BlenderTextureShader___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "BlenderTextureShader",
+ /*tp_basicsize*/ sizeof(BPy_BlenderTextureShader),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ BlenderTextureShader___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &StrokeShader_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)BlenderTextureShader___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp
index b357baa394c..99e344ee24b 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp
@@ -73,43 +73,44 @@ static int CalligraphicShader___init__(BPy_CalligraphicShader *self,
/*-----------------------BPy_CalligraphicShader type definition ------------------------------*/
PyTypeObject CalligraphicShader_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "CalligraphicShader", /* tp_name */
- sizeof(BPy_CalligraphicShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- CalligraphicShader___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)CalligraphicShader___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "CalligraphicShader",
+ /*tp_basicsize*/ sizeof(BPy_CalligraphicShader),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ CalligraphicShader___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &StrokeShader_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)CalligraphicShader___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp
index 01ed7bc5cf8..c6e0da91d22 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp
@@ -54,43 +54,44 @@ static int ColorNoiseShader___init__(BPy_ColorNoiseShader *self, PyObject *args,
/*-----------------------BPy_ColorNoiseShader type definition ------------------------------*/
PyTypeObject ColorNoiseShader_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ColorNoiseShader", /* tp_name */
- sizeof(BPy_ColorNoiseShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ColorNoiseShader___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ColorNoiseShader___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ColorNoiseShader",
+ /*tp_basicsize*/ sizeof(BPy_ColorNoiseShader),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ColorNoiseShader___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &StrokeShader_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ColorNoiseShader___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp
index e7eff87fb2b..d8cdadfd539 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp
@@ -60,43 +60,44 @@ static int ConstantColorShader___init__(BPy_ConstantColorShader *self,
/*-----------------------BPy_ConstantColorShader type definition ------------------------------*/
PyTypeObject ConstantColorShader_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ConstantColorShader", /* tp_name */
- sizeof(BPy_ConstantColorShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ConstantColorShader___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ConstantColorShader___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ConstantColorShader",
+ /*tp_basicsize*/ sizeof(BPy_ConstantColorShader),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ConstantColorShader___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &StrokeShader_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ConstantColorShader___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp
index e05658e500f..c03a8fe11fe 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp
@@ -54,43 +54,44 @@ static int ConstantThicknessShader___init__(BPy_ConstantThicknessShader *self,
/*-----------------------BPy_ConstantThicknessShader type definition ----------------------------*/
PyTypeObject ConstantThicknessShader_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ConstantThicknessShader", /* tp_name */
- sizeof(BPy_ConstantThicknessShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ConstantThicknessShader___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ConstantThicknessShader___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ConstantThicknessShader",
+ /*tp_basicsize*/ sizeof(BPy_ConstantThicknessShader),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ConstantThicknessShader___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &StrokeShader_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ConstantThicknessShader___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp
index 88ce8099669..bf86e283161 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp
@@ -60,43 +60,44 @@ static int ConstrainedIncreasingThicknessShader___init__(
/*-----------------------BPy_ConstrainedIncreasingThicknessShader type definition ---------------*/
PyTypeObject ConstrainedIncreasingThicknessShader_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ConstrainedIncreasingThicknessShader", /* tp_name */
- sizeof(BPy_ConstrainedIncreasingThicknessShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ConstrainedIncreasingThicknessShader___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ConstrainedIncreasingThicknessShader___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ConstrainedIncreasingThicknessShader",
+ /*tp_basicsize*/ sizeof(BPy_ConstrainedIncreasingThicknessShader),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ConstrainedIncreasingThicknessShader___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &StrokeShader_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ConstrainedIncreasingThicknessShader___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp
index 08c5e70d11a..25bfa182043 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp
@@ -62,43 +62,44 @@ static int GuidingLinesShader___init__(BPy_GuidingLinesShader *self,
/*-----------------------BPy_GuidingLinesShader type definition ------------------------------*/
PyTypeObject GuidingLinesShader_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GuidingLinesShader", /* tp_name */
- sizeof(BPy_GuidingLinesShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GuidingLinesShader___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GuidingLinesShader___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GuidingLinesShader",
+ /*tp_basicsize*/ sizeof(BPy_GuidingLinesShader),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GuidingLinesShader___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &StrokeShader_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GuidingLinesShader___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp
index 33f2eb41548..d8f8ae84543 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp
@@ -82,43 +82,44 @@ static int IncreasingColorShader___init__(BPy_IncreasingColorShader *self,
/*-----------------------BPy_IncreasingColorShader type definition ------------------------------*/
PyTypeObject IncreasingColorShader_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "IncreasingColorShader", /* tp_name */
- sizeof(BPy_IncreasingColorShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- IncreasingColorShader___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)IncreasingColorShader___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "IncreasingColorShader",
+ /*tp_basicsize*/ sizeof(BPy_IncreasingColorShader),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ IncreasingColorShader___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &StrokeShader_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)IncreasingColorShader___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp
index 9e489f24c88..7bc1f73d9e8 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp
@@ -60,43 +60,44 @@ static int IncreasingThicknessShader___init__(BPy_IncreasingThicknessShader *sel
/*-----------------------BPy_IncreasingThicknessShader type definition --------------------------*/
PyTypeObject IncreasingThicknessShader_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "IncreasingThicknessShader", /* tp_name */
- sizeof(BPy_IncreasingThicknessShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- IncreasingThicknessShader___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)IncreasingThicknessShader___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "IncreasingThicknessShader",
+ /*tp_basicsize*/ sizeof(BPy_IncreasingThicknessShader),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ IncreasingThicknessShader___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &StrokeShader_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)IncreasingThicknessShader___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp
index 25021696694..9afdf786e5c 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp
@@ -61,43 +61,44 @@ static int PolygonalizationShader___init__(BPy_PolygonalizationShader *self,
/*-----------------------BPy_PolygonalizationShader type definition -----------------------------*/
PyTypeObject PolygonalizationShader_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "PolygonalizationShader", /* tp_name */
- sizeof(BPy_PolygonalizationShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- PolygonalizationShader___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)PolygonalizationShader___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "PolygonalizationShader",
+ /*tp_basicsize*/ sizeof(BPy_PolygonalizationShader),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ PolygonalizationShader___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &StrokeShader_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)PolygonalizationShader___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp
index 9bf322cd1f8..6ee3f0130b8 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp
@@ -52,43 +52,44 @@ static int SamplingShader___init__(BPy_SamplingShader *self, PyObject *args, PyO
/*-----------------------BPy_SamplingShader type definition ------------------------------*/
PyTypeObject SamplingShader_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "SamplingShader", /* tp_name */
- sizeof(BPy_SamplingShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- SamplingShader___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)SamplingShader___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "SamplingShader",
+ /*tp_basicsize*/ sizeof(BPy_SamplingShader),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ SamplingShader___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &StrokeShader_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)SamplingShader___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp
index 1a3cba74f18..b07a1f26a3e 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp
@@ -84,43 +84,44 @@ static int SmoothingShader___init__(BPy_SmoothingShader *self, PyObject *args, P
/*-----------------------BPy_SmoothingShader type definition ------------------------------*/
PyTypeObject SmoothingShader_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "SmoothingShader", /* tp_name */
- sizeof(BPy_SmoothingShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- SmoothingShader___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)SmoothingShader___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "SmoothingShader",
+ /*tp_basicsize*/ sizeof(BPy_SmoothingShader),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ SmoothingShader___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &StrokeShader_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)SmoothingShader___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp
index 26f0dcadf86..04ea15d7b47 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp
@@ -78,43 +78,44 @@ static int SpatialNoiseShader___init__(BPy_SpatialNoiseShader *self,
/*-----------------------BPy_SpatialNoiseShader type definition ------------------------------*/
PyTypeObject SpatialNoiseShader_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "SpatialNoiseShader", /* tp_name */
- sizeof(BPy_SpatialNoiseShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- SpatialNoiseShader___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)SpatialNoiseShader___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "SpatialNoiseShader",
+ /*tp_basicsize*/ sizeof(BPy_SpatialNoiseShader),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ SpatialNoiseShader___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &StrokeShader_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)SpatialNoiseShader___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp
index a79bee0b120..ec6e7e69b49 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp
@@ -54,43 +54,44 @@ static int StrokeTextureStepShader___init__(BPy_StrokeTextureStepShader *self,
/*-----------------------BPy_StrokeTextureStepShader type definition ----------------------------*/
PyTypeObject StrokeTextureStepShader_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "StrokeTextureStepShader", /* tp_name */
- sizeof(BPy_StrokeTextureStepShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- StrokeTextureStepShader___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)StrokeTextureStepShader___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "StrokeTextureStepShader",
+ /*tp_basicsize*/ sizeof(BPy_StrokeTextureStepShader),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ StrokeTextureStepShader___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &StrokeShader_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)StrokeTextureStepShader___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp
index 24bcbff1990..08731659cc4 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp
@@ -56,43 +56,44 @@ static int ThicknessNoiseShader___init__(BPy_ThicknessNoiseShader *self,
/*-----------------------BPy_ThicknessNoiseShader type definition ------------------------------*/
PyTypeObject ThicknessNoiseShader_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ThicknessNoiseShader", /* tp_name */
- sizeof(BPy_ThicknessNoiseShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ThicknessNoiseShader___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ThicknessNoiseShader___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ThicknessNoiseShader",
+ /*tp_basicsize*/ sizeof(BPy_ThicknessNoiseShader),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ThicknessNoiseShader___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &StrokeShader_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ThicknessNoiseShader___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp
index e36c99713e8..81f1aca792d 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp
@@ -53,43 +53,44 @@ static int TipRemoverShader___init__(BPy_TipRemoverShader *self, PyObject *args,
/*-----------------------BPy_TipRemoverShader type definition ------------------------------*/
PyTypeObject TipRemoverShader_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "TipRemoverShader", /* tp_name */
- sizeof(BPy_TipRemoverShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- TipRemoverShader___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)TipRemoverShader___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "TipRemoverShader",
+ /*tp_basicsize*/ sizeof(BPy_TipRemoverShader),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ TipRemoverShader___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &StrokeShader_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)TipRemoverShader___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp
index da4fdfe5095..a8be9722cff 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp
@@ -171,43 +171,44 @@ static PyObject *UnaryFunction0DDouble___call__(BPy_UnaryFunction0DDouble *self,
/*-----------------------BPy_UnaryFunction0DDouble type definition ------------------------------*/
PyTypeObject UnaryFunction0DDouble_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0DDouble", /* tp_name */
- sizeof(BPy_UnaryFunction0DDouble), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction0DDouble___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)UnaryFunction0DDouble___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- (ternaryfunc)UnaryFunction0DDouble___call__, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction0DDouble___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction0DDouble___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "UnaryFunction0DDouble",
+ /*tp_basicsize*/ sizeof(BPy_UnaryFunction0DDouble),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)UnaryFunction0DDouble___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)UnaryFunction0DDouble___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ (ternaryfunc)UnaryFunction0DDouble___call__,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ UnaryFunction0DDouble___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)UnaryFunction0DDouble___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp
index d6c095c9f0a..b1a1cf816d4 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp
@@ -110,43 +110,44 @@ static PyObject *UnaryFunction0DEdgeNature___call__(BPy_UnaryFunction0DEdgeNatur
/*-----------------------BPy_UnaryFunction0DEdgeNature type definition --------------------------*/
PyTypeObject UnaryFunction0DEdgeNature_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0DEdgeNature", /* tp_name */
- sizeof(BPy_UnaryFunction0DEdgeNature), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction0DEdgeNature___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)UnaryFunction0DEdgeNature___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- (ternaryfunc)UnaryFunction0DEdgeNature___call__, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction0DEdgeNature___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction0DEdgeNature___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "UnaryFunction0DEdgeNature",
+ /*tp_basicsize*/ sizeof(BPy_UnaryFunction0DEdgeNature),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)UnaryFunction0DEdgeNature___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)UnaryFunction0DEdgeNature___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ (ternaryfunc)UnaryFunction0DEdgeNature___call__,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ UnaryFunction0DEdgeNature___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)UnaryFunction0DEdgeNature___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp
index 20511cb0d4b..588959667c5 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp
@@ -147,43 +147,44 @@ static PyObject *UnaryFunction0DFloat___call__(BPy_UnaryFunction0DFloat *self,
/*-----------------------BPy_UnaryFunction0DFloat type definition ------------------------------*/
PyTypeObject UnaryFunction0DFloat_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0DFloat", /* tp_name */
- sizeof(BPy_UnaryFunction0DFloat), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction0DFloat___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)UnaryFunction0DFloat___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- (ternaryfunc)UnaryFunction0DFloat___call__, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction0DFloat___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction0DFloat___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "UnaryFunction0DFloat",
+ /*tp_basicsize*/ sizeof(BPy_UnaryFunction0DFloat),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)UnaryFunction0DFloat___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)UnaryFunction0DFloat___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ (ternaryfunc)UnaryFunction0DFloat___call__,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ UnaryFunction0DFloat___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)UnaryFunction0DFloat___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp
index 61a7693d605..f0a62995c6d 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp
@@ -106,43 +106,44 @@ static PyObject *UnaryFunction0DId___call__(BPy_UnaryFunction0DId *self,
/*-----------------------BPy_UnaryFunction0DId type definition ------------------------------*/
PyTypeObject UnaryFunction0DId_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0DId", /* tp_name */
- sizeof(BPy_UnaryFunction0DId), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction0DId___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)UnaryFunction0DId___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- (ternaryfunc)UnaryFunction0DId___call__, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction0DId___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction0DId___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "UnaryFunction0DId",
+ /*tp_basicsize*/ sizeof(BPy_UnaryFunction0DId),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)UnaryFunction0DId___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)UnaryFunction0DId___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ (ternaryfunc)UnaryFunction0DId___call__,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ UnaryFunction0DId___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)UnaryFunction0DId___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp
index 224f1ad7229..0c8294ff8dc 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp
@@ -109,43 +109,44 @@ static PyObject *UnaryFunction0DMaterial___call__(BPy_UnaryFunction0DMaterial *s
/*-----------------------BPy_UnaryFunction0DMaterial type definition ----------------------------*/
PyTypeObject UnaryFunction0DMaterial_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0DMaterial", /* tp_name */
- sizeof(BPy_UnaryFunction0DMaterial), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction0DMaterial___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)UnaryFunction0DMaterial___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- (ternaryfunc)UnaryFunction0DMaterial___call__, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction0DMaterial___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction0DMaterial___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "UnaryFunction0DMaterial",
+ /*tp_basicsize*/ sizeof(BPy_UnaryFunction0DMaterial),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)UnaryFunction0DMaterial___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)UnaryFunction0DMaterial___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ (ternaryfunc)UnaryFunction0DMaterial___call__,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ UnaryFunction0DMaterial___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)UnaryFunction0DMaterial___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp
index 8faefd085d6..c6e7fed4424 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp
@@ -112,43 +112,44 @@ static PyObject *UnaryFunction0DUnsigned___call__(BPy_UnaryFunction0DUnsigned *s
/*-----------------------BPy_UnaryFunction0DUnsigned type definition ----------------------------*/
PyTypeObject UnaryFunction0DUnsigned_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0DUnsigned", /* tp_name */
- sizeof(BPy_UnaryFunction0DUnsigned), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction0DUnsigned___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)UnaryFunction0DUnsigned___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- (ternaryfunc)UnaryFunction0DUnsigned___call__, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction0DUnsigned___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction0DUnsigned___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "UnaryFunction0DUnsigned",
+ /*tp_basicsize*/ sizeof(BPy_UnaryFunction0DUnsigned),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)UnaryFunction0DUnsigned___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)UnaryFunction0DUnsigned___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ (ternaryfunc)UnaryFunction0DUnsigned___call__,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ UnaryFunction0DUnsigned___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)UnaryFunction0DUnsigned___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp
index c13dbc85eee..fda4536b252 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp
@@ -115,43 +115,44 @@ static PyObject *UnaryFunction0DVec2f___call__(BPy_UnaryFunction0DVec2f *self,
/*-----------------------BPy_UnaryFunction0DVec2f type definition ------------------------------*/
PyTypeObject UnaryFunction0DVec2f_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0DVec2f", /* tp_name */
- sizeof(BPy_UnaryFunction0DVec2f), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction0DVec2f___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)UnaryFunction0DVec2f___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- (ternaryfunc)UnaryFunction0DVec2f___call__, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction0DVec2f___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction0DVec2f___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "UnaryFunction0DVec2f",
+ /*tp_basicsize*/ sizeof(BPy_UnaryFunction0DVec2f),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)UnaryFunction0DVec2f___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)UnaryFunction0DVec2f___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ (ternaryfunc)UnaryFunction0DVec2f___call__,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ UnaryFunction0DVec2f___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)UnaryFunction0DVec2f___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp
index d373ae7fe03..5409bd94789 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp
@@ -108,43 +108,44 @@ static PyObject *UnaryFunction0DVec3f___call__(BPy_UnaryFunction0DVec3f *self,
/*-----------------------BPy_UnaryFunction0DVec3f type definition ------------------------------*/
PyTypeObject UnaryFunction0DVec3f_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0DVec3f", /* tp_name */
- sizeof(BPy_UnaryFunction0DVec3f), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction0DVec3f___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)UnaryFunction0DVec3f___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- (ternaryfunc)UnaryFunction0DVec3f___call__, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction0DVec3f___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction0DVec3f___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "UnaryFunction0DVec3f",
+ /*tp_basicsize*/ sizeof(BPy_UnaryFunction0DVec3f),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)UnaryFunction0DVec3f___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)UnaryFunction0DVec3f___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ (ternaryfunc)UnaryFunction0DVec3f___call__,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ UnaryFunction0DVec3f___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)UnaryFunction0DVec3f___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp
index 7f5b98da223..73049f8e0c2 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp
@@ -121,43 +121,44 @@ static PyObject *UnaryFunction0DVectorViewShape___call__(BPy_UnaryFunction0DVect
/*-----------------------BPy_UnaryFunction0DVectorViewShape type definition ---------------------*/
PyTypeObject UnaryFunction0DVectorViewShape_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0DVectorViewShape", /* tp_name */
- sizeof(BPy_UnaryFunction0DVectorViewShape), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction0DVectorViewShape___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)UnaryFunction0DVectorViewShape___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- (ternaryfunc)UnaryFunction0DVectorViewShape___call__, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction0DVectorViewShape___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction0DVectorViewShape___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "UnaryFunction0DVectorViewShape",
+ /*tp_basicsize*/ sizeof(BPy_UnaryFunction0DVectorViewShape),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)UnaryFunction0DVectorViewShape___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)UnaryFunction0DVectorViewShape___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ (ternaryfunc)UnaryFunction0DVectorViewShape___call__,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ UnaryFunction0DVectorViewShape___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)UnaryFunction0DVectorViewShape___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp
index 06a08cc02f5..319087b5092 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp
@@ -117,43 +117,44 @@ static PyObject *UnaryFunction0DViewShape___call__(BPy_UnaryFunction0DViewShape
/*-----------------------BPy_UnaryFunction0DViewShape type definition ---------------------------*/
PyTypeObject UnaryFunction0DViewShape_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0DViewShape", /* tp_name */
- sizeof(BPy_UnaryFunction0DViewShape), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction0DViewShape___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)UnaryFunction0DViewShape___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- (ternaryfunc)UnaryFunction0DViewShape___call__, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction0DViewShape___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction0DViewShape___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "UnaryFunction0DViewShape",
+ /*tp_basicsize*/ sizeof(BPy_UnaryFunction0DViewShape),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)UnaryFunction0DViewShape___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)UnaryFunction0DViewShape___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ (ternaryfunc)UnaryFunction0DViewShape___call__,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ UnaryFunction0DViewShape___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)UnaryFunction0DViewShape___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp
index deea7008002..55a02890066 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp
@@ -58,43 +58,44 @@ static int ShapeIdF0D___init__(BPy_ShapeIdF0D *self, PyObject *args, PyObject *k
/*-----------------------BPy_ShapeIdF0D type definition ------------------------------*/
PyTypeObject ShapeIdF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ShapeIdF0D", /* tp_name */
- sizeof(BPy_ShapeIdF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ShapeIdF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DId_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ShapeIdF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ShapeIdF0D",
+ /*tp_basicsize*/ sizeof(BPy_ShapeIdF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ShapeIdF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DId_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ShapeIdF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp
index 49273ddf132..5abd54a48ad 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp
@@ -61,43 +61,44 @@ static int MaterialF0D___init__(BPy_MaterialF0D *self, PyObject *args, PyObject
/*-----------------------BPy_MaterialF0D type definition ------------------------------*/
PyTypeObject MaterialF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "MaterialF0D", /* tp_name */
- sizeof(BPy_MaterialF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- MaterialF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DMaterial_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)MaterialF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "MaterialF0D",
+ /*tp_basicsize*/ sizeof(BPy_MaterialF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ MaterialF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DMaterial_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)MaterialF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp
index 66a93f961e7..750e5253793 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp
@@ -52,43 +52,44 @@ static int CurveNatureF0D___init__(BPy_CurveNatureF0D *self, PyObject *args, PyO
/*-----------------------BPy_CurveNatureF0D type definition ------------------------------*/
PyTypeObject CurveNatureF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "CurveNatureF0D", /* tp_name */
- sizeof(BPy_CurveNatureF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- CurveNatureF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DEdgeNature_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)CurveNatureF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "CurveNatureF0D",
+ /*tp_basicsize*/ sizeof(BPy_CurveNatureF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ CurveNatureF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DEdgeNature_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)CurveNatureF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp
index 0b5c818de9d..ba4f1e9bc37 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp
@@ -54,43 +54,44 @@ static int Normal2DF0D___init__(BPy_Normal2DF0D *self, PyObject *args, PyObject
/*-----------------------BPy_Normal2DF0D type definition ------------------------------*/
PyTypeObject Normal2DF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "Normal2DF0D", /* tp_name */
- sizeof(BPy_Normal2DF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Normal2DF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DVec2f_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Normal2DF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "Normal2DF0D",
+ /*tp_basicsize*/ sizeof(BPy_Normal2DF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ Normal2DF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DVec2f_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)Normal2DF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp
index 7792cbb2495..9d6d1e31da3 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp
@@ -56,43 +56,44 @@ static int VertexOrientation2DF0D___init__(BPy_VertexOrientation2DF0D *self,
/*-----------------------BPy_VertexOrientation2DF0D type definition -----------------------------*/
PyTypeObject VertexOrientation2DF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "VertexOrientation2DF0D", /* tp_name */
- sizeof(BPy_VertexOrientation2DF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- VertexOrientation2DF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DVec2f_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)VertexOrientation2DF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "VertexOrientation2DF0D",
+ /*tp_basicsize*/ sizeof(BPy_VertexOrientation2DF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ VertexOrientation2DF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DVec2f_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)VertexOrientation2DF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp
index 9a0aa3ae4a8..95cf14eafdf 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp
@@ -56,43 +56,44 @@ static int VertexOrientation3DF0D___init__(BPy_VertexOrientation3DF0D *self,
/*-----------------------BPy_VertexOrientation3DF0D type definition -----------------------------*/
PyTypeObject VertexOrientation3DF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "VertexOrientation3DF0D", /* tp_name */
- sizeof(BPy_VertexOrientation3DF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- VertexOrientation3DF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DVec3f_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)VertexOrientation3DF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "VertexOrientation3DF0D",
+ /*tp_basicsize*/ sizeof(BPy_VertexOrientation3DF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ VertexOrientation3DF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DVec3f_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)VertexOrientation3DF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp
index 7a7e13dbb90..92644c21bde 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp
@@ -51,43 +51,44 @@ static int GetOccludeeF0D___init__(BPy_GetOccludeeF0D *self, PyObject *args, PyO
/*-----------------------BPy_GetOccludeeF0D type definition ------------------------------*/
PyTypeObject GetOccludeeF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetOccludeeF0D", /* tp_name */
- sizeof(BPy_GetOccludeeF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetOccludeeF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DViewShape_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetOccludeeF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetOccludeeF0D",
+ /*tp_basicsize*/ sizeof(BPy_GetOccludeeF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetOccludeeF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DViewShape_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetOccludeeF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp
index 6b9c2355c6c..38cc90f366a 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp
@@ -51,43 +51,44 @@ static int GetShapeF0D___init__(BPy_GetShapeF0D *self, PyObject *args, PyObject
/*-----------------------BPy_GetShapeF0D type definition ------------------------------*/
PyTypeObject GetShapeF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetShapeF0D", /* tp_name */
- sizeof(BPy_GetShapeF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetShapeF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DViewShape_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetShapeF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetShapeF0D",
+ /*tp_basicsize*/ sizeof(BPy_GetShapeF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetShapeF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DViewShape_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetShapeF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp
index a596e13c465..884d7da3f77 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp
@@ -56,43 +56,44 @@ static int Curvature2DAngleF0D___init__(BPy_Curvature2DAngleF0D *self,
/*-----------------------BPy_Curvature2DAngleF0D type definition ------------------------------*/
PyTypeObject Curvature2DAngleF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "Curvature2DAngleF0D", /* tp_name */
- sizeof(BPy_Curvature2DAngleF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Curvature2DAngleF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Curvature2DAngleF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "Curvature2DAngleF0D",
+ /*tp_basicsize*/ sizeof(BPy_Curvature2DAngleF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ Curvature2DAngleF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)Curvature2DAngleF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp
index 25385d05b7b..3668c81c454 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp
@@ -61,43 +61,44 @@ static int DensityF0D___init__(BPy_DensityF0D *self, PyObject *args, PyObject *k
/*-----------------------BPy_DensityF0D type definition ------------------------------*/
PyTypeObject DensityF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "DensityF0D", /* tp_name */
- sizeof(BPy_DensityF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- DensityF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)DensityF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "DensityF0D",
+ /*tp_basicsize*/ sizeof(BPy_DensityF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ DensityF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)DensityF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp
index c3be379e32d..2c3b78ffbc9 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp
@@ -51,43 +51,44 @@ static int GetProjectedXF0D___init__(BPy_GetProjectedXF0D *self, PyObject *args,
/*-----------------------BPy_GetProjectedXF0D type definition ------------------------------*/
PyTypeObject GetProjectedXF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetProjectedXF0D", /* tp_name */
- sizeof(BPy_GetProjectedXF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetProjectedXF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetProjectedXF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetProjectedXF0D",
+ /*tp_basicsize*/ sizeof(BPy_GetProjectedXF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetProjectedXF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetProjectedXF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp
index b6ce4bc9bcd..47d3ee34fb0 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp
@@ -51,43 +51,44 @@ static int GetProjectedYF0D___init__(BPy_GetProjectedYF0D *self, PyObject *args,
/*-----------------------BPy_GetProjectedYF0D type definition ------------------------------*/
PyTypeObject GetProjectedYF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetProjectedYF0D", /* tp_name */
- sizeof(BPy_GetProjectedYF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetProjectedYF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetProjectedYF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetProjectedYF0D",
+ /*tp_basicsize*/ sizeof(BPy_GetProjectedYF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetProjectedYF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetProjectedYF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp
index 4bba4e23665..8978624eea0 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp
@@ -51,43 +51,44 @@ static int GetProjectedZF0D___init__(BPy_GetProjectedZF0D *self, PyObject *args,
/*-----------------------BPy_GetProjectedZF0D type definition ------------------------------*/
PyTypeObject GetProjectedZF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetProjectedZF0D", /* tp_name */
- sizeof(BPy_GetProjectedZF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetProjectedZF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetProjectedZF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetProjectedZF0D",
+ /*tp_basicsize*/ sizeof(BPy_GetProjectedZF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetProjectedZF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetProjectedZF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp
index 3ed3cf7f7f3..39bc12a1b2a 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp
@@ -51,43 +51,44 @@ static int GetXF0D___init__(BPy_GetXF0D *self, PyObject *args, PyObject *kwds)
/*-----------------------BPy_GetXF0D type definition ------------------------------*/
PyTypeObject GetXF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetXF0D", /* tp_name */
- sizeof(BPy_GetXF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetXF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetXF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetXF0D",
+ /*tp_basicsize*/ sizeof(BPy_GetXF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetXF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetXF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp
index fd8238e4726..5c0435cc3a4 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp
@@ -51,43 +51,44 @@ static int GetYF0D___init__(BPy_GetYF0D *self, PyObject *args, PyObject *kwds)
/*-----------------------BPy_GetYF0D type definition ------------------------------*/
PyTypeObject GetYF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetYF0D", /* tp_name */
- sizeof(BPy_GetYF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetYF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetYF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetYF0D",
+ /*tp_basicsize*/ sizeof(BPy_GetYF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetYF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetYF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp
index 8c44c9bf7dc..fc569cac044 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp
@@ -51,43 +51,44 @@ static int GetZF0D___init__(BPy_GetZF0D *self, PyObject *args, PyObject *kwds)
/*-----------------------BPy_GetZF0D type definition ------------------------------*/
PyTypeObject GetZF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetZF0D", /* tp_name */
- sizeof(BPy_GetZF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetZF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetZF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetZF0D",
+ /*tp_basicsize*/ sizeof(BPy_GetZF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetZF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetZF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp
index 0dc9f9b4b21..93f1ee6cd13 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp
@@ -59,43 +59,44 @@ static int LocalAverageDepthF0D___init__(BPy_LocalAverageDepthF0D *self,
/*-----------------------BPy_LocalAverageDepthF0D type definition ------------------------------*/
PyTypeObject LocalAverageDepthF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "LocalAverageDepthF0D", /* tp_name */
- sizeof(BPy_LocalAverageDepthF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- LocalAverageDepthF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)LocalAverageDepthF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "LocalAverageDepthF0D",
+ /*tp_basicsize*/ sizeof(BPy_LocalAverageDepthF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ LocalAverageDepthF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)LocalAverageDepthF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp
index 395da54356d..019340204a5 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp
@@ -56,43 +56,44 @@ static int ZDiscontinuityF0D___init__(BPy_ZDiscontinuityF0D *self, PyObject *arg
/*-----------------------BPy_ZDiscontinuityF0D type definition ------------------------------*/
PyTypeObject ZDiscontinuityF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ZDiscontinuityF0D", /* tp_name */
- sizeof(BPy_ZDiscontinuityF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ZDiscontinuityF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ZDiscontinuityF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ZDiscontinuityF0D",
+ /*tp_basicsize*/ sizeof(BPy_ZDiscontinuityF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ZDiscontinuityF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ZDiscontinuityF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp
index fffea12e0da..c9ad1b20b47 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp
@@ -54,43 +54,44 @@ static int GetCurvilinearAbscissaF0D___init__(BPy_GetCurvilinearAbscissaF0D *sel
/*-----------------------BPy_GetCurvilinearAbscissaF0D type definition --------------------------*/
PyTypeObject GetCurvilinearAbscissaF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetCurvilinearAbscissaF0D", /* tp_name */
- sizeof(BPy_GetCurvilinearAbscissaF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetCurvilinearAbscissaF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DFloat_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetCurvilinearAbscissaF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetCurvilinearAbscissaF0D",
+ /*tp_basicsize*/ sizeof(BPy_GetCurvilinearAbscissaF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetCurvilinearAbscissaF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DFloat_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetCurvilinearAbscissaF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp
index 4354d651f27..1420e41d90a 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp
@@ -49,44 +49,45 @@ static int GetParameterF0D___init__(BPy_GetParameterF0D *self, PyObject *args, P
}
/*-----------------------BPy_GetParameterF0D type definition ------------------------------*/
+
PyTypeObject GetParameterF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetParameterF0D", /* tp_name */
- sizeof(BPy_GetParameterF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetParameterF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DFloat_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetParameterF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ /*tp_name*/ PyVarObject_HEAD_INIT(nullptr, 0) "GetParameterF0D",
+ /*tp_basicsize*/ sizeof(BPy_GetParameterF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetParameterF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DFloat_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetParameterF0D___init__,
+ /*tp_alloc*/ nullptr,
+ nullptr, /*tp_new*/
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp
index 671844fb6b3..1fce16fc53a 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp
@@ -59,43 +59,44 @@ static int GetViewMapGradientNormF0D___init__(BPy_GetViewMapGradientNormF0D *sel
/*-----------------------BPy_GetViewMapGradientNormF0D type definition --------------------------*/
PyTypeObject GetViewMapGradientNormF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetViewMapGradientNormF0D", /* tp_name */
- sizeof(BPy_GetViewMapGradientNormF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetViewMapGradientNormF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DFloat_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetViewMapGradientNormF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetViewMapGradientNormF0D",
+ /*tp_basicsize*/ sizeof(BPy_GetViewMapGradientNormF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetViewMapGradientNormF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DFloat_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetViewMapGradientNormF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp
index ed1902cbd8b..b65032d650f 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp
@@ -57,43 +57,44 @@ static int ReadCompleteViewMapPixelF0D___init__(BPy_ReadCompleteViewMapPixelF0D
/*-----------------------BPy_ReadCompleteViewMapPixelF0D type definition ------------------------*/
PyTypeObject ReadCompleteViewMapPixelF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ReadCompleteViewMapPixelF0D", /* tp_name */
- sizeof(BPy_ReadCompleteViewMapPixelF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ReadCompleteViewMapPixelF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DFloat_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ReadCompleteViewMapPixelF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ReadCompleteViewMapPixelF0D",
+ /*tp_basicsize*/ sizeof(BPy_ReadCompleteViewMapPixelF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ReadCompleteViewMapPixelF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DFloat_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ReadCompleteViewMapPixelF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp
index cd60d99593a..ff934bc4a50 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp
@@ -58,43 +58,44 @@ static int ReadMapPixelF0D___init__(BPy_ReadMapPixelF0D *self, PyObject *args, P
/*-----------------------BPy_ReadMapPixelF0D type definition ------------------------------*/
PyTypeObject ReadMapPixelF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ReadMapPixelF0D", /* tp_name */
- sizeof(BPy_ReadMapPixelF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ReadMapPixelF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DFloat_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ReadMapPixelF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ReadMapPixelF0D",
+ /*tp_basicsize*/ sizeof(BPy_ReadMapPixelF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ReadMapPixelF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DFloat_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ReadMapPixelF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp
index 82362704119..262dc90a2d7 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp
@@ -63,43 +63,44 @@ static int ReadSteerableViewMapPixelF0D___init__(BPy_ReadSteerableViewMapPixelF0
/*-----------------------BPy_ReadSteerableViewMapPixelF0D type definition -----------------------*/
PyTypeObject ReadSteerableViewMapPixelF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ReadSteerableViewMapPixelF0D", /* tp_name */
- sizeof(BPy_ReadSteerableViewMapPixelF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ReadSteerableViewMapPixelF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DFloat_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ReadSteerableViewMapPixelF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ReadSteerableViewMapPixelF0D",
+ /*tp_basicsize*/ sizeof(BPy_ReadSteerableViewMapPixelF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ReadSteerableViewMapPixelF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DFloat_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ReadSteerableViewMapPixelF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp
index 2c4300a8059..658345bed1b 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp
@@ -59,43 +59,44 @@ static int QuantitativeInvisibilityF0D___init__(BPy_QuantitativeInvisibilityF0D
/*-----------------------BPy_QuantitativeInvisibilityF0D type definition ------------------------*/
PyTypeObject QuantitativeInvisibilityF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "QuantitativeInvisibilityF0D", /* tp_name */
- sizeof(BPy_QuantitativeInvisibilityF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- QuantitativeInvisibilityF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DUnsigned_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)QuantitativeInvisibilityF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "QuantitativeInvisibilityF0D",
+ /*tp_basicsize*/ sizeof(BPy_QuantitativeInvisibilityF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ QuantitativeInvisibilityF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DUnsigned_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)QuantitativeInvisibilityF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp
index 797708daa9b..e91528a42a2 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp
@@ -52,43 +52,44 @@ static int GetOccludersF0D___init__(BPy_GetOccludersF0D *self, PyObject *args, P
/*-----------------------BPy_GetOccludersF0D type definition ------------------------------*/
PyTypeObject GetOccludersF0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetOccludersF0D", /* tp_name */
- sizeof(BPy_GetOccludersF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetOccludersF0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction0DVectorViewShape_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetOccludersF0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetOccludersF0D",
+ /*tp_basicsize*/ sizeof(BPy_GetOccludersF0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetOccludersF0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction0DVectorViewShape_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetOccludersF0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp
index 3fe84b3a76f..2adaeee6e9f 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp
@@ -252,43 +252,44 @@ static PyGetSetDef BPy_UnaryFunction1DDouble_getseters[] = {
/*-----------------------BPy_UnaryFunction1DDouble type definition ------------------------------*/
PyTypeObject UnaryFunction1DDouble_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction1DDouble", /* tp_name */
- sizeof(BPy_UnaryFunction1DDouble), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction1DDouble___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)UnaryFunction1DDouble___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- (ternaryfunc)UnaryFunction1DDouble___call__, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction1DDouble___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_UnaryFunction1DDouble_getseters, /* tp_getset */
- &UnaryFunction1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction1DDouble___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "UnaryFunction1DDouble",
+ /*tp_basicsize*/ sizeof(BPy_UnaryFunction1DDouble),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)UnaryFunction1DDouble___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)UnaryFunction1DDouble___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ (ternaryfunc)UnaryFunction1DDouble___call__,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ UnaryFunction1DDouble___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_UnaryFunction1DDouble_getseters,
+ /*tp_base*/ &UnaryFunction1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)UnaryFunction1DDouble___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp
index 33f534e9860..03e6417a316 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp
@@ -159,43 +159,44 @@ static PyGetSetDef BPy_UnaryFunction1DEdgeNature_getseters[] = {
/*-----------------------BPy_UnaryFunction1DEdgeNature type definition --------------------------*/
PyTypeObject UnaryFunction1DEdgeNature_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction1DEdgeNature", /* tp_name */
- sizeof(BPy_UnaryFunction1DEdgeNature), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction1DEdgeNature___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)UnaryFunction1DEdgeNature___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- (ternaryfunc)UnaryFunction1DEdgeNature___call__, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction1DEdgeNature___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_UnaryFunction1DEdgeNature_getseters, /* tp_getset */
- &UnaryFunction1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction1DEdgeNature___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "UnaryFunction1DEdgeNature",
+ /*tp_basicsize*/ sizeof(BPy_UnaryFunction1DEdgeNature),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)UnaryFunction1DEdgeNature___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)UnaryFunction1DEdgeNature___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ (ternaryfunc)UnaryFunction1DEdgeNature___call__,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ UnaryFunction1DEdgeNature___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_UnaryFunction1DEdgeNature_getseters,
+ /*tp_base*/ &UnaryFunction1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)UnaryFunction1DEdgeNature___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp
index c18bbff53c5..e843313e63f 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp
@@ -148,43 +148,44 @@ static PyGetSetDef BPy_UnaryFunction1DFloat_getseters[] = {
/*-----------------------BPy_UnaryFunction1DFloat type definition ------------------------------*/
PyTypeObject UnaryFunction1DFloat_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction1DFloat", /* tp_name */
- sizeof(BPy_UnaryFunction1DFloat), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction1DFloat___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)UnaryFunction1DFloat___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- (ternaryfunc)UnaryFunction1DFloat___call__, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction1DFloat___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_UnaryFunction1DFloat_getseters, /* tp_getset */
- &UnaryFunction1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction1DFloat___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "UnaryFunction1DFloat",
+ /*tp_basicsize*/ sizeof(BPy_UnaryFunction1DFloat),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)UnaryFunction1DFloat___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)UnaryFunction1DFloat___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ (ternaryfunc)UnaryFunction1DFloat___call__,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ UnaryFunction1DFloat___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_UnaryFunction1DFloat_getseters,
+ /*tp_base*/ &UnaryFunction1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)UnaryFunction1DFloat___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp
index 800a5da1978..a029dec4e29 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp
@@ -160,43 +160,44 @@ static PyGetSetDef BPy_UnaryFunction1DUnsigned_getseters[] = {
/*-----------------------BPy_UnaryFunction1DUnsigned type definition ----------------------------*/
PyTypeObject UnaryFunction1DUnsigned_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction1DUnsigned", /* tp_name */
- sizeof(BPy_UnaryFunction1DUnsigned), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction1DUnsigned___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)UnaryFunction1DUnsigned___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- (ternaryfunc)UnaryFunction1DUnsigned___call__, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction1DUnsigned___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_UnaryFunction1DUnsigned_getseters, /* tp_getset */
- &UnaryFunction1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction1DUnsigned___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "UnaryFunction1DUnsigned",
+ /*tp_basicsize*/ sizeof(BPy_UnaryFunction1DUnsigned),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)UnaryFunction1DUnsigned___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)UnaryFunction1DUnsigned___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ (ternaryfunc)UnaryFunction1DUnsigned___call__,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ UnaryFunction1DUnsigned___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_UnaryFunction1DUnsigned_getseters,
+ /*tp_base*/ &UnaryFunction1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)UnaryFunction1DUnsigned___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp
index bc76a83515b..b2272d0ecbc 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp
@@ -163,43 +163,44 @@ static PyGetSetDef BPy_UnaryFunction1DVec2f_getseters[] = {
/*-----------------------BPy_UnaryFunction1DVec2f type definition ------------------------------*/
PyTypeObject UnaryFunction1DVec2f_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction1DVec2f", /* tp_name */
- sizeof(BPy_UnaryFunction1DVec2f), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction1DVec2f___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)UnaryFunction1DVec2f___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- (ternaryfunc)UnaryFunction1DVec2f___call__, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction1DVec2f___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_UnaryFunction1DVec2f_getseters, /* tp_getset */
- &UnaryFunction1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction1DVec2f___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "UnaryFunction1DVec2f",
+ /*tp_basicsize*/ sizeof(BPy_UnaryFunction1DVec2f),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)UnaryFunction1DVec2f___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)UnaryFunction1DVec2f___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ (ternaryfunc)UnaryFunction1DVec2f___call__,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ UnaryFunction1DVec2f___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_UnaryFunction1DVec2f_getseters,
+ /*tp_base*/ &UnaryFunction1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)UnaryFunction1DVec2f___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp
index 7a5521f7571..59745628a52 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp
@@ -156,43 +156,44 @@ static PyGetSetDef BPy_UnaryFunction1DVec3f_getseters[] = {
/*-----------------------BPy_UnaryFunction1DVec3f type definition ------------------------------*/
PyTypeObject UnaryFunction1DVec3f_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction1DVec3f", /* tp_name */
- sizeof(BPy_UnaryFunction1DVec3f), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction1DVec3f___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)UnaryFunction1DVec3f___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- (ternaryfunc)UnaryFunction1DVec3f___call__, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction1DVec3f___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_UnaryFunction1DVec3f_getseters, /* tp_getset */
- &UnaryFunction1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction1DVec3f___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "UnaryFunction1DVec3f",
+ /*tp_basicsize*/ sizeof(BPy_UnaryFunction1DVec3f),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)UnaryFunction1DVec3f___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)UnaryFunction1DVec3f___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ (ternaryfunc)UnaryFunction1DVec3f___call__,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ UnaryFunction1DVec3f___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_UnaryFunction1DVec3f_getseters,
+ /*tp_base*/ &UnaryFunction1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)UnaryFunction1DVec3f___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp
index fa15983f0d3..4579fe7682d 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp
@@ -185,43 +185,44 @@ static PyGetSetDef BPy_UnaryFunction1DVectorViewShape_getseters[] = {
/*-----------------------BPy_UnaryFunction1DVectorViewShape type definition ---------------------*/
PyTypeObject UnaryFunction1DVectorViewShape_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction1DVectorViewShape", /* tp_name */
- sizeof(BPy_UnaryFunction1DVectorViewShape), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction1DVectorViewShape___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)UnaryFunction1DVectorViewShape___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- (ternaryfunc)UnaryFunction1DVectorViewShape___call__, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction1DVectorViewShape___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_UnaryFunction1DVectorViewShape_getseters, /* tp_getset */
- &UnaryFunction1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction1DVectorViewShape___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "UnaryFunction1DVectorViewShape",
+ /*tp_basicsize*/ sizeof(BPy_UnaryFunction1DVectorViewShape),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)UnaryFunction1DVectorViewShape___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)UnaryFunction1DVectorViewShape___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ (ternaryfunc)UnaryFunction1DVectorViewShape___call__,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ UnaryFunction1DVectorViewShape___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_UnaryFunction1DVectorViewShape_getseters,
+ /*tp_base*/ &UnaryFunction1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)UnaryFunction1DVectorViewShape___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp
index 7f952f1c991..2b4f1c148fc 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp
@@ -169,43 +169,44 @@ static PyGetSetDef BPy_UnaryFunction1DVoid_getseters[] = {
/*-----------------------BPy_UnaryFunction1DVoid type definition ------------------------------*/
PyTypeObject UnaryFunction1DVoid_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction1DVoid", /* tp_name */
- sizeof(BPy_UnaryFunction1DVoid), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction1DVoid___dealloc__, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- (reprfunc)UnaryFunction1DVoid___repr__, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- (ternaryfunc)UnaryFunction1DVoid___call__, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction1DVoid___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_UnaryFunction1DVoid_getseters, /* tp_getset */
- &UnaryFunction1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction1DVoid___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "UnaryFunction1DVoid",
+ /*tp_basicsize*/ sizeof(BPy_UnaryFunction1DVoid),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)UnaryFunction1DVoid___dealloc__,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ (reprfunc)UnaryFunction1DVoid___repr__,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ (ternaryfunc)UnaryFunction1DVoid___call__,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ UnaryFunction1DVoid___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_UnaryFunction1DVoid_getseters,
+ /*tp_base*/ &UnaryFunction1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)UnaryFunction1DVoid___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp
index ca51824acf0..901a309f9be 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp
@@ -64,43 +64,44 @@ static int CurveNatureF1D___init__(BPy_CurveNatureF1D *self, PyObject *args, PyO
/*-----------------------BPy_CurveNatureF1D type definition ------------------------------*/
PyTypeObject CurveNatureF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "CurveNatureF1D", /* tp_name */
- sizeof(BPy_CurveNatureF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- CurveNatureF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DEdgeNature_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)CurveNatureF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "CurveNatureF1D",
+ /*tp_basicsize*/ sizeof(BPy_CurveNatureF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ CurveNatureF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DEdgeNature_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)CurveNatureF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp
index 3da7d8fa0a2..aa0e6be7b27 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp
@@ -58,43 +58,44 @@ static int Normal2DF1D___init__(BPy_Normal2DF1D *self, PyObject *args, PyObject
/*-----------------------BPy_Normal2DF1D type definition ------------------------------*/
PyTypeObject Normal2DF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "Normal2DF1D", /* tp_name */
- sizeof(BPy_Normal2DF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Normal2DF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DVec2f_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Normal2DF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "Normal2DF1D",
+ /*tp_basicsize*/ sizeof(BPy_Normal2DF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ Normal2DF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DVec2f_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)Normal2DF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp
index 64613c1aa09..0a9b7aa506b 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp
@@ -58,43 +58,44 @@ static int Orientation2DF1D___init__(BPy_Orientation2DF1D *self, PyObject *args,
/*-----------------------BPy_Orientation2DF1D type definition ------------------------------*/
PyTypeObject Orientation2DF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "Orientation2DF1D", /* tp_name */
- sizeof(BPy_Orientation2DF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Orientation2DF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DVec2f_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Orientation2DF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "Orientation2DF1D",
+ /*tp_basicsize*/ sizeof(BPy_Orientation2DF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ Orientation2DF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DVec2f_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)Orientation2DF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp
index f840bf928bf..09b421768a7 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp
@@ -58,43 +58,44 @@ static int Orientation3DF1D___init__(BPy_Orientation3DF1D *self, PyObject *args,
/*-----------------------BPy_Orientation3DF1D type definition ------------------------------*/
PyTypeObject Orientation3DF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "Orientation3DF1D", /* tp_name */
- sizeof(BPy_Orientation3DF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Orientation3DF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DVec3f_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Orientation3DF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "Orientation3DF1D",
+ /*tp_basicsize*/ sizeof(BPy_Orientation3DF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ Orientation3DF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DVec3f_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)Orientation3DF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp
index 704fdc14d5b..0e1817b7aaa 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp
@@ -59,43 +59,44 @@ static int Curvature2DAngleF1D___init__(BPy_Curvature2DAngleF1D *self,
/*-----------------------BPy_Curvature2DAngleF1D type definition ------------------------------*/
PyTypeObject Curvature2DAngleF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "Curvature2DAngleF1D", /* tp_name */
- sizeof(BPy_Curvature2DAngleF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Curvature2DAngleF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Curvature2DAngleF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "Curvature2DAngleF1D",
+ /*tp_basicsize*/ sizeof(BPy_Curvature2DAngleF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ Curvature2DAngleF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)Curvature2DAngleF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp
index cfc75a6a60c..34c222cae28 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp
@@ -72,43 +72,44 @@ static int DensityF1D___init__(BPy_DensityF1D *self, PyObject *args, PyObject *k
/*-----------------------BPy_DensityF1D type definition ------------------------------*/
PyTypeObject DensityF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "DensityF1D", /* tp_name */
- sizeof(BPy_DensityF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- DensityF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)DensityF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "DensityF1D",
+ /*tp_basicsize*/ sizeof(BPy_DensityF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ DensityF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)DensityF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp
index d5e6e51fb7f..42ab6926557 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp
@@ -76,43 +76,44 @@ static int GetCompleteViewMapDensityF1D___init__(BPy_GetCompleteViewMapDensityF1
/*-----------------------BPy_GetCompleteViewMapDensityF1D type definition -----------------------*/
PyTypeObject GetCompleteViewMapDensityF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetCompleteViewMapDensityF1D", /* tp_name */
- sizeof(BPy_GetCompleteViewMapDensityF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetCompleteViewMapDensityF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetCompleteViewMapDensityF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetCompleteViewMapDensityF1D",
+ /*tp_basicsize*/ sizeof(BPy_GetCompleteViewMapDensityF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetCompleteViewMapDensityF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetCompleteViewMapDensityF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp
index d1479f27935..dcd5d2189bf 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp
@@ -85,43 +85,44 @@ static int GetDirectionalViewMapDensityF1D___init__(BPy_GetDirectionalViewMapDen
/*-----------------------BPy_GetDirectionalViewMapDensityF1D type definition --------------------*/
PyTypeObject GetDirectionalViewMapDensityF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetDirectionalViewMapDensityF1D", /* tp_name */
- sizeof(BPy_GetDirectionalViewMapDensityF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetDirectionalViewMapDensityF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetDirectionalViewMapDensityF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetDirectionalViewMapDensityF1D",
+ /*tp_basicsize*/ sizeof(BPy_GetDirectionalViewMapDensityF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetDirectionalViewMapDensityF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetDirectionalViewMapDensityF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp
index 2a1749f69dc..4c3a95098af 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp
@@ -58,43 +58,44 @@ static int GetProjectedXF1D___init__(BPy_GetProjectedXF1D *self, PyObject *args,
/*-----------------------BPy_GetProjectedXF1D type definition ------------------------------*/
PyTypeObject GetProjectedXF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetProjectedXF1D", /* tp_name */
- sizeof(BPy_GetProjectedXF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetProjectedXF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetProjectedXF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetProjectedXF1D",
+ /*tp_basicsize*/ sizeof(BPy_GetProjectedXF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetProjectedXF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetProjectedXF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp
index 9960702ccdb..840d7c12920 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp
@@ -58,43 +58,44 @@ static int GetProjectedYF1D___init__(BPy_GetProjectedYF1D *self, PyObject *args,
/*-----------------------BPy_GetProjectedYF1D type definition ------------------------------*/
PyTypeObject GetProjectedYF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetProjectedYF1D", /* tp_name */
- sizeof(BPy_GetProjectedYF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetProjectedYF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetProjectedYF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetProjectedYF1D",
+ /*tp_basicsize*/ sizeof(BPy_GetProjectedYF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetProjectedYF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetProjectedYF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp
index d5b02bb7666..dd2d8577d37 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp
@@ -58,43 +58,44 @@ static int GetProjectedZF1D___init__(BPy_GetProjectedZF1D *self, PyObject *args,
/*-----------------------BPy_GetProjectedZF1D type definition ------------------------------*/
PyTypeObject GetProjectedZF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetProjectedZF1D", /* tp_name */
- sizeof(BPy_GetProjectedZF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetProjectedZF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetProjectedZF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetProjectedZF1D",
+ /*tp_basicsize*/ sizeof(BPy_GetProjectedZF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetProjectedZF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetProjectedZF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp
index 6a133751d8a..ad1a65f9f81 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp
@@ -73,43 +73,44 @@ static int GetSteerableViewMapDensityF1D___init__(BPy_GetSteerableViewMapDensity
/*-----------------------BPy_GetSteerableViewMapDensityF1D type definition ----------------------*/
PyTypeObject GetSteerableViewMapDensityF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetSteerableViewMapDensityF1D", /* tp_name */
- sizeof(BPy_GetSteerableViewMapDensityF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetSteerableViewMapDensityF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetSteerableViewMapDensityF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetSteerableViewMapDensityF1D",
+ /*tp_basicsize*/ sizeof(BPy_GetSteerableViewMapDensityF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetSteerableViewMapDensityF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetSteerableViewMapDensityF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp
index 0ce50a9d29c..90912e32747 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp
@@ -73,43 +73,44 @@ static int GetViewMapGradientNormF1D___init__(BPy_GetViewMapGradientNormF1D *sel
/*-----------------------BPy_GetViewMapGradientNormF1D type definition --------------------------*/
PyTypeObject GetViewMapGradientNormF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetViewMapGradientNormF1D", /* tp_name */
- sizeof(BPy_GetViewMapGradientNormF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetViewMapGradientNormF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetViewMapGradientNormF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetViewMapGradientNormF1D",
+ /*tp_basicsize*/ sizeof(BPy_GetViewMapGradientNormF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetViewMapGradientNormF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetViewMapGradientNormF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp
index b9213b7af82..d56d297e9dc 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp
@@ -58,43 +58,44 @@ static int GetXF1D___init__(BPy_GetXF1D *self, PyObject *args, PyObject *kwds)
/*-----------------------BPy_GetXF1D type definition ------------------------------*/
PyTypeObject GetXF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetXF1D", /* tp_name */
- sizeof(BPy_GetXF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetXF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetXF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetXF1D",
+ /*tp_basicsize*/ sizeof(BPy_GetXF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetXF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetXF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp
index 2e1a7139796..eeff432e50e 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp
@@ -57,43 +57,44 @@ static int GetYF1D___init__(BPy_GetYF1D *self, PyObject *args, PyObject *kwds)
/*-----------------------BPy_GetYF1D type definition ------------------------------*/
PyTypeObject GetYF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetYF1D", /* tp_name */
- sizeof(BPy_GetYF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetYF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetYF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetYF1D",
+ /*tp_basicsize*/ sizeof(BPy_GetYF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetYF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetYF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp
index a7d468f4afd..1a1e72e03ec 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp
@@ -58,43 +58,44 @@ static int GetZF1D___init__(BPy_GetZF1D *self, PyObject *args, PyObject *kwds)
/*-----------------------BPy_GetZF1D type definition ------------------------------*/
PyTypeObject GetZF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetZF1D", /* tp_name */
- sizeof(BPy_GetZF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetZF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetZF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetZF1D",
+ /*tp_basicsize*/ sizeof(BPy_GetZF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetZF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetZF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp
index 6ae5500b15f..df77dd26b38 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp
@@ -68,43 +68,44 @@ static int LocalAverageDepthF1D___init__(BPy_LocalAverageDepthF1D *self,
/*-----------------------BPy_LocalAverageDepthF1D type definition ------------------------------*/
PyTypeObject LocalAverageDepthF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "LocalAverageDepthF1D", /* tp_name */
- sizeof(BPy_LocalAverageDepthF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- LocalAverageDepthF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)LocalAverageDepthF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "LocalAverageDepthF1D",
+ /*tp_basicsize*/ sizeof(BPy_LocalAverageDepthF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ LocalAverageDepthF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)LocalAverageDepthF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp
index ed510c25aba..4da68e657b5 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp
@@ -62,43 +62,44 @@ static int ZDiscontinuityF1D___init__(BPy_ZDiscontinuityF1D *self, PyObject *arg
/*-----------------------BPy_ZDiscontinuityF1D type definition ------------------------------*/
PyTypeObject ZDiscontinuityF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ZDiscontinuityF1D", /* tp_name */
- sizeof(BPy_ZDiscontinuityF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ZDiscontinuityF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ZDiscontinuityF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ZDiscontinuityF1D",
+ /*tp_basicsize*/ sizeof(BPy_ZDiscontinuityF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ZDiscontinuityF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DDouble_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ZDiscontinuityF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp
index 7dc3daa2911..3318482b20d 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp
@@ -64,43 +64,44 @@ static int QuantitativeInvisibilityF1D___init__(BPy_QuantitativeInvisibilityF1D
/*-----------------------BPy_QuantitativeInvisibilityF1D type definition ------------------------*/
PyTypeObject QuantitativeInvisibilityF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "QuantitativeInvisibilityF1D", /* tp_name */
- sizeof(BPy_QuantitativeInvisibilityF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- QuantitativeInvisibilityF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DUnsigned_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)QuantitativeInvisibilityF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "QuantitativeInvisibilityF1D",
+ /*tp_basicsize*/ sizeof(BPy_QuantitativeInvisibilityF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ QuantitativeInvisibilityF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DUnsigned_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)QuantitativeInvisibilityF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp
index c765e521eb5..014a8decea1 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp
@@ -51,43 +51,44 @@ static int GetOccludeeF1D___init__(BPy_GetOccludeeF1D *self, PyObject *args, PyO
/*-----------------------BPy_GetOccludeeF1D type definition ------------------------------*/
PyTypeObject GetOccludeeF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetOccludeeF1D", /* tp_name */
- sizeof(BPy_GetOccludeeF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetOccludeeF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DVectorViewShape_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetOccludeeF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetOccludeeF1D",
+ /*tp_basicsize*/ sizeof(BPy_GetOccludeeF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetOccludeeF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DVectorViewShape_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetOccludeeF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp
index 02284d145f0..4423fd788fa 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp
@@ -51,43 +51,44 @@ static int GetOccludersF1D___init__(BPy_GetOccludersF1D *self, PyObject *args, P
/*-----------------------BPy_GetOccludersF1D type definition ------------------------------*/
PyTypeObject GetOccludersF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetOccludersF1D", /* tp_name */
- sizeof(BPy_GetOccludersF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetOccludersF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DVectorViewShape_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetOccludersF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetOccludersF1D",
+ /*tp_basicsize*/ sizeof(BPy_GetOccludersF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetOccludersF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DVectorViewShape_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetOccludersF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp
index 039b7631711..34dad93df0c 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp
@@ -51,43 +51,44 @@ static int GetShapeF1D___init__(BPy_GetShapeF1D *self, PyObject *args, PyObject
/*-----------------------BPy_GetShapeF1D type definition ------------------------------*/
PyTypeObject GetShapeF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "GetShapeF1D", /* tp_name */
- sizeof(BPy_GetShapeF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetShapeF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DVectorViewShape_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetShapeF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "GetShapeF1D",
+ /*tp_basicsize*/ sizeof(BPy_GetShapeF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ GetShapeF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DVectorViewShape_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)GetShapeF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp
index 0f752a56b43..529f604f989 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp
@@ -51,43 +51,44 @@ static int ChainingTimeStampF1D___init__(BPy_ChainingTimeStampF1D *self,
/*-----------------------BPy_ChainingTimeStampF1D type definition ------------------------------*/
PyTypeObject ChainingTimeStampF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ChainingTimeStampF1D", /* tp_name */
- sizeof(BPy_ChainingTimeStampF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ChainingTimeStampF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DVoid_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ChainingTimeStampF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ChainingTimeStampF1D",
+ /*tp_basicsize*/ sizeof(BPy_ChainingTimeStampF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ChainingTimeStampF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DVoid_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ChainingTimeStampF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp
index 5477e3e246b..99549b2c754 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp
@@ -51,43 +51,44 @@ static int IncrementChainingTimeStampF1D___init__(BPy_IncrementChainingTimeStamp
/*-----------------------BPy_IncrementChainingTimeStampF1D type definition ----------------------*/
PyTypeObject IncrementChainingTimeStampF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "IncrementChainingTimeStampF1D", /* tp_name */
- sizeof(BPy_IncrementChainingTimeStampF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- IncrementChainingTimeStampF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DVoid_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)IncrementChainingTimeStampF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "IncrementChainingTimeStampF1D",
+ /*tp_basicsize*/ sizeof(BPy_IncrementChainingTimeStampF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ IncrementChainingTimeStampF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DVoid_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)IncrementChainingTimeStampF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp
index 6f5253c4e83..d812d274bfe 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp
@@ -49,43 +49,44 @@ static int TimeStampF1D___init__(BPy_TimeStampF1D *self, PyObject *args, PyObjec
/*-----------------------BPy_TimeStampF1D type definition ------------------------------*/
PyTypeObject TimeStampF1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "TimeStampF1D", /* tp_name */
- sizeof(BPy_TimeStampF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- TimeStampF1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryFunction1DVoid_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)TimeStampF1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "TimeStampF1D",
+ /*tp_basicsize*/ sizeof(BPy_TimeStampF1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ TimeStampF1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryFunction1DVoid_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)TimeStampF1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp
index d86c7216d03..c55f570743b 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp
@@ -42,43 +42,44 @@ static int FalseUP0D___init__(BPy_FalseUP0D *self, PyObject *args, PyObject *kwd
/*-----------------------BPy_FalseUP0D type definition ------------------------------*/
PyTypeObject FalseUP0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "FalseUP0D", /* tp_name */
- sizeof(BPy_FalseUP0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- FalseUP0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryPredicate0D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)FalseUP0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "FalseUP0D",
+ /*tp_basicsize*/ sizeof(BPy_FalseUP0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ FalseUP0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryPredicate0D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)FalseUP0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp
index 76f8ae01769..0af4d7f35eb 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp
@@ -42,43 +42,43 @@ static int TrueUP0D___init__(BPy_TrueUP0D *self, PyObject *args, PyObject *kwds)
/*-----------------------BPy_TrueUP0D type definition ------------------------------*/
PyTypeObject TrueUP0D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "TrueUP0D", /* tp_name */
- sizeof(BPy_TrueUP0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- TrueUP0D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryPredicate0D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)TrueUP0D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ /*tp_name*/ PyVarObject_HEAD_INIT(nullptr, 0) "TrueUP0D",
+ /*tp_basicsize*/ sizeof(BPy_TrueUP0D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ TrueUP0D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryPredicate0D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)TrueUP0D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp
index 81b7f3990b1..ffea29804e7 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp
@@ -43,43 +43,44 @@ static int ContourUP1D___init__(BPy_ContourUP1D *self, PyObject *args, PyObject
/*-----------------------BPy_ContourUP1D type definition ------------------------------*/
PyTypeObject ContourUP1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ContourUP1D", /* tp_name */
- sizeof(BPy_ContourUP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ContourUP1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryPredicate1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ContourUP1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ContourUP1D",
+ /*tp_basicsize*/ sizeof(BPy_ContourUP1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ContourUP1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryPredicate1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ContourUP1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp
index e376acd2d84..c133c742c0c 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp
@@ -59,43 +59,44 @@ static int DensityLowerThanUP1D___init__(BPy_DensityLowerThanUP1D *self,
/*-----------------------BPy_DensityLowerThanUP1D type definition ------------------------------*/
PyTypeObject DensityLowerThanUP1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "DensityLowerThanUP1D", /* tp_name */
- sizeof(BPy_DensityLowerThanUP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- DensityLowerThanUP1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryPredicate1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)DensityLowerThanUP1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "DensityLowerThanUP1D",
+ /*tp_basicsize*/ sizeof(BPy_DensityLowerThanUP1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ DensityLowerThanUP1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryPredicate1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)DensityLowerThanUP1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp
index 99c688985f5..13a74bd2f41 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp
@@ -56,43 +56,44 @@ static int EqualToChainingTimeStampUP1D___init__(BPy_EqualToChainingTimeStampUP1
/*-----------------------BPy_EqualToChainingTimeStampUP1D type definition -----------------------*/
PyTypeObject EqualToChainingTimeStampUP1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "EqualToChainingTimeStampUP1D", /* tp_name */
- sizeof(BPy_EqualToChainingTimeStampUP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- EqualToChainingTimeStampUP1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryPredicate1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)EqualToChainingTimeStampUP1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "EqualToChainingTimeStampUP1D",
+ /*tp_basicsize*/ sizeof(BPy_EqualToChainingTimeStampUP1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ EqualToChainingTimeStampUP1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryPredicate1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)EqualToChainingTimeStampUP1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp
index 48365507d1a..ac4cd389fd4 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp
@@ -55,43 +55,44 @@ static int EqualToTimeStampUP1D___init__(BPy_EqualToTimeStampUP1D *self,
/*-----------------------BPy_EqualToTimeStampUP1D type definition ------------------------------*/
PyTypeObject EqualToTimeStampUP1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "EqualToTimeStampUP1D", /* tp_name */
- sizeof(BPy_EqualToTimeStampUP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- EqualToTimeStampUP1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryPredicate1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)EqualToTimeStampUP1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "EqualToTimeStampUP1D",
+ /*tp_basicsize*/ sizeof(BPy_EqualToTimeStampUP1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ EqualToTimeStampUP1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryPredicate1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)EqualToTimeStampUP1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp
index ab8153e6fea..7c1b8685771 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp
@@ -47,43 +47,44 @@ static int ExternalContourUP1D___init__(BPy_ExternalContourUP1D *self,
/*-----------------------BPy_ExternalContourUP1D type definition ------------------------------*/
PyTypeObject ExternalContourUP1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ExternalContourUP1D", /* tp_name */
- sizeof(BPy_ExternalContourUP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ExternalContourUP1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryPredicate1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ExternalContourUP1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ExternalContourUP1D",
+ /*tp_basicsize*/ sizeof(BPy_ExternalContourUP1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ExternalContourUP1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryPredicate1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ExternalContourUP1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp
index 4d1730040d7..506c724023c 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp
@@ -42,43 +42,44 @@ static int FalseUP1D___init__(BPy_FalseUP1D *self, PyObject *args, PyObject *kwd
/*-----------------------BPy_FalseUP1D type definition ------------------------------*/
PyTypeObject FalseUP1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "FalseUP1D", /* tp_name */
- sizeof(BPy_FalseUP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- FalseUP1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryPredicate1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)FalseUP1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "FalseUP1D",
+ /*tp_basicsize*/ sizeof(BPy_FalseUP1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ FalseUP1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryPredicate1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)FalseUP1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp
index e17c7705420..c834aa81445 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp
@@ -58,43 +58,44 @@ static int QuantitativeInvisibilityUP1D___init__(BPy_QuantitativeInvisibilityUP1
/*-----------------------BPy_QuantitativeInvisibilityUP1D type definition -----------------------*/
PyTypeObject QuantitativeInvisibilityUP1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "QuantitativeInvisibilityUP1D", /* tp_name */
- sizeof(BPy_QuantitativeInvisibilityUP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- QuantitativeInvisibilityUP1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryPredicate1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)QuantitativeInvisibilityUP1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "QuantitativeInvisibilityUP1D",
+ /*tp_basicsize*/ sizeof(BPy_QuantitativeInvisibilityUP1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ QuantitativeInvisibilityUP1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryPredicate1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)QuantitativeInvisibilityUP1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp
index b410ee14831..f7307a81540 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp
@@ -56,43 +56,44 @@ static int ShapeUP1D___init__(BPy_ShapeUP1D *self, PyObject *args, PyObject *kwd
/*-----------------------BPy_ShapeUP1D type definition ------------------------------*/
PyTypeObject ShapeUP1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "ShapeUP1D", /* tp_name */
- sizeof(BPy_ShapeUP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ShapeUP1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryPredicate1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ShapeUP1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "ShapeUP1D",
+ /*tp_basicsize*/ sizeof(BPy_ShapeUP1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ ShapeUP1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryPredicate1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)ShapeUP1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp
index 03c7f364b55..704bb5e9608 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp
@@ -42,43 +42,44 @@ static int TrueUP1D___init__(BPy_TrueUP1D *self, PyObject *args, PyObject *kwds)
/*-----------------------BPy_TrueUP1D type definition ------------------------------*/
PyTypeObject TrueUP1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "TrueUP1D", /* tp_name */
- sizeof(BPy_TrueUP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- TrueUP1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryPredicate1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)TrueUP1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "TrueUP1D",
+ /*tp_basicsize*/ sizeof(BPy_TrueUP1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ TrueUP1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryPredicate1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)TrueUP1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp
index eea3a1cacc4..da1e07162d1 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp
@@ -55,43 +55,44 @@ static int WithinImageBoundaryUP1D___init__(BPy_WithinImageBoundaryUP1D *self,
/*-----------------------BPy_TrueUP1D type definition ------------------------------*/
PyTypeObject WithinImageBoundaryUP1D_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "WithinImageBoundaryUP1D", /* tp_name */
- sizeof(BPy_WithinImageBoundaryUP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- WithinImageBoundaryUP1D___doc__, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- nullptr, /* tp_getset */
- &UnaryPredicate1D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)WithinImageBoundaryUP1D___init__, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0)
+ /*tp_name*/ "WithinImageBoundaryUP1D",
+ /*tp_basicsize*/ sizeof(BPy_WithinImageBoundaryUP1D),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ WithinImageBoundaryUP1D___doc__,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ nullptr,
+ /*tp_base*/ &UnaryPredicate1D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)WithinImageBoundaryUP1D___init__,
+ /*tp_alloc*/ nullptr,
+ /*tp_new*/ nullptr,
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/geometry/intern/realize_instances.cc b/source/blender/geometry/intern/realize_instances.cc
index c649bde06ca..2d9c23df348 100644
--- a/source/blender/geometry/intern/realize_instances.cc
+++ b/source/blender/geometry/intern/realize_instances.cc
@@ -433,7 +433,7 @@ static void foreach_geometry_in_reference(
int index = 0;
FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN (&collection, object) {
const GeometrySet object_geometry_set = object_get_evaluated_geometry_set(*object);
- const float4x4 matrix = base_transform * offset_matrix * object->obmat;
+ const float4x4 matrix = base_transform * offset_matrix * object->object_to_world;
const int sub_id = noise::hash(id, index);
fn(object_geometry_set, matrix, sub_id);
index++;
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilarray.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilarray.c
index 8bb61136cc2..e51fe8832f0 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilarray.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilarray.c
@@ -104,9 +104,9 @@ static void BKE_gpencil_instance_modifier_instance_tfm(Object *ob,
if (mmd->flag & GP_ARRAY_USE_OFFSET) {
add_v3_v3(mat_offset[3], mmd->offset);
}
- invert_m4_m4(obinv, ob->obmat);
+ invert_m4_m4(obinv, ob->object_to_world);
- mul_m4_series(r_offset, mat_offset, obinv, mmd->object->obmat);
+ mul_m4_series(r_offset, mat_offset, obinv, mmd->object->object_to_world);
copy_m4_m4(mat_offset, r_offset);
/* clear r_mat locations to avoid double transform */
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c
index 3c971ec6af0..49ac3275c82 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c
@@ -303,8 +303,8 @@ static void build_sequential(Object *ob,
/* Compute distance to control object if set, and build according to that order. */
if (mmd->object) {
float sv1[3], sv2[3];
- mul_v3_m4v3(sv1, ob->obmat, &gps->points[0].x);
- mul_v3_m4v3(sv2, ob->obmat, &gps->points[gps->totpoints - 1].x);
+ mul_v3_m4v3(sv1, ob->object_to_world, &gps->points[0].x);
+ mul_v3_m4v3(sv2, ob->object_to_world, &gps->points[gps->totpoints - 1].x);
float dist_l = len_v3v3(sv1, mmd->object->loc);
float dist_r = len_v3v3(sv2, mmd->object->loc);
if (dist_r < dist_l) {
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
index 1a2bfebdc55..e3b4e1c5e02 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
@@ -234,14 +234,14 @@ static void deformStroke(GpencilModifierData *md,
/* get world-space matrix of target, corrected for the space the verts are in */
if (mmd->subtarget[0] && pchan) {
/* bone target if there's a matching pose-channel */
- mul_m4_m4m4(dmat, mmd->object->obmat, pchan->pose_mat);
+ mul_m4_m4m4(dmat, mmd->object->object_to_world, pchan->pose_mat);
}
else {
/* just object target */
- copy_m4_m4(dmat, mmd->object->obmat);
+ copy_m4_m4(dmat, mmd->object->object_to_world);
}
- invert_m4_m4(ob->imat, ob->obmat);
- mul_m4_series(tData.mat, ob->imat, dmat, mmd->parentinv);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
+ mul_m4_series(tData.mat, ob->world_to_object, dmat, mmd->parentinv);
/* loop points and apply deform */
for (int i = 0; i < gps->totpoints; i++) {
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c
index 326e86091c5..bc91094e80e 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c
@@ -81,8 +81,8 @@ static void update_mirror_object(Object *ob,
float tmp[4][4];
float itmp[4][4];
- invert_m4_m4(tmp, mmd->object->obmat);
- mul_m4_m4m4(tmp, tmp, ob->obmat);
+ invert_m4_m4(tmp, mmd->object->object_to_world);
+ mul_m4_m4m4(tmp, tmp, ob->object_to_world);
invert_m4_m4(itmp, tmp);
mul_m4_series(mtx, itmp, mtx, tmp);
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilmultiply.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilmultiply.c
index 1cf11a694ac..cb4a7893080 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilmultiply.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilmultiply.c
@@ -109,7 +109,7 @@ static void duplicateStroke(Object *ob,
float opacity_factor;
/* Apply object scale to offset distance. */
- offset *= mat4_to_scale(ob->obmat);
+ offset *= mat4_to_scale(ob->object_to_world);
BKE_gpencil_stroke_normal(gps, stroke_normal);
if (len_v3(stroke_normal) < FLT_EPSILON) {
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciloutline.c b/source/blender/gpencil_modifiers/intern/MOD_gpenciloutline.c
index 387e3c2d5ce..455d8b0b528 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpenciloutline.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciloutline.c
@@ -116,7 +116,7 @@ static void convert_stroke(GpencilModifierData *md,
/* Apply layer thickness change. */
gps_duplicate->thickness += gpl->line_change;
/* Apply object scale to thickness. */
- gps_duplicate->thickness *= mat4_to_scale(ob->obmat);
+ gps_duplicate->thickness *= mat4_to_scale(ob->object_to_world);
CLAMP_MIN(gps_duplicate->thickness, 1.0f);
/* Stroke. */
@@ -197,7 +197,7 @@ static void generateStrokes(GpencilModifierData *md, Depsgraph *depsgraph, Objec
}
Object *cam_ob = scene->camera;
float viewmat[4][4];
- invert_m4_m4(viewmat, cam_ob->obmat);
+ invert_m4_m4(viewmat, cam_ob->object_to_world);
LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) {
bGPDframe *gpf = BKE_gpencil_frame_retime_get(depsgraph, scene, ob, gpl);
@@ -240,7 +240,7 @@ static void bakeModifier(Main *UNUSED(bmain),
BKE_scene_graph_update_for_newframe(depsgraph);
/* Ensure the camera is the right one. */
BKE_scene_camera_switch_update(scene);
- invert_m4_m4(viewmat, cam_ob->obmat);
+ invert_m4_m4(viewmat, cam_ob->object_to_world);
/* Prepare transform matrix. */
float diff_mat[4][4];
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c b/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
index 94d8cb98290..8331188fbd8 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
@@ -144,7 +144,7 @@ static void deformStroke(GpencilModifierData *md,
float coba_res[4];
float matrix[4][4];
if (is_gradient) {
- mul_m4_m4m4(matrix, mmd->object->imat, ob->obmat);
+ mul_m4_m4m4(matrix, mmd->object->world_to_object, ob->object_to_world);
}
/* loop points and apply color. */
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilweight_angle.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilweight_angle.c
index 3ecff4bf447..e9761732614 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilweight_angle.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilweight_angle.c
@@ -97,7 +97,7 @@ static void deformStroke(GpencilModifierData *md,
/* Apply the rotation of the object. */
if (mmd->space == GP_SPACE_LOCAL) {
- mul_mat3_m4_v3(ob->obmat, vec_ref);
+ mul_mat3_m4_v3(ob->object_to_world, vec_ref);
}
/* Ensure there is a vertex group. */
@@ -122,8 +122,8 @@ static void deformStroke(GpencilModifierData *md,
bGPDspoint *pt1 = (i > 0) ? &gps->points[i] : &gps->points[i + 1];
bGPDspoint *pt2 = (i > 0) ? &gps->points[i - 1] : &gps->points[i];
float fpt1[3], fpt2[3];
- mul_v3_m4v3(fpt1, ob->obmat, &pt1->x);
- mul_v3_m4v3(fpt2, ob->obmat, &pt2->x);
+ mul_v3_m4v3(fpt1, ob->object_to_world, &pt1->x);
+ mul_v3_m4v3(fpt2, ob->object_to_world, &pt2->x);
float vec[3];
sub_v3_v3v3(vec, fpt1, fpt2);
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilweight_proximity.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilweight_proximity.c
index f64c83443d8..ddf852bcd11 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilweight_proximity.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilweight_proximity.c
@@ -64,8 +64,8 @@ static float calc_point_weight_by_distance(Object *ob,
{
float weight;
float gvert[3];
- mul_v3_m4v3(gvert, ob->obmat, &pt->x);
- float dist = len_v3v3(mmd->object->obmat[3], gvert);
+ mul_v3_m4v3(gvert, ob->object_to_world, &pt->x);
+ float dist = len_v3v3(mmd->object->object_to_world[3], gvert);
if (dist > dist_max) {
weight = 1.0f;
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index c1e71bde254..4b5c40c0e38 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -2633,7 +2633,7 @@ void lineart_main_load_geometries(Depsgraph *depsgraph,
scene,
eval_ob,
eval_ob,
- eval_ob->obmat,
+ eval_ob->object_to_world,
is_render,
olti,
thread_count,
@@ -3589,11 +3589,11 @@ static LineartData *lineart_create_render_buffer(Scene *scene,
clipping_offset = 0.0001;
}
- copy_v3db_v3fl(ld->conf.camera_pos, camera->obmat[3]);
+ copy_v3db_v3fl(ld->conf.camera_pos, camera->object_to_world[3]);
if (active_camera) {
- copy_v3db_v3fl(ld->conf.active_camera_pos, active_camera->obmat[3]);
+ copy_v3db_v3fl(ld->conf.active_camera_pos, active_camera->object_to_world[3]);
}
- copy_m4_m4(ld->conf.cam_obmat, camera->obmat);
+ copy_m4_m4(ld->conf.cam_obmat, camera->object_to_world);
ld->conf.cam_is_persp = (c->type == CAM_PERSP);
ld->conf.near_clip = c->clip_start + clipping_offset;
@@ -3620,8 +3620,8 @@ static LineartData *lineart_create_render_buffer(Scene *scene,
if (lmd->light_contour_object) {
Object *light_obj = lmd->light_contour_object;
- copy_v3db_v3fl(ld->conf.camera_pos_secondary, light_obj->obmat[3]);
- copy_m4_m4(ld->conf.cam_obmat_secondary, light_obj->obmat);
+ copy_v3db_v3fl(ld->conf.camera_pos_secondary, light_obj->object_to_world[3]);
+ copy_m4_m4(ld->conf.cam_obmat_secondary, light_obj->object_to_world);
ld->conf.light_reference_available = true;
if (light_obj->type == OB_LAMP) {
ld->conf.cam_is_persp_secondary = ((Light *)light_obj->data)->type != LA_SUN;
@@ -5418,7 +5418,7 @@ void MOD_lineart_gpencil_generate(LineartCache *cache,
}
float gp_obmat_inverse[4][4];
- invert_m4_m4(gp_obmat_inverse, ob->obmat);
+ invert_m4_m4(gp_obmat_inverse, ob->object_to_world);
lineart_gpencil_generate(cache,
depsgraph,
ob,
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c
index 80517979f30..6f44cc68a19 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c
@@ -154,7 +154,7 @@ static bool bake_strokes(Object *ob,
typedef struct LineartBakeJob {
wmWindowManager *wm;
void *owner;
- short *stop, *do_update;
+ bool *stop, *do_update;
float *progress;
/* C or ob must have one != NULL. */
@@ -218,8 +218,8 @@ static void lineart_gpencil_guard_modifiers(LineartBakeJob *bj)
}
static void lineart_gpencil_bake_startjob(void *customdata,
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress)
{
LineartBakeJob *bj = (LineartBakeJob *)customdata;
@@ -337,7 +337,7 @@ static int lineart_gpencil_bake_common(bContext *C,
}
float pseduo_progress;
- short pseduo_do_update;
+ bool pseduo_do_update;
lineart_gpencil_bake_startjob(bj, NULL, &pseduo_do_update, &pseduo_progress);
BLI_linklist_free(bj->objects, NULL);
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_shadow.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_shadow.c
index e34e6fc43ea..edea052e728 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_shadow.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_shadow.c
@@ -1167,7 +1167,7 @@ bool lineart_main_try_generate_shadow(Depsgraph *depsgraph,
copy_v3_v3_db(ld->conf.camera_pos_secondary, ld->conf.camera_pos);
copy_m4_m4(ld->conf.cam_obmat_secondary, ld->conf.cam_obmat);
- copy_m4_m4(ld->conf.cam_obmat, lmd->light_contour_object->obmat);
+ copy_m4_m4(ld->conf.cam_obmat, lmd->light_contour_object->object_to_world);
copy_v3db_v3fl(ld->conf.camera_pos, ld->conf.cam_obmat[3]);
ld->conf.cam_is_persp_secondary = ld->conf.cam_is_persp;
ld->conf.cam_is_persp = is_persp;
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index bfbbf1be225..8da17720339 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -27,6 +27,7 @@ set(INC
../editors/include
# For *_info.hh includes.
+ ../compositor/realtime_compositor
../draw/engines/eevee_next
../draw/intern
@@ -366,64 +367,6 @@ set(GLSL_SRC
shaders/common/gpu_shader_common_math_utils.glsl
shaders/common/gpu_shader_common_mix_rgb.glsl
- shaders/compositor/compositor_alpha_crop.glsl
- shaders/compositor/compositor_bilateral_blur.glsl
- shaders/compositor/compositor_blur.glsl
- shaders/compositor/compositor_blur_variable_size.glsl
- shaders/compositor/compositor_bokeh_image.glsl
- shaders/compositor/compositor_box_mask.glsl
- shaders/compositor/compositor_convert.glsl
- shaders/compositor/compositor_despeckle.glsl
- shaders/compositor/compositor_directional_blur.glsl
- shaders/compositor/compositor_edge_filter.glsl
- shaders/compositor/compositor_ellipse_mask.glsl
- shaders/compositor/compositor_filter.glsl
- shaders/compositor/compositor_flip.glsl
- shaders/compositor/compositor_image_crop.glsl
- shaders/compositor/compositor_morphological_distance.glsl
- shaders/compositor/compositor_morphological_distance_feather.glsl
- shaders/compositor/compositor_morphological_distance_threshold.glsl
- shaders/compositor/compositor_morphological_step.glsl
- shaders/compositor/compositor_normalize.glsl
- shaders/compositor/compositor_parallel_reduction.glsl
- shaders/compositor/compositor_projector_lens_distortion.glsl
- shaders/compositor/compositor_realize_on_domain.glsl
- shaders/compositor/compositor_screen_lens_distortion.glsl
- shaders/compositor/compositor_set_alpha.glsl
- shaders/compositor/compositor_split_viewer.glsl
- shaders/compositor/compositor_symmetric_blur.glsl
- shaders/compositor/compositor_symmetric_separable_blur.glsl
- shaders/compositor/compositor_tone_map_photoreceptor.glsl
- shaders/compositor/compositor_tone_map_simple.glsl
-
- shaders/compositor/library/gpu_shader_compositor_alpha_over.glsl
- shaders/compositor/library/gpu_shader_compositor_blur_common.glsl
- shaders/compositor/library/gpu_shader_compositor_bright_contrast.glsl
- shaders/compositor/library/gpu_shader_compositor_channel_matte.glsl
- shaders/compositor/library/gpu_shader_compositor_chroma_matte.glsl
- shaders/compositor/library/gpu_shader_compositor_color_balance.glsl
- shaders/compositor/library/gpu_shader_compositor_color_correction.glsl
- shaders/compositor/library/gpu_shader_compositor_color_matte.glsl
- shaders/compositor/library/gpu_shader_compositor_color_spill.glsl
- shaders/compositor/library/gpu_shader_compositor_color_to_luminance.glsl
- shaders/compositor/library/gpu_shader_compositor_difference_matte.glsl
- shaders/compositor/library/gpu_shader_compositor_distance_matte.glsl
- shaders/compositor/library/gpu_shader_compositor_exposure.glsl
- shaders/compositor/library/gpu_shader_compositor_gamma.glsl
- shaders/compositor/library/gpu_shader_compositor_hue_correct.glsl
- shaders/compositor/library/gpu_shader_compositor_hue_saturation_value.glsl
- shaders/compositor/library/gpu_shader_compositor_invert.glsl
- shaders/compositor/library/gpu_shader_compositor_luminance_matte.glsl
- shaders/compositor/library/gpu_shader_compositor_main.glsl
- shaders/compositor/library/gpu_shader_compositor_map_value.glsl
- shaders/compositor/library/gpu_shader_compositor_normal.glsl
- shaders/compositor/library/gpu_shader_compositor_posterize.glsl
- shaders/compositor/library/gpu_shader_compositor_separate_combine.glsl
- shaders/compositor/library/gpu_shader_compositor_set_alpha.glsl
- shaders/compositor/library/gpu_shader_compositor_store_output.glsl
- shaders/compositor/library/gpu_shader_compositor_texture_utilities.glsl
- shaders/compositor/library/gpu_shader_compositor_type_conversion.glsl
-
shaders/material/gpu_shader_material_add_shader.glsl
shaders/material/gpu_shader_material_ambient_occlusion.glsl
shaders/material/gpu_shader_material_anisotropic.glsl
@@ -651,36 +594,6 @@ set(SRC_SHADER_CREATE_INFOS
shaders/infos/gpu_shader_simple_lighting_info.hh
shaders/infos/gpu_shader_text_info.hh
shaders/infos/gpu_srgb_to_framebuffer_space_info.hh
-
- shaders/compositor/infos/compositor_alpha_crop_info.hh
- shaders/compositor/infos/compositor_bilateral_blur_info.hh
- shaders/compositor/infos/compositor_blur_info.hh
- shaders/compositor/infos/compositor_blur_variable_size_info.hh
- shaders/compositor/infos/compositor_bokeh_image_info.hh
- shaders/compositor/infos/compositor_box_mask_info.hh
- shaders/compositor/infos/compositor_convert_info.hh
- shaders/compositor/infos/compositor_despeckle_info.hh
- shaders/compositor/infos/compositor_directional_blur_info.hh
- shaders/compositor/infos/compositor_edge_filter_info.hh
- shaders/compositor/infos/compositor_ellipse_mask_info.hh
- shaders/compositor/infos/compositor_filter_info.hh
- shaders/compositor/infos/compositor_flip_info.hh
- shaders/compositor/infos/compositor_image_crop_info.hh
- shaders/compositor/infos/compositor_morphological_distance_feather_info.hh
- shaders/compositor/infos/compositor_morphological_distance_info.hh
- shaders/compositor/infos/compositor_morphological_distance_threshold_info.hh
- shaders/compositor/infos/compositor_morphological_step_info.hh
- shaders/compositor/infos/compositor_normalize_info.hh
- shaders/compositor/infos/compositor_parallel_reduction_info.hh
- shaders/compositor/infos/compositor_projector_lens_distortion_info.hh
- shaders/compositor/infos/compositor_realize_on_domain_info.hh
- shaders/compositor/infos/compositor_screen_lens_distortion_info.hh
- shaders/compositor/infos/compositor_set_alpha_info.hh
- shaders/compositor/infos/compositor_split_viewer_info.hh
- shaders/compositor/infos/compositor_symmetric_blur_info.hh
- shaders/compositor/infos/compositor_symmetric_separable_blur_info.hh
- shaders/compositor/infos/compositor_tone_map_photoreceptor_info.hh
- shaders/compositor/infos/compositor_tone_map_simple_info.hh
)
set(SRC_SHADER_CREATE_INFOS_MTL
@@ -715,6 +628,7 @@ endif()
blender_add_lib(bf_gpu "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
target_link_libraries(bf_gpu PUBLIC
+ bf_compositor_shaders
bf_draw_shaders
bf_gpu_shaders
)
diff --git a/source/blender/gpu/intern/gpu_shader_create_info.cc b/source/blender/gpu/intern/gpu_shader_create_info.cc
index ff7aa65f03f..ebbddccbe47 100644
--- a/source/blender/gpu/intern/gpu_shader_create_info.cc
+++ b/source/blender/gpu/intern/gpu_shader_create_info.cc
@@ -284,6 +284,7 @@ void gpu_shader_create_info_init()
_info
/* Declare, register and construct the infos. */
+#include "compositor_shader_create_info_list.hh"
#include "gpu_shader_create_info_list.hh"
/* Baked shader data appended to create infos. */
diff --git a/source/blender/gpu/intern/gpu_shader_dependency.cc b/source/blender/gpu/intern/gpu_shader_dependency.cc
index be53ee5d945..7d5b8c891b9 100644
--- a/source/blender/gpu/intern/gpu_shader_dependency.cc
+++ b/source/blender/gpu/intern/gpu_shader_dependency.cc
@@ -24,6 +24,7 @@
extern "C" {
#define SHADER_SOURCE(datatoc, filename, filepath) extern char datatoc[];
+#include "glsl_compositor_source_list.h"
#include "glsl_draw_source_list.h"
#include "glsl_gpu_source_list.h"
#ifdef WITH_OCIO
@@ -845,6 +846,7 @@ void gpu_shader_dependency_init()
#define SHADER_SOURCE(datatoc, filename, filepath) \
g_sources->add_new(filename, new GPUSource(filepath, filename, datatoc, g_functions));
+#include "glsl_compositor_source_list.h"
#include "glsl_draw_source_list.h"
#include "glsl_gpu_source_list.h"
#ifdef WITH_OCIO
diff --git a/source/blender/gpu/vulkan/vk_framebuffer.cc b/source/blender/gpu/vulkan/vk_framebuffer.cc
index 01a5f7c0f81..48b0685bf38 100644
--- a/source/blender/gpu/vulkan/vk_framebuffer.cc
+++ b/source/blender/gpu/vulkan/vk_framebuffer.cc
@@ -25,7 +25,7 @@ void VKFrameBuffer::clear(eGPUFrameBufferBits /*buffers*/,
{
}
-void VKFrameBuffer::clear_multi(const float (* /*clear_col*/)[4])
+void VKFrameBuffer::clear_multi(const float (*/*clear_col*/)[4])
{
}
diff --git a/source/blender/gpu/vulkan/vk_query.hh b/source/blender/gpu/vulkan/vk_query.hh
index 7f8f81e2b95..36558ef9549 100644
--- a/source/blender/gpu/vulkan/vk_query.hh
+++ b/source/blender/gpu/vulkan/vk_query.hh
@@ -15,8 +15,8 @@ class VKQueryPool : public QueryPool {
public:
void init(GPUQueryType type) override;
void begin_query() override;
- void end_query() override;
- void get_occlusion_result(MutableSpan<uint32_t> r_values) override;
+ void end_query() override;
+ void get_occlusion_result(MutableSpan<uint32_t> r_values) override;
};
} // namespace blender::gpu \ No newline at end of file
diff --git a/source/blender/gpu/vulkan/vk_shader.hh b/source/blender/gpu/vulkan/vk_shader.hh
index 1c09ef407ad..9ab0aca67eb 100644
--- a/source/blender/gpu/vulkan/vk_shader.hh
+++ b/source/blender/gpu/vulkan/vk_shader.hh
@@ -17,21 +17,22 @@ class VKShader : public Shader {
{
}
- void vertex_shader_from_glsl(MutableSpan<const char *> sources)override;
- void geometry_shader_from_glsl(MutableSpan<const char *> sources)override;
- void fragment_shader_from_glsl(MutableSpan<const char *> sources)override;
- void compute_shader_from_glsl(MutableSpan<const char *> sources)override;
- bool finalize(const shader::ShaderCreateInfo *info = nullptr)override;
-
- void transform_feedback_names_set(Span<const char *> name_list, eGPUShaderTFBType geom_type)override;
- bool transform_feedback_enable(GPUVertBuf *)override;
- void transform_feedback_disable()override;
-
- void bind()override;
- void unbind()override;
-
- void uniform_float(int location, int comp_len, int array_size, const float *data)override;
- void uniform_int(int location, int comp_len, int array_size, const int *data)override;
+ void vertex_shader_from_glsl(MutableSpan<const char *> sources) override;
+ void geometry_shader_from_glsl(MutableSpan<const char *> sources) override;
+ void fragment_shader_from_glsl(MutableSpan<const char *> sources) override;
+ void compute_shader_from_glsl(MutableSpan<const char *> sources) override;
+ bool finalize(const shader::ShaderCreateInfo *info = nullptr) override;
+
+ void transform_feedback_names_set(Span<const char *> name_list,
+ eGPUShaderTFBType geom_type) override;
+ bool transform_feedback_enable(GPUVertBuf *) override;
+ void transform_feedback_disable() override;
+
+ void bind() override;
+ void unbind() override;
+
+ void uniform_float(int location, int comp_len, int array_size, const float *data) override;
+ void uniform_int(int location, int comp_len, int array_size, const int *data) override;
std::string resources_declare(const shader::ShaderCreateInfo &info) const override;
std::string vertex_interface_declare(const shader::ShaderCreateInfo &info) const override;
diff --git a/source/blender/ikplugin/intern/iksolver_plugin.c b/source/blender/ikplugin/intern/iksolver_plugin.c
index 6d99fde9df6..c467e48d21e 100644
--- a/source/blender/ikplugin/intern/iksolver_plugin.c
+++ b/source/blender/ikplugin/intern/iksolver_plugin.c
@@ -406,7 +406,7 @@ static void execute_posetree(struct Depsgraph *depsgraph,
}
copy_v3_v3(rootmat[3], pchan->pose_head);
- mul_m4_m4m4(imat, ob->obmat, rootmat);
+ mul_m4_m4m4(imat, ob->object_to_world, rootmat);
invert_m4_m4(goalinv, imat);
for (target = tree->targets.first; target; target = target->next) {
@@ -465,7 +465,7 @@ static void execute_posetree(struct Depsgraph *depsgraph,
/* end effector in world space */
copy_m4_m4(end_pose, pchan->pose_mat);
copy_v3_v3(end_pose[3], pchan->pose_tail);
- mul_m4_series(world_pose, goalinv, ob->obmat, end_pose);
+ mul_m4_series(world_pose, goalinv, ob->object_to_world, end_pose);
/* blend position */
goalpos[0] = fac * goalpos[0] + mfac * world_pose[3][0];
diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp
index 9317f14b7f1..2878bbb6da7 100644
--- a/source/blender/ikplugin/intern/itasc_plugin.cpp
+++ b/source/blender/ikplugin/intern/itasc_plugin.cpp
@@ -586,10 +586,10 @@ static bool target_callback(const iTaSC::Timestamp &timestamp,
float chanmat[4][4];
copy_m4_m4(chanmat, pchan->pose_mat);
copy_v3_v3(chanmat[3], pchan->pose_tail);
- mul_m4_series(restmat, target->owner->obmat, chanmat, target->eeRest);
+ mul_m4_series(restmat, target->owner->object_to_world, chanmat, target->eeRest);
}
else {
- mul_m4_m4m4(restmat, target->owner->obmat, target->eeRest);
+ mul_m4_m4m4(restmat, target->owner->object_to_world, target->eeRest);
}
/* blend the target */
blend_m4_m4m4(tarmat, restmat, tarmat, constraint->enforce);
@@ -620,10 +620,10 @@ static bool base_callback(const iTaSC::Timestamp &timestamp,
ikscene->baseFrame.setValue(&chanmat[0][0]);
/* iTaSC armature is scaled to object scale, scale the base frame too */
ikscene->baseFrame.p *= ikscene->blScale;
- mul_m4_m4m4(rootmat, ikscene->blArmature->obmat, chanmat);
+ mul_m4_m4m4(rootmat, ikscene->blArmature->object_to_world, chanmat);
}
else {
- copy_m4_m4(rootmat, ikscene->blArmature->obmat);
+ copy_m4_m4(rootmat, ikscene->blArmature->object_to_world);
ikscene->baseFrame = iTaSC::F_identity;
}
next.setValue(&rootmat[0][0]);
@@ -1065,7 +1065,7 @@ static void convert_pose(IK_Scene *ikscene)
int a, joint;
/* assume uniform scaling and take Y scale as general scale for the armature */
- scale = len_v3(ikscene->blArmature->obmat[1]);
+ scale = len_v3(ikscene->blArmature->object_to_world[1]);
rot = ikscene->jointArray(0);
for (joint = a = 0, ikchan = ikscene->channels;
a < ikscene->numchan && joint < ikscene->numjoint;
@@ -1105,7 +1105,7 @@ static void BKE_pose_rest(IK_Scene *ikscene)
int a, joint;
/* assume uniform scaling and take Y scale as general scale for the armature */
- scale = len_v3(ikscene->blArmature->obmat[1]);
+ scale = len_v3(ikscene->blArmature->object_to_world[1]);
/* rest pose is 0 */
SetToZero(ikscene->jointArray);
/* except for transY joints */
@@ -1183,7 +1183,7 @@ static IK_Scene *convert_tree(
}
ikscene->blArmature = ob;
/* assume uniform scaling and take Y scale as general scale for the armature */
- ikscene->blScale = len_v3(ob->obmat[1]);
+ ikscene->blScale = len_v3(ob->object_to_world[1]);
ikscene->blInvScale = (ikscene->blScale < KDL::epsilon) ? 0.0f : 1.0f / ikscene->blScale;
std::string joint;
@@ -1667,7 +1667,7 @@ static void create_scene(struct Depsgraph *depsgraph, Scene *scene, Object *ob,
static int init_scene(Object *ob)
{
/* check also if scaling has changed */
- float scale = len_v3(ob->obmat[1]);
+ float scale = len_v3(ob->object_to_world[1]);
IK_Scene *scene;
if (ob->pose->ikdata) {
diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h
index 5c76dfe52df..a05bc51fcea 100644
--- a/source/blender/imbuf/IMB_imbuf.h
+++ b/source/blender/imbuf/IMB_imbuf.h
@@ -358,14 +358,14 @@ struct IndexBuildContext *IMB_anim_index_rebuild_context(struct anim *anim,
* Will rebuild all used indices and proxies at once.
*/
void IMB_anim_index_rebuild(struct IndexBuildContext *context,
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress);
/**
* Finish rebuilding proxies/time-codes and free temporary contexts used.
*/
-void IMB_anim_index_rebuild_finish(struct IndexBuildContext *context, short stop);
+void IMB_anim_index_rebuild_finish(struct IndexBuildContext *context, bool stop);
/**
* Return the length (in frames) of the given \a anim.
diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
index 63836690ee4..d824b87f493 100644
--- a/source/blender/imbuf/intern/indexer.c
+++ b/source/blender/imbuf/intern/indexer.c
@@ -931,7 +931,7 @@ static IndexBuildContext *index_ffmpeg_create_context(struct anim *anim,
return (IndexBuildContext *)context;
}
-static void index_rebuild_ffmpeg_finish(FFmpegIndexBuilderContext *context, int stop)
+static void index_rebuild_ffmpeg_finish(FFmpegIndexBuilderContext *context, const bool stop)
{
int i;
@@ -1012,8 +1012,8 @@ static void index_rebuild_ffmpeg_proc_decoded_frame(FFmpegIndexBuilderContext *c
}
static int index_rebuild_ffmpeg(FFmpegIndexBuilderContext *context,
- const short *stop,
- short *do_update,
+ const bool *stop,
+ bool *do_update,
float *progress)
{
AVFrame *in_frame = av_frame_alloc();
@@ -1303,7 +1303,7 @@ static IndexBuildContext *index_fallback_create_context(struct anim *anim,
return (IndexBuildContext *)context;
}
-static void index_rebuild_fallback_finish(FallbackIndexBuilderContext *context, int stop)
+static void index_rebuild_fallback_finish(FallbackIndexBuilderContext *context, const bool stop)
{
struct anim *anim = context->anim;
char filepath[FILE_MAX];
@@ -1330,8 +1330,8 @@ static void index_rebuild_fallback_finish(FallbackIndexBuilderContext *context,
}
static void index_rebuild_fallback(FallbackIndexBuilderContext *context,
- const short *stop,
- short *do_update,
+ const bool *stop,
+ bool *do_update,
float *progress)
{
int count = IMB_anim_get_duration(context->anim, IMB_TC_NONE);
@@ -1470,9 +1470,9 @@ IndexBuildContext *IMB_anim_index_rebuild_context(struct anim *anim,
void IMB_anim_index_rebuild(struct IndexBuildContext *context,
/* NOLINTNEXTLINE: readability-non-const-parameter. */
- short *stop,
+ bool *stop,
/* NOLINTNEXTLINE: readability-non-const-parameter. */
- short *do_update,
+ bool *do_update,
/* NOLINTNEXTLINE: readability-non-const-parameter. */
float *progress)
{
@@ -1494,7 +1494,7 @@ void IMB_anim_index_rebuild(struct IndexBuildContext *context,
UNUSED_VARS(stop, do_update, progress);
}
-void IMB_anim_index_rebuild_finish(IndexBuildContext *context, short stop)
+void IMB_anim_index_rebuild_finish(IndexBuildContext *context, const bool stop)
{
switch (context->anim_type) {
#ifdef WITH_FFMPEG
diff --git a/source/blender/io/alembic/exporter/abc_export_capi.cc b/source/blender/io/alembic/exporter/abc_export_capi.cc
index 546bc9d49cc..1ac4eacc997 100644
--- a/source/blender/io/alembic/exporter/abc_export_capi.cc
+++ b/source/blender/io/alembic/exporter/abc_export_capi.cc
@@ -72,8 +72,8 @@ static void report_job_duration(const ExportJobData *data)
static void export_startjob(void *customdata,
/* Cannot be const, this function implements wm_jobs_start_callback.
* NOLINTNEXTLINE: readability-non-const-parameter. */
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress)
{
ExportJobData *data = static_cast<ExportJobData *>(customdata);
@@ -230,7 +230,7 @@ bool ABC_export(Scene *scene,
}
else {
/* Fake a job context, so that we don't need NULL pointer checks while exporting. */
- short stop = 0, do_update = 0;
+ bool stop = false, do_update = false;
float progress = 0.0f;
blender::io::alembic::export_startjob(job, &stop, &do_update, &progress);
diff --git a/source/blender/io/alembic/exporter/abc_writer_hair.cc b/source/blender/io/alembic/exporter/abc_writer_hair.cc
index f872943ad5c..13136372c56 100644
--- a/source/blender/io/alembic/exporter/abc_writer_hair.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_hair.cc
@@ -118,7 +118,7 @@ void ABCHairWriter::write_hair_sample(const HierarchyContext &context,
{
/* Get untransformed vertices, there's a xform under the hair. */
float inv_mat[4][4];
- invert_m4_m4_safe(inv_mat, context.object->obmat);
+ invert_m4_m4_safe(inv_mat, context.object->object_to_world);
MTFace *mtface = (MTFace *)CustomData_get_layer(&mesh->fdata, CD_MTFACE);
MFace *mface = (MFace *)CustomData_get_layer(&mesh->fdata, CD_MFACE);
@@ -241,7 +241,7 @@ void ABCHairWriter::write_hair_child_sample(const HierarchyContext &context,
{
/* Get untransformed vertices, there's a xform under the hair. */
float inv_mat[4][4];
- invert_m4_m4_safe(inv_mat, context.object->obmat);
+ invert_m4_m4_safe(inv_mat, context.object->object_to_world);
MFace *mface = (MFace *)CustomData_get_layer(&mesh->fdata, CD_MFACE);
MTFace *mtface = (MTFace *)CustomData_get_layer(&mesh->fdata, CD_MTFACE);
diff --git a/source/blender/io/alembic/exporter/abc_writer_points.cc b/source/blender/io/alembic/exporter/abc_writer_points.cc
index 29370978b54..6ec6f736818 100644
--- a/source/blender/io/alembic/exporter/abc_writer_points.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_points.cc
@@ -101,7 +101,7 @@ void ABCPointsWriter::do_write(HierarchyContext &context)
}
/* location */
- mul_v3_m4v3(pos, context.object->imat, state.co);
+ mul_v3_m4v3(pos, context.object->world_to_object, state.co);
/* velocity */
sub_v3_v3v3(vel, state.co, psys->particles[p].prev_state.co);
diff --git a/source/blender/io/alembic/intern/abc_axis_conversion.cc b/source/blender/io/alembic/intern/abc_axis_conversion.cc
index 00e5890e9d3..c7d2a3e1bf4 100644
--- a/source/blender/io/alembic/intern/abc_axis_conversion.cc
+++ b/source/blender/io/alembic/intern/abc_axis_conversion.cc
@@ -134,15 +134,15 @@ void create_transform_matrix(Object *obj,
if (mode == ABC_MATRIX_LOCAL && obj->parent) {
/* Note that this produces another matrix than the local matrix, due to
* constraints and modifiers as well as the obj->parentinv matrix. */
- invert_m4_m4(obj->parent->imat, obj->parent->obmat);
- mul_m4_m4m4(zup_mat, obj->parent->imat, obj->obmat);
+ invert_m4_m4(obj->parent->world_to_object, obj->parent->object_to_world);
+ mul_m4_m4m4(zup_mat, obj->parent->world_to_object, obj->object_to_world);
}
else {
- copy_m4_m4(zup_mat, obj->obmat);
+ copy_m4_m4(zup_mat, obj->object_to_world);
}
if (proxy_from) {
- mul_m4_m4m4(zup_mat, proxy_from->obmat, zup_mat);
+ mul_m4_m4m4(zup_mat, proxy_from->object_to_world, zup_mat);
}
copy_m44_axis_swap(r_yup_mat, zup_mat, ABC_YUP_FROM_ZUP);
diff --git a/source/blender/io/alembic/intern/abc_reader_object.cc b/source/blender/io/alembic/intern/abc_reader_object.cc
index af26565f8d6..f3a07eaad3f 100644
--- a/source/blender/io/alembic/intern/abc_reader_object.cc
+++ b/source/blender/io/alembic/intern/abc_reader_object.cc
@@ -165,7 +165,7 @@ void AbcObjectReader::setupObjectTransform(const chrono_t time)
/* Apply the matrix to the object. */
BKE_object_apply_mat4(m_object, transform_from_alembic, true, false);
- BKE_object_to_mat4(m_object, m_object->obmat);
+ BKE_object_to_mat4(m_object, m_object->object_to_world);
if (!is_constant || m_settings->always_add_cache_reader) {
bConstraint *con = BKE_constraint_add_for_object(
diff --git a/source/blender/io/alembic/intern/alembic_capi.cc b/source/blender/io/alembic/intern/alembic_capi.cc
index b92ce5b4cfb..f6c11f6a684 100644
--- a/source/blender/io/alembic/intern/alembic_capi.cc
+++ b/source/blender/io/alembic/intern/alembic_capi.cc
@@ -427,8 +427,8 @@ struct ImportJobData {
ArchiveReader *archive;
std::vector<AbcObjectReader *> readers;
- short *stop;
- short *do_update;
+ bool *stop;
+ bool *do_update;
float *progress;
char error_code;
@@ -446,7 +446,7 @@ static void report_job_duration(const ImportJobData *data)
std::cout << '\n';
}
-static void import_startjob(void *user_data, short *stop, short *do_update, float *progress)
+static void import_startjob(void *user_data, bool *stop, bool *do_update, float *progress)
{
SCOPE_TIMER("Alembic import, objects reading and creation");
@@ -715,7 +715,7 @@ bool ABC_import(bContext *C,
}
else {
/* Fake a job context, so that we don't need NULL pointer checks while importing. */
- short stop = 0, do_update = 0;
+ bool stop = false, do_update = false;
float progress = 0.0f;
import_startjob(job, &stop, &do_update, &progress);
diff --git a/source/blender/io/collada/AnimationImporter.cpp b/source/blender/io/collada/AnimationImporter.cpp
index 2d872377bbf..826d7864067 100644
--- a/source/blender/io/collada/AnimationImporter.cpp
+++ b/source/blender/io/collada/AnimationImporter.cpp
@@ -332,8 +332,8 @@ void AnimationImporter::read_node_transform(COLLADAFW::Node *node, Object *ob)
float mat[4][4];
TransformReader::get_node_mat(mat, node, &uid_animated_map, ob);
if (ob) {
- copy_m4_m4(ob->obmat, mat);
- BKE_object_apply_mat4(ob, ob->obmat, false, false);
+ copy_m4_m4(ob->object_to_world, mat);
+ BKE_object_apply_mat4(ob, ob->object_to_world, false, false);
}
}
@@ -2097,7 +2097,7 @@ Object *AnimationImporter::get_joint_object(COLLADAFW::Node *root,
if (par_job) {
float temp[4][4], ipar[4][4];
- invert_m4_m4(ipar, par_job->obmat);
+ invert_m4_m4(ipar, par_job->object_to_world);
copy_m4_m4(temp, mat);
mul_m4_m4m4(mat, ipar, temp);
}
diff --git a/source/blender/io/collada/ArmatureImporter.cpp b/source/blender/io/collada/ArmatureImporter.cpp
index 1310337f501..7de08f89b7d 100644
--- a/source/blender/io/collada/ArmatureImporter.cpp
+++ b/source/blender/io/collada/ArmatureImporter.cpp
@@ -114,7 +114,7 @@ int ArmatureImporter::create_bone(SkinInfo *skin,
Object *ob_arm = skin->BKE_armature_from_object();
if (ob_arm) {
float invmat[4][4];
- invert_m4_m4(invmat, ob_arm->obmat);
+ invert_m4_m4(invmat, ob_arm->object_to_world);
mul_m4_m4m4(mat, invmat, mat);
}
@@ -708,7 +708,7 @@ void ArmatureImporter::set_pose(Object *ob_arm,
copy_m4_m4(mat, obmat);
float invObmat[4][4];
- invert_m4_m4(invObmat, ob_arm->obmat);
+ invert_m4_m4(invObmat, ob_arm->object_to_world);
mul_m4_m4m4(pchan->pose_mat, invObmat, mat);
}
diff --git a/source/blender/io/collada/ControllerExporter.cpp b/source/blender/io/collada/ControllerExporter.cpp
index 6bf8d904a41..62bcdc5bf4c 100644
--- a/source/blender/io/collada/ControllerExporter.cpp
+++ b/source/blender/io/collada/ControllerExporter.cpp
@@ -406,7 +406,7 @@ void ControllerExporter::add_bind_shape_mat(Object *ob)
bc_add_global_transform(f_obmat, export_settings.get_global_transform());
}
- // UnitConverter::mat4_to_dae_double(bind_mat, ob->obmat);
+ // UnitConverter::mat4_to_dae_double(bind_mat, ob->object_to_world);
UnitConverter::mat4_to_dae_double(bind_mat, f_obmat);
if (this->export_settings.get_limit_precision()) {
BCMatrix::sanitize(bind_mat, LIMITTED_PRECISION);
@@ -523,7 +523,7 @@ std::string ControllerExporter::add_inv_bind_mats_source(Object *ob_arm,
}
/* make world-space matrix (bind_mat is armature-space) */
- mul_m4_m4m4(world, ob_arm->obmat, bind_mat);
+ mul_m4_m4m4(world, ob_arm->object_to_world, bind_mat);
if (!has_bindmat) {
if (export_settings.get_apply_global_orientation()) {
diff --git a/source/blender/io/collada/DocumentImporter.cpp b/source/blender/io/collada/DocumentImporter.cpp
index 5e432682564..dae1c4ba894 100644
--- a/source/blender/io/collada/DocumentImporter.cpp
+++ b/source/blender/io/collada/DocumentImporter.cpp
@@ -412,8 +412,8 @@ Object *DocumentImporter::create_instance_node(Object *source_ob,
}
}
/* calc new matrix and apply */
- mul_m4_m4m4(obn->obmat, obn->obmat, mat);
- BKE_object_apply_mat4(obn, obn->obmat, false, false);
+ mul_m4_m4m4(obn->object_to_world, obn->object_to_world, mat);
+ BKE_object_apply_mat4(obn, obn->object_to_world, false, false);
}
}
else {
diff --git a/source/blender/io/collada/MeshImporter.cpp b/source/blender/io/collada/MeshImporter.cpp
index 6d7593afb8b..1a28adf50a5 100644
--- a/source/blender/io/collada/MeshImporter.cpp
+++ b/source/blender/io/collada/MeshImporter.cpp
@@ -564,7 +564,7 @@ void MeshImporter::mesh_add_edges(Mesh *mesh, int len)
/* set default flags */
medge = &edges[mesh->totedge];
for (int i = 0; i < len; i++, medge++) {
- medge->flag = ME_EDGEDRAW | ME_EDGERENDER;
+ medge->flag = ME_EDGEDRAW;
}
mesh->totedge = totedge;
diff --git a/source/blender/io/collada/SkinInfo.cpp b/source/blender/io/collada/SkinInfo.cpp
index 0654bae3730..b4615635318 100644
--- a/source/blender/io/collada/SkinInfo.cpp
+++ b/source/blender/io/collada/SkinInfo.cpp
@@ -214,12 +214,12 @@ void SkinInfo::link_armature(bContext *C,
ob->partype = PAROBJECT;
BKE_object_workob_calc_parent(scene, ob, &workob);
- invert_m4_m4(ob->parentinv, workob.obmat);
+ invert_m4_m4(ob->parentinv, workob.object_to_world);
DEG_id_tag_update(&obn->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
#endif
- copy_m4_m4(ob->obmat, bind_shape_matrix);
- BKE_object_apply_mat4(ob, ob->obmat, false, false);
+ copy_m4_m4(ob->object_to_world, bind_shape_matrix);
+ BKE_object_apply_mat4(ob, ob->object_to_world, false, false);
amd->deformflag = ARM_DEF_VGROUP;
diff --git a/source/blender/io/collada/collada_utils.cpp b/source/blender/io/collada/collada_utils.cpp
index 22a73cd7db2..96ff78a715a 100644
--- a/source/blender/io/collada/collada_utils.cpp
+++ b/source/blender/io/collada/collada_utils.cpp
@@ -129,7 +129,7 @@ bool bc_set_parent(Object *ob, Object *par, bContext *C, bool is_parent_space)
const bool keep_transform = false;
if (par && is_parent_space) {
- mul_m4_m4m4(ob->obmat, par->obmat, ob->obmat);
+ mul_m4_m4m4(ob->object_to_world, par->object_to_world, ob->object_to_world);
}
bool ok = ED_object_parent_set(
@@ -348,10 +348,10 @@ std::string bc_replace_string(std::string data,
void bc_match_scale(Object *ob, UnitConverter &bc_unit, bool scale_to_scene)
{
if (scale_to_scene) {
- mul_m4_m4m4(ob->obmat, bc_unit.get_scale(), ob->obmat);
+ mul_m4_m4m4(ob->object_to_world, bc_unit.get_scale(), ob->object_to_world);
}
- mul_m4_m4m4(ob->obmat, bc_unit.get_rotation(), ob->obmat);
- BKE_object_apply_mat4(ob, ob->obmat, false, false);
+ mul_m4_m4m4(ob->object_to_world, bc_unit.get_rotation(), ob->object_to_world);
+ BKE_object_apply_mat4(ob, ob->object_to_world, false, false);
}
void bc_match_scale(std::vector<Object *> *objects_done,
diff --git a/source/blender/io/common/intern/abstract_hierarchy_iterator.cc b/source/blender/io/common/intern/abstract_hierarchy_iterator.cc
index 03c1ba94d94..d559b0efe82 100644
--- a/source/blender/io/common/intern/abstract_hierarchy_iterator.cc
+++ b/source/blender/io/common/intern/abstract_hierarchy_iterator.cc
@@ -416,7 +416,7 @@ void AbstractHierarchyIterator::visit_object(Object *object,
context->original_export_path = "";
context->higher_up_export_path = "";
- copy_m4_m4(context->matrix_world, object->obmat);
+ copy_m4_m4(context->matrix_world, object->object_to_world);
ExportGraph::key_type graph_index = determine_graph_index_object(context);
context_update_for_graph_index(context, graph_index);
diff --git a/source/blender/io/gpencil/intern/gpencil_io_base.cc b/source/blender/io/gpencil/intern/gpencil_io_base.cc
index b9d7b6719b1..6cc977bfced 100644
--- a/source/blender/io/gpencil/intern/gpencil_io_base.cc
+++ b/source/blender/io/gpencil/intern/gpencil_io_base.cc
@@ -79,7 +79,7 @@ void GpencilIO::prepare_camera_params(Scene *scene, const GpencilIOParams *ipara
BKE_camera_params_compute_matrix(&params);
float viewmat[4][4];
- invert_m4_m4(viewmat, cam_ob->obmat);
+ invert_m4_m4(viewmat, cam_ob->object_to_world);
mul_m4_m4m4(persmat_, params.winmat, viewmat);
}
@@ -152,7 +152,7 @@ void GpencilIO::create_object_list()
/* Save z-depth from view to sort from back to front. */
if (is_camera_) {
- float camera_z = dot_v3v3(camera_z_axis, object->obmat[3]);
+ float camera_z = dot_v3v3(camera_z_axis, object->object_to_world[3]);
ObjectZ obz = {camera_z, object};
ob_list_.append(obz);
}
@@ -160,10 +160,10 @@ void GpencilIO::create_object_list()
float zdepth = 0;
if (rv3d_) {
if (rv3d_->is_persp) {
- zdepth = ED_view3d_calc_zfac(rv3d_, object->obmat[3]);
+ zdepth = ED_view3d_calc_zfac(rv3d_, object->object_to_world[3]);
}
else {
- zdepth = -dot_v3v3(rv3d_->viewinv[2], object->obmat[3]);
+ zdepth = -dot_v3v3(rv3d_->viewinv[2], object->object_to_world[3]);
}
ObjectZ obz = {zdepth * -1.0f, object};
ob_list_.append(obz);
diff --git a/source/blender/io/gpencil/intern/gpencil_io_export_pdf.cc b/source/blender/io/gpencil/intern/gpencil_io_export_pdf.cc
index ddd72f816b0..c042ca597c8 100644
--- a/source/blender/io/gpencil/intern/gpencil_io_export_pdf.cc
+++ b/source/blender/io/gpencil/intern/gpencil_io_export_pdf.cc
@@ -177,7 +177,7 @@ void GpencilExporterPDF::export_gpencil_layers()
/* Apply layer thickness change. */
gps_duplicate->thickness += gpl->line_change;
/* Apply object scale to thickness. */
- gps_duplicate->thickness *= mat4_to_scale(ob->obmat);
+ gps_duplicate->thickness *= mat4_to_scale(ob->object_to_world);
CLAMP_MIN(gps_duplicate->thickness, 1.0f);
/* Fill. */
if ((is_fill) && (params_.flag & GP_EXPORT_FILL)) {
diff --git a/source/blender/io/gpencil/intern/gpencil_io_export_svg.cc b/source/blender/io/gpencil/intern/gpencil_io_export_svg.cc
index 58f12e9b8b1..8acb87f8e58 100644
--- a/source/blender/io/gpencil/intern/gpencil_io_export_svg.cc
+++ b/source/blender/io/gpencil/intern/gpencil_io_export_svg.cc
@@ -197,7 +197,7 @@ void GpencilExporterSVG::export_gpencil_layers()
/* Apply layer thickness change. */
gps_duplicate->thickness += gpl->line_change;
/* Apply object scale to thickness. */
- gps_duplicate->thickness *= mat4_to_scale(ob->obmat);
+ gps_duplicate->thickness *= mat4_to_scale(ob->object_to_world);
CLAMP_MIN(gps_duplicate->thickness, 1.0f);
const bool is_normalized = ((params_.flag & GP_EXPORT_NORM_THICKNESS) != 0) ||
diff --git a/source/blender/io/usd/CMakeLists.txt b/source/blender/io/usd/CMakeLists.txt
index 4f1bc29cd0d..06a0f12c571 100644
--- a/source/blender/io/usd/CMakeLists.txt
+++ b/source/blender/io/usd/CMakeLists.txt
@@ -143,7 +143,8 @@ if(WIN32)
set_property(TARGET bf_usd APPEND_STRING PROPERTY INTERFACE_LINK_OPTIONS "$<$<CONFIG:MinSizeRel>:/WHOLEARCHIVE:${USD_RELEASE_LIB}>")
endif()
-# Source: https://github.com/PixarAnimationStudios/USD/blob/master/BUILDING.md#linking-whole-archives
+# Source:
+# https://github.com/PixarAnimationStudios/USD/blob/master/BUILDING.md#linking-whole-archives
if(WIN32)
target_link_libraries(bf_usd INTERFACE ${USD_LIBRARIES})
elseif(APPLE)
@@ -174,6 +175,6 @@ if(WITH_GTESTS)
blender_add_test_lib(bf_io_usd_tests "${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${LIB};${TEST_LIB}")
endif()
-# In cmake version 3.21 and up, we can instead use the NO_CACHE option for
-# find_file so we don't need to clear it from the cache here.
+# In CMAKE version 3.21 and up, we can instead use the `NO_CACHE` option for
+# `find_file` so we don't need to clear it from the cache here.
unset(USD_IMAGING_HEADERS CACHE)
diff --git a/source/blender/io/usd/intern/usd_capi_export.cc b/source/blender/io/usd/intern/usd_capi_export.cc
index 3977daaca4a..bf25c03fb7a 100644
--- a/source/blender/io/usd/intern/usd_capi_export.cc
+++ b/source/blender/io/usd/intern/usd_capi_export.cc
@@ -57,8 +57,8 @@ static void report_job_duration(const ExportJobData *data)
static void export_startjob(void *customdata,
/* Cannot be const, this function implements wm_jobs_start_callback.
* NOLINTNEXTLINE: readability-non-const-parameter. */
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress)
{
ExportJobData *data = static_cast<ExportJobData *>(customdata);
@@ -205,7 +205,7 @@ bool USD_export(bContext *C,
}
else {
/* Fake a job context, so that we don't need NULL pointer checks while exporting. */
- short stop = 0, do_update = 0;
+ bool stop = false, do_update = false;
float progress = 0.0f;
blender::io::usd::export_startjob(job, &stop, &do_update, &progress);
diff --git a/source/blender/io/usd/intern/usd_capi_import.cc b/source/blender/io/usd/intern/usd_capi_import.cc
index b8cc43beeb9..680e9c758d3 100644
--- a/source/blender/io/usd/intern/usd_capi_import.cc
+++ b/source/blender/io/usd/intern/usd_capi_import.cc
@@ -126,8 +126,8 @@ struct ImportJobData {
USDStageReader *archive;
- short *stop;
- short *do_update;
+ bool *stop;
+ bool *do_update;
float *progress;
char error_code;
@@ -144,7 +144,7 @@ static void report_job_duration(const ImportJobData *data)
std::cout << '\n';
}
-static void import_startjob(void *customdata, short *stop, short *do_update, float *progress)
+static void import_startjob(void *customdata, bool *stop, bool *do_update, float *progress)
{
ImportJobData *data = static_cast<ImportJobData *>(customdata);
@@ -430,7 +430,7 @@ bool USD_import(struct bContext *C,
}
else {
/* Fake a job context, so that we don't need NULL pointer checks while importing. */
- short stop = 0, do_update = 0;
+ bool stop = false, do_update = false;
float progress = 0.0f;
import_startjob(job, &stop, &do_update, &progress);
diff --git a/source/blender/io/usd/intern/usd_reader_mesh.cc b/source/blender/io/usd/intern/usd_reader_mesh.cc
index 01db6baeb5c..8138f38fcad 100644
--- a/source/blender/io/usd/intern/usd_reader_mesh.cc
+++ b/source/blender/io/usd/intern/usd_reader_mesh.cc
@@ -33,6 +33,7 @@
#include <pxr/base/vt/value.h>
#include <pxr/usd/sdf/types.h>
#include <pxr/usd/usdGeom/mesh.h>
+#include <pxr/usd/usdGeom/primvarsAPI.h>
#include <pxr/usd/usdGeom/subset.h>
#include <pxr/usd/usdShade/materialBindingAPI.h>
@@ -287,11 +288,13 @@ bool USDMeshReader::topology_changed(const Mesh *existing_mesh, const double mot
mesh_prim_.GetFaceVertexCountsAttr().Get(&face_counts_, motionSampleTime);
mesh_prim_.GetPointsAttr().Get(&positions_, motionSampleTime);
+ pxr::UsdGeomPrimvarsAPI primvarsAPI(mesh_prim_);
+
/* TODO(makowalski): Reading normals probably doesn't belong in this function,
* as this is not required to determine if the topology has changed. */
/* If 'normals' and 'primvars:normals' are both specified, the latter has precedence. */
- pxr::UsdGeomPrimvar primvar = mesh_prim_.GetPrimvar(usdtokens::normalsPrimvar);
+ pxr::UsdGeomPrimvar primvar = primvarsAPI.GetPrimvar(usdtokens::normalsPrimvar);
if (primvar.HasValue()) {
primvar.ComputeFlattened(&normals_, motionSampleTime);
normal_interpolation_ = primvar.GetInterpolation();
@@ -355,6 +358,8 @@ void USDMeshReader::read_uvs(Mesh *mesh, const double motionSampleTime, const bo
std::vector<UVSample> uv_primvars(ldata->totlayer);
+ pxr::UsdGeomPrimvarsAPI primvarsAPI(mesh_prim_);
+
if (has_uvs_) {
for (int layer_idx = 0; layer_idx < ldata->totlayer; layer_idx++) {
const CustomDataLayer *layer = &ldata->layers[layer_idx];
@@ -385,11 +390,11 @@ void USDMeshReader::read_uvs(Mesh *mesh, const double motionSampleTime, const bo
}
/* Early out if mesh doesn't have primvar. */
- if (!mesh_prim_.HasPrimvar(uv_token)) {
+ if (!primvarsAPI.HasPrimvar(uv_token)) {
continue;
}
- if (pxr::UsdGeomPrimvar uv_primvar = mesh_prim_.GetPrimvar(uv_token)) {
+ if (pxr::UsdGeomPrimvar uv_primvar = primvarsAPI.GetPrimvar(uv_token)) {
uv_primvar.ComputeFlattened(&uv_primvars[layer_idx].uvs, motionSampleTime);
uv_primvars[layer_idx].interpolation = uv_primvar.GetInterpolation();
}
@@ -835,12 +840,14 @@ Mesh *USDMeshReader::read_mesh(Mesh *existing_mesh,
is_left_handed_ = true;
}
+ pxr::UsdGeomPrimvarsAPI primvarsAPI(mesh_prim_);
+
std::vector<pxr::TfToken> uv_tokens;
/* Currently we only handle UV primvars. */
if (read_flag & MOD_MESHSEQ_READ_UV) {
- std::vector<pxr::UsdGeomPrimvar> primvars = mesh_prim_.GetPrimvars();
+ std::vector<pxr::UsdGeomPrimvar> primvars = primvarsAPI.GetPrimvars();
for (pxr::UsdGeomPrimvar p : primvars) {
diff --git a/source/blender/io/usd/intern/usd_writer_mesh.cc b/source/blender/io/usd/intern/usd_writer_mesh.cc
index e949bafe517..e7d79e888e4 100644
--- a/source/blender/io/usd/intern/usd_writer_mesh.cc
+++ b/source/blender/io/usd/intern/usd_writer_mesh.cc
@@ -4,6 +4,7 @@
#include "usd_hierarchy_iterator.h"
#include <pxr/usd/usdGeom/mesh.h>
+#include <pxr/usd/usdGeom/primvarsAPI.h>
#include <pxr/usd/usdShade/material.h>
#include <pxr/usd/usdShade/materialBindingAPI.h>
@@ -107,6 +108,8 @@ void USDGenericMeshWriter::write_uv_maps(const Mesh *mesh, pxr::UsdGeomMesh usd_
{
pxr::UsdTimeCode timecode = get_export_time_code();
+ pxr::UsdGeomPrimvarsAPI primvarsAPI(usd_mesh.GetPrim());
+
const CustomData *ldata = &mesh->ldata;
for (int layer_idx = 0; layer_idx < ldata->totlayer; layer_idx++) {
const CustomDataLayer *layer = &ldata->layers[layer_idx];
@@ -119,7 +122,7 @@ void USDGenericMeshWriter::write_uv_maps(const Mesh *mesh, pxr::UsdGeomMesh usd_
* for texture coordinates by naming the UV Map as such, without having to guess which UV Map
* is the "standard" one. */
pxr::TfToken primvar_name(pxr::TfMakeValidIdentifier(layer->name));
- pxr::UsdGeomPrimvar uv_coords_primvar = usd_mesh.CreatePrimvar(
+ pxr::UsdGeomPrimvar uv_coords_primvar = primvarsAPI.CreatePrimvar(
primvar_name, pxr::SdfValueTypeNames->TexCoord2fArray, pxr::UsdGeomTokens->faceVarying);
MLoopUV *mloopuv = static_cast<MLoopUV *>(layer->data);
diff --git a/source/blender/io/usd/tests/usd_imaging_test.cc b/source/blender/io/usd/tests/usd_imaging_test.cc
index 5cd3c042e59..80c232ad099 100644
--- a/source/blender/io/usd/tests/usd_imaging_test.cc
+++ b/source/blender/io/usd/tests/usd_imaging_test.cc
@@ -42,8 +42,8 @@ TEST_F(USDImagingTest, CapsuleAdapterTest)
}
pxr::UsdImagingCapsuleAdapter capsule_adapter;
- pxr::VtValue points_value = pxr::UsdImagingCapsuleAdapter::GetMeshPoints(
- capsule.GetPrim(), pxr::UsdTimeCode::Default());
+ pxr::VtValue points_value = capsule_adapter.GetPoints(capsule.GetPrim(),
+ pxr::UsdTimeCode::Default());
if (!points_value.IsHolding<pxr::VtArray<pxr::GfVec3f>>()) {
FAIL() << "Mesh points value holding unexpected type.";
return;
@@ -52,7 +52,8 @@ TEST_F(USDImagingTest, CapsuleAdapterTest)
pxr::VtArray<pxr::GfVec3f> points = points_value.Get<pxr::VtArray<pxr::GfVec3f>>();
EXPECT_FALSE(points.empty());
- pxr::VtValue topology_value = pxr::UsdImagingCapsuleAdapter::GetMeshTopology();
+ pxr::VtValue topology_value = capsule_adapter.GetTopology(
+ capsule.GetPrim(), pxr::SdfPath(), pxr::UsdTimeCode::Default());
if (!topology_value.IsHolding<pxr::HdMeshTopology>()) {
FAIL() << "Mesh topology value holding unexpected type.";
diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc b/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc
index 5c81cf7abca..5289a8c750a 100644
--- a/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc
+++ b/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc
@@ -7,8 +7,9 @@
#include <algorithm>
#include <cstdio>
+#include "BKE_attribute.hh"
#include "BKE_blender_version.h"
-#include "BKE_geometry_set.hh"
+#include "BKE_mesh.h"
#include "BLI_color.hh"
#include "BLI_enumerable_thread_specific.hh"
@@ -416,15 +417,12 @@ void OBJWriter::write_edges_indices(FormatHandler &fh,
const OBJMesh &obj_mesh_data) const
{
/* NOTE: ensure_mesh_edges should be called before. */
- const int tot_edges = obj_mesh_data.tot_edges();
- for (int edge_index = 0; edge_index < tot_edges; edge_index++) {
- const std::optional<std::array<int, 2>> vertex_indices =
- obj_mesh_data.calc_loose_edge_vert_indices(edge_index);
- if (!vertex_indices) {
- continue;
+ const Span<MEdge> edges = obj_mesh_data.get_mesh()->edges();
+ for (const int i : edges.index_range()) {
+ const MEdge &edge = edges[i];
+ if (edge.flag & ME_LOOSEEDGE) {
+ fh.write_obj_edge(edge.v1 + offsets.vertex_offset + 1, edge.v2 + offsets.vertex_offset + 1);
}
- fh.write_obj_edge((*vertex_indices)[0] + offsets.vertex_offset + 1,
- (*vertex_indices)[1] + offsets.vertex_offset + 1);
}
}
diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc
index d00c09b9013..a95f917869b 100644
--- a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc
+++ b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc
@@ -124,10 +124,11 @@ void OBJMesh::set_world_axes_transform(const eIOAxis forward, const eIOAxis up)
unit_m3(axes_transform);
/* +Y-forward and +Z-up are the default Blender axis settings. */
mat3_from_axis_conversion(forward, up, IO_AXIS_Y, IO_AXIS_Z, axes_transform);
- mul_m4_m3m4(world_and_axes_transform_, axes_transform, export_object_eval_.obmat);
+ mul_m4_m3m4(world_and_axes_transform_, axes_transform, export_object_eval_.object_to_world);
/* mul_m4_m3m4 does not transform last row of obmat, i.e. location data. */
- mul_v3_m3v3(world_and_axes_transform_[3], axes_transform, export_object_eval_.obmat[3]);
- world_and_axes_transform_[3][3] = export_object_eval_.obmat[3][3];
+ mul_v3_m3v3(
+ world_and_axes_transform_[3], axes_transform, export_object_eval_.object_to_world[3]);
+ world_and_axes_transform_[3][3] = export_object_eval_.object_to_world[3][3];
/* Normals need inverse transpose of the regular matrix to handle non-uniform scale. */
float normal_matrix[3][3];
@@ -182,7 +183,6 @@ void OBJMesh::ensure_mesh_normals() const
void OBJMesh::ensure_mesh_edges() const
{
- BKE_mesh_calc_edges(export_mesh_eval_, true, false);
BKE_mesh_calc_edges_loose(export_mesh_eval_);
}
@@ -506,13 +506,4 @@ const char *OBJMesh::get_poly_deform_group_name(const int16_t def_group_index) c
return vertex_group.name;
}
-std::optional<std::array<int, 2>> OBJMesh::calc_loose_edge_vert_indices(const int edge_index) const
-{
- const Span<MEdge> edges = export_mesh_eval_->edges();
- const MEdge &edge = edges[edge_index];
- if (edge.flag & ME_LOOSEEDGE) {
- return std::array<int, 2>{int(edge.v1), int(edge.v2)};
- }
- return std::nullopt;
-}
} // namespace blender::io::obj
diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh
index ec98468e2de..89ee6f4dea2 100644
--- a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh
+++ b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh
@@ -216,11 +216,6 @@ class OBJMesh : NonCopyable {
const char *get_poly_deform_group_name(int16_t def_group_index) const;
/**
- * Calculate vertex indices of an edge's corners if it is a loose edge.
- */
- std::optional<std::array<int, 2>> calc_loose_edge_vert_indices(int edge_index) const;
-
- /**
* Calculate the order in which the polygons should be written into the file (sorted by material
* index).
*/
diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_nurbs.cc b/source/blender/io/wavefront_obj/exporter/obj_export_nurbs.cc
index 812c3e7b5d4..1b1ee5f8386 100644
--- a/source/blender/io/wavefront_obj/exporter/obj_export_nurbs.cc
+++ b/source/blender/io/wavefront_obj/exporter/obj_export_nurbs.cc
@@ -31,10 +31,10 @@ void OBJCurve::set_world_axes_transform(const eIOAxis forward, const eIOAxis up)
unit_m3(axes_transform);
/* +Y-forward and +Z-up are the Blender's default axis settings. */
mat3_from_axis_conversion(forward, up, IO_AXIS_Y, IO_AXIS_Z, axes_transform);
- mul_m4_m3m4(world_axes_transform_, axes_transform, export_object_eval_->obmat);
- /* #mul_m4_m3m4 does not transform last row of #Object.obmat, i.e. location data. */
- mul_v3_m3v3(world_axes_transform_[3], axes_transform, export_object_eval_->obmat[3]);
- world_axes_transform_[3][3] = export_object_eval_->obmat[3][3];
+ mul_m4_m3m4(world_axes_transform_, axes_transform, export_object_eval_->object_to_world);
+ /* #mul_m4_m3m4 does not transform last row of #Object.object_to_world, i.e. location data. */
+ mul_v3_m3v3(world_axes_transform_[3], axes_transform, export_object_eval_->object_to_world[3]);
+ world_axes_transform_[3][3] = export_object_eval_->object_to_world[3][3];
}
const char *OBJCurve::get_curve_name() const
diff --git a/source/blender/io/wavefront_obj/importer/obj_import_mesh.cc b/source/blender/io/wavefront_obj/importer/obj_import_mesh.cc
index 33ece88d3d4..56ad7fd4563 100644
--- a/source/blender/io/wavefront_obj/importer/obj_import_mesh.cc
+++ b/source/blender/io/wavefront_obj/importer/obj_import_mesh.cc
@@ -254,7 +254,6 @@ void MeshFromGeometry::create_edges(Mesh *mesh)
dst_edge.v1 = mesh_geometry_.global_to_local_vertices_.lookup_default(src_edge.v1, 0);
dst_edge.v2 = mesh_geometry_.global_to_local_vertices_.lookup_default(src_edge.v2, 0);
BLI_assert(dst_edge.v1 < total_verts && dst_edge.v2 < total_verts);
- dst_edge.flag = ME_LOOSEEDGE;
}
/* Set argument `update` to true so that existing, explicitly imported edges can be merged
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index a1781265278..f1c2dcaae68 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -73,7 +73,6 @@ enum {
ME_SEAM = (1 << 2),
/** Deprecated hide status. Now stored in ".hide_edge" attribute. */
/* ME_HIDE = (1 << 4), */
- ME_EDGERENDER = (1 << 5),
ME_LOOSEEDGE = (1 << 7),
ME_SHARP = (1 << 9), /* only reason this flag remains a 'short' */
};
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index 74714cf7e41..3161238dc2e 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -613,7 +613,7 @@ typedef struct bNodeTree {
void (*progress)(void *, float progress);
/** \warning may be called by different threads */
void (*stats_draw)(void *, const char *str);
- int (*test_break)(void *);
+ bool (*test_break)(void *);
void (*update_draw)(void *);
void *tbh, *prh, *sdh, *udh;
@@ -1497,6 +1497,10 @@ typedef struct NodeGeometryCurveToPoints {
typedef struct NodeGeometryCurveSample {
/* GeometryNodeCurveSampleMode. */
uint8_t mode;
+ int8_t use_all_curves;
+ /* eCustomDataType. */
+ int8_t data_type;
+ char _pad[1];
} NodeGeometryCurveSample;
typedef struct NodeGeometryTransferAttribute {
diff --git a/source/blender/makesdna/DNA_object_defaults.h b/source/blender/makesdna/DNA_object_defaults.h
index 14683869bc4..2a5796d2aea 100644
--- a/source/blender/makesdna/DNA_object_defaults.h
+++ b/source/blender/makesdna/DNA_object_defaults.h
@@ -23,7 +23,7 @@
\
.constinv = _DNA_DEFAULT_UNIT_M4, \
.parentinv = _DNA_DEFAULT_UNIT_M4, \
- .obmat = _DNA_DEFAULT_UNIT_M4, \
+ .object_to_world = _DNA_DEFAULT_UNIT_M4, \
\
.scale = {1, 1, 1}, \
.dscale = {1, 1, 1}, \
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index 8296855ec29..494295f7bb9 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -322,20 +322,14 @@ typedef struct Object {
float rotAxis[3], drotAxis[3];
/** Axis angle rotation - angle part. */
float rotAngle, drotAngle;
- /** Final world-space matrix with constraints & animsys applied. */
- float obmat[4][4];
+ /** Final transformation matrices with constraints & animsys applied. */
+ float object_to_world[4][4];
+ float world_to_object[4][4];
/** Inverse result of parent, so that object doesn't 'stick' to parent. */
float parentinv[4][4];
/** Inverse result of constraints.
* doesn't include effect of parent or object local transform. */
float constinv[4][4];
- /**
- * Inverse matrix of 'obmat' for any other use than rendering!
- *
- * \note this isn't assured to be valid as with 'obmat',
- * before using this value you should do: `invert_m4_m4(ob->imat, ob->obmat)`
- */
- float imat[4][4];
/** Copy of Base's layer in the scene. */
unsigned int lay DNA_DEPRECATED;
diff --git a/source/blender/makesdna/intern/dna_rename_defs.h b/source/blender/makesdna/intern/dna_rename_defs.h
index ec624bcb64e..afc907b7780 100644
--- a/source/blender/makesdna/intern/dna_rename_defs.h
+++ b/source/blender/makesdna/intern/dna_rename_defs.h
@@ -96,6 +96,8 @@ DNA_STRUCT_RENAME_ELEM(Object, dup_group, instance_collection)
DNA_STRUCT_RENAME_ELEM(Object, dupfacesca, instance_faces_scale)
DNA_STRUCT_RENAME_ELEM(Object, restrictflag, visibility_flag)
DNA_STRUCT_RENAME_ELEM(Object, size, scale)
+DNA_STRUCT_RENAME_ELEM(Object, obmat, object_to_world)
+DNA_STRUCT_RENAME_ELEM(Object, imat, world_to_object)
DNA_STRUCT_RENAME_ELEM(Object_Runtime, crazyspace_num_verts, crazyspace_verts_num)
DNA_STRUCT_RENAME_ELEM(MEdge, bweight, bweight_legacy)
DNA_STRUCT_RENAME_ELEM(MEdge, crease, crease_legacy)
diff --git a/source/blender/makesrna/RNA_enum_items.h b/source/blender/makesrna/RNA_enum_items.h
index 53241c4a809..1604bd97ed4 100644
--- a/source/blender/makesrna/RNA_enum_items.h
+++ b/source/blender/makesrna/RNA_enum_items.h
@@ -19,6 +19,7 @@ DEF_ENUM(rna_enum_object_empty_drawtype_items)
DEF_ENUM(rna_enum_object_gpencil_type_items)
DEF_ENUM(rna_enum_metaelem_type_items)
+DEF_ENUM(rna_enum_color_space_convert_default_items)
DEF_ENUM(rna_enum_proportional_falloff_items)
DEF_ENUM(rna_enum_proportional_falloff_curve_only_items)
DEF_ENUM(rna_enum_snap_source_items)
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index f028b199098..5c2bdc214d1 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -406,8 +406,9 @@ if(WIN32 AND NOT UNIX)
target_link_libraries(makesrna ${PTHREADS_LIBRARIES})
endif()
-# Output rna_*_gen.c
-# note (linux only): with crashes try add this after COMMAND: valgrind --leak-check=full --track-origins=yes
+# Output `rna_*_gen.c`.
+# NOTE: (Linux only): with crashes try add this after COMMAND:
+# `valgrind --leak-check=full --track-origins=yes`
add_custom_command(
OUTPUT ${GENSRC}
COMMAND "$<TARGET_FILE:makesrna>" ${CMAKE_CURRENT_BINARY_DIR}/ ${CMAKE_CURRENT_BINARY_DIR}/../
diff --git a/source/blender/makesrna/intern/rna_asset.c b/source/blender/makesrna/intern/rna_asset.c
index f919cfbeffd..3c7eb3d208f 100644
--- a/source/blender/makesrna/intern/rna_asset.c
+++ b/source/blender/makesrna/intern/rna_asset.c
@@ -472,6 +472,12 @@ static void rna_def_asset_handle(BlenderRNA *brna)
rna_def_asset_handle_api(srna);
}
+static void rna_def_asset_catalog_path(BlenderRNA *brna)
+{
+ StructRNA *srna = RNA_def_struct(brna, "AssetCatalogPath", NULL);
+ RNA_def_struct_ui_text(srna, "Catalog Path", "");
+}
+
static void rna_def_asset_library_reference(BlenderRNA *brna)
{
StructRNA *srna = RNA_def_struct(brna, "AssetLibraryReference", NULL);
@@ -498,6 +504,7 @@ void RNA_def_asset(BlenderRNA *brna)
rna_def_asset_data(brna);
rna_def_asset_library_reference(brna);
rna_def_asset_handle(brna);
+ rna_def_asset_catalog_path(brna);
RNA_define_animate_sdna(true);
}
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index b68d87587e7..fe4d51bafb9 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -15,11 +15,22 @@
#include "BKE_node_tree_update.h"
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
#include "WM_api.h"
#include "WM_types.h"
+const EnumPropertyItem rna_enum_color_space_convert_default_items[] = {
+ {0,
+ "NONE",
+ 0,
+ "None",
+ "Do not perform any color transform on load, treat colors as in scene linear space "
+ "already"},
+ {0, NULL, 0, NULL, NULL},
+};
+
#ifdef RNA_RUNTIME
# include "RNA_access.h"
@@ -566,8 +577,15 @@ static void rna_ColorManagedColorspaceSettings_colorspace_set(struct PointerRNA
}
static const EnumPropertyItem *rna_ColorManagedColorspaceSettings_colorspace_itemf(
- bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+ bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
+# if 0 /* FIXME: Causes blank drop-down, see T102316. */
+ if (C == NULL) {
+ return rna_enum_color_space_convert_default_items;
+ }
+# else
+ UNUSED_VARS(C);
+# endif
EnumPropertyItem *items = NULL;
int totitem = 0;
@@ -1190,16 +1208,6 @@ static void rna_def_colormanage(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL},
};
- static const EnumPropertyItem color_space_items[] = {
- {0,
- "NONE",
- 0,
- "None",
- "Do not perform any color transform on load, treat colors as in scene linear space "
- "already"},
- {0, NULL, 0, NULL, NULL},
- };
-
/* ** Display Settings ** */
srna = RNA_def_struct(brna, "ColorManagedDisplaySettings", NULL);
RNA_def_struct_path_func(srna, "rna_ColorManagedDisplaySettings_path");
@@ -1279,7 +1287,7 @@ static void rna_def_colormanage(BlenderRNA *brna)
prop = RNA_def_property(srna, "name", PROP_ENUM, PROP_NONE);
RNA_def_property_flag(prop, PROP_ENUM_NO_CONTEXT);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_enum_items(prop, color_space_items);
+ RNA_def_property_enum_items(prop, rna_enum_color_space_convert_default_items);
RNA_def_property_enum_funcs(prop,
"rna_ColorManagedColorspaceSettings_colorspace_get",
"rna_ColorManagedColorspaceSettings_colorspace_set",
@@ -1309,7 +1317,7 @@ static void rna_def_colormanage(BlenderRNA *brna)
prop = RNA_def_property(srna, "name", PROP_ENUM, PROP_NONE);
RNA_def_property_flag(prop, PROP_ENUM_NO_CONTEXT);
- RNA_def_property_enum_items(prop, color_space_items);
+ RNA_def_property_enum_items(prop, rna_enum_color_space_convert_default_items);
RNA_def_property_enum_funcs(prop,
"rna_ColorManagedColorspaceSettings_colorspace_get",
"rna_ColorManagedColorspaceSettings_colorspace_set",
diff --git a/source/blender/makesrna/intern/rna_depsgraph.c b/source/blender/makesrna/intern/rna_depsgraph.c
index db5b3c33c59..9af76de2a2b 100644
--- a/source/blender/makesrna/intern/rna_depsgraph.c
+++ b/source/blender/makesrna/intern/rna_depsgraph.c
@@ -168,7 +168,7 @@ static void rna_DepsgraphObjectInstance_matrix_world_get(PointerRNA *ptr, float
/* We can return actual object's matrix here, no reason to return identity matrix
* when this is not actually an instance... */
Object *ob = (Object *)di->iter.current;
- copy_m4_m4((float(*)[4])mat, ob->obmat);
+ copy_m4_m4((float(*)[4])mat, ob->object_to_world);
}
}
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index cf0ff546d41..a55a1b0ffcd 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -334,13 +334,13 @@ static int rna_GPencilLayer_active_frame_editable(PointerRNA *ptr, const char **
static void set_parent(bGPDlayer *gpl, Object *par, const int type, const char *substr)
{
if (type == PAROBJECT) {
- invert_m4_m4(gpl->inverse, par->obmat);
+ invert_m4_m4(gpl->inverse, par->object_to_world);
gpl->parent = par;
gpl->partype |= PAROBJECT;
gpl->parsubstr[0] = 0;
}
else if (type == PARSKEL) {
- invert_m4_m4(gpl->inverse, par->obmat);
+ invert_m4_m4(gpl->inverse, par->object_to_world);
gpl->parent = par;
gpl->partype |= PARSKEL;
gpl->parsubstr[0] = 0;
@@ -349,7 +349,7 @@ static void set_parent(bGPDlayer *gpl, Object *par, const int type, const char *
bPoseChannel *pchan = BKE_pose_channel_find_name(par->pose, substr);
if (pchan) {
float tmp_mat[4][4];
- mul_m4_m4m4(tmp_mat, par->obmat, pchan->pose_mat);
+ mul_m4_m4m4(tmp_mat, par->object_to_world, pchan->pose_mat);
invert_m4_m4(gpl->inverse, tmp_mat);
gpl->parent = par;
@@ -357,7 +357,7 @@ static void set_parent(bGPDlayer *gpl, Object *par, const int type, const char *
BLI_strncpy(gpl->parsubstr, substr, sizeof(gpl->parsubstr));
}
else {
- invert_m4_m4(gpl->inverse, par->obmat);
+ invert_m4_m4(gpl->inverse, par->object_to_world);
gpl->parent = par;
gpl->partype |= PAROBJECT;
gpl->parsubstr[0] = 0;
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index bad099815a4..f13132b5b7c 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -4024,6 +4024,7 @@ static void rna_def_mesh(BlenderRNA *brna)
"Size of the voxel in object space used for volume evaluation. Lower "
"values preserve finer details");
RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE);
prop = RNA_def_property(srna, "remesh_voxel_adaptivity", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "remesh_voxel_adaptivity");
@@ -4035,11 +4036,13 @@ static void rna_def_mesh(BlenderRNA *brna)
"Reduces the final face count by simplifying geometry where detail is not needed, "
"generating triangles. A value greater than 0 disables Fix Poles");
RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE);
prop = RNA_def_property(srna, "use_remesh_fix_poles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_REMESH_FIX_POLES);
RNA_def_property_ui_text(prop, "Fix Poles", "Produces less poles and a better topology flow");
RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE);
prop = RNA_def_property(srna, "use_remesh_preserve_volume", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_REMESH_REPROJECT_VOLUME);
@@ -4048,29 +4051,34 @@ static void rna_def_mesh(BlenderRNA *brna)
"Preserve Volume",
"Projects the mesh to preserve the volume and details of the original mesh");
RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE);
prop = RNA_def_property(srna, "use_remesh_preserve_paint_mask", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_REMESH_REPROJECT_PAINT_MASK);
RNA_def_property_ui_text(prop, "Preserve Paint Mask", "Keep the current mask on the new mesh");
RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE);
prop = RNA_def_property(srna, "use_remesh_preserve_sculpt_face_sets", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_REMESH_REPROJECT_SCULPT_FACE_SETS);
RNA_def_property_ui_text(
prop, "Preserve Face Sets", "Keep the current Face Sets on the new mesh");
RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE);
prop = RNA_def_property(srna, "use_remesh_preserve_vertex_colors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_REMESH_REPROJECT_VERTEX_COLORS);
RNA_def_property_ui_text(
prop, "Preserve Vertex Colors", "Keep the current vertex colors on the new mesh");
RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE);
prop = RNA_def_property(srna, "remesh_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "remesh_mode");
RNA_def_property_enum_items(prop, rna_enum_mesh_remesh_mode_items);
RNA_def_property_ui_text(prop, "Remesh Mode", "");
RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE);
/* End remesh */
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c
index 524e3134f9c..de033408170 100644
--- a/source/blender/makesrna/intern/rna_nla.c
+++ b/source/blender/makesrna/intern/rna_nla.c
@@ -822,6 +822,7 @@ static void rna_def_nlastrip(BlenderRNA *brna)
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_repeat_set", NULL);
/* these limits have currently be chosen arbitrarily, but could be extended
* (minimum should still be > 0 though) if needed... */
+ RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_range(prop, 0.1f, 1000.0f);
RNA_def_property_ui_text(prop, "Repeat", "Number of times to repeat the action range");
RNA_def_property_update(
@@ -832,6 +833,7 @@ static void rna_def_nlastrip(BlenderRNA *brna)
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_scale_set", NULL);
/* these limits can be extended, but beyond this, we can get some crazy+annoying bugs
* due to numeric errors */
+ RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_range(prop, 0.0001f, 1000.0f);
RNA_def_property_ui_text(prop, "Scale", "Scaling factor for action");
RNA_def_property_update(
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 865399df9ef..9dc940059dd 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -2425,21 +2425,13 @@ static bNodeSocket *rna_Node_inputs_new(ID *id,
const char *name,
const char *identifier)
{
-
- if (ELEM(node->type, NODE_GROUP_INPUT, NODE_FRAME)) {
- BKE_report(reports, RPT_ERROR, "Unable to create socket");
+ if (node->type != NODE_CUSTOM) {
+ BKE_report(reports, RPT_ERROR, "Cannot add socket to built-in node");
return NULL;
}
- /* Adding an input to a group node is not working,
- * simpler to add it to its underlying nodetree. */
- if (ELEM(node->type, NODE_GROUP, NODE_CUSTOM_GROUP) && node->id != NULL) {
- return rna_NodeTree_inputs_new((bNodeTree *)node->id, bmain, reports, type, name);
- }
bNodeTree *ntree = (bNodeTree *)id;
- bNodeSocket *sock;
-
- sock = nodeAddSocket(ntree, node, SOCK_IN, type, identifier, name);
+ bNodeSocket *sock = nodeAddSocket(ntree, node, SOCK_IN, type, identifier, name);
if (sock == NULL) {
BKE_report(reports, RPT_ERROR, "Unable to create socket");
@@ -2460,20 +2452,13 @@ static bNodeSocket *rna_Node_outputs_new(ID *id,
const char *name,
const char *identifier)
{
- if (ELEM(node->type, NODE_GROUP_OUTPUT, NODE_FRAME)) {
- BKE_report(reports, RPT_ERROR, "Unable to create socket");
+ if (node->type != NODE_CUSTOM) {
+ BKE_report(reports, RPT_ERROR, "Cannot add socket to built-in node");
return NULL;
}
- /* Adding an output to a group node is not working,
- * simpler to add it to its underlying nodetree. */
- if (ELEM(node->type, NODE_GROUP, NODE_CUSTOM_GROUP) && node->id != NULL) {
- return rna_NodeTree_outputs_new((bNodeTree *)node->id, bmain, reports, type, name);
- }
bNodeTree *ntree = (bNodeTree *)id;
- bNodeSocket *sock;
-
- sock = nodeAddSocket(ntree, node, SOCK_OUT, type, identifier, name);
+ bNodeSocket *sock = nodeAddSocket(ntree, node, SOCK_OUT, type, identifier, name);
if (sock == NULL) {
BKE_report(reports, RPT_ERROR, "Unable to create socket");
@@ -2489,6 +2474,11 @@ static bNodeSocket *rna_Node_outputs_new(ID *id,
static void rna_Node_socket_remove(
ID *id, bNode *node, Main *bmain, ReportList *reports, bNodeSocket *sock)
{
+ if (node->type != NODE_CUSTOM) {
+ BKE_report(reports, RPT_ERROR, "Unable to remove socket from built-in node");
+ return;
+ }
+
bNodeTree *ntree = (bNodeTree *)id;
if (BLI_findindex(&node->inputs, sock) == -1 && BLI_findindex(&node->outputs, sock) == -1) {
@@ -2502,8 +2492,13 @@ static void rna_Node_socket_remove(
}
}
-static void rna_Node_inputs_clear(ID *id, bNode *node, Main *bmain)
+static void rna_Node_inputs_clear(ID *id, bNode *node, Main *bmain, ReportList *reports)
{
+ if (node->type != NODE_CUSTOM) {
+ BKE_report(reports, RPT_ERROR, "Unable to remove sockets from built-in node");
+ return;
+ }
+
bNodeTree *ntree = (bNodeTree *)id;
bNodeSocket *sock, *nextsock;
@@ -2516,8 +2511,13 @@ static void rna_Node_inputs_clear(ID *id, bNode *node, Main *bmain)
WM_main_add_notifier(NC_NODE | NA_EDITED, ntree);
}
-static void rna_Node_outputs_clear(ID *id, bNode *node, Main *bmain)
+static void rna_Node_outputs_clear(ID *id, bNode *node, Main *bmain, ReportList *reports)
{
+ if (node->type != NODE_CUSTOM) {
+ BKE_report(reports, RPT_ERROR, "Unable to remove socket from built-in node");
+ return;
+ }
+
bNodeTree *ntree = (bNodeTree *)id;
bNodeSocket *sock, *nextsock;
@@ -2530,8 +2530,14 @@ static void rna_Node_outputs_clear(ID *id, bNode *node, Main *bmain)
WM_main_add_notifier(NC_NODE | NA_EDITED, ntree);
}
-static void rna_Node_inputs_move(ID *id, bNode *node, Main *bmain, int from_index, int to_index)
+static void rna_Node_inputs_move(
+ ID *id, bNode *node, Main *bmain, ReportList *reports, int from_index, int to_index)
{
+ if (node->type != NODE_CUSTOM) {
+ BKE_report(reports, RPT_ERROR, "Unable to move sockets in built-in node");
+ return;
+ }
+
bNodeTree *ntree = (bNodeTree *)id;
bNodeSocket *sock;
@@ -2562,8 +2568,14 @@ static void rna_Node_inputs_move(ID *id, bNode *node, Main *bmain, int from_inde
WM_main_add_notifier(NC_NODE | NA_EDITED, ntree);
}
-static void rna_Node_outputs_move(ID *id, bNode *node, Main *bmain, int from_index, int to_index)
+static void rna_Node_outputs_move(
+ ID *id, bNode *node, Main *bmain, ReportList *reports, int from_index, int to_index)
{
+ if (node->type != NODE_CUSTOM) {
+ BKE_report(reports, RPT_ERROR, "Unable to move sockets in built-in node");
+ return;
+ }
+
bNodeTree *ntree = (bNodeTree *)id;
bNodeSocket *sock;
@@ -4500,8 +4512,15 @@ static void rna_NodeConvertColorSpace_to_color_space_set(struct PointerRNA *ptr,
}
static const EnumPropertyItem *rna_NodeConvertColorSpace_color_space_itemf(
- bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+ bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
+# if 0 /* FIXME: Causes blank drop-down, see T102316. */
+ if (C == NULL) {
+ return rna_enum_color_space_convert_default_items;
+ }
+# else
+ UNUSED_VARS(C);
+# endif
EnumPropertyItem *items = NULL;
int totitem = 0;
@@ -7035,11 +7054,11 @@ static void rna_def_cmp_output_file_slots_api(BlenderRNA *brna,
func = RNA_def_function(srna, "clear", "rna_Node_inputs_clear");
RNA_def_function_ui_description(func, "Remove all file slots from this node");
- RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_MAIN);
+ RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_MAIN | FUNC_USE_REPORTS);
func = RNA_def_function(srna, "move", "rna_Node_inputs_move");
RNA_def_function_ui_description(func, "Move a file slot to another position");
- RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_MAIN);
+ RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_MAIN | FUNC_USE_REPORTS);
parm = RNA_def_int(
func, "from_index", -1, 0, INT_MAX, "From Index", "Index of the socket to move", 0, 10000);
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
@@ -7323,19 +7342,9 @@ static void def_cmp_convert_color_space(StructRNA *srna)
PropertyRNA *prop;
RNA_def_struct_sdna_from(srna, "NodeConvertColorSpace", "storage");
- static const EnumPropertyItem color_space_items[] = {
- {0,
- "NONE",
- 0,
- "None",
- "Do not perform any color transform on load, treat colors as in scene linear space "
- "already"},
- {0, NULL, 0, NULL, NULL},
- };
-
prop = RNA_def_property(srna, "from_color_space", PROP_ENUM, PROP_NONE);
RNA_def_property_flag(prop, PROP_ENUM_NO_CONTEXT);
- RNA_def_property_enum_items(prop, color_space_items);
+ RNA_def_property_enum_items(prop, rna_enum_color_space_convert_default_items);
RNA_def_property_enum_funcs(prop,
"rna_NodeConvertColorSpace_from_color_space_get",
"rna_NodeConvertColorSpace_from_color_space_set",
@@ -7345,7 +7354,7 @@ static void def_cmp_convert_color_space(StructRNA *srna)
prop = RNA_def_property(srna, "to_color_space", PROP_ENUM, PROP_NONE);
RNA_def_property_flag(prop, PROP_ENUM_NO_CONTEXT);
- RNA_def_property_enum_items(prop, color_space_items);
+ RNA_def_property_enum_items(prop, rna_enum_color_space_convert_default_items);
RNA_def_property_enum_funcs(prop,
"rna_NodeConvertColorSpace_to_color_space_get",
"rna_NodeConvertColorSpace_to_color_space_set",
@@ -9442,10 +9451,26 @@ static void def_geo_curve_sample(StructRNA *srna)
RNA_def_struct_sdna_from(srna, "NodeGeometryCurveSample", "storage");
- PropertyRNA *prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ PropertyRNA *prop;
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, mode_items);
RNA_def_property_ui_text(prop, "Mode", "Method for sampling input");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
+
+ prop = RNA_def_property(srna, "use_all_curves", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_ui_text(prop,
+ "All Curves",
+ "Sample lengths based on the total lengh of all curves, rather than "
+ "using a length inside each selected curve");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
+
+ prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, rna_enum_attribute_type_items);
+ RNA_def_property_enum_funcs(
+ prop, NULL, NULL, "rna_GeometryNodeAttributeType_type_with_socket_itemf");
+ RNA_def_property_enum_default(prop, CD_PROP_FLOAT);
+ RNA_def_property_ui_text(prop, "Data Type", "");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
}
static void def_geo_triangulate(StructRNA *srna)
@@ -12108,11 +12133,11 @@ static void rna_def_node_sockets_api(BlenderRNA *brna, PropertyRNA *cprop, int i
func = RNA_def_function(srna, "clear", clearfunc);
RNA_def_function_ui_description(func, "Remove all sockets from this node");
- RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_MAIN);
+ RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_MAIN | FUNC_USE_REPORTS);
func = RNA_def_function(srna, "move", movefunc);
RNA_def_function_ui_description(func, "Move a socket to another position");
- RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_MAIN);
+ RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_MAIN | FUNC_USE_REPORTS);
parm = RNA_def_int(
func, "from_index", -1, 0, INT_MAX, "From Index", "Index of the socket to move", 0, 10000);
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 7f4ed39c001..1d6b3d5d69e 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -356,7 +356,8 @@ static void rna_Object_internal_update_draw(Main *UNUSED(bmain),
static void rna_Object_matrix_world_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
/* don't use compat so we get predictable rotation */
- BKE_object_apply_mat4((Object *)ptr->owner_id, ((Object *)ptr->owner_id)->obmat, false, true);
+ BKE_object_apply_mat4(
+ (Object *)ptr->owner_id, ((Object *)ptr->owner_id)->object_to_world, false, true);
rna_Object_internal_update(bmain, scene, ptr);
}
@@ -3390,7 +3391,7 @@ static void rna_def_object(BlenderRNA *brna)
/* matrix */
prop = RNA_def_property(srna, "matrix_world", PROP_FLOAT, PROP_MATRIX);
- RNA_def_property_float_sdna(prop, NULL, "obmat");
+ RNA_def_property_float_sdna(prop, NULL, "object_to_world");
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_override_flag(prop, PROPOVERRIDE_NO_COMPARISON);
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 07702f3b4b6..02105c7b425 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -471,7 +471,7 @@ static void rna_ParticleSystem_co_hair(
if (step >= 0 && step <= max_k) {
copy_v3_v3(n_co, (cache + step)->co);
mul_m4_v3(particlesystem->imat, n_co);
- mul_m4_v3(object->obmat, n_co);
+ mul_m4_v3(object->object_to_world, n_co);
}
}
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index fc68e8421d7..eac29ac5e61 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -1785,6 +1785,10 @@ void RNA_api_ui_layout(StructRNA *srna)
parm = RNA_def_pointer(func, "socket", "NodeSocket", "", "");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
+ func = RNA_def_function(srna, "template_node_asset_menu_items", "uiTemplateNodeAssetMenuItems");
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ parm = RNA_def_string(func, "catalog_path", NULL, 0, "", "");
+
func = RNA_def_function(srna, "template_texture_user", "uiTemplateTextureUser");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c
index bf534b0d586..2d725af7fe4 100644
--- a/source/blender/modifiers/intern/MOD_array.c
+++ b/source/blender/modifiers/intern/MOD_array.c
@@ -456,13 +456,13 @@ static Mesh *arrayModifier_doArray(ArrayModifierData *amd,
float result_mat[4][4];
if (ctx->object) {
- invert_m4_m4(obinv, ctx->object->obmat);
+ invert_m4_m4(obinv, ctx->object->object_to_world);
}
else {
unit_m4(obinv);
}
- mul_m4_series(result_mat, offset, obinv, amd->offset_ob->obmat);
+ mul_m4_series(result_mat, offset, obinv, amd->offset_ob->object_to_world);
copy_m4_m4(offset, result_mat);
}
@@ -474,7 +474,7 @@ static Mesh *arrayModifier_doArray(ArrayModifierData *amd,
Object *curve_ob = amd->curve_ob;
CurveCache *curve_cache = curve_ob->runtime.curve_cache;
if (curve_cache != NULL && curve_cache->anim_path_accum_length != NULL) {
- float scale_fac = mat4_to_scale(curve_ob->obmat);
+ float scale_fac = mat4_to_scale(curve_ob->object_to_world);
length = scale_fac * BKE_anim_path_get_length(curve_cache);
}
}
diff --git a/source/blender/modifiers/intern/MOD_boolean.cc b/source/blender/modifiers/intern/MOD_boolean.cc
index 7ad49f43e1b..21f05158e8b 100644
--- a/source/blender/modifiers/intern/MOD_boolean.cc
+++ b/source/blender/modifiers/intern/MOD_boolean.cc
@@ -139,8 +139,8 @@ static Mesh *get_quick_mesh(
float imat[4][4];
float omat[4][4];
- invert_m4_m4(imat, ob_self->obmat);
- mul_m4_m4m4(omat, imat, ob_operand_ob->obmat);
+ invert_m4_m4(imat, ob_self->object_to_world);
+ mul_m4_m4m4(omat, imat, ob_operand_ob->object_to_world);
MutableSpan<MVert> verts = result->verts_for_write();
for (const int i : verts.index_range()) {
@@ -227,7 +227,8 @@ static BMesh *BMD_mesh_bm_create(
SCOPED_TIMER(__func__);
#endif
- *r_is_flip = (is_negative_m4(object->obmat) != is_negative_m4(operand_ob->obmat));
+ *r_is_flip = (is_negative_m4(object->object_to_world) !=
+ is_negative_m4(operand_ob->object_to_world));
const BMAllocTemplate allocsize = BMALLOC_TEMPLATE_FROM_ME(mesh, mesh_operand_ob);
@@ -294,8 +295,8 @@ static void BMD_mesh_intersection(BMesh *bm,
float imat[4][4];
float omat[4][4];
- invert_m4_m4(imat, object->obmat);
- mul_m4_m4m4(omat, imat, operand_ob->obmat);
+ invert_m4_m4(imat, object->object_to_world);
+ mul_m4_m4m4(omat, imat, operand_ob->object_to_world);
BMVert *eve;
i = 0;
@@ -414,7 +415,7 @@ static Mesh *exact_boolean_mesh(BooleanModifierData *bmd,
}
meshes.append(mesh);
- obmats.append((float4x4 *)&ctx->object->obmat);
+ obmats.append((float4x4 *)&ctx->object->object_to_world);
material_remaps.append({});
if (mesh->totcol == 0) {
/* Necessary for faces using the default material when there are no material slots. */
@@ -431,7 +432,7 @@ static Mesh *exact_boolean_mesh(BooleanModifierData *bmd,
}
BKE_mesh_wrapper_ensure_mdata(mesh_operand);
meshes.append(mesh_operand);
- obmats.append((float4x4 *)&bmd->object->obmat);
+ obmats.append((float4x4 *)&bmd->object->object_to_world);
material_remaps.append(get_material_remap(*bmd->object, *mesh_operand, materials));
}
else if (bmd->flag & eBooleanModifierFlag_Collection) {
@@ -446,7 +447,7 @@ static Mesh *exact_boolean_mesh(BooleanModifierData *bmd,
}
BKE_mesh_wrapper_ensure_mdata(collection_mesh);
meshes.append(collection_mesh);
- obmats.append((float4x4 *)&ob->obmat);
+ obmats.append((float4x4 *)&ob->object_to_world);
material_remaps.append(get_material_remap(*ob, *collection_mesh, materials));
}
}
@@ -456,14 +457,15 @@ static Mesh *exact_boolean_mesh(BooleanModifierData *bmd,
const bool use_self = (bmd->flag & eBooleanModifierFlag_Self) != 0;
const bool hole_tolerant = (bmd->flag & eBooleanModifierFlag_HoleTolerant) != 0;
- Mesh *result = blender::meshintersect::direct_mesh_boolean(meshes,
- obmats,
- *(float4x4 *)&ctx->object->obmat,
- material_remaps,
- use_self,
- hole_tolerant,
- bmd->operation,
- nullptr);
+ Mesh *result = blender::meshintersect::direct_mesh_boolean(
+ meshes,
+ obmats,
+ *(float4x4 *)&ctx->object->object_to_world,
+ material_remaps,
+ use_self,
+ hole_tolerant,
+ bmd->operation,
+ nullptr);
MEM_SAFE_FREE(result->mat);
result->mat = (Material **)MEM_malloc_arrayN(materials.size(), sizeof(Material *), __func__);
result->totcol = materials.size();
diff --git a/source/blender/modifiers/intern/MOD_cast.c b/source/blender/modifiers/intern/MOD_cast.c
index 30be1d33653..b6e1b5e88c1 100644
--- a/source/blender/modifiers/intern/MOD_cast.c
+++ b/source/blender/modifiers/intern/MOD_cast.c
@@ -126,13 +126,13 @@ static void sphere_do(CastModifierData *cmd,
* we use its location, transformed to ob's local space */
if (ctrl_ob) {
if (flag & MOD_CAST_USE_OB_TRANSFORM) {
- invert_m4_m4(imat, ctrl_ob->obmat);
- mul_m4_m4m4(mat, imat, ob->obmat);
+ invert_m4_m4(imat, ctrl_ob->object_to_world);
+ mul_m4_m4m4(mat, imat, ob->object_to_world);
invert_m4_m4(imat, mat);
}
- invert_m4_m4(ob->imat, ob->obmat);
- mul_v3_m4v3(center, ob->imat, ctrl_ob->obmat[3]);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
+ mul_v3_m4v3(center, ob->world_to_object, ctrl_ob->object_to_world[3]);
}
/* now we check which options the user wants */
@@ -275,13 +275,13 @@ static void cuboid_do(CastModifierData *cmd,
if (ctrl_ob) {
if (flag & MOD_CAST_USE_OB_TRANSFORM) {
- invert_m4_m4(imat, ctrl_ob->obmat);
- mul_m4_m4m4(mat, imat, ob->obmat);
+ invert_m4_m4(imat, ctrl_ob->object_to_world);
+ mul_m4_m4m4(mat, imat, ob->object_to_world);
invert_m4_m4(imat, mat);
}
- invert_m4_m4(ob->imat, ob->obmat);
- mul_v3_m4v3(center, ob->imat, ctrl_ob->obmat[3]);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
+ mul_v3_m4v3(center, ob->world_to_object, ctrl_ob->object_to_world[3]);
}
if ((flag & MOD_CAST_SIZE_FROM_RADIUS) && has_radius) {
diff --git a/source/blender/modifiers/intern/MOD_collision.c b/source/blender/modifiers/intern/MOD_collision.c
index e38bf96500e..82faf08b349 100644
--- a/source/blender/modifiers/intern/MOD_collision.c
+++ b/source/blender/modifiers/intern/MOD_collision.c
@@ -149,7 +149,7 @@ static void deformVerts(ModifierData *md,
for (uint i = 0; i < mvert_num; i++) {
/* we save global positions */
- mul_m4_v3(ob->obmat, collmd->x[i].co);
+ mul_m4_v3(ob->object_to_world, collmd->x[i].co);
}
collmd->xnew = MEM_dupallocN(collmd->x); /* Frame end position. */
@@ -188,7 +188,7 @@ static void deformVerts(ModifierData *md,
for (uint i = 0; i < mvert_num; i++) {
/* we save global positions */
- mul_m4_v3(ob->obmat, collmd->xnew[i].co);
+ mul_m4_v3(ob->object_to_world, collmd->xnew[i].co);
/* detect motion */
is_static = is_static && equals_v3v3(collmd->x[i].co, collmd->xnew[i].co);
diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c
index ad5be57ad68..fc12a9c2aad 100644
--- a/source/blender/modifiers/intern/MOD_displace.c
+++ b/source/blender/modifiers/intern/MOD_displace.c
@@ -322,7 +322,7 @@ static void displaceModifier_do(DisplaceModifierData *dmd,
}
else if (ELEM(direction, MOD_DISP_DIR_X, MOD_DISP_DIR_Y, MOD_DISP_DIR_Z, MOD_DISP_DIR_RGB_XYZ) &&
use_global_direction) {
- copy_m4_m4(local_mat, ob->obmat);
+ copy_m4_m4(local_mat, ob->object_to_world);
}
DisplaceUserdata data = {NULL};
diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c
index af167bf9b32..96bf836fa4a 100644
--- a/source/blender/modifiers/intern/MOD_explode.c
+++ b/source/blender/modifiers/intern/MOD_explode.c
@@ -985,7 +985,7 @@ static Mesh *explodeMesh(ExplodeModifierData *emd,
MTFace *mtface = CustomData_get_layer_named(&explode->fdata, CD_MTFACE, emd->uvname);
/* getting back to object space */
- invert_m4_m4(imat, ctx->object->obmat);
+ invert_m4_m4(imat, ctx->object->object_to_world);
psmd->psys->lattice_deform_data = psys_create_lattice_deform_data(&sim);
@@ -1020,7 +1020,7 @@ static Mesh *explodeMesh(ExplodeModifierData *emd,
psys_get_particle_state(&sim, ed_v2, &state, 1);
vertco = explode_verts[v].co;
- mul_m4_v3(ctx->object->obmat, vertco);
+ mul_m4_v3(ctx->object->object_to_world, vertco);
sub_v3_v3(vertco, birth.co);
diff --git a/source/blender/modifiers/intern/MOD_hook.c b/source/blender/modifiers/intern/MOD_hook.c
index 11bc9ee9574..231c65998e0 100644
--- a/source/blender/modifiers/intern/MOD_hook.c
+++ b/source/blender/modifiers/intern/MOD_hook.c
@@ -338,14 +338,14 @@ static void deformVerts_do(HookModifierData *hmd,
/* get world-space matrix of target, corrected for the space the verts are in */
if (hmd->subtarget[0] && pchan) {
/* bone target if there's a matching pose-channel */
- mul_m4_m4m4(dmat, ob_target->obmat, pchan->pose_mat);
+ mul_m4_m4m4(dmat, ob_target->object_to_world, pchan->pose_mat);
}
else {
/* just object target */
- copy_m4_m4(dmat, ob_target->obmat);
+ copy_m4_m4(dmat, ob_target->object_to_world);
}
- invert_m4_m4(ob->imat, ob->obmat);
- mul_m4_series(hd.mat, ob->imat, dmat, hmd->parentinv);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
+ mul_m4_series(hd.mat, ob->world_to_object, dmat, hmd->parentinv);
/* --- done with 'hd' init --- */
/* Regarding index range checking below.
diff --git a/source/blender/modifiers/intern/MOD_mask.cc b/source/blender/modifiers/intern/MOD_mask.cc
index 7fabd5c65fa..659a1625079 100644
--- a/source/blender/modifiers/intern/MOD_mask.cc
+++ b/source/blender/modifiers/intern/MOD_mask.cc
@@ -607,7 +607,7 @@ static void add_interpolated_polys_to_new_mesh(const Mesh &src_mesh,
cut_edge.v1 = dst_loops[mp_dst.loopstart].v;
cut_edge.v2 = cut_dst_loop.v;
BLI_assert(cut_edge.v1 != cut_edge.v2);
- cut_edge.flag = ME_EDGEDRAW | ME_EDGERENDER;
+ cut_edge.flag = ME_EDGEDRAW;
edge_index++;
/* Only handle one of the cuts per iteration. */
diff --git a/source/blender/modifiers/intern/MOD_mesh_to_volume.cc b/source/blender/modifiers/intern/MOD_mesh_to_volume.cc
index cad9fdfe30d..fa7f0690675 100644
--- a/source/blender/modifiers/intern/MOD_mesh_to_volume.cc
+++ b/source/blender/modifiers/intern/MOD_mesh_to_volume.cc
@@ -134,8 +134,8 @@ static Volume *mesh_to_volume(ModifierData *md,
}
BKE_mesh_wrapper_ensure_mdata(mesh);
- const float4x4 mesh_to_own_object_space_transform = float4x4(ctx->object->imat) *
- float4x4(object_to_convert->obmat);
+ const float4x4 mesh_to_own_object_space_transform = float4x4(ctx->object->world_to_object) *
+ float4x4(object_to_convert->object_to_world);
geometry::MeshToVolumeResolution resolution;
resolution.mode = (MeshToVolumeModifierResolutionMode)mvmd->resolution_mode;
if (resolution.mode == MESH_TO_VOLUME_RESOLUTION_MODE_VOXEL_AMOUNT) {
diff --git a/source/blender/modifiers/intern/MOD_meshdeform.c b/source/blender/modifiers/intern/MOD_meshdeform.c
index d7ed346a61f..2aaaee2ccc7 100644
--- a/source/blender/modifiers/intern/MOD_meshdeform.c
+++ b/source/blender/modifiers/intern/MOD_meshdeform.c
@@ -358,8 +358,8 @@ static void meshdeformModifier_do(ModifierData *md,
}
/* compute matrices to go in and out of cage object space */
- invert_m4_m4(imat, ob_target->obmat);
- mul_m4_m4m4(cagemat, imat, ob->obmat);
+ invert_m4_m4(imat, ob_target->object_to_world);
+ mul_m4_m4m4(cagemat, imat, ob->object_to_world);
mul_m4_m4m4(cmat, mmd->bindmat, cagemat);
invert_m4_m4(iobmat, cmat);
copy_m3_m4(icagemat, iobmat);
diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc
index b66312d6706..c032ee35639 100644
--- a/source/blender/modifiers/intern/MOD_nodes.cc
+++ b/source/blender/modifiers/intern/MOD_nodes.cc
@@ -876,6 +876,9 @@ static void find_side_effect_nodes_for_viewer_path(
if (found_node->id == nullptr) {
return;
}
+ if (found_node->is_muted()) {
+ return;
+ }
group_node_stack.push(found_node);
group = reinterpret_cast<bNodeTree *>(found_node->id);
compute_context_builder.push<blender::bke::NodeGroupComputeContext>(group_node_name);
diff --git a/source/blender/modifiers/intern/MOD_normal_edit.cc b/source/blender/modifiers/intern/MOD_normal_edit.cc
index 43ded18fcc4..7d422826cf8 100644
--- a/source/blender/modifiers/intern/MOD_normal_edit.cc
+++ b/source/blender/modifiers/intern/MOD_normal_edit.cc
@@ -94,8 +94,8 @@ static void generate_vert_coordinates(Mesh *mesh,
/* Translate our coordinates so that center of ob_center is at (0, 0, 0). */
/* Get ob_center (world) coordinates in ob local coordinates.
* No need to take into account ob_center's space here, see T44027. */
- invert_m4_m4(inv_obmat, ob->obmat);
- mul_v3_m4v3(diff, inv_obmat, ob_center->obmat[3]);
+ invert_m4_m4(inv_obmat, ob->object_to_world);
+ mul_v3_m4v3(diff, inv_obmat, ob_center->object_to_world[3]);
negate_v3(diff);
do_diff = true;
@@ -383,8 +383,8 @@ static void normalEditModifier_do_directional(NormalEditModifierData *enmd,
/* Get target's center coordinates in ob local coordinates. */
float mat[4][4];
- invert_m4_m4(mat, ob->obmat);
- mul_m4_m4m4(mat, mat, ob_target->obmat);
+ invert_m4_m4(mat, ob->object_to_world);
+ mul_m4_m4m4(mat, mat, ob_target->object_to_world);
copy_v3_v3(target_co, mat[3]);
if (use_parallel_normals) {
diff --git a/source/blender/modifiers/intern/MOD_particleinstance.c b/source/blender/modifiers/intern/MOD_particleinstance.c
index aab48101351..f65f8bc4fb3 100644
--- a/source/blender/modifiers/intern/MOD_particleinstance.c
+++ b/source/blender/modifiers/intern/MOD_particleinstance.c
@@ -273,7 +273,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
break;
case eParticleInstanceSpace_Local:
/* get particle states in the particle object's local space */
- invert_m4_m4(spacemat, pimd->ob->obmat);
+ invert_m4_m4(spacemat, pimd->ob->object_to_world);
break;
default:
/* should not happen */
diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c
index 91f8947bbc3..4ba274dbd8a 100644
--- a/source/blender/modifiers/intern/MOD_screw.c
+++ b/source/blender/modifiers/intern/MOD_screw.c
@@ -274,8 +274,8 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
if (ob_axis != NULL) {
/* Calculate the matrix relative to the axis object. */
- invert_m4_m4(mtx_tmp_a, ctx->object->obmat);
- copy_m4_m4(mtx_tx_inv, ob_axis->obmat);
+ invert_m4_m4(mtx_tmp_a, ctx->object->object_to_world);
+ copy_m4_m4(mtx_tx_inv, ob_axis->object_to_world);
mul_m4_m4m4(mtx_tx, mtx_tmp_a, mtx_tx_inv);
/* Calculate the axis vector. */
@@ -814,7 +814,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
/* add the new edge */
med_new->v1 = varray_stride + j;
med_new->v2 = med_new->v1 - totvert;
- med_new->flag = ME_EDGEDRAW | ME_EDGERENDER;
+ med_new->flag = ME_EDGEDRAW;
if (!BLI_BITMAP_TEST(vert_tag, j)) {
med_new->flag |= ME_LOOSEEDGE;
}
@@ -835,7 +835,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
for (i = 0; i < totvert; i++) {
med_new->v1 = i;
med_new->v2 = varray_stride + i;
- med_new->flag = ME_EDGEDRAW | ME_EDGERENDER;
+ med_new->flag = ME_EDGEDRAW;
if (!BLI_BITMAP_TEST(vert_tag, i)) {
med_new->flag |= ME_LOOSEEDGE;
}
diff --git a/source/blender/modifiers/intern/MOD_solidify_extrude.c b/source/blender/modifiers/intern/MOD_solidify_extrude.c
index a662d729f52..08e9569bd95 100644
--- a/source/blender/modifiers/intern/MOD_solidify_extrude.c
+++ b/source/blender/modifiers/intern/MOD_solidify_extrude.c
@@ -1045,7 +1045,7 @@ Mesh *MOD_solidify_extrude_modifyMesh(ModifierData *md, const ModifierEvalContex
for (i = 0; i < rimVerts; i++, ed++) {
ed->v1 = new_vert_arr[i];
ed->v2 = (do_shell ? new_vert_arr[i] : i) + verts_num;
- ed->flag |= ME_EDGEDRAW | ME_EDGERENDER;
+ ed->flag |= ME_EDGEDRAW;
if (orig_ed) {
*orig_ed = ORIGINDEX_NONE;
diff --git a/source/blender/modifiers/intern/MOD_solidify_nonmanifold.c b/source/blender/modifiers/intern/MOD_solidify_nonmanifold.c
index 5948fefa8b3..9d0b5c30b5e 100644
--- a/source/blender/modifiers/intern/MOD_solidify_nonmanifold.c
+++ b/source/blender/modifiers/intern/MOD_solidify_nonmanifold.c
@@ -2042,7 +2042,7 @@ Mesh *MOD_solidify_nonmanifold_modifyMesh(ModifierData *md,
BLI_assert(v2 != MOD_SOLIDIFY_EMPTY_TAG);
medge[insert].v1 = v1;
medge[insert].v2 = v2;
- medge[insert].flag = orig_medge[(*l)->old_edge].flag | ME_EDGEDRAW | ME_EDGERENDER;
+ medge[insert].flag = orig_medge[(*l)->old_edge].flag | ME_EDGEDRAW;
if (result_edge_crease) {
result_edge_crease[insert] = orig_edge_crease ? orig_edge_crease[(*l)->old_edge] :
0.0f;
@@ -2206,8 +2206,7 @@ Mesh *MOD_solidify_nonmanifold_modifyMesh(ModifierData *md,
}
medge[edge_index].v1 = last_g->new_vert;
medge[edge_index].v2 = g->new_vert;
- medge[edge_index].flag = ME_EDGEDRAW | ME_EDGERENDER |
- ((last_flag | flag) & (ME_SEAM | ME_SHARP));
+ medge[edge_index].flag = ME_EDGEDRAW | ((last_flag | flag) & (ME_SEAM | ME_SHARP));
if (result_edge_crease) {
result_edge_crease[edge_index] = max_ff(mv_crease,
min_ff(last_max_crease, max_crease));
@@ -2240,7 +2239,7 @@ Mesh *MOD_solidify_nonmanifold_modifyMesh(ModifierData *md,
last_g->open_face_edge = edge_index;
medge[edge_index].v1 = last_g->new_vert;
medge[edge_index].v2 = first_g->new_vert;
- medge[edge_index].flag = ME_EDGEDRAW | ME_EDGERENDER |
+ medge[edge_index].flag = ME_EDGEDRAW |
((last_flag | first_flag) & (ME_SEAM | ME_SHARP));
if (result_edge_crease) {
result_edge_crease[edge_index] = max_ff(mv_crease,
diff --git a/source/blender/modifiers/intern/MOD_surface.c b/source/blender/modifiers/intern/MOD_surface.c
index c5e117635b5..a34d66f394b 100644
--- a/source/blender/modifiers/intern/MOD_surface.c
+++ b/source/blender/modifiers/intern/MOD_surface.c
@@ -154,7 +154,7 @@ static void deformVerts(ModifierData *md,
MVert *verts = BKE_mesh_verts_for_write(surmd->mesh);
for (i = 0, x = surmd->x, v = surmd->v; i < mesh_verts_num; i++, x++, v++) {
float *vec = verts[i].co;
- mul_m4_v3(ctx->object->obmat, vec);
+ mul_m4_v3(ctx->object->object_to_world, vec);
if (init) {
v->co[0] = v->co[1] = v->co[2] = 0.0f;
diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.c b/source/blender/modifiers/intern/MOD_surfacedeform.c
index 53bfdc35b31..6a9321a78a2 100644
--- a/source/blender/modifiers/intern/MOD_surfacedeform.c
+++ b/source/blender/modifiers/intern/MOD_surfacedeform.c
@@ -1466,8 +1466,8 @@ static void surfacedeformModifier_do(ModifierData *md,
ob, md);
float tmp_mat[4][4];
- invert_m4_m4(tmp_mat, ob->obmat);
- mul_m4_m4m4(smd_orig->mat, tmp_mat, ob_target->obmat);
+ invert_m4_m4(tmp_mat, ob->object_to_world);
+ mul_m4_m4m4(smd_orig->mat, tmp_mat, ob_target->object_to_world);
/* Avoid converting edit-mesh data, binding is an exception. */
BKE_mesh_wrapper_ensure_mdata(target);
diff --git a/source/blender/modifiers/intern/MOD_triangulate.c b/source/blender/modifiers/intern/MOD_triangulate.c
index e8280bc9c97..5bae6090758 100644
--- a/source/blender/modifiers/intern/MOD_triangulate.c
+++ b/source/blender/modifiers/intern/MOD_triangulate.c
@@ -86,7 +86,7 @@ static Mesh *triangulate_mesh(Mesh *mesh,
/* force drawing of all edges (seems to be omitted in CDDM_from_bmesh) */
for (i = 0; i < edges_num; i++, me++) {
- me->flag |= ME_EDGEDRAW | ME_EDGERENDER;
+ me->flag |= ME_EDGEDRAW;
}
return result;
diff --git a/source/blender/modifiers/intern/MOD_ui_common.c b/source/blender/modifiers/intern/MOD_ui_common.c
index c027cae8cdb..e882435077a 100644
--- a/source/blender/modifiers/intern/MOD_ui_common.c
+++ b/source/blender/modifiers/intern/MOD_ui_common.c
@@ -326,8 +326,33 @@ static void modifier_panel_header(const bContext *C, Panel *panel)
}
} /* Tessellation point for curve-typed objects. */
else if (ELEM(ob->type, OB_CURVES_LEGACY, OB_SURF, OB_FONT)) {
+ /* Smooth modifier can work with tessellated curves only (works on mesh edges explicitly). */
+ if (md->type == eModifierType_Smooth) {
+ /* Add button (appearing to be OFF) and add tip why this can't be changed. */
+ sub = uiLayoutRow(row, true);
+ uiBlock *block = uiLayoutGetBlock(sub);
+ static int apply_on_spline_always_off_hack = 0;
+ uiBut *but = uiDefIconButBitI(block,
+ UI_BTYPE_TOGGLE,
+ eModifierMode_ApplyOnSpline,
+ 0,
+ ICON_SURFACE_DATA,
+ 0,
+ 0,
+ UI_UNIT_X - 2,
+ UI_UNIT_Y,
+ &apply_on_spline_always_off_hack,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ TIP_("Apply on Spline"));
+ UI_but_disable(
+ but, TIP_("This modifier can only deform filled curve/surface, not the control points"));
+ buttons_number++;
+ }
/* Some modifiers can work with pre-tessellated curves only. */
- if (ELEM(md->type, eModifierType_Hook, eModifierType_Softbody, eModifierType_MeshDeform)) {
+ else if (ELEM(md->type, eModifierType_Hook, eModifierType_Softbody, eModifierType_MeshDeform)) {
/* Add button (appearing to be ON) and add tip why this can't be changed. */
sub = uiLayoutRow(row, true);
uiBlock *block = uiLayoutGetBlock(sub);
diff --git a/source/blender/modifiers/intern/MOD_util.cc b/source/blender/modifiers/intern/MOD_util.cc
index 589a3d28ad9..a94fc6732a0 100644
--- a/source/blender/modifiers/intern/MOD_util.cc
+++ b/source/blender/modifiers/intern/MOD_util.cc
@@ -75,15 +75,15 @@ void MOD_get_texture_coords(MappingInfoModifierData *dmd,
bPoseChannel *pchan = BKE_pose_channel_find_name(map_object->pose, dmd->map_bone);
if (pchan) {
float mat_bone_world[4][4];
- mul_m4_m4m4(mat_bone_world, map_object->obmat, pchan->pose_mat);
+ mul_m4_m4m4(mat_bone_world, map_object->object_to_world, pchan->pose_mat);
invert_m4_m4(mapref_imat, mat_bone_world);
}
else {
- invert_m4_m4(mapref_imat, map_object->obmat);
+ invert_m4_m4(mapref_imat, map_object->object_to_world);
}
}
else {
- invert_m4_m4(mapref_imat, map_object->obmat);
+ invert_m4_m4(mapref_imat, map_object->object_to_world);
}
}
else { /* if there is no map object, default to local */
@@ -138,10 +138,10 @@ void MOD_get_texture_coords(MappingInfoModifierData *dmd,
copy_v3_v3(*r_texco, cos != nullptr ? *cos : mv->co);
break;
case MOD_DISP_MAP_GLOBAL:
- mul_v3_m4v3(*r_texco, ob->obmat, cos != nullptr ? *cos : mv->co);
+ mul_v3_m4v3(*r_texco, ob->object_to_world, cos != nullptr ? *cos : mv->co);
break;
case MOD_DISP_MAP_OBJECT:
- mul_v3_m4v3(*r_texco, ob->obmat, cos != nullptr ? *cos : mv->co);
+ mul_v3_m4v3(*r_texco, ob->object_to_world, cos != nullptr ? *cos : mv->co);
mul_m4_v3(mapref_imat, *r_texco);
break;
}
diff --git a/source/blender/modifiers/intern/MOD_uvproject.cc b/source/blender/modifiers/intern/MOD_uvproject.cc
index c07b2059b5b..895572d9477 100644
--- a/source/blender/modifiers/intern/MOD_uvproject.cc
+++ b/source/blender/modifiers/intern/MOD_uvproject.cc
@@ -132,7 +132,7 @@ static Mesh *uvprojectModifier_do(UVProjectModifierData *umd,
float offsetmat[4][4];
Camera *cam = nullptr;
/* calculate projection matrix */
- invert_m4_m4(projectors[i].projmat, projectors[i].ob->obmat);
+ invert_m4_m4(projectors[i].projmat, projectors[i].ob->object_to_world);
projectors[i].uci = nullptr;
@@ -178,7 +178,7 @@ static Mesh *uvprojectModifier_do(UVProjectModifierData *umd,
projectors[i].normal[0] = 0;
projectors[i].normal[1] = 0;
projectors[i].normal[2] = 1;
- mul_mat3_m4_v3(projectors[i].ob->obmat, projectors[i].normal);
+ mul_mat3_m4_v3(projectors[i].ob->object_to_world, projectors[i].normal);
}
polys_num = mesh->totpoly;
@@ -192,7 +192,7 @@ static Mesh *uvprojectModifier_do(UVProjectModifierData *umd,
/* Convert coords to world-space. */
for (i = 0, co = coords; i < verts_num; i++, co++) {
- mul_m4_v3(ob->obmat, *co);
+ mul_m4_v3(ob->object_to_world, *co);
}
/* if only one projector, project coords to UVs */
diff --git a/source/blender/modifiers/intern/MOD_uvwarp.cc b/source/blender/modifiers/intern/MOD_uvwarp.cc
index 4ec273bcbc6..a96b28b4e2e 100644
--- a/source/blender/modifiers/intern/MOD_uvwarp.cc
+++ b/source/blender/modifiers/intern/MOD_uvwarp.cc
@@ -72,10 +72,10 @@ static void matrix_from_obj_pchan(float mat[4][4], Object *ob, const char *bonen
{
bPoseChannel *pchan = BKE_pose_channel_find_name(ob->pose, bonename);
if (pchan) {
- mul_m4_m4m4(mat, ob->obmat, pchan->pose_mat);
+ mul_m4_m4m4(mat, ob->object_to_world, pchan->pose_mat);
}
else {
- copy_m4_m4(mat, ob->obmat);
+ copy_m4_m4(mat, ob->object_to_world);
}
}
diff --git a/source/blender/modifiers/intern/MOD_volume_displace.cc b/source/blender/modifiers/intern/MOD_volume_displace.cc
index e66793d7cce..2d6f8c100e7 100644
--- a/source/blender/modifiers/intern/MOD_volume_displace.cc
+++ b/source/blender/modifiers/intern/MOD_volume_displace.cc
@@ -254,15 +254,16 @@ struct DisplaceGridOp {
return index_to_object;
}
case MOD_VOLUME_DISPLACE_MAP_GLOBAL: {
- const openvdb::Mat4s object_to_world = matrix_to_openvdb(ctx.object->obmat);
+ const openvdb::Mat4s object_to_world = matrix_to_openvdb(ctx.object->object_to_world);
return index_to_object * object_to_world;
}
case MOD_VOLUME_DISPLACE_MAP_OBJECT: {
if (vdmd.texture_map_object == nullptr) {
return index_to_object;
}
- const openvdb::Mat4s object_to_world = matrix_to_openvdb(ctx.object->obmat);
- const openvdb::Mat4s world_to_texture = matrix_to_openvdb(vdmd.texture_map_object->imat);
+ const openvdb::Mat4s object_to_world = matrix_to_openvdb(ctx.object->object_to_world);
+ const openvdb::Mat4s world_to_texture = matrix_to_openvdb(
+ vdmd.texture_map_object->world_to_object);
return index_to_object * object_to_world * world_to_texture;
}
}
diff --git a/source/blender/modifiers/intern/MOD_volume_to_mesh.cc b/source/blender/modifiers/intern/MOD_volume_to_mesh.cc
index 35fd5a4af42..2a8883dc2eb 100644
--- a/source/blender/modifiers/intern/MOD_volume_to_mesh.cc
+++ b/source/blender/modifiers/intern/MOD_volume_to_mesh.cc
@@ -157,8 +157,8 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
volume_grid);
openvdb::math::Transform::Ptr transform = local_grid->transform().copy();
- transform->postMult(openvdb::Mat4d((float *)vmmd->object->obmat));
- openvdb::Mat4d imat = openvdb::Mat4d((float *)ctx->object->imat);
+ transform->postMult(openvdb::Mat4d((float *)vmmd->object->object_to_world));
+ openvdb::Mat4d imat = openvdb::Mat4d((float *)ctx->object->world_to_object);
/* `imat` had floating point issues and wasn't affine. */
imat.setCol(3, openvdb::Vec4d(0, 0, 0, 1));
transform->postMult(imat);
diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c
index 3fafbd97fee..791eed28a71 100644
--- a/source/blender/modifiers/intern/MOD_warp.c
+++ b/source/blender/modifiers/intern/MOD_warp.c
@@ -93,11 +93,11 @@ static void matrix_from_obj_pchan(float mat[4][4],
bPoseChannel *pchan = BKE_pose_channel_find_name(ob->pose, bonename);
if (pchan) {
float mat_bone_world[4][4];
- mul_m4_m4m4(mat_bone_world, ob->obmat, pchan->pose_mat);
+ mul_m4_m4m4(mat_bone_world, ob->object_to_world, pchan->pose_mat);
mul_m4_m4m4(mat, obinv, mat_bone_world);
}
else {
- mul_m4_m4m4(mat, obinv, ob->obmat);
+ mul_m4_m4m4(mat, obinv, ob->object_to_world);
}
}
@@ -215,7 +215,7 @@ static void warpModifier_do(WarpModifierData *wmd,
BKE_curvemapping_init(wmd->curfalloff);
}
- invert_m4_m4(obinv, ob->obmat);
+ invert_m4_m4(obinv, ob->object_to_world);
/* Checks that the objects/bones are available. */
matrix_from_obj_pchan(mat_from, obinv, wmd->object_from, wmd->bone_from);
diff --git a/source/blender/modifiers/intern/MOD_wave.cc b/source/blender/modifiers/intern/MOD_wave.cc
index 647e0324707..dce006bda92 100644
--- a/source/blender/modifiers/intern/MOD_wave.cc
+++ b/source/blender/modifiers/intern/MOD_wave.cc
@@ -152,8 +152,8 @@ static void waveModifier_do(WaveModifierData *md,
if (wmd->objectcenter != nullptr) {
float mat[4][4];
/* get the control object's location in local coordinates */
- invert_m4_m4(ob->imat, ob->obmat);
- mul_m4_m4m4(mat, ob->imat, wmd->objectcenter->obmat);
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
+ mul_m4_m4m4(mat, ob->world_to_object, wmd->objectcenter->object_to_world);
wmd->startx = mat[3][0];
wmd->starty = mat[3][1];
diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.cc b/source/blender/modifiers/intern/MOD_weightvgproximity.cc
index 93052f4215d..e4e03a2cbc9 100644
--- a/source/blender/modifiers/intern/MOD_weightvgproximity.cc
+++ b/source/blender/modifiers/intern/MOD_weightvgproximity.cc
@@ -223,9 +223,9 @@ static void get_vert2ob_distance(
while (i-- > 0) {
/* Get world-coordinates of the vertex (constraints and anim included). */
- mul_v3_m4v3(v_wco, ob->obmat, v_cos[i]);
+ mul_v3_m4v3(v_wco, ob->object_to_world, v_cos[i]);
/* Return distance between both coordinates. */
- dist[i] = len_v3v3(v_wco, obr->obmat[3]);
+ dist[i] = len_v3v3(v_wco, obr->object_to_world[3]);
}
}
@@ -235,7 +235,7 @@ static void get_vert2ob_distance(
*/
static float get_ob2ob_distance(const Object *ob, const Object *obr)
{
- return len_v3v3(ob->obmat[3], obr->obmat[3]);
+ return len_v3v3(ob->object_to_world[3], obr->object_to_world[3]);
}
/**
diff --git a/source/blender/nodes/composite/CMakeLists.txt b/source/blender/nodes/composite/CMakeLists.txt
index 4255a2dde21..8bcc2a393d3 100644
--- a/source/blender/nodes/composite/CMakeLists.txt
+++ b/source/blender/nodes/composite/CMakeLists.txt
@@ -19,6 +19,7 @@ set(INC
../../windowmanager
../../compositor/realtime_compositor
../../compositor/realtime_compositor/algorithms
+ ../../compositor/realtime_compositor/cached_resources
../../../../intern/guardedalloc
# dna_type_offsets.h
diff --git a/source/blender/nodes/composite/nodes/node_composite_alpha_over.cc b/source/blender/nodes/composite/nodes/node_composite_alpha_over.cc
index e2f4e80270e..dffdc4a9408 100644
--- a/source/blender/nodes/composite/nodes/node_composite_alpha_over.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_alpha_over.cc
@@ -108,7 +108,7 @@ void register_node_type_cmp_alphaover()
cmp_node_type_base(&ntype, CMP_NODE_ALPHAOVER, "Alpha Over", NODE_CLASS_OP_COLOR);
ntype.declare = file_ns::cmp_node_alphaover_declare;
ntype.draw_buttons = file_ns::node_composit_buts_alphaover;
- node_type_init(&ntype, file_ns::node_alphaover_init);
+ ntype.initfunc = file_ns::node_alphaover_init;
node_type_storage(
&ntype, "NodeTwoFloats", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
diff --git a/source/blender/nodes/composite/nodes/node_composite_antialiasing.cc b/source/blender/nodes/composite/nodes/node_composite_antialiasing.cc
index 25fefd33199..8c77df08211 100644
--- a/source/blender/nodes/composite/nodes/node_composite_antialiasing.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_antialiasing.cc
@@ -74,7 +74,7 @@ void register_node_type_cmp_antialiasing()
ntype.draw_buttons = file_ns::node_composit_buts_antialiasing;
ntype.flag |= NODE_PREVIEW;
node_type_size(&ntype, 170, 140, 200);
- node_type_init(&ntype, file_ns::node_composit_init_antialiasing);
+ ntype.initfunc = file_ns::node_composit_init_antialiasing;
node_type_storage(
&ntype, "NodeAntiAliasingData", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
diff --git a/source/blender/nodes/composite/nodes/node_composite_bilateralblur.cc b/source/blender/nodes/composite/nodes/node_composite_bilateralblur.cc
index af7581d845f..65990677ae3 100644
--- a/source/blender/nodes/composite/nodes/node_composite_bilateralblur.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_bilateralblur.cc
@@ -119,7 +119,7 @@ void register_node_type_cmp_bilateralblur()
cmp_node_type_base(&ntype, CMP_NODE_BILATERALBLUR, "Bilateral Blur", NODE_CLASS_OP_FILTER);
ntype.declare = file_ns::cmp_node_bilateralblur_declare;
ntype.draw_buttons = file_ns::node_composit_buts_bilateralblur;
- node_type_init(&ntype, file_ns::node_composit_init_bilateralblur);
+ ntype.initfunc = file_ns::node_composit_init_bilateralblur;
node_type_storage(
&ntype, "NodeBilateralBlurData", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
diff --git a/source/blender/nodes/composite/nodes/node_composite_blur.cc b/source/blender/nodes/composite/nodes/node_composite_blur.cc
index a9372bdcfb7..6eacc685c7e 100644
--- a/source/blender/nodes/composite/nodes/node_composite_blur.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_blur.cc
@@ -5,11 +5,7 @@
* \ingroup cmpnodes
*/
-#include <cstdint>
-
-#include "BLI_array.hh"
#include "BLI_assert.h"
-#include "BLI_index_range.hh"
#include "BLI_math_base.hh"
#include "BLI_math_vec_types.hh"
#include "BLI_math_vector.hh"
@@ -19,12 +15,13 @@
#include "UI_interface.h"
#include "UI_resources.h"
-#include "RE_pipeline.h"
-
+#include "GPU_shader.h"
#include "GPU_state.h"
#include "GPU_texture.h"
#include "COM_node_operation.hh"
+#include "COM_symmetric_blur_weights.hh"
+#include "COM_symmetric_separable_blur_weights.hh"
#include "COM_utilities.hh"
#include "node_composite_util.hh"
@@ -92,192 +89,7 @@ static void node_composit_buts_blur(uiLayout *layout, bContext * /*C*/, PointerR
using namespace blender::realtime_compositor;
-/* A helper class that computes and caches a 1D GPU texture containing the weights of the separable
- * filter of the given type and radius. The filter is assumed to be symmetric, because the filter
- * functions are all even functions. Consequently, only the positive half of the filter is computed
- * and the shader takes that into consideration. */
-class SymmetricSeparableBlurWeights {
- private:
- float radius_ = 1.0f;
- int type_ = R_FILTER_GAUSS;
- GPUTexture *texture_ = nullptr;
-
- public:
- ~SymmetricSeparableBlurWeights()
- {
- if (texture_) {
- GPU_texture_free(texture_);
- }
- }
-
- /* Check if a texture containing the weights was already computed for the given filter type and
- * radius. If such texture exists, do nothing, otherwise, free the already computed texture and
- * recompute it with the given filter type and radius. */
- void update(float radius, int type)
- {
- if (texture_ && type == type_ && radius == radius_) {
- return;
- }
-
- if (texture_) {
- GPU_texture_free(texture_);
- }
-
- /* The size of filter is double the radius plus 1, but since the filter is symmetric, we only
- * compute half of it and no doubling happens. We add 1 to make sure the filter size is always
- * odd and there is a center weight. */
- const int size = math::ceil(radius) + 1;
- Array<float> weights(size);
-
- float sum = 0.0f;
-
- /* First, compute the center weight. */
- const float center_weight = RE_filter_value(type, 0.0f);
- weights[0] = center_weight;
- sum += center_weight;
-
- /* Second, compute the other weights in the positive direction, making sure to add double the
- * weight to the sum of weights because the filter is symmetric and we only loop over half of
- * it. Skip the center weight already computed by dropping the front index. */
- const float scale = radius > 0.0f ? 1.0f / radius : 0.0f;
- for (const int i : weights.index_range().drop_front(1)) {
- const float weight = RE_filter_value(type, i * scale);
- weights[i] = weight;
- sum += weight * 2.0f;
- }
-
- /* Finally, normalize the weights. */
- for (const int i : weights.index_range()) {
- weights[i] /= sum;
- }
-
- texture_ = GPU_texture_create_1d("Weights", size, 1, GPU_R16F, weights.data());
-
- type_ = type;
- radius_ = radius;
- }
-
- void bind_as_texture(GPUShader *shader, const char *texture_name)
- {
- const int texture_image_unit = GPU_shader_get_texture_binding(shader, texture_name);
- GPU_texture_bind(texture_, texture_image_unit);
- }
-
- void unbind_as_texture()
- {
- GPU_texture_unbind(texture_);
- }
-};
-
-/* A helper class that computes and caches a 2D GPU texture containing the weights of the filter of
- * the given type and radius. The filter is assumed to be symmetric, because the filter functions
- * are evaluated on the normalized distance to the center. Consequently, only the upper right
- * quadrant are computed and the shader takes that into consideration. */
-class SymmetricBlurWeights {
- private:
- int type_ = R_FILTER_GAUSS;
- float2 radius_ = float2(1.0f);
- GPUTexture *texture_ = nullptr;
-
- public:
- ~SymmetricBlurWeights()
- {
- if (texture_) {
- GPU_texture_free(texture_);
- }
- }
-
- /* Check if a texture containing the weights was already computed for the given filter type and
- * radius. If such texture exists, do nothing, otherwise, free the already computed texture and
- * recompute it with the given filter type and radius. */
- void update(float2 radius, int type)
- {
- if (texture_ && type == type_ && radius == radius_) {
- return;
- }
-
- if (texture_) {
- GPU_texture_free(texture_);
- }
-
- /* The full size of filter is double the radius plus 1, but since the filter is symmetric, we
- * only compute a single quadrant of it and so no doubling happens. We add 1 to make sure the
- * filter size is always odd and there is a center weight. */
- const float2 scale = math::safe_divide(float2(1.0f), radius);
- const int2 size = int2(math::ceil(radius)) + int2(1);
- Array<float> weights(size.x * size.y);
-
- float sum = 0.0f;
-
- /* First, compute the center weight. */
- const float center_weight = RE_filter_value(type, 0.0f);
- weights[0] = center_weight;
- sum += center_weight;
-
- /* Then, compute the weights along the positive x axis, making sure to add double the weight to
- * the sum of weights because the filter is symmetric and we only loop over the positive half
- * of the x axis. Skip the center weight already computed by dropping the front index. */
- for (const int x : IndexRange(size.x).drop_front(1)) {
- const float weight = RE_filter_value(type, x * scale.x);
- weights[x] = weight;
- sum += weight * 2.0f;
- }
-
- /* Then, compute the weights along the positive y axis, making sure to add double the weight to
- * the sum of weights because the filter is symmetric and we only loop over the positive half
- * of the y axis. Skip the center weight already computed by dropping the front index. */
- for (const int y : IndexRange(size.y).drop_front(1)) {
- const float weight = RE_filter_value(type, y * scale.y);
- weights[size.x * y] = weight;
- sum += weight * 2.0f;
- }
-
- /* Then, compute the other weights in the upper right quadrant, making sure to add quadruple
- * the weight to the sum of weights because the filter is symmetric and we only loop over one
- * quadrant of it. Skip the weights along the y and x axis already computed by dropping the
- * front index. */
- for (const int y : IndexRange(size.y).drop_front(1)) {
- for (const int x : IndexRange(size.x).drop_front(1)) {
- const float weight = RE_filter_value(type, math::length(float2(x, y) * scale));
- weights[size.x * y + x] = weight;
- sum += weight * 4.0f;
- }
- }
-
- /* Finally, normalize the weights. */
- for (const int y : IndexRange(size.y)) {
- for (const int x : IndexRange(size.x)) {
- weights[size.x * y + x] /= sum;
- }
- }
-
- texture_ = GPU_texture_create_2d("Weights", size.x, size.y, 1, GPU_R16F, weights.data());
-
- type_ = type;
- radius_ = radius;
- }
-
- void bind_as_texture(GPUShader *shader, const char *texture_name)
- {
- const int texture_image_unit = GPU_shader_get_texture_binding(shader, texture_name);
- GPU_texture_bind(texture_, texture_image_unit);
- }
-
- void unbind_as_texture()
- {
- GPU_texture_unbind(texture_);
- }
-};
-
class BlurOperation : public NodeOperation {
- private:
- /* Cached symmetric blur weights. */
- SymmetricBlurWeights blur_weights_;
- /* Cached symmetric blur weights for the separable horizontal pass. */
- SymmetricSeparableBlurWeights blur_horizontal_weights_;
- /* Cached symmetric blur weights for the separable vertical pass. */
- SymmetricSeparableBlurWeights blur_vertical_weights_;
-
public:
using NodeOperation::NodeOperation;
@@ -308,13 +120,16 @@ class BlurOperation : public NodeOperation {
const Result &input_image = get_input("Image");
input_image.bind_as_texture(shader, "input_tx");
- blur_weights_.update(compute_blur_radius(), node_storage(bnode()).filtertype);
- blur_weights_.bind_as_texture(shader, "weights_tx");
+ const float2 blur_radius = compute_blur_radius();
+
+ const SymmetricBlurWeights &weights = context().cache_manager().get_symmetric_blur_weights(
+ node_storage(bnode()).filtertype, blur_radius);
+ weights.bind_as_texture(shader, "weights_tx");
Domain domain = compute_domain();
if (get_extend_bounds()) {
/* Add a radius amount of pixels in both sides of the image, hence the multiply by 2. */
- domain.size += int2(math::ceil(compute_blur_radius())) * 2;
+ domain.size += int2(math::ceil(blur_radius)) * 2;
}
Result &output_image = get_result("Image");
@@ -326,7 +141,7 @@ class BlurOperation : public NodeOperation {
GPU_shader_unbind();
output_image.unbind_as_image();
input_image.unbind_as_texture();
- blur_weights_.unbind_as_texture();
+ weights.unbind_as_texture();
}
GPUTexture *execute_separable_blur_horizontal_pass()
@@ -341,12 +156,16 @@ class BlurOperation : public NodeOperation {
const Result &input_image = get_input("Image");
input_image.bind_as_texture(shader, "input_tx");
- blur_horizontal_weights_.update(compute_blur_radius().x, node_storage(bnode()).filtertype);
- blur_horizontal_weights_.bind_as_texture(shader, "weights_tx");
+ const float2 blur_radius = compute_blur_radius();
+
+ const SymmetricSeparableBlurWeights &weights =
+ context().cache_manager().get_symmetric_separable_blur_weights(
+ node_storage(bnode()).filtertype, blur_radius.x);
+ weights.bind_as_texture(shader, "weights_tx");
Domain domain = compute_domain();
if (get_extend_bounds()) {
- domain.size.x += int(math::ceil(compute_blur_radius().x)) * 2;
+ domain.size.x += int(math::ceil(blur_radius.x)) * 2;
}
/* We allocate an output image of a transposed size, that is, with a height equivalent to the
@@ -367,7 +186,7 @@ class BlurOperation : public NodeOperation {
GPU_shader_unbind();
input_image.unbind_as_texture();
- blur_horizontal_weights_.unbind_as_texture();
+ weights.unbind_as_texture();
GPU_texture_image_unbind(horizontal_pass_result);
return horizontal_pass_result;
@@ -386,8 +205,12 @@ class BlurOperation : public NodeOperation {
const int texture_image_unit = GPU_shader_get_texture_binding(shader, "input_tx");
GPU_texture_bind(horizontal_pass_result, texture_image_unit);
- blur_vertical_weights_.update(compute_blur_radius().y, node_storage(bnode()).filtertype);
- blur_vertical_weights_.bind_as_texture(shader, "weights_tx");
+ const float2 blur_radius = compute_blur_radius();
+
+ const SymmetricSeparableBlurWeights &weights =
+ context().cache_manager().get_symmetric_separable_blur_weights(
+ node_storage(bnode()).filtertype, blur_radius.y);
+ weights.bind_as_texture(shader, "weights_tx");
Domain domain = compute_domain();
if (get_extend_bounds()) {
@@ -405,7 +228,7 @@ class BlurOperation : public NodeOperation {
GPU_shader_unbind();
output_image.unbind_as_image();
- blur_vertical_weights_.unbind_as_texture();
+ weights.unbind_as_texture();
GPU_texture_unbind(horizontal_pass_result);
}
@@ -501,7 +324,7 @@ void register_node_type_cmp_blur()
ntype.declare = file_ns::cmp_node_blur_declare;
ntype.draw_buttons = file_ns::node_composit_buts_blur;
ntype.flag |= NODE_PREVIEW;
- node_type_init(&ntype, file_ns::node_composit_init_blur);
+ ntype.initfunc = file_ns::node_composit_init_blur;
node_type_storage(
&ntype, "NodeBlurData", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
diff --git a/source/blender/nodes/composite/nodes/node_composite_bokehblur.cc b/source/blender/nodes/composite/nodes/node_composite_bokehblur.cc
index a581d87a463..f09bf1f5afd 100644
--- a/source/blender/nodes/composite/nodes/node_composite_bokehblur.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_bokehblur.cc
@@ -215,7 +215,7 @@ void register_node_type_cmp_bokehblur()
cmp_node_type_base(&ntype, CMP_NODE_BOKEHBLUR, "Bokeh Blur", NODE_CLASS_OP_FILTER);
ntype.declare = file_ns::cmp_node_bokehblur_declare;
ntype.draw_buttons = file_ns::node_composit_buts_bokehblur;
- node_type_init(&ntype, file_ns::node_composit_init_bokehblur);
+ ntype.initfunc = file_ns::node_composit_init_bokehblur;
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/composite/nodes/node_composite_bokehimage.cc b/source/blender/nodes/composite/nodes/node_composite_bokehimage.cc
index eb35b933d1b..8b817d3a677 100644
--- a/source/blender/nodes/composite/nodes/node_composite_bokehimage.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_bokehimage.cc
@@ -122,7 +122,7 @@ void register_node_type_cmp_bokehimage()
ntype.declare = file_ns::cmp_node_bokehimage_declare;
ntype.draw_buttons = file_ns::node_composit_buts_bokehimage;
ntype.flag |= NODE_PREVIEW;
- node_type_init(&ntype, file_ns::node_composit_init_bokehimage);
+ ntype.initfunc = file_ns::node_composit_init_bokehimage;
node_type_storage(
&ntype, "NodeBokehImage", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
diff --git a/source/blender/nodes/composite/nodes/node_composite_boxmask.cc b/source/blender/nodes/composite/nodes/node_composite_boxmask.cc
index 668dc9d92de..17b5d64de91 100644
--- a/source/blender/nodes/composite/nodes/node_composite_boxmask.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_boxmask.cc
@@ -157,7 +157,7 @@ void register_node_type_cmp_boxmask()
cmp_node_type_base(&ntype, CMP_NODE_MASK_BOX, "Box Mask", NODE_CLASS_MATTE);
ntype.declare = file_ns::cmp_node_boxmask_declare;
ntype.draw_buttons = file_ns::node_composit_buts_boxmask;
- node_type_init(&ntype, file_ns::node_composit_init_boxmask);
+ ntype.initfunc = file_ns::node_composit_init_boxmask;
node_type_storage(&ntype, "NodeBoxMask", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
diff --git a/source/blender/nodes/composite/nodes/node_composite_brightness.cc b/source/blender/nodes/composite/nodes/node_composite_brightness.cc
index 6b9fef75524..08794914e91 100644
--- a/source/blender/nodes/composite/nodes/node_composite_brightness.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_brightness.cc
@@ -81,7 +81,7 @@ void register_node_type_cmp_brightcontrast()
cmp_node_type_base(&ntype, CMP_NODE_BRIGHTCONTRAST, "Bright/Contrast", NODE_CLASS_OP_COLOR);
ntype.declare = file_ns::cmp_node_brightcontrast_declare;
ntype.draw_buttons = file_ns::node_composit_buts_brightcontrast;
- node_type_init(&ntype, file_ns::node_composit_init_brightcontrast);
+ ntype.initfunc = file_ns::node_composit_init_brightcontrast;
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/composite/nodes/node_composite_channel_matte.cc b/source/blender/nodes/composite/nodes/node_composite_channel_matte.cc
index 2fd2d6c8f71..be02f1ecd00 100644
--- a/source/blender/nodes/composite/nodes/node_composite_channel_matte.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_channel_matte.cc
@@ -182,7 +182,7 @@ void register_node_type_cmp_channel_matte()
ntype.declare = file_ns::cmp_node_channel_matte_declare;
ntype.draw_buttons = file_ns::node_composit_buts_channel_matte;
ntype.flag |= NODE_PREVIEW;
- node_type_init(&ntype, file_ns::node_composit_init_channel_matte);
+ ntype.initfunc = file_ns::node_composit_init_channel_matte;
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
diff --git a/source/blender/nodes/composite/nodes/node_composite_chroma_matte.cc b/source/blender/nodes/composite/nodes/node_composite_chroma_matte.cc
index e2ef96ea95e..4e035fcf5e0 100644
--- a/source/blender/nodes/composite/nodes/node_composite_chroma_matte.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_chroma_matte.cc
@@ -121,7 +121,7 @@ void register_node_type_cmp_chroma_matte()
ntype.declare = file_ns::cmp_node_chroma_matte_declare;
ntype.draw_buttons = file_ns::node_composit_buts_chroma_matte;
ntype.flag |= NODE_PREVIEW;
- node_type_init(&ntype, file_ns::node_composit_init_chroma_matte);
+ ntype.initfunc = file_ns::node_composit_init_chroma_matte;
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
diff --git a/source/blender/nodes/composite/nodes/node_composite_color_matte.cc b/source/blender/nodes/composite/nodes/node_composite_color_matte.cc
index 2a20a4d995f..9233f61205d 100644
--- a/source/blender/nodes/composite/nodes/node_composite_color_matte.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_color_matte.cc
@@ -119,7 +119,7 @@ void register_node_type_cmp_color_matte()
ntype.declare = file_ns::cmp_node_color_matte_declare;
ntype.draw_buttons = file_ns::node_composit_buts_color_matte;
ntype.flag |= NODE_PREVIEW;
- node_type_init(&ntype, file_ns::node_composit_init_color_matte);
+ ntype.initfunc = file_ns::node_composit_init_color_matte;
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
diff --git a/source/blender/nodes/composite/nodes/node_composite_color_spill.cc b/source/blender/nodes/composite/nodes/node_composite_color_spill.cc
index ba829da83ed..cd129d53d6b 100644
--- a/source/blender/nodes/composite/nodes/node_composite_color_spill.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_color_spill.cc
@@ -196,7 +196,7 @@ void register_node_type_cmp_color_spill()
cmp_node_type_base(&ntype, CMP_NODE_COLOR_SPILL, "Color Spill", NODE_CLASS_MATTE);
ntype.declare = file_ns::cmp_node_color_spill_declare;
ntype.draw_buttons = file_ns::node_composit_buts_color_spill;
- node_type_init(&ntype, file_ns::node_composit_init_color_spill);
+ ntype.initfunc = file_ns::node_composit_init_color_spill;
node_type_storage(
&ntype, "NodeColorspill", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
diff --git a/source/blender/nodes/composite/nodes/node_composite_colorbalance.cc b/source/blender/nodes/composite/nodes/node_composite_colorbalance.cc
index 3300896bfdf..aade1b639ab 100644
--- a/source/blender/nodes/composite/nodes/node_composite_colorbalance.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_colorbalance.cc
@@ -210,7 +210,7 @@ void register_node_type_cmp_colorbalance()
ntype.draw_buttons = file_ns::node_composit_buts_colorbalance;
ntype.draw_buttons_ex = file_ns::node_composit_buts_colorbalance_ex;
node_type_size(&ntype, 400, 200, 400);
- node_type_init(&ntype, file_ns::node_composit_init_colorbalance);
+ ntype.initfunc = file_ns::node_composit_init_colorbalance;
node_type_storage(
&ntype, "NodeColorBalance", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
diff --git a/source/blender/nodes/composite/nodes/node_composite_colorcorrection.cc b/source/blender/nodes/composite/nodes/node_composite_colorcorrection.cc
index c6051a42df6..5ff190ac2e4 100644
--- a/source/blender/nodes/composite/nodes/node_composite_colorcorrection.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_colorcorrection.cc
@@ -353,7 +353,7 @@ void register_node_type_cmp_colorcorrection()
ntype.draw_buttons = file_ns::node_composit_buts_colorcorrection;
ntype.draw_buttons_ex = file_ns::node_composit_buts_colorcorrection_ex;
node_type_size(&ntype, 400, 200, 600);
- node_type_init(&ntype, file_ns::node_composit_init_colorcorrection);
+ ntype.initfunc = file_ns::node_composit_init_colorcorrection;
node_type_storage(
&ntype, "NodeColorCorrection", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
diff --git a/source/blender/nodes/composite/nodes/node_composite_common.cc b/source/blender/nodes/composite/nodes/node_composite_common.cc
index 8dd88d098c4..cd119684a79 100644
--- a/source/blender/nodes/composite/nodes/node_composite_common.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_common.cc
@@ -32,7 +32,7 @@ void register_node_type_cmp_group()
node_type_size(&ntype, 140, 60, 400);
ntype.labelfunc = node_group_label;
- node_type_group_update(&ntype, node_group_update);
+ ntype.group_update_func = node_group_update;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/composite/nodes/node_composite_convert_color_space.cc b/source/blender/nodes/composite/nodes/node_composite_convert_color_space.cc
index 3e521144b8d..24928acedd9 100644
--- a/source/blender/nodes/composite/nodes/node_composite_convert_color_space.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_convert_color_space.cc
@@ -78,7 +78,7 @@ void register_node_type_cmp_convert_color_space(void)
ntype.declare = file_ns::CMP_NODE_CONVERT_COLOR_SPACE_declare;
ntype.draw_buttons = file_ns::node_composit_buts_convert_colorspace;
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_init(&ntype, file_ns::node_composit_init_convert_colorspace);
+ ntype.initfunc = file_ns::node_composit_init_convert_colorspace;
node_type_storage(
&ntype, "NodeConvertColorSpace", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
diff --git a/source/blender/nodes/composite/nodes/node_composite_crop.cc b/source/blender/nodes/composite/nodes/node_composite_crop.cc
index 96a5443921b..4539d2af92d 100644
--- a/source/blender/nodes/composite/nodes/node_composite_crop.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_crop.cc
@@ -230,7 +230,7 @@ void register_node_type_cmp_crop()
cmp_node_type_base(&ntype, CMP_NODE_CROP, "Crop", NODE_CLASS_DISTORT);
ntype.declare = file_ns::cmp_node_crop_declare;
ntype.draw_buttons = file_ns::node_composit_buts_crop;
- node_type_init(&ntype, file_ns::node_composit_init_crop);
+ ntype.initfunc = file_ns::node_composit_init_crop;
node_type_storage(&ntype, "NodeTwoXYs", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
diff --git a/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc b/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc
index fa3b14ae015..e95a306976c 100644
--- a/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc
@@ -331,7 +331,7 @@ void register_node_type_cmp_cryptomatte()
node_type_socket_templates(
&ntype, file_ns::cmp_node_cryptomatte_in, file_ns::cmp_node_cryptomatte_out);
node_type_size(&ntype, 240, 100, 700);
- node_type_init(&ntype, file_ns::node_init_cryptomatte);
+ ntype.initfunc = file_ns::node_init_cryptomatte;
ntype.initfunc_api = file_ns::node_init_api_cryptomatte;
ntype.poll = file_ns::node_poll_cryptomatte;
node_type_storage(
@@ -418,7 +418,7 @@ void register_node_type_cmp_cryptomatte_legacy()
cmp_node_type_base(
&ntype, CMP_NODE_CRYPTOMATTE_LEGACY, "Cryptomatte (Legacy)", NODE_CLASS_MATTE);
node_type_socket_templates(&ntype, nullptr, file_ns::cmp_node_cryptomatte_out);
- node_type_init(&ntype, legacy_file_ns::node_init_cryptomatte_legacy);
+ ntype.initfunc = legacy_file_ns::node_init_cryptomatte_legacy;
node_type_storage(
&ntype, "NodeCryptomatte", file_ns::node_free_cryptomatte, file_ns::node_copy_cryptomatte);
ntype.gather_link_search_ops = nullptr;
diff --git a/source/blender/nodes/composite/nodes/node_composite_curves.cc b/source/blender/nodes/composite/nodes/node_composite_curves.cc
index b631f75e879..5799c6c1a09 100644
--- a/source/blender/nodes/composite/nodes/node_composite_curves.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_curves.cc
@@ -100,7 +100,7 @@ void register_node_type_cmp_curve_time()
cmp_node_type_base(&ntype, CMP_NODE_TIME, "Time Curve", NODE_CLASS_INPUT);
ntype.declare = file_ns::cmp_node_time_declare;
node_type_size(&ntype, 200, 140, 320);
- node_type_init(&ntype, file_ns::node_composit_init_curves_time);
+ ntype.initfunc = file_ns::node_composit_init_curves_time;
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
@@ -195,7 +195,7 @@ void register_node_type_cmp_curve_vec()
ntype.declare = file_ns::cmp_node_curve_vec_declare;
ntype.draw_buttons = file_ns::node_buts_curvevec;
node_type_size(&ntype, 200, 140, 320);
- node_type_init(&ntype, file_ns::node_composit_init_curve_vec);
+ ntype.initfunc = file_ns::node_composit_init_curve_vec;
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
@@ -332,7 +332,7 @@ void register_node_type_cmp_curve_rgb()
cmp_node_type_base(&ntype, CMP_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR);
ntype.declare = file_ns::cmp_node_rgbcurves_declare;
node_type_size(&ntype, 200, 140, 320);
- node_type_init(&ntype, file_ns::node_composit_init_curve_rgb);
+ ntype.initfunc = file_ns::node_composit_init_curve_rgb;
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
diff --git a/source/blender/nodes/composite/nodes/node_composite_defocus.cc b/source/blender/nodes/composite/nodes/node_composite_defocus.cc
index 197e02bebad..584cca87740 100644
--- a/source/blender/nodes/composite/nodes/node_composite_defocus.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_defocus.cc
@@ -111,7 +111,7 @@ void register_node_type_cmp_defocus()
cmp_node_type_base(&ntype, CMP_NODE_DEFOCUS, "Defocus", NODE_CLASS_OP_FILTER);
ntype.declare = file_ns::cmp_node_defocus_declare;
ntype.draw_buttons = file_ns::node_composit_buts_defocus;
- node_type_init(&ntype, file_ns::node_composit_init_defocus);
+ ntype.initfunc = file_ns::node_composit_init_defocus;
node_type_storage(&ntype, "NodeDefocus", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
diff --git a/source/blender/nodes/composite/nodes/node_composite_denoise.cc b/source/blender/nodes/composite/nodes/node_composite_denoise.cc
index 821b3c23a7b..9ae02dab505 100644
--- a/source/blender/nodes/composite/nodes/node_composite_denoise.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_denoise.cc
@@ -82,7 +82,7 @@ void register_node_type_cmp_denoise()
cmp_node_type_base(&ntype, CMP_NODE_DENOISE, "Denoise", NODE_CLASS_OP_FILTER);
ntype.declare = file_ns::cmp_node_denoise_declare;
ntype.draw_buttons = file_ns::node_composit_buts_denoise;
- node_type_init(&ntype, file_ns::node_composit_init_denonise);
+ ntype.initfunc = file_ns::node_composit_init_denonise;
node_type_storage(&ntype, "NodeDenoise", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
diff --git a/source/blender/nodes/composite/nodes/node_composite_despeckle.cc b/source/blender/nodes/composite/nodes/node_composite_despeckle.cc
index 1e15f9709fe..28ef022459b 100644
--- a/source/blender/nodes/composite/nodes/node_composite_despeckle.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_despeckle.cc
@@ -115,7 +115,7 @@ void register_node_type_cmp_despeckle()
ntype.declare = file_ns::cmp_node_despeckle_declare;
ntype.draw_buttons = file_ns::node_composit_buts_despeckle;
ntype.flag |= NODE_PREVIEW;
- node_type_init(&ntype, file_ns::node_composit_init_despeckle);
+ ntype.initfunc = file_ns::node_composit_init_despeckle;
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/composite/nodes/node_composite_diff_matte.cc b/source/blender/nodes/composite/nodes/node_composite_diff_matte.cc
index cde537f7d4c..c3fb0885c4d 100644
--- a/source/blender/nodes/composite/nodes/node_composite_diff_matte.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_diff_matte.cc
@@ -101,7 +101,7 @@ void register_node_type_cmp_diff_matte()
ntype.declare = file_ns::cmp_node_diff_matte_declare;
ntype.draw_buttons = file_ns::node_composit_buts_diff_matte;
ntype.flag |= NODE_PREVIEW;
- node_type_init(&ntype, file_ns::node_composit_init_diff_matte);
+ ntype.initfunc = file_ns::node_composit_init_diff_matte;
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
diff --git a/source/blender/nodes/composite/nodes/node_composite_dilate.cc b/source/blender/nodes/composite/nodes/node_composite_dilate.cc
index d659c46721d..cc4e09d4d0d 100644
--- a/source/blender/nodes/composite/nodes/node_composite_dilate.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_dilate.cc
@@ -5,25 +5,20 @@
* \ingroup cmpnodes
*/
-#include <cmath>
-
-#include "BLI_array.hh"
#include "BLI_assert.h"
#include "BLI_math_base.hh"
-
-#include "DNA_scene_types.h"
+#include "BLI_math_vec_types.hh"
#include "RNA_access.h"
#include "UI_interface.h"
#include "UI_resources.h"
-#include "RE_pipeline.h"
-
#include "GPU_shader.h"
#include "GPU_state.h"
#include "GPU_texture.h"
+#include "COM_morphological_distance_feather_weights.hh"
#include "COM_node_operation.hh"
#include "COM_utilities.hh"
@@ -64,161 +59,7 @@ static void node_composit_buts_dilateerode(uiLayout *layout, bContext * /*C*/, P
using namespace blender::realtime_compositor;
-/* Computes a falloff that is equal to 1 at an input of zero and decrease to zero at an input of 1,
- * with the rate of decrease depending on the falloff type. */
-static float compute_distance_falloff(float x, int falloff_type)
-{
- x = 1.0f - x;
-
- switch (falloff_type) {
- case PROP_SMOOTH:
- return 3.0f * x * x - 2.0f * x * x * x;
- case PROP_SPHERE:
- return std::sqrt(2.0f * x - x * x);
- case PROP_ROOT:
- return std::sqrt(x);
- case PROP_SHARP:
- return x * x;
- case PROP_INVSQUARE:
- return x * (2.0f - x);
- case PROP_LIN:
- return x;
- default:
- BLI_assert_unreachable();
- return x;
- }
-}
-
-/* A helper class that computes and caches 1D GPU textures containing the weights of the separable
- * Gaussian filter of the given radius as well as an inverse distance falloff of the given type and
- * radius. The weights and falloffs are symmetric, because the Gaussian and falloff functions are
- * all even functions. Consequently, only the positive half of the filter is computed and the
- * shader takes that into consideration. */
-class SymmetricSeparableMorphologicalDistanceFeatherWeights {
- private:
- int radius_ = 1;
- int falloff_type_ = PROP_SMOOTH;
- GPUTexture *weights_texture_ = nullptr;
- GPUTexture *distance_falloffs_texture_ = nullptr;
-
- public:
- ~SymmetricSeparableMorphologicalDistanceFeatherWeights()
- {
- if (weights_texture_) {
- GPU_texture_free(weights_texture_);
- }
-
- if (distance_falloffs_texture_) {
- GPU_texture_free(distance_falloffs_texture_);
- }
- }
-
- /* Check if textures containing the weights and distance falloffs were already computed for the
- * given distance falloff type and radius. If such textures exists, do nothing, otherwise, free
- * the already computed textures and recompute it with the given distance falloff type and
- * radius. */
- void update(int radius, int falloff_type)
- {
- if (weights_texture_ && distance_falloffs_texture_ && falloff_type == falloff_type_ &&
- radius == radius_) {
- return;
- }
-
- radius_ = radius;
- falloff_type_ = falloff_type;
-
- compute_weights();
- compute_distance_falloffs();
- }
-
- void compute_weights()
- {
- if (weights_texture_) {
- GPU_texture_free(weights_texture_);
- }
-
- /* The size of filter is double the radius plus 1, but since the filter is symmetric, we only
- * compute half of it and no doubling happens. We add 1 to make sure the filter size is always
- * odd and there is a center weight. */
- const int size = radius_ + 1;
- Array<float> weights(size);
-
- float sum = 0.0f;
-
- /* First, compute the center weight. */
- const float center_weight = RE_filter_value(R_FILTER_GAUSS, 0.0f);
- weights[0] = center_weight;
- sum += center_weight;
-
- /* Second, compute the other weights in the positive direction, making sure to add double the
- * weight to the sum of weights because the filter is symmetric and we only loop over half of
- * it. Skip the center weight already computed by dropping the front index. */
- const float scale = radius_ > 0.0f ? 1.0f / radius_ : 0.0f;
- for (const int i : weights.index_range().drop_front(1)) {
- const float weight = RE_filter_value(R_FILTER_GAUSS, i * scale);
- weights[i] = weight;
- sum += weight * 2.0f;
- }
-
- /* Finally, normalize the weights. */
- for (const int i : weights.index_range()) {
- weights[i] /= sum;
- }
-
- weights_texture_ = GPU_texture_create_1d("Weights", size, 1, GPU_R16F, weights.data());
- }
-
- void compute_distance_falloffs()
- {
- if (distance_falloffs_texture_) {
- GPU_texture_free(distance_falloffs_texture_);
- }
-
- /* The size of the distance falloffs is double the radius plus 1, but since the falloffs are
- * symmetric, we only compute half of them and no doubling happens. We add 1 to make sure the
- * falloffs size is always odd and there is a center falloff. */
- const int size = radius_ + 1;
- Array<float> falloffs(size);
-
- /* Compute the distance falloffs in the positive direction only, because the falloffs are
- * symmetric. */
- const float scale = radius_ > 0.0f ? 1.0f / radius_ : 0.0f;
- for (const int i : falloffs.index_range()) {
- falloffs[i] = compute_distance_falloff(i * scale, falloff_type_);
- }
-
- distance_falloffs_texture_ = GPU_texture_create_1d(
- "Distance Factors", size, 1, GPU_R16F, falloffs.data());
- }
-
- void bind_weights_as_texture(GPUShader *shader, const char *texture_name)
- {
- const int texture_image_unit = GPU_shader_get_texture_binding(shader, texture_name);
- GPU_texture_bind(weights_texture_, texture_image_unit);
- }
-
- void unbind_weights_as_texture()
- {
- GPU_texture_unbind(weights_texture_);
- }
-
- void bind_distance_falloffs_as_texture(GPUShader *shader, const char *texture_name)
- {
- const int texture_image_unit = GPU_shader_get_texture_binding(shader, texture_name);
- GPU_texture_bind(distance_falloffs_texture_, texture_image_unit);
- }
-
- void unbind_distance_falloffs_as_texture()
- {
- GPU_texture_unbind(distance_falloffs_texture_);
- }
-};
-
class DilateErodeOperation : public NodeOperation {
- private:
- /* Cached symmetric blur weights and distance falloffs for the distance feature method. */
- SymmetricSeparableMorphologicalDistanceFeatherWeights distance_feather_weights_;
-
public:
using NodeOperation::NodeOperation;
@@ -414,9 +255,11 @@ class DilateErodeOperation : public NodeOperation {
const Result &input_image = get_input("Mask");
input_image.bind_as_texture(shader, "input_tx");
- distance_feather_weights_.update(math::abs(get_distance()), node_storage(bnode()).falloff);
- distance_feather_weights_.bind_weights_as_texture(shader, "weights_tx");
- distance_feather_weights_.bind_distance_falloffs_as_texture(shader, "falloffs_tx");
+ const MorphologicalDistanceFeatherWeights &weights =
+ context().cache_manager().get_morphological_distance_feather_weights(
+ node_storage(bnode()).falloff, math::abs(get_distance()));
+ weights.bind_weights_as_texture(shader, "weights_tx");
+ weights.bind_distance_falloffs_as_texture(shader, "falloffs_tx");
/* We allocate an output image of a transposed size, that is, with a height equivalent to the
* width of the input and vice versa. This is done as a performance optimization. The shader
@@ -437,8 +280,8 @@ class DilateErodeOperation : public NodeOperation {
GPU_shader_unbind();
input_image.unbind_as_texture();
- distance_feather_weights_.unbind_weights_as_texture();
- distance_feather_weights_.unbind_distance_falloffs_as_texture();
+ weights.unbind_weights_as_texture();
+ weights.unbind_distance_falloffs_as_texture();
GPU_texture_image_unbind(horizontal_pass_result);
return horizontal_pass_result;
@@ -453,9 +296,11 @@ class DilateErodeOperation : public NodeOperation {
const int texture_image_unit = GPU_shader_get_texture_binding(shader, "input_tx");
GPU_texture_bind(horizontal_pass_result, texture_image_unit);
- distance_feather_weights_.update(math::abs(get_distance()), node_storage(bnode()).falloff);
- distance_feather_weights_.bind_weights_as_texture(shader, "weights_tx");
- distance_feather_weights_.bind_distance_falloffs_as_texture(shader, "falloffs_tx");
+ const MorphologicalDistanceFeatherWeights &weights =
+ context().cache_manager().get_morphological_distance_feather_weights(
+ node_storage(bnode()).falloff, math::abs(get_distance()));
+ weights.bind_weights_as_texture(shader, "weights_tx");
+ weights.bind_distance_falloffs_as_texture(shader, "falloffs_tx");
const Domain domain = compute_domain();
Result &output_image = get_result("Mask");
@@ -468,8 +313,8 @@ class DilateErodeOperation : public NodeOperation {
GPU_shader_unbind();
output_image.unbind_as_image();
- distance_feather_weights_.unbind_weights_as_texture();
- distance_feather_weights_.unbind_distance_falloffs_as_texture();
+ weights.unbind_weights_as_texture();
+ weights.unbind_distance_falloffs_as_texture();
GPU_texture_unbind(horizontal_pass_result);
}
@@ -535,7 +380,7 @@ void register_node_type_cmp_dilateerode()
cmp_node_type_base(&ntype, CMP_NODE_DILATEERODE, "Dilate/Erode", NODE_CLASS_OP_FILTER);
ntype.draw_buttons = file_ns::node_composit_buts_dilateerode;
ntype.declare = file_ns::cmp_node_dilate_declare;
- node_type_init(&ntype, file_ns::node_composit_init_dilateerode);
+ ntype.initfunc = file_ns::node_composit_init_dilateerode;
node_type_storage(
&ntype, "NodeDilateErode", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
diff --git a/source/blender/nodes/composite/nodes/node_composite_directionalblur.cc b/source/blender/nodes/composite/nodes/node_composite_directionalblur.cc
index a5a253c2cca..452c83ef1b5 100644
--- a/source/blender/nodes/composite/nodes/node_composite_directionalblur.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_directionalblur.cc
@@ -199,7 +199,7 @@ void register_node_type_cmp_dblur()
cmp_node_type_base(&ntype, CMP_NODE_DBLUR, "Directional Blur", NODE_CLASS_OP_FILTER);
ntype.declare = file_ns::cmp_node_directional_blur_declare;
ntype.draw_buttons = file_ns::node_composit_buts_dblur;
- node_type_init(&ntype, file_ns::node_composit_init_dblur);
+ ntype.initfunc = file_ns::node_composit_init_dblur;
node_type_storage(
&ntype, "NodeDBlurData", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
diff --git a/source/blender/nodes/composite/nodes/node_composite_distance_matte.cc b/source/blender/nodes/composite/nodes/node_composite_distance_matte.cc
index 87b66810fe3..16f79f4e730 100644
--- a/source/blender/nodes/composite/nodes/node_composite_distance_matte.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_distance_matte.cc
@@ -123,7 +123,7 @@ void register_node_type_cmp_distance_matte()
ntype.declare = file_ns::cmp_node_distance_matte_declare;
ntype.draw_buttons = file_ns::node_composit_buts_distance_matte;
ntype.flag |= NODE_PREVIEW;
- node_type_init(&ntype, file_ns::node_composit_init_distance_matte);
+ ntype.initfunc = file_ns::node_composit_init_distance_matte;
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
diff --git a/source/blender/nodes/composite/nodes/node_composite_ellipsemask.cc b/source/blender/nodes/composite/nodes/node_composite_ellipsemask.cc
index 120b4d0d976..f06b64f10b5 100644
--- a/source/blender/nodes/composite/nodes/node_composite_ellipsemask.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_ellipsemask.cc
@@ -156,7 +156,7 @@ void register_node_type_cmp_ellipsemask()
ntype.declare = file_ns::cmp_node_ellipsemask_declare;
ntype.draw_buttons = file_ns::node_composit_buts_ellipsemask;
node_type_size(&ntype, 260, 110, 320);
- node_type_init(&ntype, file_ns::node_composit_init_ellipsemask);
+ ntype.initfunc = file_ns::node_composit_init_ellipsemask;
node_type_storage(
&ntype, "NodeEllipseMask", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
diff --git a/source/blender/nodes/composite/nodes/node_composite_glare.cc b/source/blender/nodes/composite/nodes/node_composite_glare.cc
index 60d149a32b9..4352f519e4c 100644
--- a/source/blender/nodes/composite/nodes/node_composite_glare.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_glare.cc
@@ -105,7 +105,7 @@ void register_node_type_cmp_glare()
cmp_node_type_base(&ntype, CMP_NODE_GLARE, "Glare", NODE_CLASS_OP_FILTER);
ntype.declare = file_ns::cmp_node_glare_declare;
ntype.draw_buttons = file_ns::node_composit_buts_glare;
- node_type_init(&ntype, file_ns::node_composit_init_glare);
+ ntype.initfunc = file_ns::node_composit_init_glare;
node_type_storage(&ntype, "NodeGlare", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
diff --git a/source/blender/nodes/composite/nodes/node_composite_huecorrect.cc b/source/blender/nodes/composite/nodes/node_composite_huecorrect.cc
index a365929138c..2e09e44eddc 100644
--- a/source/blender/nodes/composite/nodes/node_composite_huecorrect.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_huecorrect.cc
@@ -106,7 +106,7 @@ void register_node_type_cmp_huecorrect()
cmp_node_type_base(&ntype, CMP_NODE_HUECORRECT, "Hue Correct", NODE_CLASS_OP_COLOR);
ntype.declare = file_ns::cmp_node_huecorrect_declare;
node_type_size(&ntype, 320, 140, 500);
- node_type_init(&ntype, file_ns::node_composit_init_huecorrect);
+ ntype.initfunc = file_ns::node_composit_init_huecorrect;
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
diff --git a/source/blender/nodes/composite/nodes/node_composite_image.cc b/source/blender/nodes/composite/nodes/node_composite_image.cc
index 9efedf744ec..322f1eecf91 100644
--- a/source/blender/nodes/composite/nodes/node_composite_image.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_image.cc
@@ -660,10 +660,10 @@ void register_node_type_cmp_image()
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_IMAGE, "Image", NODE_CLASS_INPUT);
- node_type_init(&ntype, file_ns::node_composit_init_image);
+ ntype.initfunc = file_ns::node_composit_init_image;
node_type_storage(
&ntype, "ImageUser", file_ns::node_composit_free_image, file_ns::node_composit_copy_image);
- node_type_update(&ntype, file_ns::cmp_node_image_update);
+ ntype.updatefunc = file_ns::cmp_node_image_update;
ntype.get_compositor_operation = file_ns::get_compositor_operation;
ntype.labelfunc = node_image_label;
ntype.flag |= NODE_PREVIEW;
@@ -879,8 +879,8 @@ void register_node_type_cmp_rlayers()
ntype.flag |= NODE_PREVIEW;
node_type_storage(
&ntype, nullptr, file_ns::node_composit_free_rlayers, file_ns::node_composit_copy_rlayers);
- node_type_update(&ntype, file_ns::cmp_node_rlayers_update);
- node_type_init(&ntype, node_cmp_rlayers_outputs);
+ ntype.updatefunc = file_ns::cmp_node_rlayers_update;
+ ntype.initfunc = node_cmp_rlayers_outputs;
node_type_size_preset(&ntype, NODE_SIZE_LARGE);
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/composite/nodes/node_composite_invert.cc b/source/blender/nodes/composite/nodes/node_composite_invert.cc
index bbb2808c4ea..c8787ebb01b 100644
--- a/source/blender/nodes/composite/nodes/node_composite_invert.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_invert.cc
@@ -96,7 +96,7 @@ void register_node_type_cmp_invert()
cmp_node_type_base(&ntype, CMP_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR);
ntype.declare = file_ns::cmp_node_invert_declare;
ntype.draw_buttons = file_ns::node_composit_buts_invert;
- node_type_init(&ntype, file_ns::node_composit_init_invert);
+ ntype.initfunc = file_ns::node_composit_init_invert;
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/composite/nodes/node_composite_keying.cc b/source/blender/nodes/composite/nodes/node_composite_keying.cc
index 4b61e06a232..b2add06c541 100644
--- a/source/blender/nodes/composite/nodes/node_composite_keying.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_keying.cc
@@ -95,7 +95,7 @@ void register_node_type_cmp_keying()
cmp_node_type_base(&ntype, CMP_NODE_KEYING, "Keying", NODE_CLASS_MATTE);
ntype.declare = file_ns::cmp_node_keying_declare;
ntype.draw_buttons = file_ns::node_composit_buts_keying;
- node_type_init(&ntype, file_ns::node_composit_init_keying);
+ ntype.initfunc = file_ns::node_composit_init_keying;
node_type_storage(
&ntype, "NodeKeyingData", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
diff --git a/source/blender/nodes/composite/nodes/node_composite_lensdist.cc b/source/blender/nodes/composite/nodes/node_composite_lensdist.cc
index 1cf482ff6ff..e11ed0fbfb6 100644
--- a/source/blender/nodes/composite/nodes/node_composite_lensdist.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_lensdist.cc
@@ -250,7 +250,7 @@ void register_node_type_cmp_lensdist()
cmp_node_type_base(&ntype, CMP_NODE_LENSDIST, "Lens Distortion", NODE_CLASS_DISTORT);
ntype.declare = file_ns::cmp_node_lensdist_declare;
ntype.draw_buttons = file_ns::node_composit_buts_lensdist;
- node_type_init(&ntype, file_ns::node_composit_init_lensdist);
+ ntype.initfunc = file_ns::node_composit_init_lensdist;
node_type_storage(
&ntype, "NodeLensDist", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
diff --git a/source/blender/nodes/composite/nodes/node_composite_levels.cc b/source/blender/nodes/composite/nodes/node_composite_levels.cc
index 4c901372b9f..29212c7a76f 100644
--- a/source/blender/nodes/composite/nodes/node_composite_levels.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_levels.cc
@@ -201,7 +201,7 @@ void register_node_type_cmp_view_levels()
ntype.declare = file_ns::cmp_node_levels_declare;
ntype.draw_buttons = file_ns::node_composit_buts_view_levels;
ntype.flag |= NODE_PREVIEW;
- node_type_init(&ntype, file_ns::node_composit_init_view_levels);
+ ntype.initfunc = file_ns::node_composit_init_view_levels;
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/composite/nodes/node_composite_luma_matte.cc b/source/blender/nodes/composite/nodes/node_composite_luma_matte.cc
index 8426efb0f1f..325f5dbd870 100644
--- a/source/blender/nodes/composite/nodes/node_composite_luma_matte.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_luma_matte.cc
@@ -104,7 +104,7 @@ void register_node_type_cmp_luma_matte()
ntype.declare = file_ns::cmp_node_luma_matte_declare;
ntype.draw_buttons = file_ns::node_composit_buts_luma_matte;
ntype.flag |= NODE_PREVIEW;
- node_type_init(&ntype, file_ns::node_composit_init_luma_matte);
+ ntype.initfunc = file_ns::node_composit_init_luma_matte;
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
diff --git a/source/blender/nodes/composite/nodes/node_composite_map_value.cc b/source/blender/nodes/composite/nodes/node_composite_map_value.cc
index eacc003378a..ea80e7b03a8 100644
--- a/source/blender/nodes/composite/nodes/node_composite_map_value.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_map_value.cc
@@ -116,7 +116,7 @@ void register_node_type_cmp_map_value()
cmp_node_type_base(&ntype, CMP_NODE_MAP_VALUE, "Map Value", NODE_CLASS_OP_VECTOR);
ntype.declare = file_ns::cmp_node_map_value_declare;
ntype.draw_buttons = file_ns::node_composit_buts_map_value;
- node_type_init(&ntype, file_ns::node_composit_init_map_value);
+ ntype.initfunc = file_ns::node_composit_init_map_value;
node_type_storage(&ntype, "TexMapping", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
diff --git a/source/blender/nodes/composite/nodes/node_composite_mask.cc b/source/blender/nodes/composite/nodes/node_composite_mask.cc
index 5dfcc9a9ecf..895ef62a82d 100644
--- a/source/blender/nodes/composite/nodes/node_composite_mask.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_mask.cc
@@ -104,7 +104,7 @@ void register_node_type_cmp_mask()
cmp_node_type_base(&ntype, CMP_NODE_MASK, "Mask", NODE_CLASS_INPUT);
ntype.declare = file_ns::cmp_node_mask_declare;
ntype.draw_buttons = file_ns::node_composit_buts_mask;
- node_type_init(&ntype, file_ns::node_composit_init_mask);
+ ntype.initfunc = file_ns::node_composit_init_mask;
ntype.labelfunc = file_ns::node_mask_label;
ntype.get_compositor_operation = file_ns::get_compositor_operation;
diff --git a/source/blender/nodes/composite/nodes/node_composite_math.cc b/source/blender/nodes/composite/nodes/node_composite_math.cc
index 4baf057913e..e1dda06a41e 100644
--- a/source/blender/nodes/composite/nodes/node_composite_math.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_math.cc
@@ -96,7 +96,7 @@ void register_node_type_cmp_math()
cmp_node_type_base(&ntype, CMP_NODE_MATH, "Math", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::cmp_node_math_declare;
ntype.labelfunc = node_math_label;
- node_type_update(&ntype, node_math_update);
+ ntype.updatefunc = node_math_update;
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/composite/nodes/node_composite_output_file.cc b/source/blender/nodes/composite/nodes/node_composite_output_file.cc
index f27dec91b1c..f64e448842d 100644
--- a/source/blender/nodes/composite/nodes/node_composite_output_file.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_output_file.cc
@@ -470,7 +470,7 @@ void register_node_type_cmp_output_file()
ntype.flag |= NODE_PREVIEW;
node_type_storage(
&ntype, "NodeImageMultiFile", file_ns::free_output_file, file_ns::copy_output_file);
- node_type_update(&ntype, file_ns::update_output_file);
+ ntype.updatefunc = file_ns::update_output_file;
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/composite/nodes/node_composite_rotate.cc b/source/blender/nodes/composite/nodes/node_composite_rotate.cc
index 5f3df3abd35..4cc1166b373 100644
--- a/source/blender/nodes/composite/nodes/node_composite_rotate.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_rotate.cc
@@ -95,7 +95,7 @@ void register_node_type_cmp_rotate()
cmp_node_type_base(&ntype, CMP_NODE_ROTATE, "Rotate", NODE_CLASS_DISTORT);
ntype.declare = file_ns::cmp_node_rotate_declare;
ntype.draw_buttons = file_ns::node_composit_buts_rotate;
- node_type_init(&ntype, file_ns::node_composit_init_rotate);
+ ntype.initfunc = file_ns::node_composit_init_rotate;
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/composite/nodes/node_composite_scale.cc b/source/blender/nodes/composite/nodes/node_composite_scale.cc
index c524d7b8da9..a4e28326d9d 100644
--- a/source/blender/nodes/composite/nodes/node_composite_scale.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_scale.cc
@@ -221,7 +221,7 @@ void register_node_type_cmp_scale()
cmp_node_type_base(&ntype, CMP_NODE_SCALE, "Scale", NODE_CLASS_DISTORT);
ntype.declare = file_ns::cmp_node_scale_declare;
ntype.draw_buttons = file_ns::node_composit_buts_scale;
- node_type_update(&ntype, file_ns::node_composite_update_scale);
+ ntype.updatefunc = file_ns::node_composite_update_scale;
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/composite/nodes/node_composite_sepcomb_color.cc b/source/blender/nodes/composite/nodes/node_composite_sepcomb_color.cc
index d3f8530ae8b..118ab6ccdf8 100644
--- a/source/blender/nodes/composite/nodes/node_composite_sepcomb_color.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_sepcomb_color.cc
@@ -137,10 +137,10 @@ void register_node_type_cmp_separate_color()
cmp_node_type_base(&ntype, CMP_NODE_SEPARATE_COLOR, "Separate Color", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::cmp_node_separate_color_declare;
- node_type_init(&ntype, node_cmp_combsep_color_init);
+ ntype.initfunc = node_cmp_combsep_color_init;
node_type_storage(
&ntype, "NodeCMPCombSepColor", node_free_standard_storage, node_copy_standard_storage);
- node_type_update(&ntype, file_ns::cmp_node_separate_color_update);
+ ntype.updatefunc = file_ns::cmp_node_separate_color_update;
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
nodeRegisterType(&ntype);
@@ -243,10 +243,10 @@ void register_node_type_cmp_combine_color()
cmp_node_type_base(&ntype, CMP_NODE_COMBINE_COLOR, "Combine Color", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::cmp_node_combine_color_declare;
- node_type_init(&ntype, node_cmp_combsep_color_init);
+ ntype.initfunc = node_cmp_combsep_color_init;
node_type_storage(
&ntype, "NodeCMPCombSepColor", node_free_standard_storage, node_copy_standard_storage);
- node_type_update(&ntype, file_ns::cmp_node_combine_color_update);
+ ntype.updatefunc = file_ns::cmp_node_combine_color_update;
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/composite/nodes/node_composite_sepcomb_ycca.cc b/source/blender/nodes/composite/nodes/node_composite_sepcomb_ycca.cc
index 82fc37a18f6..7c1461b4f6e 100644
--- a/source/blender/nodes/composite/nodes/node_composite_sepcomb_ycca.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_sepcomb_ycca.cc
@@ -84,7 +84,7 @@ void register_node_type_cmp_sepycca()
cmp_node_type_base(
&ntype, CMP_NODE_SEPYCCA_LEGACY, "Separate YCbCrA (Legacy)", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::cmp_node_sepycca_declare;
- node_type_init(&ntype, file_ns::node_composit_init_mode_sepycca);
+ ntype.initfunc = file_ns::node_composit_init_mode_sepycca;
ntype.gather_link_search_ops = nullptr;
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
@@ -172,7 +172,7 @@ void register_node_type_cmp_combycca()
cmp_node_type_base(
&ntype, CMP_NODE_COMBYCCA_LEGACY, "Combine YCbCrA (Legacy)", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::cmp_node_combycca_declare;
- node_type_init(&ntype, file_ns::node_composit_init_mode_combycca);
+ ntype.initfunc = file_ns::node_composit_init_mode_combycca;
ntype.gather_link_search_ops = nullptr;
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
diff --git a/source/blender/nodes/composite/nodes/node_composite_setalpha.cc b/source/blender/nodes/composite/nodes/node_composite_setalpha.cc
index 725ae6e3fcb..99c4dae4a92 100644
--- a/source/blender/nodes/composite/nodes/node_composite_setalpha.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_setalpha.cc
@@ -81,7 +81,7 @@ void register_node_type_cmp_setalpha()
cmp_node_type_base(&ntype, CMP_NODE_SETALPHA, "Set Alpha", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::cmp_node_setalpha_declare;
ntype.draw_buttons = file_ns::node_composit_buts_set_alpha;
- node_type_init(&ntype, file_ns::node_composit_init_setalpha);
+ ntype.initfunc = file_ns::node_composit_init_setalpha;
node_type_storage(
&ntype, "NodeSetAlpha", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
diff --git a/source/blender/nodes/composite/nodes/node_composite_split_viewer.cc b/source/blender/nodes/composite/nodes/node_composite_split_viewer.cc
index f25d33033a2..b4e698f5096 100644
--- a/source/blender/nodes/composite/nodes/node_composite_split_viewer.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_split_viewer.cc
@@ -125,7 +125,7 @@ void register_node_type_cmp_splitviewer()
ntype.declare = file_ns::cmp_node_split_viewer_declare;
ntype.draw_buttons = file_ns::node_composit_buts_splitviewer;
ntype.flag |= NODE_PREVIEW;
- node_type_init(&ntype, file_ns::node_composit_init_splitviewer);
+ ntype.initfunc = file_ns::node_composit_init_splitviewer;
node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
diff --git a/source/blender/nodes/composite/nodes/node_composite_sunbeams.cc b/source/blender/nodes/composite/nodes/node_composite_sunbeams.cc
index d2ee9f567f2..798e60e9482 100644
--- a/source/blender/nodes/composite/nodes/node_composite_sunbeams.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_sunbeams.cc
@@ -68,7 +68,7 @@ void register_node_type_cmp_sunbeams()
cmp_node_type_base(&ntype, CMP_NODE_SUNBEAMS, "Sun Beams", NODE_CLASS_OP_FILTER);
ntype.declare = file_ns::cmp_node_sunbeams_declare;
ntype.draw_buttons = file_ns::node_composit_buts_sunbeams;
- node_type_init(&ntype, file_ns::init);
+ ntype.initfunc = file_ns::init;
node_type_storage(
&ntype, "NodeSunBeams", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
diff --git a/source/blender/nodes/composite/nodes/node_composite_switchview.cc b/source/blender/nodes/composite/nodes/node_composite_switchview.cc
index 9b21ecab335..9974e55cc1a 100644
--- a/source/blender/nodes/composite/nodes/node_composite_switchview.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_switchview.cc
@@ -173,7 +173,7 @@ void register_node_type_cmp_switch_view()
node_type_socket_templates(&ntype, nullptr, file_ns::cmp_node_switch_view_out);
ntype.draw_buttons_ex = file_ns::node_composit_buts_switch_view_ex;
ntype.initfunc_api = file_ns::init_switch_view;
- node_type_update(&ntype, file_ns::cmp_node_switch_view_update);
+ ntype.updatefunc = file_ns::cmp_node_switch_view_update;
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/composite/nodes/node_composite_tonemap.cc b/source/blender/nodes/composite/nodes/node_composite_tonemap.cc
index d26a01bb3c9..febbb9ddec5 100644
--- a/source/blender/nodes/composite/nodes/node_composite_tonemap.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_tonemap.cc
@@ -332,7 +332,7 @@ void register_node_type_cmp_tonemap()
cmp_node_type_base(&ntype, CMP_NODE_TONEMAP, "Tonemap", NODE_CLASS_OP_COLOR);
ntype.declare = file_ns::cmp_node_tonemap_declare;
ntype.draw_buttons = file_ns::node_composit_buts_tonemap;
- node_type_init(&ntype, file_ns::node_composit_init_tonemap);
+ ntype.initfunc = file_ns::node_composit_init_tonemap;
node_type_storage(&ntype, "NodeTonemap", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
diff --git a/source/blender/nodes/composite/nodes/node_composite_translate.cc b/source/blender/nodes/composite/nodes/node_composite_translate.cc
index c8f9f8ee666..154be2d428a 100644
--- a/source/blender/nodes/composite/nodes/node_composite_translate.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_translate.cc
@@ -110,7 +110,7 @@ void register_node_type_cmp_translate()
cmp_node_type_base(&ntype, CMP_NODE_TRANSLATE, "Translate", NODE_CLASS_DISTORT);
ntype.declare = file_ns::cmp_node_translate_declare;
ntype.draw_buttons = file_ns::node_composit_buts_translate;
- node_type_init(&ntype, file_ns::node_composit_init_translate);
+ ntype.initfunc = file_ns::node_composit_init_translate;
node_type_storage(
&ntype, "NodeTranslateData", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
diff --git a/source/blender/nodes/composite/nodes/node_composite_val_to_rgb.cc b/source/blender/nodes/composite/nodes/node_composite_val_to_rgb.cc
index 2870b07f207..d083051e9d2 100644
--- a/source/blender/nodes/composite/nodes/node_composite_val_to_rgb.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_val_to_rgb.cc
@@ -134,7 +134,7 @@ void register_node_type_cmp_valtorgb()
cmp_node_type_base(&ntype, CMP_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::cmp_node_valtorgb_declare;
node_type_size(&ntype, 240, 200, 320);
- node_type_init(&ntype, file_ns::node_composit_init_valtorgb);
+ ntype.initfunc = file_ns::node_composit_init_valtorgb;
node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
diff --git a/source/blender/nodes/composite/nodes/node_composite_vec_blur.cc b/source/blender/nodes/composite/nodes/node_composite_vec_blur.cc
index 6d43647020f..6a44fcb1650 100644
--- a/source/blender/nodes/composite/nodes/node_composite_vec_blur.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_vec_blur.cc
@@ -81,7 +81,7 @@ void register_node_type_cmp_vecblur()
cmp_node_type_base(&ntype, CMP_NODE_VECBLUR, "Vector Blur", NODE_CLASS_OP_FILTER);
ntype.declare = file_ns::cmp_node_vec_blur_declare;
ntype.draw_buttons = file_ns::node_composit_buts_vecblur;
- node_type_init(&ntype, file_ns::node_composit_init_vecblur);
+ ntype.initfunc = file_ns::node_composit_init_vecblur;
node_type_storage(
&ntype, "NodeBlurData", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
diff --git a/source/blender/nodes/composite/nodes/node_composite_viewer.cc b/source/blender/nodes/composite/nodes/node_composite_viewer.cc
index c83674fa9c1..682b0626ccd 100644
--- a/source/blender/nodes/composite/nodes/node_composite_viewer.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_viewer.cc
@@ -196,7 +196,7 @@ void register_node_type_cmp_viewer()
ntype.draw_buttons = file_ns::node_composit_buts_viewer;
ntype.draw_buttons_ex = file_ns::node_composit_buts_viewer_ex;
ntype.flag |= NODE_PREVIEW;
- node_type_init(&ntype, file_ns::node_composit_init_viewer);
+ ntype.initfunc = file_ns::node_composit_init_viewer;
node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
diff --git a/source/blender/nodes/function/nodes/node_fn_boolean_math.cc b/source/blender/nodes/function/nodes/node_fn_boolean_math.cc
index 7fc7829186a..3027a81807b 100644
--- a/source/blender/nodes/function/nodes/node_fn_boolean_math.cc
+++ b/source/blender/nodes/function/nodes/node_fn_boolean_math.cc
@@ -131,7 +131,7 @@ void register_node_type_fn_boolean_math()
fn_node_type_base(&ntype, FN_NODE_BOOLEAN_MATH, "Boolean Math", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::fn_node_boolean_math_declare;
ntype.labelfunc = file_ns::node_boolean_math_label;
- node_type_update(&ntype, file_ns::node_boolean_math_update);
+ ntype.updatefunc = file_ns::node_boolean_math_update;
ntype.build_multi_function = file_ns::fn_node_boolean_math_build_multi_function;
ntype.draw_buttons = file_ns::fn_node_boolean_math_layout;
ntype.gather_link_search_ops = file_ns::node_gather_link_searches;
diff --git a/source/blender/nodes/function/nodes/node_fn_combine_color.cc b/source/blender/nodes/function/nodes/node_fn_combine_color.cc
index fddf606dfc9..c5dd5dfff1a 100644
--- a/source/blender/nodes/function/nodes/node_fn_combine_color.cc
+++ b/source/blender/nodes/function/nodes/node_fn_combine_color.cc
@@ -97,8 +97,8 @@ void register_node_type_fn_combine_color(void)
fn_node_type_base(&ntype, FN_NODE_COMBINE_COLOR, "Combine Color", NODE_CLASS_CONVERTER);
ntype.declare = blender::nodes::fn_node_combine_color_declare;
- node_type_update(&ntype, blender::nodes::fn_node_combine_color_update);
- node_type_init(&ntype, blender::nodes::fn_node_combine_color_init);
+ ntype.updatefunc = blender::nodes::fn_node_combine_color_update;
+ ntype.initfunc = blender::nodes::fn_node_combine_color_init;
node_type_storage(
&ntype, "NodeCombSepColor", node_free_standard_storage, node_copy_standard_storage);
ntype.build_multi_function = blender::nodes::fn_node_combine_color_build_multi_function;
diff --git a/source/blender/nodes/function/nodes/node_fn_compare.cc b/source/blender/nodes/function/nodes/node_fn_compare.cc
index 4dd8d0c6ba4..c0eb3e9ffd5 100644
--- a/source/blender/nodes/function/nodes/node_fn_compare.cc
+++ b/source/blender/nodes/function/nodes/node_fn_compare.cc
@@ -582,8 +582,8 @@ void register_node_type_fn_compare()
fn_node_type_base(&ntype, FN_NODE_COMPARE, "Compare", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::fn_node_compare_declare;
ntype.labelfunc = file_ns::node_compare_label;
- node_type_update(&ntype, file_ns::node_compare_update);
- node_type_init(&ntype, file_ns::node_compare_init);
+ ntype.updatefunc = file_ns::node_compare_update;
+ ntype.initfunc = file_ns::node_compare_init;
node_type_storage(
&ntype, "NodeFunctionCompare", node_free_standard_storage, node_copy_standard_storage);
ntype.build_multi_function = file_ns::fn_node_compare_build_multi_function;
diff --git a/source/blender/nodes/function/nodes/node_fn_input_bool.cc b/source/blender/nodes/function/nodes/node_fn_input_bool.cc
index c68de06a91b..62e0358b0ae 100644
--- a/source/blender/nodes/function/nodes/node_fn_input_bool.cc
+++ b/source/blender/nodes/function/nodes/node_fn_input_bool.cc
@@ -43,7 +43,7 @@ void register_node_type_fn_input_bool()
fn_node_type_base(&ntype, FN_NODE_INPUT_BOOL, "Boolean", 0);
ntype.declare = file_ns::fn_node_input_bool_declare;
- node_type_init(&ntype, file_ns::fn_node_input_bool_init);
+ ntype.initfunc = file_ns::fn_node_input_bool_init;
node_type_storage(
&ntype, "NodeInputBool", node_free_standard_storage, node_copy_standard_storage);
ntype.build_multi_function = file_ns::fn_node_input_bool_build_multi_function;
diff --git a/source/blender/nodes/function/nodes/node_fn_input_color.cc b/source/blender/nodes/function/nodes/node_fn_input_color.cc
index 9a66066189a..af4c340efe7 100644
--- a/source/blender/nodes/function/nodes/node_fn_input_color.cc
+++ b/source/blender/nodes/function/nodes/node_fn_input_color.cc
@@ -46,7 +46,7 @@ void register_node_type_fn_input_color()
fn_node_type_base(&ntype, FN_NODE_INPUT_COLOR, "Color", NODE_CLASS_INPUT);
ntype.declare = file_ns::fn_node_input_color_declare;
- node_type_init(&ntype, file_ns::fn_node_input_color_init);
+ ntype.initfunc = file_ns::fn_node_input_color_init;
node_type_storage(
&ntype, "NodeInputColor", node_free_standard_storage, node_copy_standard_storage);
ntype.build_multi_function = file_ns::fn_node_input_color_build_multi_function;
diff --git a/source/blender/nodes/function/nodes/node_fn_input_int.cc b/source/blender/nodes/function/nodes/node_fn_input_int.cc
index 5285c242d88..c339d2a348e 100644
--- a/source/blender/nodes/function/nodes/node_fn_input_int.cc
+++ b/source/blender/nodes/function/nodes/node_fn_input_int.cc
@@ -43,7 +43,7 @@ void register_node_type_fn_input_int()
fn_node_type_base(&ntype, FN_NODE_INPUT_INT, "Integer", 0);
ntype.declare = file_ns::fn_node_input_int_declare;
- node_type_init(&ntype, file_ns::fn_node_input_int_init);
+ ntype.initfunc = file_ns::fn_node_input_int_init;
node_type_storage(
&ntype, "NodeInputInt", node_free_standard_storage, node_copy_standard_storage);
ntype.build_multi_function = file_ns::fn_node_input_int_build_multi_function;
diff --git a/source/blender/nodes/function/nodes/node_fn_input_string.cc b/source/blender/nodes/function/nodes/node_fn_input_string.cc
index a7172d9fcf9..9da17ef9a67 100644
--- a/source/blender/nodes/function/nodes/node_fn_input_string.cc
+++ b/source/blender/nodes/function/nodes/node_fn_input_string.cc
@@ -65,7 +65,7 @@ void register_node_type_fn_input_string()
fn_node_type_base(&ntype, FN_NODE_INPUT_STRING, "String", NODE_CLASS_INPUT);
ntype.declare = file_ns::fn_node_input_string_declare;
- node_type_init(&ntype, file_ns::fn_node_input_string_init);
+ ntype.initfunc = file_ns::fn_node_input_string_init;
node_type_storage(
&ntype, "NodeInputString", file_ns::fn_node_input_string_free, file_ns::fn_node_string_copy);
ntype.build_multi_function = file_ns::fn_node_input_string_build_multi_function;
diff --git a/source/blender/nodes/function/nodes/node_fn_input_vector.cc b/source/blender/nodes/function/nodes/node_fn_input_vector.cc
index 49c8a6284e0..f6feda4cad0 100644
--- a/source/blender/nodes/function/nodes/node_fn_input_vector.cc
+++ b/source/blender/nodes/function/nodes/node_fn_input_vector.cc
@@ -44,7 +44,7 @@ void register_node_type_fn_input_vector()
fn_node_type_base(&ntype, FN_NODE_INPUT_VECTOR, "Vector", 0);
ntype.declare = file_ns::fn_node_input_vector_declare;
- node_type_init(&ntype, file_ns::fn_node_input_vector_init);
+ ntype.initfunc = file_ns::fn_node_input_vector_init;
node_type_storage(
&ntype, "NodeInputVector", node_free_standard_storage, node_copy_standard_storage);
ntype.build_multi_function = file_ns::fn_node_input_vector_build_multi_function;
diff --git a/source/blender/nodes/function/nodes/node_fn_random_value.cc b/source/blender/nodes/function/nodes/node_fn_random_value.cc
index 9f842e81071..c923e6e7d16 100644
--- a/source/blender/nodes/function/nodes/node_fn_random_value.cc
+++ b/source/blender/nodes/function/nodes/node_fn_random_value.cc
@@ -218,8 +218,8 @@ void register_node_type_fn_random_value()
static bNodeType ntype;
fn_node_type_base(&ntype, FN_NODE_RANDOM_VALUE, "Random Value", NODE_CLASS_CONVERTER);
- node_type_init(&ntype, file_ns::fn_node_random_value_init);
- node_type_update(&ntype, file_ns::fn_node_random_value_update);
+ ntype.initfunc = file_ns::fn_node_random_value_init;
+ ntype.updatefunc = file_ns::fn_node_random_value_update;
ntype.draw_buttons = file_ns::fn_node_random_value_layout;
ntype.declare = file_ns::fn_node_random_value_declare;
ntype.build_multi_function = file_ns::fn_node_random_value_build_multi_function;
diff --git a/source/blender/nodes/function/nodes/node_fn_rotate_euler.cc b/source/blender/nodes/function/nodes/node_fn_rotate_euler.cc
index 813d0a265f7..19afadb7a33 100644
--- a/source/blender/nodes/function/nodes/node_fn_rotate_euler.cc
+++ b/source/blender/nodes/function/nodes/node_fn_rotate_euler.cc
@@ -132,7 +132,7 @@ void register_node_type_fn_rotate_euler()
fn_node_type_base(&ntype, FN_NODE_ROTATE_EULER, "Rotate Euler", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::fn_node_rotate_euler_declare;
ntype.draw_buttons = file_ns::fn_node_rotate_euler_layout;
- node_type_update(&ntype, file_ns::fn_node_rotate_euler_update);
+ ntype.updatefunc = file_ns::fn_node_rotate_euler_update;
ntype.build_multi_function = file_ns::fn_node_rotate_euler_build_multi_function;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/function/nodes/node_fn_separate_color.cc b/source/blender/nodes/function/nodes/node_fn_separate_color.cc
index 19753f93b5c..e3efb76d155 100644
--- a/source/blender/nodes/function/nodes/node_fn_separate_color.cc
+++ b/source/blender/nodes/function/nodes/node_fn_separate_color.cc
@@ -213,8 +213,8 @@ void register_node_type_fn_separate_color(void)
fn_node_type_base(&ntype, FN_NODE_SEPARATE_COLOR, "Separate Color", NODE_CLASS_CONVERTER);
ntype.declare = blender::nodes::fn_node_separate_color_declare;
- node_type_update(&ntype, blender::nodes::fn_node_separate_color_update);
- node_type_init(&ntype, blender::nodes::fn_node_separate_color_init);
+ ntype.updatefunc = blender::nodes::fn_node_separate_color_update;
+ ntype.initfunc = blender::nodes::fn_node_separate_color_init;
node_type_storage(
&ntype, "NodeCombSepColor", node_free_standard_storage, node_copy_standard_storage);
ntype.build_multi_function = blender::nodes::fn_node_separate_color_build_multi_function;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_accumulate_field.cc b/source/blender/nodes/geometry/nodes/node_geo_accumulate_field.cc
index 9af445090e9..33a58cada1b 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_accumulate_field.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_accumulate_field.cc
@@ -425,8 +425,8 @@ void register_node_type_geo_accumulate_field()
geo_node_type_base(&ntype, GEO_NODE_ACCUMULATE_FIELD, "Accumulate Field", NODE_CLASS_CONVERTER);
ntype.geometry_node_execute = file_ns::node_geo_exec;
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
ntype.draw_buttons = file_ns::node_layout;
ntype.declare = file_ns::node_declare;
ntype.gather_link_search_ops = file_ns::node_gather_link_searches;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_capture.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_capture.cc
index 1aea129bd53..1a0cb14f451 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_capture.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_capture.cc
@@ -241,8 +241,8 @@ void register_node_type_geo_attribute_capture()
"NodeGeometryAttributeCapture",
node_free_standard_storage,
node_copy_standard_storage);
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
ntype.declare = file_ns::node_declare;
ntype.geometry_node_execute = file_ns::node_geo_exec;
ntype.draw_buttons = file_ns::node_layout;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_domain_size.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_domain_size.cc
index af55ef3f7ed..d31366f9c93 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_domain_size.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_domain_size.cc
@@ -132,7 +132,7 @@ void register_node_type_geo_attribute_domain_size()
ntype.geometry_node_execute = file_ns::node_geo_exec;
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_layout;
- node_type_init(&ntype, file_ns::node_init);
+ ntype.initfunc = file_ns::node_init;
ntype.updatefunc = file_ns::node_update;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_statistic.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_statistic.cc
index 3023c7bd751..e381133af30 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_statistic.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_statistic.cc
@@ -396,8 +396,8 @@ void register_node_type_geo_attribute_statistic()
&ntype, GEO_NODE_ATTRIBUTE_STATISTIC, "Attribute Statistic", NODE_CLASS_ATTRIBUTE);
ntype.declare = file_ns::node_declare;
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
ntype.geometry_node_execute = file_ns::node_geo_exec;
ntype.draw_buttons = file_ns::node_layout;
ntype.gather_link_search_ops = file_ns::node_gather_link_searches;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_boolean.cc b/source/blender/nodes/geometry/nodes/node_geo_boolean.cc
index 094aab65653..61780ee25bb 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_boolean.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_boolean.cc
@@ -191,7 +191,7 @@ void register_node_type_geo_boolean()
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_layout;
ntype.updatefunc = file_ns::node_update;
- node_type_init(&ntype, file_ns::node_init);
+ ntype.initfunc = file_ns::node_init;
ntype.geometry_node_execute = file_ns::node_geo_exec;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/geometry/nodes/node_geo_collection_info.cc b/source/blender/nodes/geometry/nodes/node_geo_collection_info.cc
index df677e1c399..6c41dbbe34c 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_collection_info.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_collection_info.cc
@@ -93,7 +93,7 @@ static void node_geo_exec(GeoNodeExecParams params)
if (!reset_children) {
add_v3_v3(transform.values[3], child_collection->instance_offset);
if (use_relative_transform) {
- mul_m4_m4_pre(transform.values, self_object->imat);
+ mul_m4_m4_pre(transform.values, self_object->world_to_object);
}
else {
sub_v3_v3(transform.values[3], collection->instance_offset);
@@ -107,12 +107,12 @@ static void node_geo_exec(GeoNodeExecParams params)
float4x4 transform = float4x4::identity();
if (!reset_children) {
if (use_relative_transform) {
- transform = self_object->imat;
+ transform = self_object->world_to_object;
}
else {
sub_v3_v3(transform.values[3], collection->instance_offset);
}
- mul_m4_m4_post(transform.values, child_object->obmat);
+ mul_m4_m4_post(transform.values, child_object->object_to_world);
}
entries.append({handle, &(child_object->id.name[2]), transform});
}
@@ -130,7 +130,7 @@ static void node_geo_exec(GeoNodeExecParams params)
float4x4 transform = float4x4::identity();
if (use_relative_transform) {
copy_v3_v3(transform.values[3], collection->instance_offset);
- mul_m4_m4_pre(transform.values, self_object->imat);
+ mul_m4_m4_pre(transform.values, self_object->world_to_object);
}
const int handle = instances->add_reference(*collection);
@@ -150,7 +150,7 @@ void register_node_type_geo_collection_info()
geo_node_type_base(&ntype, GEO_NODE_COLLECTION_INFO, "Collection Info", NODE_CLASS_INPUT);
ntype.declare = file_ns::node_declare;
- node_type_init(&ntype, file_ns::node_node_init);
+ ntype.initfunc = file_ns::node_node_init;
node_type_storage(&ntype,
"NodeGeometryCollectionInfo",
node_free_standard_storage,
diff --git a/source/blender/nodes/geometry/nodes/node_geo_common.cc b/source/blender/nodes/geometry/nodes/node_geo_common.cc
index 531d37c3a89..90fb7e10570 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_common.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_common.cc
@@ -23,7 +23,7 @@ void register_node_type_geo_group()
node_type_size(&ntype, 140, 60, 400);
ntype.labelfunc = node_group_label;
- node_type_group_update(&ntype, node_group_update);
+ ntype.group_update_func = node_group_update;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/geometry/nodes/node_geo_convex_hull.cc b/source/blender/nodes/geometry/nodes/node_geo_convex_hull.cc
index 038309785fb..278d7c4bd24 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_convex_hull.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_convex_hull.cc
@@ -87,7 +87,7 @@ static Mesh *hull_from_bullet(const Mesh *mesh, Span<float3> coords)
MEdge &edge = edges[edge_index];
edge.v1 = v_from;
edge.v2 = v_to;
- edge.flag = ME_EDGEDRAW | ME_EDGERENDER;
+ edge.flag = ME_EDGEDRAW;
/* Write edge index into both loops that have it. */
int reverse_index = plConvexHullGetReversedLoopIndex(hull, i);
@@ -101,7 +101,7 @@ static Mesh *hull_from_bullet(const Mesh *mesh, Span<float3> coords)
MEdge &edge = edges[0];
edge.v1 = 0;
edge.v2 = 1;
- edge.flag |= ME_EDGEDRAW | ME_EDGERENDER | ME_LOOSEEDGE;
+ edge.flag |= ME_EDGEDRAW | ME_LOOSEEDGE;
edge_index++;
}
BLI_assert(edge_index == edges_num);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc
index 6eaa40bff03..a14661b4a50 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc
@@ -90,7 +90,7 @@ static Mesh *cdt_to_mesh(const meshintersect::CDT_result<double> &result)
for (const int i : IndexRange(result.edge.size())) {
edges[i].v1 = result.edge[i].first;
edges[i].v2 = result.edge[i].second;
- edges[i].flag = ME_EDGEDRAW | ME_EDGERENDER;
+ edges[i].flag = ME_EDGEDRAW;
}
int i_loop = 0;
for (const int i : IndexRange(result.face.size())) {
@@ -155,7 +155,7 @@ void register_node_type_geo_curve_fill()
geo_node_type_base(&ntype, GEO_NODE_FILL_CURVE, "Fill Curve", NODE_CLASS_GEOMETRY);
- node_type_init(&ntype, file_ns::node_init);
+ ntype.initfunc = file_ns::node_init;
node_type_storage(
&ntype, "NodeGeometryCurveFill", node_free_standard_storage, node_copy_standard_storage);
ntype.declare = file_ns::node_declare;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc
index 2b24b6cbf42..7a6fa799013 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc
@@ -121,8 +121,8 @@ void register_node_type_geo_curve_fillet()
node_type_storage(
&ntype, "NodeGeometryCurveFillet", node_free_standard_storage, node_copy_standard_storage);
ntype.declare = file_ns::node_declare;
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
ntype.geometry_node_execute = file_ns::node_geo_exec;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_handle_type_selection.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_handle_type_selection.cc
index 252f66c308f..9f0d40bb0d7 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_handle_type_selection.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_handle_type_selection.cc
@@ -138,7 +138,7 @@ void register_node_type_geo_curve_handle_type_selection()
&ntype, GEO_NODE_CURVE_HANDLE_TYPE_SELECTION, "Handle Type Selection", NODE_CLASS_INPUT);
ntype.declare = file_ns::node_declare;
ntype.geometry_node_execute = file_ns::node_geo_exec;
- node_type_init(&ntype, file_ns::node_init);
+ ntype.initfunc = file_ns::node_init;
node_type_storage(&ntype,
"NodeGeometryCurveSelectHandles",
node_free_standard_storage,
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_arc.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_arc.cc
index cc32c8f5efc..e0148730710 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_arc.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_arc.cc
@@ -359,8 +359,8 @@ void register_node_type_geo_curve_primitive_arc()
static bNodeType ntype;
geo_node_type_base(&ntype, GEO_NODE_CURVE_PRIMITIVE_ARC, "Arc", NODE_CLASS_GEOMETRY);
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
node_type_storage(&ntype,
"NodeGeometryCurvePrimitiveArc",
node_free_standard_storage,
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_bezier_segment.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_bezier_segment.cc
index b407ac47dc9..59c17365261 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_bezier_segment.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_bezier_segment.cc
@@ -119,7 +119,7 @@ void register_node_type_geo_curve_primitive_bezier_segment()
static bNodeType ntype;
geo_node_type_base(
&ntype, GEO_NODE_CURVE_PRIMITIVE_BEZIER_SEGMENT, "Bezier Segment", NODE_CLASS_GEOMETRY);
- node_type_init(&ntype, file_ns::node_init);
+ ntype.initfunc = file_ns::node_init;
node_type_storage(&ntype,
"NodeGeometryCurvePrimitiveBezierSegment",
node_free_standard_storage,
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc
index 35fdd6754cc..75f2116b237 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc
@@ -217,8 +217,8 @@ void register_node_type_geo_curve_primitive_circle()
static bNodeType ntype;
geo_node_type_base(&ntype, GEO_NODE_CURVE_PRIMITIVE_CIRCLE, "Curve Circle", NODE_CLASS_GEOMETRY);
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
node_type_storage(&ntype,
"NodeGeometryCurvePrimitiveCircle",
node_free_standard_storage,
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_line.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_line.cc
index 6b402a67450..d4ce1923178 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_line.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_line.cc
@@ -119,8 +119,8 @@ void register_node_type_geo_curve_primitive_line()
static bNodeType ntype;
geo_node_type_base(&ntype, GEO_NODE_CURVE_PRIMITIVE_LINE, "Curve Line", NODE_CLASS_GEOMETRY);
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
node_type_storage(&ntype,
"NodeGeometryCurvePrimitiveLine",
node_free_standard_storage,
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_quadrilateral.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_quadrilateral.cc
index 44c2a078cb6..d4e37a98372 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_quadrilateral.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_quadrilateral.cc
@@ -274,8 +274,8 @@ void register_node_type_geo_curve_primitive_quadrilateral()
ntype.declare = file_ns::node_declare;
ntype.geometry_node_execute = file_ns::node_geo_exec;
ntype.draw_buttons = file_ns::node_layout;
- node_type_update(&ntype, file_ns::node_update);
- node_type_init(&ntype, file_ns::node_init);
+ ntype.updatefunc = file_ns::node_update;
+ ntype.initfunc = file_ns::node_init;
node_type_storage(&ntype,
"NodeGeometryCurvePrimitiveQuad",
node_free_standard_storage,
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc
index 8b6a7064362..23a71af448d 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc
@@ -123,8 +123,8 @@ void register_node_type_geo_curve_resample()
ntype.draw_buttons = file_ns::node_layout;
node_type_storage(
&ntype, "NodeGeometryCurveResample", node_free_standard_storage, node_copy_standard_storage);
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
ntype.geometry_node_execute = file_ns::node_geo_exec;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_reverse.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_reverse.cc
index 0169ead5bd2..040ebf55ec5 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_reverse.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_reverse.cc
@@ -19,6 +19,8 @@ static void node_geo_exec(GeoNodeExecParams params)
{
GeometrySet geometry_set = params.extract_input<GeometrySet>("Curve");
+ GeometryComponentEditData::remember_deformed_curve_positions_if_necessary(geometry_set);
+
geometry_set.modify_geometry_sets([&](GeometrySet &geometry_set) {
if (!geometry_set.has_curves()) {
return;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_sample.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_sample.cc
index 27e111822bf..bb31d9c1a57 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_sample.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_sample.cc
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "BLI_devirtualize_parameters.hh"
+#include "BLI_generic_array.hh"
#include "BLI_length_parameterize.hh"
#include "BKE_curves.hh"
@@ -8,6 +9,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
+#include "NOD_socket_search_link.hh"
+
#include "node_geometry_util.hh"
namespace blender::nodes::node_geo_curve_sample_cc {
@@ -16,9 +19,16 @@ NODE_STORAGE_FUNCS(NodeGeometryCurveSample)
static void node_declare(NodeDeclarationBuilder &b)
{
- b.add_input<decl::Geometry>(N_("Curve"))
+ b.add_input<decl::Geometry>(N_("Curves"))
.only_realized_data()
.supported_type(GEO_COMPONENT_TYPE_CURVE);
+
+ b.add_input<decl::Float>(N_("Value"), "Value_Float").hide_value().supports_field();
+ b.add_input<decl::Int>(N_("Value"), "Value_Int").hide_value().supports_field();
+ b.add_input<decl::Vector>(N_("Value"), "Value_Vector").hide_value().supports_field();
+ b.add_input<decl::Color>(N_("Value"), "Value_Color").hide_value().supports_field();
+ b.add_input<decl::Bool>(N_("Value"), "Value_Bool").hide_value().supports_field();
+
b.add_input<decl::Float>(N_("Factor"))
.min(0.0f)
.max(1.0f)
@@ -30,6 +40,16 @@ static void node_declare(NodeDeclarationBuilder &b)
.subtype(PROP_DISTANCE)
.supports_field()
.make_available([](bNode &node) { node_storage(node).mode = GEO_NODE_CURVE_SAMPLE_LENGTH; });
+ b.add_input<decl::Int>(N_("Curve Index")).supports_field().make_available([](bNode &node) {
+ node_storage(node).use_all_curves = false;
+ });
+
+ b.add_output<decl::Float>(N_("Value"), "Value_Float").dependent_field();
+ b.add_output<decl::Int>(N_("Value"), "Value_Int").dependent_field();
+ b.add_output<decl::Vector>(N_("Value"), "Value_Vector").dependent_field();
+ b.add_output<decl::Color>(N_("Value"), "Value_Color").dependent_field();
+ b.add_output<decl::Bool>(N_("Value"), "Value_Bool").dependent_field();
+
b.add_output<decl::Vector>(N_("Position")).dependent_field();
b.add_output<decl::Vector>(N_("Tangent")).dependent_field();
b.add_output<decl::Vector>(N_("Normal")).dependent_field();
@@ -37,13 +57,17 @@ static void node_declare(NodeDeclarationBuilder &b)
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
+ uiItemR(layout, ptr, "data_type", 0, "", ICON_NONE);
uiItemR(layout, ptr, "mode", UI_ITEM_R_EXPAND, nullptr, ICON_NONE);
+ uiItemR(layout, ptr, "use_all_curves", 0, nullptr, ICON_NONE);
}
-static void node_type_init(bNodeTree * /*tree*/, bNode *node)
+static void node_init(bNodeTree * /*tree*/, bNode *node)
{
NodeGeometryCurveSample *data = MEM_cnew<NodeGeometryCurveSample>(__func__);
- data->mode = GEO_NODE_CURVE_SAMPLE_LENGTH;
+ data->mode = GEO_NODE_CURVE_SAMPLE_FACTOR;
+ data->use_all_curves = false;
+ data->data_type = CD_PROP_FLOAT;
node->storage = data;
}
@@ -51,16 +75,62 @@ static void node_update(bNodeTree *ntree, bNode *node)
{
const NodeGeometryCurveSample &storage = node_storage(*node);
const GeometryNodeCurveSampleMode mode = (GeometryNodeCurveSampleMode)storage.mode;
+ const eCustomDataType data_type = eCustomDataType(storage.data_type);
+
+ bNodeSocket *in_socket_float = static_cast<bNodeSocket *>(node->inputs.first)->next;
+ bNodeSocket *in_socket_int32 = in_socket_float->next;
+ bNodeSocket *in_socket_vector = in_socket_int32->next;
+ bNodeSocket *in_socket_color4f = in_socket_vector->next;
+ bNodeSocket *in_socket_bool = in_socket_color4f->next;
- bNodeSocket *factor = static_cast<bNodeSocket *>(node->inputs.first)->next;
+ bNodeSocket *factor = in_socket_bool->next;
bNodeSocket *length = factor->next;
+ bNodeSocket *curve_index = length->next;
nodeSetSocketAvailability(ntree, factor, mode == GEO_NODE_CURVE_SAMPLE_FACTOR);
nodeSetSocketAvailability(ntree, length, mode == GEO_NODE_CURVE_SAMPLE_LENGTH);
+ nodeSetSocketAvailability(ntree, curve_index, !storage.use_all_curves);
+
+ nodeSetSocketAvailability(ntree, in_socket_vector, data_type == CD_PROP_FLOAT3);
+ nodeSetSocketAvailability(ntree, in_socket_float, data_type == CD_PROP_FLOAT);
+ nodeSetSocketAvailability(ntree, in_socket_color4f, data_type == CD_PROP_COLOR);
+ nodeSetSocketAvailability(ntree, in_socket_bool, data_type == CD_PROP_BOOL);
+ nodeSetSocketAvailability(ntree, in_socket_int32, data_type == CD_PROP_INT32);
+
+ bNodeSocket *out_socket_float = static_cast<bNodeSocket *>(node->outputs.first);
+ bNodeSocket *out_socket_int32 = out_socket_float->next;
+ bNodeSocket *out_socket_vector = out_socket_int32->next;
+ bNodeSocket *out_socket_color4f = out_socket_vector->next;
+ bNodeSocket *out_socket_bool = out_socket_color4f->next;
+
+ nodeSetSocketAvailability(ntree, out_socket_vector, data_type == CD_PROP_FLOAT3);
+ nodeSetSocketAvailability(ntree, out_socket_float, data_type == CD_PROP_FLOAT);
+ nodeSetSocketAvailability(ntree, out_socket_color4f, data_type == CD_PROP_COLOR);
+ nodeSetSocketAvailability(ntree, out_socket_bool, data_type == CD_PROP_BOOL);
+ nodeSetSocketAvailability(ntree, out_socket_int32, data_type == CD_PROP_INT32);
+}
+
+static void node_gather_link_searches(GatherLinkSearchOpParams &params)
+{
+ const NodeDeclaration &declaration = *params.node_type().fixed_declaration;
+ search_link_ops_for_declarations(params, declaration.inputs().take_front(4));
+ search_link_ops_for_declarations(params, declaration.outputs().take_front(3));
+
+ const std::optional<eCustomDataType> type = node_data_type_to_custom_data_type(
+ eNodeSocketDatatype(params.other_socket().type));
+ if (type && *type != CD_PROP_STRING) {
+ /* The input and output sockets have the same name. */
+ params.add_item(IFACE_("Value"), [type](LinkSearchOpParams &params) {
+ bNode &node = params.add_node("GeometryNodeSampleCurve");
+ node_storage(node).data_type = *type;
+ params.update_and_connect_available_socket(node, "Value");
+ });
+ }
}
static void sample_indices_and_lengths(const Span<float> accumulated_lengths,
const Span<float> sample_lengths,
+ const GeometryNodeCurveSampleMode length_mode,
const IndexMask mask,
MutableSpan<int> r_segment_indices,
MutableSpan<float> r_length_in_segment)
@@ -70,10 +140,13 @@ static void sample_indices_and_lengths(const Span<float> accumulated_lengths,
mask.to_best_mask_type([&](const auto mask) {
for (const int64_t i : mask) {
+ const float sample_length = length_mode == GEO_NODE_CURVE_SAMPLE_FACTOR ?
+ sample_lengths[i] * total_length :
+ sample_lengths[i];
int segment_i;
float factor_in_segment;
length_parameterize::sample_at_length(accumulated_lengths,
- std::clamp(sample_lengths[i], 0.0f, total_length),
+ std::clamp(sample_length, 0.0f, total_length),
segment_i,
factor_in_segment,
&hint);
@@ -89,6 +162,7 @@ static void sample_indices_and_lengths(const Span<float> accumulated_lengths,
static void sample_indices_and_factors_to_compressed(const Span<float> accumulated_lengths,
const Span<float> sample_lengths,
+ const GeometryNodeCurveSampleMode length_mode,
const IndexMask mask,
MutableSpan<int> r_segment_indices,
MutableSpan<float> r_factor_in_segment)
@@ -96,16 +170,32 @@ static void sample_indices_and_factors_to_compressed(const Span<float> accumulat
const float total_length = accumulated_lengths.last();
length_parameterize::SampleSegmentHint hint;
- mask.to_best_mask_type([&](const auto mask) {
- for (const int64_t i : IndexRange(mask.size())) {
- const float length = sample_lengths[mask[i]];
- length_parameterize::sample_at_length(accumulated_lengths,
- std::clamp(length, 0.0f, total_length),
- r_segment_indices[i],
- r_factor_in_segment[i],
- &hint);
- }
- });
+ switch (length_mode) {
+ case GEO_NODE_CURVE_SAMPLE_FACTOR:
+ mask.to_best_mask_type([&](const auto mask) {
+ for (const int64_t i : IndexRange(mask.size())) {
+ const float length = sample_lengths[mask[i]] * total_length;
+ length_parameterize::sample_at_length(accumulated_lengths,
+ std::clamp(length, 0.0f, total_length),
+ r_segment_indices[i],
+ r_factor_in_segment[i],
+ &hint);
+ }
+ });
+ break;
+ case GEO_NODE_CURVE_SAMPLE_LENGTH:
+ mask.to_best_mask_type([&](const auto mask) {
+ for (const int64_t i : IndexRange(mask.size())) {
+ const float length = sample_lengths[mask[i]];
+ length_parameterize::sample_at_length(accumulated_lengths,
+ std::clamp(length, 0.0f, total_length),
+ r_segment_indices[i],
+ r_factor_in_segment[i],
+ &hint);
+ }
+ });
+ break;
+ }
}
/**
@@ -115,10 +205,12 @@ static void sample_indices_and_factors_to_compressed(const Span<float> accumulat
class SampleFloatSegmentsFunction : public fn::MultiFunction {
private:
Array<float> accumulated_lengths_;
+ GeometryNodeCurveSampleMode length_mode_;
public:
- SampleFloatSegmentsFunction(Array<float> accumulated_lengths)
- : accumulated_lengths_(std::move(accumulated_lengths))
+ SampleFloatSegmentsFunction(Array<float> accumulated_lengths,
+ const GeometryNodeCurveSampleMode length_mode)
+ : accumulated_lengths_(std::move(accumulated_lengths)), length_mode_(length_mode)
{
static fn::MFSignature signature = create_signature();
this->set_signature(&signature);
@@ -141,7 +233,8 @@ class SampleFloatSegmentsFunction : public fn::MultiFunction {
MutableSpan<float> lengths_in_segments = params.uninitialized_single_output<float>(
2, "Length in Curve");
- sample_indices_and_lengths(accumulated_lengths_, lengths, mask, indices, lengths_in_segments);
+ sample_indices_and_lengths(
+ accumulated_lengths_, lengths, length_mode_, mask, indices, lengths_in_segments);
}
};
@@ -153,15 +246,27 @@ class SampleCurveFunction : public fn::MultiFunction {
* that the curve is not freed before the function can execute.
*/
GeometrySet geometry_set_;
+ GField src_field_;
+ GeometryNodeCurveSampleMode length_mode_;
+
+ fn::MFSignature signature_;
+
+ std::optional<bke::CurvesFieldContext> source_context_;
+ std::unique_ptr<FieldEvaluator> source_evaluator_;
+ const GVArray *source_data_;
public:
- SampleCurveFunction(GeometrySet geometry_set) : geometry_set_(std::move(geometry_set))
+ SampleCurveFunction(GeometrySet geometry_set,
+ const GeometryNodeCurveSampleMode length_mode,
+ const GField &src_field)
+ : geometry_set_(std::move(geometry_set)), src_field_(src_field), length_mode_(length_mode)
{
- static fn::MFSignature signature = create_signature();
- this->set_signature(&signature);
+ signature_ = create_signature();
+ this->set_signature(&signature_);
+ this->evaluate_source();
}
- static fn::MFSignature create_signature()
+ fn::MFSignature create_signature()
{
blender::fn::MFSignatureBuilder signature{"Sample Curve"};
signature.single_input<int>("Curve Index");
@@ -169,6 +274,7 @@ class SampleCurveFunction : public fn::MultiFunction {
signature.single_output<float3>("Position");
signature.single_output<float3>("Tangent");
signature.single_output<float3>("Normal");
+ signature.single_output("Value", src_field_.cpp_type());
return signature.build();
}
@@ -180,6 +286,7 @@ class SampleCurveFunction : public fn::MultiFunction {
3, "Tangent");
MutableSpan<float3> sampled_normals = params.uninitialized_single_output_if_required<float3>(
4, "Normal");
+ GMutableSpan sampled_values = params.uninitialized_single_output_if_required(5, "Value");
auto return_default = [&]() {
if (!sampled_positions.is_empty()) {
@@ -202,6 +309,7 @@ class SampleCurveFunction : public fn::MultiFunction {
if (curves.points_num() == 0) {
return return_default();
}
+ curves.ensure_can_interpolate_to_evaluated();
Span<float3> evaluated_positions = curves.evaluated_positions();
Span<float3> evaluated_tangents;
Span<float3> evaluated_normals;
@@ -218,18 +326,40 @@ class SampleCurveFunction : public fn::MultiFunction {
Array<int> indices;
Array<float> factors;
+ GArray<> src_original_values(source_data_->type());
+ GArray<> src_evaluated_values(source_data_->type());
+
+ auto fill_invalid = [&](const IndexMask mask) {
+ if (!sampled_positions.is_empty()) {
+ sampled_positions.fill_indices(mask, float3(0));
+ }
+ if (!sampled_tangents.is_empty()) {
+ sampled_tangents.fill_indices(mask, float3(0));
+ }
+ if (!sampled_normals.is_empty()) {
+ sampled_normals.fill_indices(mask, float3(0));
+ }
+ if (!sampled_values.is_empty()) {
+ attribute_math::convert_to_static_type(source_data_->type(), [&](auto dummy) {
+ using T = decltype(dummy);
+ sampled_values.typed<T>().fill_indices(mask, {});
+ });
+ }
+ };
auto sample_curve = [&](const int curve_i, const IndexMask mask) {
+ const Span<float> accumulated_lengths = curves.evaluated_lengths_for_curve(curve_i,
+ cyclic[curve_i]);
+ if (accumulated_lengths.is_empty()) {
+ fill_invalid(mask);
+ return;
+ }
/* Store the sampled indices and factors in arrays the size of the mask.
* Then, during interpolation, move the results back to the masked indices. */
indices.reinitialize(mask.size());
factors.reinitialize(mask.size());
sample_indices_and_factors_to_compressed(
- curves.evaluated_lengths_for_curve(curve_i, cyclic[curve_i]),
- lengths,
- mask,
- indices,
- factors);
+ accumulated_lengths, lengths, length_mode_, mask, indices, factors);
const IndexRange evaluated_points = curves.evaluated_points_for_curve(curve_i);
if (!sampled_positions.is_empty()) {
@@ -254,54 +384,67 @@ class SampleCurveFunction : public fn::MultiFunction {
sampled_normals[i] = math::normalize(sampled_normals[i]);
}
}
+ if (!sampled_values.is_empty()) {
+ const IndexRange points = curves.points_for_curve(curve_i);
+ src_original_values.reinitialize(points.size());
+ source_data_->materialize_compressed_to_uninitialized(points, src_original_values.data());
+ src_evaluated_values.reinitialize(curves.evaluated_points_for_curve(curve_i).size());
+ curves.interpolate_to_evaluated(curve_i, src_original_values, src_evaluated_values);
+ attribute_math::convert_to_static_type(source_data_->type(), [&](auto dummy) {
+ using T = decltype(dummy);
+ const Span<T> src_evaluated_values_typed = src_evaluated_values.as_span().typed<T>();
+ MutableSpan<T> sampled_values_typed = sampled_values.typed<T>();
+ length_parameterize::interpolate_to_masked<T>(
+ src_evaluated_values_typed, indices, factors, mask, sampled_values_typed);
+ });
+ }
};
- if (curve_indices.is_single()) {
- sample_curve(curve_indices.get_internal_single(), mask);
+ if (const std::optional<int> curve_i = curve_indices.get_if_single()) {
+ if (curves.curves_range().contains(*curve_i)) {
+ sample_curve(*curve_i, mask);
+ }
+ else {
+ fill_invalid(mask);
+ }
}
else {
+ Vector<int64_t> invalid_indices;
MultiValueMap<int, int64_t> indices_per_curve;
devirtualize_varray(curve_indices, [&](const auto curve_indices) {
for (const int64_t i : mask) {
- indices_per_curve.add(curve_indices[i], i);
+ const int curve_i = curve_indices[i];
+ if (curves.curves_range().contains(curve_i)) {
+ indices_per_curve.add(curve_i, i);
+ }
+ else {
+ invalid_indices.append(i);
+ }
}
});
for (const int curve_i : indices_per_curve.keys()) {
sample_curve(curve_i, IndexMask(indices_per_curve.lookup(curve_i)));
}
+ fill_invalid(IndexMask(invalid_indices));
}
}
-};
-/**
- * Pre-process the lengths or factors used for the sampling, turning factors into lengths, and
- * clamping between zero and the total length of the curves. Do this as a separate operation in the
- * field tree to make the sampling simpler, and to let the evaluator optimize better.
- *
- * \todo Use a mutable single input instead when they are supported.
- */
-static Field<float> get_length_input_field(GeoNodeExecParams params,
- const GeometryNodeCurveSampleMode mode,
- const float curves_total_length)
-{
- if (mode == GEO_NODE_CURVE_SAMPLE_LENGTH) {
- return params.extract_input<Field<float>>("Length");
+ private:
+ void evaluate_source()
+ {
+ const Curves &curves_id = *geometry_set_.get_curves_for_read();
+ const bke::CurvesGeometry &curves = bke::CurvesGeometry::wrap(curves_id.geometry);
+ source_context_.emplace(bke::CurvesFieldContext{curves, ATTR_DOMAIN_POINT});
+ source_evaluator_ = std::make_unique<FieldEvaluator>(*source_context_, curves.points_num());
+ source_evaluator_->add(src_field_);
+ source_evaluator_->evaluate();
+ source_data_ = &source_evaluator_->get_evaluated(0);
}
-
- /* Convert the factor to a length. */
- Field<float> factor_field = params.get_input<Field<float>>("Factor");
- auto clamp_fn = std::make_unique<fn::CustomMF_SI_SO<float, float>>(
- __func__,
- [curves_total_length](float factor) { return factor * curves_total_length; },
- fn::CustomMF_presets::AllSpanOrSingle());
-
- return Field<float>(FieldOperation::Create(std::move(clamp_fn), {std::move(factor_field)}), 0);
-}
+};
static Array<float> curve_accumulated_lengths(const bke::CurvesGeometry &curves)
{
- curves.ensure_evaluated_lengths();
Array<float> curve_lengths(curves.curves_num());
const VArray<bool> cyclic = curves.cyclic();
@@ -313,9 +456,56 @@ static Array<float> curve_accumulated_lengths(const bke::CurvesGeometry &curves)
return curve_lengths;
}
+static GField get_input_attribute_field(GeoNodeExecParams &params, const eCustomDataType data_type)
+{
+ switch (data_type) {
+ case CD_PROP_FLOAT:
+ return params.extract_input<Field<float>>("Value_Float");
+ case CD_PROP_FLOAT3:
+ return params.extract_input<Field<float3>>("Value_Vector");
+ case CD_PROP_COLOR:
+ return params.extract_input<Field<ColorGeometry4f>>("Value_Color");
+ case CD_PROP_BOOL:
+ return params.extract_input<Field<bool>>("Value_Bool");
+ case CD_PROP_INT32:
+ return params.extract_input<Field<int>>("Value_Int");
+ default:
+ BLI_assert_unreachable();
+ }
+ return {};
+}
+
+static void output_attribute_field(GeoNodeExecParams &params, GField field)
+{
+ switch (bke::cpp_type_to_custom_data_type(field.cpp_type())) {
+ case CD_PROP_FLOAT: {
+ params.set_output("Value_Float", Field<float>(field));
+ break;
+ }
+ case CD_PROP_FLOAT3: {
+ params.set_output("Value_Vector", Field<float3>(field));
+ break;
+ }
+ case CD_PROP_COLOR: {
+ params.set_output("Value_Color", Field<ColorGeometry4f>(field));
+ break;
+ }
+ case CD_PROP_BOOL: {
+ params.set_output("Value_Bool", Field<bool>(field));
+ break;
+ }
+ case CD_PROP_INT32: {
+ params.set_output("Value_Int", Field<int>(field));
+ break;
+ }
+ default:
+ break;
+ }
+}
+
static void node_geo_exec(GeoNodeExecParams params)
{
- GeometrySet geometry_set = params.extract_input<GeometrySet>("Curve");
+ GeometrySet geometry_set = params.extract_input<GeometrySet>("Curves");
if (!geometry_set.has_curves()) {
params.set_default_remaining_outputs();
return;
@@ -328,18 +518,18 @@ static void node_geo_exec(GeoNodeExecParams params)
return;
}
- Array<float> curve_lengths = curve_accumulated_lengths(curves);
- const float total_length = curve_lengths.last();
- if (total_length == 0.0f) {
- params.set_default_remaining_outputs();
- return;
- }
+ curves.ensure_evaluated_lengths();
const NodeGeometryCurveSample &storage = node_storage(params.node());
const GeometryNodeCurveSampleMode mode = (GeometryNodeCurveSampleMode)storage.mode;
- Field<float> length_field = get_length_input_field(params, mode, total_length);
+ const eCustomDataType data_type = eCustomDataType(storage.data_type);
- auto sample_fn = std::make_unique<SampleCurveFunction>(std::move(geometry_set));
+ Field<float> length_field = params.extract_input<Field<float>>(
+ mode == GEO_NODE_CURVE_SAMPLE_FACTOR ? "Factor" : "Length");
+ GField src_values_field = get_input_attribute_field(params, data_type);
+
+ auto sample_fn = std::make_unique<SampleCurveFunction>(
+ std::move(geometry_set), mode, std::move(src_values_field));
std::shared_ptr<FieldOperation> sample_op;
if (curves.curves_num() == 1) {
@@ -347,15 +537,26 @@ static void node_geo_exec(GeoNodeExecParams params)
{fn::make_constant_field<int>(0), std::move(length_field)});
}
else {
- auto index_fn = std::make_unique<SampleFloatSegmentsFunction>(std::move(curve_lengths));
- auto index_op = FieldOperation::Create(std::move(index_fn), {std::move(length_field)});
- sample_op = FieldOperation::Create(std::move(sample_fn),
- {Field<int>(index_op, 0), Field<float>(index_op, 1)});
+ Field<int> curve_index;
+ Field<float> length_in_curve;
+ if (storage.use_all_curves) {
+ auto index_fn = std::make_unique<SampleFloatSegmentsFunction>(
+ curve_accumulated_lengths(curves), mode);
+ auto index_op = FieldOperation::Create(std::move(index_fn), {std::move(length_field)});
+ curve_index = Field<int>(index_op, 0);
+ length_in_curve = Field<float>(index_op, 1);
+ }
+ else {
+ curve_index = params.extract_input<Field<int>>("Curve Index");
+ length_in_curve = std::move(length_field);
+ }
+ sample_op = FieldOperation::Create(std::move(sample_fn), {curve_index, length_in_curve});
}
params.set_output("Position", Field<float3>(sample_op, 0));
params.set_output("Tangent", Field<float3>(sample_op, 1));
params.set_output("Normal", Field<float3>(sample_op, 2));
+ output_attribute_field(params, GField(sample_op, 3));
}
} // namespace blender::nodes::node_geo_curve_sample_cc
@@ -369,11 +570,11 @@ void register_node_type_geo_curve_sample()
geo_node_type_base(&ntype, GEO_NODE_SAMPLE_CURVE, "Sample Curve", NODE_CLASS_GEOMETRY);
ntype.geometry_node_execute = file_ns::node_geo_exec;
ntype.declare = file_ns::node_declare;
- node_type_init(&ntype, file_ns::node_type_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
node_type_storage(
&ntype, "NodeGeometryCurveSample", node_free_standard_storage, node_copy_standard_storage);
ntype.draw_buttons = file_ns::node_layout;
-
+ ntype.gather_link_search_ops = file_ns::node_gather_link_searches;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_set_handle_type.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_set_handle_type.cc
index d37af6e5fe8..46377329fb4 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_set_handle_type.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_set_handle_type.cc
@@ -120,7 +120,7 @@ void register_node_type_geo_curve_set_handle_type()
&ntype, GEO_NODE_CURVE_SET_HANDLE_TYPE, "Set Handle Type", NODE_CLASS_GEOMETRY);
ntype.declare = file_ns::node_declare;
ntype.geometry_node_execute = file_ns::node_geo_exec;
- node_type_init(&ntype, file_ns::node_init);
+ ntype.initfunc = file_ns::node_init;
node_type_storage(&ntype,
"NodeGeometryCurveSetHandles",
node_free_standard_storage,
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc
index 9ac6516ee7b..4b8251aadd3 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc
@@ -87,7 +87,7 @@ void register_node_type_geo_curve_spline_type()
geo_node_type_base(&ntype, GEO_NODE_CURVE_SPLINE_TYPE, "Set Spline Type", NODE_CLASS_GEOMETRY);
ntype.declare = file_ns::node_declare;
ntype.geometry_node_execute = file_ns::node_geo_exec;
- node_type_init(&ntype, file_ns::node_init);
+ ntype.initfunc = file_ns::node_init;
node_type_storage(&ntype,
"NodeGeometryCurveSplineType",
node_free_standard_storage,
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc
index e9eaa00b02d..268c927f782 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc
@@ -216,7 +216,7 @@ void register_node_type_geo_curve_to_points()
ntype.draw_buttons = file_ns::node_layout;
node_type_storage(
&ntype, "NodeGeometryCurveToPoints", node_free_standard_storage, node_copy_standard_storage);
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_trim.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_trim.cc
index 15c89d78276..3ec71877b7c 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_trim.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_trim.cc
@@ -202,8 +202,8 @@ void register_node_type_geo_curve_trim()
ntype.declare = file_ns::node_declare;
node_type_storage(
&ntype, "NodeGeometryCurveTrim", node_free_standard_storage, node_copy_standard_storage);
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
ntype.gather_link_search_ops = file_ns::node_gather_link_searches;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc b/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc
index 3e48a9fd923..8ed97f2019f 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc
@@ -1202,7 +1202,7 @@ void register_node_type_geo_delete_geometry()
node_free_standard_storage,
node_copy_standard_storage);
- node_type_init(&ntype, file_ns::node_init);
+ ntype.initfunc = file_ns::node_init;
ntype.declare = file_ns::node_declare;
ntype.geometry_node_execute = file_ns::node_geo_exec;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_distribute_points_in_volume.cc b/source/blender/nodes/geometry/nodes/node_geo_distribute_points_in_volume.cc
index 95173bd23a5..f2e66e03d26 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_distribute_points_in_volume.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_distribute_points_in_volume.cc
@@ -278,8 +278,8 @@ void register_node_type_geo_distribute_points_in_volume()
"NodeGeometryDistributePointsInVolume",
node_free_standard_storage,
node_copy_standard_storage);
- node_type_init(&ntype, blender::nodes::node_distribute_points_in_volume_init);
- node_type_update(&ntype, blender::nodes::node_distribute_points_in_volume_update);
+ ntype.initfunc = blender::nodes::node_distribute_points_in_volume_init;
+ ntype.updatefunc = blender::nodes::node_distribute_points_in_volume_update;
node_type_size(&ntype, 170, 100, 320);
ntype.declare = blender::nodes::geo_node_distribute_points_in_volume_declare;
ntype.geometry_node_execute = blender::nodes::geo_node_distribute_points_in_volume_exec;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_distribute_points_on_faces.cc b/source/blender/nodes/geometry/nodes/node_geo_distribute_points_on_faces.cc
index c2cc70296ed..7c9501608a3 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_distribute_points_on_faces.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_distribute_points_on_faces.cc
@@ -563,7 +563,7 @@ void register_node_type_geo_distribute_points_on_faces()
GEO_NODE_DISTRIBUTE_POINTS_ON_FACES,
"Distribute Points on Faces",
NODE_CLASS_GEOMETRY);
- node_type_update(&ntype, file_ns::node_point_distribute_points_on_faces_update);
+ ntype.updatefunc = file_ns::node_point_distribute_points_on_faces_update;
node_type_size(&ntype, 170, 100, 320);
ntype.declare = file_ns::node_declare;
ntype.geometry_node_execute = file_ns::node_geo_exec;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
index 486f900aca5..f048ec11f77 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
@@ -1149,7 +1149,7 @@ void register_node_type_geo_duplicate_elements()
node_free_standard_storage,
node_copy_standard_storage);
- node_type_init(&ntype, file_ns::node_init);
+ ntype.initfunc = file_ns::node_init;
ntype.draw_buttons = file_ns::node_layout;
ntype.geometry_node_execute = file_ns::node_geo_exec;
ntype.declare = file_ns::node_declare;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc b/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc
index 151ba3e59cc..0062abba909 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc
@@ -154,7 +154,7 @@ static MEdge new_edge(const int v1, const int v2)
MEdge edge;
edge.v1 = v1;
edge.v2 = v2;
- edge.flag = (ME_EDGEDRAW | ME_EDGERENDER);
+ edge.flag = ME_EDGEDRAW;
return edge;
}
@@ -1380,8 +1380,8 @@ void register_node_type_geo_extrude_mesh()
static bNodeType ntype;
geo_node_type_base(&ntype, GEO_NODE_EXTRUDE_MESH, "Extrude Mesh", NODE_CLASS_GEOMETRY);
ntype.declare = file_ns::node_declare;
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
ntype.geometry_node_execute = file_ns::node_geo_exec;
node_type_storage(
&ntype, "NodeGeometryExtrudeMesh", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_image_texture.cc b/source/blender/nodes/geometry/nodes/node_geo_image_texture.cc
index f39337d3fc3..0d339620047 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_image_texture.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_image_texture.cc
@@ -402,7 +402,7 @@ void register_node_type_geo_image_texture()
geo_node_type_base(&ntype, GEO_NODE_IMAGE_TEXTURE, "Image Texture", NODE_CLASS_TEXTURE);
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_layout;
- node_type_init(&ntype, file_ns::node_init);
+ ntype.initfunc = file_ns::node_init;
node_type_storage(
&ntype, "NodeGeometryImageTexture", node_free_standard_storage, node_copy_standard_storage);
node_type_size_preset(&ntype, NODE_SIZE_LARGE);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_named_attribute.cc b/source/blender/nodes/geometry/nodes/node_geo_input_named_attribute.cc
index 1063a022e9d..9d1f90ba0f3 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_named_attribute.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_named_attribute.cc
@@ -126,7 +126,7 @@ void register_node_type_geo_input_named_attribute()
ntype.draw_buttons = file_ns::node_layout;
ntype.gather_link_search_ops = file_ns::node_gather_link_searches;
ntype.updatefunc = file_ns::node_update;
- node_type_init(&ntype, file_ns::node_init);
+ ntype.initfunc = file_ns::node_init;
node_type_storage(&ntype,
"NodeGeometryInputNamedAttribute",
node_free_standard_storage,
diff --git a/source/blender/nodes/geometry/nodes/node_geo_merge_by_distance.cc b/source/blender/nodes/geometry/nodes/node_geo_merge_by_distance.cc
index ce8b078f195..8ab8c4afaa9 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_merge_by_distance.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_merge_by_distance.cc
@@ -132,7 +132,7 @@ void register_node_type_geo_merge_by_distance()
static bNodeType ntype;
geo_node_type_base(&ntype, GEO_NODE_MERGE_BY_DISTANCE, "Merge by Distance", NODE_CLASS_GEOMETRY);
- node_type_init(&ntype, file_ns::node_init);
+ ntype.initfunc = file_ns::node_init;
node_type_storage(&ntype,
"NodeGeometryMergeByDistance",
node_free_standard_storage,
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc
index 31a3e967905..14f38efbd42 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc
@@ -127,7 +127,7 @@ static Mesh *create_circle_mesh(const float radius,
/* Create outer edges. */
const short edge_flag = (fill_type == GEO_NODE_MESH_CIRCLE_FILL_NONE) ?
ME_LOOSEEDGE :
- (ME_EDGEDRAW | ME_EDGERENDER); /* NGON or TRIANGLE_FAN */
+ ME_EDGEDRAW; /* NGON or TRIANGLE_FAN */
for (const int i : IndexRange(verts_num)) {
MEdge &edge = edges[i];
edge.v1 = i;
@@ -141,7 +141,7 @@ static Mesh *create_circle_mesh(const float radius,
MEdge &edge = edges[verts_num + i];
edge.v1 = verts_num;
edge.v2 = i;
- edge.flag = ME_EDGEDRAW | ME_EDGERENDER;
+ edge.flag = ME_EDGEDRAW;
}
}
@@ -205,7 +205,7 @@ void register_node_type_geo_mesh_primitive_circle()
static bNodeType ntype;
geo_node_type_base(&ntype, GEO_NODE_MESH_PRIMITIVE_CIRCLE, "Mesh Circle", NODE_CLASS_GEOMETRY);
- node_type_init(&ntype, file_ns::node_init);
+ ntype.initfunc = file_ns::node_init;
node_type_storage(
&ntype, "NodeGeometryMeshCircle", node_free_standard_storage, node_copy_standard_storage);
ntype.geometry_node_execute = file_ns::node_geo_exec;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc
index 4a9264b8464..dca91d2dc61 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc
@@ -329,7 +329,7 @@ static void calculate_cone_edges(const MutableSpan<MEdge> &edges, const ConeConf
MEdge &edge = edges[edge_index++];
edge.v1 = config.first_vert;
edge.v2 = config.first_ring_verts_start + i;
- edge.flag = ME_EDGEDRAW | ME_EDGERENDER;
+ edge.flag = ME_EDGEDRAW;
}
}
@@ -342,7 +342,7 @@ static void calculate_cone_edges(const MutableSpan<MEdge> &edges, const ConeConf
MEdge &edge = edges[edge_index++];
edge.v1 = this_ring_vert_start + j;
edge.v2 = this_ring_vert_start + ((j + 1) % config.circle_segments);
- edge.flag = ME_EDGEDRAW | ME_EDGERENDER;
+ edge.flag = ME_EDGEDRAW;
}
if (i == config.tot_edge_rings - 1) {
/* There is one fewer ring of connecting edges. */
@@ -353,7 +353,7 @@ static void calculate_cone_edges(const MutableSpan<MEdge> &edges, const ConeConf
MEdge &edge = edges[edge_index++];
edge.v1 = this_ring_vert_start + j;
edge.v2 = next_ring_vert_start + j;
- edge.flag = ME_EDGEDRAW | ME_EDGERENDER;
+ edge.flag = ME_EDGEDRAW;
}
}
@@ -363,7 +363,7 @@ static void calculate_cone_edges(const MutableSpan<MEdge> &edges, const ConeConf
MEdge &edge = edges[edge_index++];
edge.v1 = config.last_ring_verts_start + i;
edge.v2 = config.last_vert;
- edge.flag = ME_EDGEDRAW | ME_EDGERENDER;
+ edge.flag = ME_EDGEDRAW;
}
}
}
@@ -854,8 +854,8 @@ void register_node_type_geo_mesh_primitive_cone()
static bNodeType ntype;
geo_node_type_base(&ntype, GEO_NODE_MESH_PRIMITIVE_CONE, "Cone", NODE_CLASS_GEOMETRY);
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
node_type_storage(
&ntype, "NodeGeometryMeshCone", node_free_standard_storage, node_copy_standard_storage);
ntype.geometry_node_execute = file_ns::node_geo_exec;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cylinder.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cylinder.cc
index f192b385b1b..b02b1fbae27 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cylinder.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cylinder.cc
@@ -154,8 +154,8 @@ void register_node_type_geo_mesh_primitive_cylinder()
static bNodeType ntype;
geo_node_type_base(&ntype, GEO_NODE_MESH_PRIMITIVE_CYLINDER, "Cylinder", NODE_CLASS_GEOMETRY);
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
node_type_storage(
&ntype, "NodeGeometryMeshCylinder", node_free_standard_storage, node_copy_standard_storage);
ntype.declare = file_ns::node_declare;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_grid.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_grid.cc
index 6f0b8283b72..e8ee057ee5c 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_grid.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_grid.cc
@@ -76,8 +76,7 @@ Mesh *create_grid_mesh(const int verts_x,
const int y_edges_start = 0;
const int x_edges_start = verts_x * edges_y;
- const short edge_flag = (edges_x == 0 || edges_y == 0) ? ME_LOOSEEDGE :
- ME_EDGEDRAW | ME_EDGERENDER;
+ const short edge_flag = (edges_x == 0 || edges_y == 0) ? ME_LOOSEEDGE : ME_EDGEDRAW;
/* Build the horizontal edges in the X direction. */
threading::parallel_for(IndexRange(verts_x), 512, [&](IndexRange x_range) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_line.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_line.cc
index 7faa7e23274..51a4f36507e 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_line.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_line.cc
@@ -214,8 +214,8 @@ void register_node_type_geo_mesh_primitive_line()
geo_node_type_base(&ntype, GEO_NODE_MESH_PRIMITIVE_LINE, "Mesh Line", NODE_CLASS_GEOMETRY);
ntype.declare = file_ns::node_declare;
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
node_type_storage(
&ntype, "NodeGeometryMeshLine", node_free_standard_storage, node_copy_standard_storage);
ntype.geometry_node_execute = file_ns::node_geo_exec;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc
index 4b43693f0f6..cfa1c477b28 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc
@@ -116,7 +116,7 @@ BLI_NOINLINE static void calculate_sphere_edge_indices(MutableSpan<MEdge> edges,
MEdge &edge = edges[edge_index++];
edge.v1 = 0;
edge.v2 = first_vert_ring_index_start + segment;
- edge.flag = ME_EDGEDRAW | ME_EDGERENDER;
+ edge.flag = ME_EDGEDRAW;
}
int ring_vert_index_start = 1;
@@ -128,7 +128,7 @@ BLI_NOINLINE static void calculate_sphere_edge_indices(MutableSpan<MEdge> edges,
MEdge &edge = edges[edge_index++];
edge.v1 = ring_vert_index_start + segment;
edge.v2 = ring_vert_index_start + ((segment + 1) % segments);
- edge.flag = ME_EDGEDRAW | ME_EDGERENDER;
+ edge.flag = ME_EDGEDRAW;
}
/* Add the edges connecting to the next ring. */
@@ -137,7 +137,7 @@ BLI_NOINLINE static void calculate_sphere_edge_indices(MutableSpan<MEdge> edges,
MEdge &edge = edges[edge_index++];
edge.v1 = ring_vert_index_start + segment;
edge.v2 = next_ring_vert_index_start + segment;
- edge.flag = ME_EDGEDRAW | ME_EDGERENDER;
+ edge.flag = ME_EDGEDRAW;
}
}
ring_vert_index_start += segments;
@@ -150,7 +150,7 @@ BLI_NOINLINE static void calculate_sphere_edge_indices(MutableSpan<MEdge> edges,
MEdge &edge = edges[edge_index++];
edge.v1 = last_vert_index;
edge.v2 = last_vert_ring_start + segment;
- edge.flag = ME_EDGEDRAW | ME_EDGERENDER;
+ edge.flag = ME_EDGEDRAW;
}
}
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_to_points.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_to_points.cc
index d97a0e72060..d47e0c0f101 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_mesh_to_points.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_to_points.cc
@@ -163,7 +163,7 @@ void register_node_type_geo_mesh_to_points()
geo_node_type_base(&ntype, GEO_NODE_MESH_TO_POINTS, "Mesh to Points", NODE_CLASS_GEOMETRY);
ntype.declare = file_ns::node_declare;
ntype.geometry_node_execute = file_ns::node_geo_exec;
- node_type_init(&ntype, file_ns::node_init);
+ ntype.initfunc = file_ns::node_init;
ntype.draw_buttons = file_ns::node_layout;
node_type_storage(
&ntype, "NodeGeometryMeshToPoints", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_to_volume.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_to_volume.cc
index 8885903f828..cf4d058cd31 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_mesh_to_volume.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_to_volume.cc
@@ -174,8 +174,8 @@ void register_node_type_geo_mesh_to_volume()
geo_node_type_base(&ntype, GEO_NODE_MESH_TO_VOLUME, "Mesh to Volume", NODE_CLASS_GEOMETRY);
ntype.declare = file_ns::node_declare;
node_type_size(&ntype, 200, 120, 700);
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
ntype.geometry_node_execute = file_ns::node_geo_exec;
ntype.draw_buttons = file_ns::node_layout;
node_type_storage(
diff --git a/source/blender/nodes/geometry/nodes/node_geo_object_info.cc b/source/blender/nodes/geometry/nodes/node_geo_object_info.cc
index bf064c6fcbe..f1a9987e721 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_object_info.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_object_info.cc
@@ -45,8 +45,8 @@ static void node_geo_exec(GeoNodeExecParams params)
return;
}
- const float4x4 &object_matrix = object->obmat;
- const float4x4 transform = float4x4(self_object->imat) * object_matrix;
+ const float4x4 &object_matrix = object->object_to_world;
+ const float4x4 transform = float4x4(self_object->world_to_object) * object_matrix;
if (transform_space_relative) {
params.set_output("Location", transform.translation());
@@ -106,7 +106,7 @@ void register_node_type_geo_object_info()
static bNodeType ntype;
geo_node_type_base(&ntype, GEO_NODE_OBJECT_INFO, "Object Info", NODE_CLASS_INPUT);
- node_type_init(&ntype, file_ns::node_node_init);
+ ntype.initfunc = file_ns::node_node_init;
node_type_storage(
&ntype, "NodeGeometryObjectInfo", node_free_standard_storage, node_copy_standard_storage);
ntype.geometry_node_execute = file_ns::node_geo_exec;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_points_to_volume.cc b/source/blender/nodes/geometry/nodes/node_geo_points_to_volume.cc
index 45f6820f2e5..d0b7f6a455f 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_points_to_volume.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_points_to_volume.cc
@@ -258,8 +258,8 @@ void register_node_type_geo_points_to_volume()
node_free_standard_storage,
node_copy_standard_storage);
node_type_size(&ntype, 170, 120, 700);
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
ntype.declare = file_ns::node_declare;
ntype.geometry_node_execute = file_ns::node_geo_exec;
ntype.draw_buttons = file_ns::node_layout;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_proximity.cc b/source/blender/nodes/geometry/nodes/node_geo_proximity.cc
index 21f4449baee..92a409f9db6 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_proximity.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_proximity.cc
@@ -228,7 +228,7 @@ void register_node_type_geo_proximity()
static bNodeType ntype;
geo_node_type_base(&ntype, GEO_NODE_PROXIMITY, "Geometry Proximity", NODE_CLASS_GEOMETRY);
- node_type_init(&ntype, file_ns::geo_proximity_init);
+ ntype.initfunc = file_ns::geo_proximity_init;
node_type_storage(
&ntype, "NodeGeometryProximity", node_free_standard_storage, node_copy_standard_storage);
ntype.declare = file_ns::node_declare;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_raycast.cc b/source/blender/nodes/geometry/nodes/node_geo_raycast.cc
index d248bc539b1..b3dbc9ee866 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_raycast.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_raycast.cc
@@ -435,8 +435,8 @@ void register_node_type_geo_raycast()
geo_node_type_base(&ntype, GEO_NODE_RAYCAST, "Raycast", NODE_CLASS_GEOMETRY);
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
node_type_storage(
&ntype, "NodeGeometryRaycast", node_free_standard_storage, node_copy_standard_storage);
ntype.declare = file_ns::node_declare;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_sample_index.cc b/source/blender/nodes/geometry/nodes/node_geo_sample_index.cc
index 4d2db059798..22c18504985 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_sample_index.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_sample_index.cc
@@ -325,8 +325,8 @@ void register_node_type_geo_sample_index()
static bNodeType ntype;
geo_node_type_base(&ntype, GEO_NODE_SAMPLE_INDEX, "Sample Index", NODE_CLASS_GEOMETRY);
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
ntype.declare = file_ns::node_declare;
node_type_storage(
&ntype, "NodeGeometrySampleIndex", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_sample_nearest.cc b/source/blender/nodes/geometry/nodes/node_geo_sample_nearest.cc
index 8c5dad3a1c5..7028b013dc6 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_sample_nearest.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_sample_nearest.cc
@@ -334,7 +334,7 @@ void register_node_type_geo_sample_nearest()
static bNodeType ntype;
geo_node_type_base(&ntype, GEO_NODE_SAMPLE_NEAREST, "Sample Nearest", NODE_CLASS_GEOMETRY);
- node_type_init(&ntype, file_ns::node_init);
+ ntype.initfunc = file_ns::node_init;
ntype.declare = file_ns::node_declare;
ntype.geometry_node_execute = file_ns::node_geo_exec;
ntype.draw_buttons = file_ns::node_layout;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_sample_nearest_surface.cc b/source/blender/nodes/geometry/nodes/node_geo_sample_nearest_surface.cc
index 95bf7199d63..503f6264191 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_sample_nearest_surface.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_sample_nearest_surface.cc
@@ -267,8 +267,8 @@ void register_node_type_geo_sample_nearest_surface()
geo_node_type_base(
&ntype, GEO_NODE_SAMPLE_NEAREST_SURFACE, "Sample Nearest Surface", NODE_CLASS_GEOMETRY);
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
ntype.declare = file_ns::node_declare;
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
ntype.geometry_node_execute = file_ns::node_geo_exec;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_sample_uv_surface.cc b/source/blender/nodes/geometry/nodes/node_geo_sample_uv_surface.cc
index 2e8446ba559..0a6dd569395 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_sample_uv_surface.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_sample_uv_surface.cc
@@ -284,8 +284,8 @@ void register_node_type_geo_sample_uv_surface()
static bNodeType ntype;
geo_node_type_base(&ntype, GEO_NODE_SAMPLE_UV_SURFACE, "Sample UV Surface", NODE_CLASS_GEOMETRY);
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
ntype.declare = file_ns::node_declare;
ntype.geometry_node_execute = file_ns::node_geo_exec;
ntype.draw_buttons = file_ns::node_layout;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_separate_geometry.cc b/source/blender/nodes/geometry/nodes/node_geo_separate_geometry.cc
index 44d12466d9e..d4da5dda647 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_separate_geometry.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_separate_geometry.cc
@@ -87,7 +87,7 @@ void register_node_type_geo_separate_geometry()
node_free_standard_storage,
node_copy_standard_storage);
- node_type_init(&ntype, file_ns::node_init);
+ ntype.initfunc = file_ns::node_init;
ntype.declare = file_ns::node_declare;
ntype.geometry_node_execute = file_ns::node_geo_exec;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_set_curve_handles.cc b/source/blender/nodes/geometry/nodes/node_geo_set_curve_handles.cc
index c143203337a..48be899bec9 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_set_curve_handles.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_set_curve_handles.cc
@@ -174,7 +174,7 @@ void register_node_type_geo_set_curve_handles()
ntype.geometry_node_execute = file_ns::node_geo_exec;
ntype.declare = file_ns::node_declare;
ntype.minwidth = 100.0f;
- node_type_init(&ntype, file_ns::node_init);
+ ntype.initfunc = file_ns::node_init;
node_type_storage(&ntype,
"NodeGeometrySetCurveHandlePositions",
node_free_standard_storage,
diff --git a/source/blender/nodes/geometry/nodes/node_geo_set_curve_normal.cc b/source/blender/nodes/geometry/nodes/node_geo_set_curve_normal.cc
index e2169966f5a..287c5920134 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_set_curve_normal.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_set_curve_normal.cc
@@ -66,7 +66,7 @@ void register_node_type_geo_set_curve_normal()
geo_node_type_base(&ntype, GEO_NODE_SET_CURVE_NORMAL, "Set Curve Normal", NODE_CLASS_GEOMETRY);
ntype.declare = file_ns::node_declare;
ntype.geometry_node_execute = file_ns::node_geo_exec;
- node_type_init(&ntype, file_ns::node_init);
+ ntype.initfunc = file_ns::node_init;
ntype.draw_buttons = file_ns::node_layout;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_set_spline_resolution.cc b/source/blender/nodes/geometry/nodes/node_geo_set_spline_resolution.cc
index d46ceac92ba..dcd910b8ad2 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_set_spline_resolution.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_set_spline_resolution.cc
@@ -24,11 +24,13 @@ static void set_resolution(bke::CurvesGeometry &curves,
MutableAttributeAccessor attributes = curves.attributes_for_write();
AttributeWriter<int> resolutions = attributes.lookup_or_add_for_write<int>("resolution",
ATTR_DOMAIN_CURVE);
+ bke::AttributeValidator validator = attributes.lookup_validator("resolution");
bke::CurvesFieldContext field_context{curves, ATTR_DOMAIN_CURVE};
fn::FieldEvaluator evaluator{field_context, curves.curves_num()};
evaluator.set_selection(selection_field);
- evaluator.add_with_destination(resolution_field, resolutions.varray);
+ evaluator.add_with_destination(validator.validate_field_if_necessary(resolution_field),
+ resolutions.varray);
evaluator.evaluate();
resolutions.finish();
diff --git a/source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc b/source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc
index 3c85fd459e1..b71dba98daa 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc
@@ -192,7 +192,7 @@ void register_node_type_geo_store_named_attribute()
node_free_standard_storage,
node_copy_standard_storage);
node_type_size(&ntype, 140, 100, 700);
- node_type_init(&ntype, file_ns::node_init);
+ ntype.initfunc = file_ns::node_init;
ntype.updatefunc = file_ns::node_update;
ntype.declare = file_ns::node_declare;
ntype.gather_link_search_ops = file_ns::node_gather_link_searches;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc b/source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc
index 769a63f58cf..405c2761711 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc
@@ -405,8 +405,8 @@ void register_node_type_geo_string_to_curves()
geo_node_type_base(&ntype, GEO_NODE_STRING_TO_CURVES, "String to Curves", NODE_CLASS_GEOMETRY);
ntype.declare = file_ns::node_declare;
ntype.geometry_node_execute = file_ns::node_geo_exec;
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
node_type_size(&ntype, 190, 120, 700);
node_type_storage(&ntype,
"NodeGeometryStringToCurves",
diff --git a/source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc b/source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc
index 2e6ad02bfd5..7b4608d32a5 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc
@@ -191,7 +191,7 @@ void register_node_type_geo_subdivision_surface()
ntype.declare = file_ns::node_declare;
ntype.geometry_node_execute = file_ns::node_geo_exec;
ntype.draw_buttons = file_ns::node_layout;
- node_type_init(&ntype, file_ns::node_init);
+ ntype.initfunc = file_ns::node_init;
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
node_type_storage(&ntype,
"NodeGeometrySubdivisionSurface",
diff --git a/source/blender/nodes/geometry/nodes/node_geo_switch.cc b/source/blender/nodes/geometry/nodes/node_geo_switch.cc
index 36be68f1a22..bd3ac271817 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_switch.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_switch.cc
@@ -290,8 +290,8 @@ void register_node_type_geo_switch()
geo_node_type_base(&ntype, GEO_NODE_SWITCH, "Switch", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::node_declare;
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
node_type_storage(&ntype, "NodeSwitch", node_free_standard_storage, node_copy_standard_storage);
ntype.geometry_node_execute = file_ns::node_geo_exec;
ntype.geometry_node_execute_supports_laziness = true;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_triangulate.cc b/source/blender/nodes/geometry/nodes/node_geo_triangulate.cc
index cedc1ef845b..5cb78b3abe8 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_triangulate.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_triangulate.cc
@@ -100,7 +100,7 @@ void register_node_type_geo_triangulate()
geo_node_type_base(&ntype, GEO_NODE_TRIANGULATE, "Triangulate", NODE_CLASS_GEOMETRY);
ntype.declare = file_ns::node_declare;
- node_type_init(&ntype, file_ns::geo_triangulate_init);
+ ntype.initfunc = file_ns::geo_triangulate_init;
ntype.geometry_node_execute = file_ns::node_geo_exec;
ntype.draw_buttons = file_ns::node_layout;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_uv_unwrap.cc b/source/blender/nodes/geometry/nodes/node_geo_uv_unwrap.cc
index e45ce6b42b4..eff3b969250 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_uv_unwrap.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_uv_unwrap.cc
@@ -189,7 +189,7 @@ void register_node_type_geo_uv_unwrap()
static bNodeType ntype;
geo_node_type_base(&ntype, GEO_NODE_UV_UNWRAP, "UV Unwrap", NODE_CLASS_CONVERTER);
- node_type_init(&ntype, file_ns::node_init);
+ ntype.initfunc = file_ns::node_init;
node_type_storage(
&ntype, "NodeGeometryUVUnwrap", node_free_standard_storage, node_copy_standard_storage);
ntype.declare = file_ns::node_declare;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_viewer.cc b/source/blender/nodes/geometry/nodes/node_geo_viewer.cc
index e9050f9e6a1..53a8cd79f52 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_viewer.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_viewer.cc
@@ -135,8 +135,8 @@ void register_node_type_geo_viewer()
geo_node_type_base(&ntype, GEO_NODE_VIEWER, "Viewer", NODE_CLASS_OUTPUT);
node_type_storage(
&ntype, "NodeGeometryViewer", node_free_standard_storage, node_copy_standard_storage);
- node_type_update(&ntype, file_ns::node_update);
- node_type_init(&ntype, file_ns::node_init);
+ ntype.updatefunc = file_ns::node_update;
+ ntype.initfunc = file_ns::node_init;
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_layout;
ntype.draw_buttons_ex = file_ns::node_layout_ex;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_volume_to_mesh.cc b/source/blender/nodes/geometry/nodes/node_geo_volume_to_mesh.cc
index 88e7718ed3c..c076a6c08f3 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_volume_to_mesh.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_volume_to_mesh.cc
@@ -215,8 +215,8 @@ void register_node_type_geo_volume_to_mesh()
node_type_storage(
&ntype, "NodeGeometryVolumeToMesh", node_free_standard_storage, node_copy_standard_storage);
node_type_size(&ntype, 170, 120, 700);
- node_type_init(&ntype, file_ns::node_init);
- node_type_update(&ntype, file_ns::node_update);
+ ntype.initfunc = file_ns::node_init;
+ ntype.updatefunc = file_ns::node_update;
ntype.geometry_node_execute = file_ns::node_geo_exec;
ntype.draw_buttons = file_ns::node_layout;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/intern/node_common.cc b/source/blender/nodes/intern/node_common.cc
index d7cc0b6065a..975bf0c01ca 100644
--- a/source/blender/nodes/intern/node_common.cc
+++ b/source/blender/nodes/intern/node_common.cc
@@ -22,6 +22,7 @@
#include "BLT_translation.h"
#include "BKE_node.h"
+#include "BKE_node_runtime.hh"
#include "BKE_node_tree_update.h"
#include "RNA_types.h"
@@ -86,8 +87,6 @@ bool nodeGroupPoll(const bNodeTree *nodetree,
const bNodeTree *grouptree,
const char **r_disabled_hint)
{
- bool valid = true;
-
/* unspecified node group, generally allowed
* (if anything, should be avoided on operator level)
*/
@@ -106,11 +105,10 @@ bool nodeGroupPoll(const bNodeTree *nodetree,
if (node->typeinfo->poll_instance &&
!node->typeinfo->poll_instance(
const_cast<bNode *>(node), const_cast<bNodeTree *>(nodetree), r_disabled_hint)) {
- valid = false;
- break;
+ return false;
}
}
- return valid;
+ return true;
}
static void add_new_socket_from_interface(bNodeTree &node_tree,
@@ -255,7 +253,7 @@ void register_node_type_frame()
ntype->free_self = (void (*)(bNodeType *))MEM_freeN;
node_type_base(ntype, NODE_FRAME, "Frame", NODE_CLASS_LAYOUT);
- node_type_init(ntype, node_frame_init);
+ ntype->initfunc = node_frame_init;
node_type_storage(ntype, "NodeFrame", node_free_standard_storage, node_copy_standard_storage);
node_type_size(ntype, 150, 100, 0);
ntype->flag |= NODE_BACKGROUND;
@@ -285,7 +283,7 @@ void register_node_type_reroute()
ntype->free_self = (void (*)(bNodeType *))MEM_freeN;
node_type_base(ntype, NODE_REROUTE, "Reroute", NODE_CLASS_LAYOUT);
- node_type_init(ntype, node_reroute_init);
+ ntype->initfunc = node_reroute_init;
nodeRegisterType(ntype);
}
@@ -381,53 +379,29 @@ void ntree_update_reroute_nodes(bNodeTree *ntree)
}
}
-static bool node_is_connected_to_output_recursive(bNodeTree *ntree, bNode *node)
+bool BKE_node_is_connected_to_output(const bNodeTree *ntree, const bNode *node)
{
- bNodeLink *link;
-
- /* avoid redundant checks, and infinite loops in case of cyclic node links */
- if (node->done) {
- return false;
- }
- node->done = 1;
-
- /* main test, done before child loop so it catches output nodes themselves as well */
- if (node->typeinfo->nclass == NODE_CLASS_OUTPUT && node->flag & NODE_DO_OUTPUT) {
- return true;
+ ntree->ensure_topology_cache();
+ Stack<const bNode *> nodes_to_check;
+ for (const bNodeSocket *socket : node->output_sockets()) {
+ for (const bNodeLink *link : socket->directly_linked_links()) {
+ nodes_to_check.push(link->tonode);
+ }
}
-
- /* test all connected nodes, first positive find is sufficient to return true */
- for (link = (bNodeLink *)ntree->links.first; link; link = link->next) {
- if (link->fromnode == node) {
- if (node_is_connected_to_output_recursive(ntree, link->tonode)) {
- return true;
+ while (!nodes_to_check.is_empty()) {
+ const bNode *next_node = nodes_to_check.pop();
+ for (const bNodeSocket *socket : next_node->output_sockets()) {
+ for (const bNodeLink *link : socket->directly_linked_links()) {
+ if (link->tonode->typeinfo->nclass == NODE_CLASS_OUTPUT &&
+ link->tonode->flag & NODE_DO_OUTPUT) {
+ return true;
+ }
+ nodes_to_check.push(link->tonode);
}
}
}
- return false;
-}
-
-bool BKE_node_is_connected_to_output(bNodeTree *ntree, bNode *node)
-{
- bNode *tnode;
- /* clear flags */
- for (tnode = (bNode *)ntree->nodes.first; tnode; tnode = tnode->next) {
- tnode->done = 0;
- }
-
- return node_is_connected_to_output_recursive(ntree, node);
-}
-
-void BKE_node_tree_unlink_id(ID *id, struct bNodeTree *ntree)
-{
- bNode *node;
-
- for (node = (bNode *)ntree->nodes.first; node; node = node->next) {
- if (node->id == id) {
- node->id = nullptr;
- }
- }
+ return false;
}
/** \} */
@@ -460,62 +434,53 @@ bNodeSocket *node_group_input_find_socket(bNode *node, const char *identifier)
void node_group_input_update(bNodeTree *ntree, bNode *node)
{
bNodeSocket *extsock = (bNodeSocket *)node->outputs.last;
- bNodeLink *link, *linknext, *exposelink;
/* Adding a tree socket and verifying will remove the extension socket!
* This list caches the existing links from the extension socket
- * so they can be recreated after verification.
- */
- ListBase tmplinks;
+ * so they can be recreated after verification. */
+ Vector<bNodeLink> temp_links;
/* find links from the extension socket and store them */
- BLI_listbase_clear(&tmplinks);
- for (link = (bNodeLink *)ntree->links.first; link; link = linknext) {
- linknext = link->next;
+ LISTBASE_FOREACH_MUTABLE (bNodeLink *, link, &ntree->links) {
if (nodeLinkIsHidden(link)) {
continue;
}
if (link->fromsock == extsock) {
- bNodeLink *tlink = MEM_cnew<bNodeLink>("temporary link");
- *tlink = *link;
- BLI_addtail(&tmplinks, tlink);
-
+ temp_links.append(*link);
nodeRemLink(ntree, link);
}
}
/* find valid link to expose */
- exposelink = nullptr;
- for (link = (bNodeLink *)tmplinks.first; link; link = link->next) {
+ bNodeLink *exposelink = nullptr;
+ for (bNodeLink &link : temp_links) {
/* XXX Multiple sockets can be connected to the extension socket at once,
* in that case the arbitrary first link determines name and type.
* This could be improved by choosing the "best" type among all links,
* whatever that means.
*/
- if (!is_group_extension_socket(link->tonode, link->tosock)) {
- exposelink = link;
+ if (!is_group_extension_socket(link.tonode, link.tosock)) {
+ exposelink = &link;
break;
}
}
if (exposelink) {
- bNodeSocket *gsock, *newsock;
-
- gsock = ntreeAddSocketInterfaceFromSocket(ntree, exposelink->tonode, exposelink->tosock);
+ bNodeSocket *gsock = ntreeAddSocketInterfaceFromSocket(
+ ntree, exposelink->tonode, exposelink->tosock);
node_group_input_update(ntree, node);
- newsock = node_group_input_find_socket(node, gsock->identifier);
+ bNodeSocket *newsock = node_group_input_find_socket(node, gsock->identifier);
/* redirect links from the extension socket */
- for (link = (bNodeLink *)tmplinks.first; link; link = link->next) {
- bNodeLink *newlink = nodeAddLink(ntree, node, newsock, link->tonode, link->tosock);
+ for (bNodeLink &link : temp_links) {
+ bNodeLink *newlink = nodeAddLink(ntree, node, newsock, link.tonode, link.tosock);
if (newlink->tosock->flag & SOCK_MULTI_INPUT) {
- newlink->multi_input_socket_index = link->multi_input_socket_index;
+ newlink->multi_input_socket_index = link.multi_input_socket_index;
}
}
}
- BLI_freelistN(&tmplinks);
group_verify_socket_list(*ntree, *node, ntree->inputs, node->outputs, SOCK_OUT, true);
}
@@ -527,8 +492,8 @@ void register_node_type_group_input()
node_type_base(ntype, NODE_GROUP_INPUT, "Group Input", NODE_CLASS_INTERFACE);
node_type_size(ntype, 140, 80, 400);
- node_type_init(ntype, node_group_input_init);
- node_type_update(ntype, node_group_input_update);
+ ntype->initfunc = node_group_input_init;
+ ntype->updatefunc = node_group_input_update;
nodeRegisterType(ntype);
}
@@ -552,60 +517,51 @@ bNodeSocket *node_group_output_find_socket(bNode *node, const char *identifier)
void node_group_output_update(bNodeTree *ntree, bNode *node)
{
bNodeSocket *extsock = (bNodeSocket *)node->inputs.last;
- bNodeLink *link, *linknext, *exposelink;
/* Adding a tree socket and verifying will remove the extension socket!
* This list caches the existing links to the extension socket
- * so they can be recreated after verification.
- */
- ListBase tmplinks;
+ * so they can be recreated after verification. */
+ Vector<bNodeLink> temp_links;
/* find links to the extension socket and store them */
- BLI_listbase_clear(&tmplinks);
- for (link = (bNodeLink *)ntree->links.first; link; link = linknext) {
- linknext = link->next;
+ LISTBASE_FOREACH_MUTABLE (bNodeLink *, link, &ntree->links) {
if (nodeLinkIsHidden(link)) {
continue;
}
if (link->tosock == extsock) {
- bNodeLink *tlink = MEM_cnew<bNodeLink>("temporary link");
- *tlink = *link;
- BLI_addtail(&tmplinks, tlink);
-
+ temp_links.append(*link);
nodeRemLink(ntree, link);
}
}
/* find valid link to expose */
- exposelink = nullptr;
- for (link = (bNodeLink *)tmplinks.first; link; link = link->next) {
+ bNodeLink *exposelink = nullptr;
+ for (bNodeLink &link : temp_links) {
/* XXX Multiple sockets can be connected to the extension socket at once,
* in that case the arbitrary first link determines name and type.
* This could be improved by choosing the "best" type among all links,
* whatever that means.
*/
- if (!is_group_extension_socket(link->fromnode, link->fromsock)) {
- exposelink = link;
+ if (!is_group_extension_socket(link.fromnode, link.fromsock)) {
+ exposelink = &link;
break;
}
}
if (exposelink) {
- bNodeSocket *gsock, *newsock;
-
/* XXX what if connecting virtual to virtual socket?? */
- gsock = ntreeAddSocketInterfaceFromSocket(ntree, exposelink->fromnode, exposelink->fromsock);
+ bNodeSocket *gsock = ntreeAddSocketInterfaceFromSocket(
+ ntree, exposelink->fromnode, exposelink->fromsock);
node_group_output_update(ntree, node);
- newsock = node_group_output_find_socket(node, gsock->identifier);
+ bNodeSocket *newsock = node_group_output_find_socket(node, gsock->identifier);
/* redirect links to the extension socket */
- for (link = (bNodeLink *)tmplinks.first; link; link = link->next) {
- nodeAddLink(ntree, link->fromnode, link->fromsock, node, newsock);
+ for (bNodeLink &link : temp_links) {
+ nodeAddLink(ntree, link.fromnode, link.fromsock, node, newsock);
}
}
- BLI_freelistN(&tmplinks);
group_verify_socket_list(*ntree, *node, ntree->outputs, node->inputs, SOCK_IN, true);
}
@@ -617,8 +573,8 @@ void register_node_type_group_output()
node_type_base(ntype, NODE_GROUP_OUTPUT, "Group Output", NODE_CLASS_INTERFACE);
node_type_size(ntype, 140, 80, 400);
- node_type_init(ntype, node_group_output_init);
- node_type_update(ntype, node_group_output_update);
+ ntype->initfunc = node_group_output_init;
+ ntype->updatefunc = node_group_output_update;
ntype->no_muting = true;
diff --git a/source/blender/nodes/shader/nodes/node_shader_add_shader.cc b/source/blender/nodes/shader/nodes/node_shader_add_shader.cc
index f7b25225e30..8bdc5b91887 100644
--- a/source/blender/nodes/shader/nodes/node_shader_add_shader.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_add_shader.cc
@@ -32,7 +32,7 @@ void register_node_type_sh_add_shader()
sh_node_type_base(&ntype, SH_NODE_ADD_SHADER, "Add Shader", NODE_CLASS_SHADER);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_add_shader);
+ ntype.gpu_fn = file_ns::node_shader_gpu_add_shader;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_ambient_occlusion.cc b/source/blender/nodes/shader/nodes/node_shader_ambient_occlusion.cc
index 5f30fe0dd30..85c49b47b81 100644
--- a/source/blender/nodes/shader/nodes/node_shader_ambient_occlusion.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_ambient_occlusion.cc
@@ -66,8 +66,8 @@ void register_node_type_sh_ambient_occlusion()
sh_node_type_base(&ntype, SH_NODE_AMBIENT_OCCLUSION, "Ambient Occlusion", NODE_CLASS_INPUT);
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_shader_buts_ambient_occlusion;
- node_type_init(&ntype, file_ns::node_shader_init_ambient_occlusion);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_ambient_occlusion);
+ ntype.initfunc = file_ns::node_shader_init_ambient_occlusion;
+ ntype.gpu_fn = file_ns::node_shader_gpu_ambient_occlusion;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_attribute.cc b/source/blender/nodes/shader/nodes/node_shader_attribute.cc
index 4694599f064..44f5282b688 100644
--- a/source/blender/nodes/shader/nodes/node_shader_attribute.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_attribute.cc
@@ -86,10 +86,10 @@ void register_node_type_sh_attribute()
sh_node_type_base(&ntype, SH_NODE_ATTRIBUTE, "Attribute", NODE_CLASS_INPUT);
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_shader_buts_attribute;
- node_type_init(&ntype, file_ns::node_shader_init_attribute);
+ ntype.initfunc = file_ns::node_shader_init_attribute;
node_type_storage(
&ntype, "NodeShaderAttribute", node_free_standard_storage, node_copy_standard_storage);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_attribute);
+ ntype.gpu_fn = file_ns::node_shader_gpu_attribute;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_background.cc b/source/blender/nodes/shader/nodes/node_shader_background.cc
index 1e41b66189a..a1e90757157 100644
--- a/source/blender/nodes/shader/nodes/node_shader_background.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_background.cc
@@ -33,7 +33,7 @@ void register_node_type_sh_background()
sh_node_type_base(&ntype, SH_NODE_BACKGROUND, "Background", NODE_CLASS_SHADER);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_background);
+ ntype.gpu_fn = file_ns::node_shader_gpu_background;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_bevel.cc b/source/blender/nodes/shader/nodes/node_shader_bevel.cc
index 14356a46125..53ce3876772 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bevel.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_bevel.cc
@@ -50,8 +50,8 @@ void register_node_type_sh_bevel()
sh_node_type_base(&ntype, SH_NODE_BEVEL, "Bevel", NODE_CLASS_INPUT);
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_shader_buts_bevel;
- node_type_init(&ntype, file_ns::node_shader_init_bevel);
- node_type_gpu(&ntype, file_ns::gpu_shader_bevel);
+ ntype.initfunc = file_ns::node_shader_init_bevel;
+ ntype.gpu_fn = file_ns::gpu_shader_bevel;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_blackbody.cc b/source/blender/nodes/shader/nodes/node_shader_blackbody.cc
index 23e9a601045..a31653de4b2 100644
--- a/source/blender/nodes/shader/nodes/node_shader_blackbody.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_blackbody.cc
@@ -42,7 +42,7 @@ void register_node_type_sh_blackbody()
sh_node_type_base(&ntype, SH_NODE_BLACKBODY, "Blackbody", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::node_declare;
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_blackbody);
+ ntype.gpu_fn = file_ns::node_shader_gpu_blackbody;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_brightness.cc b/source/blender/nodes/shader/nodes/node_shader_brightness.cc
index 09f0e21208c..0b1930b0434 100644
--- a/source/blender/nodes/shader/nodes/node_shader_brightness.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_brightness.cc
@@ -32,7 +32,7 @@ void register_node_type_sh_brightcontrast()
sh_node_type_base(&ntype, SH_NODE_BRIGHTCONTRAST, "Bright/Contrast", NODE_CLASS_OP_COLOR);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::gpu_shader_brightcontrast);
+ ntype.gpu_fn = file_ns::gpu_shader_brightcontrast;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_anisotropic.cc b/source/blender/nodes/shader/nodes/node_shader_bsdf_anisotropic.cc
index 2071b78fa64..48a7c248ea9 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_anisotropic.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_anisotropic.cc
@@ -69,8 +69,8 @@ void register_node_type_sh_bsdf_anisotropic()
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_shader_buts_anisotropic;
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_init(&ntype, file_ns::node_shader_init_anisotropic);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_bsdf_anisotropic);
+ ntype.initfunc = file_ns::node_shader_init_anisotropic;
+ ntype.gpu_fn = file_ns::node_shader_gpu_bsdf_anisotropic;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_diffuse.cc b/source/blender/nodes/shader/nodes/node_shader_bsdf_diffuse.cc
index a4f0e04576f..ba222a1a2c2 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_diffuse.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_diffuse.cc
@@ -45,7 +45,7 @@ void register_node_type_sh_bsdf_diffuse()
sh_node_type_base(&ntype, SH_NODE_BSDF_DIFFUSE, "Diffuse BSDF", NODE_CLASS_SHADER);
ntype.declare = file_ns::node_declare;
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_bsdf_diffuse);
+ ntype.gpu_fn = file_ns::node_shader_gpu_bsdf_diffuse;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_glass.cc b/source/blender/nodes/shader/nodes/node_shader_bsdf_glass.cc
index b3c047c3a47..00d2ba4a119 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_glass.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_glass.cc
@@ -57,8 +57,8 @@ void register_node_type_sh_bsdf_glass()
sh_node_type_base(&ntype, SH_NODE_BSDF_GLASS, "Glass BSDF", NODE_CLASS_SHADER);
ntype.declare = file_ns::node_declare;
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_init(&ntype, file_ns::node_shader_init_glass);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_bsdf_glass);
+ ntype.initfunc = file_ns::node_shader_init_glass;
+ ntype.gpu_fn = file_ns::node_shader_gpu_bsdf_glass;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_glossy.cc b/source/blender/nodes/shader/nodes/node_shader_bsdf_glossy.cc
index 7beecc0ecd4..edccd7314d2 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_glossy.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_glossy.cc
@@ -56,8 +56,8 @@ void register_node_type_sh_bsdf_glossy()
sh_node_type_base(&ntype, SH_NODE_BSDF_GLOSSY, "Glossy BSDF", NODE_CLASS_SHADER);
ntype.declare = file_ns::node_declare;
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_init(&ntype, file_ns::node_shader_init_glossy);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_bsdf_glossy);
+ ntype.initfunc = file_ns::node_shader_init_glossy;
+ ntype.gpu_fn = file_ns::node_shader_gpu_bsdf_glossy;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_hair.cc b/source/blender/nodes/shader/nodes/node_shader_bsdf_hair.cc
index f8a17e146f4..0498dcd0be5 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_hair.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_hair.cc
@@ -58,7 +58,7 @@ void register_node_type_sh_bsdf_hair()
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_shader_buts_hair;
node_type_size(&ntype, 150, 60, 200);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_bsdf_hair);
+ ntype.gpu_fn = file_ns::node_shader_gpu_bsdf_hair;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_hair_principled.cc b/source/blender/nodes/shader/nodes/node_shader_bsdf_hair_principled.cc
index b1022a95783..fd127cfb8ae 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_hair_principled.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_hair_principled.cc
@@ -129,9 +129,9 @@ void register_node_type_sh_bsdf_hair_principled()
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_shader_buts_principled_hair;
node_type_size_preset(&ntype, NODE_SIZE_LARGE);
- node_type_init(&ntype, file_ns::node_shader_init_hair_principled);
- node_type_update(&ntype, file_ns::node_shader_update_hair_principled);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_hair_principled);
+ ntype.initfunc = file_ns::node_shader_init_hair_principled;
+ ntype.updatefunc = file_ns::node_shader_update_hair_principled;
+ ntype.gpu_fn = file_ns::node_shader_gpu_hair_principled;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.cc b/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.cc
index adf2a9e8a19..82bf852455c 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.cc
@@ -245,9 +245,9 @@ void register_node_type_sh_bsdf_principled()
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_shader_buts_principled;
node_type_size_preset(&ntype, NODE_SIZE_LARGE);
- node_type_init(&ntype, file_ns::node_shader_init_principled);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_bsdf_principled);
- node_type_update(&ntype, file_ns::node_shader_update_principled);
+ ntype.initfunc = file_ns::node_shader_init_principled;
+ ntype.gpu_fn = file_ns::node_shader_gpu_bsdf_principled;
+ ntype.updatefunc = file_ns::node_shader_update_principled;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_refraction.cc b/source/blender/nodes/shader/nodes/node_shader_bsdf_refraction.cc
index a7111fd398f..d6ef63015f8 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_refraction.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_refraction.cc
@@ -55,8 +55,8 @@ void register_node_type_sh_bsdf_refraction()
sh_node_type_base(&ntype, SH_NODE_BSDF_REFRACTION, "Refraction BSDF", NODE_CLASS_SHADER);
ntype.declare = file_ns::node_declare;
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_init(&ntype, file_ns::node_shader_init_refraction);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_bsdf_refraction);
+ ntype.initfunc = file_ns::node_shader_init_refraction;
+ ntype.gpu_fn = file_ns::node_shader_gpu_bsdf_refraction;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_toon.cc b/source/blender/nodes/shader/nodes/node_shader_bsdf_toon.cc
index d0f70eb1c92..ba8e48ce410 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_toon.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_toon.cc
@@ -59,7 +59,7 @@ void register_node_type_sh_bsdf_toon()
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_shader_buts_toon;
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_bsdf_toon);
+ ntype.gpu_fn = file_ns::node_shader_gpu_bsdf_toon;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_translucent.cc b/source/blender/nodes/shader/nodes/node_shader_bsdf_translucent.cc
index b8a2bf8043e..fcb3bcdd00a 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_translucent.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_translucent.cc
@@ -39,7 +39,7 @@ void register_node_type_sh_bsdf_translucent()
sh_node_type_base(&ntype, SH_NODE_BSDF_TRANSLUCENT, "Translucent BSDF", NODE_CLASS_SHADER);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_bsdf_translucent);
+ ntype.gpu_fn = file_ns::node_shader_gpu_bsdf_translucent;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_transparent.cc b/source/blender/nodes/shader/nodes/node_shader_bsdf_transparent.cc
index 8824c744fd3..4eba043ff2b 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_transparent.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_transparent.cc
@@ -35,7 +35,7 @@ void register_node_type_sh_bsdf_transparent()
sh_node_type_base(&ntype, SH_NODE_BSDF_TRANSPARENT, "Transparent BSDF", NODE_CLASS_SHADER);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_bsdf_transparent);
+ ntype.gpu_fn = file_ns::node_shader_gpu_bsdf_transparent;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_velvet.cc b/source/blender/nodes/shader/nodes/node_shader_bsdf_velvet.cc
index c4aaf371e46..67351dd7e19 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_velvet.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_velvet.cc
@@ -44,7 +44,7 @@ void register_node_type_sh_bsdf_velvet()
sh_node_type_base(&ntype, SH_NODE_BSDF_VELVET, "Velvet BSDF", NODE_CLASS_SHADER);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_bsdf_velvet);
+ ntype.gpu_fn = file_ns::node_shader_gpu_bsdf_velvet;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_bump.cc b/source/blender/nodes/shader/nodes/node_shader_bump.cc
index 5447198107b..9439f95d62b 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bump.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_bump.cc
@@ -78,7 +78,7 @@ void register_node_type_sh_bump()
sh_node_type_base(&ntype, SH_NODE_BUMP, "Bump", NODE_CLASS_OP_VECTOR);
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_shader_buts_bump;
- node_type_gpu(&ntype, file_ns::gpu_shader_bump);
+ ntype.gpu_fn = file_ns::gpu_shader_bump;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_camera.cc b/source/blender/nodes/shader/nodes/node_shader_camera.cc
index 4d99d5ad17f..2752cd31c56 100644
--- a/source/blender/nodes/shader/nodes/node_shader_camera.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_camera.cc
@@ -35,7 +35,7 @@ void register_node_type_sh_camera()
sh_node_type_base(&ntype, SH_NODE_CAMERA, "Camera Data", NODE_CLASS_INPUT);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::gpu_shader_camera);
+ ntype.gpu_fn = file_ns::gpu_shader_camera;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_clamp.cc b/source/blender/nodes/shader/nodes/node_shader_clamp.cc
index 7680c6f99c4..5b7c216c4c3 100644
--- a/source/blender/nodes/shader/nodes/node_shader_clamp.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_clamp.cc
@@ -76,8 +76,8 @@ void register_node_type_sh_clamp()
sh_fn_node_type_base(&ntype, SH_NODE_CLAMP, "Clamp", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::sh_node_clamp_declare;
ntype.draw_buttons = file_ns::node_shader_buts_clamp;
- node_type_init(&ntype, file_ns::node_shader_init_clamp);
- node_type_gpu(&ntype, file_ns::gpu_shader_clamp);
+ ntype.initfunc = file_ns::node_shader_init_clamp;
+ ntype.gpu_fn = file_ns::gpu_shader_clamp;
ntype.build_multi_function = file_ns::sh_node_clamp_build_multi_function;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/shader/nodes/node_shader_color_ramp.cc b/source/blender/nodes/shader/nodes/node_shader_color_ramp.cc
index 096884591ab..f5d405c7678 100644
--- a/source/blender/nodes/shader/nodes/node_shader_color_ramp.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_color_ramp.cc
@@ -140,10 +140,10 @@ void register_node_type_sh_valtorgb()
sh_fn_node_type_base(&ntype, SH_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::sh_node_valtorgb_declare;
- node_type_init(&ntype, file_ns::node_shader_init_valtorgb);
+ ntype.initfunc = file_ns::node_shader_init_valtorgb;
node_type_size_preset(&ntype, NODE_SIZE_LARGE);
node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage);
- node_type_gpu(&ntype, file_ns::gpu_shader_valtorgb);
+ ntype.gpu_fn = file_ns::gpu_shader_valtorgb;
ntype.build_multi_function = file_ns::sh_node_valtorgb_build_multi_function;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/shader/nodes/node_shader_common.cc b/source/blender/nodes/shader/nodes/node_shader_common.cc
index 20d0d11ba86..9d1d788da9d 100644
--- a/source/blender/nodes/shader/nodes/node_shader_common.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_common.cc
@@ -93,8 +93,8 @@ void register_node_type_sh_group()
node_type_size(&ntype, 140, 60, 400);
ntype.labelfunc = node_group_label;
- node_type_group_update(&ntype, node_group_update);
- node_type_gpu(&ntype, gpu_group_execute);
+ ntype.group_update_func = node_group_update;
+ ntype.gpu_fn = gpu_group_execute;
nodeRegisterType(&ntype);
}
@@ -109,5 +109,5 @@ void register_node_type_sh_custom_group(bNodeType *ntype)
ntype->insert_link = node_insert_link_default;
}
- node_type_gpu(ntype, gpu_group_execute);
+ ntype->gpu_fn = gpu_group_execute;
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_curves.cc b/source/blender/nodes/shader/nodes/node_shader_curves.cc
index c4dbc3ce6f1..0945c39ee50 100644
--- a/source/blender/nodes/shader/nodes/node_shader_curves.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_curves.cc
@@ -116,10 +116,10 @@ void register_node_type_sh_curve_vec()
sh_fn_node_type_base(&ntype, SH_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR);
ntype.declare = file_ns::sh_node_curve_vec_declare;
- node_type_init(&ntype, file_ns::node_shader_init_curve_vec);
+ ntype.initfunc = file_ns::node_shader_init_curve_vec;
node_type_size_preset(&ntype, NODE_SIZE_LARGE);
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
- node_type_gpu(&ntype, file_ns::gpu_shader_curve_vec);
+ ntype.gpu_fn = file_ns::gpu_shader_curve_vec;
ntype.build_multi_function = file_ns::sh_node_curve_vec_build_multi_function;
nodeRegisterType(&ntype);
@@ -263,10 +263,10 @@ void register_node_type_sh_curve_rgb()
sh_fn_node_type_base(&ntype, SH_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR);
ntype.declare = file_ns::sh_node_curve_rgb_declare;
- node_type_init(&ntype, file_ns::node_shader_init_curve_rgb);
+ ntype.initfunc = file_ns::node_shader_init_curve_rgb;
node_type_size_preset(&ntype, NODE_SIZE_LARGE);
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
- node_type_gpu(&ntype, file_ns::gpu_shader_curve_rgb);
+ ntype.gpu_fn = file_ns::gpu_shader_curve_rgb;
ntype.build_multi_function = file_ns::sh_node_curve_rgb_build_multi_function;
nodeRegisterType(&ntype);
@@ -383,10 +383,10 @@ void register_node_type_sh_curve_float()
sh_fn_node_type_base(&ntype, SH_NODE_CURVE_FLOAT, "Float Curve", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::sh_node_curve_float_declare;
- node_type_init(&ntype, file_ns::node_shader_init_curve_float);
+ ntype.initfunc = file_ns::node_shader_init_curve_float;
node_type_size_preset(&ntype, NODE_SIZE_LARGE);
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
- node_type_gpu(&ntype, file_ns::gpu_shader_curve_float);
+ ntype.gpu_fn = file_ns::gpu_shader_curve_float;
ntype.build_multi_function = file_ns::sh_node_curve_float_build_multi_function;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/shader/nodes/node_shader_displacement.cc b/source/blender/nodes/shader/nodes/node_shader_displacement.cc
index fd5a6107447..e71e2168701 100644
--- a/source/blender/nodes/shader/nodes/node_shader_displacement.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_displacement.cc
@@ -54,8 +54,8 @@ void register_node_type_sh_displacement()
sh_node_type_base(&ntype, SH_NODE_DISPLACEMENT, "Displacement", NODE_CLASS_OP_VECTOR);
ntype.declare = file_ns::node_declare;
- node_type_init(&ntype, file_ns::node_shader_init_displacement);
- node_type_gpu(&ntype, file_ns::gpu_shader_displacement);
+ ntype.initfunc = file_ns::node_shader_init_displacement;
+ ntype.gpu_fn = file_ns::gpu_shader_displacement;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_eevee_specular.cc b/source/blender/nodes/shader/nodes/node_shader_eevee_specular.cc
index 5a058eec690..c13300bdac4 100644
--- a/source/blender/nodes/shader/nodes/node_shader_eevee_specular.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_eevee_specular.cc
@@ -80,7 +80,7 @@ void register_node_type_sh_eevee_specular()
sh_node_type_base(&ntype, SH_NODE_EEVEE_SPECULAR, "Specular BSDF", NODE_CLASS_SHADER);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_eevee_specular);
+ ntype.gpu_fn = file_ns::node_shader_gpu_eevee_specular;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_emission.cc b/source/blender/nodes/shader/nodes/node_shader_emission.cc
index 69c6094e92e..df6283f92dc 100644
--- a/source/blender/nodes/shader/nodes/node_shader_emission.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_emission.cc
@@ -34,7 +34,7 @@ void register_node_type_sh_emission()
sh_node_type_base(&ntype, SH_NODE_EMISSION, "Emission", NODE_CLASS_SHADER);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_emission);
+ ntype.gpu_fn = file_ns::node_shader_gpu_emission;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_fresnel.cc b/source/blender/nodes/shader/nodes/node_shader_fresnel.cc
index abbfc5ad1d5..1e35942476a 100644
--- a/source/blender/nodes/shader/nodes/node_shader_fresnel.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_fresnel.cc
@@ -36,7 +36,7 @@ void register_node_type_sh_fresnel()
sh_node_type_base(&ntype, SH_NODE_FRESNEL, "Fresnel", NODE_CLASS_INPUT);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_fresnel);
+ ntype.gpu_fn = file_ns::node_shader_gpu_fresnel;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_gamma.cc b/source/blender/nodes/shader/nodes/node_shader_gamma.cc
index 80419ed732c..327d9b134cd 100644
--- a/source/blender/nodes/shader/nodes/node_shader_gamma.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_gamma.cc
@@ -35,7 +35,7 @@ void register_node_type_sh_gamma()
sh_node_type_base(&ntype, SH_NODE_GAMMA, "Gamma", NODE_CLASS_OP_COLOR);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_gamma);
+ ntype.gpu_fn = file_ns::node_shader_gpu_gamma;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_geometry.cc b/source/blender/nodes/shader/nodes/node_shader_geometry.cc
index e27b5290513..d7d5f4aa91f 100644
--- a/source/blender/nodes/shader/nodes/node_shader_geometry.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_geometry.cc
@@ -68,7 +68,7 @@ void register_node_type_sh_geometry()
sh_node_type_base(&ntype, SH_NODE_NEW_GEOMETRY, "Geometry", NODE_CLASS_INPUT);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_geometry);
+ ntype.gpu_fn = file_ns::node_shader_gpu_geometry;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_hair_info.cc b/source/blender/nodes/shader/nodes/node_shader_hair_info.cc
index 2ae87f7bc51..4511c8a9ae6 100644
--- a/source/blender/nodes/shader/nodes/node_shader_hair_info.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_hair_info.cc
@@ -39,7 +39,7 @@ void register_node_type_sh_hair_info()
sh_node_type_base(&ntype, SH_NODE_HAIR_INFO, "Curves Info", NODE_CLASS_INPUT);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_hair_info);
+ ntype.gpu_fn = file_ns::node_shader_gpu_hair_info;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_holdout.cc b/source/blender/nodes/shader/nodes/node_shader_holdout.cc
index ee754a7afa8..f3f8cef5a2d 100644
--- a/source/blender/nodes/shader/nodes/node_shader_holdout.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_holdout.cc
@@ -31,7 +31,7 @@ void register_node_type_sh_holdout()
sh_node_type_base(&ntype, SH_NODE_HOLDOUT, "Holdout", NODE_CLASS_SHADER);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::gpu_shader_rgb);
+ ntype.gpu_fn = file_ns::gpu_shader_rgb;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_hueSatVal.cc b/source/blender/nodes/shader/nodes/node_shader_hueSatVal.cc
index 3e057d3d230..7eb02a3bce2 100644
--- a/source/blender/nodes/shader/nodes/node_shader_hueSatVal.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_hueSatVal.cc
@@ -39,7 +39,7 @@ void register_node_type_sh_hue_sat()
sh_node_type_base(&ntype, SH_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR);
ntype.declare = file_ns::node_declare;
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_gpu(&ntype, file_ns::gpu_shader_hue_sat);
+ ntype.gpu_fn = file_ns::gpu_shader_hue_sat;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_ies_light.cc b/source/blender/nodes/shader/nodes/node_shader_ies_light.cc
index 65655ba2781..dee69eaf391 100644
--- a/source/blender/nodes/shader/nodes/node_shader_ies_light.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_ies_light.cc
@@ -50,7 +50,7 @@ void register_node_type_sh_tex_ies()
sh_node_type_base(&ntype, SH_NODE_TEX_IES, "IES Texture", NODE_CLASS_TEXTURE);
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_shader_buts_ies;
- node_type_init(&ntype, file_ns::node_shader_init_tex_ies);
+ ntype.initfunc = file_ns::node_shader_init_tex_ies;
node_type_storage(
&ntype, "NodeShaderTexIES", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/shader/nodes/node_shader_invert.cc b/source/blender/nodes/shader/nodes/node_shader_invert.cc
index adcb0508093..ba2774e3b8f 100644
--- a/source/blender/nodes/shader/nodes/node_shader_invert.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_invert.cc
@@ -35,7 +35,7 @@ void register_node_type_sh_invert()
sh_node_type_base(&ntype, SH_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::gpu_shader_invert);
+ ntype.gpu_fn = file_ns::gpu_shader_invert;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_layer_weight.cc b/source/blender/nodes/shader/nodes/node_shader_layer_weight.cc
index 5a56ee8bc75..f589f85fc89 100644
--- a/source/blender/nodes/shader/nodes/node_shader_layer_weight.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_layer_weight.cc
@@ -37,7 +37,7 @@ void register_node_type_sh_layer_weight()
sh_node_type_base(&ntype, SH_NODE_LAYER_WEIGHT, "Layer Weight", NODE_CLASS_INPUT);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_layer_weight);
+ ntype.gpu_fn = file_ns::node_shader_gpu_layer_weight;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_light_falloff.cc b/source/blender/nodes/shader/nodes/node_shader_light_falloff.cc
index 1ee096c052f..fcaf1b31e77 100644
--- a/source/blender/nodes/shader/nodes/node_shader_light_falloff.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_light_falloff.cc
@@ -35,7 +35,7 @@ void register_node_type_sh_light_falloff()
sh_node_type_base(&ntype, SH_NODE_LIGHT_FALLOFF, "Light Falloff", NODE_CLASS_OP_COLOR);
ntype.declare = file_ns::node_declare;
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_light_falloff);
+ ntype.gpu_fn = file_ns::node_shader_gpu_light_falloff;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_light_path.cc b/source/blender/nodes/shader/nodes/node_shader_light_path.cc
index 268a80af0ab..b04b2a2f022 100644
--- a/source/blender/nodes/shader/nodes/node_shader_light_path.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_light_path.cc
@@ -42,7 +42,7 @@ void register_node_type_sh_light_path()
sh_node_type_base(&ntype, SH_NODE_LIGHT_PATH, "Light Path", NODE_CLASS_INPUT);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_light_path);
+ ntype.gpu_fn = file_ns::node_shader_gpu_light_path;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_map_range.cc b/source/blender/nodes/shader/nodes/node_shader_map_range.cc
index e0c1778f764..a906ee40b42 100644
--- a/source/blender/nodes/shader/nodes/node_shader_map_range.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_map_range.cc
@@ -502,11 +502,11 @@ void register_node_type_sh_map_range()
ntype.declare = file_ns::sh_node_map_range_declare;
ntype.draw_buttons = file_ns::node_shader_buts_map_range;
ntype.ui_class = file_ns::node_shader_map_range_ui_class;
- node_type_init(&ntype, file_ns::node_shader_init_map_range);
+ ntype.initfunc = file_ns::node_shader_init_map_range;
node_type_storage(
&ntype, "NodeMapRange", node_free_standard_storage, node_copy_standard_storage);
- node_type_update(&ntype, file_ns::node_shader_update_map_range);
- node_type_gpu(&ntype, file_ns::gpu_shader_map_range);
+ ntype.updatefunc = file_ns::node_shader_update_map_range;
+ ntype.gpu_fn = file_ns::gpu_shader_map_range;
ntype.build_multi_function = file_ns::sh_node_map_range_build_multi_function;
ntype.gather_link_search_ops = file_ns::node_map_range_gather_link_searches;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/shader/nodes/node_shader_mapping.cc b/source/blender/nodes/shader/nodes/node_shader_mapping.cc
index 89cd5af045b..f9cac93544f 100644
--- a/source/blender/nodes/shader/nodes/node_shader_mapping.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_mapping.cc
@@ -87,8 +87,8 @@ void register_node_type_sh_mapping()
sh_node_type_base(&ntype, SH_NODE_MAPPING, "Mapping", NODE_CLASS_OP_VECTOR);
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_shader_buts_mapping;
- node_type_gpu(&ntype, file_ns::gpu_shader_mapping);
- node_type_update(&ntype, file_ns::node_shader_update_mapping);
+ ntype.gpu_fn = file_ns::gpu_shader_mapping;
+ ntype.updatefunc = file_ns::node_shader_update_mapping;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_math.cc b/source/blender/nodes/shader/nodes/node_shader_math.cc
index 3f25da4652d..5fe1bb48cc2 100644
--- a/source/blender/nodes/shader/nodes/node_shader_math.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_math.cc
@@ -190,8 +190,8 @@ void register_node_type_sh_math()
sh_fn_node_type_base(&ntype, SH_NODE_MATH, "Math", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::sh_node_math_declare;
ntype.labelfunc = node_math_label;
- node_type_gpu(&ntype, file_ns::gpu_shader_math);
- node_type_update(&ntype, node_math_update);
+ ntype.gpu_fn = file_ns::gpu_shader_math;
+ ntype.updatefunc = node_math_update;
ntype.build_multi_function = file_ns::sh_node_math_build_multi_function;
ntype.gather_link_search_ops = file_ns::sh_node_math_gather_link_searches;
diff --git a/source/blender/nodes/shader/nodes/node_shader_mix.cc b/source/blender/nodes/shader/nodes/node_shader_mix.cc
index 878648105d1..bc928ddb49a 100644
--- a/source/blender/nodes/shader/nodes/node_shader_mix.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_mix.cc
@@ -456,9 +456,9 @@ void register_node_type_sh_mix()
sh_fn_node_type_base(&ntype, SH_NODE_MIX, "Mix", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::sh_node_mix_declare;
ntype.ui_class = file_ns::sh_node_mix_ui_class;
- node_type_gpu(&ntype, file_ns::gpu_shader_mix);
- node_type_update(&ntype, file_ns::sh_node_mix_update);
- node_type_init(&ntype, file_ns::node_mix_init);
+ ntype.gpu_fn = file_ns::gpu_shader_mix;
+ ntype.updatefunc = file_ns::sh_node_mix_update;
+ ntype.initfunc = file_ns::node_mix_init;
node_type_storage(
&ntype, "NodeShaderMix", node_free_standard_storage, node_copy_standard_storage);
ntype.build_multi_function = file_ns::sh_node_mix_build_multi_function;
diff --git a/source/blender/nodes/shader/nodes/node_shader_mix_rgb.cc b/source/blender/nodes/shader/nodes/node_shader_mix_rgb.cc
index d1578b48c79..98771098f81 100644
--- a/source/blender/nodes/shader/nodes/node_shader_mix_rgb.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_mix_rgb.cc
@@ -153,7 +153,7 @@ void register_node_type_sh_mix_rgb()
sh_fn_node_type_base(&ntype, SH_NODE_MIX_RGB_LEGACY, "Mix (Legacy)", NODE_CLASS_OP_COLOR);
ntype.declare = file_ns::sh_node_mix_rgb_declare;
ntype.labelfunc = node_blend_label;
- node_type_gpu(&ntype, file_ns::gpu_shader_mix_rgb);
+ ntype.gpu_fn = file_ns::gpu_shader_mix_rgb;
ntype.build_multi_function = file_ns::sh_node_mix_rgb_build_multi_function;
ntype.gather_link_search_ops = nullptr;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/shader/nodes/node_shader_mix_shader.cc b/source/blender/nodes/shader/nodes/node_shader_mix_shader.cc
index 27e41406b48..135e3582483 100644
--- a/source/blender/nodes/shader/nodes/node_shader_mix_shader.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_mix_shader.cc
@@ -33,7 +33,7 @@ void register_node_type_sh_mix_shader()
sh_node_type_base(&ntype, SH_NODE_MIX_SHADER, "Mix Shader", NODE_CLASS_SHADER);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_mix_shader);
+ ntype.gpu_fn = file_ns::node_shader_gpu_mix_shader;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_normal.cc b/source/blender/nodes/shader/nodes/node_shader_normal.cc
index 49c075ac27e..c36744524f4 100644
--- a/source/blender/nodes/shader/nodes/node_shader_normal.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_normal.cc
@@ -44,7 +44,7 @@ void register_node_type_sh_normal()
sh_node_type_base(&ntype, SH_NODE_NORMAL, "Normal", NODE_CLASS_OP_VECTOR);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::gpu_shader_normal);
+ ntype.gpu_fn = file_ns::gpu_shader_normal;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_normal_map.cc b/source/blender/nodes/shader/nodes/node_shader_normal_map.cc
index 99cb5f6f525..4338cfd9457 100644
--- a/source/blender/nodes/shader/nodes/node_shader_normal_map.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_normal_map.cc
@@ -118,10 +118,10 @@ void register_node_type_sh_normal_map()
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_shader_buts_normal_map;
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_init(&ntype, file_ns::node_shader_init_normal_map);
+ ntype.initfunc = file_ns::node_shader_init_normal_map;
node_type_storage(
&ntype, "NodeShaderNormalMap", node_free_standard_storage, node_copy_standard_storage);
- node_type_gpu(&ntype, file_ns::gpu_shader_normal_map);
+ ntype.gpu_fn = file_ns::gpu_shader_normal_map;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_object_info.cc b/source/blender/nodes/shader/nodes/node_shader_object_info.cc
index 210f855b9e0..daa40d8dc63 100644
--- a/source/blender/nodes/shader/nodes/node_shader_object_info.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_object_info.cc
@@ -37,7 +37,7 @@ void register_node_type_sh_object_info()
sh_node_type_base(&ntype, SH_NODE_OBJECT_INFO, "Object Info", NODE_CLASS_INPUT);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_object_info);
+ ntype.gpu_fn = file_ns::node_shader_gpu_object_info;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_output_aov.cc b/source/blender/nodes/shader/nodes/node_shader_output_aov.cc
index cc95db9d333..b668b5313ba 100644
--- a/source/blender/nodes/shader/nodes/node_shader_output_aov.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_output_aov.cc
@@ -60,10 +60,10 @@ void register_node_type_sh_output_aov()
sh_node_type_base(&ntype, SH_NODE_OUTPUT_AOV, "AOV Output", NODE_CLASS_OUTPUT);
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_shader_buts_output_aov;
- node_type_init(&ntype, file_ns::node_shader_init_output_aov);
+ ntype.initfunc = file_ns::node_shader_init_output_aov;
node_type_storage(
&ntype, "NodeShaderOutputAOV", node_free_standard_storage, node_copy_standard_storage);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_output_aov);
+ ntype.gpu_fn = file_ns::node_shader_gpu_output_aov;
ntype.no_muting = true;
diff --git a/source/blender/nodes/shader/nodes/node_shader_output_light.cc b/source/blender/nodes/shader/nodes/node_shader_output_light.cc
index 6e4483dbbe9..848e6c92e17 100644
--- a/source/blender/nodes/shader/nodes/node_shader_output_light.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_output_light.cc
@@ -37,7 +37,7 @@ void register_node_type_sh_output_light()
sh_node_type_base(&ntype, SH_NODE_OUTPUT_LIGHT, "Light Output", NODE_CLASS_OUTPUT);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_output_light);
+ ntype.gpu_fn = file_ns::node_shader_gpu_output_light;
ntype.no_muting = true;
diff --git a/source/blender/nodes/shader/nodes/node_shader_output_material.cc b/source/blender/nodes/shader/nodes/node_shader_output_material.cc
index 857c5eb68df..ff2628a891b 100644
--- a/source/blender/nodes/shader/nodes/node_shader_output_material.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_output_material.cc
@@ -53,7 +53,7 @@ void register_node_type_sh_output_material()
sh_node_type_base(&ntype, SH_NODE_OUTPUT_MATERIAL, "Material Output", NODE_CLASS_OUTPUT);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_output_material);
+ ntype.gpu_fn = file_ns::node_shader_gpu_output_material;
ntype.no_muting = true;
diff --git a/source/blender/nodes/shader/nodes/node_shader_output_world.cc b/source/blender/nodes/shader/nodes/node_shader_output_world.cc
index f450e667cd9..2d75faa9e80 100644
--- a/source/blender/nodes/shader/nodes/node_shader_output_world.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_output_world.cc
@@ -40,7 +40,7 @@ void register_node_type_sh_output_world()
sh_node_type_base(&ntype, SH_NODE_OUTPUT_WORLD, "World Output", NODE_CLASS_OUTPUT);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_output_world);
+ ntype.gpu_fn = file_ns::node_shader_gpu_output_world;
ntype.no_muting = true;
diff --git a/source/blender/nodes/shader/nodes/node_shader_particle_info.cc b/source/blender/nodes/shader/nodes/node_shader_particle_info.cc
index 76a91ab60aa..c86bb5866dd 100644
--- a/source/blender/nodes/shader/nodes/node_shader_particle_info.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_particle_info.cc
@@ -44,7 +44,7 @@ void register_node_type_sh_particle_info()
sh_node_type_base(&ntype, SH_NODE_PARTICLE_INFO, "Particle Info", NODE_CLASS_INPUT);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::gpu_shader_particle_info);
+ ntype.gpu_fn = file_ns::gpu_shader_particle_info;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_point_info.cc b/source/blender/nodes/shader/nodes/node_shader_point_info.cc
index 05b649490e4..fffa3abad03 100644
--- a/source/blender/nodes/shader/nodes/node_shader_point_info.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_point_info.cc
@@ -32,7 +32,7 @@ void register_node_type_sh_point_info()
sh_node_type_base(&ntype, SH_NODE_POINT_INFO, "Point Info", NODE_CLASS_INPUT);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_point_info);
+ ntype.gpu_fn = file_ns::node_shader_gpu_point_info;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_rgb.cc b/source/blender/nodes/shader/nodes/node_shader_rgb.cc
index 1adbbbc48bc..d70df4a8e25 100644
--- a/source/blender/nodes/shader/nodes/node_shader_rgb.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_rgb.cc
@@ -35,7 +35,7 @@ void register_node_type_sh_rgb()
sh_node_type_base(&ntype, SH_NODE_RGB, "RGB", NODE_CLASS_INPUT);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::gpu_shader_rgb);
+ ntype.gpu_fn = file_ns::gpu_shader_rgb;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_rgb_to_bw.cc b/source/blender/nodes/shader/nodes/node_shader_rgb_to_bw.cc
index 1db3342733b..1e663d1b86f 100644
--- a/source/blender/nodes/shader/nodes/node_shader_rgb_to_bw.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_rgb_to_bw.cc
@@ -36,7 +36,7 @@ void register_node_type_sh_rgbtobw()
sh_node_type_base(&ntype, SH_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::sh_node_rgbtobw_declare;
- node_type_gpu(&ntype, file_ns::gpu_shader_rgbtobw);
+ ntype.gpu_fn = file_ns::gpu_shader_rgbtobw;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_script.cc b/source/blender/nodes/shader/nodes/node_shader_script.cc
index 8534ce129b4..213de85cb15 100644
--- a/source/blender/nodes/shader/nodes/node_shader_script.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_script.cc
@@ -86,7 +86,7 @@ void register_node_type_sh_script()
sh_node_type_base(&ntype, SH_NODE_SCRIPT, "Script", NODE_CLASS_SCRIPT);
ntype.draw_buttons = file_ns::node_shader_buts_script;
ntype.draw_buttons_ex = file_ns::node_shader_buts_script_ex;
- node_type_init(&ntype, file_ns::init);
+ ntype.initfunc = file_ns::init;
node_type_storage(
&ntype, "NodeShaderScript", file_ns::node_free_script, file_ns::node_copy_script);
diff --git a/source/blender/nodes/shader/nodes/node_shader_sepcomb_color.cc b/source/blender/nodes/shader/nodes/node_shader_sepcomb_color.cc
index 77ce6f5e4e4..94e5f19b840 100644
--- a/source/blender/nodes/shader/nodes/node_shader_sepcomb_color.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_sepcomb_color.cc
@@ -76,11 +76,11 @@ void register_node_type_sh_sepcolor()
sh_node_type_base(&ntype, SH_NODE_SEPARATE_COLOR, "Separate Color", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::sh_node_sepcolor_declare;
- node_type_update(&ntype, file_ns::node_sepcolor_update);
- node_type_init(&ntype, node_combsep_color_init);
+ ntype.updatefunc = file_ns::node_sepcolor_update;
+ ntype.initfunc = node_combsep_color_init;
node_type_storage(
&ntype, "NodeCombSepColor", node_free_standard_storage, node_copy_standard_storage);
- node_type_gpu(&ntype, file_ns::gpu_shader_sepcolor);
+ ntype.gpu_fn = file_ns::gpu_shader_sepcolor;
nodeRegisterType(&ntype);
}
@@ -152,11 +152,11 @@ void register_node_type_sh_combcolor()
sh_node_type_base(&ntype, SH_NODE_COMBINE_COLOR, "Combine Color", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::sh_node_combcolor_declare;
- node_type_update(&ntype, file_ns::node_combcolor_update);
- node_type_init(&ntype, node_combsep_color_init);
+ ntype.updatefunc = file_ns::node_combcolor_update;
+ ntype.initfunc = node_combsep_color_init;
node_type_storage(
&ntype, "NodeCombSepColor", node_free_standard_storage, node_copy_standard_storage);
- node_type_gpu(&ntype, file_ns::gpu_shader_combcolor);
+ ntype.gpu_fn = file_ns::gpu_shader_combcolor;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_sepcomb_hsv.cc b/source/blender/nodes/shader/nodes/node_shader_sepcomb_hsv.cc
index b297ead1847..66ff5f82944 100644
--- a/source/blender/nodes/shader/nodes/node_shader_sepcomb_hsv.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_sepcomb_hsv.cc
@@ -38,7 +38,7 @@ void register_node_type_sh_sephsv()
sh_node_type_base(&ntype, SH_NODE_SEPHSV_LEGACY, "Separate HSV (Legacy)", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::node_declare_sephsv;
- node_type_gpu(&ntype, file_ns::gpu_shader_sephsv);
+ ntype.gpu_fn = file_ns::gpu_shader_sephsv;
ntype.gather_link_search_ops = nullptr;
nodeRegisterType(&ntype);
@@ -75,7 +75,7 @@ void register_node_type_sh_combhsv()
sh_node_type_base(&ntype, SH_NODE_COMBHSV_LEGACY, "Combine HSV (Legacy)", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::node_declare_combhsv;
- node_type_gpu(&ntype, file_ns::gpu_shader_combhsv);
+ ntype.gpu_fn = file_ns::gpu_shader_combhsv;
ntype.gather_link_search_ops = nullptr;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/shader/nodes/node_shader_sepcomb_rgb.cc b/source/blender/nodes/shader/nodes/node_shader_sepcomb_rgb.cc
index c298998cad5..28c4eef823f 100644
--- a/source/blender/nodes/shader/nodes/node_shader_sepcomb_rgb.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_sepcomb_rgb.cc
@@ -79,7 +79,7 @@ void register_node_type_sh_seprgb()
sh_fn_node_type_base(
&ntype, SH_NODE_SEPRGB_LEGACY, "Separate RGB (Legacy)", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::sh_node_seprgb_declare;
- node_type_gpu(&ntype, file_ns::gpu_shader_seprgb);
+ ntype.gpu_fn = file_ns::gpu_shader_seprgb;
ntype.build_multi_function = file_ns::sh_node_seprgb_build_multi_function;
ntype.gather_link_search_ops = nullptr;
@@ -124,7 +124,7 @@ void register_node_type_sh_combrgb()
sh_fn_node_type_base(
&ntype, SH_NODE_COMBRGB_LEGACY, "Combine RGB (Legacy)", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::sh_node_combrgb_declare;
- node_type_gpu(&ntype, file_ns::gpu_shader_combrgb);
+ ntype.gpu_fn = file_ns::gpu_shader_combrgb;
ntype.build_multi_function = file_ns::sh_node_combrgb_build_multi_function;
ntype.gather_link_search_ops = nullptr;
diff --git a/source/blender/nodes/shader/nodes/node_shader_sepcomb_xyz.cc b/source/blender/nodes/shader/nodes/node_shader_sepcomb_xyz.cc
index 8849824ec0b..131ae16ef1b 100644
--- a/source/blender/nodes/shader/nodes/node_shader_sepcomb_xyz.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_sepcomb_xyz.cc
@@ -97,7 +97,7 @@ void register_node_type_sh_sepxyz()
sh_fn_node_type_base(&ntype, SH_NODE_SEPXYZ, "Separate XYZ", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::sh_node_sepxyz_declare;
- node_type_gpu(&ntype, file_ns::gpu_shader_sepxyz);
+ ntype.gpu_fn = file_ns::gpu_shader_sepxyz;
ntype.build_multi_function = file_ns::sh_node_sepxyz_build_multi_function;
nodeRegisterType(&ntype);
@@ -142,7 +142,7 @@ void register_node_type_sh_combxyz()
sh_fn_node_type_base(&ntype, SH_NODE_COMBXYZ, "Combine XYZ", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::sh_node_combxyz_declare;
- node_type_gpu(&ntype, file_ns::gpu_shader_combxyz);
+ ntype.gpu_fn = file_ns::gpu_shader_combxyz;
ntype.build_multi_function = file_ns::sh_node_combxyz_build_multi_function;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/shader/nodes/node_shader_shader_to_rgb.cc b/source/blender/nodes/shader/nodes/node_shader_shader_to_rgb.cc
index 7345e374937..38ae1f979a8 100644
--- a/source/blender/nodes/shader/nodes/node_shader_shader_to_rgb.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_shader_to_rgb.cc
@@ -34,7 +34,7 @@ void register_node_type_sh_shadertorgb()
sh_node_type_base(&ntype, SH_NODE_SHADERTORGB, "Shader to RGB", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_shadertorgb);
+ ntype.gpu_fn = file_ns::node_shader_gpu_shadertorgb;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_squeeze.cc b/source/blender/nodes/shader/nodes/node_shader_squeeze.cc
index 62e21088791..31965c5e13e 100644
--- a/source/blender/nodes/shader/nodes/node_shader_squeeze.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_squeeze.cc
@@ -36,7 +36,7 @@ void register_node_type_sh_squeeze()
sh_node_type_base(&ntype, SH_NODE_SQUEEZE, "Squeeze Value", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::gpu_shader_squeeze);
+ ntype.gpu_fn = file_ns::gpu_shader_squeeze;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.cc b/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.cc
index 29d42b20a80..bcf859251e3 100644
--- a/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.cc
@@ -87,9 +87,9 @@ void register_node_type_sh_subsurface_scattering()
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_shader_buts_subsurface;
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_init(&ntype, file_ns::node_shader_init_subsurface_scattering);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_subsurface_scattering);
- node_type_update(&ntype, file_ns::node_shader_update_subsurface_scattering);
+ ntype.initfunc = file_ns::node_shader_init_subsurface_scattering;
+ ntype.gpu_fn = file_ns::node_shader_gpu_subsurface_scattering;
+ ntype.updatefunc = file_ns::node_shader_update_subsurface_scattering;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_tangent.cc b/source/blender/nodes/shader/nodes/node_shader_tangent.cc
index c2116c9c0ff..9b09eb09bba 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tangent.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_tangent.cc
@@ -89,8 +89,8 @@ void register_node_type_sh_tangent()
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_shader_buts_tangent;
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_init(&ntype, file_ns::node_shader_init_tangent);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_tangent);
+ ntype.initfunc = file_ns::node_shader_init_tangent;
+ ntype.gpu_fn = file_ns::node_shader_gpu_tangent;
node_type_storage(
&ntype, "NodeShaderTangent", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_brick.cc b/source/blender/nodes/shader/nodes/node_shader_tex_brick.cc
index f6bcedbd19e..aaae1369d79 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_brick.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_brick.cc
@@ -283,10 +283,10 @@ void register_node_type_sh_tex_brick()
ntype.declare = file_ns::sh_node_tex_brick_declare;
ntype.draw_buttons = file_ns::node_shader_buts_tex_brick;
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_init(&ntype, file_ns::node_shader_init_tex_brick);
+ ntype.initfunc = file_ns::node_shader_init_tex_brick;
node_type_storage(
&ntype, "NodeTexBrick", node_free_standard_storage, node_copy_standard_storage);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_tex_brick);
+ ntype.gpu_fn = file_ns::node_shader_gpu_tex_brick;
ntype.build_multi_function = file_ns::sh_node_brick_build_multi_function;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_checker.cc b/source/blender/nodes/shader/nodes/node_shader_tex_checker.cc
index c48f79698bb..bef3eb990eb 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_checker.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_checker.cc
@@ -111,10 +111,10 @@ void register_node_type_sh_tex_checker()
sh_fn_node_type_base(&ntype, SH_NODE_TEX_CHECKER, "Checker Texture", NODE_CLASS_TEXTURE);
ntype.declare = file_ns::sh_node_tex_checker_declare;
- node_type_init(&ntype, file_ns::node_shader_init_tex_checker);
+ ntype.initfunc = file_ns::node_shader_init_tex_checker;
node_type_storage(
&ntype, "NodeTexChecker", node_free_standard_storage, node_copy_standard_storage);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_tex_checker);
+ ntype.gpu_fn = file_ns::node_shader_gpu_tex_checker;
ntype.build_multi_function = file_ns::sh_node_tex_checker_build_multi_function;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_coord.cc b/source/blender/nodes/shader/nodes/node_shader_tex_coord.cc
index e2a40b79d53..a295bda9d07 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_coord.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_coord.cc
@@ -38,7 +38,7 @@ static int node_shader_gpu_tex_coord(GPUMaterial *mat,
/* Use special matrix to let the shader branch to using the render object's matrix. */
float dummy_matrix[4][4];
dummy_matrix[3][3] = 0.0f;
- GPUNodeLink *inv_obmat = (ob != nullptr) ? GPU_uniform(&ob->imat[0][0]) :
+ GPUNodeLink *inv_obmat = (ob != nullptr) ? GPU_uniform(&ob->world_to_object[0][0]) :
GPU_uniform(&dummy_matrix[0][0]);
/* Optimization: don't request orco if not needed. */
@@ -82,7 +82,7 @@ void register_node_type_sh_tex_coord()
sh_node_type_base(&ntype, SH_NODE_TEX_COORD, "Texture Coordinate", NODE_CLASS_INPUT);
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_shader_buts_tex_coord;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_tex_coord);
+ ntype.gpu_fn = file_ns::node_shader_gpu_tex_coord;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_environment.cc b/source/blender/nodes/shader/nodes/node_shader_tex_environment.cc
index a145bce3f6f..60059a8f1c5 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_environment.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_environment.cc
@@ -125,10 +125,10 @@ void register_node_type_sh_tex_environment()
sh_node_type_base(&ntype, SH_NODE_TEX_ENVIRONMENT, "Environment Texture", NODE_CLASS_TEXTURE);
ntype.declare = file_ns::node_declare;
- node_type_init(&ntype, file_ns::node_shader_init_tex_environment);
+ ntype.initfunc = file_ns::node_shader_init_tex_environment;
node_type_storage(
&ntype, "NodeTexEnvironment", node_free_standard_storage, node_copy_standard_storage);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_tex_environment);
+ ntype.gpu_fn = file_ns::node_shader_gpu_tex_environment;
ntype.labelfunc = node_image_label;
node_type_size_preset(&ntype, NODE_SIZE_LARGE);
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_gradient.cc b/source/blender/nodes/shader/nodes/node_shader_tex_gradient.cc
index 75c469fe665..f7bff442420 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_gradient.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_gradient.cc
@@ -157,10 +157,10 @@ void register_node_type_sh_tex_gradient()
sh_fn_node_type_base(&ntype, SH_NODE_TEX_GRADIENT, "Gradient Texture", NODE_CLASS_TEXTURE);
ntype.declare = file_ns::sh_node_tex_gradient_declare;
ntype.draw_buttons = file_ns::node_shader_buts_tex_gradient;
- node_type_init(&ntype, file_ns::node_shader_init_tex_gradient);
+ ntype.initfunc = file_ns::node_shader_init_tex_gradient;
node_type_storage(
&ntype, "NodeTexGradient", node_free_standard_storage, node_copy_standard_storage);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_tex_gradient);
+ ntype.gpu_fn = file_ns::node_shader_gpu_tex_gradient;
ntype.build_multi_function = file_ns::sh_node_gradient_tex_build_multi_function;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_image.cc b/source/blender/nodes/shader/nodes/node_shader_tex_image.cc
index 80398871625..9f4f885fee1 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_image.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_image.cc
@@ -163,10 +163,10 @@ void register_node_type_sh_tex_image()
sh_node_type_base(&ntype, SH_NODE_TEX_IMAGE, "Image Texture", NODE_CLASS_TEXTURE);
ntype.declare = file_ns::sh_node_tex_image_declare;
- node_type_init(&ntype, file_ns::node_shader_init_tex_image);
+ ntype.initfunc = file_ns::node_shader_init_tex_image;
node_type_storage(
&ntype, "NodeTexImage", node_free_standard_storage, node_copy_standard_storage);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_tex_image);
+ ntype.gpu_fn = file_ns::node_shader_gpu_tex_image;
ntype.labelfunc = node_image_label;
node_type_size_preset(&ntype, NODE_SIZE_LARGE);
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_magic.cc b/source/blender/nodes/shader/nodes/node_shader_tex_magic.cc
index b2ba0e52f02..f68f1747b21 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_magic.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_magic.cc
@@ -177,10 +177,10 @@ void register_node_type_sh_tex_magic()
sh_fn_node_type_base(&ntype, SH_NODE_TEX_MAGIC, "Magic Texture", NODE_CLASS_TEXTURE);
ntype.declare = file_ns::sh_node_tex_magic_declare;
ntype.draw_buttons = file_ns::node_shader_buts_tex_magic;
- node_type_init(&ntype, file_ns::node_shader_init_tex_magic);
+ ntype.initfunc = file_ns::node_shader_init_tex_magic;
node_type_storage(
&ntype, "NodeTexMagic", node_free_standard_storage, node_copy_standard_storage);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_tex_magic);
+ ntype.gpu_fn = file_ns::node_shader_gpu_tex_magic;
ntype.build_multi_function = file_ns::sh_node_magic_tex_build_multi_function;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_musgrave.cc b/source/blender/nodes/shader/nodes/node_shader_tex_musgrave.cc
index 9a7573fc870..e79b12b78b9 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_musgrave.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_musgrave.cc
@@ -535,11 +535,11 @@ void register_node_type_sh_tex_musgrave()
ntype.declare = file_ns::sh_node_tex_musgrave_declare;
ntype.draw_buttons = file_ns::node_shader_buts_tex_musgrave;
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_init(&ntype, file_ns::node_shader_init_tex_musgrave);
+ ntype.initfunc = file_ns::node_shader_init_tex_musgrave;
node_type_storage(
&ntype, "NodeTexMusgrave", node_free_standard_storage, node_copy_standard_storage);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_tex_musgrave);
- node_type_update(&ntype, file_ns::node_shader_update_tex_musgrave);
+ ntype.gpu_fn = file_ns::node_shader_gpu_tex_musgrave;
+ ntype.updatefunc = file_ns::node_shader_update_tex_musgrave;
ntype.build_multi_function = file_ns::sh_node_musgrave_build_multi_function;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_noise.cc b/source/blender/nodes/shader/nodes/node_shader_tex_noise.cc
index 684c122f7fe..d72e9c3c451 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_noise.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_noise.cc
@@ -249,11 +249,11 @@ void register_node_type_sh_tex_noise()
sh_fn_node_type_base(&ntype, SH_NODE_TEX_NOISE, "Noise Texture", NODE_CLASS_TEXTURE);
ntype.declare = file_ns::sh_node_tex_noise_declare;
ntype.draw_buttons = file_ns::node_shader_buts_tex_noise;
- node_type_init(&ntype, file_ns::node_shader_init_tex_noise);
+ ntype.initfunc = file_ns::node_shader_init_tex_noise;
node_type_storage(
&ntype, "NodeTexNoise", node_free_standard_storage, node_copy_standard_storage);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_tex_noise);
- node_type_update(&ntype, file_ns::node_shader_update_tex_noise);
+ ntype.gpu_fn = file_ns::node_shader_gpu_tex_noise;
+ ntype.updatefunc = file_ns::node_shader_update_tex_noise;
ntype.build_multi_function = file_ns::sh_node_noise_build_multi_function;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_pointdensity.cc b/source/blender/nodes/shader/nodes/node_shader_tex_pointdensity.cc
index 0d10d5a5047..4005265e49a 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_pointdensity.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_pointdensity.cc
@@ -103,7 +103,7 @@ void register_node_type_sh_tex_pointdensity()
sh_node_type_base(&ntype, SH_NODE_TEX_POINTDENSITY, "Point Density", NODE_CLASS_TEXTURE);
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_shader_buts_tex_pointdensity;
- node_type_init(&ntype, file_ns::node_shader_init_tex_pointdensity);
+ ntype.initfunc = file_ns::node_shader_init_tex_pointdensity;
node_type_storage(&ntype,
"NodeShaderTexPointDensity",
file_ns::node_shader_free_tex_pointdensity,
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_sky.cc b/source/blender/nodes/shader/nodes/node_shader_tex_sky.cc
index 44df6b2b1a1..faa0c0f0888 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_sky.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_sky.cc
@@ -308,11 +308,11 @@ void register_node_type_sh_tex_sky()
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_shader_buts_tex_sky;
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_init(&ntype, file_ns::node_shader_init_tex_sky);
+ ntype.initfunc = file_ns::node_shader_init_tex_sky;
node_type_storage(&ntype, "NodeTexSky", node_free_standard_storage, node_copy_standard_storage);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_tex_sky);
+ ntype.gpu_fn = file_ns::node_shader_gpu_tex_sky;
/* Remove vector input for Nishita sky model. */
- node_type_update(&ntype, file_ns::node_shader_update_sky);
+ ntype.updatefunc = file_ns::node_shader_update_sky;
ntype.gather_link_search_ops = file_ns::node_gather_link_searches;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.cc b/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.cc
index 0ef73f0c5ef..f07ef1b6c60 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.cc
@@ -1347,11 +1347,11 @@ void register_node_type_sh_tex_voronoi()
sh_fn_node_type_base(&ntype, SH_NODE_TEX_VORONOI, "Voronoi Texture", NODE_CLASS_TEXTURE);
ntype.declare = file_ns::sh_node_tex_voronoi_declare;
ntype.draw_buttons = file_ns::node_shader_buts_tex_voronoi;
- node_type_init(&ntype, file_ns::node_shader_init_tex_voronoi);
+ ntype.initfunc = file_ns::node_shader_init_tex_voronoi;
node_type_storage(
&ntype, "NodeTexVoronoi", node_free_standard_storage, node_copy_standard_storage);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_tex_voronoi);
- node_type_update(&ntype, file_ns::node_shader_update_tex_voronoi);
+ ntype.gpu_fn = file_ns::node_shader_gpu_tex_voronoi;
+ ntype.updatefunc = file_ns::node_shader_update_tex_voronoi;
ntype.build_multi_function = file_ns::sh_node_voronoi_build_multi_function;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_wave.cc b/source/blender/nodes/shader/nodes/node_shader_tex_wave.cc
index 91dbc149f78..f4effe28815 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_wave.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_wave.cc
@@ -224,9 +224,9 @@ void register_node_type_sh_tex_wave()
ntype.declare = file_ns::sh_node_tex_wave_declare;
ntype.draw_buttons = file_ns::node_shader_buts_tex_wave;
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_init(&ntype, file_ns::node_shader_init_tex_wave);
+ ntype.initfunc = file_ns::node_shader_init_tex_wave;
node_type_storage(&ntype, "NodeTexWave", node_free_standard_storage, node_copy_standard_storage);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_tex_wave);
+ ntype.gpu_fn = file_ns::node_shader_gpu_tex_wave;
ntype.build_multi_function = file_ns::sh_node_wave_tex_build_multi_function;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_white_noise.cc b/source/blender/nodes/shader/nodes/node_shader_tex_white_noise.cc
index 9a026567682..58787a9afa3 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_white_noise.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_white_noise.cc
@@ -194,9 +194,9 @@ void register_node_type_sh_tex_white_noise()
sh_fn_node_type_base(&ntype, SH_NODE_TEX_WHITE_NOISE, "White Noise Texture", NODE_CLASS_TEXTURE);
ntype.declare = file_ns::sh_node_tex_white_noise_declare;
ntype.draw_buttons = file_ns::node_shader_buts_white_noise;
- node_type_init(&ntype, file_ns::node_shader_init_tex_white_noise);
- node_type_gpu(&ntype, file_ns::gpu_shader_tex_white_noise);
- node_type_update(&ntype, file_ns::node_shader_update_tex_white_noise);
+ ntype.initfunc = file_ns::node_shader_init_tex_white_noise;
+ ntype.gpu_fn = file_ns::gpu_shader_tex_white_noise;
+ ntype.updatefunc = file_ns::node_shader_update_tex_white_noise;
ntype.build_multi_function = file_ns::sh_node_noise_build_multi_function;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/shader/nodes/node_shader_uvmap.cc b/source/blender/nodes/shader/nodes/node_shader_uvmap.cc
index e9d2b32bfd7..483e06f1192 100644
--- a/source/blender/nodes/shader/nodes/node_shader_uvmap.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_uvmap.cc
@@ -70,10 +70,10 @@ void register_node_type_sh_uvmap()
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_shader_buts_uvmap;
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_init(&ntype, file_ns::node_shader_init_uvmap);
+ ntype.initfunc = file_ns::node_shader_init_uvmap;
node_type_storage(
&ntype, "NodeShaderUVMap", node_free_standard_storage, node_copy_standard_storage);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_uvmap);
+ ntype.gpu_fn = file_ns::node_shader_gpu_uvmap;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_value.cc b/source/blender/nodes/shader/nodes/node_shader_value.cc
index 0cd1a1f05f8..c190438c417 100644
--- a/source/blender/nodes/shader/nodes/node_shader_value.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_value.cc
@@ -42,7 +42,7 @@ void register_node_type_sh_value()
sh_fn_node_type_base(&ntype, SH_NODE_VALUE, "Value", NODE_CLASS_INPUT);
ntype.declare = file_ns::sh_node_value_declare;
- node_type_gpu(&ntype, file_ns::gpu_shader_value);
+ ntype.gpu_fn = file_ns::gpu_shader_value;
ntype.build_multi_function = file_ns::sh_node_value_build_multi_function;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/shader/nodes/node_shader_vector_displacement.cc b/source/blender/nodes/shader/nodes/node_shader_vector_displacement.cc
index 64484f83320..c9e4f9c8e14 100644
--- a/source/blender/nodes/shader/nodes/node_shader_vector_displacement.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_vector_displacement.cc
@@ -52,8 +52,8 @@ void register_node_type_sh_vector_displacement()
sh_node_type_base(
&ntype, SH_NODE_VECTOR_DISPLACEMENT, "Vector Displacement", NODE_CLASS_OP_VECTOR);
ntype.declare = file_ns::node_declare;
- node_type_init(&ntype, file_ns::node_shader_init_vector_displacement);
- node_type_gpu(&ntype, file_ns::gpu_shader_vector_displacement);
+ ntype.initfunc = file_ns::node_shader_init_vector_displacement;
+ ntype.gpu_fn = file_ns::gpu_shader_vector_displacement;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_vector_math.cc b/source/blender/nodes/shader/nodes/node_shader_vector_math.cc
index 42b84617996..f7cf70aa8e1 100644
--- a/source/blender/nodes/shader/nodes/node_shader_vector_math.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_vector_math.cc
@@ -322,8 +322,8 @@ void register_node_type_sh_vect_math()
ntype.declare = file_ns::sh_node_vector_math_declare;
ntype.draw_buttons = file_ns::node_shader_buts_vect_math;
ntype.labelfunc = node_vector_math_label;
- node_type_gpu(&ntype, file_ns::gpu_shader_vector_math);
- node_type_update(&ntype, file_ns::node_shader_update_vector_math);
+ ntype.gpu_fn = file_ns::gpu_shader_vector_math;
+ ntype.updatefunc = file_ns::node_shader_update_vector_math;
ntype.build_multi_function = file_ns::sh_node_vector_math_build_multi_function;
ntype.gather_link_search_ops = file_ns::sh_node_vector_math_gather_link_searches;
diff --git a/source/blender/nodes/shader/nodes/node_shader_vector_rotate.cc b/source/blender/nodes/shader/nodes/node_shader_vector_rotate.cc
index 218ed0e54c9..bdf7360873d 100644
--- a/source/blender/nodes/shader/nodes/node_shader_vector_rotate.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_vector_rotate.cc
@@ -212,8 +212,8 @@ void register_node_type_sh_vector_rotate()
sh_fn_node_type_base(&ntype, SH_NODE_VECTOR_ROTATE, "Vector Rotate", NODE_CLASS_OP_VECTOR);
ntype.declare = file_ns::sh_node_vector_rotate_declare;
ntype.draw_buttons = file_ns::node_shader_buts_vector_rotate;
- node_type_gpu(&ntype, file_ns::gpu_shader_vector_rotate);
- node_type_update(&ntype, file_ns::node_shader_update_vector_rotate);
+ ntype.gpu_fn = file_ns::gpu_shader_vector_rotate;
+ ntype.updatefunc = file_ns::node_shader_update_vector_rotate;
ntype.build_multi_function = file_ns::sh_node_vector_rotate_build_multi_function;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/shader/nodes/node_shader_vector_transform.cc b/source/blender/nodes/shader/nodes/node_shader_vector_transform.cc
index 9037c6208fb..03fb954f088 100644
--- a/source/blender/nodes/shader/nodes/node_shader_vector_transform.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_vector_transform.cc
@@ -144,10 +144,10 @@ void register_node_type_sh_vect_transform()
sh_node_type_base(&ntype, SH_NODE_VECT_TRANSFORM, "Vector Transform", NODE_CLASS_OP_VECTOR);
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_shader_buts_vect_transform;
- node_type_init(&ntype, file_ns::node_shader_init_vect_transform);
+ ntype.initfunc = file_ns::node_shader_init_vect_transform;
node_type_storage(
&ntype, "NodeShaderVectTransform", node_free_standard_storage, node_copy_standard_storage);
- node_type_gpu(&ntype, file_ns::gpu_shader_vect_transform);
+ ntype.gpu_fn = file_ns::gpu_shader_vect_transform;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_vertex_color.cc b/source/blender/nodes/shader/nodes/node_shader_vertex_color.cc
index 6e2325bddf9..8f7e30b99df 100644
--- a/source/blender/nodes/shader/nodes/node_shader_vertex_color.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_vertex_color.cc
@@ -69,10 +69,10 @@ void register_node_type_sh_vertex_color()
sh_node_type_base(&ntype, SH_NODE_VERTEX_COLOR, "Color Attribute", NODE_CLASS_INPUT);
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_shader_buts_vertex_color;
- node_type_init(&ntype, file_ns::node_shader_init_vertex_color);
+ ntype.initfunc = file_ns::node_shader_init_vertex_color;
node_type_storage(
&ntype, "NodeShaderVertexColor", node_free_standard_storage, node_copy_standard_storage);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_vertex_color);
+ ntype.gpu_fn = file_ns::node_shader_gpu_vertex_color;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_volume_absorption.cc b/source/blender/nodes/shader/nodes/node_shader_volume_absorption.cc
index d6a29f537ff..e50331585e3 100644
--- a/source/blender/nodes/shader/nodes/node_shader_volume_absorption.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_volume_absorption.cc
@@ -33,7 +33,7 @@ void register_node_type_sh_volume_absorption()
sh_node_type_base(&ntype, SH_NODE_VOLUME_ABSORPTION, "Volume Absorption", NODE_CLASS_SHADER);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_volume_absorption);
+ ntype.gpu_fn = file_ns::node_shader_gpu_volume_absorption;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_volume_info.cc b/source/blender/nodes/shader/nodes/node_shader_volume_info.cc
index 9f1feedc336..6a1bc070f68 100644
--- a/source/blender/nodes/shader/nodes/node_shader_volume_info.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_volume_info.cc
@@ -49,7 +49,7 @@ void register_node_type_sh_volume_info()
sh_node_type_base(&ntype, SH_NODE_VOLUME_INFO, "Volume Info", NODE_CLASS_INPUT);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_volume_info);
+ ntype.gpu_fn = file_ns::node_shader_gpu_volume_info;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_volume_principled.cc b/source/blender/nodes/shader/nodes/node_shader_volume_principled.cc
index 2c5811045f0..4ff57042fe4 100644
--- a/source/blender/nodes/shader/nodes/node_shader_volume_principled.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_volume_principled.cc
@@ -142,8 +142,8 @@ void register_node_type_sh_volume_principled()
sh_node_type_base(&ntype, SH_NODE_VOLUME_PRINCIPLED, "Principled Volume", NODE_CLASS_SHADER);
ntype.declare = file_ns::node_declare;
node_type_size_preset(&ntype, NODE_SIZE_LARGE);
- node_type_init(&ntype, file_ns::node_shader_init_volume_principled);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_volume_principled);
+ ntype.initfunc = file_ns::node_shader_init_volume_principled;
+ ntype.gpu_fn = file_ns::node_shader_gpu_volume_principled;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_volume_scatter.cc b/source/blender/nodes/shader/nodes/node_shader_volume_scatter.cc
index 1322a73ac37..b87792eef2e 100644
--- a/source/blender/nodes/shader/nodes/node_shader_volume_scatter.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_volume_scatter.cc
@@ -38,7 +38,7 @@ void register_node_type_sh_volume_scatter()
sh_node_type_base(&ntype, SH_NODE_VOLUME_SCATTER, "Volume Scatter", NODE_CLASS_SHADER);
ntype.declare = file_ns::node_declare;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_volume_scatter);
+ ntype.gpu_fn = file_ns::node_shader_gpu_volume_scatter;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_wavelength.cc b/source/blender/nodes/shader/nodes/node_shader_wavelength.cc
index 43bb4798e3f..6fa495c3ead 100644
--- a/source/blender/nodes/shader/nodes/node_shader_wavelength.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_wavelength.cc
@@ -41,7 +41,7 @@ void register_node_type_sh_wavelength()
sh_node_type_base(&ntype, SH_NODE_WAVELENGTH, "Wavelength", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::node_declare;
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_gpu(&ntype, file_ns::node_shader_gpu_wavelength);
+ ntype.gpu_fn = file_ns::node_shader_gpu_wavelength;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_wireframe.cc b/source/blender/nodes/shader/nodes/node_shader_wireframe.cc
index ddabebfeec2..b125e7221a6 100644
--- a/source/blender/nodes/shader/nodes/node_shader_wireframe.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_wireframe.cc
@@ -47,7 +47,7 @@ void register_node_type_sh_wireframe()
sh_node_type_base(&ntype, SH_NODE_WIREFRAME, "Wireframe", NODE_CLASS_INPUT);
ntype.declare = file_ns::node_declare;
ntype.draw_buttons = file_ns::node_shader_buts_wireframe;
- node_type_gpu(&ntype, file_ns::node_shader_gpu_wireframe);
+ ntype.gpu_fn = file_ns::node_shader_gpu_wireframe;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_at.c b/source/blender/nodes/texture/nodes/node_texture_at.c
index 74f279d65c7..e2e635b7d92 100644
--- a/source/blender/nodes/texture/nodes/node_texture_at.c
+++ b/source/blender/nodes/texture/nodes/node_texture_at.c
@@ -45,7 +45,7 @@ void register_node_type_tex_at(void)
tex_node_type_base(&ntype, TEX_NODE_AT, "At", NODE_CLASS_DISTORT);
node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 140, 100, 320);
- node_type_exec(&ntype, NULL, NULL, exec);
+ ntype.exec_fn = exec;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_bricks.c b/source/blender/nodes/texture/nodes/node_texture_bricks.c
index bfd43560c2d..b68bf4fcb8d 100644
--- a/source/blender/nodes/texture/nodes/node_texture_bricks.c
+++ b/source/blender/nodes/texture/nodes/node_texture_bricks.c
@@ -106,8 +106,8 @@ void register_node_type_tex_bricks(void)
tex_node_type_base(&ntype, TEX_NODE_BRICKS, "Bricks", NODE_CLASS_PATTERN);
node_type_socket_templates(&ntype, inputs, outputs);
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_init(&ntype, init);
- node_type_exec(&ntype, NULL, NULL, exec);
+ ntype.initfunc = init;
+ ntype.exec_fn = exec;
ntype.flag |= NODE_PREVIEW;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/texture/nodes/node_texture_checker.c b/source/blender/nodes/texture/nodes/node_texture_checker.c
index 08f87cb7875..d66eb7e6953 100644
--- a/source/blender/nodes/texture/nodes/node_texture_checker.c
+++ b/source/blender/nodes/texture/nodes/node_texture_checker.c
@@ -56,7 +56,7 @@ void register_node_type_tex_checker(void)
tex_node_type_base(&ntype, TEX_NODE_CHECKER, "Checker", NODE_CLASS_PATTERN);
node_type_socket_templates(&ntype, inputs, outputs);
- node_type_exec(&ntype, NULL, NULL, exec);
+ ntype.exec_fn = exec;
ntype.flag |= NODE_PREVIEW;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/texture/nodes/node_texture_combine_color.c b/source/blender/nodes/texture/nodes/node_texture_combine_color.c
index 459553bc950..e6a8080bb48 100644
--- a/source/blender/nodes/texture/nodes/node_texture_combine_color.c
+++ b/source/blender/nodes/texture/nodes/node_texture_combine_color.c
@@ -69,8 +69,8 @@ void register_node_type_tex_combine_color(void)
tex_node_type_base(&ntype, TEX_NODE_COMBINE_COLOR, "Combine Color", NODE_CLASS_OP_COLOR);
node_type_socket_templates(&ntype, inputs, outputs);
- node_type_exec(&ntype, NULL, NULL, exec);
- node_type_update(&ntype, update);
+ ntype.exec_fn = exec;
+ ntype.updatefunc = update;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_common.c b/source/blender/nodes/texture/nodes/node_texture_common.c
index 96345b00a82..8ff4ad61387 100644
--- a/source/blender/nodes/texture/nodes/node_texture_common.c
+++ b/source/blender/nodes/texture/nodes/node_texture_common.c
@@ -155,8 +155,10 @@ void register_node_type_tex_group(void)
node_type_size(&ntype, 140, 60, 400);
ntype.labelfunc = node_group_label;
- node_type_group_update(&ntype, node_group_update);
- node_type_exec(&ntype, group_initexec, group_freeexec, group_execute);
+ ntype.group_update_func = node_group_update;
+ ntype.init_exec_fn = group_initexec;
+ ntype.free_exec_fn = group_freeexec;
+ ntype.exec_fn = group_execute;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_compose.c b/source/blender/nodes/texture/nodes/node_texture_compose.c
index e36bc248ed1..d41566be74c 100644
--- a/source/blender/nodes/texture/nodes/node_texture_compose.c
+++ b/source/blender/nodes/texture/nodes/node_texture_compose.c
@@ -45,7 +45,7 @@ void register_node_type_tex_compose(void)
tex_node_type_base(
&ntype, TEX_NODE_COMPOSE_LEGACY, "Combine RGBA (Legacy)", NODE_CLASS_OP_COLOR);
node_type_socket_templates(&ntype, inputs, outputs);
- node_type_exec(&ntype, NULL, NULL, exec);
+ ntype.exec_fn = exec;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_coord.c b/source/blender/nodes/texture/nodes/node_texture_coord.c
index e74dfd378d9..1babea310f4 100644
--- a/source/blender/nodes/texture/nodes/node_texture_coord.c
+++ b/source/blender/nodes/texture/nodes/node_texture_coord.c
@@ -35,7 +35,7 @@ void register_node_type_tex_coord(void)
tex_node_type_base(&ntype, TEX_NODE_COORD, "Coordinates", NODE_CLASS_INPUT);
node_type_socket_templates(&ntype, NULL, outputs);
- node_type_exec(&ntype, NULL, NULL, exec);
+ ntype.exec_fn = exec;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_curves.c b/source/blender/nodes/texture/nodes/node_texture_curves.c
index dee4531746f..df75847dbe3 100644
--- a/source/blender/nodes/texture/nodes/node_texture_curves.c
+++ b/source/blender/nodes/texture/nodes/node_texture_curves.c
@@ -52,9 +52,10 @@ void register_node_type_tex_curve_time(void)
tex_node_type_base(&ntype, TEX_NODE_CURVE_TIME, "Time", NODE_CLASS_INPUT);
node_type_socket_templates(&ntype, NULL, time_outputs);
node_type_size_preset(&ntype, NODE_SIZE_LARGE);
- node_type_init(&ntype, time_init);
+ ntype.initfunc = time_init;
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
- node_type_exec(&ntype, node_initexec_curves, NULL, time_exec);
+ ntype.init_exec_fn = node_initexec_curves;
+ ntype.exec_fn = time_exec;
nodeRegisterType(&ntype);
}
@@ -101,9 +102,11 @@ void register_node_type_tex_curve_rgb(void)
tex_node_type_base(&ntype, TEX_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR);
node_type_socket_templates(&ntype, rgb_inputs, rgb_outputs);
node_type_size_preset(&ntype, NODE_SIZE_LARGE);
- node_type_init(&ntype, rgb_init);
+ ntype.initfunc = rgb_init;
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
- node_type_exec(&ntype, node_initexec_curves, NULL, rgb_exec);
+ ntype.init_exec_fn = node_initexec_curves ;
+ ntype.exec_fn =rgb_exec ;
+
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_decompose.c b/source/blender/nodes/texture/nodes/node_texture_decompose.c
index 2d42fa4602e..ae7e80a6aab 100644
--- a/source/blender/nodes/texture/nodes/node_texture_decompose.c
+++ b/source/blender/nodes/texture/nodes/node_texture_decompose.c
@@ -64,7 +64,7 @@ void register_node_type_tex_decompose(void)
tex_node_type_base(&ntype, TEX_NODE_DECOMPOSE_LEGACY, "Separate RGBA", NODE_CLASS_OP_COLOR);
node_type_socket_templates(&ntype, inputs, outputs);
- node_type_exec(&ntype, NULL, NULL, exec);
+ ntype.exec_fn = exec;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_distance.c b/source/blender/nodes/texture/nodes/node_texture_distance.c
index e236b6743a6..19918a9896e 100644
--- a/source/blender/nodes/texture/nodes/node_texture_distance.c
+++ b/source/blender/nodes/texture/nodes/node_texture_distance.c
@@ -46,7 +46,7 @@ void register_node_type_tex_distance(void)
tex_node_type_base(&ntype, TEX_NODE_DISTANCE, "Distance", NODE_CLASS_CONVERTER);
node_type_socket_templates(&ntype, inputs, outputs);
- node_type_exec(&ntype, NULL, NULL, exec);
+ ntype.exec_fn = exec;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c b/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c
index 989d94953f7..454b58f4665 100644
--- a/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c
+++ b/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c
@@ -94,7 +94,7 @@ void register_node_type_tex_hue_sat(void)
tex_node_type_base(&ntype, TEX_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR);
node_type_socket_templates(&ntype, inputs, outputs);
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_exec(&ntype, NULL, NULL, exec);
+ ntype.exec_fn = exec;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_image.c b/source/blender/nodes/texture/nodes/node_texture_image.c
index e94c78b41ea..8b859421762 100644
--- a/source/blender/nodes/texture/nodes/node_texture_image.c
+++ b/source/blender/nodes/texture/nodes/node_texture_image.c
@@ -94,9 +94,9 @@ void register_node_type_tex_image(void)
tex_node_type_base(&ntype, TEX_NODE_IMAGE, "Image", NODE_CLASS_INPUT);
node_type_socket_templates(&ntype, NULL, outputs);
- node_type_init(&ntype, init);
+ ntype.initfunc = init;
node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage);
- node_type_exec(&ntype, NULL, NULL, exec);
+ ntype.exec_fn = exec;
ntype.labelfunc = node_image_label;
ntype.flag |= NODE_PREVIEW;
diff --git a/source/blender/nodes/texture/nodes/node_texture_invert.c b/source/blender/nodes/texture/nodes/node_texture_invert.c
index 6343f5f2caa..526d47bef9c 100644
--- a/source/blender/nodes/texture/nodes/node_texture_invert.c
+++ b/source/blender/nodes/texture/nodes/node_texture_invert.c
@@ -49,7 +49,7 @@ void register_node_type_tex_invert(void)
tex_node_type_base(&ntype, TEX_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR);
node_type_socket_templates(&ntype, inputs, outputs);
- node_type_exec(&ntype, NULL, NULL, exec);
+ ntype.exec_fn = exec;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_math.c b/source/blender/nodes/texture/nodes/node_texture_math.c
index 5867d6b91e1..505ba51b4d8 100644
--- a/source/blender/nodes/texture/nodes/node_texture_math.c
+++ b/source/blender/nodes/texture/nodes/node_texture_math.c
@@ -322,8 +322,8 @@ void register_node_type_tex_math(void)
tex_node_type_base(&ntype, TEX_NODE_MATH, "Math", NODE_CLASS_CONVERTER);
node_type_socket_templates(&ntype, inputs, outputs);
ntype.labelfunc = node_math_label;
- node_type_exec(&ntype, NULL, NULL, exec);
- node_type_update(&ntype, node_math_update);
+ ntype.exec_fn = exec;
+ ntype.updatefunc = node_math_update;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_mixRgb.c b/source/blender/nodes/texture/nodes/node_texture_mixRgb.c
index cd6b54c4cf8..15ca2280fe1 100644
--- a/source/blender/nodes/texture/nodes/node_texture_mixRgb.c
+++ b/source/blender/nodes/texture/nodes/node_texture_mixRgb.c
@@ -56,7 +56,7 @@ void register_node_type_tex_mix_rgb(void)
tex_node_type_base(&ntype, TEX_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR);
node_type_socket_templates(&ntype, inputs, outputs);
ntype.labelfunc = node_blend_label;
- node_type_exec(&ntype, NULL, NULL, exec);
+ ntype.exec_fn = exec;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_output.c b/source/blender/nodes/texture/nodes/node_texture_output.c
index b300ba9ef77..37e39dae22c 100644
--- a/source/blender/nodes/texture/nodes/node_texture_output.c
+++ b/source/blender/nodes/texture/nodes/node_texture_output.c
@@ -138,9 +138,9 @@ void register_node_type_tex_output(void)
tex_node_type_base(&ntype, TEX_NODE_OUTPUT, "Output", NODE_CLASS_OUTPUT);
node_type_socket_templates(&ntype, inputs, NULL);
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
- node_type_init(&ntype, init);
+ ntype.initfunc = init;
node_type_storage(&ntype, "TexNodeOutput", node_free_standard_storage, copy);
- node_type_exec(&ntype, NULL, NULL, exec);
+ ntype.exec_fn = exec;
ntype.flag |= NODE_PREVIEW;
ntype.no_muting = true;
diff --git a/source/blender/nodes/texture/nodes/node_texture_proc.c b/source/blender/nodes/texture/nodes/node_texture_proc.c
index d925c9f3554..f23c4f55820 100644
--- a/source/blender/nodes/texture/nodes/node_texture_proc.c
+++ b/source/blender/nodes/texture/nodes/node_texture_proc.c
@@ -254,9 +254,9 @@ static void init(bNodeTree *UNUSED(ntree), bNode *node)
tex_node_type_base(&ntype, TEX_NODE_PROC + TEXTYPE, Name, NODE_CLASS_TEXTURE); \
node_type_socket_templates(&ntype, name##_inputs, outputs); \
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE); \
- node_type_init(&ntype, init); \
+ ntype.initfunc = init; \
node_type_storage(&ntype, "Tex", node_free_standard_storage, node_copy_standard_storage); \
- node_type_exec(&ntype, NULL, NULL, name##_exec); \
+ ntype.exec_fn = name##_exec; \
ntype.flag |= NODE_PREVIEW; \
\
nodeRegisterType(&ntype); \
diff --git a/source/blender/nodes/texture/nodes/node_texture_rotate.c b/source/blender/nodes/texture/nodes/node_texture_rotate.c
index 0bd2de76a9c..b31adefcbba 100644
--- a/source/blender/nodes/texture/nodes/node_texture_rotate.c
+++ b/source/blender/nodes/texture/nodes/node_texture_rotate.c
@@ -81,7 +81,7 @@ void register_node_type_tex_rotate(void)
tex_node_type_base(&ntype, TEX_NODE_ROTATE, "Rotate", NODE_CLASS_DISTORT);
node_type_socket_templates(&ntype, inputs, outputs);
- node_type_exec(&ntype, NULL, NULL, exec);
+ ntype.exec_fn = exec;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_scale.c b/source/blender/nodes/texture/nodes/node_texture_scale.c
index d565146cf09..93a4db7677c 100644
--- a/source/blender/nodes/texture/nodes/node_texture_scale.c
+++ b/source/blender/nodes/texture/nodes/node_texture_scale.c
@@ -54,7 +54,7 @@ void register_node_type_tex_scale(void)
tex_node_type_base(&ntype, TEX_NODE_SCALE, "Scale", NODE_CLASS_DISTORT);
node_type_socket_templates(&ntype, inputs, outputs);
- node_type_exec(&ntype, NULL, NULL, exec);
+ ntype.exec_fn = exec;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_separate_color.c b/source/blender/nodes/texture/nodes/node_texture_separate_color.c
index a482a3f3421..030f7d79043 100644
--- a/source/blender/nodes/texture/nodes/node_texture_separate_color.c
+++ b/source/blender/nodes/texture/nodes/node_texture_separate_color.c
@@ -95,8 +95,8 @@ void register_node_type_tex_separate_color(void)
tex_node_type_base(&ntype, TEX_NODE_SEPARATE_COLOR, "Separate Color", NODE_CLASS_OP_COLOR);
node_type_socket_templates(&ntype, inputs, outputs);
- node_type_exec(&ntype, NULL, NULL, exec);
- node_type_update(&ntype, update);
+ ntype.exec_fn = exec;
+ ntype.updatefunc = update;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_texture.c b/source/blender/nodes/texture/nodes/node_texture_texture.c
index 79cd8bbb1df..163a6516a58 100644
--- a/source/blender/nodes/texture/nodes/node_texture_texture.c
+++ b/source/blender/nodes/texture/nodes/node_texture_texture.c
@@ -78,7 +78,7 @@ void register_node_type_tex_texture(void)
tex_node_type_base(&ntype, TEX_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT);
node_type_socket_templates(&ntype, inputs, outputs);
- node_type_exec(&ntype, NULL, NULL, exec);
+ ntype.exec_fn = exec;
ntype.flag |= NODE_PREVIEW;
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/texture/nodes/node_texture_translate.c b/source/blender/nodes/texture/nodes/node_texture_translate.c
index 7ce7722938d..a8c12116097 100644
--- a/source/blender/nodes/texture/nodes/node_texture_translate.c
+++ b/source/blender/nodes/texture/nodes/node_texture_translate.c
@@ -50,7 +50,7 @@ void register_node_type_tex_translate(void)
tex_node_type_base(&ntype, TEX_NODE_TRANSLATE, "Translate", NODE_CLASS_DISTORT);
node_type_socket_templates(&ntype, inputs, outputs);
- node_type_exec(&ntype, NULL, NULL, exec);
+ ntype.exec_fn = exec;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_valToNor.c b/source/blender/nodes/texture/nodes/node_texture_valToNor.c
index 492aadf3281..d0fc5229e06 100644
--- a/source/blender/nodes/texture/nodes/node_texture_valToNor.c
+++ b/source/blender/nodes/texture/nodes/node_texture_valToNor.c
@@ -66,7 +66,7 @@ void register_node_type_tex_valtonor(void)
tex_node_type_base(&ntype, TEX_NODE_VALTONOR, "Value to Normal", NODE_CLASS_CONVERTER);
node_type_socket_templates(&ntype, inputs, outputs);
- node_type_exec(&ntype, NULL, NULL, exec);
+ ntype.exec_fn = exec;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_valToRgb.c b/source/blender/nodes/texture/nodes/node_texture_valToRgb.c
index e41e83555fc..b2acef407e2 100644
--- a/source/blender/nodes/texture/nodes/node_texture_valToRgb.c
+++ b/source/blender/nodes/texture/nodes/node_texture_valToRgb.c
@@ -50,9 +50,9 @@ void register_node_type_tex_valtorgb(void)
tex_node_type_base(&ntype, TEX_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTER);
node_type_socket_templates(&ntype, valtorgb_in, valtorgb_out);
node_type_size_preset(&ntype, NODE_SIZE_LARGE);
- node_type_init(&ntype, valtorgb_init);
+ ntype.initfunc = valtorgb_init;
node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage);
- node_type_exec(&ntype, NULL, NULL, valtorgb_exec);
+ ntype.exec_fn = valtorgb_exec;
nodeRegisterType(&ntype);
}
@@ -91,7 +91,7 @@ void register_node_type_tex_rgbtobw(void)
tex_node_type_base(&ntype, TEX_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTER);
node_type_socket_templates(&ntype, rgbtobw_in, rgbtobw_out);
- node_type_exec(&ntype, NULL, NULL, rgbtobw_exec);
+ ntype.exec_fn = rgbtobw_exec;
nodeRegisterType(&ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_viewer.c b/source/blender/nodes/texture/nodes/node_texture_viewer.c
index 72da751f8ef..1f31d62ed38 100644
--- a/source/blender/nodes/texture/nodes/node_texture_viewer.c
+++ b/source/blender/nodes/texture/nodes/node_texture_viewer.c
@@ -38,7 +38,7 @@ void register_node_type_tex_viewer(void)
tex_node_type_base(&ntype, TEX_NODE_VIEWER, "Viewer", NODE_CLASS_OUTPUT);
node_type_socket_templates(&ntype, inputs, NULL);
- node_type_exec(&ntype, NULL, NULL, exec);
+ ntype.exec_fn = exec;
ntype.no_muting = true;
ntype.flag |= NODE_PREVIEW;
diff --git a/source/blender/python/bmesh/bmesh_py_ops.c b/source/blender/python/bmesh/bmesh_py_ops.c
index 37e2b009f55..35f87172d78 100644
--- a/source/blender/python/bmesh/bmesh_py_ops.c
+++ b/source/blender/python/bmesh/bmesh_py_ops.c
@@ -146,82 +146,54 @@ static PyGetSetDef bpy_bmesh_op_getseters[] = {
* ===== */
static PyTypeObject bmesh_op_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "BMeshOpFunc", /* tp_name */
- sizeof(BPy_BMeshOpFunc), /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- NULL, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- NULL, /* getattrfunc tp_getattr; */
- NULL, /* setattrfunc tp_setattr; */
- NULL,
- /* tp_compare */ /* DEPRECATED in python 3.0! */
- (reprfunc)bpy_bmesh_op_repr, /* tp_repr */
-
- /* Method suites for standard classes */
-
- NULL, /* PyNumberMethods *tp_as_number; */
- NULL, /* PySequenceMethods *tp_as_sequence; */
- NULL, /* PyMappingMethods *tp_as_mapping; */
-
- /* More standard operations (here for binary compatibility) */
-
- NULL, /* hashfunc tp_hash; */
- (ternaryfunc)BPy_BMO_call, /* ternaryfunc tp_call; */
- NULL, /* reprfunc tp_str; */
-
- /* will only use these if this is a subtype of a py class */
- NULL, /* getattrofunc tp_getattro; */
- NULL, /* setattrofunc tp_setattro; */
-
- /* Functions to access object as input/output buffer */
- NULL, /* PyBufferProcs *tp_as_buffer; */
-
- /*** Flags to define presence of optional/expanded features ***/
- Py_TPFLAGS_DEFAULT, /* long tp_flags; */
-
- NULL, /* char *tp_doc; Documentation string */
- /*** Assigned meaning in release 2.0 ***/
- /* call function for all accessible objects */
- NULL, /* traverseproc tp_traverse; */
-
- /* delete references to contained objects */
- NULL, /* inquiry tp_clear; */
-
- /*** Assigned meaning in release 2.1 ***/
- /*** rich comparisons ***/
- NULL, /* richcmpfunc tp_richcompare; */
-
- /*** weak reference enabler ***/
- 0,
- /*** Added in release 2.2 ***/
- /* Iterators */
- NULL, /* getiterfunc tp_iter; */
- NULL, /* iternextfunc tp_iternext; */
-
- /*** Attribute descriptor and subclassing stuff ***/
- NULL, /* struct PyMethodDef *tp_methods; */
- NULL, /* struct PyMemberDef *tp_members; */
- bpy_bmesh_op_getseters, /* struct PyGetSetDef *tp_getset; */
- NULL, /* struct _typeobject *tp_base; */
- NULL, /* PyObject *tp_dict; */
- NULL, /* descrgetfunc tp_descr_get; */
- NULL, /* descrsetfunc tp_descr_set; */
- 0, /* long tp_dictoffset; */
- NULL, /* initproc tp_init; */
- NULL, /* allocfunc tp_alloc; */
- NULL, /* newfunc tp_new; */
- /* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
- /* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
- NULL, /* PyObject *tp_bases; */
- /* method resolution order */
- NULL, /* PyObject *tp_mro; */
- NULL, /* PyObject *tp_cache; */
- NULL, /* PyObject *tp_subclasses; */
- NULL, /* PyObject *tp_weaklist; */
- NULL,
+ /*tp_name*/ PyVarObject_HEAD_INIT(NULL, 0) "BMeshOpFunc",
+ /*tp_basicsize*/ sizeof(BPy_BMeshOpFunc),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ NULL,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ (reprfunc)bpy_bmesh_op_repr,
+ /*tp_as_number*/ NULL,
+ /*tp_as_sequence*/ NULL,
+ /*tp_as_mapping*/ NULL,
+ /*tp_hash*/ NULL,
+ /*tp_call*/ (ternaryfunc)BPy_BMO_call,
+ /*tp_str*/ NULL,
+ /*tp_getattro*/ NULL,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT,
+ /*tp_doc*/ NULL,
+ /*tp_traverse*/ NULL,
+ /*tp_clear*/ NULL,
+ /*tp_richcompare*/ NULL,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ NULL,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ NULL,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ bpy_bmesh_op_getseters,
+ /*tp_base*/ NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ NULL,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ NULL,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
/* bmesh module 'bmesh.ops'
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c
index 364adb5458b..cf20e1349ee 100644
--- a/source/blender/python/bmesh/bmesh_py_types.c
+++ b/source/blender/python/bmesh/bmesh_py_types.c
@@ -3313,31 +3313,30 @@ static int bpy_bmelem_ass_subscript(BPy_BMElem *self, BPy_BMLayerItem *key, PyOb
}
static PySequenceMethods bpy_bmelemseq_as_sequence = {
- (lenfunc)bpy_bmelemseq_length, /* sq_length */
- NULL, /* sq_concat */
- NULL, /* sq_repeat */
- (ssizeargfunc)bpy_bmelemseq_subscript_int,
- /* sq_item */ /* Only set this so PySequence_Check() returns True */
- NULL, /* sq_slice */
- (ssizeobjargproc)NULL, /* sq_ass_item */
- NULL, /* *was* sq_ass_slice */
- (objobjproc)bpy_bmelemseq_contains, /* sq_contains */
- (binaryfunc)NULL, /* sq_inplace_concat */
- (ssizeargfunc)NULL, /* sq_inplace_repeat */
+ /*sq_length*/ (lenfunc)bpy_bmelemseq_length,
+ /*sq_concat*/ NULL,
+ /*sq_repeat*/ NULL,
+ /* Only set this so `PySequence_Check()` returns True. */
+ /*sq_item*/ (ssizeargfunc)bpy_bmelemseq_subscript_int,
+ /*was_sq_slice*/ NULL,
+ /*sq_ass_item*/ NULL,
+ /*was_sq_ass_slice*/ NULL,
+ /*sq_contains*/ (objobjproc)bpy_bmelemseq_contains,
+ /*sq_inplace_concat*/ NULL,
+ /*sq_inplace_repeat*/ NULL,
};
static PyMappingMethods bpy_bmelemseq_as_mapping = {
- (lenfunc)bpy_bmelemseq_length, /* mp_length */
- (binaryfunc)bpy_bmelemseq_subscript, /* mp_subscript */
- (objobjargproc)NULL, /* mp_ass_subscript */
+ /*mp_len*/ (lenfunc)bpy_bmelemseq_length,
+ /*mp_subscript*/ (binaryfunc)bpy_bmelemseq_subscript,
+ /*mp_ass_subscript*/ (objobjargproc)NULL,
};
/* for customdata access */
static PyMappingMethods bpy_bm_elem_as_mapping = {
- (lenfunc)NULL,
- /* mp_length */ /* keep this empty, messes up 'if elem: ...' test */
- (binaryfunc)bpy_bmelem_subscript, /* mp_subscript */
- (objobjargproc)bpy_bmelem_ass_subscript, /* mp_ass_subscript */
+ /*mp_len*/ (lenfunc)NULL, /* Keep this empty, messes up `if elem: ...` test. */
+ /*mp_subscript*/ (binaryfunc)bpy_bmelem_subscript,
+ /*mp_ass_subscript*/ (objobjargproc)bpy_bmelem_ass_subscript,
};
/* Iterator
diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c
index 58bfb922327..2d0e31b9e3f 100644
--- a/source/blender/python/bmesh/bmesh_py_types_customdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c
@@ -871,23 +871,23 @@ static int bpy_bmlayercollection_contains(BPy_BMLayerCollection *self, PyObject
}
static PySequenceMethods bpy_bmlayercollection_as_sequence = {
- (lenfunc)bpy_bmlayercollection_length, /* sq_length */
- NULL, /* sq_concat */
- NULL, /* sq_repeat */
- (ssizeargfunc)bpy_bmlayercollection_subscript_int,
- /* sq_item */ /* Only set this so PySequence_Check() returns True */
- NULL, /* sq_slice */
- (ssizeobjargproc)NULL, /* sq_ass_item */
- NULL, /* *was* sq_ass_slice */
- (objobjproc)bpy_bmlayercollection_contains, /* sq_contains */
- (binaryfunc)NULL, /* sq_inplace_concat */
- (ssizeargfunc)NULL, /* sq_inplace_repeat */
+ /*sq_length*/ (lenfunc)bpy_bmlayercollection_length,
+ /*sq_concat*/ NULL,
+ /*sq_repeat*/ NULL,
+ /* Only set this so `PySequence_Check()` returns True. */
+ /*sq_item*/ (ssizeargfunc)bpy_bmlayercollection_subscript_int,
+ /*was_sq_slice*/ NULL, /* DEPRECATED. */
+ /*sq_ass_item*/ NULL,
+ /*was_sq_ass_slice*/ NULL, /* DEPRECATED. */
+ /*sq_contains*/ (objobjproc)bpy_bmlayercollection_contains,
+ /*sq_inplace_concat*/ NULL,
+ /*sq_inplace_repeat*/ NULL,
};
static PyMappingMethods bpy_bmlayercollection_as_mapping = {
- (lenfunc)bpy_bmlayercollection_length, /* mp_length */
- (binaryfunc)bpy_bmlayercollection_subscript, /* mp_subscript */
- (objobjargproc)NULL, /* mp_ass_subscript */
+ /*mp_len*/ (lenfunc)bpy_bmlayercollection_length,
+ /*mp_subscript*/ (binaryfunc)bpy_bmlayercollection_subscript,
+ /*mp_ass_subscript*/ (objobjargproc)NULL,
};
/* Iterator
diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
index 9f200734786..c58c9caf0a8 100644
--- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
@@ -486,26 +486,24 @@ static int bpy_bmdeformvert_contains(BPy_BMDeformVert *self, PyObject *value)
/* only defined for __contains__ */
static PySequenceMethods bpy_bmdeformvert_as_sequence = {
- (lenfunc)bpy_bmdeformvert_len, /* sq_length */
- NULL, /* sq_concat */
- NULL, /* sq_repeat */
-
+ /*sq_length*/ (lenfunc)bpy_bmdeformvert_len,
+ /*sq_concat*/ NULL,
+ /*sq_repeat*/ NULL,
/* NOTE: if this is set #PySequence_Check() returns True,
* but in this case we don't want to be treated as a seq. */
- NULL, /* sq_item */
-
- NULL, /* sq_slice */
- NULL, /* sq_ass_item */
- NULL, /* *was* sq_ass_slice */
- (objobjproc)bpy_bmdeformvert_contains, /* sq_contains */
- (binaryfunc)NULL, /* sq_inplace_concat */
- (ssizeargfunc)NULL, /* sq_inplace_repeat */
+ /*sq_item*/ NULL,
+ /*was_sq_slice*/ NULL, /* DEPRECATED. */
+ /*sq_ass_item*/ NULL,
+ /*was_sq_ass_slice*/ NULL, /* DEPRECATED. */
+ /*sq_contains*/ (objobjproc)bpy_bmdeformvert_contains,
+ /*sq_inplace_concat*/ NULL,
+ /*sq_inplace_repeat*/ NULL,
};
static PyMappingMethods bpy_bmdeformvert_as_mapping = {
- (lenfunc)bpy_bmdeformvert_len,
- (binaryfunc)bpy_bmdeformvert_subscript,
- (objobjargproc)bpy_bmdeformvert_ass_subscript,
+ /*mp_len*/ (lenfunc)bpy_bmdeformvert_len,
+ /*mp_subscript*/ (binaryfunc)bpy_bmdeformvert_subscript,
+ /*mp_ass_subscript*/ (objobjargproc)bpy_bmdeformvert_ass_subscript,
};
/* Methods
diff --git a/source/blender/python/bmesh/bmesh_py_types_select.c b/source/blender/python/bmesh/bmesh_py_types_select.c
index 93bce055b12..20bf06e8016 100644
--- a/source/blender/python/bmesh/bmesh_py_types_select.c
+++ b/source/blender/python/bmesh/bmesh_py_types_select.c
@@ -291,23 +291,23 @@ static int bpy_bmeditselseq_contains(BPy_BMEditSelSeq *self, PyObject *value)
}
static PySequenceMethods bpy_bmeditselseq_as_sequence = {
- (lenfunc)bpy_bmeditselseq_length, /* sq_length */
- NULL, /* sq_concat */
- NULL, /* sq_repeat */
- (ssizeargfunc)bpy_bmeditselseq_subscript_int,
- /* sq_item */ /* Only set this so PySequence_Check() returns True */
- NULL, /* sq_slice */
- (ssizeobjargproc)NULL, /* sq_ass_item */
- NULL, /* *was* sq_ass_slice */
- (objobjproc)bpy_bmeditselseq_contains, /* sq_contains */
- (binaryfunc)NULL, /* sq_inplace_concat */
- (ssizeargfunc)NULL, /* sq_inplace_repeat */
+ /*sq_length*/ (lenfunc)bpy_bmeditselseq_length,
+ /*sq_concat*/ NULL,
+ /*sq_repeat*/ NULL,
+ /* Only set this so `PySequence_Check()` returns True. */
+ /*sq_item*/ (ssizeargfunc)bpy_bmeditselseq_subscript_int,
+ /*sq_slice */ NULL,
+ /*sq_ass_item */ NULL,
+ /*was_sq_ass_slice*/ NULL,
+ /*sq_contains*/ (objobjproc)bpy_bmeditselseq_contains,
+ /*sq_inplace_concat*/ NULL,
+ /*sq_inplace_repeat*/ NULL,
};
static PyMappingMethods bpy_bmeditselseq_as_mapping = {
- (lenfunc)bpy_bmeditselseq_length, /* mp_length */
- (binaryfunc)bpy_bmeditselseq_subscript, /* mp_subscript */
- (objobjargproc)NULL, /* mp_ass_subscript */
+ /*mp_len*/ (lenfunc)bpy_bmeditselseq_length,
+ /*mp_subscript*/ (binaryfunc)bpy_bmeditselseq_subscript,
+ /*mp_ass_subscript*/ (objobjargproc)NULL,
};
/* Iterator
diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c
index fd5f2e77672..a03e0ab31eb 100644
--- a/source/blender/python/generic/bgl.c
+++ b/source/blender/python/generic/bgl.c
@@ -491,22 +491,22 @@ static bool compare_dimensions(int ndim, const int *dim1, const Py_ssize_t *dim2
* \{ */
static PySequenceMethods Buffer_SeqMethods = {
- (lenfunc)Buffer_len, /* sq_length */
- (binaryfunc)NULL, /* sq_concat */
- (ssizeargfunc)NULL, /* sq_repeat */
- (ssizeargfunc)Buffer_item, /* sq_item */
- (ssizessizeargfunc)NULL, /* sq_slice, deprecated, handled in Buffer_item */
- (ssizeobjargproc)Buffer_ass_item, /* sq_ass_item */
- (ssizessizeobjargproc)NULL, /* sq_ass_slice, deprecated handled in Buffer_ass_item */
- (objobjproc)NULL, /* sq_contains */
- (binaryfunc)NULL, /* sq_inplace_concat */
- (ssizeargfunc)NULL, /* sq_inplace_repeat */
+ /*sq_length*/ (lenfunc)Buffer_len,
+ /*sq_concat*/ NULL,
+ /*sq_repeat*/ NULL,
+ /*sq_item*/ (ssizeargfunc)Buffer_item,
+ /*was_sq_slice*/ NULL, /* DEPRECATED. Handled by #Buffer_item. */
+ /*sq_ass_item*/ (ssizeobjargproc)Buffer_ass_item,
+ /*was_sq_ass_slice*/ NULL, /* DEPRECATED. Handled by #Buffer_ass_item. */
+ /*sq_contains*/ NULL,
+ /*sq_inplace_concat*/ NULL,
+ /*sq_inplace_repeat*/ NULL,
};
static PyMappingMethods Buffer_AsMapping = {
- (lenfunc)Buffer_len,
- (binaryfunc)Buffer_subscript,
- (objobjargproc)Buffer_ass_subscript,
+ /*mp_len*/ (lenfunc)Buffer_len,
+ /*mp_subscript*/ (binaryfunc)Buffer_subscript,
+ /*mp_ass_subscript*/ (objobjargproc)Buffer_ass_subscript,
};
static void Buffer_dealloc(Buffer *self);
@@ -568,72 +568,55 @@ static PyGetSetDef Buffer_getseters[] = {
};
PyTypeObject BGL_bufferType = {
- PyVarObject_HEAD_INIT(NULL, 0) "bgl.Buffer", /* tp_name */
- sizeof(Buffer), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)Buffer_dealloc, /* tp_dealloc */
- (printfunc)NULL, /* tp_print */
- NULL, /* tp_getattr */
- NULL, /* tp_setattr */
- NULL, /* tp_compare */
- (reprfunc)Buffer_repr, /* tp_repr */
- NULL, /* tp_as_number */
- &Buffer_SeqMethods, /* tp_as_sequence */
- &Buffer_AsMapping, /* PyMappingMethods *tp_as_mapping; */
-
- /* More standard operations (here for binary compatibility) */
-
- NULL, /* hashfunc tp_hash; */
- NULL, /* ternaryfunc tp_call; */
- NULL, /* reprfunc tp_str; */
- NULL, /* getattrofunc tp_getattro; */
- NULL, /* setattrofunc tp_setattro; */
-
- /* Functions to access object as input/output buffer */
- NULL, /* PyBufferProcs *tp_as_buffer; */
-
- /*** Flags to define presence of optional/expanded features ***/
- Py_TPFLAGS_DEFAULT, /* long tp_flags; */
-
- NULL, /* char *tp_doc; Documentation string */
- /*** Assigned meaning in release 2.0 ***/
- /* call function for all accessible objects */
- NULL, /* traverseproc tp_traverse; */
-
- /* delete references to contained objects */
- NULL, /* inquiry tp_clear; */
-
- /*** Assigned meaning in release 2.1 ***/
- /*** rich comparisons ***/
- NULL, /* richcmpfunc tp_richcompare; */
-
- /*** weak reference enabler ***/
- 0, /* long tp_weaklistoffset; */
-
- /*** Added in release 2.2 ***/
- /* Iterators */
- NULL, /* getiterfunc tp_iter; */
- NULL, /* iternextfunc tp_iternext; */
- /*** Attribute descriptor and subclassing stuff ***/
- Buffer_methods, /* struct PyMethodDef *tp_methods; */
- NULL, /* struct PyMemberDef *tp_members; */
- Buffer_getseters, /* struct PyGetSetDef *tp_getset; */
- NULL, /*tp_base*/
- NULL, /*tp_dict*/
- NULL, /*tp_descr_get*/
- NULL, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- NULL, /*tp_init*/
- NULL, /*tp_alloc*/
- Buffer_new, /*tp_new*/
- NULL, /*tp_free*/
- NULL, /*tp_is_gc*/
- NULL, /*tp_bases*/
- NULL, /*tp_mro*/
- NULL, /*tp_cache*/
- NULL, /*tp_subclasses*/
- NULL, /*tp_weaklist*/
- NULL, /*tp_del*/
+ PyVarObject_HEAD_INIT(NULL, 0)
+ /*tp_name*/ "bgl.Buffer",
+ /*tp_basicsize*/ sizeof(Buffer),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)Buffer_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ (reprfunc)Buffer_repr,
+ /*tp_as_number*/ NULL,
+ /*tp_as_sequence*/ &Buffer_SeqMethods,
+ /*tp_as_mapping*/ &Buffer_AsMapping,
+ /*tp_hash*/ NULL,
+ /*tp_call*/ NULL,
+ /*tp_str*/ NULL,
+ /*tp_getattro*/ NULL,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT,
+ /*tp_doc*/ NULL,
+ /*tp_traverse*/ NULL,
+ /*tp_clear*/ NULL,
+ /*tp_richcompare*/ NULL,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ NULL,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ Buffer_methods,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ Buffer_getseters,
+ /*tp_base*/ NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ Buffer_new,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ NULL,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
static Buffer *BGL_MakeBuffer_FromData(
diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c
index 3978f7f37cc..a5599a3622e 100644
--- a/source/blender/python/generic/idprop_py_api.c
+++ b/source/blender/python/generic/idprop_py_api.c
@@ -1156,36 +1156,36 @@ static int BPy_Group_ViewItems_Contains(BPy_IDGroup_View *self, PyObject *value)
}
static PySequenceMethods BPy_IDGroup_ViewKeys_as_sequence = {
- (lenfunc)BPy_Group_View_len, /* sq_length */
- 0, /* sq_concat */
- 0, /* sq_repeat */
- 0, /* sq_item */
- 0, /* sq_slice */
- 0, /* sq_ass_item */
- 0, /* sq_ass_slice */
- (objobjproc)BPy_Group_ViewKeys_Contains, /* sq_contains */
+ /*sq_length*/ (lenfunc)BPy_Group_View_len,
+ /*sq_concat*/ NULL,
+ /*sq_repeat*/ NULL,
+ /*sq_item*/ NULL,
+ /*was_sq_slice*/ NULL,
+ /*sq_ass_item*/ NULL,
+ /*was_sq_ass_slice*/ NULL,
+ /*sq_contains*/ (objobjproc)BPy_Group_ViewKeys_Contains,
};
static PySequenceMethods BPy_IDGroup_ViewValues_as_sequence = {
- (lenfunc)BPy_Group_View_len, /* sq_length */
- 0, /* sq_concat */
- 0, /* sq_repeat */
- 0, /* sq_item */
- 0, /* sq_slice */
- 0, /* sq_ass_item */
- 0, /* sq_ass_slice */
- (objobjproc)BPy_Group_ViewValues_Contains, /* sq_contains */
+ /*sq_length*/ (lenfunc)BPy_Group_View_len,
+ /*sq_concat*/ NULL,
+ /*sq_repeat*/ NULL,
+ /*sq_item*/ NULL,
+ /*was_sq_slice*/ NULL,
+ /*sq_ass_item*/ NULL,
+ /*was_sq_ass_slice*/ NULL,
+ /*sq_contains*/ (objobjproc)BPy_Group_ViewValues_Contains,
};
static PySequenceMethods BPy_IDGroup_ViewItems_as_sequence = {
- (lenfunc)BPy_Group_View_len, /* sq_length */
- 0, /* sq_concat */
- 0, /* sq_repeat */
- 0, /* sq_item */
- 0, /* sq_slice */
- 0, /* sq_ass_item */
- 0, /* sq_ass_slice */
- (objobjproc)BPy_Group_ViewItems_Contains, /* sq_contains */
+ /*sq_length*/ (lenfunc)BPy_Group_View_len,
+ /*sq_concat*/ NULL,
+ /*sq_repeat*/ NULL,
+ /*sq_item*/ NULL,
+ /*was_sq_slice*/ NULL,
+ /*sq_ass_item*/ NULL,
+ /*was_sq_ass_slice*/ NULL,
+ /*sq_contains*/ (objobjproc)BPy_Group_ViewItems_Contains,
};
/* Methods. */
@@ -1551,84 +1551,76 @@ static struct PyMethodDef BPy_IDGroup_methods[] = {
* \{ */
static PySequenceMethods BPy_IDGroup_Seq = {
- (lenfunc)BPy_IDGroup_Map_Len, /* lenfunc sq_length */
- NULL, /* binaryfunc sq_concat */
- NULL, /* ssizeargfunc sq_repeat */
- NULL,
- /* ssizeargfunc sq_item */ /* TODO: setting this will allow PySequence_Check to return True. */
- NULL, /* intintargfunc ***was_sq_slice*** */
- NULL, /* intobjargproc sq_ass_item */
- NULL, /* ssizeobjargproc ***was_sq_ass_slice*** */
- (objobjproc)BPy_IDGroup_Contains, /* objobjproc sq_contains */
- NULL, /* binaryfunc sq_inplace_concat */
- NULL, /* ssizeargfunc sq_inplace_repeat */
+ /*sq_length*/ (lenfunc)BPy_IDGroup_Map_Len,
+ /*sq_concat*/ NULL,
+ /*sq_repeat*/ NULL,
+ /* TODO: setting this will allow `PySequence_Check()` to return True. */
+ /*sq_item*/ NULL,
+ /*was_sq_slice*/ NULL, /* DEPRECATED. */
+ /*sq_ass_item*/ NULL,
+ /*was_sq_ass_slice*/ NULL, /* DEPRECATED. */
+ /*sq_contains*/ (objobjproc)BPy_IDGroup_Contains,
+ /*sq_inplace_concat*/ NULL,
+ /*sq_inplace_repeat*/ NULL,
};
static PyMappingMethods BPy_IDGroup_Mapping = {
- (lenfunc)BPy_IDGroup_Map_Len, /* inquiry mp_length */
- (binaryfunc)BPy_IDGroup_Map_GetItem, /* binaryfunc mp_subscript */
- (objobjargproc)BPy_IDGroup_Map_SetItem, /* objobjargproc mp_ass_subscript */
+ /*mp_len*/ (lenfunc)BPy_IDGroup_Map_Len,
+ /*mp_subscript*/ (binaryfunc)BPy_IDGroup_Map_GetItem,
+ /*mp_ass_subscript*/ (objobjargproc)BPy_IDGroup_Map_SetItem,
};
PyTypeObject BPy_IDGroup_Type = {
PyVarObject_HEAD_INIT(NULL, 0)
- /* For printing, in format "<module>.<name>" */
- "IDPropertyGroup", /* char *tp_name; */
- sizeof(BPy_IDProperty), /* int tp_basicsize; */
- 0, /* tp_itemsize; For allocation */
-
- /* Methods to implement standard operations */
-
- NULL, /* destructor tp_dealloc; */
- 0, /* tp_vectorcall_offset */
- NULL, /* getattrfunc tp_getattr; */
- NULL, /* setattrfunc tp_setattr; */
- NULL, /* cmpfunc tp_compare; */
- (reprfunc)BPy_IDGroup_repr, /* reprfunc tp_repr; */
-
- /* Method suites for standard classes */
-
- NULL, /* PyNumberMethods *tp_as_number; */
- &BPy_IDGroup_Seq, /* PySequenceMethods *tp_as_sequence; */
- &BPy_IDGroup_Mapping, /* PyMappingMethods *tp_as_mapping; */
-
- /* More standard operations (here for binary compatibility) */
-
- (hashfunc)BPy_IDGroup_hash, /* hashfunc tp_hash; */
- NULL, /* ternaryfunc tp_call; */
- NULL, /* reprfunc tp_str; */
- NULL, /* getattrofunc tp_getattro; */
- NULL, /* setattrofunc tp_setattro; */
-
- /* Functions to access object as input/output buffer */
- NULL, /* PyBufferProcs *tp_as_buffer; */
-
- /*** Flags to define presence of optional/expanded features ***/
- Py_TPFLAGS_DEFAULT, /* long tp_flags; */
-
- NULL, /* char *tp_doc; Documentation string */
- /*** Assigned meaning in release 2.0 ***/
- /* call function for all accessible objects */
- NULL, /* traverseproc tp_traverse; */
-
- /* delete references to contained objects */
- NULL, /* inquiry tp_clear; */
-
- /*** Assigned meaning in release 2.1 ***/
- /*** rich comparisons ***/
- NULL, /* richcmpfunc tp_richcompare; */
-
- /*** weak reference enabler ***/
- 0, /* long tp_weaklistoffset; */
-
- /*** Added in release 2.2 ***/
- /* Iterators */
- (getiterfunc)BPy_IDGroup_iter, /* getiterfunc tp_iter; */
- NULL, /* iternextfunc tp_iternext; */
- /*** Attribute descriptor and subclassing stuff ***/
- BPy_IDGroup_methods, /* struct PyMethodDef *tp_methods; */
- NULL, /* struct PyMemberDef *tp_members; */
- BPy_IDGroup_getseters, /* struct PyGetSetDef *tp_getset; */
+ /* For printing, in format `<module>.<name>`. */
+ /*tp_name*/ "IDPropertyGroup",
+ /*tp_basicsize*/ sizeof(BPy_IDProperty),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ NULL,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ (reprfunc)BPy_IDGroup_repr,
+ /*tp_as_number*/ NULL,
+ /*tp_as_sequence*/ &BPy_IDGroup_Seq,
+ /*tp_as_mapping*/ &BPy_IDGroup_Mapping,
+ /*tp_hash*/ (hashfunc)BPy_IDGroup_hash,
+ /*tp_call*/ NULL,
+ /*tp_str*/ NULL,
+ /*tp_getattro*/ NULL,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT,
+ /*tp_doc*/ NULL,
+ /*tp_traverse*/ NULL,
+ /*tp_clear*/ NULL,
+ /*tp_richcompare*/ NULL,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ (getiterfunc)BPy_IDGroup_iter,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ BPy_IDGroup_methods,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ BPy_IDGroup_getseters,
+ /*tp_base*/ NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ NULL,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ NULL,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
/** \} */
@@ -1768,17 +1760,16 @@ static int BPy_IDArray_SetItem(BPy_IDArray *self, int index, PyObject *value)
}
static PySequenceMethods BPy_IDArray_Seq = {
- (lenfunc)BPy_IDArray_Len, /* inquiry sq_length */
- NULL, /* binaryfunc sq_concat */
- NULL, /* intargfunc sq_repeat */
- (ssizeargfunc)BPy_IDArray_GetItem, /* intargfunc sq_item */
- NULL, /* intintargfunc sq_slice */
- (ssizeobjargproc)BPy_IDArray_SetItem, /* intobjargproc sq_ass_item */
- NULL, /* intintobjargproc sq_ass_slice */
- NULL, /* objobjproc sq_contains */
- /* Added in release 2.0 */
- NULL, /* binaryfunc sq_inplace_concat */
- NULL, /* intargfunc sq_inplace_repeat */
+ /*sq_length*/ (lenfunc)BPy_IDArray_Len,
+ /*sq_concat*/ NULL,
+ /*sq_repeat*/ NULL,
+ /*sq_item*/ (ssizeargfunc)BPy_IDArray_GetItem,
+ /*was_sq_slice*/ NULL, /* DEPRECATED. */
+ /*sq_ass_item*/ (ssizeobjargproc)BPy_IDArray_SetItem,
+ /*was_sq_ass_slice*/ NULL, /* DEPRECATED. */
+ /*sq_contains*/ NULL,
+ /*sq_inplace_concat*/ NULL,
+ /*sq_inplace_repeat*/ NULL,
};
/* sequence slice (get): idparr[a:b] */
@@ -1926,9 +1917,9 @@ static int BPy_IDArray_ass_subscript(BPy_IDArray *self, PyObject *item, PyObject
}
static PyMappingMethods BPy_IDArray_AsMapping = {
- (lenfunc)BPy_IDArray_Len,
- (binaryfunc)BPy_IDArray_subscript,
- (objobjargproc)BPy_IDArray_ass_subscript,
+ /*mp_len*/ (lenfunc)BPy_IDArray_Len,
+ /*mp_subscript*/ (binaryfunc)BPy_IDArray_subscript,
+ /*mp_ass_subscript*/ (objobjargproc)BPy_IDArray_ass_subscript,
};
static int itemsize_by_idarray_type(int array_type)
@@ -1971,8 +1962,8 @@ static void BPy_IDArray_releasebuffer(BPy_IDArray *UNUSED(self), Py_buffer *view
}
static PyBufferProcs BPy_IDArray_Buffer = {
- (getbufferproc)BPy_IDArray_getbuffer,
- (releasebufferproc)BPy_IDArray_releasebuffer,
+ /*bf_getbuffer*/ (getbufferproc)BPy_IDArray_getbuffer,
+ /*bf_releasebuffer*/ (releasebufferproc)BPy_IDArray_releasebuffer,
};
/** \} */
@@ -1983,83 +1974,55 @@ static PyBufferProcs BPy_IDArray_Buffer = {
PyTypeObject BPy_IDArray_Type = {
PyVarObject_HEAD_INIT(NULL, 0)
- /* For printing, in format "<module>.<name>" */
- "IDPropertyArray", /* char *tp_name; */
- sizeof(BPy_IDArray), /* int tp_basicsize; */
- 0, /* tp_itemsize; For allocation */
-
- /* Methods to implement standard operations */
-
- NULL, /* destructor tp_dealloc; */
- 0, /* tp_vectorcall_offset */
- NULL, /* getattrfunc tp_getattr; */
- NULL, /* setattrfunc tp_setattr; */
- NULL, /* cmpfunc tp_compare; */
- (reprfunc)BPy_IDArray_repr, /* reprfunc tp_repr; */
-
- /* Method suites for standard classes */
-
- NULL, /* PyNumberMethods *tp_as_number; */
- &BPy_IDArray_Seq, /* PySequenceMethods *tp_as_sequence; */
- &BPy_IDArray_AsMapping, /* PyMappingMethods *tp_as_mapping; */
-
- /* More standard operations (here for binary compatibility) */
-
- NULL, /* hashfunc tp_hash; */
- NULL, /* ternaryfunc tp_call; */
- NULL, /* reprfunc tp_str; */
- NULL, /* getattrofunc tp_getattro; */
- NULL, /* setattrofunc tp_setattro; */
-
- /* Functions to access object as input/output buffer */
- &BPy_IDArray_Buffer, /* PyBufferProcs *tp_as_buffer; */
-
- /*** Flags to define presence of optional/expanded features ***/
- Py_TPFLAGS_DEFAULT, /* long tp_flags; */
-
- NULL, /* char *tp_doc; Documentation string */
- /*** Assigned meaning in release 2.0 ***/
- /* call function for all accessible objects */
- NULL, /* traverseproc tp_traverse; */
-
- /* delete references to contained objects */
- NULL, /* inquiry tp_clear; */
-
- /*** Assigned meaning in release 2.1 ***/
- /*** rich comparisons ***/
- NULL, /* richcmpfunc tp_richcompare; */
-
- /*** weak reference enabler ***/
- 0, /* long tp_weaklistoffset; */
-
- /*** Added in release 2.2 ***/
- /* Iterators */
- NULL, /* getiterfunc tp_iter; */
- NULL, /* iternextfunc tp_iternext; */
-
- /*** Attribute descriptor and subclassing stuff ***/
- BPy_IDArray_methods, /* struct PyMethodDef *tp_methods; */
- NULL, /* struct PyMemberDef *tp_members; */
- BPy_IDArray_getseters, /* struct PyGetSetDef *tp_getset; */
- NULL, /* struct _typeobject *tp_base; */
- NULL, /* PyObject *tp_dict; */
- NULL, /* descrgetfunc tp_descr_get; */
- NULL, /* descrsetfunc tp_descr_set; */
- 0, /* long tp_dictoffset; */
- NULL, /* initproc tp_init; */
- NULL, /* allocfunc tp_alloc; */
- NULL, /* newfunc tp_new; */
- /* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
- /* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
- NULL, /* PyObject *tp_bases; */
- /* method resolution order */
- NULL, /* PyObject *tp_mro; */
- NULL, /* PyObject *tp_cache; */
- NULL, /* PyObject *tp_subclasses; */
- NULL, /* PyObject *tp_weaklist; */
- NULL,
+ /* For printing, in format `<module>.<name>`. */
+ /*tp_name*/ "IDPropertyArray",
+ /*tp_basicsize*/ sizeof(BPy_IDArray),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ NULL,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ (reprfunc)BPy_IDArray_repr,
+ /*tp_as_number*/ NULL,
+ /*tp_as_sequence*/ &BPy_IDArray_Seq,
+ /*tp_as_mapping*/ &BPy_IDArray_AsMapping,
+ /*tp_hash*/ NULL,
+ /*tp_call*/ NULL,
+ /*tp_str*/ NULL,
+ /*tp_getattro*/ NULL,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ &BPy_IDArray_Buffer,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT,
+ /*tp_doc*/ NULL,
+ /*tp_traverse*/ NULL,
+ /*tp_clear*/ NULL,
+ /*tp_richcompare*/ NULL,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ NULL,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ BPy_IDArray_methods,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ BPy_IDArray_getseters,
+ /*tp_base*/ NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ NULL,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ NULL,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
/** \} */
diff --git a/source/blender/python/generic/idprop_py_ui_api.c b/source/blender/python/generic/idprop_py_ui_api.c
index 890ba997548..4487a885a6c 100644
--- a/source/blender/python/generic/idprop_py_ui_api.c
+++ b/source/blender/python/generic/idprop_py_ui_api.c
@@ -660,63 +660,55 @@ static Py_hash_t BPy_IDPropertyUIManager_hash(BPy_IDPropertyUIManager *self)
PyTypeObject BPy_IDPropertyUIManager_Type = {
PyVarObject_HEAD_INIT(NULL, 0)
- /* For printing, in format "<module>.<name>" */
- "IDPropertyUIManager", /* char *tp_name; */
- sizeof(BPy_IDPropertyUIManager), /* int tp_basicsize; */
- 0, /* tp_itemsize; For allocation */
-
- /* Methods to implement standard operations */
-
- NULL, /* destructor tp_dealloc; */
- 0, /* tp_vectorcall_offset */
- NULL, /* getattrfunc tp_getattr; */
- NULL, /* setattrfunc tp_setattr; */
- NULL, /* cmpfunc tp_compare; */
- (reprfunc)BPy_IDPropertyUIManager_repr, /* reprfunc tp_repr; */
-
- /* Method suites for standard classes */
-
- NULL, /* PyNumberMethods *tp_as_number; */
- NULL, /* PySequenceMethods *tp_as_sequence; */
- NULL, /* PyMappingMethods *tp_as_mapping; */
-
- /* More standard operations (here for binary compatibility) */
-
- (hashfunc)BPy_IDPropertyUIManager_hash, /* hashfunc tp_hash; */
- NULL, /* ternaryfunc tp_call; */
- NULL, /* reprfunc tp_str; */
- NULL, /* getattrofunc tp_getattro; */
- NULL, /* setattrofunc tp_setattro; */
-
- /* Functions to access object as input/output buffer */
- NULL, /* PyBufferProcs *tp_as_buffer; */
-
- /*** Flags to define presence of optional/expanded features ***/
- Py_TPFLAGS_DEFAULT, /* long tp_flags; */
-
- NULL, /* char *tp_doc; Documentation string */
- /*** Assigned meaning in release 2.0 ***/
- /* call function for all accessible objects */
- NULL, /* traverseproc tp_traverse; */
-
- /* delete references to contained objects */
- NULL, /* inquiry tp_clear; */
-
- /*** Assigned meaning in release 2.1 ***/
- /*** rich comparisons ***/
- NULL, /* richcmpfunc tp_richcompare; */
-
- /*** weak reference enabler ***/
- 0, /* long tp_weaklistoffset; */
-
- /*** Added in release 2.2 ***/
- /* Iterators */
- NULL, /* getiterfunc tp_iter; */
- NULL, /* iternextfunc tp_iternext; */
- /*** Attribute descriptor and subclassing stuff ***/
- BPy_IDPropertyUIManager_methods, /* struct PyMethodDef *tp_methods; */
- NULL, /* struct PyMemberDef *tp_members; */
- NULL, /* struct PyGetSetDef *tp_getset; */
+ /* For printing, in format `<module>.<name>`. */
+ /*tp_name*/ "IDPropertyUIManager",
+ /*tp_basicsize*/ sizeof(BPy_IDPropertyUIManager),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ NULL,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ (reprfunc)BPy_IDPropertyUIManager_repr,
+ /*tp_as_number*/ NULL,
+ /*tp_as_sequence*/ NULL,
+ /*tp_as_mapping*/ NULL,
+ /*tp_hash*/ (hashfunc)BPy_IDPropertyUIManager_hash,
+ /*tp_call*/ NULL,
+ /*tp_str*/ NULL,
+ /*tp_getattro*/ NULL,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT,
+ /*tp_doc*/ NULL,
+ /*tp_traverse*/ NULL,
+ /*tp_clear*/ NULL,
+ /*tp_richcompare*/ NULL,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ NULL,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ BPy_IDPropertyUIManager_methods,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ NULL,
+ /*tp_base*/ NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ NULL,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ NULL,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
void IDPropertyUIData_Init_Types()
diff --git a/source/blender/python/generic/imbuf_py_api.c b/source/blender/python/generic/imbuf_py_api.c
index 14f1958b71d..c6a817fa01c 100644
--- a/source/blender/python/generic/imbuf_py_api.c
+++ b/source/blender/python/generic/imbuf_py_api.c
@@ -348,63 +348,54 @@ static Py_hash_t py_imbuf_hash(Py_ImBuf *self)
PyTypeObject Py_ImBuf_Type = {
PyVarObject_HEAD_INIT(NULL, 0)
- /* For printing, in format "<module>.<name>" */
- "ImBuf", /* tp_name */
- sizeof(Py_ImBuf), /* int tp_basicsize; */
- 0, /* tp_itemsize; For allocation */
-
- /* Methods to implement standard operations */
-
- (destructor)py_imbuf_dealloc, /* destructor tp_dealloc; */
- 0, /* tp_vectorcall_offset */
- NULL, /* getattrfunc tp_getattr; */
- NULL, /* setattrfunc tp_setattr; */
- NULL, /* cmpfunc tp_compare; */
- (reprfunc)py_imbuf_repr, /* reprfunc tp_repr; */
-
- /* Method suites for standard classes */
-
- NULL, /* PyNumberMethods *tp_as_number; */
- NULL, /* PySequenceMethods *tp_as_sequence; */
- NULL, /* PyMappingMethods *tp_as_mapping; */
-
- /* More standard operations (here for binary compatibility) */
-
- (hashfunc)py_imbuf_hash, /* hashfunc tp_hash; */
- NULL, /* ternaryfunc tp_call; */
- NULL, /* reprfunc tp_str; */
- NULL, /* getattrofunc tp_getattro; */
- NULL, /* setattrofunc tp_setattro; */
-
- /* Functions to access object as input/output buffer */
- NULL, /* PyBufferProcs *tp_as_buffer; */
-
- /*** Flags to define presence of optional/expanded features ***/
- Py_TPFLAGS_DEFAULT, /* long tp_flags; */
-
- NULL, /* char *tp_doc; Documentation string */
- /*** Assigned meaning in release 2.0 ***/
- /* call function for all accessible objects */
- NULL, /* traverseproc tp_traverse; */
-
- /* delete references to contained objects */
- NULL, /* inquiry tp_clear; */
-
- /*** Assigned meaning in release 2.1 ***/
- /*** rich comparisons ***/
- NULL, /* richcmpfunc tp_richcompare; */
-
- /*** weak reference enabler ***/
- 0, /* long tp_weaklistoffset; */
-
- /*** Added in release 2.2 ***/
- /* Iterators */
- NULL, /* getiterfunc tp_iter; */
- NULL, /* iternextfunc tp_iternext; */
- /*** Attribute descriptor and subclassing stuff ***/
- Py_ImBuf_methods, /* struct PyMethodDef *tp_methods; */
- NULL, /* struct PyMemberDef *tp_members; */
- Py_ImBuf_getseters, /* struct PyGetSetDef *tp_getset; */
+ /*tp_name*/ "ImBuf",
+ /*tp_basicsize*/ sizeof(Py_ImBuf),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)py_imbuf_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ (reprfunc)py_imbuf_repr,
+ /*tp_as_number*/ NULL,
+ /*tp_as_sequence*/ NULL,
+ /*tp_as_mapping*/ NULL,
+ /*tp_hash*/ (hashfunc)py_imbuf_hash,
+ /*tp_call*/ NULL,
+ /*tp_str*/ NULL,
+ /*tp_getattro*/ NULL,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT,
+ /*tp_doc*/ NULL,
+ /*tp_traverse*/ NULL,
+ /*tp_clear*/ NULL,
+ /*tp_richcompare*/ NULL,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ NULL,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ Py_ImBuf_methods,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ Py_ImBuf_getseters,
+ /*tp_base*/ NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ NULL,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ NULL,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
static PyObject *Py_ImBuf_CreatePyObject(ImBuf *ibuf)
diff --git a/source/blender/python/gpu/gpu_py_buffer.c b/source/blender/python/gpu/gpu_py_buffer.c
index 30a434f8667..3dc141f400d 100644
--- a/source/blender/python/gpu/gpu_py_buffer.c
+++ b/source/blender/python/gpu/gpu_py_buffer.c
@@ -579,22 +579,22 @@ static PyGetSetDef pygpu_buffer_getseters[] = {
};
static PySequenceMethods pygpu_buffer__tp_as_sequence = {
- (lenfunc)pygpu_buffer__sq_length, /* sq_length */
- (binaryfunc)NULL, /* sq_concat */
- (ssizeargfunc)NULL, /* sq_repeat */
- (ssizeargfunc)pygpu_buffer__sq_item, /* sq_item */
- (ssizessizeargfunc)NULL, /* sq_slice, deprecated, handled in pygpu_buffer__sq_item */
- (ssizeobjargproc)pygpu_buffer__sq_ass_item, /* sq_ass_item */
- (ssizessizeobjargproc)NULL, /* sq_ass_slice, deprecated handled in pygpu_buffer__sq_ass_item */
- (objobjproc)NULL, /* sq_contains */
- (binaryfunc)NULL, /* sq_inplace_concat */
- (ssizeargfunc)NULL, /* sq_inplace_repeat */
+ /*sq_length*/ (lenfunc)pygpu_buffer__sq_length,
+ /*sq_concat*/ NULL,
+ /*sq_repeat*/ NULL,
+ /*sq_item*/ (ssizeargfunc)pygpu_buffer__sq_item,
+ /*was_sq_slice*/ NULL, /* DEPRECATED. Handled by #pygpu_buffer__sq_item. */
+ /*sq_ass_item*/ (ssizeobjargproc)pygpu_buffer__sq_ass_item,
+ /*was_sq_ass_slice*/ NULL, /* DEPRECATED. Handled by #pygpu_buffer__sq_ass_item. */
+ /*sq_contains*/ NULL,
+ /*sq_inplace_concat*/ NULL,
+ /*sq_inplace_repeat*/ NULL,
};
static PyMappingMethods pygpu_buffer__tp_as_mapping = {
- (lenfunc)pygpu_buffer__sq_length,
- (binaryfunc)pygpu_buffer__mp_subscript,
- (objobjargproc)pygpu_buffer__mp_ass_subscript,
+ /*mp_len*/ (lenfunc)pygpu_buffer__sq_length,
+ /*mp_subscript*/ (binaryfunc)pygpu_buffer__mp_subscript,
+ /*mp_ass_subscript*/ (objobjargproc)pygpu_buffer__mp_ass_subscript,
};
#ifdef PYGPU_BUFFER_PROTOCOL
@@ -648,8 +648,8 @@ static void pygpu_buffer__bf_releasebuffer(PyObject *UNUSED(exporter), Py_buffer
}
static PyBufferProcs pygpu_buffer__tp_as_buffer = {
- (getbufferproc)pygpu_buffer__bf_getbuffer,
- (releasebufferproc)pygpu_buffer__bf_releasebuffer,
+ /*bf_getbuffer*/ (getbufferproc)pygpu_buffer__bf_getbuffer,
+ /*bf_releasebuffer*/ (releasebufferproc)pygpu_buffer__bf_releasebuffer,
};
#endif
diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c
index 8c5fb22eab1..3580481941d 100644
--- a/source/blender/python/intern/bpy_app_handlers.c
+++ b/source/blender/python/intern/bpy_app_handlers.c
@@ -132,7 +132,7 @@ static PyObject *bpy_app_handlers_persistent_new(PyTypeObject *UNUSED(type),
return NULL;
}
-/* dummy type because decorators can't be PyCFunctions */
+/** Dummy type because decorators can't be a #PyCFunction. */
static PyTypeObject BPyPersistent_Type = {
#if defined(_MSC_VER)
@@ -140,46 +140,54 @@ static PyTypeObject BPyPersistent_Type = {
#else
PyVarObject_HEAD_INIT(&PyType_Type, 0)
#endif
-
- "persistent", /* tp_name */
- 0, /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- 0, /* tp_init */
- 0, /* tp_alloc */
- bpy_app_handlers_persistent_new, /* tp_new */
- 0, /* tp_free */
+ /*tp_name*/ "persistent",
+ /*tp_basicsize*/ 0,
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ NULL,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ NULL,
+ /*tp_as_number*/ NULL,
+ /*tp_as_sequence*/ NULL,
+ /*tp_as_mapping*/ NULL,
+ /*tp_hash*/ NULL,
+ /*tp_call*/ NULL,
+ /*tp_str*/ NULL,
+ /*tp_getattro*/ NULL,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ NULL,
+ /*tp_traverse*/ NULL,
+ /*tp_clear*/ NULL,
+ /*tp_richcompare*/ NULL,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ NULL,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ NULL,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ NULL,
+ /*tp_base*/ NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ bpy_app_handlers_persistent_new,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ NULL,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
static PyObject *py_cb_array[BKE_CB_EVT_TOT] = {NULL};
diff --git a/source/blender/python/intern/bpy_app_translations.c b/source/blender/python/intern/bpy_app_translations.c
index 7627d498774..1f5565eb0a7 100644
--- a/source/blender/python/intern/bpy_app_translations.c
+++ b/source/blender/python/intern/bpy_app_translations.c
@@ -773,84 +773,54 @@ PyDoc_STRVAR(app_translations_doc,
"\n");
static PyTypeObject BlenderAppTranslationsType = {
PyVarObject_HEAD_INIT(NULL, 0)
- /* tp_name */
- "bpy.app._translations_type",
- /* tp_basicsize */
- sizeof(BlenderAppTranslations),
- 0, /* tp_itemsize */
- /* methods */
- /* No destructor, this is a singleton! */
- NULL, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- NULL, /* getattrfunc tp_getattr; */
- NULL, /* setattrfunc tp_setattr; */
- NULL,
- /* tp_compare */ /* DEPRECATED in python 3.0! */
- NULL, /* tp_repr */
-
- /* Method suites for standard classes */
- NULL, /* PyNumberMethods *tp_as_number; */
- NULL, /* PySequenceMethods *tp_as_sequence; */
- NULL, /* PyMappingMethods *tp_as_mapping; */
-
- /* More standard operations (here for binary compatibility) */
- NULL, /* hashfunc tp_hash; */
- NULL, /* ternaryfunc tp_call; */
- NULL, /* reprfunc tp_str; */
- NULL, /* getattrofunc tp_getattro; */
- NULL, /* setattrofunc tp_setattro; */
-
- /* Functions to access object as input/output buffer */
- NULL, /* PyBufferProcs *tp_as_buffer; */
-
- /*** Flags to define presence of optional/expanded features ***/
- Py_TPFLAGS_DEFAULT, /* long tp_flags; */
-
- app_translations_doc, /* char *tp_doc; Documentation string */
-
- /*** Assigned meaning in release 2.0 ***/
- /* call function for all accessible objects */
- NULL, /* traverseproc tp_traverse; */
-
- /* delete references to contained objects */
- NULL, /* inquiry tp_clear; */
-
- /*** Assigned meaning in release 2.1 ***/
- /*** rich comparisons ***/
- NULL, /* richcmpfunc tp_richcompare; */
-
- /*** weak reference enabler ***/
- 0, /* long tp_weaklistoffset */
-
- /*** Added in release 2.2 ***/
- /* Iterators */
- NULL, /* getiterfunc tp_iter; */
- NULL, /* iternextfunc tp_iternext; */
-
- /*** Attribute descriptor and subclassing stuff ***/
- app_translations_methods, /* struct PyMethodDef *tp_methods; */
- app_translations_members, /* struct PyMemberDef *tp_members; */
- app_translations_getseters, /* struct PyGetSetDef *tp_getset; */
- NULL, /* struct _typeobject *tp_base; */
- NULL, /* PyObject *tp_dict; */
- NULL, /* descrgetfunc tp_descr_get; */
- NULL, /* descrsetfunc tp_descr_set; */
- 0, /* long tp_dictoffset; */
- NULL, /* initproc tp_init; */
- NULL, /* allocfunc tp_alloc; */
- /* newfunc tp_new; */
- (newfunc)app_translations_new,
- /* Low-level free-memory routine */
- app_translations_free, /* freefunc tp_free; */
- /* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
- NULL, /* PyObject *tp_bases; */
- /* method resolution order */
- NULL, /* PyObject *tp_mro; */
- NULL, /* PyObject *tp_cache; */
- NULL, /* PyObject *tp_subclasses; */
- NULL, /* PyObject *tp_weaklist; */
- NULL,
+ /*tp_name*/ "bpy.app._translations_type",
+ /*tp_basicsize*/ sizeof(BlenderAppTranslations),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ NULL,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ NULL,
+ /*tp_as_number*/ NULL,
+ /*tp_as_sequence*/ NULL,
+ /*tp_as_mapping*/ NULL,
+ /*tp_hash*/ NULL,
+ /*tp_call*/ NULL,
+ /*tp_str*/ NULL,
+ /*tp_getattro*/ NULL,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT,
+ /*tp_doc*/ app_translations_doc,
+ /*tp_traverse*/ NULL,
+ /*tp_clear*/ NULL,
+ /*tp_richcompare*/ NULL,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ NULL,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ app_translations_methods,
+ /*tp_members*/ app_translations_members,
+ /*tp_getset*/ app_translations_getseters,
+ /*tp_base*/ NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ (newfunc)app_translations_new,
+ /*tp_free*/ app_translations_free,
+ /*tp_is_gc*/ NULL,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
PyObject *BPY_app_translations_struct(void)
diff --git a/source/blender/python/intern/bpy_gizmo_wrap.h b/source/blender/python/intern/bpy_gizmo_wrap.h
index 6a876747e22..7d5edebed0f 100644
--- a/source/blender/python/intern/bpy_gizmo_wrap.h
+++ b/source/blender/python/intern/bpy_gizmo_wrap.h
@@ -13,7 +13,7 @@ struct wmGizmoType;
extern "C" {
#endif
-/* exposed to rna/wm api */
+/* Exposed to RNA/WM API. */
void BPY_RNA_gizmo_wrapper(struct wmGizmoType *gzt, void *userdata);
void BPY_RNA_gizmogroup_wrapper(struct wmGizmoGroupType *gzgt, void *userdata);
diff --git a/source/blender/python/intern/bpy_library_load.c b/source/blender/python/intern/bpy_library_load.c
index f29a8d34359..acc6e2cf448 100644
--- a/source/blender/python/intern/bpy_library_load.c
+++ b/source/blender/python/intern/bpy_library_load.c
@@ -84,82 +84,55 @@ static void bpy_lib_dealloc(BPy_Library *self)
}
static PyTypeObject bpy_lib_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "bpy_lib", /* tp_name */
- sizeof(BPy_Library), /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- (destructor)bpy_lib_dealloc, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- NULL, /* getattrfunc tp_getattr; */
- NULL, /* setattrfunc tp_setattr; */
- NULL,
- /* tp_compare */ /* DEPRECATED in python 3.0! */
- NULL, /* tp_repr */
-
- /* Method suites for standard classes */
-
- NULL, /* PyNumberMethods *tp_as_number; */
- NULL, /* PySequenceMethods *tp_as_sequence; */
- NULL, /* PyMappingMethods *tp_as_mapping; */
-
- /* More standard operations (here for binary compatibility) */
-
- NULL, /* hashfunc tp_hash; */
- NULL, /* ternaryfunc tp_call; */
- NULL, /* reprfunc tp_str; */
-
- /* Will only use these if this is a sub-type of a Python class. */
- PyObject_GenericGetAttr, /* getattrofunc tp_getattro; */
- NULL, /* setattrofunc tp_setattro; */
-
- /* Functions to access object as input/output buffer */
- NULL, /* PyBufferProcs *tp_as_buffer; */
-
- /*** Flags to define presence of optional/expanded features ***/
- Py_TPFLAGS_DEFAULT, /* long tp_flags; */
-
- NULL, /* char *tp_doc; Documentation string */
- /*** Assigned meaning in release 2.0 ***/
- /* call function for all accessible objects */
- NULL, /* traverseproc tp_traverse; */
-
- /* delete references to contained objects */
- NULL, /* inquiry tp_clear; */
-
- /*** Assigned meaning in release 2.1 ***/
- /*** rich comparisons (subclassed) ***/
- NULL, /* richcmpfunc tp_richcompare; */
-
- /*** weak reference enabler ***/
- 0,
- /*** Added in release 2.2 ***/
- /* Iterators */
- NULL, /* getiterfunc tp_iter; */
- NULL, /* iternextfunc tp_iternext; */
-
- /*** Attribute descriptor and subclassing stuff ***/
- bpy_lib_methods, /* struct PyMethodDef *tp_methods; */
- NULL, /* struct PyMemberDef *tp_members; */
- NULL, /* struct PyGetSetDef *tp_getset; */
- NULL, /* struct _typeobject *tp_base; */
- NULL, /* PyObject *tp_dict; */
- NULL, /* descrgetfunc tp_descr_get; */
- NULL, /* descrsetfunc tp_descr_set; */
- offsetof(BPy_Library, dict), /* long tp_dictoffset; */
- NULL, /* initproc tp_init; */
- NULL, /* allocfunc tp_alloc; */
- NULL, /* newfunc tp_new; */
- /* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
- /* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
- NULL, /* PyObject *tp_bases; */
- /* method resolution order */
- NULL, /* PyObject *tp_mro; */
- NULL, /* PyObject *tp_cache; */
- NULL, /* PyObject *tp_subclasses; */
- NULL, /* PyObject *tp_weaklist; */
- NULL,
+ PyVarObject_HEAD_INIT(NULL, 0)
+ /*tp_name*/ "bpy_lib",
+ /*tp_basicsize*/ sizeof(BPy_Library),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)bpy_lib_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ NULL,
+ /*tp_as_number*/ NULL,
+ /*tp_as_sequence*/ NULL,
+ /*tp_as_mapping*/ NULL,
+ /*tp_hash*/ NULL,
+ /*tp_call*/ NULL,
+ /*tp_str*/ NULL,
+ /*tp_getattro*/ PyObject_GenericGetAttr,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT,
+ /*tp_doc*/ NULL,
+ /*tp_traverse*/ NULL,
+ /*tp_clear*/ NULL,
+ /*tp_richcompare*/ NULL,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ NULL,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ bpy_lib_methods,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ NULL,
+ /*tp_base*/ NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ offsetof(BPy_Library, dict),
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ NULL,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ NULL,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
PyDoc_STRVAR(
diff --git a/source/blender/python/intern/bpy_operator_wrap.h b/source/blender/python/intern/bpy_operator_wrap.h
index de3779332da..4b8ceba5f0c 100644
--- a/source/blender/python/intern/bpy_operator_wrap.h
+++ b/source/blender/python/intern/bpy_operator_wrap.h
@@ -12,10 +12,11 @@ struct wmOperatorType;
extern "C" {
#endif
-/* these are used for operator methods, used by bpy_operator.c */
+/** These are used for operator methods, used by `bpy_operator.c`. */
PyObject *PYOP_wrap_macro_define(PyObject *self, PyObject *args);
-/* exposed to rna/wm api */
+/* Exposed to RNA/WM API. */
+
/**
* Generic function used by all Python defined operators
* it's passed as an argument to #WM_operatortype_append_ptr in for operator registration.
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 02f7e16e805..908c93388a9 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -3251,41 +3251,67 @@ static int pyrna_prop_array_ass_subscript(BPy_PropertyArrayRNA *self,
/* For slice only. */
static PyMappingMethods pyrna_prop_array_as_mapping = {
- (lenfunc)pyrna_prop_array_length, /* mp_length */
- (binaryfunc)pyrna_prop_array_subscript, /* mp_subscript */
- (objobjargproc)pyrna_prop_array_ass_subscript, /* mp_ass_subscript */
+ /*mp_len*/ (lenfunc)pyrna_prop_array_length,
+ /*mp_subscript*/ (binaryfunc)pyrna_prop_array_subscript,
+ /*mp_ass_subscript*/ (objobjargproc)pyrna_prop_array_ass_subscript,
};
static PyMappingMethods pyrna_prop_collection_as_mapping = {
- (lenfunc)pyrna_prop_collection_length, /* mp_length */
- (binaryfunc)pyrna_prop_collection_subscript, /* mp_subscript */
- (objobjargproc)pyrna_prop_collection_ass_subscript, /* mp_ass_subscript */
+ /*mp_len*/ (lenfunc)pyrna_prop_collection_length,
+ /*mp_subscript*/ (binaryfunc)pyrna_prop_collection_subscript,
+ /*mp_ass_subscript*/ (objobjargproc)pyrna_prop_collection_ass_subscript,
};
/* Only for fast bool's, large structs, assign nb_bool on init. */
static PyNumberMethods pyrna_prop_array_as_number = {
- NULL, /* nb_add */
- NULL, /* nb_subtract */
- NULL, /* nb_multiply */
- NULL, /* nb_remainder */
- NULL, /* nb_divmod */
- NULL, /* nb_power */
- NULL, /* nb_negative */
- NULL, /* nb_positive */
- NULL, /* nb_absolute */
- (inquiry)pyrna_prop_array_bool, /* nb_bool */
+ /*nb_add*/ NULL,
+ /*nb_subtract*/ NULL,
+ /*nb_multiply*/ NULL,
+ /*nb_remainder*/ NULL,
+ /*nb_divmod*/ NULL,
+ /*nb_power*/ NULL,
+ /*nb_negative*/ NULL,
+ /*nb_positive*/ NULL,
+ /*nb_absolute*/ NULL,
+ /*nb_bool*/ (inquiry)pyrna_prop_array_bool,
};
static PyNumberMethods pyrna_prop_collection_as_number = {
- NULL, /* nb_add */
- NULL, /* nb_subtract */
- NULL, /* nb_multiply */
- NULL, /* nb_remainder */
- NULL, /* nb_divmod */
- NULL, /* nb_power */
- NULL, /* nb_negative */
- NULL, /* nb_positive */
- NULL, /* nb_absolute */
- (inquiry)pyrna_prop_collection_bool, /* nb_bool */
+ /*nb_add*/ NULL,
+ /*nb_subtract*/ NULL,
+ /*nb_multiply*/ NULL,
+ /*nb_remainder*/ NULL,
+ /*nb_divmod*/ NULL,
+ /*nb_power*/ NULL,
+ /*nb_negative*/ NULL,
+ /*nb_positive*/ NULL,
+ /*nb_absolute*/ NULL,
+ /*nb_bool*/ (inquiry)pyrna_prop_collection_bool,
+ /*nb_invert*/ NULL,
+ /*nb_lshift*/ NULL,
+ /*nb_rshift*/ NULL,
+ /*nb_and*/ NULL,
+ /*nb_xor*/ NULL,
+ /*nb_or*/ NULL,
+ /*nb_int*/ NULL,
+ /*nb_reserved*/ NULL,
+ /*nb_float*/ NULL,
+ /*nb_inplace_add*/ NULL,
+ /*nb_inplace_subtract*/ NULL,
+ /*nb_inplace_multiply*/ NULL,
+ /*nb_inplace_remainder*/ NULL,
+ /*nb_inplace_power*/ NULL,
+ /*nb_inplace_lshift*/ NULL,
+ /*nb_inplace_rshift*/ NULL,
+ /*nb_inplace_and*/ NULL,
+ /*nb_inplace_xor*/ NULL,
+ /*nb_inplace_or*/ NULL,
+ /*nb_floor_divide*/ NULL,
+ /*nb_true_divide*/ NULL,
+ /*nb_inplace_floor_divide*/ NULL,
+ /*nb_inplace_true_divide*/ NULL,
+ /*nb_index*/ NULL,
+ /*nb_matrix_multiply*/ NULL,
+ /*nb_inplace_matrix_multiply*/ NULL,
};
static int pyrna_prop_array_contains(BPy_PropertyRNA *self, PyObject *value)
@@ -3345,46 +3371,46 @@ static int pyrna_struct_contains(BPy_StructRNA *self, PyObject *value)
}
static PySequenceMethods pyrna_prop_array_as_sequence = {
- (lenfunc)pyrna_prop_array_length,
- NULL, /* sq_concat */
- NULL, /* sq_repeat */
- (ssizeargfunc)pyrna_prop_array_subscript_int,
- /* sq_item */ /* Only set this so PySequence_Check() returns True */
- NULL, /* sq_slice */
- (ssizeobjargproc)prop_subscript_ass_array_int, /* sq_ass_item */
- NULL, /* *was* sq_ass_slice */
- (objobjproc)pyrna_prop_array_contains, /* sq_contains */
- (binaryfunc)NULL, /* sq_inplace_concat */
- (ssizeargfunc)NULL, /* sq_inplace_repeat */
+ /*sq_length*/ (lenfunc)pyrna_prop_array_length,
+ /*sq_concat*/ NULL,
+ /*sq_repeat*/ NULL,
+ /* Only set this so `PySequence_Check()` returns True. */
+ /*sq_item*/ (ssizeargfunc)pyrna_prop_array_subscript_int,
+ /*sq_slice*/ NULL,
+ /*sq_ass_item*/ (ssizeobjargproc)prop_subscript_ass_array_int,
+ /* was_sq_ass_slice */ NULL, /* DEPRECATED. */
+ /*sq_contains*/ (objobjproc)pyrna_prop_array_contains,
+ /*sq_inplace_concat*/ NULL,
+ /*sq_inplace_repeat*/ NULL,
};
static PySequenceMethods pyrna_prop_collection_as_sequence = {
- (lenfunc)pyrna_prop_collection_length,
- NULL, /* sq_concat */
- NULL, /* sq_repeat */
- (ssizeargfunc)pyrna_prop_collection_subscript_int,
- /* sq_item */ /* Only set this so PySequence_Check() returns True */
- NULL, /* *was* sq_slice */
- (ssizeobjargproc) /* pyrna_prop_collection_ass_subscript_int */
- NULL /* let mapping take this one */, /* sq_ass_item */
- NULL, /* *was* sq_ass_slice */
- (objobjproc)pyrna_prop_collection_contains, /* sq_contains */
- (binaryfunc)NULL, /* sq_inplace_concat */
- (ssizeargfunc)NULL, /* sq_inplace_repeat */
+ /*sq_length*/ (lenfunc)pyrna_prop_collection_length,
+ /*sq_concat*/ NULL,
+ /*sq_repeat*/ NULL,
+ /* Only set this so PySequence_Check() returns True */
+ /*sq_item*/ (ssizeargfunc)pyrna_prop_collection_subscript_int,
+ /*was_sq_slice*/ NULL, /* DEPRECATED. */
+ /* Let mapping take this one: #pyrna_prop_collection_ass_subscript_int */
+ /*sq_ass_item*/ NULL,
+ /*was_sq_ass_slice*/ NULL, /* DEPRECATED. */
+ /*sq_contains*/ (objobjproc)pyrna_prop_collection_contains,
+ /*sq_inplace_concat*/ NULL,
+ /*sq_inplace_repeat*/ NULL,
};
static PySequenceMethods pyrna_struct_as_sequence = {
- NULL, /* Can't set the len otherwise it can evaluate as false */
- NULL, /* sq_concat */
- NULL, /* sq_repeat */
- NULL,
- /* sq_item */ /* Only set this so PySequence_Check() returns True */
- NULL, /* *was* sq_slice */
- NULL, /* sq_ass_item */
- NULL, /* *was* sq_ass_slice */
- (objobjproc)pyrna_struct_contains, /* sq_contains */
- (binaryfunc)NULL, /* sq_inplace_concat */
- (ssizeargfunc)NULL, /* sq_inplace_repeat */
+ /*sq_length*/ NULL, /* Can't set the len otherwise it can evaluate as false */
+ /*sq_concat*/ NULL,
+ /*sq_repeat*/ NULL,
+ /* Only set this so `PySequence_Check()` returns True. */
+ /*sq_item*/ NULL,
+ /*was_sq_slice*/ NULL, /* DEPRECATED. */
+ /*sq_ass_item */ NULL,
+ /*was_sq_ass_slice*/ NULL, /* DEPRECATED. */
+ /*sq_contains*/ (objobjproc)pyrna_struct_contains,
+ /*sq_inplace_concat*/ NULL,
+ /*sq_inplace_repeat*/ NULL,
};
static PyObject *pyrna_struct_subscript(BPy_StructRNA *self, PyObject *key)
@@ -3457,9 +3483,9 @@ static int pyrna_struct_ass_subscript(BPy_StructRNA *self, PyObject *key, PyObje
}
static PyMappingMethods pyrna_struct_as_mapping = {
- (lenfunc)NULL, /* mp_length */
- (binaryfunc)pyrna_struct_subscript, /* mp_subscript */
- (objobjargproc)pyrna_struct_ass_subscript, /* mp_ass_subscript */
+ /*mp_length*/ (lenfunc)NULL,
+ /*mp_subscript*/ (binaryfunc)pyrna_struct_subscript,
+ /*mp_ass_subscript*/ (objobjargproc)pyrna_struct_ass_subscript,
};
PyDoc_STRVAR(pyrna_struct_keys_doc,
@@ -6483,606 +6509,415 @@ static PyObject *pyrna_func_doc_get(BPy_FunctionRNA *self, void *UNUSED(closure)
return ret;
}
-/* Subclasses of pyrna_struct_Type which support idprop definitions use this as a metaclass. */
-/* NOTE: tp_base member is set to &PyType_Type on init. */
+/**
+ * Sub-classes of #pyrna_struct_Type which support idprop definitions use this as a meta-class.
+ * \note tp_base member is set to `&PyType_Type` on initialization.
+ */
PyTypeObject pyrna_struct_meta_idprop_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "bpy_struct_meta_idprop", /* tp_name */
-
- /* NOTE: would be PyTypeObject, but sub-types of Type must be PyHeapTypeObject's. */
- sizeof(PyHeapTypeObject), /* tp_basicsize */
-
- 0, /* tp_itemsize */
- /* methods */
- NULL, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- NULL, /* getattrfunc tp_getattr; */
- NULL, /* setattrfunc tp_setattr; */
- NULL,
- /* tp_compare */ /* deprecated in Python 3.0! */
- NULL, /* tp_repr */
-
- /* Method suites for standard classes */
- NULL, /* PyNumberMethods *tp_as_number; */
- NULL, /* PySequenceMethods *tp_as_sequence; */
- NULL, /* PyMappingMethods *tp_as_mapping; */
-
- /* More standard operations (here for binary compatibility) */
- NULL, /* hashfunc tp_hash; */
- NULL, /* ternaryfunc tp_call; */
- NULL, /* reprfunc tp_str; */
- NULL /* (getattrofunc) pyrna_struct_meta_idprop_getattro */, /* getattrofunc tp_getattro; */
- (setattrofunc)pyrna_struct_meta_idprop_setattro, /* setattrofunc tp_setattro; */
-
- /* Functions to access object as input/output buffer */
- NULL, /* PyBufferProcs *tp_as_buffer; */
-
- /*** Flags to define presence of optional/expanded features ***/
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */
-
- NULL, /* char *tp_doc; Documentation string */
- /*** Assigned meaning in release 2.0 ***/
- /* call function for all accessible objects */
- NULL, /* traverseproc tp_traverse; */
-
- /* delete references to contained objects */
- NULL, /* inquiry tp_clear; */
-
- /*** Assigned meaning in release 2.1 ***/
- /*** rich comparisons ***/
- NULL, /* richcmpfunc tp_richcompare; */
-
- /*** weak reference enabler ***/
- 0, /* long tp_weaklistoffset; */
-
- /*** Added in release 2.2 ***/
- /* Iterators */
- NULL, /* getiterfunc tp_iter; */
- NULL, /* iternextfunc tp_iternext; */
-
- /*** Attribute descriptor and subclassing stuff ***/
- NULL, /* struct PyMethodDef *tp_methods; */
- NULL, /* struct PyMemberDef *tp_members; */
- NULL, /* struct PyGetSetDef *tp_getset; */
+ PyVarObject_HEAD_INIT(NULL, 0)
+ /*tp_name*/ "bpy_struct_meta_idprop",
+ /* NOTE: would be `sizeof(PyTypeObject)`,
+ * but sub-types of Type must be #PyHeapTypeObject's. */
+ /*tp_basicsize*/ sizeof(PyHeapTypeObject),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ NULL,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ NULL,
+ /*tp_as_number*/ NULL,
+ /*tp_as_sequence*/ NULL,
+ /*tp_as_mapping*/ NULL,
+ /*tp_hash*/ NULL,
+ /*tp_call*/ NULL,
+ /*tp_str*/ NULL,
+ /*tp_getattro*/ NULL, /* Sub-classed: #pyrna_struct_meta_idprop_getattro. */
+ /*tp_setattro*/ (setattrofunc)pyrna_struct_meta_idprop_setattro,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ NULL,
+ /*tp_traverse*/ NULL,
+ /*tp_clear*/ NULL,
+ /*tp_richcompare*/ NULL,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ NULL,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ NULL,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ NULL,
#if defined(_MSC_VER)
- NULL, /* defer assignment */
+ /*tp_base*/ NULL, /* Defer assignment. */
#else
- &PyType_Type, /* struct _typeobject *tp_base; */
+ /*tp_base*/ &PyType_Type,
#endif
- NULL, /* PyObject *tp_dict; */
- NULL, /* descrgetfunc tp_descr_get; */
- NULL, /* descrsetfunc tp_descr_set; */
- 0, /* long tp_dictoffset; */
- NULL, /* initproc tp_init; */
- NULL, /* allocfunc tp_alloc; */
- NULL, /* newfunc tp_new; */
- /* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
- /* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
- NULL, /* PyObject *tp_bases; */
- /* method resolution order */
- NULL, /* PyObject *tp_mro; */
- NULL, /* PyObject *tp_cache; */
- NULL, /* PyObject *tp_subclasses; */
- NULL, /* PyObject *tp_weaklist; */
- NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ NULL,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ NULL,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
/*-----------------------BPy_StructRNA method def------------------------------*/
PyTypeObject pyrna_struct_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "bpy_struct", /* tp_name */
- sizeof(BPy_StructRNA), /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- (destructor)pyrna_struct_dealloc, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- NULL, /* getattrfunc tp_getattr; */
- NULL, /* setattrfunc tp_setattr; */
- NULL,
- /* tp_compare */ /* DEPRECATED in Python 3.0! */
- (reprfunc)pyrna_struct_repr, /* tp_repr */
-
- /* Method suites for standard classes */
-
- NULL, /* PyNumberMethods *tp_as_number; */
- &pyrna_struct_as_sequence, /* PySequenceMethods *tp_as_sequence; */
- &pyrna_struct_as_mapping, /* PyMappingMethods *tp_as_mapping; */
-
- /* More standard operations (here for binary compatibility) */
-
- (hashfunc)pyrna_struct_hash, /* hashfunc tp_hash; */
- NULL, /* ternaryfunc tp_call; */
- (reprfunc)pyrna_struct_str, /* reprfunc tp_str; */
- (getattrofunc)pyrna_struct_getattro, /* getattrofunc tp_getattro; */
- (setattrofunc)pyrna_struct_setattro, /* setattrofunc tp_setattro; */
-
- /* Functions to access object as input/output buffer */
- NULL, /* PyBufferProcs *tp_as_buffer; */
-
- /*** Flags to define presence of optional/expanded features ***/
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE
+ PyVarObject_HEAD_INIT(NULL, 0)
+ /*tp_name*/ "bpy_struct",
+ /*tp_basicsize*/ sizeof(BPy_StructRNA),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)pyrna_struct_dealloc,
+ /*tp_vectorcall_offset */ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ (reprfunc)pyrna_struct_repr,
+ /*tp_as_number*/ NULL,
+ /*tp_as_sequence*/ &pyrna_struct_as_sequence,
+ /*tp_as_mapping*/ &pyrna_struct_as_mapping,
+ /*tp_hash*/ (hashfunc)pyrna_struct_hash,
+ /*tp_call*/ NULL,
+ /*tp_str*/ (reprfunc)pyrna_struct_str,
+ /*tp_getattro*/ (getattrofunc)pyrna_struct_getattro,
+ /*tp_setattro*/ (setattrofunc)pyrna_struct_setattro,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE
#ifdef USE_PYRNA_STRUCT_REFERENCE
| Py_TPFLAGS_HAVE_GC
#endif
- , /* long tp_flags; */
-
- NULL, /* char *tp_doc; Documentation string */
-/*** Assigned meaning in release 2.0 ***/
-/* call function for all accessible objects */
+ ,
+ /*tp_doc*/ NULL,
#ifdef USE_PYRNA_STRUCT_REFERENCE
- (traverseproc)pyrna_struct_traverse, /* traverseproc tp_traverse; */
-
- /* delete references to contained objects */
- (inquiry)pyrna_struct_clear, /* inquiry tp_clear; */
+ /*tp_traverse*/ (traverseproc)pyrna_struct_traverse,
+ /*tp_clear*/ (inquiry)pyrna_struct_clear,
#else
- NULL, /* traverseproc tp_traverse; */
-
- /* delete references to contained objects */
- NULL, /* inquiry tp_clear; */
+ /*tp_traverse*/ NULL,
+ /*tp_clear*/ NULL,
#endif /* !USE_PYRNA_STRUCT_REFERENCE */
-
- /*** Assigned meaning in release 2.1 ***/
- /*** rich comparisons ***/
- (richcmpfunc)pyrna_struct_richcmp, /* richcmpfunc tp_richcompare; */
-
-/*** weak reference enabler ***/
+ /*tp_richcompare*/ (richcmpfunc)pyrna_struct_richcmp,
#ifdef USE_WEAKREFS
- offsetof(BPy_StructRNA, in_weakreflist), /* long tp_weaklistoffset; */
+ /*tp_weaklistoffset*/ offsetof(BPy_StructRNA, in_weakreflist),
#else
0,
#endif
- /*** Added in release 2.2 ***/
- /* Iterators */
- NULL, /* getiterfunc tp_iter; */
- NULL, /* iternextfunc tp_iternext; */
-
- /*** Attribute descriptor and subclassing stuff ***/
- pyrna_struct_methods, /* struct PyMethodDef *tp_methods; */
- NULL, /* struct PyMemberDef *tp_members; */
- pyrna_struct_getseters, /* struct PyGetSetDef *tp_getset; */
- NULL, /* struct _typeobject *tp_base; */
- NULL, /* PyObject *tp_dict; */
- NULL, /* descrgetfunc tp_descr_get; */
- NULL, /* descrsetfunc tp_descr_set; */
- 0, /* long tp_dictoffset; */
- NULL, /* initproc tp_init; */
- NULL, /* allocfunc tp_alloc; */
- pyrna_struct_new, /* newfunc tp_new; */
- /* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
- /* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
- NULL, /* PyObject *tp_bases; */
- /* method resolution order */
- NULL, /* PyObject *tp_mro; */
- NULL, /* PyObject *tp_cache; */
- NULL, /* PyObject *tp_subclasses; */
- NULL, /* PyObject *tp_weaklist; */
- NULL,
+ /*tp_iter*/ NULL,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ pyrna_struct_methods,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ pyrna_struct_getseters,
+ /*tp_base*/ NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ pyrna_struct_new,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ NULL,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
/*-----------------------BPy_PropertyRNA method def------------------------------*/
PyTypeObject pyrna_prop_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "bpy_prop", /* tp_name */
- sizeof(BPy_PropertyRNA), /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- (destructor)pyrna_prop_dealloc, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- NULL, /* getattrfunc tp_getattr; */
- NULL, /* setattrfunc tp_setattr; */
- NULL,
- /* tp_compare */ /* DEPRECATED in Python 3.0! */
- (reprfunc)pyrna_prop_repr, /* tp_repr */
-
- /* Method suites for standard classes */
-
- NULL, /* PyNumberMethods *tp_as_number; */
- NULL, /* PySequenceMethods *tp_as_sequence; */
- NULL, /* PyMappingMethods *tp_as_mapping; */
-
- /* More standard operations (here for binary compatibility) */
-
- (hashfunc)pyrna_prop_hash, /* hashfunc tp_hash; */
- NULL, /* ternaryfunc tp_call; */
- (reprfunc)pyrna_prop_str, /* reprfunc tp_str; */
-
- /* will only use these if this is a subtype of a py class */
- NULL, /* getattrofunc tp_getattro; */
- NULL, /* setattrofunc tp_setattro; */
-
- /* Functions to access object as input/output buffer */
- NULL, /* PyBufferProcs *tp_as_buffer; */
-
- /*** Flags to define presence of optional/expanded features ***/
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */
-
- NULL, /* char *tp_doc; Documentation string */
- /*** Assigned meaning in release 2.0 ***/
- /* call function for all accessible objects */
- NULL, /* traverseproc tp_traverse; */
-
- /* delete references to contained objects */
- NULL, /* inquiry tp_clear; */
-
- /*** Assigned meaning in release 2.1 ***/
- /*** rich comparisons ***/
- (richcmpfunc)pyrna_prop_richcmp, /* richcmpfunc tp_richcompare; */
-
-/*** weak reference enabler ***/
+ PyVarObject_HEAD_INIT(NULL, 0)
+ /*tp_name*/ "bpy_prop",
+ /*tp_basicsize*/ sizeof(BPy_PropertyRNA),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)pyrna_prop_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ (reprfunc)pyrna_prop_repr,
+ /*tp_as_number*/ NULL,
+ /*tp_as_sequence*/ NULL,
+ /*tp_as_mapping*/ NULL,
+ /*tp_hash*/ (hashfunc)pyrna_prop_hash,
+ /*tp_call*/ NULL,
+ /*tp_str*/ (reprfunc)pyrna_prop_str,
+ /*tp_getattro*/ NULL,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ NULL,
+ /*tp_traverse*/ NULL,
+ /*tp_clear*/ NULL,
+ /*tp_richcompare*/ (richcmpfunc)pyrna_prop_richcmp,
#ifdef USE_WEAKREFS
- offsetof(BPy_PropertyRNA, in_weakreflist), /* long tp_weaklistoffset; */
+ /*tp_weaklistoffset*/ offsetof(BPy_PropertyRNA, in_weakreflist),
#else
- 0,
+ /*tp_weaklistoffset*/ 0,
#endif
-
- /*** Added in release 2.2 ***/
- /* Iterators */
- NULL, /* getiterfunc tp_iter; */
- NULL, /* iternextfunc tp_iternext; */
-
- /*** Attribute descriptor and subclassing stuff ***/
- pyrna_prop_methods, /* struct PyMethodDef *tp_methods; */
- NULL, /* struct PyMemberDef *tp_members; */
- pyrna_prop_getseters, /* struct PyGetSetDef *tp_getset; */
- NULL, /* struct _typeobject *tp_base; */
- NULL, /* PyObject *tp_dict; */
- NULL, /* descrgetfunc tp_descr_get; */
- NULL, /* descrsetfunc tp_descr_set; */
- 0, /* long tp_dictoffset; */
- NULL, /* initproc tp_init; */
- NULL, /* allocfunc tp_alloc; */
- pyrna_prop_new, /* newfunc tp_new; */
- /* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
- /* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
- NULL, /* PyObject *tp_bases; */
- /* method resolution order */
- NULL, /* PyObject *tp_mro; */
- NULL, /* PyObject *tp_cache; */
- NULL, /* PyObject *tp_subclasses; */
- NULL, /* PyObject *tp_weaklist; */
- NULL,
+ /*tp_iter*/ NULL,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ pyrna_prop_methods,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ pyrna_prop_getseters,
+ /*tp_base*/ NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ pyrna_prop_new,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ NULL,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
PyTypeObject pyrna_prop_array_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "bpy_prop_array", /* tp_name */
- sizeof(BPy_PropertyArrayRNA), /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- (destructor)pyrna_prop_array_dealloc, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- NULL, /* getattrfunc tp_getattr; */
- NULL, /* setattrfunc tp_setattr; */
- NULL,
- /* tp_compare */ /* DEPRECATED in Python 3.0! */
- (reprfunc)pyrna_prop_array_repr, /* tp_repr */
-
- /* Method suites for standard classes */
-
- &pyrna_prop_array_as_number, /* PyNumberMethods *tp_as_number; */
- &pyrna_prop_array_as_sequence, /* PySequenceMethods *tp_as_sequence; */
- &pyrna_prop_array_as_mapping, /* PyMappingMethods *tp_as_mapping; */
-
- /* More standard operations (here for binary compatibility) */
-
- NULL, /* hashfunc tp_hash; */
- NULL, /* ternaryfunc tp_call; */
- NULL, /* reprfunc tp_str; */
-
- /* will only use these if this is a subtype of a py class */
- (getattrofunc)pyrna_prop_array_getattro, /* getattrofunc tp_getattro; */
- NULL, /* setattrofunc tp_setattro; */
-
- /* Functions to access object as input/output buffer */
- NULL, /* PyBufferProcs *tp_as_buffer; */
-
- /*** Flags to define presence of optional/expanded features ***/
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */
-
- NULL, /* char *tp_doc; Documentation string */
- /*** Assigned meaning in release 2.0 ***/
- /* call function for all accessible objects */
- NULL, /* traverseproc tp_traverse; */
-
- /* delete references to contained objects */
- NULL, /* inquiry tp_clear; */
-
- /*** Assigned meaning in release 2.1 ***/
- /*** rich comparisons (subclassed) ***/
- NULL, /* richcmpfunc tp_richcompare; */
-
-/*** weak reference enabler ***/
+ PyVarObject_HEAD_INIT(NULL, 0)
+ /*tp_name*/ "bpy_prop_array",
+ /*tp_basicsize*/ sizeof(BPy_PropertyArrayRNA),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)pyrna_prop_array_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ (reprfunc)pyrna_prop_array_repr,
+ /*tp_as_number*/ &pyrna_prop_array_as_number,
+ /*tp_as_sequence*/ &pyrna_prop_array_as_sequence,
+ /*tp_as_mapping*/ &pyrna_prop_array_as_mapping,
+ /*tp_hash*/ NULL,
+ /*tp_call*/ NULL,
+ /*tp_str*/ NULL,
+ /*tp_getattro*/ (getattrofunc)pyrna_prop_array_getattro,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ NULL,
+ /*tp_traverse*/ NULL,
+ /*tp_clear*/ NULL,
+ /*tp_richcompare*/ NULL,
#ifdef USE_WEAKREFS
- offsetof(BPy_PropertyArrayRNA, in_weakreflist), /* long tp_weaklistoffset; */
+ /*tp_weaklistoffset*/ offsetof(BPy_PropertyArrayRNA, in_weakreflist),
#else
- 0,
+ /*tp_weaklistoffset*/ 0,
#endif
- /*** Added in release 2.2 ***/
- /* Iterators */
- (getiterfunc)pyrna_prop_array_iter, /* getiterfunc tp_iter; */
- NULL, /* iternextfunc tp_iternext; */
-
- /*** Attribute descriptor and subclassing stuff ***/
- pyrna_prop_array_methods, /* struct PyMethodDef *tp_methods; */
- NULL, /* struct PyMemberDef *tp_members; */
- NULL /*pyrna_prop_getseters*/, /* struct PyGetSetDef *tp_getset; */
- &pyrna_prop_Type, /* struct _typeobject *tp_base; */
- NULL, /* PyObject *tp_dict; */
- NULL, /* descrgetfunc tp_descr_get; */
- NULL, /* descrsetfunc tp_descr_set; */
- 0, /* long tp_dictoffset; */
- NULL, /* initproc tp_init; */
- NULL, /* allocfunc tp_alloc; */
- NULL, /* newfunc tp_new; */
- /* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
- /* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
- NULL, /* PyObject *tp_bases; */
- /* method resolution order */
- NULL, /* PyObject *tp_mro; */
- NULL, /* PyObject *tp_cache; */
- NULL, /* PyObject *tp_subclasses; */
- NULL, /* PyObject *tp_weaklist; */
- NULL,
+ /*tp_iter*/ (getiterfunc)pyrna_prop_array_iter,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ pyrna_prop_array_methods,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ NULL /* Sub-classed: #pyrna_prop_getseters. */,
+ /*tp_base*/ &pyrna_prop_Type,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ NULL,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ NULL,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
PyTypeObject pyrna_prop_collection_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "bpy_prop_collection", /* tp_name */
- sizeof(BPy_PropertyRNA), /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- (destructor)pyrna_prop_dealloc, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- NULL, /* getattrfunc tp_getattr; */
- NULL, /* setattrfunc tp_setattr; */
- NULL,
- /* tp_compare */ /* DEPRECATED in Python 3.0! */
- NULL,
- /* subclassed */ /* tp_repr */
-
- /* Method suites for standard classes */
-
- &pyrna_prop_collection_as_number, /* PyNumberMethods *tp_as_number; */
- &pyrna_prop_collection_as_sequence, /* PySequenceMethods *tp_as_sequence; */
- &pyrna_prop_collection_as_mapping, /* PyMappingMethods *tp_as_mapping; */
-
- /* More standard operations (here for binary compatibility) */
-
- NULL, /* hashfunc tp_hash; */
- NULL, /* ternaryfunc tp_call; */
- NULL, /* reprfunc tp_str; */
-
- /* will only use these if this is a subtype of a py class */
- (getattrofunc)pyrna_prop_collection_getattro, /* getattrofunc tp_getattro; */
- (setattrofunc)pyrna_prop_collection_setattro, /* setattrofunc tp_setattro; */
-
- /* Functions to access object as input/output buffer */
- NULL, /* PyBufferProcs *tp_as_buffer; */
-
- /*** Flags to define presence of optional/expanded features ***/
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */
-
- NULL, /* char *tp_doc; Documentation string */
- /*** Assigned meaning in release 2.0 ***/
- /* call function for all accessible objects */
- NULL, /* traverseproc tp_traverse; */
-
- /* delete references to contained objects */
- NULL, /* inquiry tp_clear; */
-
- /*** Assigned meaning in release 2.1 ***/
- /*** rich comparisons (subclassed) ***/
- NULL, /* richcmpfunc tp_richcompare; */
-
-/*** weak reference enabler ***/
+ PyVarObject_HEAD_INIT(NULL, 0)
+ /*tp_name*/ "bpy_prop_collection",
+ /*tp_basicsize*/ sizeof(BPy_PropertyRNA),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)pyrna_prop_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ NULL, /* Sub-classed, no need to define. */
+ /*tp_as_number*/ &pyrna_prop_collection_as_number,
+ /*tp_as_sequence*/ &pyrna_prop_collection_as_sequence,
+ /*tp_as_mapping*/ &pyrna_prop_collection_as_mapping,
+ /*tp_hash*/ NULL,
+ /*tp_call*/ NULL,
+ /*tp_str*/ NULL,
+ /*tp_getattro*/ (getattrofunc)pyrna_prop_collection_getattro,
+ /*tp_setattro*/ (setattrofunc)pyrna_prop_collection_setattro,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ NULL,
+ /*tp_traverse*/ NULL,
+ /*tp_clear*/ NULL,
+ /*tp_richcompare*/ NULL,
#ifdef USE_WEAKREFS
- offsetof(BPy_PropertyRNA, in_weakreflist), /* long tp_weaklistoffset; */
+ /*tp_weaklistoffset*/ offsetof(BPy_PropertyRNA, in_weakreflist),
#else
- 0,
+ /*tp_weaklistoffset*/ 0,
#endif
-
- /*** Added in release 2.2 ***/
- /* Iterators */
- (getiterfunc)pyrna_prop_collection_iter, /* getiterfunc tp_iter; */
- NULL, /* iternextfunc tp_iternext; */
-
- /*** Attribute descriptor and subclassing stuff ***/
- pyrna_prop_collection_methods, /* struct PyMethodDef *tp_methods; */
- NULL, /* struct PyMemberDef *tp_members; */
- NULL /*pyrna_prop_getseters*/, /* struct PyGetSetDef *tp_getset; */
- &pyrna_prop_Type, /* struct _typeobject *tp_base; */
- NULL, /* PyObject *tp_dict; */
- NULL, /* descrgetfunc tp_descr_get; */
- NULL, /* descrsetfunc tp_descr_set; */
- 0, /* long tp_dictoffset; */
- NULL, /* initproc tp_init; */
- NULL, /* allocfunc tp_alloc; */
- NULL, /* newfunc tp_new; */
- /* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
- /* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
- NULL, /* PyObject *tp_bases; */
- /* method resolution order */
- NULL, /* PyObject *tp_mro; */
- NULL, /* PyObject *tp_cache; */
- NULL, /* PyObject *tp_subclasses; */
- NULL, /* PyObject *tp_weaklist; */
- NULL,
+ /*tp_iter*/ (getiterfunc)pyrna_prop_collection_iter,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ pyrna_prop_collection_methods,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ NULL /*Sub-classed: see #pyrna_prop_getseters. */,
+ /*tp_base*/ &pyrna_prop_Type,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ NULL,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ NULL,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
/* only for add/remove/move methods */
static PyTypeObject pyrna_prop_collection_idprop_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "bpy_prop_collection_idprop", /* tp_name */
- sizeof(BPy_PropertyRNA), /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- (destructor)pyrna_prop_dealloc, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- NULL, /* getattrfunc tp_getattr; */
- NULL, /* setattrfunc tp_setattr; */
- NULL,
- /* tp_compare */ /* DEPRECATED in Python 3.0! */
- NULL,
- /* subclassed */ /* tp_repr */
-
- /* Method suites for standard classes */
-
- NULL, /* PyNumberMethods *tp_as_number; */
- NULL, /* PySequenceMethods *tp_as_sequence; */
- NULL, /* PyMappingMethods *tp_as_mapping; */
-
- /* More standard operations (here for binary compatibility) */
-
- NULL, /* hashfunc tp_hash; */
- NULL, /* ternaryfunc tp_call; */
- NULL, /* reprfunc tp_str; */
-
- /* will only use these if this is a subtype of a py class */
- NULL, /* getattrofunc tp_getattro; */
- NULL, /* setattrofunc tp_setattro; */
-
- /* Functions to access object as input/output buffer */
- NULL, /* PyBufferProcs *tp_as_buffer; */
-
- /*** Flags to define presence of optional/expanded features ***/
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */
-
- NULL, /* char *tp_doc; Documentation string */
- /*** Assigned meaning in release 2.0 ***/
- /* call function for all accessible objects */
- NULL, /* traverseproc tp_traverse; */
-
- /* delete references to contained objects */
- NULL, /* inquiry tp_clear; */
-
- /*** Assigned meaning in release 2.1 ***/
- /*** rich comparisons (subclassed) ***/
- NULL, /* richcmpfunc tp_richcompare; */
-
-/*** weak reference enabler ***/
+ PyVarObject_HEAD_INIT(NULL, 0)
+ /*tp_name*/ "bpy_prop_collection_idprop",
+ /*tp_basicsize*/ sizeof(BPy_PropertyRNA),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)pyrna_prop_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_compare*/ NULL, /* DEPRECATED. */
+ /*tp_repr*/ NULL, /* Sub-classed, no need to define. */
+ /*tp_as_number*/ NULL,
+ /*tp_as_sequence*/ NULL,
+ /*tp_as_mapping*/ NULL,
+ /*tp_hash*/ NULL,
+ /*tp_call*/ NULL,
+ /*tp_str*/ NULL,
+ /*tp_getattro*/ NULL,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ NULL,
+ /*tp_traverse*/ NULL,
+ /*tp_clear*/ NULL,
+ /*tp_richcompare*/ NULL,
#ifdef USE_WEAKREFS
- offsetof(BPy_PropertyRNA, in_weakreflist), /* long tp_weaklistoffset; */
+ /*tp_weaklistoffset*/ offsetof(BPy_PropertyRNA, in_weakreflist),
#else
- 0,
+ /*tp_weaklistoffset*/ 0,
#endif
-
- /*** Added in release 2.2 ***/
- /* Iterators */
- NULL, /* getiterfunc tp_iter; */
- NULL, /* iternextfunc tp_iternext; */
-
- /*** Attribute descriptor and subclassing stuff ***/
- pyrna_prop_collection_idprop_methods, /* struct PyMethodDef *tp_methods; */
- NULL, /* struct PyMemberDef *tp_members; */
- NULL /*pyrna_prop_getseters*/, /* struct PyGetSetDef *tp_getset; */
- &pyrna_prop_collection_Type, /* struct _typeobject *tp_base; */
- NULL, /* PyObject *tp_dict; */
- NULL, /* descrgetfunc tp_descr_get; */
- NULL, /* descrsetfunc tp_descr_set; */
- 0, /* long tp_dictoffset; */
- NULL, /* initproc tp_init; */
- NULL, /* allocfunc tp_alloc; */
- NULL, /* newfunc tp_new; */
- /* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
- /* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
- NULL, /* PyObject *tp_bases; */
- /* method resolution order */
- NULL, /* PyObject *tp_mro; */
- NULL, /* PyObject *tp_cache; */
- NULL, /* PyObject *tp_subclasses; */
- NULL, /* PyObject *tp_weaklist; */
- NULL,
+ /*tp_iter*/ NULL,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ pyrna_prop_collection_idprop_methods,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ NULL /* Sub-classed: #pyrna_prop_getseters. */,
+ /*tp_base*/ &pyrna_prop_collection_Type,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ NULL,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ NULL,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
/*-----------------------BPy_PropertyRNA method def------------------------------*/
PyTypeObject pyrna_func_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "bpy_func", /* tp_name */
- sizeof(BPy_FunctionRNA), /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- NULL, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- NULL, /* getattrfunc tp_getattr; */
- NULL, /* setattrfunc tp_setattr; */
- NULL,
- /* tp_compare */ /* DEPRECATED in Python 3.0! */
- (reprfunc)pyrna_func_repr, /* tp_repr */
-
- /* Method suites for standard classes */
-
- NULL, /* PyNumberMethods *tp_as_number; */
- NULL, /* PySequenceMethods *tp_as_sequence; */
- NULL, /* PyMappingMethods *tp_as_mapping; */
-
- /* More standard operations (here for binary compatibility) */
-
- NULL, /* hashfunc tp_hash; */
- (ternaryfunc)pyrna_func_call, /* ternaryfunc tp_call; */
- NULL, /* reprfunc tp_str; */
-
- /* will only use these if this is a subtype of a py class */
- NULL, /* getattrofunc tp_getattro; */
- NULL, /* setattrofunc tp_setattro; */
-
- /* Functions to access object as input/output buffer */
- NULL, /* PyBufferProcs *tp_as_buffer; */
-
- /*** Flags to define presence of optional/expanded features ***/
- Py_TPFLAGS_DEFAULT, /* long tp_flags; */
-
- NULL, /* char *tp_doc; Documentation string */
- /*** Assigned meaning in release 2.0 ***/
- /* call function for all accessible objects */
- NULL, /* traverseproc tp_traverse; */
-
- /* delete references to contained objects */
- NULL, /* inquiry tp_clear; */
-
- /*** Assigned meaning in release 2.1 ***/
- /*** rich comparisons ***/
- NULL, /* richcmpfunc tp_richcompare; */
-
-/*** weak reference enabler ***/
+ PyVarObject_HEAD_INIT(NULL, 0)
+ /*tp_name*/ "bpy_func",
+ /*tp_basicsize*/ sizeof(BPy_FunctionRNA),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ NULL,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ (reprfunc)pyrna_func_repr,
+ /*tp_as_number*/ NULL,
+ /*tp_as_sequence*/ NULL,
+ /*tp_as_mapping*/ NULL,
+ /*tp_hash*/ NULL,
+ /*tp_call*/ (ternaryfunc)pyrna_func_call,
+ /*tp_str*/ NULL,
+ /*tp_getattro*/ NULL,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT,
+ /*tp_doc*/ NULL,
+ /*tp_traverse*/ NULL,
+ /*tp_clear*/ NULL,
+ /*tp_richcompare*/ NULL,
#ifdef USE_WEAKREFS
- offsetof(BPy_PropertyRNA, in_weakreflist), /* long tp_weaklistoffset; */
+ /*tp_weaklistoffset*/ offsetof(BPy_PropertyRNA, in_weakreflist),
#else
- 0,
+ /*tp_weaklistoffset*/ 0,
#endif
-
- /*** Added in release 2.2 ***/
- /* Iterators */
- NULL, /* getiterfunc tp_iter; */
- NULL, /* iternextfunc tp_iternext; */
-
- /*** Attribute descriptor and subclassing stuff ***/
- NULL, /* struct PyMethodDef *tp_methods; */
- NULL, /* struct PyMemberDef *tp_members; */
- pyrna_func_getseters, /* struct PyGetSetDef *tp_getset; */
- NULL, /* struct _typeobject *tp_base; */
- NULL, /* PyObject *tp_dict; */
- NULL, /* descrgetfunc tp_descr_get; */
- NULL, /* descrsetfunc tp_descr_set; */
- 0, /* long tp_dictoffset; */
- NULL, /* initproc tp_init; */
- NULL, /* allocfunc tp_alloc; */
- NULL, /* newfunc tp_new; */
- /* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
- /* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
- NULL, /* PyObject *tp_bases; */
- /* method resolution order */
- NULL, /* PyObject *tp_mro; */
- NULL, /* PyObject *tp_cache; */
- NULL, /* PyObject *tp_subclasses; */
- NULL, /* PyObject *tp_weaklist; */
- NULL,
+ /*tp_iter*/ NULL,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ NULL,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ pyrna_func_getseters,
+ /*tp_base*/ NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ NULL,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ NULL,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
#ifdef USE_PYRNA_ITER
@@ -7098,87 +6933,59 @@ static void pyrna_prop_collection_iter_dealloc(BPy_PropertyCollectionIterRNA *se
static PyObject *pyrna_prop_collection_iter_next(BPy_PropertyCollectionIterRNA *self);
static PyTypeObject pyrna_prop_collection_iter_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "bpy_prop_collection_iter", /* tp_name */
- sizeof(BPy_PropertyCollectionIterRNA), /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- (destructor)pyrna_prop_collection_iter_dealloc, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- NULL, /* getattrfunc tp_getattr; */
- NULL, /* setattrfunc tp_setattr; */
- NULL,
- /* tp_compare */ /* DEPRECATED in Python 3.0! */
- NULL,
- /* subclassed */ /* tp_repr */
-
- /* Method suites for standard classes */
-
- NULL, /* PyNumberMethods *tp_as_number; */
- NULL, /* PySequenceMethods *tp_as_sequence; */
- NULL, /* PyMappingMethods *tp_as_mapping; */
-
- /* More standard operations (here for binary compatibility) */
-
- NULL, /* hashfunc tp_hash; */
- NULL, /* ternaryfunc tp_call; */
- NULL, /* reprfunc tp_str; */
-
- /* will only use these if this is a subtype of a py class */
- PyObject_GenericGetAttr, /* getattrofunc tp_getattro; */
- NULL, /* setattrofunc tp_setattro; */
-
- /* Functions to access object as input/output buffer */
- NULL, /* PyBufferProcs *tp_as_buffer; */
-
- /*** Flags to define presence of optional/expanded features ***/
- Py_TPFLAGS_DEFAULT, /* long tp_flags; */
-
- NULL, /* char *tp_doc; Documentation string */
- /*** Assigned meaning in release 2.0 ***/
- /* call function for all accessible objects */
- NULL, /* traverseproc tp_traverse; */
-
- /* delete references to contained objects */
- NULL, /* inquiry tp_clear; */
-
- /*** Assigned meaning in release 2.1 ***/
- /*** rich comparisons (subclassed) ***/
- NULL, /* richcmpfunc tp_richcompare; */
-
-/*** weak reference enabler ***/
+ PyVarObject_HEAD_INIT(NULL, 0)
+ /*tp_name*/ "bpy_prop_collection_iter",
+ /*tp_basicsize*/ sizeof(BPy_PropertyCollectionIterRNA),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)pyrna_prop_collection_iter_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ NULL, /* No need to define, sub-classed. */
+ /*tp_as_number*/ NULL,
+ /*tp_as_sequence*/ NULL,
+ /*tp_as_mapping*/ NULL,
+ /*tp_hash*/ NULL,
+ /*tp_call*/ NULL,
+ /*tp_str*/ NULL,
+ /*tp_getattro*/ PyObject_GenericGetAttr,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT,
+ /*tp_doc*/ NULL,
+ /*tp_traverse*/ NULL,
+ /*tp_clear*/ NULL,
+ /*tp_richcompare*/ NULL,
# ifdef USE_WEAKREFS
- offsetof(BPy_PropertyCollectionIterRNA, in_weakreflist), /* long tp_weaklistoffset; */
+ /*tp_weaklistoffset*/ offsetof(BPy_PropertyCollectionIterRNA, in_weakreflist),
# else
- 0,
+ /*tp_weaklistoffset*/ 0,
# endif
- /*** Added in release 2.2 ***/
- /* Iterators */
- PyObject_SelfIter, /* getiterfunc tp_iter; */
- (iternextfunc)pyrna_prop_collection_iter_next, /* iternextfunc tp_iternext; */
-
- /*** Attribute descriptor and subclassing stuff ***/
- NULL, /* struct PyMethodDef *tp_methods; */
- NULL, /* struct PyMemberDef *tp_members; */
- NULL, /* struct PyGetSetDef *tp_getset; */
- NULL, /* struct _typeobject *tp_base; */
- NULL, /* PyObject *tp_dict; */
- NULL, /* descrgetfunc tp_descr_get; */
- NULL, /* descrsetfunc tp_descr_set; */
- 0, /* long tp_dictoffset; */
- NULL, /* initproc tp_init; */
- NULL, /* allocfunc tp_alloc; */
- NULL, /* newfunc tp_new; */
- /* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
- /* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
- NULL, /* PyObject *tp_bases; */
- /* method resolution order */
- NULL, /* PyObject *tp_mro; */
- NULL, /* PyObject *tp_cache; */
- NULL, /* PyObject *tp_subclasses; */
- NULL, /* PyObject *tp_weaklist; */
- NULL,
+ /*tp_iter*/ PyObject_SelfIter,
+ /*tp_iternext*/ (iternextfunc)pyrna_prop_collection_iter_next,
+ /*tp_methods*/ NULL,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ NULL,
+ /*tp_base*/ NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ NULL,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ NULL,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
static PyObject *pyrna_prop_collection_iter_CreatePyObject(PointerRNA *ptr, PropertyRNA *prop)
diff --git a/source/blender/python/intern/bpy_rna_data.c b/source/blender/python/intern/bpy_rna_data.c
index 3c7ec3bddc3..2dc0b8dc999 100644
--- a/source/blender/python/intern/bpy_rna_data.c
+++ b/source/blender/python/intern/bpy_rna_data.c
@@ -60,84 +60,56 @@ static void bpy_rna_data_context_dealloc(BPy_DataContext *self)
Py_CLEAR(self->data_rna);
PyObject_GC_Del(self);
}
-
static PyTypeObject bpy_rna_data_context_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "bpy_rna_data_context", /* tp_name */
- sizeof(BPy_DataContext), /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- (destructor)bpy_rna_data_context_dealloc, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- NULL, /* getattrfunc tp_getattr; */
- NULL, /* setattrfunc tp_setattr; */
- NULL,
- /* tp_compare */ /* DEPRECATED in python 3.0! */
- NULL, /* tp_repr */
-
- /* Method suites for standard classes */
-
- NULL, /* PyNumberMethods *tp_as_number; */
- NULL, /* PySequenceMethods *tp_as_sequence; */
- NULL, /* PyMappingMethods *tp_as_mapping; */
-
- /* More standard operations (here for binary compatibility) */
-
- NULL, /* hashfunc tp_hash; */
- NULL, /* ternaryfunc tp_call; */
- NULL, /* reprfunc tp_str; */
-
- /* Will only use these if this is a sub-type of a Python class. */
- NULL, /* getattrofunc tp_getattro; */
- NULL, /* setattrofunc tp_setattro; */
-
- /* Functions to access object as input/output buffer */
- NULL, /* PyBufferProcs *tp_as_buffer; */
-
- /*** Flags to define presence of optional/expanded features ***/
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* long tp_flags; */
-
- NULL, /* char *tp_doc; Documentation string */
- /*** Assigned meaning in release 2.0 ***/
- /* call function for all accessible objects */
- (traverseproc)bpy_rna_data_context_traverse, /* traverseproc tp_traverse; */
-
- /* delete references to contained objects */
- (inquiry)bpy_rna_data_context_clear, /* inquiry tp_clear; */
-
- /*** Assigned meaning in release 2.1 ***/
- /*** rich comparisons (subclassed) ***/
- NULL, /* richcmpfunc tp_richcompare; */
-
- /*** weak reference enabler ***/
- 0,
- /*** Added in release 2.2 ***/
- /* Iterators */
- NULL, /* getiterfunc tp_iter; */
- NULL, /* iternextfunc tp_iternext; */
-
- /*** Attribute descriptor and subclassing stuff ***/
- bpy_rna_data_context_methods, /* struct PyMethodDef *tp_methods; */
- NULL, /* struct PyMemberDef *tp_members; */
- NULL, /* struct PyGetSetDef *tp_getset; */
- NULL, /* struct _typeobject *tp_base; */
- NULL, /* PyObject *tp_dict; */
- NULL, /* descrgetfunc tp_descr_get; */
- NULL, /* descrsetfunc tp_descr_set; */
- 0, /* long tp_dictoffset; */
- NULL, /* initproc tp_init; */
- NULL, /* allocfunc tp_alloc; */
- NULL, /* newfunc tp_new; */
- /* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
- /* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
- NULL, /* PyObject *tp_bases; */
- /* method resolution order */
- NULL, /* PyObject *tp_mro; */
- NULL, /* PyObject *tp_cache; */
- NULL, /* PyObject *tp_subclasses; */
- NULL, /* PyObject *tp_weaklist; */
- NULL,
+ PyVarObject_HEAD_INIT(NULL, 0)
+ /*tp_name*/ "bpy_rna_data_context",
+ /*tp_basicsize*/ sizeof(BPy_DataContext),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)bpy_rna_data_context_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ NULL,
+ /*tp_as_number*/ NULL,
+ /*tp_as_sequence*/ NULL,
+ /*tp_as_mapping*/ NULL,
+ /*tp_hash*/ NULL,
+ /*tp_call*/ NULL,
+ /*tp_str*/ NULL,
+ /*tp_getattro*/ NULL,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
+ /*tp_doc*/ NULL,
+ /*tp_traverse*/ (traverseproc)bpy_rna_data_context_traverse,
+ /*tp_clear*/ (inquiry)bpy_rna_data_context_clear,
+ /*tp_richcompare*/ NULL,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ NULL,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ bpy_rna_data_context_methods,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ NULL,
+ /*tp_base*/ NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ NULL,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ NULL,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
PyDoc_STRVAR(bpy_rna_data_context_load_doc,
diff --git a/source/blender/python/mathutils/mathutils_Color.c b/source/blender/python/mathutils/mathutils_Color.c
index 5218ea68f7b..e4f1ea87563 100644
--- a/source/blender/python/mathutils/mathutils_Color.c
+++ b/source/blender/python/mathutils/mathutils_Color.c
@@ -825,59 +825,61 @@ static PyObject *Color_neg(ColorObject *self)
* \{ */
static PySequenceMethods Color_SeqMethods = {
- (lenfunc)Color_len, /*sq_length*/
- (binaryfunc)NULL, /*sq_concat*/
- (ssizeargfunc)NULL, /*sq_repeat*/
- (ssizeargfunc)Color_item, /*sq_item*/
- NULL, /*sq_slice(DEPRECATED)*/
- (ssizeobjargproc)Color_ass_item, /*sq_ass_item*/
- NULL, /*sq_ass_slice(DEPRECATED)*/
- (objobjproc)NULL, /*sq_contains*/
- (binaryfunc)NULL, /*sq_inplace_concat*/
- (ssizeargfunc)NULL, /*sq_inplace_repeat*/
+ /*sq_length*/ (lenfunc)Color_len,
+ /*sq_concat*/ NULL,
+ /*sq_repeat*/ NULL,
+ /*sq_item*/ (ssizeargfunc)Color_item,
+ /*was_sq_slice*/ NULL, /* DEPRECATED. */
+ /*sq_ass_item*/ (ssizeobjargproc)Color_ass_item,
+ /*was_sq_ass_slice*/ NULL, /* DEPRECATED. */
+ /*sq_contains*/ NULL,
+ /*sq_inplace_concat*/ NULL,
+ /*sq_inplace_repeat*/ NULL,
};
static PyMappingMethods Color_AsMapping = {
- (lenfunc)Color_len,
- (binaryfunc)Color_subscript,
- (objobjargproc)Color_ass_subscript,
+ /*mp_len*/ (lenfunc)Color_len,
+ /*mp_subscript*/ (binaryfunc)Color_subscript,
+ /*mp_ass_subscript*/ (objobjargproc)Color_ass_subscript,
};
static PyNumberMethods Color_NumMethods = {
- (binaryfunc)Color_add, /*nb_add*/
- (binaryfunc)Color_sub, /*nb_subtract*/
- (binaryfunc)Color_mul, /*nb_multiply*/
- NULL, /*nb_remainder*/
- NULL, /*nb_divmod*/
- NULL, /*nb_power*/
- (unaryfunc)Color_neg, /*nb_negative*/
- (unaryfunc)Color_copy, /*tp_positive*/
- (unaryfunc)NULL, /*tp_absolute*/
- (inquiry)NULL, /*tp_bool*/
- (unaryfunc)NULL, /*nb_invert*/
- NULL, /*nb_lshift*/
- (binaryfunc)NULL, /*nb_rshift*/
- NULL, /*nb_and*/
- NULL, /*nb_xor*/
- NULL, /*nb_or*/
- NULL, /*nb_int*/
- NULL, /*nb_reserved*/
- NULL, /*nb_float*/
- Color_iadd, /*nb_inplace_add*/
- Color_isub, /*nb_inplace_subtract*/
- Color_imul, /*nb_inplace_multiply*/
- NULL, /*nb_inplace_remainder*/
- NULL, /*nb_inplace_power*/
- NULL, /*nb_inplace_lshift*/
- NULL, /*nb_inplace_rshift*/
- NULL, /*nb_inplace_and*/
- NULL, /*nb_inplace_xor*/
- NULL, /*nb_inplace_or*/
- NULL, /*nb_floor_divide*/
- Color_div, /*nb_true_divide*/
- NULL, /*nb_inplace_floor_divide*/
- Color_idiv, /*nb_inplace_true_divide*/
- NULL, /*nb_index*/
+ /*nb_add*/ (binaryfunc)Color_add,
+ /*nb_subtract*/ (binaryfunc)Color_sub,
+ /*nb_multiply*/ (binaryfunc)Color_mul,
+ /*nb_remainder*/ NULL,
+ /*nb_divmod*/ NULL,
+ /*nb_power*/ NULL,
+ /*nb_negative*/ (unaryfunc)Color_neg,
+ /*tp_positive*/ (unaryfunc)Color_copy,
+ /*tp_absolute*/ NULL,
+ /*tp_bool*/ NULL,
+ /*nb_invert*/ NULL,
+ /*nb_lshift*/ NULL,
+ /*nb_rshift*/ NULL,
+ /*nb_and*/ NULL,
+ /*nb_xor*/ NULL,
+ /*nb_or*/ NULL,
+ /*nb_int*/ NULL,
+ /*nb_reserved*/ NULL,
+ /*nb_float*/ NULL,
+ /*nb_inplace_add*/ Color_iadd,
+ /*nb_inplace_subtract*/ Color_isub,
+ /*nb_inplace_multiply*/ Color_imul,
+ /*nb_inplace_remainder*/ NULL,
+ /*nb_inplace_power*/ NULL,
+ /*nb_inplace_lshift*/ NULL,
+ /*nb_inplace_rshift*/ NULL,
+ /*nb_inplace_and*/ NULL,
+ /*nb_inplace_xor*/ NULL,
+ /*nb_inplace_or*/ NULL,
+ /*nb_floor_divide*/ NULL,
+ /*nb_true_divide*/ Color_div,
+ /*nb_inplace_floor_divide*/ NULL,
+ /*nb_inplace_true_divide*/ Color_idiv,
+ /*nb_index*/ NULL,
+ /*nb_matrix_multiply*/ NULL,
+ /*nb_inplace_matrix_multiply*/ NULL,
};
/** \} */
@@ -1100,6 +1102,10 @@ static struct PyMethodDef Color_methods[] = {
/** \name Color Type: Python Object Definition
* \{ */
+#ifdef MATH_STANDALONE
+# define Color_str NULL
+#endif
+
PyDoc_STRVAR(
color_doc,
".. class:: Color(rgb)\n"
@@ -1113,57 +1119,61 @@ PyDoc_STRVAR(
" :arg rgb: (r, g, b) color values\n"
" :type rgb: 3d vector\n");
PyTypeObject color_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Color", /* tp_name */
- sizeof(ColorObject), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)BaseMathObject_dealloc, /* tp_dealloc */
- (printfunc)NULL, /* tp_print */
- NULL, /* tp_getattr */
- NULL, /* tp_setattr */
- NULL, /* tp_compare */
- (reprfunc)Color_repr, /* tp_repr */
- &Color_NumMethods, /* tp_as_number */
- &Color_SeqMethods, /* tp_as_sequence */
- &Color_AsMapping, /* tp_as_mapping */
- (hashfunc)Color_hash, /* tp_hash */
- NULL, /* tp_call */
-#ifndef MATH_STANDALONE
- (reprfunc)Color_str, /* tp_str */
-#else
- NULL, /* tp_str */
-#endif
- NULL, /* tp_getattro */
- NULL, /* tp_setattro */
- NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, /* tp_flags */
- color_doc, /* tp_doc */
- (traverseproc)BaseMathObject_traverse, /* tp_traverse */
- (inquiry)BaseMathObject_clear, /* tp_clear */
- (richcmpfunc)Color_richcmpr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- NULL, /* tp_iter */
- NULL, /* tp_iternext */
- Color_methods, /* tp_methods */
- NULL, /* tp_members */
- Color_getseters, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- NULL, /* tp_descr_get */
- NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
- NULL, /* tp_init */
- NULL, /* tp_alloc */
- Color_new, /* tp_new */
- NULL, /* tp_free */
- (inquiry)BaseMathObject_is_gc, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
- NULL, /* tp_del */
+ PyVarObject_HEAD_INIT(NULL, 0)
+ /*tp_name*/ "Color",
+ /*tp_basicsize*/ sizeof(ColorObject),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)BaseMathObject_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ (reprfunc)Color_repr,
+ /*tp_as_number*/ &Color_NumMethods,
+ /*tp_as_sequence*/ &Color_SeqMethods,
+ /*tp_as_mapping*/ &Color_AsMapping,
+ /*tp_hash*/ (hashfunc)Color_hash,
+ /*tp_call*/ NULL,
+ /*tp_str*/ (reprfunc)Color_str,
+ /*tp_getattro*/ NULL,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
+ /*tp_doc*/ color_doc,
+ /*tp_traverse*/ (traverseproc)BaseMathObject_traverse,
+ /*tp_clear*/ (inquiry)BaseMathObject_clear,
+ /*tp_richcompare*/ (richcmpfunc)Color_richcmpr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ NULL,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ Color_methods,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ Color_getseters,
+ /*tp_base*/ NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ Color_new,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ (inquiry)BaseMathObject_is_gc,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
+#ifdef MATH_STANDALONE
+# define Color_str
+#endif
+
/** \} */
/* -------------------------------------------------------------------- */
diff --git a/source/blender/python/mathutils/mathutils_Euler.c b/source/blender/python/mathutils/mathutils_Euler.c
index ddc0f115742..d72ec5bbc77 100644
--- a/source/blender/python/mathutils/mathutils_Euler.c
+++ b/source/blender/python/mathutils/mathutils_Euler.c
@@ -636,22 +636,22 @@ static int Euler_ass_subscript(EulerObject *self, PyObject *item, PyObject *valu
* \{ */
static PySequenceMethods Euler_SeqMethods = {
- (lenfunc)Euler_len, /*sq_length*/
- (binaryfunc)NULL, /*sq_concat*/
- (ssizeargfunc)NULL, /*sq_repeat*/
- (ssizeargfunc)Euler_item, /*sq_item*/
- (ssizessizeargfunc)NULL, /*sq_slice(DEPRECATED)*/
- (ssizeobjargproc)Euler_ass_item, /*sq_ass_item*/
- (ssizessizeobjargproc)NULL, /*sq_ass_slice(DEPRECATED)*/
- (objobjproc)NULL, /*sq_contains*/
- (binaryfunc)NULL, /*sq_inplace_concat*/
- (ssizeargfunc)NULL, /*sq_inplace_repeat*/
+ /*sq_length*/ (lenfunc)Euler_len,
+ /*sq_concat*/ NULL,
+ /*sq_repeat*/ NULL,
+ /*sq_item*/ (ssizeargfunc)Euler_item,
+ /*was_sq_slice*/ NULL, /* DEPRECATED. */
+ /*sq_ass_item*/ (ssizeobjargproc)Euler_ass_item,
+ /*was_sq_ass_slice*/ NULL, /* DEPRECATED. */
+ /*sq_contains*/ NULL,
+ /*sq_inplace_concat*/ NULL,
+ /*sq_inplace_repeat*/ NULL,
};
static PyMappingMethods Euler_AsMapping = {
- (lenfunc)Euler_len,
- (binaryfunc)Euler_subscript,
- (objobjargproc)Euler_ass_subscript,
+ /*mp_len*/ (lenfunc)Euler_len,
+ /*mp_subscript*/ (binaryfunc)Euler_subscript,
+ /*mp_ass_subscript*/ (objobjargproc)Euler_ass_subscript,
};
/** \} */
@@ -766,6 +766,10 @@ static struct PyMethodDef Euler_methods[] = {
/** \name Euler Type: Python Object Definition
* \{ */
+#ifdef MATH_STANDALONE
+# define Euler_str NULL
+#endif
+
PyDoc_STRVAR(
euler_doc,
".. class:: Euler(angles, order='XYZ')\n"
@@ -779,57 +783,61 @@ PyDoc_STRVAR(
" :arg order: Optional order of the angles, a permutation of ``XYZ``.\n"
" :type order: str\n");
PyTypeObject euler_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Euler", /* tp_name */
- sizeof(EulerObject), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)BaseMathObject_dealloc, /* tp_dealloc */
- (printfunc)NULL, /* tp_print */
- NULL, /* tp_getattr */
- NULL, /* tp_setattr */
- NULL, /* tp_compare */
- (reprfunc)Euler_repr, /* tp_repr */
- NULL, /* tp_as_number */
- &Euler_SeqMethods, /* tp_as_sequence */
- &Euler_AsMapping, /* tp_as_mapping */
- (hashfunc)Euler_hash, /* tp_hash */
- NULL, /* tp_call */
-#ifndef MATH_STANDALONE
- (reprfunc)Euler_str, /* tp_str */
-#else
- NULL, /* tp_str */
-#endif
- NULL, /* tp_getattro */
- NULL, /* tp_setattro */
- NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, /* tp_flags */
- euler_doc, /* tp_doc */
- (traverseproc)BaseMathObject_traverse, /* tp_traverse */
- (inquiry)BaseMathObject_clear, /* tp_clear */
- (richcmpfunc)Euler_richcmpr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- NULL, /* tp_iter */
- NULL, /* tp_iternext */
- Euler_methods, /* tp_methods */
- NULL, /* tp_members */
- Euler_getseters, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- NULL, /* tp_descr_get */
- NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
- NULL, /* tp_init */
- NULL, /* tp_alloc */
- Euler_new, /* tp_new */
- NULL, /* tp_free */
- (inquiry)BaseMathObject_is_gc, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
- NULL, /* tp_del */
+ PyVarObject_HEAD_INIT(NULL, 0)
+ /*tp_name*/ "Euler",
+ /*tp_basicsize*/ sizeof(EulerObject),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)BaseMathObject_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ (reprfunc)Euler_repr,
+ /*tp_as_number*/ NULL,
+ /*tp_as_sequence*/ &Euler_SeqMethods,
+ /*tp_as_mapping*/ &Euler_AsMapping,
+ /*tp_hash*/ (hashfunc)Euler_hash,
+ /*tp_call*/ NULL,
+ /*tp_str*/ (reprfunc)Euler_str,
+ /*tp_getattro*/ NULL,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
+ /*tp_doc*/ euler_doc,
+ /*tp_traverse*/ (traverseproc)BaseMathObject_traverse,
+ /*tp_clear*/ (inquiry)BaseMathObject_clear,
+ /*tp_richcompare*/ (richcmpfunc)Euler_richcmpr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ NULL,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ Euler_methods,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ Euler_getseters,
+ /*tp_base*/ NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ Euler_new,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ (inquiry)BaseMathObject_is_gc,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
+#ifdef MATH_STANDALONE
+# undef Euler_str
+#endif
+
/** \} */
/* -------------------------------------------------------------------- */
diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c
index a44f42bc337..858b01b2a84 100644
--- a/source/blender/python/mathutils/mathutils_Matrix.c
+++ b/source/blender/python/mathutils/mathutils_Matrix.c
@@ -2964,61 +2964,61 @@ static PyObject *Matrix_imatmul(PyObject *m1, PyObject *m2)
* \{ */
static PySequenceMethods Matrix_SeqMethods = {
- (lenfunc)Matrix_len, /*sq_length*/
- (binaryfunc)NULL, /*sq_concat*/
- (ssizeargfunc)NULL, /*sq_repeat*/
- (ssizeargfunc)Matrix_item_row, /*sq_item*/
- (ssizessizeargfunc)NULL, /*sq_slice(DEPRECATED)*/
- (ssizeobjargproc)Matrix_ass_item_row, /*sq_ass_item*/
- (ssizessizeobjargproc)NULL, /*sq_ass_slice(DEPRECATED)*/
- (objobjproc)NULL, /*sq_contains*/
- (binaryfunc)NULL, /*sq_inplace_concat*/
- (ssizeargfunc)NULL, /*sq_inplace_repeat*/
+ /*sq_length*/ (lenfunc)Matrix_len,
+ /*sq_concat*/ NULL,
+ /*sq_repeat*/ NULL,
+ /*sq_item*/ (ssizeargfunc)Matrix_item_row,
+ /*was_sq_slice*/ NULL, /* DEPRECATED. */
+ /*sq_ass_item*/ (ssizeobjargproc)Matrix_ass_item_row,
+ /*was_sq_ass_slice*/ NULL, /* DEPRECATED. */
+ /*sq_contains*/ NULL,
+ /*sq_inplace_concat*/ NULL,
+ /*sq_inplace_repeat*/ NULL,
};
static PyMappingMethods Matrix_AsMapping = {
- (lenfunc)Matrix_len,
- (binaryfunc)Matrix_subscript,
- (objobjargproc)Matrix_ass_subscript,
+ /*mp_len*/ (lenfunc)Matrix_len,
+ /*mp_subscript*/ (binaryfunc)Matrix_subscript,
+ /*mp_ass_subscript*/ (objobjargproc)Matrix_ass_subscript,
};
static PyNumberMethods Matrix_NumMethods = {
- (binaryfunc)Matrix_add, /*nb_add*/
- (binaryfunc)Matrix_sub, /*nb_subtract*/
- (binaryfunc)Matrix_mul, /*nb_multiply*/
- NULL, /*nb_remainder*/
- NULL, /*nb_divmod*/
- NULL, /*nb_power*/
- (unaryfunc)0, /*nb_negative*/
- (unaryfunc)0, /*tp_positive*/
- (unaryfunc)0, /*tp_absolute*/
- (inquiry)0, /*tp_bool*/
- (unaryfunc)Matrix_inverted_noargs, /*nb_invert*/
- NULL, /*nb_lshift*/
- (binaryfunc)0, /*nb_rshift*/
- NULL, /*nb_and*/
- NULL, /*nb_xor*/
- NULL, /*nb_or*/
- NULL, /*nb_int*/
- NULL, /*nb_reserved*/
- NULL, /*nb_float*/
- NULL, /*nb_inplace_add*/
- NULL, /*nb_inplace_subtract*/
- (binaryfunc)Matrix_imul, /*nb_inplace_multiply*/
- NULL, /*nb_inplace_remainder*/
- NULL, /*nb_inplace_power*/
- NULL, /*nb_inplace_lshift*/
- NULL, /*nb_inplace_rshift*/
- NULL, /*nb_inplace_and*/
- NULL, /*nb_inplace_xor*/
- NULL, /*nb_inplace_or*/
- NULL, /*nb_floor_divide*/
- NULL, /*nb_true_divide*/
- NULL, /*nb_inplace_floor_divide*/
- NULL, /*nb_inplace_true_divide*/
- NULL, /*nb_index*/
- (binaryfunc)Matrix_matmul, /*nb_matrix_multiply*/
- (binaryfunc)Matrix_imatmul, /*nb_inplace_matrix_multiply*/
+ /*nb_add*/ (binaryfunc)Matrix_add,
+ /*nb_subtract*/ (binaryfunc)Matrix_sub,
+ /*nb_multiply*/ (binaryfunc)Matrix_mul,
+ /*nb_remainder*/ NULL,
+ /*nb_divmod*/ NULL,
+ /*nb_power*/ NULL,
+ /*nb_negative*/ NULL,
+ /*tp_positive*/ NULL,
+ /*tp_absolute*/ NULL,
+ /*tp_bool*/ NULL,
+ /*nb_invert*/ (unaryfunc)Matrix_inverted_noargs,
+ /*nb_lshift*/ NULL,
+ /*nb_rshift*/ NULL,
+ /*nb_and*/ NULL,
+ /*nb_xor*/ NULL,
+ /*nb_or*/ NULL,
+ /*nb_int*/ NULL,
+ /*nb_reserved*/ NULL,
+ /*nb_float*/ NULL,
+ /*nb_inplace_add*/ NULL,
+ /*nb_inplace_subtract*/ NULL,
+ /*nb_inplace_multiply*/ (binaryfunc)Matrix_imul,
+ /*nb_inplace_remainder*/ NULL,
+ /*nb_inplace_power*/ NULL,
+ /*nb_inplace_lshift*/ NULL,
+ /*nb_inplace_rshift*/ NULL,
+ /*nb_inplace_and*/ NULL,
+ /*nb_inplace_xor*/ NULL,
+ /*nb_inplace_or*/ NULL,
+ /*nb_floor_divide*/ NULL,
+ /*nb_true_divide*/ NULL,
+ /*nb_inplace_floor_divide*/ NULL,
+ /*nb_inplace_true_divide*/ NULL,
+ /*nb_index*/ NULL,
+ /*nb_matrix_multiply*/ (binaryfunc)Matrix_matmul,
+ /*nb_inplace_matrix_multiply*/ (binaryfunc)Matrix_imatmul,
};
/** \} */
@@ -3314,6 +3314,10 @@ static struct PyMethodDef Matrix_methods[] = {
/** \name Matrix Type: Python Object Definition
* \{ */
+#ifdef MATH_STANDALONE
+# define Matrix_str NULL
+#endif
+
PyDoc_STRVAR(
matrix_doc,
".. class:: Matrix([rows])\n"
@@ -3324,57 +3328,61 @@ PyDoc_STRVAR(
" :arg rows: Sequence of rows. When omitted, a 4x4 identity matrix is constructed.\n"
" :type rows: 2d number sequence\n");
PyTypeObject matrix_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Matrix", /*tp_name*/
- sizeof(MatrixObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- (destructor)BaseMathObject_dealloc, /*tp_dealloc*/
- (printfunc)NULL, /*tp_print*/
- NULL, /*tp_getattr*/
- NULL, /*tp_setattr*/
- NULL, /*tp_compare*/
- (reprfunc)Matrix_repr, /*tp_repr*/
- &Matrix_NumMethods, /*tp_as_number*/
- &Matrix_SeqMethods, /*tp_as_sequence*/
- &Matrix_AsMapping, /*tp_as_mapping*/
- (hashfunc)Matrix_hash, /*tp_hash*/
- NULL, /*tp_call*/
-#ifndef MATH_STANDALONE
- (reprfunc)Matrix_str, /*tp_str*/
-#else
- NULL, /*tp_str*/
-#endif
- NULL, /*tp_getattro*/
- NULL, /*tp_setattro*/
- NULL, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- matrix_doc, /*tp_doc*/
- (traverseproc)BaseMathObject_traverse, /* tp_traverse */
- (inquiry)BaseMathObject_clear, /*tp_clear*/
- (richcmpfunc)Matrix_richcmpr, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- NULL, /*tp_iter*/
- NULL, /*tp_iternext*/
- Matrix_methods, /*tp_methods*/
- NULL, /*tp_members*/
- Matrix_getseters, /*tp_getset*/
- NULL, /*tp_base*/
- NULL, /*tp_dict*/
- NULL, /*tp_descr_get*/
- NULL, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- NULL, /*tp_init*/
- NULL, /*tp_alloc*/
- Matrix_new, /*tp_new*/
- NULL, /*tp_free*/
- (inquiry)BaseMathObject_is_gc, /*tp_is_gc*/
- NULL, /*tp_bases*/
- NULL, /*tp_mro*/
- NULL, /*tp_cache*/
- NULL, /*tp_subclasses*/
- NULL, /*tp_weaklist*/
- NULL, /*tp_del*/
+ PyVarObject_HEAD_INIT(NULL, 0)
+ /*tp_name*/ "Matrix",
+ /*tp_basicsize*/ sizeof(MatrixObject),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)BaseMathObject_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ (reprfunc)Matrix_repr,
+ /*tp_as_number*/ &Matrix_NumMethods,
+ /*tp_as_sequence*/ &Matrix_SeqMethods,
+ /*tp_as_mapping*/ &Matrix_AsMapping,
+ /*tp_hash*/ (hashfunc)Matrix_hash,
+ /*tp_call*/ NULL,
+ /*tp_str*/ (reprfunc)Matrix_str,
+ /*tp_getattro*/ NULL,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
+ /*tp_doc*/ matrix_doc,
+ /*tp_traverse*/ (traverseproc)BaseMathObject_traverse,
+ /*tp_clear*/ (inquiry)BaseMathObject_clear,
+ /*tp_richcompare*/ (richcmpfunc)Matrix_richcmpr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ NULL,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ Matrix_methods,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ Matrix_getseters,
+ /*tp_base*/ NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ Matrix_new,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ (inquiry)BaseMathObject_is_gc,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
+#ifdef MATH_STANDALONE
+# undef Matrix_str
+#endif
+
/** \} */
/* -------------------------------------------------------------------- */
@@ -3752,9 +3760,9 @@ static PyObject *MatrixAccess_iter(MatrixAccessObject *self)
}
static PyMappingMethods MatrixAccess_AsMapping = {
- (lenfunc)MatrixAccess_len,
- (binaryfunc)MatrixAccess_subscript,
- (objobjargproc)MatrixAccess_ass_subscript,
+ /*mp_len*/ (lenfunc)MatrixAccess_len,
+ /*mp_subscript*/ (binaryfunc)MatrixAccess_subscript,
+ /*mp_ass_subscript*/ (objobjargproc)MatrixAccess_ass_subscript,
};
/** \} */
@@ -3764,31 +3772,55 @@ static PyMappingMethods MatrixAccess_AsMapping = {
* \{ */
PyTypeObject matrix_access_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "MatrixAccess", /*tp_name*/
- sizeof(MatrixAccessObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- (destructor)MatrixAccess_dealloc, /*tp_dealloc*/
- (printfunc)NULL, /*tp_print*/
- NULL, /*tp_getattr*/
- NULL, /*tp_setattr*/
- NULL, /*tp_compare*/
- NULL, /*tp_repr*/
- NULL, /*tp_as_number*/
- NULL /* &MatrixAccess_SeqMethods */ /* TODO */, /*tp_as_sequence*/
- &MatrixAccess_AsMapping, /*tp_as_mapping*/
- NULL, /*tp_hash*/
- NULL, /*tp_call*/
- NULL, /*tp_str*/
- NULL, /*tp_getattro*/
- NULL, /*tp_setattro*/
- NULL, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- NULL, /*tp_doc*/
- (traverseproc)MatrixAccess_traverse, /*tp_traverse*/
- (inquiry)MatrixAccess_clear, /*tp_clear*/
- NULL /* (richcmpfunc)MatrixAccess_richcmpr */ /* TODO*/, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- (getiterfunc)MatrixAccess_iter, /* getiterfunc tp_iter; */
+ PyVarObject_HEAD_INIT(NULL, 0)
+ /*tp_name*/ "MatrixAccess",
+ /*tp_basicsize*/ sizeof(MatrixAccessObject),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)MatrixAccess_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ NULL,
+ /*tp_as_number*/ NULL,
+ /*tp_as_sequence*/ NULL /* &MatrixAccess_SeqMethods */ /* TODO */,
+ /*tp_as_mapping*/ &MatrixAccess_AsMapping,
+ /*tp_hash*/ NULL,
+ /*tp_call*/ NULL,
+ /*tp_str*/ NULL,
+ /*tp_getattro*/ NULL,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
+ /*tp_doc*/ NULL,
+ /*tp_traverse*/ (traverseproc)MatrixAccess_traverse,
+ /*tp_clear*/ (inquiry)MatrixAccess_clear,
+ /*tp_richcompare*/ NULL /* MatrixAccess_richcmpr */ /* TODO*/,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ (getiterfunc)MatrixAccess_iter,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ NULL,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ NULL,
+ /*tp_base*/ NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ NULL,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ NULL,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
/** \} */
diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c
index 976c1da1916..4c64746b764 100644
--- a/source/blender/python/mathutils/mathutils_Quaternion.c
+++ b/source/blender/python/mathutils/mathutils_Quaternion.c
@@ -1342,61 +1342,61 @@ static PyObject *Quaternion_neg(QuaternionObject *self)
* \{ */
static PySequenceMethods Quaternion_SeqMethods = {
- (lenfunc)Quaternion_len, /*sq_length*/
- (binaryfunc)NULL, /*sq_concat*/
- (ssizeargfunc)NULL, /*sq_repeat*/
- (ssizeargfunc)Quaternion_item, /*sq_item*/
- (ssizessizeargfunc)NULL, /*sq_slice(deprecated)*/
- (ssizeobjargproc)Quaternion_ass_item, /*sq_ass_item*/
- (ssizessizeobjargproc)NULL, /*sq_ass_slice(deprecated)*/
- (objobjproc)NULL, /*sq_contains*/
- (binaryfunc)NULL, /*sq_inplace_concat*/
- (ssizeargfunc)NULL, /*sq_inplace_repeat*/
+ /*sq_length*/ (lenfunc)Quaternion_len,
+ /*sq_concat*/ NULL,
+ /*sq_repeat*/ NULL,
+ /*sq_item*/ (ssizeargfunc)Quaternion_item,
+ /*was_sq_slice*/ NULL, /* DEPRECATED. */
+ /*sq_ass_item*/ (ssizeobjargproc)Quaternion_ass_item,
+ /*was_sq_ass_slice*/ NULL, /* DEPRECATED. */
+ /*sq_contains*/ NULL,
+ /*sq_inplace_concat*/ NULL,
+ /*sq_inplace_repeat*/ NULL,
};
static PyMappingMethods Quaternion_AsMapping = {
- (lenfunc)Quaternion_len,
- (binaryfunc)Quaternion_subscript,
- (objobjargproc)Quaternion_ass_subscript,
+ /*mp_len*/ (lenfunc)Quaternion_len,
+ /*mp_subscript*/ (binaryfunc)Quaternion_subscript,
+ /*mp_ass_subscript*/ (objobjargproc)Quaternion_ass_subscript,
};
static PyNumberMethods Quaternion_NumMethods = {
- (binaryfunc)Quaternion_add, /*nb_add*/
- (binaryfunc)Quaternion_sub, /*nb_subtract*/
- (binaryfunc)Quaternion_mul, /*nb_multiply*/
- NULL, /*nb_remainder*/
- NULL, /*nb_divmod*/
- NULL, /*nb_power*/
- (unaryfunc)Quaternion_neg, /*nb_negative*/
- (unaryfunc)Quaternion_copy, /*tp_positive*/
- (unaryfunc)0, /*tp_absolute*/
- (inquiry)0, /*tp_bool*/
- (unaryfunc)0, /*nb_invert*/
- NULL, /*nb_lshift*/
- (binaryfunc)0, /*nb_rshift*/
- NULL, /*nb_and*/
- NULL, /*nb_xor*/
- NULL, /*nb_or*/
- NULL, /*nb_int*/
- NULL, /*nb_reserved*/
- NULL, /*nb_float*/
- NULL, /*nb_inplace_add*/
- NULL, /*nb_inplace_subtract*/
- (binaryfunc)Quaternion_imul, /*nb_inplace_multiply*/
- NULL, /*nb_inplace_remainder*/
- NULL, /*nb_inplace_power*/
- NULL, /*nb_inplace_lshift*/
- NULL, /*nb_inplace_rshift*/
- NULL, /*nb_inplace_and*/
- NULL, /*nb_inplace_xor*/
- NULL, /*nb_inplace_or*/
- NULL, /*nb_floor_divide*/
- NULL, /*nb_true_divide*/
- NULL, /*nb_inplace_floor_divide*/
- NULL, /*nb_inplace_true_divide*/
- NULL, /*nb_index*/
- (binaryfunc)Quaternion_matmul, /*nb_matrix_multiply*/
- (binaryfunc)Quaternion_imatmul, /*nb_inplace_matrix_multiply*/
+ /*nb_add*/ (binaryfunc)Quaternion_add,
+ /*nb_subtract*/ (binaryfunc)Quaternion_sub,
+ /*nb_multiply*/ (binaryfunc)Quaternion_mul,
+ /*nb_remainder*/ NULL,
+ /*nb_divmod*/ NULL,
+ /*nb_power*/ NULL,
+ /*nb_negative*/ (unaryfunc)Quaternion_neg,
+ /*tp_positive*/ (unaryfunc)Quaternion_copy,
+ /*tp_absolute*/ NULL,
+ /*tp_bool*/ NULL,
+ /*nb_invert*/ NULL,
+ /*nb_lshift*/ NULL,
+ /*nb_rshift*/ NULL,
+ /*nb_and*/ NULL,
+ /*nb_xor*/ NULL,
+ /*nb_or*/ NULL,
+ /*nb_int*/ NULL,
+ /*nb_reserved*/ NULL,
+ /*nb_float*/ NULL,
+ /*nb_inplace_add*/ NULL,
+ /*nb_inplace_subtract*/ NULL,
+ /*nb_inplace_multiply*/ (binaryfunc)Quaternion_imul,
+ /*nb_inplace_remainder*/ NULL,
+ /*nb_inplace_power*/ NULL,
+ /*nb_inplace_lshift*/ NULL,
+ /*nb_inplace_rshift*/ NULL,
+ /*nb_inplace_and*/ NULL,
+ /*nb_inplace_xor*/ NULL,
+ /*nb_inplace_or*/ NULL,
+ /*nb_floor_divide*/ NULL,
+ /*nb_true_divide*/ NULL,
+ /*nb_inplace_floor_divide*/ NULL,
+ /*nb_inplace_true_divide*/ NULL,
+ /*nb_index*/ NULL,
+ /*nb_matrix_multiply*/ (binaryfunc)Quaternion_matmul,
+ /*nb_inplace_matrix_multiply*/ (binaryfunc)Quaternion_imatmul,
};
/** \} */
@@ -1657,6 +1657,10 @@ static struct PyMethodDef Quaternion_methods[] = {
/** \name Quaternion Type: Python Object Definition
* \{ */
+#ifdef MATH_STANDALONE
+# define Quaternion_str NULL
+#endif
+
PyDoc_STRVAR(quaternion_doc,
".. class:: Quaternion([seq, [angle]])\n"
"\n"
@@ -1682,57 +1686,61 @@ PyDoc_STRVAR(quaternion_doc,
"\n"
" .. seealso:: :meth:`to_axis_angle`\n");
PyTypeObject quaternion_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Quaternion", /* tp_name */
- sizeof(QuaternionObject), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)BaseMathObject_dealloc, /* tp_dealloc */
- (printfunc)NULL, /* tp_print */
- NULL, /* tp_getattr */
- NULL, /* tp_setattr */
- NULL, /* tp_compare */
- (reprfunc)Quaternion_repr, /* tp_repr */
- &Quaternion_NumMethods, /* tp_as_number */
- &Quaternion_SeqMethods, /* tp_as_sequence */
- &Quaternion_AsMapping, /* tp_as_mapping */
- (hashfunc)Quaternion_hash, /* tp_hash */
- NULL, /* tp_call */
-#ifndef MATH_STANDALONE
- (reprfunc)Quaternion_str, /* tp_str */
-#else
- NULL, /* tp_str */
-#endif
- NULL, /* tp_getattro */
- NULL, /* tp_setattro */
- NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, /* tp_flags */
- quaternion_doc, /* tp_doc */
- (traverseproc)BaseMathObject_traverse, /* tp_traverse */
- (inquiry)BaseMathObject_clear, /* tp_clear */
- (richcmpfunc)Quaternion_richcmpr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- NULL, /* tp_iter */
- NULL, /* tp_iternext */
- Quaternion_methods, /* tp_methods */
- NULL, /* tp_members */
- Quaternion_getseters, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- NULL, /* tp_descr_get */
- NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
- NULL, /* tp_init */
- NULL, /* tp_alloc */
- Quaternion_new, /* tp_new */
- NULL, /* tp_free */
- (inquiry)BaseMathObject_is_gc, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
- NULL, /* tp_del */
+ PyVarObject_HEAD_INIT(NULL, 0)
+ /*tp_name*/ "Quaternion",
+ /*tp_basicsize*/ sizeof(QuaternionObject),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)BaseMathObject_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ (reprfunc)Quaternion_repr,
+ /*tp_as_number*/ &Quaternion_NumMethods,
+ /*tp_as_sequence*/ &Quaternion_SeqMethods,
+ /*tp_as_mapping*/ &Quaternion_AsMapping,
+ /*tp_hash*/ (hashfunc)Quaternion_hash,
+ /*tp_call*/ NULL,
+ /*tp_str*/ (reprfunc)Quaternion_str,
+ /*tp_getattro*/ NULL,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
+ /*tp_doc*/ quaternion_doc,
+ /*tp_traverse*/ (traverseproc)BaseMathObject_traverse,
+ /*tp_clear*/ (inquiry)BaseMathObject_clear,
+ /*tp_richcompare*/ (richcmpfunc)Quaternion_richcmpr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ NULL,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ Quaternion_methods,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ Quaternion_getseters,
+ /*tp_base*/ NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ Quaternion_new,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ (inquiry)BaseMathObject_is_gc,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
+#ifdef MATH_STANDALONE
+# undef Quaternion_str
+#endif
+
/** \} */
/* -------------------------------------------------------------------- */
diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c
index 290be771c90..0f534e76e73 100644
--- a/source/blender/python/mathutils/mathutils_Vector.c
+++ b/source/blender/python/mathutils/mathutils_Vector.c
@@ -2387,61 +2387,61 @@ static PyObject *Vector_neg(VectorObject *self)
* \{ */
static PySequenceMethods Vector_SeqMethods = {
- (lenfunc)Vector_len, /*sq_length*/
- (binaryfunc)NULL, /*sq_concat*/
- (ssizeargfunc)NULL, /*sq_repeat*/
- (ssizeargfunc)Vector_item, /*sq_item*/
- NULL, /*sq_slice(DEPRECATED)*/
- (ssizeobjargproc)Vector_ass_item, /*sq_ass_item*/
- NULL, /*sq_ass_slice(DEPRECATED)*/
- (objobjproc)NULL, /*sq_contains*/
- (binaryfunc)NULL, /*sq_inplace_concat */
- (ssizeargfunc)NULL, /*sq_inplace_repeat */
+ /*sq_length*/ (lenfunc)Vector_len,
+ /*sq_concat*/ NULL,
+ /*sq_repeat*/ NULL,
+ /*sq_item*/ (ssizeargfunc)Vector_item,
+ /*was_sq_slice*/ NULL, /* DEPRECATED. */
+ /*sq_ass_item*/ (ssizeobjargproc)Vector_ass_item,
+ /*was_sq_ass_slice*/ NULL, /* DEPRECATED. */
+ /*sq_contains*/ NULL,
+ /*sq_inplace_concat */ NULL,
+ /*sq_inplace_repeat */ NULL,
};
static PyMappingMethods Vector_AsMapping = {
- (lenfunc)Vector_len,
- (binaryfunc)Vector_subscript,
- (objobjargproc)Vector_ass_subscript,
+ /*mp_len*/ (lenfunc)Vector_len,
+ /*mp_subscript*/ (binaryfunc)Vector_subscript,
+ /*mp_ass_subscript*/ (objobjargproc)Vector_ass_subscript,
};
static PyNumberMethods Vector_NumMethods = {
- (binaryfunc)Vector_add, /*nb_add*/
- (binaryfunc)Vector_sub, /*nb_subtract*/
- (binaryfunc)Vector_mul, /*nb_multiply*/
- NULL, /*nb_remainder*/
- NULL, /*nb_divmod*/
- NULL, /*nb_power*/
- (unaryfunc)Vector_neg, /*nb_negative*/
- (unaryfunc)Vector_copy, /*tp_positive*/
- (unaryfunc)NULL, /*tp_absolute*/
- (inquiry)NULL, /*tp_bool*/
- (unaryfunc)NULL, /*nb_invert*/
- NULL, /*nb_lshift*/
- (binaryfunc)NULL, /*nb_rshift*/
- NULL, /*nb_and*/
- NULL, /*nb_xor*/
- NULL, /*nb_or*/
- NULL, /*nb_int*/
- NULL, /*nb_reserved*/
- NULL, /*nb_float*/
- Vector_iadd, /*nb_inplace_add*/
- Vector_isub, /*nb_inplace_subtract*/
- Vector_imul, /*nb_inplace_multiply*/
- NULL, /*nb_inplace_remainder*/
- NULL, /*nb_inplace_power*/
- NULL, /*nb_inplace_lshift*/
- NULL, /*nb_inplace_rshift*/
- NULL, /*nb_inplace_and*/
- NULL, /*nb_inplace_xor*/
- NULL, /*nb_inplace_or*/
- NULL, /*nb_floor_divide*/
- Vector_div, /*nb_true_divide*/
- NULL, /*nb_inplace_floor_divide*/
- Vector_idiv, /*nb_inplace_true_divide*/
- NULL, /*nb_index*/
- (binaryfunc)Vector_matmul, /*nb_matrix_multiply*/
- (binaryfunc)Vector_imatmul, /*nb_inplace_matrix_multiply*/
+ /*nb_add*/ (binaryfunc)Vector_add,
+ /*nb_subtract*/ (binaryfunc)Vector_sub,
+ /*nb_multiply*/ (binaryfunc)Vector_mul,
+ /*nb_remainder*/ NULL,
+ /*nb_divmod*/ NULL,
+ /*nb_power*/ NULL,
+ /*nb_negative*/ (unaryfunc)Vector_neg,
+ /*tp_positive*/ (unaryfunc)Vector_copy,
+ /*tp_absolute*/ NULL,
+ /*tp_bool*/ NULL,
+ /*nb_invert*/ NULL,
+ /*nb_lshift*/ NULL,
+ /*nb_rshift*/ NULL,
+ /*nb_and*/ NULL,
+ /*nb_xor*/ NULL,
+ /*nb_or*/ NULL,
+ /*nb_int*/ NULL,
+ /*nb_reserved*/ NULL,
+ /*nb_float*/ NULL,
+ /*nb_inplace_add*/ Vector_iadd,
+ /*nb_inplace_subtract*/ Vector_isub,
+ /*nb_inplace_multiply*/ Vector_imul,
+ /*nb_inplace_remainder*/ NULL,
+ /*nb_inplace_power*/ NULL,
+ /*nb_inplace_lshift*/ NULL,
+ /*nb_inplace_rshift*/ NULL,
+ /*nb_inplace_and*/ NULL,
+ /*nb_inplace_xor*/ NULL,
+ /*nb_inplace_or*/ NULL,
+ /*nb_floor_divide*/ NULL,
+ /*nb_true_divide*/ Vector_div,
+ /*nb_inplace_floor_divide*/ NULL,
+ /*nb_inplace_true_divide*/ Vector_idiv,
+ /*nb_index*/ NULL,
+ /*nb_matrix_multiply*/ (binaryfunc)Vector_matmul,
+ /*nb_inplace_matrix_multiply*/ (binaryfunc)Vector_imatmul,
};
/** \} */
@@ -3183,6 +3183,10 @@ static struct PyMethodDef Vector_methods[] = {
* both get sent to Vector_mul and it needs to sort out the order
* \{ */
+#ifdef MATH_STANDALONE
+# define Vector_str NULL
+#endif
+
PyDoc_STRVAR(vector_doc,
".. class:: Vector(seq)\n"
"\n"
@@ -3192,88 +3196,59 @@ PyDoc_STRVAR(vector_doc,
" :type seq: sequence of numbers\n");
PyTypeObject vector_Type = {
PyVarObject_HEAD_INIT(NULL, 0)
- /* For printing, in format "<module>.<name>" */
- "Vector", /* char *tp_name; */
- sizeof(VectorObject), /* int tp_basicsize; */
- 0, /* tp_itemsize; For allocation */
-
- /* Methods to implement standard operations */
-
- (destructor)BaseMathObject_dealloc, /* destructor tp_dealloc; */
- 0, /* tp_vectorcall_offset */
- NULL, /* getattrfunc tp_getattr; */
- NULL, /* setattrfunc tp_setattr; */
- NULL, /* cmpfunc tp_compare; */
- (reprfunc)Vector_repr, /* reprfunc tp_repr; */
-
- /* Method suites for standard classes */
-
- &Vector_NumMethods, /* PyNumberMethods *tp_as_number; */
- &Vector_SeqMethods, /* PySequenceMethods *tp_as_sequence; */
- &Vector_AsMapping, /* PyMappingMethods *tp_as_mapping; */
-
- /* More standard operations (here for binary compatibility) */
+ /*tp_name*/ "Vector",
+ /*tp_basicsize*/ sizeof(VectorObject),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)BaseMathObject_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ (reprfunc)Vector_repr,
+ /*tp_as_number*/ &Vector_NumMethods,
+ /*tp_as_sequence*/ &Vector_SeqMethods,
+ /*tp_as_mapping*/ &Vector_AsMapping,
+ /*tp_hash*/ (hashfunc)Vector_hash,
+ /*tp_call*/ NULL,
+ /*tp_str*/ (reprfunc)Vector_str,
+ /*tp_getattro*/ NULL,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
+ /*tp_doc*/ vector_doc,
+ /*tp_traverse*/ (traverseproc)BaseMathObject_traverse,
+ /*tp_clear*/ (inquiry)BaseMathObject_clear,
+ /*tp_richcompare*/ (richcmpfunc)Vector_richcmpr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ NULL,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ Vector_methods,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ Vector_getseters,
+ /*tp_base*/ NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ NULL,
+ /*tp_new*/ Vector_new,
+ /*tp_free*/ NULL,
+ /*tp_is_gc*/ (inquiry)BaseMathObject_is_gc,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
+};
- (hashfunc)Vector_hash, /* hashfunc tp_hash; */
- NULL, /* ternaryfunc tp_call; */
-#ifndef MATH_STANDALONE
- (reprfunc)Vector_str, /* reprfunc tp_str; */
-#else
- NULL, /* reprfunc tp_str; */
+#ifdef MATH_STANDALONE
+# undef Vector_str NULL
#endif
- NULL, /* getattrofunc tp_getattro; */
- NULL, /* setattrofunc tp_setattro; */
-
- /* Functions to access object as input/output buffer */
- NULL, /* PyBufferProcs *tp_as_buffer; */
-
- /*** Flags to define presence of optional/expanded features ***/
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
- vector_doc, /* char *tp_doc; Documentation string */
- /*** Assigned meaning in release 2.0 ***/
-
- /* call function for all accessible objects */
- (traverseproc)BaseMathObject_traverse, /* tp_traverse */
-
- /* delete references to contained objects */
- (inquiry)BaseMathObject_clear, /* tp_clear */
-
- /*** Assigned meaning in release 2.1 ***/
- /*** rich comparisons ***/
- (richcmpfunc)Vector_richcmpr, /* richcmpfunc tp_richcompare; */
-
- /*** weak reference enabler ***/
- 0, /* long tp_weaklistoffset; */
-
- /*** Added in release 2.2 ***/
- /* Iterators */
- NULL, /* getiterfunc tp_iter; */
- NULL, /* iternextfunc tp_iternext; */
-
- /*** Attribute descriptor and subclassing stuff ***/
- Vector_methods, /* struct PyMethodDef *tp_methods; */
- NULL, /* struct PyMemberDef *tp_members; */
- Vector_getseters, /* struct PyGetSetDef *tp_getset; */
- NULL, /* struct _typeobject *tp_base; */
- NULL, /* PyObject *tp_dict; */
- NULL, /* descrgetfunc tp_descr_get; */
- NULL, /* descrsetfunc tp_descr_set; */
- 0, /* long tp_dictoffset; */
- NULL, /* initproc tp_init; */
- NULL, /* allocfunc tp_alloc; */
- Vector_new, /* newfunc tp_new; */
- /* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
- /* For PyObject_IS_GC */
- (inquiry)BaseMathObject_is_gc, /* inquiry tp_is_gc; */
- NULL, /* PyObject *tp_bases; */
- /* method resolution order */
- NULL, /* PyObject *tp_mro; */
- NULL, /* PyObject *tp_cache; */
- NULL, /* PyObject *tp_subclasses; */
- NULL, /* PyObject *tp_weaklist; */
- NULL,
-};
/** \} */
diff --git a/source/blender/python/mathutils/mathutils_bvhtree.c b/source/blender/python/mathutils/mathutils_bvhtree.c
index 4bdb1adcdde..11f8d57397e 100644
--- a/source/blender/python/mathutils/mathutils_bvhtree.c
+++ b/source/blender/python/mathutils/mathutils_bvhtree.c
@@ -1235,52 +1235,55 @@ static PyMethodDef py_bvhtree_methods[] = {
};
PyTypeObject PyBVHTree_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "BVHTree", /* tp_name */
- sizeof(PyBVHTree), /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- (destructor)py_bvhtree__tp_dealloc, /* tp_dealloc */
- (printfunc)NULL, /* tp_print */
- NULL, /* tp_getattr */
- NULL, /* tp_setattr */
- NULL, /* tp_compare */
- NULL, /* tp_repr */
- NULL, /* tp_as_number */
- NULL, /* tp_as_sequence */
- NULL, /* tp_as_mapping */
- NULL, /* tp_hash */
- NULL, /* tp_call */
- NULL, /* tp_str */
- NULL, /* tp_getattro */
- NULL, /* tp_setattro */
- NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- NULL, /* Documentation string */
- NULL, /* tp_traverse */
- NULL, /* tp_clear */
- NULL, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- NULL, /* tp_iter */
- NULL, /* tp_iternext */
- py_bvhtree_methods, /* tp_methods */
- NULL, /* tp_members */
- NULL, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- NULL, /* tp_descr_get */
- NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
- NULL, /* tp_init */
- (allocfunc)PyType_GenericAlloc, /* tp_alloc */
- (newfunc)PyType_GenericNew, /* tp_new */
- (freefunc)0, /* tp_free */
- NULL, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
- (destructor)NULL, /* tp_del */
+ PyVarObject_HEAD_INIT(NULL, 0)
+ /*tp_name*/ "BVHTree",
+ /*tp_basicsize*/ sizeof(PyBVHTree),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)py_bvhtree__tp_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ NULL,
+ /*tp_as_number*/ NULL,
+ /*tp_as_sequence*/ NULL,
+ /*tp_as_mapping*/ NULL,
+ /*tp_hash*/ NULL,
+ /*tp_call*/ NULL,
+ /*tp_str*/ NULL,
+ /*tp_getattro*/ NULL,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT,
+ /*tp_doc*/ NULL,
+ /*tp_traverse*/ NULL,
+ /*tp_clear*/ NULL,
+ /*tp_richcompare*/ NULL,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ NULL,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ py_bvhtree_methods,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ NULL,
+ /*tp_base*/ NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ NULL,
+ /*tp_alloc*/ (allocfunc)PyType_GenericAlloc,
+ /*tp_new*/ (newfunc)PyType_GenericNew,
+ /*tp_free*/ (freefunc)0,
+ /*tp_is_gc*/ NULL,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ (destructor)NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
/* -------------------------------------------------------------------- */
diff --git a/source/blender/python/mathutils/mathutils_kdtree.c b/source/blender/python/mathutils/mathutils_kdtree.c
index f5a27c6f90f..02d9482b575 100644
--- a/source/blender/python/mathutils/mathutils_kdtree.c
+++ b/source/blender/python/mathutils/mathutils_kdtree.c
@@ -372,53 +372,57 @@ PyDoc_STRVAR(py_KDtree_doc,
"\n"
" :class:`KDTree.balance` must have been called before using any of the ``find`` "
"methods.\n");
+
PyTypeObject PyKDTree_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "KDTree", /* tp_name */
- sizeof(PyKDTree), /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- (destructor)PyKDTree__tp_dealloc, /* tp_dealloc */
- (printfunc)NULL, /* tp_print */
- NULL, /* tp_getattr */
- NULL, /* tp_setattr */
- NULL, /* tp_compare */
- NULL, /* tp_repr */
- NULL, /* tp_as_number */
- NULL, /* tp_as_sequence */
- NULL, /* tp_as_mapping */
- NULL, /* tp_hash */
- NULL, /* tp_call */
- NULL, /* tp_str */
- NULL, /* tp_getattro */
- NULL, /* tp_setattro */
- NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- py_KDtree_doc, /* Documentation string */
- NULL, /* tp_traverse */
- NULL, /* tp_clear */
- NULL, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- NULL, /* tp_iter */
- NULL, /* tp_iternext */
- (struct PyMethodDef *)PyKDTree_methods, /* tp_methods */
- NULL, /* tp_members */
- NULL, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- NULL, /* tp_descr_get */
- NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)PyKDTree__tp_init, /* tp_init */
- (allocfunc)PyType_GenericAlloc, /* tp_alloc */
- (newfunc)PyType_GenericNew, /* tp_new */
- (freefunc)0, /* tp_free */
- NULL, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
- (destructor)NULL, /* tp_del */
+ PyVarObject_HEAD_INIT(NULL, 0)
+ /*tp_name*/ "KDTree",
+ /*tp_basicsize*/ sizeof(PyKDTree),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ (destructor)PyKDTree__tp_dealloc,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ NULL,
+ /*tp_setattr*/ NULL,
+ /*tp_as_async*/ NULL,
+ /*tp_repr*/ NULL,
+ /*tp_as_number*/ NULL,
+ /*tp_as_sequence*/ NULL,
+ /*tp_as_mapping*/ NULL,
+ /*tp_hash*/ NULL,
+ /*tp_call*/ NULL,
+ /*tp_str*/ NULL,
+ /*tp_getattro*/ NULL,
+ /*tp_setattro*/ NULL,
+ /*tp_as_buffer*/ NULL,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT,
+ /*Documentation string*/ py_KDtree_doc,
+ /*tp_traverse*/ NULL,
+ /*tp_clear*/ NULL,
+ /*tp_richcompare*/ NULL,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ NULL,
+ /*tp_iternext*/ NULL,
+ /*tp_methods*/ (struct PyMethodDef *)PyKDTree_methods,
+ /*tp_members*/ NULL,
+ /*tp_getset*/ NULL,
+ /*tp_base*/ NULL,
+ /*tp_dict*/ NULL,
+ /*tp_descr_get*/ NULL,
+ /*tp_descr_set*/ NULL,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)PyKDTree__tp_init,
+ /*tp_alloc*/ (allocfunc)PyType_GenericAlloc,
+ /*tp_new*/ (newfunc)PyType_GenericNew,
+ /*tp_free*/ (freefunc)0,
+ /*tp_is_gc*/ NULL,
+ /*tp_bases*/ NULL,
+ /*tp_mro*/ NULL,
+ /*tp_cache*/ NULL,
+ /*tp_subclasses*/ NULL,
+ /*tp_weaklist*/ NULL,
+ /*tp_del*/ (destructor)NULL,
+ /*tp_version_tag*/ 0,
+ /*tp_finalize*/ NULL,
+ /*tp_vectorcall*/ NULL,
};
PyDoc_STRVAR(py_kdtree_doc, "Generic 3-dimensional kd-tree to perform spatial searches.");
diff --git a/source/blender/render/RE_multires_bake.h b/source/blender/render/RE_multires_bake.h
index a478f124892..70ce46bc195 100644
--- a/source/blender/render/RE_multires_bake.h
+++ b/source/blender/render/RE_multires_bake.h
@@ -43,8 +43,8 @@ typedef struct MultiresBakeRender {
float user_scale; /* User scale used to scale displacement when baking derivative map. */
- short *stop;
- short *do_update;
+ bool *stop;
+ bool *do_update;
float *progress;
} MultiresBakeRender;
diff --git a/source/blender/render/RE_pipeline.h b/source/blender/render/RE_pipeline.h
index e9a90096dab..d12162c0b9a 100644
--- a/source/blender/render/RE_pipeline.h
+++ b/source/blender/render/RE_pipeline.h
@@ -398,7 +398,7 @@ void RE_display_update_cb(struct Render *re,
void RE_stats_draw_cb(struct Render *re, void *handle, void (*f)(void *handle, RenderStats *rs));
void RE_progress_cb(struct Render *re, void *handle, void (*f)(void *handle, float));
void RE_draw_lock_cb(struct Render *re, void *handle, void (*f)(void *handle, bool lock));
-void RE_test_break_cb(struct Render *re, void *handle, int (*f)(void *handle));
+void RE_test_break_cb(struct Render *re, void *handle, bool (*f)(void *handle));
void RE_current_scene_update_cb(struct Render *re,
void *handle,
void (*f)(void *handle, struct Scene *scene));
diff --git a/source/blender/render/intern/bake.c b/source/blender/render/intern/bake.c
index 8fd62f7ec34..9b56e18bb26 100644
--- a/source/blender/render/intern/bake.c
+++ b/source/blender/render/intern/bake.c
@@ -967,7 +967,7 @@ void RE_bake_normal_world_to_object(const BakePixel pixel_array[],
size_t i;
float iobmat[4][4];
- invert_m4_m4(iobmat, ob->obmat);
+ invert_m4_m4(iobmat, ob->object_to_world);
for (i = 0; i < pixels_num; i++) {
size_t offset;
diff --git a/source/blender/render/intern/engine.cc b/source/blender/render/intern/engine.cc
index b8757d33580..acca657f7dc 100644
--- a/source/blender/render/intern/engine.cc
+++ b/source/blender/render/intern/engine.cc
@@ -1036,12 +1036,6 @@ bool RE_engine_render(Render *re, bool do_all)
return true;
}
- /* update animation here so any render layer animation is applied before
- * creating the render result */
- if ((re->r.scemode & (R_NO_FRAME_UPDATE | R_BUTS_PREVIEW)) == 0) {
- render_update_anim_renderdata(re, &re->scene->r, &re->scene->view_layers);
- }
-
/* Create engine. */
RenderEngine *engine = re->engine;
diff --git a/source/blender/render/intern/multires_bake.c b/source/blender/render/intern/multires_bake.c
index f701d9a987a..cfb91e86ad9 100644
--- a/source/blender/render/intern/multires_bake.c
+++ b/source/blender/render/intern/multires_bake.c
@@ -89,7 +89,7 @@ typedef struct {
char *texels;
const MResolvePixelData *data;
MFlushPixel flush_pixel;
- short *do_update;
+ bool *do_update;
} MBakeRast;
typedef struct {
@@ -134,7 +134,7 @@ static void init_bake_rast(MBakeRast *bake_rast,
const ImBuf *ibuf,
const MResolvePixelData *data,
MFlushPixel flush_pixel,
- short *do_update)
+ bool *do_update)
{
BakeImBufuserData *userdata = (BakeImBufuserData *)ibuf->userdata;
diff --git a/source/blender/render/intern/pipeline.cc b/source/blender/render/intern/pipeline.cc
index d2929a7f6ea..17cf3b7ff74 100644
--- a/source/blender/render/intern/pipeline.cc
+++ b/source/blender/render/intern/pipeline.cc
@@ -177,7 +177,7 @@ static void stats_nothing(void * /*arg*/, RenderStats * /*rs*/)
static void float_nothing(void * /*arg*/, float /*val*/)
{
}
-static int default_break(void * /*arg*/)
+static bool default_break(void * /*arg*/)
{
return G.is_break == true;
}
@@ -261,13 +261,10 @@ RenderResult *RE_MultilayerConvert(
return render_result_new_from_exr(exrhandle, colorspace, predivide, rectx, recty);
}
-RenderLayer *render_get_active_layer(Render *re, RenderResult *rr)
+RenderLayer *render_get_single_layer(Render *re, RenderResult *rr)
{
- ViewLayer *view_layer = static_cast<ViewLayer *>(
- BLI_findlink(&re->view_layers, re->active_view_layer));
-
- if (view_layer) {
- RenderLayer *rl = RE_GetRenderLayer(rr, view_layer->name);
+ if (re->single_view_layer[0]) {
+ RenderLayer *rl = RE_GetRenderLayer(rr, re->single_view_layer);
if (rl) {
return rl;
@@ -385,8 +382,8 @@ void RE_AcquireResultImageViews(Render *re, RenderResult *rr)
RenderView *rv = static_cast<RenderView *>(rr->views.first);
rr->have_combined = (rv->rectf != nullptr);
- /* active layer */
- RenderLayer *rl = render_get_active_layer(re, re->result);
+ /* single layer */
+ RenderLayer *rl = render_get_single_layer(re, re->result);
if (rl) {
if (rv->rectf == nullptr) {
@@ -443,7 +440,7 @@ void RE_AcquireResultImage(Render *re, RenderResult *rr, const int view_id)
rr->rect32 = rv->rect32;
/* active layer */
- rl = render_get_active_layer(re, re->result);
+ rl = render_get_single_layer(re, re->result);
if (rl) {
if (rv->rectf == nullptr) {
@@ -583,9 +580,6 @@ void RE_FreeRender(Render *re)
BLI_mutex_end(&re->engine_draw_mutex);
BLI_mutex_end(&re->highlighted_tiles_mutex);
- BLI_freelistN(&re->view_layers);
- BLI_freelistN(&re->r.views);
-
BKE_curvemapping_free_data(&re->r.mblur_shutter_curve);
if (re->highlighted_tiles != nullptr) {
@@ -705,19 +699,18 @@ static void re_init_resolution(Render *re, Render *source, int winx, int winy, r
void render_copy_renderdata(RenderData *to, RenderData *from)
{
- BLI_freelistN(&to->views);
+ /* Mostly shallow copy referencing pointers in scene renderdata. */
BKE_curvemapping_free_data(&to->mblur_shutter_curve);
memcpy(to, from, sizeof(*to));
- BLI_duplicatelist(&to->views, &from->views);
BKE_curvemapping_copy_data(&to->mblur_shutter_curve, &from->mblur_shutter_curve);
}
void RE_InitState(Render *re,
Render *source,
RenderData *rd,
- ListBase *render_layers,
+ ListBase * /*render_layers*/,
ViewLayer *single_layer,
int winx,
int winy,
@@ -731,9 +724,7 @@ void RE_InitState(Render *re,
/* copy render data and render layers for thread safety */
render_copy_renderdata(&re->r, rd);
- BLI_freelistN(&re->view_layers);
- BLI_duplicatelist(&re->view_layers, render_layers);
- re->active_view_layer = 0;
+ re->single_view_layer[0] = '\0';
if (source) {
/* reuse border flags from source renderer */
@@ -757,16 +748,13 @@ void RE_InitState(Render *re,
if (re->rectx < 1 || re->recty < 1 ||
(BKE_imtype_is_movie(rd->im_format.imtype) && (re->rectx < 16 || re->recty < 16))) {
BKE_report(re->reports, RPT_ERROR, "Image too small");
- re->ok = 0;
+ re->ok = false;
return;
}
if (single_layer) {
- int index = BLI_findindex(render_layers, single_layer);
- if (index != -1) {
- re->active_view_layer = index;
- re->r.scemode |= R_SINGLE_LAYER;
- }
+ STRNCPY(re->single_view_layer, single_layer->name);
+ re->r.scemode |= R_SINGLE_LAYER;
}
/* if preview render, we try to keep old result */
@@ -779,13 +767,16 @@ void RE_InitState(Render *re,
re->result = nullptr;
}
else if (re->result) {
- ViewLayer *active_render_layer = static_cast<ViewLayer *>(
- BLI_findlink(&re->view_layers, re->active_view_layer));
bool have_layer = false;
- LISTBASE_FOREACH (RenderLayer *, rl, &re->result->layers) {
- if (STREQ(rl->name, active_render_layer->name)) {
- have_layer = true;
+ if (re->single_view_layer[0] == '\0' && re->result->layers.first) {
+ have_layer = true;
+ }
+ else {
+ LISTBASE_FOREACH (RenderLayer *, rl, &re->result->layers) {
+ if (STREQ(rl->name, re->single_view_layer)) {
+ have_layer = true;
+ }
}
}
@@ -817,27 +808,6 @@ void RE_InitState(Render *re,
RE_point_density_fix_linking();
}
-void render_update_anim_renderdata(Render *re, RenderData *rd, ListBase *render_layers)
-{
- /* filter */
- re->r.gauss = rd->gauss;
-
- /* motion blur */
- re->r.blurfac = rd->blurfac;
-
- /* freestyle */
- re->r.line_thickness_mode = rd->line_thickness_mode;
- re->r.unit_line_thickness = rd->unit_line_thickness;
-
- /* render layers */
- BLI_freelistN(&re->view_layers);
- BLI_duplicatelist(&re->view_layers, render_layers);
-
- /* render views */
- BLI_freelistN(&re->r.views);
- BLI_duplicatelist(&re->r.views, &rd->views);
-}
-
void RE_display_init_cb(Render *re, void *handle, void (*f)(void *handle, RenderResult *rr))
{
re->display_init = f;
@@ -877,7 +847,7 @@ void RE_draw_lock_cb(Render *re, void *handle, void (*f)(void *handle, bool lock
re->dlh = handle;
}
-void RE_test_break_cb(Render *re, void *handle, int (*f)(void *handle))
+void RE_test_break_cb(Render *re, void *handle, bool (*f)(void *handle))
{
re->test_break = f;
re->tbh = handle;
@@ -979,7 +949,7 @@ static void render_result_uncrop(Render *re)
re->result = rres;
/* Weak, the display callback wants an active render-layer pointer. */
- re->result->renlay = render_get_active_layer(re, re->result);
+ re->result->renlay = render_get_single_layer(re, re->result);
BLI_rw_mutex_unlock(&re->resultmutex);
@@ -1217,7 +1187,7 @@ static void do_render_compositor(Render *re)
/* Weak: the display callback wants an active render-layer pointer. */
if (re->result != nullptr) {
- re->result->renlay = render_get_active_layer(re, re->result);
+ re->result->renlay = render_get_single_layer(re, re->result);
re->display_update(re->duh, re->result, nullptr);
}
}
@@ -1635,15 +1605,15 @@ const char *RE_GetActiveRenderView(Render *re)
return re->viewname;
}
-/* evaluating scene options for general Blender render */
-static int render_init_from_main(Render *re,
- const RenderData *rd,
- Main *bmain,
- Scene *scene,
- ViewLayer *single_layer,
- Object *camera_override,
- int anim,
- int anim_init)
+/** Evaluating scene options for general Blender render. */
+static bool render_init_from_main(Render *re,
+ const RenderData *rd,
+ Main *bmain,
+ Scene *scene,
+ ViewLayer *single_layer,
+ Object *camera_override,
+ int anim,
+ int anim_init)
{
int winx, winy;
rcti disprect;
@@ -1676,9 +1646,8 @@ static int render_init_from_main(Render *re,
/* not too nice, but it survives anim-border render */
if (anim) {
- render_update_anim_renderdata(re, &scene->r, &scene->view_layers);
re->disprect = disprect;
- return 1;
+ return true;
}
/*
@@ -1700,7 +1669,7 @@ static int render_init_from_main(Render *re,
RE_InitState(re, nullptr, &scene->r, &scene->view_layers, single_layer, winx, winy, &disprect);
if (!re->ok) { /* if an error was printed, abort */
- return 0;
+ return false;
}
/* initstate makes new result, have to send changed tags around */
@@ -1709,7 +1678,7 @@ static int render_init_from_main(Render *re,
re->display_init(re->dih, re->result);
re->display_clear(re->dch, re->result);
- return 1;
+ return true;
}
void RE_SetReports(Render *re, ReportList *reports)
@@ -1862,7 +1831,7 @@ static bool use_eevee_for_freestyle_render(Render *re)
void RE_RenderFreestyleStrokes(Render *re, Main *bmain, Scene *scene, int render)
{
- re->result_ok = 0;
+ re->result_ok = false;
if (render_init_from_main(re, &scene->r, bmain, scene, nullptr, nullptr, 0, 0)) {
if (render) {
char scene_engine[32];
@@ -1876,7 +1845,7 @@ void RE_RenderFreestyleStrokes(Render *re, Main *bmain, Scene *scene, int render
change_renderdata_engine(re, scene_engine);
}
}
- re->result_ok = 1;
+ re->result_ok = true;
}
void RE_RenderFreestyleExternal(Render *re)
@@ -1890,12 +1859,10 @@ void RE_RenderFreestyleExternal(Render *re)
LISTBASE_FOREACH (RenderView *, rv, &re->result->views) {
RE_SetActiveRenderView(re, rv->name);
- ViewLayer *active_view_layer = static_cast<ViewLayer *>(
- BLI_findlink(&re->view_layers, re->active_view_layer));
FRS_begin_stroke_rendering(re);
- LISTBASE_FOREACH (ViewLayer *, view_layer, &re->view_layers) {
- if ((re->r.scemode & R_SINGLE_LAYER) && view_layer != active_view_layer) {
+ LISTBASE_FOREACH (ViewLayer *, view_layer, &re->scene->view_layers) {
+ if ((re->r.scemode & R_SINGLE_LAYER) && !STREQ(view_layer->name, re->single_view_layer)) {
continue;
}
diff --git a/source/blender/render/intern/pipeline.h b/source/blender/render/intern/pipeline.h
index 689e4509da3..e5da3cb8830 100644
--- a/source/blender/render/intern/pipeline.h
+++ b/source/blender/render/intern/pipeline.h
@@ -17,14 +17,7 @@ struct RenderResult;
extern "C" {
#endif
-struct RenderLayer *render_get_active_layer(struct Render *re, struct RenderResult *rr);
-/**
- * Update some variables that can be animated, and otherwise wouldn't be due to
- * #RenderData getting copied once at the start of animation render.
- */
-void render_update_anim_renderdata(struct Render *re,
- struct RenderData *rd,
- struct ListBase *render_layers);
+struct RenderLayer *render_get_single_layer(struct Render *re, struct RenderResult *rr);
void render_copy_renderdata(struct RenderData *to, struct RenderData *from);
#ifdef __cplusplus
diff --git a/source/blender/render/intern/render_result.cc b/source/blender/render/intern/render_result.cc
index 94f6e2f1509..1cd95831ddf 100644
--- a/source/blender/render/intern/render_result.cc
+++ b/source/blender/render/intern/render_result.cc
@@ -321,7 +321,7 @@ RenderResult *render_result_new(Render *re,
rl->layflag = SCE_LAY_FLAG_DEFAULT;
rl->passflag = SCE_PASS_COMBINED;
- re->active_view_layer = 0;
+ re->single_view_layer[0] = '\0';
}
/* Border render; calculate offset for use in compositor. compo is centralized coords. */
@@ -768,8 +768,8 @@ void render_result_single_layer_end(Render *re)
/* reconstruct render result layers */
int nr = 0;
- LISTBASE_FOREACH (ViewLayer *, view_layer, &re->view_layers) {
- if (nr == re->active_view_layer) {
+ LISTBASE_FOREACH (ViewLayer *, view_layer, &re->scene->view_layers) {
+ if (STREQ(view_layer->name, re->single_view_layer)) {
BLI_addtail(&re->result->layers, rl);
}
else {
diff --git a/source/blender/render/intern/render_result.h b/source/blender/render/intern/render_result.h
index 2e76efba8a3..6e971d45d31 100644
--- a/source/blender/render/intern/render_result.h
+++ b/source/blender/render/intern/render_result.h
@@ -136,10 +136,11 @@ void render_result_views_shallowdelete(struct RenderResult *rr);
{ \
int nr_; \
ViewLayer *iter_; \
- for (nr_ = 0, iter_ = static_cast<ViewLayer *>((re_)->view_layers.first); iter_ != NULL; \
+ for (nr_ = 0, iter_ = static_cast<ViewLayer *>((re_)->scene->view_layers.first); \
+ iter_ != NULL; \
iter_ = iter_->next, nr_++) { \
if (!G.background && (re_)->r.scemode & R_SINGLE_LAYER) { \
- if (nr_ != re->active_view_layer) { \
+ if (!STREQ(iter_->name, re->single_view_layer)) { \
continue; \
} \
} \
diff --git a/source/blender/render/intern/render_types.h b/source/blender/render/intern/render_types.h
index 29bac6e2766..418acbca3b1 100644
--- a/source/blender/render/intern/render_types.h
+++ b/source/blender/render/intern/render_types.h
@@ -39,7 +39,8 @@ struct Render {
int slot;
/* state settings */
- short flag, ok, result_ok;
+ short flag;
+ bool ok, result_ok;
/* result of rendering */
RenderResult *result;
@@ -76,8 +77,7 @@ struct Render {
struct Main *main;
Scene *scene;
RenderData r;
- ListBase view_layers;
- int active_view_layer;
+ char single_view_layer[MAX_NAME];
struct Object *camera_override;
ThreadMutex highlighted_tiles_mutex;
@@ -108,7 +108,7 @@ struct Render {
void (*draw_lock)(void *handle, bool lock);
void *dlh;
- int (*test_break)(void *handle);
+ bool (*test_break)(void *handle);
void *tbh;
RenderStats i;
diff --git a/source/blender/render/intern/texture_pointdensity.c b/source/blender/render/intern/texture_pointdensity.c
index 2a2b62be1f0..5c31192f62a 100644
--- a/source/blender/render/intern/texture_pointdensity.c
+++ b/source/blender/render/intern/texture_pointdensity.c
@@ -174,8 +174,8 @@ static void pointdensity_cache_psys(
sim.psys = psys;
sim.psmd = psys_get_modifier(ob, psys);
- /* in case ob->imat isn't up-to-date */
- invert_m4_m4(ob->imat, ob->obmat);
+ /* in case ob->world_to_object isn't up-to-date */
+ invert_m4_m4(ob->world_to_object, ob->object_to_world);
total_particles = psys->totpart + psys->totchild;
psys->lattice_deform_data = psys_create_lattice_deform_data(&sim);
@@ -235,7 +235,7 @@ static void pointdensity_cache_psys(
copy_v3_v3(partco, state.co);
if (pd->psys_cache_space == TEX_PD_OBJECTSPACE) {
- mul_m4_v3(ob->imat, partco);
+ mul_m4_v3(ob->world_to_object, partco);
}
else if (pd->psys_cache_space == TEX_PD_OBJECTLOC) {
sub_v3_v3(partco, ob->loc);
@@ -399,12 +399,12 @@ static void pointdensity_cache_object(PointDensity *pd, Object *ob)
case TEX_PD_OBJECTSPACE:
break;
case TEX_PD_OBJECTLOC:
- mul_m4_v3(ob->obmat, co);
+ mul_m4_v3(ob->object_to_world, co);
sub_v3_v3(co, ob->loc);
break;
case TEX_PD_WORLDSPACE:
default:
- mul_m4_v3(ob->obmat, co);
+ mul_m4_v3(ob->object_to_world, co);
break;
}
@@ -778,7 +778,7 @@ static void particle_system_minmax(Depsgraph *depsgraph,
sim.psys = psys;
sim.psmd = psys_get_modifier(object, psys);
- invert_m4_m4(imat, object->obmat);
+ invert_m4_m4(imat, object->object_to_world);
total_particles = psys->totpart + psys->totchild;
psys->lattice_deform_data = psys_create_lattice_deform_data(&sim);
diff --git a/source/blender/sequencer/SEQ_proxy.h b/source/blender/sequencer/SEQ_proxy.h
index 00747f4b9cf..caf123afbcf 100644
--- a/source/blender/sequencer/SEQ_proxy.h
+++ b/source/blender/sequencer/SEQ_proxy.h
@@ -29,8 +29,8 @@ bool SEQ_proxy_rebuild_context(struct Main *bmain,
struct ListBase *queue,
bool build_only_on_bad_performance);
void SEQ_proxy_rebuild(struct SeqIndexBuildContext *context,
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress);
void SEQ_proxy_rebuild_finish(struct SeqIndexBuildContext *context, bool stop);
void SEQ_proxy_set(struct Sequence *seq, bool value);
diff --git a/source/blender/sequencer/SEQ_render.h b/source/blender/sequencer/SEQ_render.h
index 9c163de4230..e2672eef8b9 100644
--- a/source/blender/sequencer/SEQ_render.h
+++ b/source/blender/sequencer/SEQ_render.h
@@ -66,8 +66,8 @@ void SEQ_render_thumbnails(const struct SeqRenderData *context,
struct Sequence *seq,
struct Sequence *seq_orig,
float frame_step,
- rctf *view_area,
- const short *stop);
+ const struct rctf *view_area,
+ const bool *stop);
/**
* Get cached thumbnails.
*/
@@ -82,7 +82,7 @@ struct ImBuf *SEQ_get_thumbnail(const struct SeqRenderData *context,
float SEQ_render_thumbnail_first_frame_get(const struct Scene *scene,
struct Sequence *seq,
float frame_step,
- struct rctf *view_area);
+ const struct rctf *view_area);
/**
* Get frame for first thumbnail.
*/
@@ -102,8 +102,8 @@ int SEQ_render_thumbnails_guaranteed_set_frame_step_get(const struct Scene *scen
void SEQ_render_thumbnails_base_set(const struct SeqRenderData *context,
struct Sequence *seq,
struct Sequence *seq_orig,
- rctf *view_area,
- const short *stop);
+ const struct rctf *view_area,
+ const bool *stop);
void SEQ_render_init_colorspace(struct Sequence *seq);
void SEQ_render_new_render_data(struct Main *bmain,
diff --git a/source/blender/sequencer/intern/image_cache.c b/source/blender/sequencer/intern/image_cache.c
index 87da2017296..21ce2cbdf9a 100644
--- a/source/blender/sequencer/intern/image_cache.c
+++ b/source/blender/sequencer/intern/image_cache.c
@@ -811,8 +811,11 @@ bool seq_cache_put_if_possible(
return false;
}
-void seq_cache_thumbnail_put(
- const SeqRenderData *context, Sequence *seq, float timeline_frame, ImBuf *i, rctf *view_area)
+void seq_cache_thumbnail_put(const SeqRenderData *context,
+ Sequence *seq,
+ float timeline_frame,
+ ImBuf *i,
+ const rctf *view_area)
{
Scene *scene = context->scene;
diff --git a/source/blender/sequencer/intern/image_cache.h b/source/blender/sequencer/intern/image_cache.h
index a7ae130dc41..7b7e020c926 100644
--- a/source/blender/sequencer/intern/image_cache.h
+++ b/source/blender/sequencer/intern/image_cache.h
@@ -48,7 +48,7 @@ void seq_cache_thumbnail_put(const struct SeqRenderData *context,
struct Sequence *seq,
float timeline_frame,
struct ImBuf *i,
- rctf *view_area);
+ const struct rctf *view_area);
bool seq_cache_put_if_possible(const struct SeqRenderData *context,
struct Sequence *seq,
float timeline_frame,
diff --git a/source/blender/sequencer/intern/proxy.c b/source/blender/sequencer/intern/proxy.c
index fc1df4dc3ac..eaea310f423 100644
--- a/source/blender/sequencer/intern/proxy.c
+++ b/source/blender/sequencer/intern/proxy.c
@@ -479,10 +479,7 @@ bool SEQ_proxy_rebuild_context(Main *bmain,
return true;
}
-void SEQ_proxy_rebuild(SeqIndexBuildContext *context,
- short *stop,
- short *do_update,
- float *progress)
+void SEQ_proxy_rebuild(SeqIndexBuildContext *context, bool *stop, bool *do_update, float *progress)
{
const bool overwrite = context->overwrite;
SeqRenderData render_context;
diff --git a/source/blender/sequencer/intern/proxy_job.c b/source/blender/sequencer/intern/proxy_job.c
index 8520c06f9a2..d7dfe0130d8 100644
--- a/source/blender/sequencer/intern/proxy_job.c
+++ b/source/blender/sequencer/intern/proxy_job.c
@@ -41,7 +41,7 @@ static void proxy_freejob(void *pjv)
}
/* Only this runs inside thread. */
-static void proxy_startjob(void *pjv, short *stop, short *do_update, float *progress)
+static void proxy_startjob(void *pjv, bool *stop, bool *do_update, float *progress)
{
ProxyJob *pj = pjv;
LinkData *link;
@@ -52,7 +52,7 @@ static void proxy_startjob(void *pjv, short *stop, short *do_update, float *prog
SEQ_proxy_rebuild(context, stop, do_update, progress);
if (*stop) {
- pj->stop = 1;
+ pj->stop = true;
fprintf(stderr, "Canceling proxy rebuild on users request...\n");
break;
}
diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c
index e3fd9216842..5c6a59a5943 100644
--- a/source/blender/sequencer/intern/render.c
+++ b/source/blender/sequencer/intern/render.c
@@ -2010,7 +2010,7 @@ ImBuf *SEQ_render_give_ibuf_direct(const SeqRenderData *context,
float SEQ_render_thumbnail_first_frame_get(const Scene *scene,
Sequence *seq,
float frame_step,
- rctf *view_area)
+ const rctf *view_area)
{
int first_drawable_frame = max_iii(
SEQ_time_left_handle_frame_get(scene, seq), seq->start, view_area->xmin);
@@ -2102,8 +2102,8 @@ void SEQ_render_thumbnails(const SeqRenderData *context,
Sequence *seq,
Sequence *seq_orig,
float frame_step,
- rctf *view_area,
- const short *stop)
+ const rctf *view_area,
+ const bool *stop)
{
SeqRenderState state;
seq_render_state_init(&state);
@@ -2163,8 +2163,8 @@ int SEQ_render_thumbnails_guaranteed_set_frame_step_get(const Scene *scene, cons
void SEQ_render_thumbnails_base_set(const SeqRenderData *context,
Sequence *seq,
Sequence *seq_orig,
- rctf *view_area,
- const short *stop)
+ const rctf *view_area,
+ const bool *stop)
{
SeqRenderState state;
seq_render_state_init(&state);
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 1f9de8040f6..329e22c156a 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -341,6 +341,18 @@ void WM_cursor_warp(struct wmWindow *win, int x, int y);
/* Handlers. */
+typedef enum eWM_EventHandlerFlag {
+ /** After this handler all others are ignored. */
+ WM_HANDLER_BLOCKING = (1 << 0),
+ /** Handler accepts double key press events. */
+ WM_HANDLER_ACCEPT_DBL_CLICK = (1 << 1),
+
+ /* Internal. */
+ /** Handler tagged to be freed in #wm_handlers_do(). */
+ WM_HANDLER_DO_FREE = (1 << 7),
+} eWM_EventHandlerFlag;
+ENUM_OPERATORS(eWM_EventHandlerFlag, WM_HANDLER_DO_FREE)
+
typedef bool (*EventHandlerPoll)(const ARegion *region, const struct wmEvent *event);
struct wmEventHandler_Keymap *WM_event_add_keymap_handler(ListBase *handlers, wmKeyMap *keymap);
struct wmEventHandler_Keymap *WM_event_add_keymap_handler_poll(ListBase *handlers,
@@ -407,7 +419,7 @@ struct wmEventHandler_UI *WM_event_add_ui_handler(const struct bContext *C,
wmUIHandlerFunc handle_fn,
wmUIHandlerRemoveFunc remove_fn,
void *user_data,
- char flag);
+ eWM_EventHandlerFlag flag);
/**
* Return the first modal operator of type \a ot or NULL.
@@ -450,15 +462,6 @@ void WM_event_modal_handler_region_replace(wmWindow *win,
*/
void WM_event_remove_handlers(struct bContext *C, ListBase *handlers);
-/* handler flag */
-enum {
- WM_HANDLER_BLOCKING = (1 << 0), /* after this handler all others are ignored */
- WM_HANDLER_ACCEPT_DBL_CLICK = (1 << 1), /* handler accepts double key press events */
-
- /* internal */
- WM_HANDLER_DO_FREE = (1 << 7), /* handler tagged to be freed in wm_handlers_do() */
-};
-
struct wmEventHandler_Dropbox *WM_event_add_dropbox_handler(ListBase *handlers,
ListBase *dropboxes);
@@ -1355,17 +1358,18 @@ void wmOrtho2_pixelspace(float x, float y);
void wmGetProjectionMatrix(float mat[4][4], const struct rcti *winrct);
/* threaded Jobs Manager */
-enum {
+typedef enum eWM_JobFlag {
WM_JOB_PRIORITY = (1 << 0),
WM_JOB_EXCL_RENDER = (1 << 1),
WM_JOB_PROGRESS = (1 << 2),
-};
+} eWM_JobFlag;
+ENUM_OPERATORS(enum eWM_JobFlag, WM_JOB_PROGRESS);
/**
* Identifying jobs by owner alone is unreliable, this isn't saved,
* order can change (keep 0 for 'any').
*/
-enum {
+typedef enum eWM_JobType {
WM_JOB_TYPE_ANY = 0,
WM_JOB_TYPE_COMPOSITE,
WM_JOB_TYPE_RENDER,
@@ -1397,7 +1401,7 @@ enum {
WM_JOB_TYPE_SEQ_DRAG_DROP_PREVIEW,
/* add as needed, bake, seq proxy build
* if having hard coded values is a problem */
-};
+} eWM_JobType;
/**
* \return current job or adds new job, but doesn't run it.
@@ -1409,8 +1413,8 @@ struct wmJob *WM_jobs_get(struct wmWindowManager *wm,
struct wmWindow *win,
const void *owner,
const char *name,
- int flag,
- int job_type);
+ eWM_JobFlag flag,
+ eWM_JobType job_type);
/**
* Returns true if job runs, for UI (progress) indicators.
@@ -1432,8 +1436,8 @@ void WM_jobs_timer(struct wmJob *, double timestep, unsigned int note, unsigned
void WM_jobs_delay_start(struct wmJob *, double delay_time);
typedef void (*wm_jobs_start_callback)(void *custom_data,
- short *stop,
- short *do_update,
+ bool *stop,
+ bool *do_update,
float *progress);
void WM_jobs_callbacks(struct wmJob *,
wm_jobs_start_callback startjob,
@@ -1463,7 +1467,7 @@ void WM_jobs_stop(struct wmWindowManager *wm, const void *owner, void *startjob)
*/
void WM_jobs_kill(struct wmWindowManager *wm,
void *owner,
- void (*)(void *, short int *, short int *, float *));
+ void (*)(void *, bool *, bool *, float *));
/**
* Wait until every job ended.
*/
diff --git a/source/blender/windowmanager/intern/wm_event_system.cc b/source/blender/windowmanager/intern/wm_event_system.cc
index 181ec89cabd..c84df617f98 100644
--- a/source/blender/windowmanager/intern/wm_event_system.cc
+++ b/source/blender/windowmanager/intern/wm_event_system.cc
@@ -4535,7 +4535,7 @@ wmEventHandler_UI *WM_event_add_ui_handler(const bContext *C,
wmUIHandlerFunc handle_fn,
wmUIHandlerRemoveFunc remove_fn,
void *user_data,
- const char flag)
+ const eWM_EventHandlerFlag flag)
{
wmEventHandler_UI *handler = MEM_cnew<wmEventHandler_UI>(__func__);
handler->head.type = WM_HANDLER_TYPE_UI;
diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c
index 5360f327a0a..fcfc83312b8 100644
--- a/source/blender/windowmanager/intern/wm_jobs.c
+++ b/source/blender/windowmanager/intern/wm_jobs.c
@@ -108,8 +108,10 @@ struct wmJob {
/* internal */
const void *owner;
- int flag;
- short suspended, running, ready, do_update, stop, job_type;
+ eWM_JobFlag flag;
+ bool suspended, running, ready;
+ eWM_JobType job_type;
+ bool do_update, stop;
float progress;
/** For display in header, identification */
@@ -152,9 +154,9 @@ static void wm_job_main_thread_yield(wmJob *wm_job)
/**
* Finds if type or owner, compare for it, otherwise any matching job.
*/
-static wmJob *wm_job_find(const wmWindowManager *wm, const void *owner, const int job_type)
+static wmJob *wm_job_find(const wmWindowManager *wm, const void *owner, const eWM_JobType job_type)
{
- if (owner && job_type) {
+ if (owner && (job_type != WM_JOB_TYPE_ANY)) {
LISTBASE_FOREACH (wmJob *, wm_job, &wm->jobs) {
if (wm_job->owner == owner && wm_job->job_type == job_type) {
return wm_job;
@@ -168,7 +170,7 @@ static wmJob *wm_job_find(const wmWindowManager *wm, const void *owner, const in
}
}
}
- else if (job_type) {
+ else if (job_type != WM_JOB_TYPE_ANY) {
LISTBASE_FOREACH (wmJob *, wm_job, &wm->jobs) {
if (wm_job->job_type == job_type) {
return wm_job;
@@ -185,8 +187,8 @@ wmJob *WM_jobs_get(wmWindowManager *wm,
wmWindow *win,
const void *owner,
const char *name,
- int flag,
- int job_type)
+ const eWM_JobFlag flag,
+ const eWM_JobType job_type)
{
wmJob *wm_job = wm_job_find(wm, owner, job_type);
@@ -593,7 +595,7 @@ void WM_jobs_stop(wmWindowManager *wm, const void *owner, void *startjob)
void WM_jobs_kill(wmWindowManager *wm,
void *owner,
- void (*startjob)(void *, short int *, short int *, float *))
+ void (*startjob)(void *, bool *, bool *, float *))
{
LISTBASE_FOREACH_MUTABLE (wmJob *, wm_job, &wm->jobs) {
if (wm_job->owner == owner || wm_job->startjob == startjob) {
diff --git a/source/blender/windowmanager/wm_event_system.h b/source/blender/windowmanager/wm_event_system.h
index edbfe0202de..f49be20e174 100644
--- a/source/blender/windowmanager/wm_event_system.h
+++ b/source/blender/windowmanager/wm_event_system.h
@@ -29,21 +29,21 @@ extern "C" {
/* wmKeyMap is in DNA_windowmanager.h, it's saveable */
/** Custom types for handlers, for signaling, freeing */
-enum eWM_EventHandlerType {
+typedef enum eWM_EventHandlerType {
WM_HANDLER_TYPE_GIZMO = 1,
WM_HANDLER_TYPE_UI,
WM_HANDLER_TYPE_OP,
WM_HANDLER_TYPE_DROPBOX,
WM_HANDLER_TYPE_KEYMAP,
-};
+} eWM_EventHandlerType;
typedef bool (*EventHandlerPoll)(const ARegion *region, const wmEvent *event);
typedef struct wmEventHandler {
struct wmEventHandler *next, *prev;
- enum eWM_EventHandlerType type;
- char flag; /* WM_HANDLER_BLOCKING, ... */
+ eWM_EventHandlerType type;
+ eWM_EventHandlerFlag flag;
EventHandlerPoll poll;
} wmEventHandler;
diff --git a/source/blender/windowmanager/xr/intern/wm_xr_session.c b/source/blender/windowmanager/xr/intern/wm_xr_session.c
index abc41833de6..aefc3afff66 100644
--- a/source/blender/windowmanager/xr/intern/wm_xr_session.c
+++ b/source/blender/windowmanager/xr/intern/wm_xr_session.c
@@ -178,7 +178,7 @@ static void wm_xr_session_base_pose_calc(const Scene *scene,
float tmp_quat[4];
float tmp_eul[3];
- mat4_to_loc_quat(r_base_pose->position, tmp_quat, base_pose_object->obmat);
+ mat4_to_loc_quat(r_base_pose->position, tmp_quat, base_pose_object->object_to_world);
/* Only use rotation around Z-axis to align view with floor. */
quat_to_eul(tmp_eul, tmp_quat);
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c
index ba905f91f97..2ebdcdb35ba 100644
--- a/source/creator/creator_args.c
+++ b/source/creator/creator_args.c
@@ -1122,7 +1122,7 @@ static const char arg_handle_gpu_backend_set_doc[] =
# ifdef WITH_METAL_BACKEND
"'metal', "
# endif
- "'opengl').";
+ "'opengl'.";
static int arg_handle_gpu_backend_set(int argc, const char **argv, void *UNUSED(data))
{
if (argc == 0) {
diff --git a/source/tools b/source/tools
-Subproject 2a541f164a222ef7bcd036d37687738acee8d94
+Subproject dfa16042bf7149475ad318d29a8202d969982ab
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 68fcfc89b96..9f634af7143 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -20,9 +20,9 @@ else()
endif()
endif()
-# The installation directory's Python is the best one to use. However, it can only be there after the install step,
-# which means that Python will never be there on a fresh system. To suit different needs, the user can pass
-# -DTEST_PYTHON_EXE=/path/to/python to CMake.
+# The installation directory's Python is the best one to use. However, it can only be there
+# after the install step, # which means that Python will never be there on a fresh system.
+# To suit different needs, the user can pass `-DTEST_PYTHON_EXE=/path/to/python` to CMake.
if(NOT TEST_PYTHON_EXE)
set(TEST_PYTHON_EXE ${PYTHON_EXECUTABLE})
message(STATUS "Tests: Using Python executable: ${TEST_PYTHON_EXE}")
@@ -31,6 +31,19 @@ elseif(NOT EXISTS ${TEST_PYTHON_EXE})
endif()
+# Include these arguments before all others, they must not interfere with Python execution.
+set(TEST_PYTHON_EXE_EXTRA_ARGS)
+
+# Check if this a Blender managed Python installation, if so, don't add `*.pyc` files.
+if(LIBDIR)
+ path_is_prefix(LIBDIR TEST_PYTHON_EXE _is_prefix)
+ if(_is_prefix)
+ # Keep the Python in Blender's SVN LIBDIR pristine, to avoid conflicts on updating.
+ set(TEST_PYTHON_EXE_EXTRA_ARGS "-B")
+ endif()
+ unset(_is_prefix)
+endif()
+
# For testing with Valgrind
# set(TEST_BLENDER_EXE valgrind --track-origins=yes --error-limit=no ${TEST_BLENDER_EXE})
diff --git a/tests/blender_as_python_module/CMakeLists.txt b/tests/blender_as_python_module/CMakeLists.txt
index 6e0ce524903..7387d5c41bf 100644
--- a/tests/blender_as_python_module/CMakeLists.txt
+++ b/tests/blender_as_python_module/CMakeLists.txt
@@ -8,7 +8,7 @@ function(add_blender_as_python_module_test testname testscript)
add_test(
NAME ${testname}
- COMMAND ${TEST_PYTHON_EXE} ${testscript} ${ARGN}
+ COMMAND ${TEST_PYTHON_EXE} ${TEST_PYTHON_EXE_EXTRA_ARGS} ${testscript} ${ARGN}
)
# On macOS, asan library must be loaded early.
diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt
index b3decc06161..0d74cfafda5 100644
--- a/tests/python/CMakeLists.txt
+++ b/tests/python/CMakeLists.txt
@@ -41,7 +41,7 @@ function(add_python_test testname testscript)
add_test(
NAME ${testname}
- COMMAND ${TEST_PYTHON_EXE} ${testscript} ${ARGN}
+ COMMAND ${TEST_PYTHON_EXE} ${TEST_PYTHON_EXE_EXTRA_ARGS} ${testscript} ${ARGN}
)
set_tests_properties(${testname} PROPERTIES ENVIRONMENT
LSAN_OPTIONS=exitcode=0:$ENV{LSAN_OPTIONS}