Merge branch 'master' into refactor-mesh-selection-generic

This commit is contained in:
Hans Goudey 2022-08-29 15:18:47 -05:00
commit 151d3e54d6
150 changed files with 2010 additions and 1638 deletions

View File

@ -435,10 +435,16 @@ if(NOT APPLE)
option(WITH_CYCLES_CUBIN_COMPILER "Build cubins with nvrtc based compiler instead of nvcc" OFF)
option(WITH_CYCLES_CUDA_BUILD_SERIAL "Build cubins one after another (useful on machines with limited RAM)" OFF)
option(WITH_CUDA_DYNLOAD "Dynamically load CUDA libraries at runtime (for developers, makes cuda-gdb work)" ON)
set(OPTIX_ROOT_DIR "" CACHE PATH "Path to the OptiX SDK root directory, for building Cycles OptiX kernels.")
set(CYCLES_RUNTIME_OPTIX_ROOT_DIR "" CACHE PATH "Path to the OptiX SDK root directory. When set, this path will be used at runtime to compile OptiX kernels.")
mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH)
mark_as_advanced(WITH_CYCLES_CUBIN_COMPILER)
mark_as_advanced(WITH_CYCLES_CUDA_BUILD_SERIAL)
mark_as_advanced(WITH_CUDA_DYNLOAD)
mark_as_advanced(OPTIX_ROOT_DIR)
mark_as_advanced(CYCLES_RUNTIME_OPTIX_ROOT_DIR)
endif()
# AMD HIP

View File

@ -653,46 +653,92 @@ endif()
if(WITH_GHOST_WAYLAND)
find_package(PkgConfig)
pkg_check_modules(wayland-client REQUIRED wayland-client>=1.12)
pkg_check_modules(wayland-egl REQUIRED wayland-egl)
pkg_check_modules(wayland-scanner REQUIRED wayland-scanner)
pkg_check_modules(xkbcommon REQUIRED xkbcommon)
pkg_check_modules(wayland-cursor REQUIRED wayland-cursor)
pkg_check_modules(wayland-client wayland-client>=1.12)
pkg_check_modules(wayland-egl wayland-egl)
pkg_check_modules(wayland-scanner wayland-scanner)
pkg_check_modules(xkbcommon xkbcommon)
pkg_check_modules(wayland-cursor wayland-cursor)
pkg_check_modules(wayland-protocols wayland-protocols>=1.15)
if(WITH_GHOST_WAYLAND_DBUS)
pkg_check_modules(dbus REQUIRED dbus-1)
endif()
if(WITH_GHOST_WAYLAND_LIBDECOR)
pkg_check_modules(libdecor REQUIRED libdecor-0>=0.1)
endif()
list(APPEND PLATFORM_LINKLIBS
${xkbcommon_LINK_LIBRARIES}
)
if(NOT WITH_GHOST_WAYLAND_DYNLOAD)
list(APPEND PLATFORM_LINKLIBS
${wayland-client_LINK_LIBRARIES}
${wayland-egl_LINK_LIBRARIES}
${wayland-cursor_LINK_LIBRARIES}
if(${wayland-protocols_FOUND})
pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
else()
# CentOS 7 packages have too old a version, a newer version exist in the
# precompiled libraries.
find_path(WAYLAND_PROTOCOLS_DIR
NAMES unstable/xdg-decoration/xdg-decoration-unstable-v1.xml
PATH_SUFFIXES share/wayland-protocols
PATHS ${LIBDIR}/wayland-protocols
)
if(EXISTS ${WAYLAND_PROTOCOLS_DIR})
set(wayland-protocols_FOUND ON)
endif()
endif()
if(WITH_GHOST_WAYLAND_DBUS)
if (NOT ${wayland-client_FOUND})
message(STATUS "wayland-client not found, disabling WITH_GHOST_WAYLAND")
set(WITH_GHOST_WAYLAND OFF)
endif()
if (NOT ${wayland-egl_FOUND})
message(STATUS "wayland-egl not found, disabling WITH_GHOST_WAYLAND")
set(WITH_GHOST_WAYLAND OFF)
endif()
if (NOT ${wayland-scanner_FOUND})
message(STATUS "wayland-scanner not found, disabling WITH_GHOST_WAYLAND")
set(WITH_GHOST_WAYLAND OFF)
endif()
if (NOT ${wayland-cursor_FOUND})
message(STATUS "wayland-cursor not found, disabling WITH_GHOST_WAYLAND")
set(WITH_GHOST_WAYLAND OFF)
endif()
if (NOT ${wayland-protocols_FOUND})
message(STATUS "wayland-protocols not found, disabling WITH_GHOST_WAYLAND")
set(WITH_GHOST_WAYLAND OFF)
endif()
if (NOT ${xkbcommon_FOUND})
message(STATUS "xkbcommon not found, disabling WITH_GHOST_WAYLAND")
set(WITH_GHOST_WAYLAND OFF)
endif()
if(WITH_GHOST_WAYLAND)
if(WITH_GHOST_WAYLAND_DBUS)
pkg_check_modules(dbus REQUIRED dbus-1)
endif()
if(WITH_GHOST_WAYLAND_LIBDECOR)
pkg_check_modules(libdecor REQUIRED libdecor-0>=0.1)
endif()
list(APPEND PLATFORM_LINKLIBS
${dbus_LINK_LIBRARIES}
${xkbcommon_LINK_LIBRARIES}
)
add_definitions(-DWITH_GHOST_WAYLAND_DBUS)
endif()
if(WITH_GHOST_WAYLAND_LIBDECOR)
if(NOT WITH_GHOST_WAYLAND_DYNLOAD)
list(APPEND PLATFORM_LINKLIBS
${libdecor_LIBRARIES}
${wayland-client_LINK_LIBRARIES}
${wayland-egl_LINK_LIBRARIES}
${wayland-cursor_LINK_LIBRARIES}
)
endif()
add_definitions(-DWITH_GHOST_WAYLAND_LIBDECOR)
if(WITH_GHOST_WAYLAND_DBUS)
list(APPEND PLATFORM_LINKLIBS
${dbus_LINK_LIBRARIES}
)
add_definitions(-DWITH_GHOST_WAYLAND_DBUS)
endif()
if(WITH_GHOST_WAYLAND_LIBDECOR)
if(NOT WITH_GHOST_WAYLAND_DYNLOAD)
list(APPEND PLATFORM_LINKLIBS
${libdecor_LIBRARIES}
)
endif()
add_definitions(-DWITH_GHOST_WAYLAND_LIBDECOR)
endif()
pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner)
endif()
endif()

View File

@ -9,6 +9,7 @@ set(INC
../../../source/blender/makesrna
../../../source/blender/blenlib
../../../source/blender/gpu
../../../source/blender/render
${CMAKE_BINARY_DIR}/source/blender/makesrna/intern
)

View File

@ -1559,7 +1559,7 @@ class CyclesPreferences(bpy.types.AddonPreferences):
import sys
col.label(text="Requires Intel GPU with Xe-HPG architecture", icon='BLANK1')
if sys.platform.startswith("win"):
col.label(text="and Windows driver version 101.1660 or newer", icon='BLANK1')
col.label(text="and Windows driver version 101.3259 or newer", icon='BLANK1')
elif sys.platform.startswith("linux"):
col.label(text="and Linux driver version xx.xx.23570 or newer", icon='BLANK1')
elif device_type == 'METAL':

View File

@ -305,6 +305,7 @@ class CYCLES_RENDER_PT_sampling_advanced(CyclesButtonsPanel, Panel):
layout.separator()
heading = layout.column(align=True, heading="Scrambling Distance")
heading.active = not cscene.sampling_pattern == 'SOBOL_BURLEY'
heading.prop(cscene, "auto_scrambling_distance", text="Automatic")
heading.prop(cscene, "preview_scrambling_distance", text="Viewport")
heading.prop(cscene, "scrambling_distance", text="Multiplier")

View File

@ -9,21 +9,7 @@
#include "GPU_platform.h"
extern "C" {
struct RenderEngine;
bool RE_engine_has_render_context(struct RenderEngine *engine);
void RE_engine_render_context_enable(struct RenderEngine *engine);
void RE_engine_render_context_disable(struct RenderEngine *engine);
bool DRW_opengl_context_release();
void DRW_opengl_context_activate(bool drw_state);
void *WM_opengl_context_create();
void WM_opengl_context_activate(void *gl_context);
void WM_opengl_context_dispose(void *gl_context);
void WM_opengl_context_release(void *context);
}
#include "RE_engine.h"
CCL_NAMESPACE_BEGIN
@ -559,18 +545,21 @@ struct BlenderDisplayDriver::Tiles {
}
};
BlenderDisplayDriver::BlenderDisplayDriver(BL::RenderEngine &b_engine, BL::Scene &b_scene)
BlenderDisplayDriver::BlenderDisplayDriver(BL::RenderEngine &b_engine,
BL::Scene &b_scene,
const bool background)
: b_engine_(b_engine),
background_(background),
display_shader_(BlenderDisplayShader::create(b_engine, b_scene)),
tiles_(make_unique<Tiles>())
{
/* Create context while on the main thread. */
gl_context_create();
gpu_context_create();
}
BlenderDisplayDriver::~BlenderDisplayDriver()
{
gl_resources_destroy();
gpu_resources_destroy();
}
/* --------------------------------------------------------------------
@ -601,12 +590,12 @@ bool BlenderDisplayDriver::update_begin(const Params &params,
/* Note that it's the responsibility of BlenderDisplayDriver to ensure updating and drawing
* the texture does not happen at the same time. This is achieved indirectly.
*
* When enabling the OpenGL context, it uses an internal mutex lock DST.gl_context_lock.
* When enabling the OpenGL context, it uses an internal mutex lock DST.gpu_context_lock.
* This same lock is also held when do_draw() is called, which together ensure mutual
* exclusion.
*
* This locking is not performed on the Cycles side, because that would cause lock inversion. */
if (!gl_context_enable()) {
if (!gpu_context_enable()) {
return false;
}
@ -627,13 +616,13 @@ bool BlenderDisplayDriver::update_begin(const Params &params,
if (!tiles_->gl_resources_ensure()) {
tiles_->gl_resources_destroy();
gl_context_disable();
gpu_context_disable();
return false;
}
if (!tiles_->current_tile.gl_resources_ensure()) {
tiles_->current_tile.gl_resources_destroy();
gl_context_disable();
gpu_context_disable();
return false;
}
@ -712,7 +701,7 @@ void BlenderDisplayDriver::update_end()
* On some older GPUs on macOS, there is a driver crash when updating the texture for viewport
* renders while Blender is drawing. As a workaround update texture during draw, under assumption
* that there is no graphics interop on macOS and viewport render has a single tile. */
if (use_gl_context_ &&
if (!background_ &&
GPU_type_matches_ex(GPU_DEVICE_NVIDIA, GPU_OS_MAC, GPU_DRIVER_ANY, GPU_BACKEND_ANY)) {
tiles_->current_tile.need_update_texture_pixels = true;
}
@ -723,7 +712,7 @@ void BlenderDisplayDriver::update_end()
gl_upload_sync_ = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
glFlush();
gl_context_disable();
gpu_context_disable();
}
/* --------------------------------------------------------------------
@ -771,12 +760,12 @@ BlenderDisplayDriver::GraphicsInterop BlenderDisplayDriver::graphics_interop_get
void BlenderDisplayDriver::graphics_interop_activate()
{
gl_context_enable();
gpu_context_enable();
}
void BlenderDisplayDriver::graphics_interop_deactivate()
{
gl_context_disable();
gpu_context_disable();
}
/* --------------------------------------------------------------------
@ -910,7 +899,7 @@ void BlenderDisplayDriver::flush()
* If we don't do this, the NVIDIA driver hangs for a few seconds for when ending 3D viewport
* rendering, for unknown reasons. This was found with NVIDIA driver version 470.73 and a Quadro
* RTX 6000 on Linux. */
if (!gl_context_enable()) {
if (!gpu_context_enable()) {
return;
}
@ -922,15 +911,12 @@ void BlenderDisplayDriver::flush()
glWaitSync((GLsync)gl_render_sync_, 0, GL_TIMEOUT_IGNORED);
}
gl_context_disable();
gpu_context_disable();
}
void BlenderDisplayDriver::draw(const Params &params)
{
/* See do_update_begin() for why no locking is required here. */
if (use_gl_context_) {
gl_context_mutex_.lock();
}
gpu_context_lock();
if (need_clear_) {
/* Texture is requested to be cleared and was not yet cleared.
@ -938,9 +924,7 @@ void BlenderDisplayDriver::draw(const Params &params)
* Do early return which should be equivalent of drawing all-zero texture.
* Watch out for the lock though so that the clear happening during update is properly
* synchronized here. */
if (use_gl_context_) {
gl_context_mutex_.unlock();
}
gpu_context_unlock();
return;
}
@ -996,94 +980,55 @@ void BlenderDisplayDriver::draw(const Params &params)
gl_render_sync_ = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
glFlush();
gpu_context_unlock();
VLOG_DEVICE_STATS << "Display driver number of textures: " << GLTexture::num_used;
VLOG_DEVICE_STATS << "Display driver number of PBOs: " << GLPixelBufferObject::num_used;
}
if (use_gl_context_) {
gl_context_mutex_.unlock();
void BlenderDisplayDriver::gpu_context_create()
{
if (!RE_engine_gpu_context_create(reinterpret_cast<RenderEngine *>(b_engine_.ptr.data))) {
LOG(ERROR) << "Error creating OpenGL context.";
}
}
void BlenderDisplayDriver::gl_context_create()
bool BlenderDisplayDriver::gpu_context_enable()
{
/* When rendering in viewport there is no render context available via engine.
* Check whether own context is to be created here.
*
* NOTE: If the `b_engine_`'s context is not available, we are expected to be on a main thread
* here. */
use_gl_context_ = !RE_engine_has_render_context(
reinterpret_cast<RenderEngine *>(b_engine_.ptr.data));
if (use_gl_context_) {
const bool drw_state = DRW_opengl_context_release();
gl_context_ = WM_opengl_context_create();
if (gl_context_) {
/* On Windows an old context is restored after creation, and subsequent release of context
* generates a Win32 error. Harmless for users, but annoying to have possible misleading
* error prints in the console. */
#ifndef _WIN32
WM_opengl_context_release(gl_context_);
#endif
}
else {
LOG(ERROR) << "Error creating OpenGL context.";
}
DRW_opengl_context_activate(drw_state);
}
return RE_engine_gpu_context_enable(reinterpret_cast<RenderEngine *>(b_engine_.ptr.data));
}
bool BlenderDisplayDriver::gl_context_enable()
void BlenderDisplayDriver::gpu_context_disable()
{
if (use_gl_context_) {
if (!gl_context_) {
return false;
}
gl_context_mutex_.lock();
WM_opengl_context_activate(gl_context_);
return true;
}
RE_engine_render_context_enable(reinterpret_cast<RenderEngine *>(b_engine_.ptr.data));
return true;
RE_engine_gpu_context_disable(reinterpret_cast<RenderEngine *>(b_engine_.ptr.data));
}
void BlenderDisplayDriver::gl_context_disable()
void BlenderDisplayDriver::gpu_context_destroy()
{
if (use_gl_context_) {
if (gl_context_) {
WM_opengl_context_release(gl_context_);
gl_context_mutex_.unlock();
}
return;
}
RE_engine_render_context_disable(reinterpret_cast<RenderEngine *>(b_engine_.ptr.data));
RE_engine_gpu_context_destroy(reinterpret_cast<RenderEngine *>(b_engine_.ptr.data));
}
void BlenderDisplayDriver::gl_context_dispose()
void BlenderDisplayDriver::gpu_context_lock()
{
if (gl_context_) {
const bool drw_state = DRW_opengl_context_release();
WM_opengl_context_activate(gl_context_);
WM_opengl_context_dispose(gl_context_);
DRW_opengl_context_activate(drw_state);
}
RE_engine_gpu_context_lock(reinterpret_cast<RenderEngine *>(b_engine_.ptr.data));
}
void BlenderDisplayDriver::gl_resources_destroy()
void BlenderDisplayDriver::gpu_context_unlock()
{
gl_context_enable();
RE_engine_gpu_context_unlock(reinterpret_cast<RenderEngine *>(b_engine_.ptr.data));
}
void BlenderDisplayDriver::gpu_resources_destroy()
{
gpu_context_enable();
tiles_->current_tile.gl_resources_destroy();
tiles_->finished_tiles.gl_resources_destroy_and_clear();
tiles_->gl_resources_destroy();
gl_context_disable();
gpu_context_disable();
gl_context_dispose();
gpu_context_destroy();
}
CCL_NAMESPACE_END

View File

@ -89,7 +89,7 @@ class BlenderDisplaySpaceShader : public BlenderDisplayShader {
/* Display driver implementation which is specific for Blender viewport integration. */
class BlenderDisplayDriver : public DisplayDriver {
public:
BlenderDisplayDriver(BL::RenderEngine &b_engine, BL::Scene &b_scene);
BlenderDisplayDriver(BL::RenderEngine &b_engine, BL::Scene &b_scene, const bool background);
~BlenderDisplayDriver();
virtual void graphics_interop_activate() override;
@ -115,23 +115,18 @@ class BlenderDisplayDriver : public DisplayDriver {
virtual void flush() override;
/* Helper function which allocates new GPU context. */
void gl_context_create();
bool gl_context_enable();
void gl_context_disable();
void gl_context_dispose();
void gpu_context_create();
bool gpu_context_enable();
void gpu_context_disable();
void gpu_context_destroy();
void gpu_context_lock();
void gpu_context_unlock();
/* Destroy all GPU resources which are being used by this object. */
void gl_resources_destroy();
void gpu_resources_destroy();
BL::RenderEngine b_engine_;
/* OpenGL context which is used the render engine doesn't have its own. */
void *gl_context_ = nullptr;
/* The when Blender RenderEngine side context is not available and the DisplayDriver is to create
* its own context. */
bool use_gl_context_ = false;
/* Mutex used to guard the `gl_context_`. */
thread_mutex gl_context_mutex_;
bool background_;
/* Content of the display is to be filled with zeroes. */
std::atomic<bool> need_clear_ = true;

View File

@ -1059,8 +1059,8 @@ void BlenderSession::ensure_display_driver_if_needed()
return;
}
unique_ptr<BlenderDisplayDriver> display_driver = make_unique<BlenderDisplayDriver>(b_engine,
b_scene);
unique_ptr<BlenderDisplayDriver> display_driver = make_unique<BlenderDisplayDriver>(
b_engine, b_scene, background);
display_driver_ = display_driver.get();
session->set_display_driver(move(display_driver));
}

View File

@ -385,7 +385,8 @@ void BlenderSync::sync_integrator(BL::ViewLayer &b_view_layer, bool background)
/* Only use scrambling distance in the viewport if user wants to. */
bool preview_scrambling_distance = get_boolean(cscene, "preview_scrambling_distance");
if (preview && !preview_scrambling_distance) {
if ((preview && !preview_scrambling_distance) ||
sampling_pattern == SAMPLING_PATTERN_SOBOL_BURLEY) {
scrambling_distance = 1.0f;
}

View File

@ -19,6 +19,8 @@ if(WITH_CYCLES_DEVICE_OPTIX OR WITH_CYCLES_DEVICE_CUDA)
)
add_definitions(-DCYCLES_CUDA_NVCC_EXECUTABLE="${CUDA_NVCC_EXECUTABLE}")
endif()
add_definitions(-DCYCLES_RUNTIME_OPTIX_ROOT_DIR="${CYCLES_RUNTIME_OPTIX_ROOT_DIR}")
endif()
if(WITH_CYCLES_DEVICE_HIP AND WITH_HIP_DYNLOAD)

View File

@ -342,15 +342,29 @@ BVHLayoutMask OptiXDevice::get_bvh_layout_mask() const
return BVH_LAYOUT_OPTIX;
}
static string get_optix_include_dir()
{
const char *env_dir = getenv("OPTIX_ROOT_DIR");
const char *default_dir = CYCLES_RUNTIME_OPTIX_ROOT_DIR;
if (env_dir && env_dir[0]) {
const string env_include_dir = path_join(env_dir, "include");
return env_include_dir;
}
else if (default_dir[0]) {
const string default_include_dir = path_join(default_dir, "include");
return default_include_dir;
}
return string();
}
string OptiXDevice::compile_kernel_get_common_cflags(const uint kernel_features)
{
string common_cflags = CUDADevice::compile_kernel_get_common_cflags(kernel_features);
/* Add OptiX SDK include directory to include paths. */
const char *optix_sdk_path = getenv("OPTIX_ROOT_DIR");
if (optix_sdk_path) {
common_cflags += string_printf(" -I\"%s/include\"", optix_sdk_path);
}
common_cflags += string_printf(" -I\"%s/include\"", get_optix_include_dir().c_str());
/* Specialization for shader raytracing. */
if (kernel_features & KERNEL_FEATURE_NODE_RAYTRACE) {
@ -460,10 +474,19 @@ bool OptiXDevice::load_kernels(const uint kernel_features)
"lib/kernel_optix_shader_raytrace.ptx" :
"lib/kernel_optix.ptx");
if (use_adaptive_compilation() || path_file_size(ptx_filename) == -1) {
if (!getenv("OPTIX_ROOT_DIR")) {
std::string optix_include_dir = get_optix_include_dir();
if (optix_include_dir.empty()) {
set_error(
"Missing OPTIX_ROOT_DIR environment variable (which must be set with the path to "
"the Optix SDK to be able to compile Optix kernels on demand).");
"Unable to compile OptiX kernels at runtime. Set OPTIX_ROOT_DIR environment variable "
"to a directory containing the OptiX SDK.");
return false;
}
else if (!path_is_directory(optix_include_dir)) {
set_error(string_printf(
"OptiX headers not found at %s, unable to compile OptiX kernels at runtime. Install "
"OptiX SDK in the specified location, or set OPTIX_ROOT_DIR environment variable to a "
"directory containing the OptiX SDK.",
optix_include_dir.c_str()));
return false;
}
ptx_filename = compile_kernel(

View File

@ -21,7 +21,7 @@ set(LIB
)
cycles_external_libraries_append(LIB)
set(INC_HD_CYCLES
set(SRC_HD_CYCLES_HEADERS
attribute.h
camera.h
config.h
@ -75,7 +75,7 @@ endif()
if(EXISTS ${USD_INCLUDE_DIR}/pxr/imaging/hgiGL)
add_definitions(-DWITH_HYDRA_DISPLAY_DRIVER)
list(APPEND SRC_HD_CYCLES display_driver.cpp)
list(APPEND INC_HD_CYCLES display_driver.h)
list(APPEND SRC_HD_CYCLES_HEADERS display_driver.h)
endif()
include_directories(${INC})
@ -83,7 +83,7 @@ include_directories(SYSTEM ${INC_SYS})
add_library(cycles_hydra STATIC
${SRC_HD_CYCLES}
${INC_HD_CYCLES}
${SRC_HD_CYCLES_HEADERS}
)
target_compile_options(cycles_hydra

View File

@ -645,13 +645,9 @@ bool oneapi_enqueue_kernel(KernelContext *kernel_context,
/* Unsupported kernels */
case DEVICE_KERNEL_NUM:
case DEVICE_KERNEL_INTEGRATOR_MEGAKERNEL:
assert(0);
return false;
kernel_assert(0);
break;
}
/* Unknown kernel. */
assert(0);
return false;
});
}
catch (sycl::exception const &e) {
@ -669,7 +665,7 @@ bool oneapi_enqueue_kernel(KernelContext *kernel_context,
return success;
}
static const int lowest_supported_driver_version_win = 1011660;
static const int lowest_supported_driver_version_win = 1013259;
static const int lowest_supported_driver_version_neo = 23570;
static int parse_driver_build_version(const sycl::device &device)

View File

@ -300,24 +300,9 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND)
intern/GHOST_SystemWayland.h
intern/GHOST_WaylandCursorSettings.h
intern/GHOST_WindowWayland.h
intern/GHOST_WaylandUtils.h
)
pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner)
pkg_check_modules(wayland-protocols wayland-protocols>=1.15)
if(${wayland-protocols_FOUND})
pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
else()
find_path(WAYLAND_PROTOCOLS_DIR
NAMES unstable/xdg-decoration/xdg-decoration-unstable-v1.xml
PATH_SUFFIXES share/wayland-protocols
)
endif()
if(NOT EXISTS ${WAYLAND_PROTOCOLS_DIR})
message(FATAL_ERROR "path to wayland-protocols not found")
endif()
set(INC_DST ${CMAKE_CURRENT_BINARY_DIR}/libwayland)
# Generate protocols bindings.

View File

@ -11,8 +11,9 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
// We do not support multiple monitors at the moment
/* We do not support multiple monitors at the moment. */
#define COMPILE_MULTIMON_STUBS
#include <multimon.h>
GHOST_DisplayManagerWin32::GHOST_DisplayManagerWin32(void)
@ -31,16 +32,15 @@ static BOOL get_dd(DWORD d, DISPLAY_DEVICE *dd)
return ::EnumDisplayDevices(NULL, d, dd, 0);
}
/*
* When you call EnumDisplaySettings with iModeNum set to zero, the operating system
* initializes and caches information about the display device. When you call
* EnumDisplaySettings with iModeNum set to a non-zero value, the function returns
* the information that was cached the last time the function was called with iModeNum
* set to zero.
*/
GHOST_TSuccess GHOST_DisplayManagerWin32::getNumDisplaySettings(uint8_t display,
int32_t &numSettings) const
{
/* When you call #EnumDisplaySettings with #iModeNum set to zero, the operating system
* initializes and caches information about the display device.
* When you call #EnumDisplaySettings with #iModeNum set to a non-zero value,
* the function returns the information that was cached the last time the
* function was called with #iModeNum set to zero. */
DISPLAY_DEVICE display_device;
if (!get_dd(display, &display_device))
return GHOST_kFailure;
@ -70,21 +70,20 @@ GHOST_TSuccess GHOST_DisplayManagerWin32::getDisplaySetting(uint8_t display,
dm.dmPelsHeight,
dm.dmBitsPerPel,
dm.dmDisplayFrequency);
#endif // WITH_GHOST_DEBUG
#endif /* WITH_GHOST_DEBUG */
setting.xPixels = dm.dmPelsWidth;
setting.yPixels = dm.dmPelsHeight;
setting.bpp = dm.dmBitsPerPel;
/* When you call the EnumDisplaySettings function, the dmDisplayFrequency member
/* When you call the #EnumDisplaySettings function, the #dmDisplayFrequency member
* may return with the value 0 or 1. These values represent the display hardware's
* default refresh rate. This default rate is typically set by switches on a display
* card or computer motherboard, or by a configuration program that does not use
* Win32 display functions such as ChangeDisplaySettings.
*/
/* First, we tried to explicitly set the frequency to 60 if EnumDisplaySettings
* Win32 display functions such as #ChangeDisplaySettings. */
/* First, we tried to explicitly set the frequency to 60 if #EnumDisplaySettings
* returned 0 or 1 but this doesn't work since later on an exact match will
* be searched. And this will never happen if we change it to 60. Now we rely
* on the default h/w setting.
*/
* on the default hardware setting. */
setting.frequency = dm.dmDisplayFrequency;
success = GHOST_kSuccess;
}
@ -117,22 +116,23 @@ GHOST_TSuccess GHOST_DisplayManagerWin32::setCurrentDisplaySetting(
break;
}
}
/*
* dm.dmBitsPerPel = match.bpp;
* dm.dmPelsWidth = match.xPixels;
* dm.dmPelsHeight = match.yPixels;
* dm.dmDisplayFrequency = match.frequency;
* dm.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY;
* dm.dmSize = sizeof(DEVMODE);
* dm.dmDriverExtra = 0;
*/
#if 0
dm.dmBitsPerPel = match.bpp;
dm.dmPelsWidth = match.xPixels;
dm.dmPelsHeight = match.yPixels;
dm.dmDisplayFrequency = match.frequency;
dm.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY;
dm.dmSize = sizeof(DEVMODE);
dm.dmDriverExtra = 0;
#endif
#ifdef WITH_GHOST_DEBUG
printf("display change: Requested settings:\n");
printf(" dmBitsPerPel=%d\n", dm.dmBitsPerPel);
printf(" dmPelsWidth=%d\n", dm.dmPelsWidth);
printf(" dmPelsHeight=%d\n", dm.dmPelsHeight);
printf(" dmDisplayFrequency=%d\n", dm.dmDisplayFrequency);
#endif // WITH_GHOST_DEBUG
#endif /* WITH_GHOST_DEBUG */
LONG status = ::ChangeDisplaySettings(&dm, CDS_FULLSCREEN);
#ifdef WITH_GHOST_DEBUG
@ -166,6 +166,6 @@ GHOST_TSuccess GHOST_DisplayManagerWin32::setCurrentDisplaySetting(
printf("display change: Return value invalid\n");
break;
}
#endif // WITH_GHOST_DEBUG
#endif /* WITH_GHOST_DEBUG */
return status == DISP_CHANGE_SUCCESSFUL ? GHOST_kSuccess : GHOST_kFailure;
}

View File

@ -13,9 +13,9 @@
#include "utfconv.h"
#ifdef WITH_GHOST_DEBUG
// utility
/* utility */
void printLastError(void);
#endif // WITH_GHOST_DEBUG
#endif /* WITH_GHOST_DEBUG */
GHOST_DropTargetWin32::GHOST_DropTargetWin32(GHOST_WindowWin32 *window, GHOST_SystemWin32 *system)
: m_window(window), m_system(system)
@ -83,7 +83,7 @@ HRESULT __stdcall GHOST_DropTargetWin32::DragEnter(IDataObject *pDataObject,
POINTL pt,
DWORD *pdwEffect)
{
// we accept all drop by default
/* We accept all drop by default. */
m_window->setAcceptDragOperation(true);
*pdwEffect = DROPEFFECT_NONE;
@ -103,7 +103,7 @@ HRESULT __stdcall GHOST_DropTargetWin32::DragOver(DWORD grfKeyState, POINTL pt,
}
else {
*pdwEffect = DROPEFFECT_NONE;
// XXX Uncomment to test drop. Drop will not be called if pdwEffect == DROPEFFECT_NONE.
/* XXX Uncomment to test drop. Drop will not be called if `pdwEffect == DROPEFFECT_NONE`. */
// *pdwEffect = DROPEFFECT_COPY;
}
m_system->pushDragDropEvent(
@ -170,7 +170,7 @@ GHOST_TDragnDropTypes GHOST_DropTargetWin32::getGhostType(IDataObject *pDataObje
return GHOST_kDragnDropTypeString;
}
// Filesnames
/* Files-names. */
fmtetc.cfFormat = CF_HDROP;
if (pDataObject->QueryGetData(&fmtetc) == S_OK) {
return GHOST_kDragnDropTypeFilenames;
@ -195,7 +195,7 @@ void *GHOST_DropTargetWin32::getGhostData(IDataObject *pDataObject)
default:
#ifdef WITH_GHOST_DEBUG
::printf("\nGHOST_kDragnDropTypeUnknown");
#endif // WITH_GHOST_DEBUG
#endif /* WITH_GHOST_DEBUG */
return NULL;
break;
}
@ -212,8 +212,8 @@ void *GHOST_DropTargetWin32::getDropDataAsFilenames(IDataObject *pDataObject)
STGMEDIUM stgmed;
HDROP hdrop;
// Check if dataobject supplies the format we want.
// Double checking here, first in getGhostType.
/* Check if dataobject supplies the format we want.
* Double checking here, first in getGhostType. */
if (pDataObject->QueryGetData(&fmtetc) == S_OK) {
if (pDataObject->GetData(&fmtetc, &stgmed) == S_OK) {
hdrop = (HDROP)::GlobalLock(stgmed.hGlobal);
@ -233,14 +233,14 @@ void *GHOST_DropTargetWin32::getDropDataAsFilenames(IDataObject *pDataObject)
if (!(temp_path = alloc_utf_8_from_16(fpath, 0))) {
continue;
}
// Just ignore paths that could not be converted verbatim.
/* Just ignore paths that could not be converted verbatim. */
strArray->strings[nvalid] = (uint8_t *)temp_path;
strArray->count = nvalid + 1;
nvalid++;
}
}
// Free up memory.
/* Free up memory. */
::GlobalUnlock(stgmed.hGlobal);
::ReleaseStgMedium(&stgmed);
@ -256,8 +256,8 @@ void *GHOST_DropTargetWin32::getDropDataAsString(IDataObject *pDataObject)
FORMATETC fmtetc = {CF_UNICODETEXT, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL};
STGMEDIUM stgmed;
// Try unicode first.
// Check if dataobject supplies the format we want.
/* Try unicode first.
* Check if dataobject supplies the format we want. */
if (pDataObject->QueryGetData(&fmtetc) == S_OK) {
if (pDataObject->GetData(&fmtetc, &stgmed) == S_OK) {
LPCWSTR wstr = (LPCWSTR)::GlobalLock(stgmed.hGlobal);
@ -265,13 +265,13 @@ void *GHOST_DropTargetWin32::getDropDataAsString(IDataObject *pDataObject)
::GlobalUnlock(stgmed.hGlobal);
return NULL;
}
// Free memory
/* Free memory. */
::GlobalUnlock(stgmed.hGlobal);
::ReleaseStgMedium(&stgmed);
#ifdef WITH_GHOST_DEBUG
::printf("\n<converted droped unicode string>\n%s\n</droped converted unicode string>\n",
tmp_string);
#endif // WITH_GHOST_DEBUG
#endif /* WITH_GHOST_DEBUG */
return tmp_string;
}
}
@ -293,7 +293,7 @@ void *GHOST_DropTargetWin32::getDropDataAsString(IDataObject *pDataObject)
::GlobalUnlock(stgmed.hGlobal);
return NULL;
}
// Free memory
/* Free memory. */
::GlobalUnlock(stgmed.hGlobal);
::ReleaseStgMedium(&stgmed);
@ -307,13 +307,13 @@ void *GHOST_DropTargetWin32::getDropDataAsString(IDataObject *pDataObject)
int GHOST_DropTargetWin32::WideCharToANSI(LPCWSTR in, char *&out)
{
int size;
out = NULL; // caller should free if != NULL
out = NULL; /* caller should free if != NULL */
// Get the required size.
size = ::WideCharToMultiByte(CP_ACP, // System Default Codepage
0x00000400, // WC_NO_BEST_FIT_CHARS
/* Get the required size. */
size = ::WideCharToMultiByte(CP_ACP, /* System Default Codepage */
0x00000400, /* WC_NO_BEST_FIT_CHARS */
in,
-1, //-1 null terminated, makes output null terminated too.
-1, /* -1 null terminated, makes output null terminated too. */
NULL,
0,
NULL,
@ -322,7 +322,7 @@ int GHOST_DropTargetWin32::WideCharToANSI(LPCWSTR in, char *&out)
if (!size) {
#ifdef WITH_GHOST_DEBUG
::printLastError();
#endif // WITH_GHOST_DEBUG
#endif /* WITH_GHOST_DEBUG */
return 0;
}
@ -337,7 +337,7 @@ int GHOST_DropTargetWin32::WideCharToANSI(LPCWSTR in, char *&out)
if (!size) {
#ifdef WITH_GHOST_DEBUG
::printLastError();
#endif // WITH_GHOST_DEBUG
#endif /* WITH_GHOST_DEBUG */
::free(out);
out = NULL;
}
@ -362,4 +362,4 @@ void printLastError(void)
LocalFree(s);
}
}
#endif // WITH_GHOST_DEBUG
#endif /* WITH_GHOST_DEBUG */

View File

@ -512,4 +512,4 @@ void GHOST_ImeWin32::UpdateInfo(HWND window_handle)
}
}
#endif // WITH_INPUT_IME
#endif /* WITH_INPUT_IME */

View File

@ -351,4 +351,4 @@ class GHOST_ImeWin32 {
bool is_first, is_enable;
};
#endif // WITH_INPUT_IME
#endif /* WITH_INPUT_IME */

View File

@ -7,10 +7,10 @@ GHOST_NDOFManagerWin32::GHOST_NDOFManagerWin32(GHOST_System &sys) : GHOST_NDOFMa
/* pass */
}
// whether multi-axis functionality is available (via the OS or driver)
// does not imply that a device is plugged in or being used
/* Whether multi-axis functionality is available (via the OS or driver)
* does not imply that a device is plugged in or being used. */
bool GHOST_NDOFManagerWin32::available()
{
// always available since RawInput is built into Windows
/* Always available since RawInput is built into Windows. */
return true;
}

File diff suppressed because it is too large Load Diff

View File

@ -10,10 +10,10 @@
#ifndef WIN32
# error WIN32 only!
#endif // WIN32
#endif /* WIN32 */
#define WIN32_LEAN_AND_MEAN
#include <ole2.h> // for drag-n-drop
#include <ole2.h> /* For drag-n-drop. */
#include <windows.h>
#include "GHOST_System.h"
@ -295,11 +295,10 @@ class GHOST_SystemWin32 : public GHOST_System {
/**
* Catches raw WIN32 key codes from WM_INPUT in the wndproc.
* \param raw: RawInput structure with detailed info about the key event.
* \param keyDown: Pointer flag that specify if a key is down.
* \param vk: Pointer to virtual key.
* \param r_key_down: Set true when the key is pressed, otherwise false.
* \return The GHOST key (GHOST_kKeyUnknown if no match).
*/
GHOST_TKey hardKey(RAWINPUT const &raw, bool *r_keyDown);
GHOST_TKey hardKey(RAWINPUT const &raw, bool *r_key_down);
/**
* Creates mouse button event.
@ -387,7 +386,7 @@ class GHOST_SystemWin32 : public GHOST_System {
static GHOST_Event *processImeEvent(GHOST_TEventType type,
GHOST_WindowWin32 *window,
GHOST_TEventImeData *data);
#endif // WITH_INPUT_IME
#endif /* WITH_INPUT_IME */
/**
* Handles minimum window size.
@ -459,18 +458,18 @@ class GHOST_SystemWin32 : public GHOST_System {
inline void GHOST_SystemWin32::handleKeyboardChange(void)
{
m_keylayout = GetKeyboardLayout(0); // get keylayout for current thread
m_keylayout = GetKeyboardLayout(0); /* Get keylayout for current thread. */
int i;
SHORT s;
// save the language identifier.
/* Save the language identifier. */
m_langId = LOWORD(m_keylayout);
for (m_hasAltGr = false, i = 32; i < 256; ++i) {
s = VkKeyScanEx((char)i, m_keylayout);
// s == -1 means no key that translates passed char code
// high byte contains shift state. bit 2 ctrl pressed, bit 4 alt pressed
// if both are pressed, we have AltGr keycombo on keylayout
/* `s == -1` means no key that translates passed char code
* high byte contains shift state. bit 2 ctrl pressed, bit 4 alt pressed
* if both are pressed, we have AltGr keycombo on keylayout. */
if (s != -1 && (s & 0x600) == 0x600) {
m_hasAltGr = true;
break;

View File

@ -26,7 +26,7 @@
#ifndef GET_POINTERID_WPARAM
# define GET_POINTERID_WPARAM(wParam) (LOWORD(wParam))
#endif // GET_POINTERID_WPARAM
#endif /* GET_POINTERID_WPARAM */
const wchar_t *GHOST_WindowWin32::s_windowClassName = L"GHOST_WindowClass";
const int GHOST_WindowWin32::s_maxTitleLength = 128;
@ -93,18 +93,18 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system,
adjustWindowRectForClosestMonitor(&win_rect, style, extended_style);
wchar_t *title_16 = alloc_utf16_from_8((char *)title, 0);
m_hWnd = ::CreateWindowExW(extended_style, // window extended style
s_windowClassName, // pointer to registered class name
title_16, // pointer to window name
style, // window style
win_rect.left, // horizontal position of window
win_rect.top, // vertical position of window
win_rect.right - win_rect.left, // window width
win_rect.bottom - win_rect.top, // window height
m_parentWindowHwnd, // handle to parent or owner window
0, // handle to menu or child-window identifier
::GetModuleHandle(0), // handle to application instance
0); // pointer to window-creation data
m_hWnd = ::CreateWindowExW(extended_style, /* window extended style */
s_windowClassName, /* pointer to registered class name */
title_16, /* pointer to window name */
style, /* window style */
win_rect.left, /* horizontal position of window */
win_rect.top, /* vertical position of window */
win_rect.right - win_rect.left, /* window width */
win_rect.bottom - win_rect.top, /* window height */
m_parentWindowHwnd, /* handle to parent or owner window */
0, /* handle to menu or child-window identifier */
::GetModuleHandle(0), /* handle to application instance */
0); /* pointer to window-creation data */
free(title_16);
if (m_hWnd == NULL) {
@ -197,7 +197,7 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system,
/* Force an initial paint of the window. */
::UpdateWindow(m_hWnd);
/* Initialize Wintab. */
/* Initialize WINTAB. */
if (system->getTabletAPI() != GHOST_kTabletWinPointer) {
loadWintab(GHOST_kWindowStateMinimized != state);
}
@ -221,7 +221,7 @@ void GHOST_WindowWin32::updateDirectManipulation()
void GHOST_WindowWin32::onPointerHitTest(WPARAM wParam)
{
/* Only DM_POINTERHITTEST can be the first message of input sequence of touchpad input. */
/* Only #DM_POINTERHITTEST can be the first message of input sequence of touch-pad input. */
if (!m_directManipulationHelper) {
return;
@ -280,9 +280,9 @@ GHOST_WindowWin32::~GHOST_WindowWin32()
}
if (m_dropTarget) {
// Disable DragDrop
/* Disable DragDrop. */
RevokeDragDrop(m_hWnd);
// Release our reference of the DropTarget and it will delete itself eventually.
/* Release our reference of the DropTarget and it will delete itself eventually. */
m_dropTarget->Release();
m_dropTarget = NULL;
}
@ -531,7 +531,8 @@ GHOST_TSuccess GHOST_WindowWin32::setState(GHOST_TWindowState state)
break;
}
::SetWindowLongPtr(m_hWnd, GWL_STYLE, style);
/* SetWindowLongPtr Docs: frame changes not visible until SetWindowPos with SWP_FRAMECHANGED. */
/* #SetWindowLongPtr Docs:
* Frame changes not visible until #SetWindowPos with #SWP_FRAMECHANGED. */
::SetWindowPos(m_hWnd, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
return ::SetWindowPlacement(m_hWnd, &wp) == TRUE ? GHOST_kSuccess : GHOST_kFailure;
}
@ -680,7 +681,7 @@ void GHOST_WindowWin32::updateMouseCapture(GHOST_MouseCaptureEventWin32 event)
HCURSOR GHOST_WindowWin32::getStandardCursor(GHOST_TStandardCursor shape) const
{
// Convert GHOST cursor to Windows OEM cursor
/* Convert GHOST cursor to Windows OEM cursor. */
HANDLE cursor = NULL;
HMODULE module = ::GetModuleHandle(0);
uint32_t flags = LR_SHARED | LR_DEFAULTSIZE;
@ -738,36 +739,36 @@ HCURSOR GHOST_WindowWin32::getStandardCursor(GHOST_TStandardCursor shape) const
break;
case GHOST_kStandardCursorHelp:
cursor = ::LoadImage(NULL, IDC_HELP, IMAGE_CURSOR, cx, cy, flags);
break; // Arrow and question mark
break; /* Arrow and question mark */
case GHOST_kStandardCursorWait:
cursor = ::LoadImage(NULL, IDC_WAIT, IMAGE_CURSOR, cx, cy, flags);
break; // Hourglass
break; /* Hourglass */
case GHOST_kStandardCursorText:
cursor = ::LoadImage(NULL, IDC_IBEAM, IMAGE_CURSOR, cx, cy, flags);
break; // I-beam
break; /* I-beam */
case GHOST_kStandardCursorCrosshair:
cursor = ::LoadImage(module, "cross_cursor", IMAGE_CURSOR, cx, cy, flags);
break; // Standard Cross
break; /* Standard Cross */
case GHOST_kStandardCursorCrosshairA:
cursor = ::LoadImage(module, "crossA_cursor", IMAGE_CURSOR, cx, cy, flags);
break; // Crosshair A
break; /* Crosshair A */
case GHOST_kStandardCursorCrosshairB:
cursor = ::LoadImage(module, "crossB_cursor", IMAGE_CURSOR, cx, cy, flags);
break; // Diagonal Crosshair B
break; /* Diagonal Crosshair B */
case GHOST_kStandardCursorCrosshairC:
cursor = ::LoadImage(module, "crossC_cursor", IMAGE_CURSOR, cx, cy, flags);
break; // Minimal Crosshair C
break; /* Minimal Crosshair C */
case GHOST_kStandardCursorBottomSide:
case GHOST_kStandardCursorUpDown:
cursor = ::LoadImage(module, "movens_cursor", IMAGE_CURSOR, cx, cy, flags);
break; // Double-pointed arrow pointing north and south
break; /* Double-pointed arrow pointing north and south */
case GHOST_kStandardCursorLeftSide:
case GHOST_kStandardCursorLeftRight:
cursor = ::LoadImage(module, "moveew_cursor", IMAGE_CURSOR, cx, cy, flags);
break; // Double-pointed arrow pointing west and east
break; /* Double-pointed arrow pointing west and east */
case GHOST_kStandardCursorTopSide:
cursor = ::LoadImage(NULL, IDC_UPARROW, IMAGE_CURSOR, cx, cy, flags);
break; // Vertical arrow
break; /* Vertical arrow */
case GHOST_kStandardCursorTopLeftCorner:
cursor = ::LoadImage(NULL, IDC_SIZENWSE, IMAGE_CURSOR, cx, cy, flags);
break;
@ -789,7 +790,7 @@ HCURSOR GHOST_WindowWin32::getStandardCursor(GHOST_TStandardCursor shape) const
case GHOST_kStandardCursorDestroy:
case GHOST_kStandardCursorStop:
cursor = ::LoadImage(module, "forbidden_cursor", IMAGE_CURSOR, cx, cy, flags);
break; // Slashed circle
break; /* Slashed circle */
case GHOST_kStandardCursorDefault:
cursor = NULL;
break;
@ -838,8 +839,9 @@ GHOST_TSuccess GHOST_WindowWin32::setWindowCursorGrab(GHOST_TGrabCursorMode mode
m_system->getCursorPosition(m_cursorGrabInitPos[0], m_cursorGrabInitPos[1]);
setCursorGrabAccum(0, 0);
if (mode == GHOST_kGrabHide)
if (mode == GHOST_kGrabHide) {
setWindowCursorVisibility(false);
}
}
updateMouseCapture(OperatorGrab);
}
@ -849,9 +851,9 @@ GHOST_TSuccess GHOST_WindowWin32::setWindowCursorGrab(GHOST_TGrabCursorMode mode
setWindowCursorVisibility(true);
}
if (m_cursorGrab != GHOST_kGrabNormal) {
/* use to generate a mouse move event, otherwise the last event
/* Use to generate a mouse move event, otherwise the last event
* blender gets can be outside the screen causing menus not to show
* properly unless the user moves the mouse */
* properly unless the user moves the mouse. */
int32_t pos[2];
m_system->getCursorPosition(pos[0], pos[1]);
m_system->setCursorPosition(pos[0], pos[1]);
@ -902,7 +904,7 @@ GHOST_TSuccess GHOST_WindowWin32::getPointerInfo(
for (uint32_t i = 0; i < outCount; i++) {
POINTER_INFO pointerApiInfo = pointerPenInfo[i].pointerInfo;
// Obtain the basic information from the event
/* Obtain the basic information from the event. */
outPointerInfo[i].pointerId = pointerId;
outPointerInfo[i].isPrimary = isPrimary;
@ -1044,8 +1046,9 @@ void GHOST_WindowWin32::ThemeRefresh()
&pcbData) == ERROR_SUCCESS) {
BOOL DarkMode = !lightMode;
/* 20 == DWMWA_USE_IMMERSIVE_DARK_MODE in Windows 11 SDK. This value was undocumented for
* Windows 10 versions 2004 and later, supported for Windows 11 Build 22000 and later. */
/* `20 == DWMWA_USE_IMMERSIVE_DARK_MODE` in Windows 11 SDK.
* This value was undocumented for Windows 10 versions 2004 and later,
* supported for Windows 11 Build 22000 and later. */
DwmSetWindowAttribute(this->m_hWnd, 20, &DarkMode, sizeof(DarkMode));
}
}
@ -1101,8 +1104,9 @@ GHOST_TSuccess GHOST_WindowWin32::setWindowCustomCursorShape(
int x, y, cols;
cols = sizeX / 8; /* Number of whole bytes per row (width of bitmap/mask). */
if (sizeX % 8)
if (sizeX % 8) {
cols++;
}
if (m_customCursor) {
DestroyCursor(m_customCursor);
@ -1140,16 +1144,18 @@ GHOST_TSuccess GHOST_WindowWin32::setWindowCustomCursorShape(
GHOST_TSuccess GHOST_WindowWin32::setProgressBar(float progress)
{
/* #SetProgressValue sets state to #TBPF_NORMAL automatically. */
if (m_Bar && S_OK == m_Bar->SetProgressValue(m_hWnd, 10000 * progress, 10000))
if (m_Bar && S_OK == m_Bar->SetProgressValue(m_hWnd, 10000 * progress, 10000)) {
return GHOST_kSuccess;
}
return GHOST_kFailure;
}
GHOST_TSuccess GHOST_WindowWin32::endProgressBar()
{
if (m_Bar && S_OK == m_Bar->SetProgressState(m_hWnd, TBPF_NOPROGRESS))
if (m_Bar && S_OK == m_Bar->SetProgressState(m_hWnd, TBPF_NOPROGRESS)) {
return GHOST_kSuccess;
}
return GHOST_kFailure;
}

View File

@ -10,7 +10,7 @@
#ifndef WIN32
# error WIN32 only!
#endif // WIN32
#endif /* WIN32 */
#include "GHOST_TaskbarWin32.h"
#include "GHOST_TrackpadWin32.h"
@ -25,7 +25,7 @@
class GHOST_SystemWin32;
class GHOST_DropTargetWin32;
// typedefs for user32 functions to allow dynamic loading of Windows 10 DPI scaling functions
/* typedefs for user32 functions to allow dynamic loading of Windows 10 DPI scaling functions. */
typedef UINT(API *GHOST_WIN32_GetDpiForWindow)(HWND);
typedef BOOL(API *GHOST_WIN32_AdjustWindowRectExForDpi)(

View File

@ -275,6 +275,21 @@ inline T *MEM_new(const char *allocation_name, Args &&...args)
return new (buffer) T(std::forward<Args>(args)...);
}
/**
* Destructs and deallocates an object previously allocated with any `MEM_*` function.
* Passing in null does nothing.
*/
template<typename T> inline void MEM_delete(const T *ptr)
{
if (ptr == nullptr) {
/* Support #ptr being null, because C++ `delete` supports that as well. */
return;
}
/* C++ allows destruction of const objects, so the pointer is allowed to be const. */
ptr->~T();
MEM_freeN(const_cast<T *>(ptr));
}
/**
* Allocates zero-initialized memory for an object of type #T. The constructor of #T is not called,
* therefor this should only used with trivial types (like all C types).
@ -287,6 +302,15 @@ template<typename T> inline T *MEM_cnew(const char *allocation_name)
return static_cast<T *>(MEM_callocN(sizeof(T), allocation_name));
}
/**
* Same as MEM_cnew but for arrays, better alternative to #MEM_calloc_arrayN.
*/
template<typename T> inline T *MEM_cnew_array(const size_t length, const char *allocation_name)
{
static_assert(std::is_trivial_v<T>, "For non-trivial types, MEM_new should be used.");
return static_cast<T *>(MEM_calloc_arrayN(length, sizeof(T), allocation_name));
}
/**
* Allocate memory for an object of type #T and copy construct an object from `other`.
* Only applicable for a trivial types.
@ -301,23 +325,10 @@ template<typename T> inline T *MEM_cnew(const char *allocation_name, const T &ot
{
static_assert(std::is_trivial_v<T>, "For non-trivial types, MEM_new should be used.");
T *new_object = static_cast<T *>(MEM_mallocN(sizeof(T), allocation_name));
memcpy(new_object, &other, sizeof(T));
return new_object;
}
/**
* Destructs and deallocates an object previously allocated with any `MEM_*` function.
* Passing in null does nothing.
*/
template<typename T> inline void MEM_delete(const T *ptr)
{
if (ptr == nullptr) {
/* Support #ptr being null, because C++ `delete` supports that as well. */
return;
if (new_object) {
memcpy(new_object, &other, sizeof(T));
}
/* C++ allows destruction of const objects, so the pointer is allowed to be const. */
ptr->~T();
MEM_freeN(const_cast<T *>(ptr));
return new_object;
}
/* Allocation functions (for C++ only). */

View File

@ -907,6 +907,11 @@ def dump_template_messages(msgs, reports, settings):
reports, None, settings)
def dump_addon_bl_info(msgs, reports, module, settings):
for prop in ('name', 'location', 'description'):
process_msg(msgs, settings.DEFAULT_CONTEXT, module.bl_info[prop], "Add-on " + module.bl_info['name'] + " info: " + prop, reports, None, settings)
##### Main functions! #####
def dump_messages(do_messages, do_checks, settings):
bl_ver = "Blender " + bpy.app.version_string
@ -945,6 +950,13 @@ def dump_messages(do_messages, do_checks, settings):
# Get strings from startup templates.
dump_template_messages(msgs, reports, settings)
# Get strings from addons' bl_info.
import addon_utils
for module in addon_utils.modules():
if module.bl_info['support'] != 'OFFICIAL':
continue
dump_addon_bl_info(msgs, reports, module, settings)
# Get strings from addons' categories.
for uid, label, tip in bpy.types.WindowManager.addon_filter.keywords['items'](
bpy.context.window_manager,
@ -1041,6 +1053,9 @@ def dump_addon_messages(module_name, do_checks, settings):
reports["check_ctxt"] = check_ctxt
dump_py_messages(msgs, reports, {addon}, settings, addons_only=True)
# Get strings from the addon's bl_info
dump_addon_bl_info(msgs, reports, addon, settings)
pot.unescape() # Strings gathered in py/C source code may contain escaped chars...
print_info(reports, pot)

View File

@ -9,12 +9,12 @@ import os
OK = 0
MISSING = 1
TOOLOW = 2
FORBIDDEN = 3
SKIPPED = 3
FLAG_MESSAGES = {
OK: "",
MISSING: "No translation yet!",
TOOLOW: "Not enough advanced to be included...",
FORBIDDEN: "Explicitly forbidden!",
MISSING: "No translation yet.",
TOOLOW: "Not complete enough to be included.",
SKIPPED: "Skipped (see IMPORT_LANGUAGES_SKIP in settings.py).",
}
@ -25,7 +25,7 @@ def gen_menu_file(stats, settings):
for uid_num, label, uid in settings.LANGUAGES:
if uid in stats:
if uid in settings.IMPORT_LANGUAGES_SKIP:
tmp.append((stats[uid], uid_num, label, uid, FORBIDDEN))
tmp.append((stats[uid], uid_num, label, uid, SKIPPED))
else:
tmp.append((stats[uid], uid_num, label, uid, OK))
else:

View File

@ -13,14 +13,22 @@ __all__ = (
def mesh_linked_uv_islands(mesh):
"""
Splits the mesh into connected polygons, use this for separating cubes from
other mesh elements within 1 mesh datablock.
Returns lists of polygon indices connected by UV islands.
:arg mesh: the mesh used to group with.
:type mesh: :class:`bpy.types.Mesh`
:return: lists of lists containing polygon indices
:return: list of lists containing polygon indices
:rtype: list
"""
if mesh.polygons and not mesh.uv_layers.active.data:
# Currently, when in edit mode, UV Layer data will always be empty
# when accessed though RNA. This may change in the future.
raise ValueError(
"UV Layers are not currently available from python in Edit Mode. "
"Use bmesh and bpy_extras.bmesh_utils.bmesh_linked_uv_islands instead."
)
uv_loops = [luv.uv[:] for luv in mesh.uv_layers.active.data]
poly_loops = [poly.loop_indices for poly in mesh.polygons]
luv_hash = {}

View File

@ -165,7 +165,7 @@ url_manual_mapping = (
("bpy.types.sequencertimelineoverlay.show_strip_source*", "editors/video_sequencer/sequencer/display.html#bpy-types-sequencertimelineoverlay-show-strip-source"),
("bpy.types.toolsettings.use_gpencil_automerge_strokes*", "grease_pencil/modes/draw/introduction.html#bpy-types-toolsettings-use-gpencil-automerge-strokes"),
("bpy.types.toolsettings.use_proportional_edit_objects*", "editors/3dview/controls/proportional_editing.html#bpy-types-toolsettings-use-proportional-edit-objects"),
("bpy.ops.outliner.liboverride_troubleshoot_operation*", "files/linked_libraries/library_overrides.html#bpy-ops-outliner-liboverride_troubleshoot_operation"),
("bpy.ops.outliner.liboverride_troubleshoot_operation*", "files/linked_libraries/library_overrides.html#bpy-ops-outliner-liboverride-troubleshoot-operation"),
("bpy.ops.view3d.edit_mesh_extrude_move_shrink_fatten*", "modeling/meshes/editing/face/extrude_faces_normal.html#bpy-ops-view3d-edit-mesh-extrude-move-shrink-fatten"),
("bpy.types.brushgpencilsettings.active_smooth_factor*", "grease_pencil/modes/draw/tools/draw.html#bpy-types-brushgpencilsettings-active-smooth-factor"),
("bpy.types.brushgpencilsettings.extend_stroke_factor*", "grease_pencil/modes/draw/tools/fill.html#bpy-types-brushgpencilsettings-extend-stroke-factor"),
@ -223,6 +223,7 @@ url_manual_mapping = (
("bpy.types.lineartgpencilmodifier.use_custom_camera*", "grease_pencil/modifiers/generate/line_art.html#bpy-types-lineartgpencilmodifier-use-custom-camera"),
("bpy.types.linestylegeometrymodifier_simplification*", "render/freestyle/view_layer/line_style/modifiers/geometry/simplification.html#bpy-types-linestylegeometrymodifier-simplification"),
("bpy.types.materialgpencilstyle.use_overlap_strokes*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-use-overlap-strokes"),
("bpy.types.movietrackingtrack.use_grayscale_preview*", "movie_clip/tracking/clip/sidebar/track/track.html#bpy-types-movietrackingtrack-use-grayscale-preview"),
("bpy.types.sequencertimelineoverlay.show_strip_name*", "editors/video_sequencer/sequencer/display.html#bpy-types-sequencertimelineoverlay-show-strip-name"),
("bpy.types.sequencertimelineoverlay.show_thumbnails*", "editors/video_sequencer/sequencer/display.html#bpy-types-sequencertimelineoverlay-show-thumbnails"),
("bpy.types.spacespreadsheet.geometry_component_type*", "editors/spreadsheet.html#bpy-types-spacespreadsheet-geometry-component-type"),
@ -259,6 +260,7 @@ url_manual_mapping = (
("bpy.types.linestylegeometrymodifier_perlinnoise1d*", "render/freestyle/view_layer/line_style/modifiers/geometry/perlin_noise_1d.html#bpy-types-linestylegeometrymodifier-perlinnoise1d"),
("bpy.types.linestylegeometrymodifier_perlinnoise2d*", "render/freestyle/view_layer/line_style/modifiers/geometry/perlin_noise_2d.html#bpy-types-linestylegeometrymodifier-perlinnoise2d"),
("bpy.types.materialgpencilstyle.use_stroke_holdout*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-use-stroke-holdout"),
("bpy.types.movietrackingplanetrack.use_auto_keying*", "movie_clip/tracking/clip/sidebar/track/plane_track.html#bpy-types-movietrackingplanetrack-use-auto-keying"),
("bpy.types.movietrackingsettings.use_tripod_solver*", "movie_clip/tracking/clip/toolbar/solve.html#bpy-types-movietrackingsettings-use-tripod-solver"),
("bpy.types.rendersettings.simplify_child_particles*", "render/cycles/render_settings/simplify.html#bpy-types-rendersettings-simplify-child-particles"),
("bpy.types.rendersettings.use_high_quality_normals*", "render/eevee/render_settings/performance.html#bpy-types-rendersettings-use-high-quality-normals"),
@ -364,6 +366,7 @@ url_manual_mapping = (
("bpy.types.linestylegeometrymodifier_2dtransform*", "render/freestyle/view_layer/line_style/modifiers/geometry/2d_transform.html#bpy-types-linestylegeometrymodifier-2dtransform"),
("bpy.types.linestylegeometrymodifier_beziercurve*", "render/freestyle/view_layer/line_style/modifiers/geometry/bezier_curve.html#bpy-types-linestylegeometrymodifier-beziercurve"),
("bpy.types.materialgpencilstyle.use_fill_holdout*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-use-fill-holdout"),
("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.sequenceeditor.use_overlay_frame_lock*", "editors/video_sequencer/preview/sidebar.html#bpy-types-sequenceeditor-use-overlay-frame-lock"),
@ -409,9 +412,13 @@ url_manual_mapping = (
("bpy.types.lineartgpencilmodifier.use_face_mark*", "grease_pencil/modifiers/generate/line_art.html#bpy-types-lineartgpencilmodifier-use-face-mark"),
("bpy.types.linestylegeometrymodifier_tipremover*", "render/freestyle/view_layer/line_style/modifiers/geometry/tip_remover.html#bpy-types-linestylegeometrymodifier-tipremover"),
("bpy.types.movieclipuser.use_render_undistorted*", "editors/clip/display/clip_display.html#bpy-types-movieclipuser-use-render-undistorted"),
("bpy.types.moviesequence.animation_offset_start*", "editors/video_sequencer/sequencer/sidebar/strip.html#bpy-types-moviesequence-animation-offset-start"),
("bpy.types.movietrackingcamera.distortion_model*", "movie_clip/tracking/clip/sidebar/track/camera.html#bpy-types-movietrackingcamera-distortion-model"),
("bpy.types.movietrackingtrack.use_alpha_preview*", "movie_clip/tracking/clip/sidebar/track/track.html#bpy-types-movietrackingtrack-use-alpha-preview"),
("bpy.types.movietrackingtrack.use_green_channel*", "movie_clip/tracking/clip/sidebar/track/track.html#bpy-types-movietrackingtrack-use-green-channel"),
("bpy.types.rendersettings.resolution_percentage*", "render/output/properties/format.html#bpy-types-rendersettings-resolution-percentage"),
("bpy.types.rendersettings_simplify_gpencil_tint*", "render/cycles/render_settings/simplify.html#bpy-types-rendersettings-simplify-gpencil-tint"),
("bpy.types.spaceimageeditor.show_gizmo_navigate*", "editors/image/introduction.html#bpy-types-spaceimageeditor-show-gizmo-navigate"),
("bpy.types.spaceoutliner.lib_override_view_mode*", "editors/outliner/interface.html#bpy-types-spaceoutliner-lib-override-view-mode"),
("bpy.types.spaceoutliner.use_filter_object_mesh*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-object-mesh"),
("bpy.types.spaceoutliner.use_filter_view_layers*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-view-layers"),
@ -461,6 +468,8 @@ url_manual_mapping = (
("bpy.types.greasepencil.stroke_thickness_space*", "grease_pencil/properties/strokes.html#bpy-types-greasepencil-stroke-thickness-space"),
("bpy.types.linestylegeometrymodifier_blueprint*", "render/freestyle/view_layer/line_style/modifiers/geometry/blueprint.html#bpy-types-linestylegeometrymodifier-blueprint"),
("bpy.types.materialgpencilstyle.alignment_mode*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-alignment-mode"),
("bpy.types.movietrackingtrack.use_blue_channel*", "movie_clip/tracking/clip/sidebar/track/track.html#bpy-types-movietrackingtrack-use-blue-channel"),
("bpy.types.movietrackingtrack.use_custom_color*", "movie_clip/tracking/clip/sidebar/track/track.html#bpy-types-movietrackingtrack-use-custom-color"),
("bpy.types.particlesettings.use_modifier_stack*", "physics/particles/emitter/emission.html#bpy-types-particlesettings-use-modifier-stack"),
("bpy.types.rendersettings.sequencer_gl_preview*", "editors/video_sequencer/preview/sidebar.html#bpy-types-rendersettings-sequencer-gl-preview"),
("bpy.types.rendersettings.simplify_subdivision*", "render/cycles/render_settings/simplify.html#bpy-types-rendersettings-simplify-subdivision"),
@ -524,7 +533,9 @@ url_manual_mapping = (
("bpy.types.greasepencil.edit_curve_resolution*", "grease_pencil/modes/edit/curve_editing.html#bpy-types-greasepencil-edit-curve-resolution"),
("bpy.types.linestylegeometrymodifier_2doffset*", "render/freestyle/view_layer/line_style/modifiers/geometry/2d_offset.html#bpy-types-linestylegeometrymodifier-2doffset"),
("bpy.types.linestylegeometrymodifier_sampling*", "render/freestyle/view_layer/line_style/modifiers/geometry/sampling.html#bpy-types-linestylegeometrymodifier-sampling"),
("bpy.types.moviesequence.animation_offset_end*", "editors/video_sequencer/sequencer/sidebar/strip.html#bpy-types-moviesequence-animation-offset-end"),
("bpy.types.movietrackingdopesheet.sort_method*", "movie_clip/tracking/dope_sheet.html#bpy-types-movietrackingdopesheet-sort-method"),
("bpy.types.movietrackingtrack.use_red_channel*", "movie_clip/tracking/clip/sidebar/track/track.html#bpy-types-movietrackingtrack-use-red-channel"),
("bpy.types.nodesocketinterface*.default_value*", "interface/controls/nodes/groups.html#bpy-types-nodesocketinterface-default-value"),
("bpy.types.rendersettings.line_thickness_mode*", "render/freestyle/render.html#bpy-types-rendersettings-line-thickness-mode"),
("bpy.types.rendersettings.motion_blur_shutter*", "render/cycles/render_settings/motion_blur.html#bpy-types-rendersettings-motion-blur-shutter"),
@ -571,6 +582,7 @@ url_manual_mapping = (
("bpy.types.greasepencil.curve_edit_threshold*", "grease_pencil/modes/edit/curve_editing.html#bpy-types-greasepencil-curve-edit-threshold"),
("bpy.types.materialgpencilstyle.stroke_style*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-stroke-style"),
("bpy.types.materiallineart.use_material_mask*", "render/materials/line_art.html#bpy-types-materiallineart-use-material-mask"),
("bpy.types.movietracking.active_object_index*", "movie_clip/tracking/clip/sidebar/track/objects.html#bpy-types-movietracking-active-object-index"),
("bpy.types.objectlineart.use_crease_override*", "scene_layout/object/properties/line_art.html#bpy-types-objectlineart-use-crease-override"),
("bpy.types.rendersettings.preview_pixel_size*", "render/cycles/render_settings/performance.html#bpy-types-rendersettings-preview-pixel-size"),
("bpy.types.rendersettings.use_crop_to_border*", "render/output/properties/format.html#bpy-types-rendersettings-use-crop-to-border"),
@ -578,7 +590,10 @@ url_manual_mapping = (
("bpy.types.sculpt.constant_detail_resolution*", "sculpt_paint/sculpting/tool_settings/dyntopo.html#bpy-types-sculpt-constant-detail-resolution"),
("bpy.types.sequencertoolsettings.pivot_point*", "editors/video_sequencer/preview/controls/pivot_point.html#bpy-types-sequencertoolsettings-pivot-point"),
("bpy.types.spaceclipeditor.annotation_source*", "movie_clip/tracking/clip/sidebar/view.html#bpy-types-spaceclipeditor-annotation-source"),
("bpy.types.spaceclipeditor.mask_display_type*", "editors/clip/display/mask_display.html#bpy-types-spaceclipeditor-mask-display-type"),
("bpy.types.spaceclipeditor.mask_overlay_mode*", "editors/clip/display/mask_display.html#bpy-types-spaceclipeditor-mask-overlay-mode"),
("bpy.types.spaceclipeditor.show_blue_channel*", "editors/clip/display/clip_display.html#bpy-types-spaceclipeditor-show-blue-channel"),
("bpy.types.spaceclipeditor.show_mask_overlay*", "editors/clip/display/mask_display.html#bpy-types-spaceclipeditor-show-mask-overlay"),
("bpy.types.spacefilebrowser.system_bookmarks*", "editors/file_browser.html#bpy-types-spacefilebrowser-system-bookmarks"),
("bpy.types.spaceoutliner.use_filter_children*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-children"),
("bpy.types.spaceoutliner.use_filter_complete*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-complete"),
@ -646,6 +661,7 @@ url_manual_mapping = (
("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.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"),
("bpy.types.spacenodeoverlay.show_wire_color*", "interface/controls/nodes/introduction.html#bpy-types-spacenodeoverlay-show-wire-color"),
@ -801,9 +817,11 @@ url_manual_mapping = (
("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"),
("bpy.types.movietrackingobject.keyframe_b*", "movie_clip/tracking/clip/toolbar/solve.html#bpy-types-movietrackingobject-keyframe-b"),
("bpy.types.movietrackingtrack.weight_stab*", "movie_clip/tracking/clip/sidebar/track/track.html#bpy-types-movietrackingtrack-weight-stab"),
("bpy.types.nodesocketinterface*.max_value*", "interface/controls/nodes/groups.html#bpy-types-nodesocketinterface-max-value"),
("bpy.types.nodesocketinterface*.min_value*", "interface/controls/nodes/groups.html#bpy-types-nodesocketinterface-min-value"),
("bpy.types.nodesocketinterface.hide_value*", "interface/controls/nodes/groups.html#bpy-types-nodesocketinterface-hide-value"),
("bpy.types.object.use_shape_key_edit_mode*", "animation/shape_keys/shape_keys_panel.html#bpy-types-object-use-shape-key-edit-mode"),
("bpy.types.objectlineart.crease_threshold*", "scene_layout/object/properties/line_art.html#bpy-types-objectlineart-crease-threshold"),
("bpy.types.rendersettings.use_compositing*", "render/output/properties/post_processing.html#bpy-types-rendersettings-use-compositing"),
("bpy.types.rendersettings.use_motion_blur*", "render/cycles/render_settings/motion_blur.html#bpy-types-rendersettings-use-motion-blur"),
@ -882,6 +900,7 @@ url_manual_mapping = (
("bpy.types.material.use_sss_translucency*", "render/eevee/materials/settings.html#bpy-types-material-use-sss-translucency"),
("bpy.types.materiallineart.mat_occlusion*", "render/materials/line_art.html#bpy-types-materiallineart-mat-occlusion"),
("bpy.types.movietrackingcamera.principal*", "movie_clip/tracking/clip/sidebar/track/camera.html#bpy-types-movietrackingcamera-principal"),
("bpy.types.object.active_shape_key_index*", "animation/shape_keys/shape_keys_panel.html#bpy-types-object-active-shape-key-index"),
("bpy.types.object.use_camera_lock_parent*", "scene_layout/object/properties/relations.html#bpy-types-object-use-camera-lock-parent"),
("bpy.types.object.visible_volume_scatter*", "render/cycles/object_settings/object_data.html#bpy-types-object-visible-volume-scatter"),
("bpy.types.rendersettings.line_thickness*", "render/freestyle/render.html#bpy-types-rendersettings-line-thickness"),
@ -889,6 +908,7 @@ url_manual_mapping = (
("bpy.types.rendersettings.pixel_aspect_y*", "render/output/properties/format.html#bpy-types-rendersettings-pixel-aspect-y"),
("bpy.types.rigidbodyconstraint.use_limit*", "physics/rigid_body/constraints/introduction.html#bpy-types-rigidbodyconstraint-use-limit"),
("bpy.types.sceneeevee.taa_render_samples*", "render/eevee/render_settings/sampling.html#bpy-types-sceneeevee-taa-render-samples"),
("bpy.types.sequence.frame_final_duration*", "editors/video_sequencer/sequencer/sidebar/strip.html#bpy-types-sequence-frame-final-duration"),
("bpy.types.spaceoutliner.use_sync_select*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-sync-select"),
("bpy.types.spaceproperties.outliner_sync*", "editors/properties_editor.html#bpy-types-spaceproperties-outliner-sync"),
("bpy.types.spaceproperties.search_filter*", "editors/properties_editor.html#bpy-types-spaceproperties-search-filter"),
@ -909,10 +929,10 @@ url_manual_mapping = (
("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.workspace.use_filter_by_owner*", "interface/window_system/workspaces.html#bpy-types-workspace-use-filter-by-owner"),
("bpy.ops.outliner.liboverride_operation*", "files/linked_libraries/library_overrides.html#bpy-ops-outliner-liboverride_operation"),
("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"),
("bpy.ops.outliner.liboverride_operation*", "files/linked_libraries/library_overrides.html#bpy-ops-outliner-liboverride-operation"),
("bpy.ops.sequencer.select_side_of_frame*", "video_editing/edit/montage/selecting.html#bpy-ops-sequencer-select-side-of-frame"),
("bpy.types.animvizmotionpaths.frame_end*", "animation/motion_paths.html#bpy-types-animvizmotionpaths-frame-end"),
("bpy.types.armature.rigify_colors_index*", "addons/rigging/rigify/metarigs.html#bpy-types-armature-rigify-colors-index"),
@ -953,6 +973,7 @@ url_manual_mapping = (
("bpy.types.materialgpencilstyle.pattern*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-pattern"),
("bpy.types.materialgpencilstyle.texture*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-texture"),
("bpy.types.modifier.use_apply_on_spline*", "modeling/modifiers/introduction.html#bpy-types-modifier-use-apply-on-spline"),
("bpy.types.movietrackingplanetrack.name*", "movie_clip/tracking/clip/sidebar/track/plane_track.html#bpy-types-movietrackingplanetrack-name"),
("bpy.types.object.use_empty_image_alpha*", "modeling/empties.html#bpy-types-object-use-empty-image-alpha"),
("bpy.types.rendersettings.frame_map_new*", "render/output/properties/frame_range.html#bpy-types-rendersettings-frame-map-new"),
("bpy.types.rendersettings.frame_map_old*", "render/output/properties/frame_range.html#bpy-types-rendersettings-frame-map-old"),
@ -966,6 +987,7 @@ url_manual_mapping = (
("bpy.types.sequencetimelinechannel.name*", "editors/video_sequencer/sequencer/channels.html#bpy-types-sequencetimelinechannel-name"),
("bpy.types.shadernodebsdfhairprincipled*", "render/shader_nodes/shader/hair_principled.html#bpy-types-shadernodebsdfhairprincipled"),
("bpy.types.shadernodevectordisplacement*", "render/shader_nodes/vector/vector_displacement.html#bpy-types-shadernodevectordisplacement"),
("bpy.types.spaceclipeditor.blend_factor*", "editors/clip/display/mask_display.html#bpy-types-spaceclipeditor-blend-factor"),
("bpy.types.spacegrapheditor.show_cursor*", "editors/graph_editor/introduction.html#bpy-types-spacegrapheditor-show-cursor"),
("bpy.types.spaceimageeditor.show_repeat*", "editors/image/sidebar.html#bpy-types-spaceimageeditor-show-repeat"),
("bpy.types.spacenodeoverlay.show_timing*", "modeling/geometry_nodes/inspection.html#bpy-types-spacenodeoverlay-show-timing"),
@ -976,6 +998,7 @@ url_manual_mapping = (
("bpy.types.spacetexteditor.use_find_all*", "editors/text_editor.html#bpy-types-spacetexteditor-use-find-all"),
("bpy.types.toolsettings.snap_uv_element*", "editors/uv/controls/snapping.html#bpy-types-toolsettings-snap-uv-element"),
("bpy.types.toolsettings.use_snap_rotate*", "editors/3dview/controls/snapping.html#bpy-types-toolsettings-use-snap-rotate"),
("bpy.types.toolsettings.uv_relax_method*", "modeling/meshes/uv/tools/relax.html#bpy-types-toolsettings-uv-relax-method"),
("bpy.types.unitsettings.system_rotation*", "scene_layout/scene/properties.html#bpy-types-unitsettings-system-rotation"),
("bpy.types.view3doverlay.display_handle*", "editors/3dview/display/overlays.html#bpy-types-view3doverlay-display-handle"),
("bpy.types.volumedisplay.wireframe_type*", "modeling/volumes/properties.html#bpy-types-volumedisplay-wireframe-type"),
@ -987,14 +1010,14 @@ url_manual_mapping = (
("bpy.ops.gpencil.stroke_simplify_fixed*", "grease_pencil/modes/edit/stroke_menu.html#bpy-ops-gpencil-stroke-simplify-fixed"),
("bpy.ops.mesh.faces_select_linked_flat*", "modeling/meshes/selecting/linked.html#bpy-ops-mesh-faces-select-linked-flat"),
("bpy.ops.mesh.primitive_ico_sphere_add*", "modeling/meshes/primitives.html#bpy-ops-mesh-primitive-ico-sphere-add"),
("bpy.ops.object.clear_override_library*", "files/linked_libraries/library_overrides.html#bpy-ops-object-clear-override-library"),
("bpy.ops.object.gpencil_modifier_apply*", "grease_pencil/modifiers/introduction.html#bpy-ops-object-gpencil-modifier-apply"),
("bpy.ops.object.material_slot_deselect*", "render/materials/assignment.html#bpy-ops-object-material-slot-deselect"),
("bpy.ops.object.modifier_move_to_index*", "modeling/modifiers/introduction.html#bpy-ops-object-modifier-move-to-index"),
("bpy.ops.object.multires_external_save*", "modeling/modifiers/generate/multiresolution.html#bpy-ops-object-multires-external-save"),
("bpy.ops.object.reset_override_library*", "files/linked_libraries/library_overrides.html#bpy-ops-object-reset-override-library"),
("bpy.ops.object.vertex_group_normalize*", "sculpt_paint/weight_paint/editing.html#bpy-ops-object-vertex-group-normalize"),
("bpy.ops.object.visual_transform_apply*", "scene_layout/object/editing/apply.html#bpy-ops-object-visual-transform-apply"),
("bpy.ops.object.clear_override_library*", "files/linked_libraries/library_overrides.html#bpy-ops-object-clear-override-library"),
("bpy.ops.object.reset_override_library*", "files/linked_libraries/library_overrides.html#bpy-ops-object-reset-override-library"),
("bpy.ops.outliner.collection_duplicate*", "editors/outliner/editing.html#bpy-ops-outliner-collection-duplicate"),
("bpy.ops.pose.select_constraint_target*", "animation/armatures/posing/selecting.html#bpy-ops-pose-select-constraint-target"),
("bpy.ops.sequencer.change_effect_input*", "video_editing/edit/montage/editing.html#bpy-ops-sequencer-change-effect-input"),
@ -1062,10 +1085,12 @@ url_manual_mapping = (
("bpy.types.sceneeevee.volumetric_light*", "render/eevee/render_settings/volumetrics.html#bpy-types-sceneeevee-volumetric-light"),
("bpy.types.sculpt.detail_refine_method*", "sculpt_paint/sculpting/tool_settings/dyntopo.html#bpy-types-sculpt-detail-refine-method"),
("bpy.types.sculpt.symmetrize_direction*", "sculpt_paint/sculpting/tool_settings/symmetry.html#bpy-types-sculpt-symmetrize-direction"),
("bpy.types.sequence.frame_offset_start*", "editors/video_sequencer/sequencer/sidebar/strip.html#bpy-types-sequence-frame-offset-start"),
("bpy.types.sequenceeditor.show_overlay*", "editors/video_sequencer/preview/sidebar.html#bpy-types-sequenceeditor-show-overlay"),
("bpy.types.sequenceeditor.use_prefetch*", "editors/video_sequencer/preview/sidebar.html#bpy-types-sequenceeditor-use-prefetch"),
("bpy.types.soundsequence.show_waveform*", "editors/video_sequencer/sequencer/sidebar/strip.html#bpy-types-soundsequence-show-waveform"),
("bpy.types.spaceclipeditor.show_stable*", "editors/clip/display/clip_display.html#bpy-types-spaceclipeditor-show-stable"),
("bpy.types.spaceimageeditor.show_gizmo*", "editors/image/introduction.html#bpy-types-spaceimageeditor-show-gizmo"),
("bpy.types.spaceoutliner.filter_invert*", "editors/outliner/interface.html#bpy-types-spaceoutliner-filter-invert"),
("bpy.types.spacetexteditor.show_margin*", "editors/text_editor.html#bpy-types-spacetexteditor-show-margin"),
("bpy.types.spline.radius_interpolation*", "modeling/curves/properties/active_spline.html#bpy-types-spline-radius-interpolation"),
@ -1086,13 +1111,12 @@ url_manual_mapping = (
("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"),
("bpy.ops.object.vertex_group_quantize*", "sculpt_paint/weight_paint/editing.html#bpy-ops-object-vertex-group-quantize"),
("bpy.ops.object.make_override_library*", "files/linked_libraries/library_overrides.html#bpy-ops-object-make-override-library"),
("bpy.ops.outliner.collection_instance*", "editors/outliner/editing.html#bpy-ops-outliner-collection-instance"),
("bpy.ops.sequencer.change_effect_type*", "video_editing/edit/montage/editing.html#bpy-ops-sequencer-change-effect-type"),
("bpy.ops.transform.create_orientation*", "editors/3dview/controls/orientation.html#bpy-ops-transform-create-orientation"),
("bpy.ops.transform.delete_orientation*", "editors/3dview/controls/orientation.html#bpy-ops-transform-delete-orientation"),
("bpy.ops.ui.override_idtemplate_reset*", "files/linked_libraries/library_overrides.html#bpy-ops-ui-override-idtemplate-reset"),
("bpy.ops.ui.override_idtemplate_clear*", "files/linked_libraries/library_overrides.html#bpy-ops-ui-override-idtemplate-clear"),
("bpy.ops.ui.override_idtemplate_reset*", "files/linked_libraries/library_overrides.html#bpy-ops-ui-override-idtemplate-reset"),
("bpy.ops.view3d.localview_remove_from*", "editors/3dview/navigate/local_view.html#bpy-ops-view3d-localview-remove-from"),
("bpy.types.animdata.action_blend_type*", "editors/nla/sidebar.html#bpy-types-animdata-action-blend-type"),
("bpy.types.bakesettings.use_pass_emit*", "render/cycles/baking.html#bpy-types-bakesettings-use-pass-emit"),
@ -1139,6 +1163,7 @@ url_manual_mapping = (
("bpy.types.movietrackingcamera.nuke_k*", "movie_clip/tracking/clip/sidebar/track/camera.html#bpy-types-movietrackingcamera-nuke-k"),
("bpy.types.movietrackingstabilization*", "movie_clip/tracking/clip/sidebar/stabilization/index.html#bpy-types-movietrackingstabilization"),
("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.scene.audio_distance_model*", "scene_layout/scene/properties.html#bpy-types-scene-audio-distance-model"),
@ -1157,6 +1182,7 @@ url_manual_mapping = (
("bpy.types.toolsettings.use_snap_self*", "editors/3dview/controls/snapping.html#bpy-types-toolsettings-use-snap-self"),
("bpy.types.viewlayer.active_aov_index*", "render/layers/passes.html#bpy-types-viewlayer-active-aov-index"),
("bpy.ops.anim.channels_enable_toggle*", "editors/graph_editor/channels.html#bpy-ops-anim-channels-enable-toggle"),
("bpy.ops.clip.tracking_object_remove*", "movie_clip/tracking/clip/sidebar/track/objects.html#bpy-ops-clip-tracking-object-remove"),
("bpy.ops.constraint.copy_to_selected*", "animation/constraints/interface/header.html#bpy-ops-constraint-copy-to-selected"),
("bpy.ops.gpencil.bake_mesh_animation*", "grease_pencil/animation/tools.html#bpy-ops-gpencil-bake-mesh-animation"),
("bpy.ops.gpencil.select_vertex_color*", "grease_pencil/selecting.html#bpy-ops-gpencil-select-vertex-color"),
@ -1183,8 +1209,8 @@ url_manual_mapping = (
("bpy.ops.render.shutter_curve_preset*", "render/cycles/render_settings/motion_blur.html#bpy-ops-render-shutter-curve-preset"),
("bpy.ops.sculpt_curves.select_random*", "sculpt_paint/curves_sculpting/introduction.html#bpy-ops-sculpt-curves-select-random"),
("bpy.ops.sequencer.view_ghost_border*", "editors/video_sequencer/preview/sidebar.html#bpy-ops-sequencer-view-ghost-border"),
("bpy.ops.ui.override_type_set_button*", "files/linked_libraries/library_overrides.html#bpy-ops-ui-override-type-set-button"),
("bpy.ops.ui.override_idtemplate_make*", "files/linked_libraries/library_overrides.html#bpy-ops-ui-override-idtemplate-make"),
("bpy.ops.ui.override_type_set_button*", "files/linked_libraries/library_overrides.html#bpy-ops-ui-override-type-set-button"),
("bpy.types.animdata.action_influence*", "editors/nla/sidebar.html#bpy-types-animdata-action-influence"),
("bpy.types.armature.layers_protected*", "animation/armatures/properties/skeleton.html#bpy-types-armature-layers-protected"),
("bpy.types.assetmetadata.description*", "editors/asset_browser.html#bpy-types-assetmetadata-description"),
@ -1240,6 +1266,7 @@ url_manual_mapping = (
("bpy.types.meshsequencecachemodifier*", "modeling/modifiers/modify/mesh_sequence_cache.html#bpy-types-meshsequencecachemodifier"),
("bpy.types.modifier.show_in_editmode*", "modeling/modifiers/introduction.html#bpy-types-modifier-show-in-editmode"),
("bpy.types.motionpath.line_thickness*", "animation/motion_paths.html#bpy-types-motionpath-line-thickness"),
("bpy.types.movietrackingtrack.weight*", "movie_clip/tracking/clip/sidebar/track/track.html#bpy-types-movietrackingtrack-weight"),
("bpy.types.object.empty_display_size*", "modeling/empties.html#bpy-types-object-empty-display-size"),
("bpy.types.object.empty_display_type*", "modeling/empties.html#bpy-types-object-empty-display-type"),
("bpy.types.regionview3d.use_box_clip*", "editors/3dview/navigate/views.html#bpy-types-regionview3d-use-box-clip"),
@ -1250,6 +1277,7 @@ url_manual_mapping = (
("bpy.types.sceneeevee.bokeh_max_size*", "render/eevee/render_settings/depth_of_field.html#bpy-types-sceneeevee-bokeh-max-size"),
("bpy.types.sculpt.detail_type_method*", "sculpt_paint/sculpting/tool_settings/dyntopo.html#bpy-types-sculpt-detail-type-method"),
("bpy.types.sculpt.use_smooth_shading*", "sculpt_paint/sculpting/tool_settings/dyntopo.html#bpy-types-sculpt-use-smooth-shading"),
("bpy.types.sequence.frame_offset_end*", "editors/video_sequencer/sequencer/sidebar/strip.html#bpy-types-sequence-frame-offset-end"),
("bpy.types.sequenceeditor.show_cache*", "editors/video_sequencer/sequencer/navigating.html#bpy-types-sequenceeditor-show-cache"),
("bpy.types.shadernodebsdfanisotropic*", "render/shader_nodes/shader/anisotropic.html#bpy-types-shadernodebsdfanisotropic"),
("bpy.types.shadernodebsdftranslucent*", "render/shader_nodes/shader/translucent.html#bpy-types-shadernodebsdftranslucent"),
@ -1351,6 +1379,7 @@ url_manual_mapping = (
("bpy.types.material.alpha_threshold*", "render/eevee/materials/settings.html#bpy-types-material-alpha-threshold"),
("bpy.types.mesh.use_mirror_topology*", "modeling/meshes/tools/tool_settings.html#bpy-types-mesh-use-mirror-topology"),
("bpy.types.movieclip.display_aspect*", "editors/clip/display/clip_display.html#bpy-types-movieclip-display-aspect"),
("bpy.types.movietrackingtrack.color*", "movie_clip/tracking/clip/sidebar/track/track.html#bpy-types-movietrackingtrack-color"),
("bpy.types.nodesocketinterface.name*", "interface/controls/nodes/groups.html#bpy-types-nodesocketinterface-name"),
("bpy.types.object.is_shadow_catcher*", "render/cycles/object_settings/object_data.html#bpy-types-object-is-shadow-catcher"),
("bpy.types.particleinstancemodifier*", "modeling/modifiers/physics/particle_instance.html#bpy-types-particleinstancemodifier"),
@ -1395,6 +1424,7 @@ url_manual_mapping = (
("bpy.ops.mesh.shortest_path_select*", "modeling/meshes/selecting/linked.html#bpy-ops-mesh-shortest-path-select"),
("bpy.ops.mesh.vert_connect_concave*", "modeling/meshes/editing/mesh/cleanup.html#bpy-ops-mesh-vert-connect-concave"),
("bpy.ops.object.multires_subdivide*", "modeling/modifiers/generate/multiresolution.html#bpy-ops-object-multires-subdivide"),
("bpy.ops.object.shape_key_transfer*", "animation/shape_keys/shape_keys_panel.html#bpy-ops-object-shape-key-transfer"),
("bpy.ops.object.vertex_group_clean*", "sculpt_paint/weight_paint/editing.html#bpy-ops-object-vertex-group-clean"),
("bpy.ops.poselib.create_pose_asset*", "animation/armatures/posing/editing/pose_library.html#bpy-ops-poselib-create-pose-asset"),
("bpy.ops.preferences.theme_install*", "editors/preferences/themes.html#bpy-ops-preferences-theme-install"),
@ -1472,6 +1502,8 @@ url_manual_mapping = (
("bpy.types.limitdistanceconstraint*", "animation/constraints/transform/limit_distance.html#bpy-types-limitdistanceconstraint"),
("bpy.types.limitlocationconstraint*", "animation/constraints/transform/limit_location.html#bpy-types-limitlocationconstraint"),
("bpy.types.limitrotationconstraint*", "animation/constraints/transform/limit_rotation.html#bpy-types-limitrotationconstraint"),
("bpy.types.movietrackingtrack.lock*", "movie_clip/tracking/clip/sidebar/track/track.html#bpy-types-movietrackingtrack-lock"),
("bpy.types.movietrackingtrack.name*", "movie_clip/tracking/clip/sidebar/track/track.html#bpy-types-movietrackingtrack-name"),
("bpy.types.multiplygpencilmodifier*", "grease_pencil/modifiers/generate/multiple_strokes.html#bpy-types-multiplygpencilmodifier"),
("bpy.types.rendersettings.filepath*", "render/output/properties/output.html#bpy-types-rendersettings-filepath"),
("bpy.types.rendersettings.fps_base*", "render/output/properties/format.html#bpy-types-rendersettings-fps-base"),
@ -1498,6 +1530,7 @@ url_manual_mapping = (
("bpy.ops.armature.armature_layers*", "animation/armatures/bones/editing/change_layers.html#bpy-ops-armature-armature-layers"),
("bpy.ops.armature.select_linked()*", "animation/armatures/bones/selecting.html#bpy-ops-armature-select-linked"),
("bpy.ops.clip.stabilize_2d_select*", "movie_clip/tracking/clip/selecting.html#bpy-ops-clip-stabilize-2d-select"),
("bpy.ops.clip.tracking_object_new*", "movie_clip/tracking/clip/sidebar/track/objects.html#bpy-ops-clip-tracking-object-new"),
("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.stroke_subdivide*", "grease_pencil/modes/edit/stroke_menu.html#bpy-ops-gpencil-stroke-subdivide"),
@ -1614,6 +1647,7 @@ url_manual_mapping = (
("bpy.types.shadernodelightfalloff*", "render/shader_nodes/color/light_falloff.html#bpy-types-shadernodelightfalloff"),
("bpy.types.shadernodeparticleinfo*", "render/shader_nodes/input/particle_info.html#bpy-types-shadernodeparticleinfo"),
("bpy.types.shadernodevectorrotate*", "render/shader_nodes/vector/vector_rotate.html#bpy-types-shadernodevectorrotate"),
("bpy.types.shapekey.interpolation*", "animation/shape_keys/shape_keys_panel.html#bpy-types-shapekey-interpolation"),
("bpy.types.sound.use_memory_cache*", "editors/video_sequencer/sequencer/sidebar/strip.html#bpy-types-sound-use-memory-cache"),
("bpy.types.spaceview3d.show_gizmo*", "editors/3dview/display/gizmo.html#bpy-types-spaceview3d-show-gizmo"),
("bpy.types.texturegpencilmodifier*", "grease_pencil/modifiers/modify/texture_mapping.html#bpy-types-texturegpencilmodifier"),
@ -1622,6 +1656,7 @@ url_manual_mapping = (
("bpy.types.unitsettings.mass_unit*", "scene_layout/scene/properties.html#bpy-types-unitsettings-mass-unit"),
("bpy.types.unitsettings.time_unit*", "scene_layout/scene/properties.html#bpy-types-unitsettings-time-unit"),
("bpy.types.volumedisplacemodifier*", "modeling/modifiers/deform/volume_displace.html#bpy-types-volumedisplacemodifier"),
("bpy.types.volumerender.precision*", "modeling/volumes/properties.html#bpy-types-volumerender-precision"),
("bpy.types.volumerender.step_size*", "modeling/volumes/properties.html#bpy-types-volumerender-step-size"),
("bpy.types.weightednormalmodifier*", "modeling/modifiers/modify/weighted_normal.html#bpy-types-weightednormalmodifier"),
("bpy.types.worldlighting.distance*", "render/cycles/render_settings/light_paths.html#bpy-types-worldlighting-distance"),
@ -1660,6 +1695,9 @@ url_manual_mapping = (
("bpy.ops.object.make_single_user*", "scene_layout/object/editing/relations/make_single_user.html#bpy-ops-object-make-single-user"),
("bpy.ops.object.multires_reshape*", "modeling/modifiers/generate/multiresolution.html#bpy-ops-object-multires-reshape"),
("bpy.ops.object.select_hierarchy*", "scene_layout/object/selecting.html#bpy-ops-object-select-hierarchy"),
("bpy.ops.object.shape_key_mirror*", "animation/shape_keys/shape_keys_panel.html#bpy-ops-object-shape-key-mirror"),
("bpy.ops.object.shape_key_remove*", "animation/shape_keys/shape_keys_panel.html#bpy-ops-object-shape-key-remove"),
("bpy.ops.object.shape_key_retime*", "animation/shape_keys/shape_keys_panel.html#bpy-ops-object-shape-key-retime"),
("bpy.ops.object.vertex_group_add*", "modeling/meshes/properties/vertex_groups/vertex_groups.html#bpy-ops-object-vertex-group-add"),
("bpy.ops.object.vertex_group_fix*", "sculpt_paint/weight_paint/editing.html#bpy-ops-object-vertex-group-fix"),
("bpy.ops.outliner.collection_new*", "editors/outliner/editing.html#bpy-ops-outliner-collection-new"),
@ -1754,6 +1792,8 @@ url_manual_mapping = (
("bpy.types.shadernodetexgradient*", "render/shader_nodes/textures/gradient.html#bpy-types-shadernodetexgradient"),
("bpy.types.shadernodevectorcurve*", "render/shader_nodes/vector/curves.html#bpy-types-shadernodevectorcurve"),
("bpy.types.shadernodevertexcolor*", "render/shader_nodes/input/vertex_color.html#bpy-types-shadernodevertexcolor"),
("bpy.types.shapekey.relative_key*", "animation/shape_keys/shape_keys_panel.html#bpy-types-shapekey-relative-key"),
("bpy.types.shapekey.vertex_group*", "animation/shape_keys/shape_keys_panel.html#bpy-types-shapekey-vertex-group"),
("bpy.types.smoothgpencilmodifier*", "grease_pencil/modifiers/deform/smooth.html#bpy-types-smoothgpencilmodifier"),
("bpy.types.spline.use_endpoint_u*", "modeling/curves/properties/active_spline.html#bpy-types-spline-use-endpoint-u"),
("bpy.types.surfacedeformmodifier*", "modeling/modifiers/deform/surface_deform.html#bpy-types-surfacedeformmodifier"),
@ -1780,12 +1820,14 @@ url_manual_mapping = (
("bpy.ops.object.make_links_data*", "scene_layout/object/editing/link_transfer/link_data.html#bpy-ops-object-make-links-data"),
("bpy.ops.object.modifier_remove*", "modeling/modifiers/introduction.html#bpy-ops-object-modifier-remove"),
("bpy.ops.object.paths_calculate*", "animation/motion_paths.html#bpy-ops-object-paths-calculate"),
("bpy.ops.object.shape_key_clear*", "animation/shape_keys/shape_keys_panel.html#bpy-ops-object-shape-key-clear"),
("bpy.ops.object.transform_apply*", "scene_layout/object/editing/apply.html#bpy-ops-object-transform-apply"),
("bpy.ops.outliner.lib_operation*", "files/linked_libraries/link_append.html#bpy-ops-outliner-lib-operation"),
("bpy.ops.outliner.orphans_purge*", "editors/outliner/interface.html#bpy-ops-outliner-orphans-purge"),
("bpy.ops.paint.mask_box_gesture*", "sculpt_paint/sculpting/editing/mask.html#bpy-ops-paint-mask-box-gesture"),
("bpy.ops.screen.region_quadview*", "editors/3dview/navigate/views.html#bpy-ops-screen-region-quadview"),
("bpy.ops.screen.screenshot_area*", "interface/window_system/topbar.html#bpy-ops-screen-screenshot-area"),
("bpy.ops.sequencer.change_scene*", "video_editing/edit/montage/editing.html#bpy-ops-sequencer-change-scene"),
("bpy.ops.sequencer.offset_clear*", "video_editing/edit/montage/editing.html#bpy-ops-sequencer-offset-clear"),
("bpy.ops.spreadsheet.toggle_pin*", "editors/spreadsheet.html#bpy-ops-spreadsheet-toggle-pin"),
("bpy.ops.uv.follow_active_quads*", "modeling/meshes/editing/uv.html#bpy-ops-uv-follow-active-quads"),
@ -1861,6 +1903,7 @@ url_manual_mapping = (
("bpy.types.shadernodewavelength*", "render/shader_nodes/converter/wavelength.html#bpy-types-shadernodewavelength"),
("bpy.types.shrinkwrapconstraint*", "animation/constraints/relationship/shrinkwrap.html#bpy-types-shrinkwrapconstraint"),
("bpy.types.simpledeformmodifier*", "modeling/modifiers/deform/simple_deform.html#bpy-types-simpledeformmodifier"),
("bpy.types.soundsequence.volume*", "editors/video_sequencer/sequencer/sidebar/strip.html#bpy-types-soundsequence-volume"),
("bpy.types.spaceclipeditor.show*", "editors/clip/display/index.html#bpy-types-spaceclipeditor-show"),
("bpy.types.spacedopesheeteditor*", "editors/dope_sheet/index.html#bpy-types-spacedopesheeteditor"),
("bpy.types.speedcontrolsequence*", "video_editing/edit/montage/strips/effects/speed_control.html#bpy-types-speedcontrolsequence"),
@ -1880,6 +1923,7 @@ url_manual_mapping = (
("bpy.ops.armature.parent_clear*", "animation/armatures/bones/editing/parenting.html#bpy-ops-armature-parent-clear"),
("bpy.ops.clip.clear_track_path*", "movie_clip/tracking/clip/editing/track.html#bpy-ops-clip-clear-track-path"),
("bpy.ops.clip.set_scene_frames*", "movie_clip/tracking/clip/editing/clip.html#bpy-ops-clip-set-scene-frames"),
("bpy.ops.clip.track_copy_color*", "movie_clip/tracking/clip/sidebar/track/track.html#bpy-ops-clip-track-copy-color"),
("bpy.ops.curve.handle_type_set*", "modeling/curves/editing/control_points.html#bpy-ops-curve-handle-type-set"),
("bpy.ops.curve.spline_type_set*", "modeling/curves/editing/curve.html#bpy-ops-curve-spline-type-set"),
("bpy.ops.file.unpack_libraries*", "files/blend/packed_data.html#bpy-ops-file-unpack-libraries"),
@ -1961,7 +2005,6 @@ url_manual_mapping = (
("bpy.types.material.line_color*", "render/freestyle/material.html#bpy-types-material-line-color"),
("bpy.types.material.pass_index*", "render/materials/settings.html#bpy-types-material-pass-index"),
("bpy.types.mesh.use_paint_mask*", "sculpt_paint/brush/introduction.html#bpy-types-mesh-use-paint-mask"),
("bpy.types.movietrackingcamera*", "movie_clip/tracking/clip/sidebar/track/camera.html#bpy-types-movietrackingcamera"),
("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.particledupliweight*", "physics/particles/emitter/vertex_groups.html#bpy-types-particledupliweight"),
@ -1980,6 +2023,8 @@ url_manual_mapping = (
("bpy.types.shadernodeoutputaov*", "render/shader_nodes/output/aov.html#bpy-types-shadernodeoutputaov"),
("bpy.types.shadernodepointinfo*", "render/shader_nodes/input/point_info.html#bpy-types-shadernodepointinfo"),
("bpy.types.shadernodewireframe*", "render/shader_nodes/input/wireframe.html#bpy-types-shadernodewireframe"),
("bpy.types.shapekey.slider_max*", "animation/shape_keys/shape_keys_panel.html#bpy-types-shapekey-slider-max"),
("bpy.types.shapekey.slider_min*", "animation/shape_keys/shape_keys_panel.html#bpy-types-shapekey-slider-min"),
("bpy.types.spacesequenceeditor*", "editors/video_sequencer/index.html#bpy-types-spacesequenceeditor"),
("bpy.types.spline.resolution_u*", "modeling/curves/properties/active_spline.html#bpy-types-spline-resolution-u"),
("bpy.types.spline.use_bezier_u*", "modeling/curves/properties/active_spline.html#bpy-types-spline-use-bezier-u"),
@ -2036,6 +2081,7 @@ url_manual_mapping = (
("bpy.ops.object.select_linked*", "scene_layout/object/selecting.html#bpy-ops-object-select-linked"),
("bpy.ops.object.select_mirror*", "scene_layout/object/selecting.html#bpy-ops-object-select-mirror"),
("bpy.ops.object.select_random*", "scene_layout/object/selecting.html#bpy-ops-object-select-random"),
("bpy.ops.object.shape_key_add*", "animation/shape_keys/shape_keys_panel.html#bpy-ops-object-shape-key-add"),
("bpy.ops.object.transfer_mode*", "editors/3dview/modes.html#bpy-ops-object-transfer-mode"),
("bpy.ops.outliner.show_active*", "editors/outliner/editing.html#bpy-ops-outliner-show-active"),
("bpy.ops.paint.add_simple_uvs*", "sculpt_paint/texture_paint/tool_settings/texture_slots.html#bpy-ops-paint-add-simple-uvs"),
@ -2236,6 +2282,7 @@ url_manual_mapping = (
("bpy.types.shadernodergbtobw*", "render/shader_nodes/converter/rgb_to_bw.html#bpy-types-shadernodergbtobw"),
("bpy.types.shadernodetangent*", "render/shader_nodes/input/tangent.html#bpy-types-shadernodetangent"),
("bpy.types.shadernodetexwave*", "render/shader_nodes/textures/wave.html#bpy-types-shadernodetexwave"),
("bpy.types.soundsequence.pan*", "editors/video_sequencer/sequencer/sidebar/strip.html#bpy-types-soundsequence-pan"),
("bpy.types.spline.use_smooth*", "modeling/curves/properties/active_spline.html#bpy-types-spline-use-smooth"),
("bpy.types.texturenodebricks*", "editors/texture_node/types/patterns/bricks.html#bpy-types-texturenodebricks"),
("bpy.types.texturenodemixrgb*", "editors/texture_node/types/color/mix_rgb.html#bpy-types-texturenodemixrgb"),
@ -2280,6 +2327,7 @@ url_manual_mapping = (
("bpy.ops.mesh.symmetry_snap*", "modeling/meshes/editing/mesh/snap_symmetry.html#bpy-ops-mesh-symmetry-snap"),
("bpy.ops.node.group_ungroup*", "interface/controls/nodes/groups.html#bpy-ops-node-group-ungroup"),
("bpy.ops.object.gpencil_add*", "grease_pencil/primitives.html#bpy-ops-object-gpencil-add"),
("bpy.ops.object.join_shapes*", "animation/shape_keys/shape_keys_panel.html#bpy-ops-object-join-shapes"),
("bpy.ops.object.paths_clear*", "animation/motion_paths.html#bpy-ops-object-paths-clear"),
("bpy.ops.object.select_less*", "scene_layout/object/selecting.html#bpy-ops-object-select-less"),
("bpy.ops.object.select_more*", "scene_layout/object/selecting.html#bpy-ops-object-select-more"),
@ -2322,6 +2370,7 @@ url_manual_mapping = (
("bpy.types.freestylelineset*", "render/freestyle/view_layer/line_set.html#bpy-types-freestylelineset"),
("bpy.types.greasepencilgrid*", "grease_pencil/properties/display.html#bpy-types-greasepencilgrid"),
("bpy.types.image.alpha_mode*", "editors/image/image_settings.html#bpy-types-image-alpha-mode"),
("bpy.types.key.use_relative*", "animation/shape_keys/shape_keys_panel.html#bpy-types-key-use-relative"),
("bpy.types.mask.frame_start*", "movie_clip/masking/sidebar.html#bpy-types-mask-frame-start"),
("bpy.types.motionpath.color*", "animation/motion_paths.html#bpy-types-motionpath-color"),
("bpy.types.motionpath.lines*", "animation/motion_paths.html#bpy-types-motionpath-lines"),
@ -2353,6 +2402,7 @@ url_manual_mapping = (
("bpy.types.solidifymodifier*", "modeling/modifiers/generate/solidify.html#bpy-types-solidifymodifier"),
("bpy.types.spacefilebrowser*", "editors/file_browser.html#bpy-types-spacefilebrowser"),
("bpy.types.spacegrapheditor*", "editors/graph_editor/index.html#bpy-types-spacegrapheditor"),
("bpy.types.spaceimageeditor*", "editors/image/index.html#bpy-types-spaceimageeditor"),
("bpy.types.spacepreferences*", "editors/preferences/index.html#bpy-types-spacepreferences"),
("bpy.types.spacespreadsheet*", "editors/spreadsheet.html#bpy-types-spacespreadsheet"),
("bpy.types.spaceview3d.lock*", "editors/3dview/sidebar.html#bpy-types-spaceview3d-lock"),
@ -2525,6 +2575,8 @@ url_manual_mapping = (
("bpy.types.shaderfxshadow*", "grease_pencil/visual_effects/shadow.html#bpy-types-shaderfxshadow"),
("bpy.types.shadernodebump*", "render/shader_nodes/vector/bump.html#bpy-types-shadernodebump"),
("bpy.types.shadernodemath*", "render/shader_nodes/converter/math.html#bpy-types-shadernodemath"),
("bpy.types.shapekey.frame*", "animation/shape_keys/shape_keys_panel.html#bpy-types-shapekey-frame"),
("bpy.types.shapekey.value*", "animation/shape_keys/shape_keys_panel.html#bpy-types-shapekey-value"),
("bpy.types.smoothmodifier*", "modeling/modifiers/deform/smooth.html#bpy-types-smoothmodifier"),
("bpy.types.sound.use_mono*", "editors/video_sequencer/sequencer/sidebar/strip.html#bpy-types-sound-use-mono"),
("bpy.types.spline.order_u*", "modeling/curves/properties/active_spline.html#bpy-types-spline-order-u"),
@ -2604,6 +2656,7 @@ url_manual_mapping = (
("bpy.types.editbone.tail*", "animation/armatures/bones/properties/transform.html#bpy-types-editbone-tail"),
("bpy.types.fieldsettings*", "physics/forces/force_fields/index.html#bpy-types-fieldsettings"),
("bpy.types.imagesequence*", "video_editing/edit/montage/strips/image.html#bpy-types-imagesequence"),
("bpy.types.key.eval_time*", "animation/shape_keys/shape_keys_panel.html#bpy-types-key-eval-time"),
("bpy.types.marbletexture*", "render/materials/legacy_textures/types/marble.html#bpy-types-marbletexture"),
("bpy.types.modifier.name*", "modeling/modifiers/introduction.html#bpy-types-modifier-name"),
("bpy.types.modifier.show*", "modeling/modifiers/introduction.html#bpy-types-modifier-show"),
@ -2624,6 +2677,7 @@ url_manual_mapping = (
("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.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"),
("bpy.types.spaceoutliner*", "editors/outliner/index.html#bpy-types-spaceoutliner"),
("bpy.types.spacetimeline*", "editors/timeline.html#bpy-types-spacetimeline"),
@ -2746,6 +2800,7 @@ url_manual_mapping = (
("bpy.ops.wm.obj_export*", "files/import_export/obj.html#bpy-ops-wm-obj-export"),
("bpy.ops.wm.obj_import*", "files/import_export/obj.html#bpy-ops-wm-obj-import"),
("bpy.ops.wm.properties*", "files/data_blocks.html#bpy-ops-wm-properties"),
("bpy.ops.wm.stl_import*", "files/import_export/stl.html#bpy-ops-wm-stl-import"),
("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"),
@ -2877,6 +2932,7 @@ url_manual_mapping = (
("bpy.ops.mesh.inset*", "modeling/meshes/editing/face/inset_faces.html#bpy-ops-mesh-inset"),
("bpy.ops.mesh.knife*", "modeling/meshes/tools/knife.html#bpy-ops-mesh-knife"),
("bpy.ops.mesh.merge*", "modeling/meshes/editing/mesh/merge.html#bpy-ops-mesh-merge"),
("bpy.ops.mesh.relax*", "addons/mesh/edit_mesh_tools.html#bpy-ops-mesh-relax"),
("bpy.ops.mesh.screw*", "modeling/meshes/editing/edge/screw.html#bpy-ops-mesh-screw"),
("bpy.ops.mesh.split*", "modeling/meshes/editing/mesh/split.html#bpy-ops-mesh-split"),
("bpy.ops.nla.delete*", "editors/nla/editing.html#bpy-ops-nla-delete"),

View File

@ -8,8 +8,8 @@ from bpy.app.translations import pgettext_data as data_
def geometry_node_group_empty_new():
group = bpy.data.node_groups.new(data_("Geometry Nodes"), 'GeometryNodeTree')
group.inputs.new('NodeSocketGeometry', "Geometry")
group.outputs.new('NodeSocketGeometry', "Geometry")
group.inputs.new('NodeSocketGeometry', data_("Geometry"))
group.outputs.new('NodeSocketGeometry', data_("Geometry"))
input_node = group.nodes.new('NodeGroupInput')
output_node = group.nodes.new('NodeGroupOutput')
output_node.is_active_output = True

View File

@ -4,6 +4,8 @@ import bpy
from bpy.types import Panel
from rna_prop_ui import PropertyPanel
from bpy.app.translations import contexts as i18n_contexts
class BoneButtonsPanel:
bl_space_type = 'PROPERTIES'
@ -156,8 +158,8 @@ class BONE_PT_curved(BoneButtonsPanel, Panel):
col.prop(bbone, "bbone_scaleout", text="Scale Out")
col = topcol.column(align=True)
col.prop(bbone, "bbone_easein", text="Ease In")
col.prop(bbone, "bbone_easeout", text="Out")
col.prop(bbone, "bbone_easein", text="Ease In", text_ctxt=i18n_contexts.id_armature)
col.prop(bbone, "bbone_easeout", text="Out", text_ctxt=i18n_contexts.id_armature)
col.prop(bone, "use_scale_easing")
col = topcol.column(align=True)
@ -177,7 +179,7 @@ class BONE_PT_curved(BoneButtonsPanel, Panel):
row2.prop(bone, "bbone_handle_use_scale_start", index=0, text="X", toggle=True)
row2.prop(bone, "bbone_handle_use_scale_start", index=1, text="Y", toggle=True)
row2.prop(bone, "bbone_handle_use_scale_start", index=2, text="Z", toggle=True)
split2.prop(bone, "bbone_handle_use_ease_start", text="Ease", toggle=True)
split2.prop(bone, "bbone_handle_use_ease_start", text="Ease", text_ctxt=i18n_contexts.id_armature, toggle=True)
row.label(icon='BLANK1')
col = topcol.column(align=True)
@ -197,7 +199,7 @@ class BONE_PT_curved(BoneButtonsPanel, Panel):
row2.prop(bone, "bbone_handle_use_scale_end", index=0, text="X", toggle=True)
row2.prop(bone, "bbone_handle_use_scale_end", index=1, text="Y", toggle=True)
row2.prop(bone, "bbone_handle_use_scale_end", index=2, text="Z", toggle=True)
split2.prop(bone, "bbone_handle_use_ease_end", text="Ease", toggle=True)
split2.prop(bone, "bbone_handle_use_ease_end", text="Ease", text_ctxt=i18n_contexts.id_armature, toggle=True)
row.label(icon='BLANK1')

View File

@ -1,6 +1,8 @@
# SPDX-License-Identifier: GPL-2.0-or-later
from bpy.types import Header, Menu
from bpy.app.translations import contexts as i18n_contexts
class INFO_HT_header(Header):
bl_space_type = 'INFO'
@ -61,6 +63,7 @@ class INFO_MT_info(Menu):
class INFO_MT_area(Menu):
bl_label = "Area"
bl_translation_context = i18n_contexts.id_windowmanager
def draw(self, context):
layout = self.layout

View File

@ -1928,10 +1928,12 @@ class USERPREF_PT_addons(AddOnPanel, Panel):
if is_visible:
if search and not (
(search in info["name"].lower()) or
(search in info["name"].lower() or
search in iface_(info["name"]).lower()) or
(info["author"] and (search in info["author"].lower())) or
((filter == "All") and (search in info["category"].lower()))
):
((filter == "All") and (search in info["category"].lower() or
search in iface_(info["category"]).lower()))
):
continue
# Addon UI Code
@ -1954,7 +1956,7 @@ class USERPREF_PT_addons(AddOnPanel, Panel):
sub = row.row()
sub.active = is_enabled
sub.label(text="%s: %s" % (info["category"], info["name"]))
sub.label(text=iface_("%s: %s") % (iface_(info["category"]), iface_(info["name"])))
if info["warning"]:
sub.label(icon='ERROR')
@ -1967,11 +1969,11 @@ class USERPREF_PT_addons(AddOnPanel, Panel):
if info["description"]:
split = colsub.row().split(factor=0.15)
split.label(text="Description:")
split.label(text=info["description"])
split.label(text=tip_(info["description"]))
if info["location"]:
split = colsub.row().split(factor=0.15)
split.label(text="Location:")
split.label(text=info["location"])
split.label(text=tip_(info["location"]))
if mod:
split = colsub.row().split(factor=0.15)
split.label(text="File:")

View File

@ -1742,6 +1742,12 @@ class VIEW3D_PT_tools_grease_pencil_brush_post_processing(View3DPanel, Panel):
col1 = col.column(align=True)
col1.prop(gp_settings, "use_trim")
row = col.row(heading="Outline", align=True)
row.prop(gp_settings, "use_settings_outline", text="")
row2 = row.row(align=True)
row2.enabled = gp_settings.use_settings_outline
row2.prop(gp_settings, "material_alt", text="")
class VIEW3D_PT_tools_grease_pencil_brush_random(View3DPanel, Panel):
bl_context = ".greasepencil_paint"

View File

@ -99,7 +99,7 @@ bool blf_font_id_is_valid(int fontid)
static int blf_search(const char *name)
{
for (int i = 0; i < BLF_MAX_FONT; i++) {
FontBLF *font = global_font[i];
const FontBLF *font = global_font[i];
if (font && (STREQ(font->name, name))) {
return i;
}
@ -484,7 +484,7 @@ void BLF_batch_draw_end(void)
g_batch.enabled = false;
}
static void blf_draw_gl__start(FontBLF *font)
static void blf_draw_gl__start(const FontBLF *font)
{
/*
* The pixmap alignment hack is handle
@ -512,7 +512,7 @@ static void blf_draw_gl__start(FontBLF *font)
}
}
static void blf_draw_gl__end(FontBLF *font)
static void blf_draw_gl__end(const FontBLF *font)
{
if ((font->flags & (BLF_ROTATION | BLF_MATRIX | BLF_ASPECT)) != 0) {
GPU_matrix_pop();

View File

@ -128,11 +128,10 @@ static void blf_size_finalizer(void *object)
/** \name FreeType Utilities (Internal)
* \{ */
/* Return glyph id from charcode. */
uint blf_get_char_index(struct FontBLF *font, uint charcode)
uint blf_get_char_index(FontBLF *font, uint charcode)
{
if (font->flags & BLF_CACHED) {
/* Use charmap cache for much faster lookup. */
/* Use char-map cache for much faster lookup. */
return FTC_CMapCache_Lookup(ftc_charmap_cache, font, -1, charcode);
}
/* Fonts that are not cached need to use the regular lookup function. */
@ -149,7 +148,7 @@ static ft_pix blf_unscaled_F26Dot6_to_pixels(FontBLF *font, FT_Pos value)
FT_Long scaled = FT_MulFix(value, font->ft_size->metrics.x_scale);
/* Copied from FreeType's FT_Get_Kerning (with FT_KERNING_DEFAULT), scaling down */
/* kerning distances at small ppem values so that they don't become too big. */
/* kerning distances at small PPEM values so that they don't become too big. */
if (font->ft_size->metrics.x_ppem < 25) {
scaled = FT_MulDiv(scaled, font->ft_size->metrics.x_ppem, 25);
}

View File

@ -63,7 +63,7 @@ static FT_Fixed to_16dot16(double val)
/** \name Glyph Cache
* \{ */
static GlyphCacheBLF *blf_glyph_cache_find(FontBLF *font, const float size, uint dpi)
static GlyphCacheBLF *blf_glyph_cache_find(const FontBLF *font, const float size, uint dpi)
{
GlyphCacheBLF *gc = (GlyphCacheBLF *)font->cache.first;
while (gc) {

View File

@ -46,6 +46,9 @@ void blf_font_exit(void);
bool blf_font_id_is_valid(int fontid);
/**
* Return glyph id from char-code.
*/
uint blf_get_char_index(struct FontBLF *font, uint charcode);
bool blf_ensure_face(struct FontBLF *font);

View File

@ -33,7 +33,7 @@ void BKE_cachefile_eval(struct Main *bmain,
bool BKE_cachefile_filepath_get(const struct Main *bmain,
const struct Depsgraph *depsgrah,
const struct CacheFile *cache_file,
char r_filename[1024]);
char r_filepath[1024]);
double BKE_cachefile_time_offset(const struct CacheFile *cache_file, double time, double fps);
@ -53,10 +53,12 @@ void BKE_cachefile_reader_free(struct CacheFile *cache_file, struct CacheReader
bool BKE_cache_file_uses_render_procedural(const struct CacheFile *cache_file,
struct Scene *scene);
/* Add a layer to the cache_file. Return NULL if the filename is already that of an existing layer
* or if the number of layers exceeds the maximum allowed layer count. */
/**
* Add a layer to the cache_file. Return NULL if the `filepath` is already that of an existing
* layer or if the number of layers exceeds the maximum allowed layer count.
*/
struct CacheFileLayer *BKE_cachefile_add_layer(struct CacheFile *cache_file,
const char filename[1024]);
const char filepath[1024]);
struct CacheFileLayer *BKE_cachefile_get_active_layer(struct CacheFile *cache_file);

View File

@ -1,85 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright 2022 Blender Foundation. All rights reserved. */
#pragma once
/** \file
* \ingroup bke
*
* API to manage principle properties in data-blocks.
*
* Principle properties are properties that are defined as the ones most user will need to
* edit when using this data-block.
*
* They current main usage in is library overrides.
*
* \note `BKE_lib_` files are for operations over data-blocks themselves, although they might
* alter Main as well (when creating/renaming/deleting an ID e.g.).
*
* \section Function Names
*
* - `BKE_lib_principleprop_` should be used for function affecting a single ID.
* - `BKE_lib_principleprop_main_` should be used for function affecting the whole collection
* of IDs in a given Main data-base.
*/
#ifdef __cplusplus
extern "C" {
#endif
struct ID;
struct IDPrincipleProperties;
struct IDPrincipleProperty;
struct PointerRNA;
struct PropertyRNA;
struct ReportList;
/**
* Initialize empty list of principle properties for \a id.
*/
struct IDPrincipleProperties *BKE_lib_principleprop_init(struct ID *id);
#if 0
/**
* Shallow or deep copy of a whole principle properties from \a src_id to \a dst_id.
*/
void BKE_lib_principleprop_copy(struct ID *dst_id, const struct ID *src_id, bool do_full_copy);
#endif
/**
* Clear any principle properties data from given \a override.
*/
void BKE_lib_principleprop_clear(struct IDPrincipleProperties *principle_props, bool do_id_user);
/**
* Free given \a principle_props.
*/
void BKE_lib_principleprop_free(struct IDPrincipleProperties **principle_props, bool do_id_user);
/**
* Find principle property from given RNA path, if it exists.
*/
struct IDPrincipleProperty *BKE_lib_principleprop_find(
struct IDPrincipleProperties *principle_props, const char *rna_path);
/**
* Find principle property from given RNA path, or create it if it does not exist.
*/
struct IDPrincipleProperty *BKE_lib_principleprop_get(
struct IDPrincipleProperties *principle_props, const char *rna_path, bool *r_created);
/**
* Remove and free given \a principle_prop from given ID \a principle_props.
*/
void BKE_lib_principleprop_delete(struct IDPrincipleProperties *principle_props,
struct IDPrincipleProperty *principle_prop);
/**
* Get the RNA-property matching the \a principle_prop principle property. Used for UI to query
* additional data about the principle property (e.g. UI name).
*
* \param idpoin: RNA Pointer of the ID.
* \param principle_prop: The principle property to find the matching RNA property for.
*/
bool BKE_lib_principleprop_rna_property_find(struct PointerRNA *idpoin,
const struct IDPrincipleProperty *principle_prop,
struct PointerRNA *r_principle_poin,
struct PropertyRNA **r_principle_prop);
#ifdef __cplusplus
}
#endif

View File

@ -55,7 +55,7 @@ struct wmWindowManager;
typedef struct wmSpaceTypeListenerParams {
struct wmWindow *window;
struct ScrArea *area;
struct wmNotifier *notifier;
const struct wmNotifier *notifier;
const struct Scene *scene;
} wmSpaceTypeListenerParams;
@ -124,7 +124,7 @@ typedef struct wmRegionListenerParams {
struct wmWindow *window;
struct ScrArea *area; /* Can be NULL when the region is not part of an area. */
struct ARegion *region;
struct wmNotifier *notifier;
const struct wmNotifier *notifier;
const struct Scene *scene;
} wmRegionListenerParams;

View File

@ -114,6 +114,7 @@ int BKE_volume_grid_channels(const struct VolumeGrid *grid);
* Transformation from index space to object space.
*/
void BKE_volume_grid_transform_matrix(const struct VolumeGrid *grid, float mat[4][4]);
void BKE_volume_grid_transform_matrix_set(struct VolumeGrid *volume_grid, const float mat[4][4]);
/* Volume Editing
*
@ -133,6 +134,11 @@ struct VolumeGrid *BKE_volume_grid_add(struct Volume *volume,
VolumeGridType type);
void BKE_volume_grid_remove(struct Volume *volume, struct VolumeGrid *grid);
/**
* Openvdb crashes when the determinant of the transform matrix becomes too small.
*/
bool BKE_volume_grid_determinant_valid(double determinant);
/* Simplify */
int BKE_volume_simplify_level(const struct Depsgraph *depsgraph);
float BKE_volume_simplify_factor(const struct Depsgraph *depsgraph);
@ -186,6 +192,9 @@ openvdb::GridBase::Ptr BKE_volume_grid_openvdb_for_write(const struct Volume *vo
struct VolumeGrid *grid,
bool clear);
void BKE_volume_grid_clear_tree(Volume &volume, VolumeGrid &volume_grid);
void BKE_volume_grid_clear_tree(openvdb::GridBase &grid);
VolumeGridType BKE_volume_grid_type_openvdb(const openvdb::GridBase &grid);
template<typename OpType>

View File

@ -398,6 +398,7 @@ set(SRC
BKE_image_format.h
BKE_image_partial_update.hh
BKE_image_save.h
BKE_image_wrappers.hh
BKE_ipo.h
BKE_kelvinlet.h
BKE_key.h
@ -449,6 +450,7 @@ set(SRC
BKE_paint.h
BKE_particle.h
BKE_pbvh.h
BKE_pbvh_pixels.hh
BKE_pointcache.h
BKE_pointcloud.h
BKE_preferences.h

View File

@ -516,7 +516,7 @@ CatalogFilePath AssetCatalogService::find_suitable_cdf_path_for_writing(
sizeof(asset_lib_cdf_path),
suitable_root_path,
DEFAULT_CATALOG_FILENAME.c_str(),
NULL);
nullptr);
return asset_lib_cdf_path;
}

View File

@ -288,6 +288,10 @@ CustomDataLayer *BKE_id_attribute_duplicate(ID *id, const char *name, ReportList
bool BKE_id_attribute_remove(ID *id, const char *name, ReportList *reports)
{
using namespace blender::bke;
if (!name || name[0] == '\0') {
BKE_report(reports, RPT_ERROR, "The attribute name must not be empty");
return false;
}
if (BKE_id_attribute_required(id, name)) {
BKE_report(reports, RPT_ERROR, "Attribute is required and can't be removed");
return false;

View File

@ -186,6 +186,7 @@ static void brush_foreach_id(ID *id, LibraryForeachIDData *data)
BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, brush->paint_curve, IDWALK_CB_USER);
if (brush->gpencil_settings) {
BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, brush->gpencil_settings->material, IDWALK_CB_USER);
BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, brush->gpencil_settings->material_alt, IDWALK_CB_USER);
}
BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL(data, BKE_texture_mtex_foreach_id(data, &brush->mtex));
BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL(data,
@ -346,6 +347,7 @@ static void brush_blend_read_lib(BlendLibReader *reader, ID *id)
else {
brush->gpencil_settings->material = nullptr;
}
BLO_read_id_address(reader, brush->id.lib, &brush->gpencil_settings->material_alt);
}
}
@ -358,6 +360,7 @@ static void brush_blend_read_expand(BlendExpander *expander, ID *id)
BLO_expand(expander, brush->paint_curve);
if (brush->gpencil_settings != nullptr) {
BLO_expand(expander, brush->gpencil_settings->material);
BLO_expand(expander, brush->gpencil_settings->material_alt);
}
}
@ -704,6 +707,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type)
/* Set vertex mix factor. */
brush->gpencil_settings->vertex_mode = GPPAINT_MODE_BOTH;
brush->gpencil_settings->vertex_factor = 1.0f;
brush->gpencil_settings->material_alt = nullptr;
switch (type) {
case GP_BRUSH_PRESET_AIRBRUSH: {

View File

@ -429,10 +429,10 @@ bool BKE_cache_file_uses_render_procedural(const CacheFile *cache_file, Scene *s
return cache_file->use_render_procedural;
}
CacheFileLayer *BKE_cachefile_add_layer(CacheFile *cache_file, const char filename[1024])
CacheFileLayer *BKE_cachefile_add_layer(CacheFile *cache_file, const char filepath[1024])
{
for (CacheFileLayer *layer = cache_file->layers.first; layer; layer = layer->next) {
if (STREQ(layer->filepath, filename)) {
if (STREQ(layer->filepath, filepath)) {
return NULL;
}
}
@ -440,7 +440,7 @@ CacheFileLayer *BKE_cachefile_add_layer(CacheFile *cache_file, const char filena
const int num_layers = BLI_listbase_count(&cache_file->layers);
CacheFileLayer *layer = MEM_callocN(sizeof(CacheFileLayer), "CacheFileLayer");
BLI_strncpy(layer->filepath, filename, sizeof(layer->filepath));
BLI_strncpy(layer->filepath, filepath, sizeof(layer->filepath));
BLI_addtail(&cache_file->layers, layer);

View File

@ -255,6 +255,12 @@ void CurvesGeometry::fill_curve_types(const IndexMask selection, const CurveType
this->fill_curve_types(type);
return;
}
if (std::optional<int8_t> single_type = this->curve_types().get_if_single()) {
if (single_type == type) {
/* No need for an array if the types are already a single with the correct type. */
return;
}
}
/* A potential performance optimization is only counting the changed indices. */
this->curve_types_for_write().fill_indices(selection, type);
this->update_curve_types();

View File

@ -1248,7 +1248,7 @@ Image *BKE_image_add_generated(Main *bmain,
static void image_colorspace_from_imbuf(Image *image, const ImBuf *ibuf)
{
const char *colorspace_name = NULL;
const char *colorspace_name = nullptr;
if (ibuf->rect_float) {
if (ibuf->float_colorspace) {

View File

@ -1,106 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright 2022 Blender Foundation. All rights reserved. */
/** \file
* \ingroup bke
*/
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include "CLG_log.h"
#include "MEM_guardedalloc.h"
#include "DNA_ID.h"
#include "BKE_lib_id.h"
#include "BKE_lib_principle_properties.h"
#include "BKE_report.h"
#include "BLO_readfile.h"
#include "BLI_listbase.h"
#include "BLI_string.h"
#include "RNA_access.h"
#include "RNA_prototypes.h"
#include "RNA_types.h"
static CLG_LogRef LOG = {"bke.idprincipleprops"};
IDPrincipleProperties *BKE_lib_principleprop_init(ID *id)
{
BLI_assert(id->principle_properties == NULL);
/* Else, generate new empty override. */
id->principle_properties = MEM_callocN(sizeof(*id->principle_properties), __func__);
return id->principle_properties;
}
void BKE_lib_principleprop_clear(IDPrincipleProperties *principle_props, bool UNUSED(do_id_user))
{
LISTBASE_FOREACH_MUTABLE (IDPrincipleProperty *, pprop, &principle_props->properties) {
BLI_assert(pprop->rna_path != NULL);
MEM_freeN(pprop->rna_path);
MEM_freeN(pprop);
}
BLI_listbase_clear(&principle_props->properties);
principle_props->flag = 0;
}
void BKE_lib_principleprop_free(IDPrincipleProperties **principle_props, bool do_id_user)
{
BLI_assert(*principle_props != NULL);
BKE_lib_principleprop_clear(*principle_props, do_id_user);
MEM_freeN(*principle_props);
*principle_props = NULL;
}
IDPrincipleProperty *BKE_lib_principleprop_find(IDPrincipleProperties *principle_props,
const char *rna_path)
{
return BLI_findstring_ptr(
&principle_props->properties, rna_path, offsetof(IDPrincipleProperty, rna_path));
}
IDPrincipleProperty *BKE_lib_principleprop_get(IDPrincipleProperties *principle_props,
const char *rna_path,
bool *r_created)
{
IDPrincipleProperty *pprop = BKE_lib_principleprop_find(principle_props, rna_path);
if (pprop == NULL) {
pprop = MEM_callocN(sizeof(*pprop), __func__);
pprop->rna_path = BLI_strdup(rna_path);
BLI_addtail(&principle_props->properties, pprop);
if (r_created) {
*r_created = true;
}
}
else if (r_created) {
*r_created = false;
}
return pprop;
}
void BKE_lib_principleprop_delete(IDPrincipleProperties *principle_props,
IDPrincipleProperty *principle_prop)
{
BLI_remlink(&principle_props->properties, principle_prop);
}
bool BKE_lib_principleprop_rna_property_find(struct PointerRNA *idpoin,
const struct IDPrincipleProperty *principle_prop,
struct PointerRNA *r_principle_poin,
struct PropertyRNA **r_principle_prop)
{
BLI_assert(RNA_struct_is_ID(idpoin->type));
return RNA_path_resolve_property(
idpoin, principle_prop->rna_path, r_principle_poin, r_principle_prop);
}

View File

@ -250,10 +250,10 @@ MetaElem *BKE_mball_element_add(MetaBall *mb, const int type)
BoundBox *BKE_mball_boundbox_get(Object *ob)
{
BLI_assert(ob->type == OB_MBALL);
if (ob->runtime.bb != NULL && (ob->runtime.bb->flag & BOUNDBOX_DIRTY) == 0) {
if (ob->runtime.bb != nullptr && (ob->runtime.bb->flag & BOUNDBOX_DIRTY) == 0) {
return ob->runtime.bb;
}
if (ob->runtime.bb == NULL) {
if (ob->runtime.bb == nullptr) {
ob->runtime.bb = MEM_cnew<BoundBox>(__func__);
}
@ -682,7 +682,7 @@ void BKE_mball_data_update(Depsgraph *depsgraph, Scene *scene, Object *ob)
}
Mesh *mesh = BKE_mball_polygonize(depsgraph, scene, ob);
if (mesh == NULL) {
if (mesh == nullptr) {
return;
}
@ -693,14 +693,14 @@ void BKE_mball_data_update(Depsgraph *depsgraph, Scene *scene, Object *ob)
if (ob->parent && ob->parent->type == OB_LATTICE && ob->partype == PARSKEL) {
int verts_num;
float(*positions)[3] = BKE_mesh_vert_coords_alloc(mesh, &verts_num);
BKE_lattice_deform_coords(ob->parent, ob, positions, verts_num, 0, NULL, 1.0f);
BKE_lattice_deform_coords(ob->parent, ob, positions, verts_num, 0, nullptr, 1.0f);
BKE_mesh_vert_coords_apply(mesh, positions);
MEM_freeN(positions);
}
ob->runtime.geometry_set_eval = new GeometrySet(GeometrySet::create_with_mesh(mesh));
if (ob->runtime.bb == NULL) {
if (ob->runtime.bb == nullptr) {
ob->runtime.bb = MEM_cnew<BoundBox>(__func__);
}
blender::float3 min(std::numeric_limits<float>::max());

View File

@ -343,7 +343,7 @@ static Mesh *mesh_wrapper_ensure_subdivision(Mesh *me)
if (use_clnors) {
float(*lnors)[3] = static_cast<float(*)[3]>(
CustomData_get_layer(&subdiv_mesh->ldata, CD_NORMAL));
BLI_assert(lnors != NULL);
BLI_assert(lnors != nullptr);
BKE_mesh_set_custom_normals(subdiv_mesh, lnors);
CustomData_set_layer_flag(&me->ldata, CD_NORMAL, CD_FLAG_TEMPORARY);
CustomData_set_layer_flag(&subdiv_mesh->ldata, CD_NORMAL, CD_FLAG_TEMPORARY);

View File

@ -3384,7 +3384,7 @@ struct bNodeSocket *ntreeAddSocketInterfaceFromSocket(bNodeTree *ntree,
bNodeSocket *from_sock)
{
bNodeSocket *iosock = ntreeAddSocketInterface(
ntree, static_cast<eNodeSocketInOut>(from_sock->in_out), from_sock->idname, from_sock->name);
ntree, static_cast<eNodeSocketInOut>(from_sock->in_out), from_sock->idname, DATA_(from_sock->name));
if (iosock) {
if (iosock->typeinfo->interface_from_socket) {
iosock->typeinfo->interface_from_socket(ntree, iosock, from_node, from_sock);

View File

@ -1616,7 +1616,7 @@ static bool sculpt_modifiers_active(Scene *scene, Sculpt *sd, Object *ob)
*/
static void sculpt_update_object(Depsgraph *depsgraph,
Object *ob,
Mesh *me_eval,
Object *ob_eval,
bool need_pmap,
bool need_mask,
bool is_paint_tool)
@ -1625,9 +1625,12 @@ static void sculpt_update_object(Depsgraph *depsgraph,
Sculpt *sd = scene->toolsettings->sculpt;
SculptSession *ss = ob->sculpt;
const Mesh *me = BKE_object_get_original_mesh(ob);
Mesh *me_eval = BKE_object_get_evaluated_mesh(ob_eval);
MultiresModifierData *mmd = BKE_sculpt_multires_active(scene, ob);
const bool use_face_sets = (ob->mode & OB_MODE_SCULPT) != 0;
BLI_assert(me_eval != nullptr);
ss->depsgraph = depsgraph;
ss->deform_modifiers_active = sculpt_modifiers_active(scene, sd, ob);
@ -1733,7 +1736,26 @@ static void sculpt_update_object(Depsgraph *depsgraph,
pbvh_show_face_sets_set(ss->pbvh, ss->show_face_sets);
if (ss->deform_modifiers_active) {
if (!ss->orig_cos) {
/* Painting doesn't need crazyspace, use already evaluated mesh coordinates. */
if (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT)) {
Mesh *me_eval_deform = ob_eval->runtime.mesh_deform_eval;
/* If the fully evaluated mesh has the same topology as the deform-only version, use it.
* This matters because 'deform eval' is very restrictive and excludes even modifiers that
* simply recompute vertex weights. */
if (me_eval_deform->mpoly == me_eval->mpoly && me_eval_deform->mloop == me_eval->mloop &&
me_eval_deform->totvert == me_eval->totvert) {
me_eval_deform = me_eval;
}
BKE_sculptsession_free_deformMats(ss);
BLI_assert(me_eval_deform->totvert == me->totvert);
ss->deform_cos = BKE_mesh_vert_coords_alloc(me_eval_deform, NULL);
BKE_pbvh_vert_coords_apply(ss->pbvh, ss->deform_cos, me->totvert);
}
else if (!ss->orig_cos) {
int a;
BKE_sculptsession_free_deformMats(ss);
@ -1871,10 +1893,8 @@ void BKE_sculpt_update_object_after_eval(Depsgraph *depsgraph, Object *ob_eval)
/* Update after mesh evaluation in the dependency graph, to rebuild PBVH or
* other data when modifiers change the mesh. */
Object *ob_orig = DEG_get_original_object(ob_eval);
Mesh *me_eval = BKE_object_get_evaluated_mesh(ob_eval);
BLI_assert(me_eval != nullptr);
sculpt_update_object(depsgraph, ob_orig, me_eval, false, false, false);
sculpt_update_object(depsgraph, ob_orig, ob_eval, false, false, false);
}
void BKE_sculpt_color_layer_create_if_needed(Object *object)
@ -1917,10 +1937,8 @@ void BKE_sculpt_update_object_for_edit(
BLI_assert(ob_orig == DEG_get_original_object(ob_orig));
Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob_orig);
Mesh *me_eval = BKE_object_get_evaluated_mesh(ob_eval);
BLI_assert(me_eval != nullptr);
sculpt_update_object(depsgraph, ob_orig, me_eval, need_pmap, need_mask, is_paint_tool);
sculpt_update_object(depsgraph, ob_orig, ob_eval, need_pmap, need_mask, is_paint_tool);
}
int BKE_sculpt_mask_layers_ensure(Object *ob, MultiresModifierData *mmd)

View File

@ -1304,7 +1304,7 @@ static int ptcache_frame_from_filename(const char *filename, const char *ext)
#define MAX_PTCACHE_PATH FILE_MAX
#define MAX_PTCACHE_FILE (FILE_MAX * 2)
static int ptcache_path(PTCacheID *pid, char *filename)
static int ptcache_path(PTCacheID *pid, char *dirname)
{
const char *blendfile_path = BKE_main_blendfile_path_from_global();
Library *lib = (pid->owner_id) ? pid->owner_id->lib : NULL;
@ -1314,13 +1314,13 @@ static int ptcache_path(PTCacheID *pid, char *filename)
size_t i;
if (pid->cache->flag & PTCACHE_EXTERNAL) {
strcpy(filename, pid->cache->path);
strcpy(dirname, pid->cache->path);
if (BLI_path_is_rel(filename)) {
BLI_path_abs(filename, blendfilename);
if (BLI_path_is_rel(dirname)) {
BLI_path_abs(dirname, blendfilename);
}
return BLI_path_slash_ensure(filename); /* new strlen() */
return BLI_path_slash_ensure(dirname); /* new strlen() */
}
if ((blendfile_path[0] != '\0') || lib) {
char file[MAX_PTCACHE_PATH]; /* we don't want the dir, only the file */
@ -1334,28 +1334,28 @@ static int ptcache_path(PTCacheID *pid, char *filename)
}
/* Add blend file name to pointcache dir. */
BLI_snprintf(filename, MAX_PTCACHE_PATH, "//" PTCACHE_PATH "%s", file);
BLI_snprintf(dirname, MAX_PTCACHE_PATH, "//" PTCACHE_PATH "%s", file);
BLI_path_abs(filename, blendfilename);
return BLI_path_slash_ensure(filename); /* new strlen() */
BLI_path_abs(dirname, blendfilename);
return BLI_path_slash_ensure(dirname); /* new strlen() */
}
/* use the temp path. this is weak but better than not using point cache at all */
/* temporary directory is assumed to exist and ALWAYS has a trailing slash */
BLI_snprintf(filename, MAX_PTCACHE_PATH, "%s" PTCACHE_PATH, BKE_tempdir_session());
BLI_snprintf(dirname, MAX_PTCACHE_PATH, "%s" PTCACHE_PATH, BKE_tempdir_session());
return BLI_path_slash_ensure(filename); /* new strlen() */
return BLI_path_slash_ensure(dirname); /* new strlen() */
}
static size_t ptcache_filename_ext_append(PTCacheID *pid,
char *filename,
const size_t filename_len,
static size_t ptcache_filepath_ext_append(PTCacheID *pid,
char *filepath,
const size_t filepath_len,
const bool use_frame_number,
const int cfra)
{
size_t len = filename_len;
size_t len = filepath_len;
char *filename_ext;
filename_ext = filename + filename_len;
filename_ext = filepath + filepath_len;
*filename_ext = '\0';
/* PointCaches are inserted in object's list on demand, we need a valid index now. */
@ -1399,14 +1399,14 @@ static size_t ptcache_filename_ext_append(PTCacheID *pid,
return len;
}
static int ptcache_filename(
PTCacheID *pid, char *filename, int cfra, const bool do_path, const bool do_ext)
static int ptcache_filepath(
PTCacheID *pid, char *filepath, int cfra, const bool do_path, const bool do_ext)
{
int len = 0;
char *idname;
char *newname;
filename[0] = '\0';
newname = filename;
filepath[0] = '\0';
newname = filepath;
if ((pid->cache->flag & PTCACHE_EXTERNAL) == 0) {
const char *blendfile_path = BKE_main_blendfile_path_from_global();
@ -1417,7 +1417,7 @@ static int ptcache_filename(
/* start with temp dir */
if (do_path) {
len = ptcache_path(pid, filename);
len = ptcache_path(pid, filepath);
newname += len;
}
if (pid->cache->name[0] == '\0' && (pid->cache->flag & PTCACHE_EXTERNAL) == 0) {
@ -1437,7 +1437,7 @@ static int ptcache_filename(
}
if (do_ext) {
len += ptcache_filename_ext_append(pid, filename, (size_t)len, true, cfra);
len += ptcache_filepath_ext_append(pid, filepath, (size_t)len, true, cfra);
}
return len; /* make sure the above string is always 16 chars */
@ -1465,7 +1465,7 @@ static PTCacheFile *ptcache_file_open(PTCacheID *pid, int mode, int cfra)
}
}
ptcache_filename(pid, filepath, cfra, true, true);
ptcache_filepath(pid, filepath, cfra, true, true);
if (mode == PTCACHE_FILE_READ) {
fp = BLI_fopen(filepath, "rb");
@ -2596,7 +2596,7 @@ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, unsigned int cfra)
DIR *dir;
struct dirent *de;
char path[MAX_PTCACHE_PATH];
char filename[MAX_PTCACHE_FILE];
char filepath[MAX_PTCACHE_FILE];
char path_full[MAX_PTCACHE_FILE];
char ext[MAX_PTCACHE_PATH];
@ -2631,20 +2631,20 @@ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, unsigned int cfra)
return;
}
len = ptcache_filename(pid, filename, cfra, false, false); /* no path */
len = ptcache_filepath(pid, filepath, cfra, false, false); /* no path */
/* append underscore terminator to ensure we don't match similar names
* from objects whose names start with the same prefix
*/
if (len < sizeof(filename) - 2) {
BLI_strncpy(filename + len, "_", sizeof(filename) - 2 - len);
if (len < sizeof(filepath) - 2) {
BLI_strncpy(filepath + len, "_", sizeof(filepath) - 2 - len);
len += 1;
}
ptcache_filename_ext_append(pid, ext, 0, false, 0);
ptcache_filepath_ext_append(pid, ext, 0, false, 0);
while ((de = readdir(dir)) != NULL) {
if (strstr(de->d_name, ext)) { /* Do we have the right extension? */
if (STREQLEN(filename, de->d_name, len)) { /* Do we have the right prefix. */
if (STREQLEN(filepath, de->d_name, len)) { /* Do we have the right prefix. */
if (mode == PTCACHE_CLEAR_ALL) {
pid->cache->last_exact = MIN2(pid->cache->startframe, 0);
BLI_join_dirfile(path_full, sizeof(path_full), path, de->d_name);
@ -2713,8 +2713,8 @@ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, unsigned int cfra)
case PTCACHE_CLEAR_FRAME:
if (pid->cache->flag & PTCACHE_DISK_CACHE) {
if (BKE_ptcache_id_exist(pid, cfra)) {
ptcache_filename(pid, filename, cfra, true, true); /* no path */
BLI_delete(filename, false, false);
ptcache_filepath(pid, filepath, cfra, true, true); /* no path */
BLI_delete(filepath, false, false);
}
}
else {
@ -2752,11 +2752,11 @@ bool BKE_ptcache_id_exist(PTCacheID *pid, int cfra)
}
if (pid->cache->flag & PTCACHE_DISK_CACHE) {
char filename[MAX_PTCACHE_FILE];
char filepath[MAX_PTCACHE_FILE];
ptcache_filename(pid, filename, cfra, true, true);
ptcache_filepath(pid, filepath, cfra, true, true);
return BLI_exists(filename);
return BLI_exists(filepath);
}
PTCacheMem *pm = pid->cache->mem_cache.first;
@ -2824,24 +2824,24 @@ void BKE_ptcache_id_time(
DIR *dir;
struct dirent *de;
char path[MAX_PTCACHE_PATH];
char filename[MAX_PTCACHE_FILE];
char filepath[MAX_PTCACHE_FILE];
char ext[MAX_PTCACHE_PATH];
unsigned int len; /* store the length of the string */
ptcache_path(pid, path);
len = ptcache_filename(pid, filename, (int)cfra, 0, 0); /* no path */
len = ptcache_filepath(pid, filepath, (int)cfra, 0, 0); /* no path */
dir = opendir(path);
if (dir == NULL) {
return;
}
ptcache_filename_ext_append(pid, ext, 0, false, 0);
ptcache_filepath_ext_append(pid, ext, 0, false, 0);
while ((de = readdir(dir)) != NULL) {
if (strstr(de->d_name, ext)) { /* Do we have the right extension? */
if (STREQLEN(filename, de->d_name, len)) { /* Do we have the right prefix. */
if (STREQLEN(filepath, de->d_name, len)) { /* Do we have the right prefix. */
/* read the number of the file */
const int frame = ptcache_frame_from_filename(de->d_name, ext);
@ -3494,7 +3494,7 @@ void BKE_ptcache_disk_cache_rename(PTCacheID *pid, const char *name_src, const c
DIR *dir;
struct dirent *de;
char path[MAX_PTCACHE_PATH];
char old_filename[MAX_PTCACHE_FILE];
char old_filepath[MAX_PTCACHE_FILE];
char new_path_full[MAX_PTCACHE_FILE];
char old_path_full[MAX_PTCACHE_FILE];
char ext[MAX_PTCACHE_PATH];
@ -3510,7 +3510,7 @@ void BKE_ptcache_disk_cache_rename(PTCacheID *pid, const char *name_src, const c
/* get "from" filename */
BLI_strncpy(pid->cache->name, name_src, sizeof(pid->cache->name));
len = ptcache_filename(pid, old_filename, 0, false, false); /* no path */
len = ptcache_filepath(pid, old_filepath, 0, false, false); /* no path */
ptcache_path(pid, path);
dir = opendir(path);
@ -3519,20 +3519,20 @@ void BKE_ptcache_disk_cache_rename(PTCacheID *pid, const char *name_src, const c
return;
}
ptcache_filename_ext_append(pid, ext, 0, false, 0);
ptcache_filepath_ext_append(pid, ext, 0, false, 0);
/* put new name into cache */
BLI_strncpy(pid->cache->name, name_dst, sizeof(pid->cache->name));
while ((de = readdir(dir)) != NULL) {
if (strstr(de->d_name, ext)) { /* Do we have the right extension? */
if (STREQLEN(old_filename, de->d_name, len)) { /* Do we have the right prefix. */
if (STREQLEN(old_filepath, de->d_name, len)) { /* Do we have the right prefix. */
/* read the number of the file */
const int frame = ptcache_frame_from_filename(de->d_name, ext);
if (frame != -1) {
BLI_join_dirfile(old_path_full, sizeof(old_path_full), path, de->d_name);
ptcache_filename(pid, new_path_full, frame, true, true);
ptcache_filepath(pid, new_path_full, frame, true, true);
BLI_rename(old_path_full, new_path_full);
}
}
@ -3556,7 +3556,7 @@ void BKE_ptcache_load_external(PTCacheID *pid)
DIR *dir;
struct dirent *de;
char path[MAX_PTCACHE_PATH];
char filename[MAX_PTCACHE_FILE];
char filepath[MAX_PTCACHE_FILE];
char ext[MAX_PTCACHE_PATH];
if (!cache) {
@ -3565,7 +3565,7 @@ void BKE_ptcache_load_external(PTCacheID *pid)
ptcache_path(pid, path);
len = ptcache_filename(pid, filename, 1, false, false); /* no path */
len = ptcache_filepath(pid, filepath, 1, false, false); /* no path */
dir = opendir(path);
if (dir == NULL) {
@ -3583,7 +3583,7 @@ void BKE_ptcache_load_external(PTCacheID *pid)
while ((de = readdir(dir)) != NULL) {
if (strstr(de->d_name, ext)) { /* Do we have the right extension? */
if (STREQLEN(filename, de->d_name, len)) { /* Do we have the right prefix. */
if (STREQLEN(filepath, de->d_name, len)) { /* Do we have the right prefix. */
/* read the number of the file */
const int frame = ptcache_frame_from_filename(de->d_name, ext);

View File

@ -1361,6 +1361,26 @@ const char *BKE_volume_grid_name(const VolumeGrid *volume_grid)
}
#ifdef WITH_OPENVDB
struct ClearGridOp {
openvdb::GridBase &grid;
template<typename Grid> void operator()()
{
static_cast<Grid &>(grid).clear();
}
};
void BKE_volume_grid_clear_tree(openvdb::GridBase &grid)
{
const VolumeGridType grid_type = BKE_volume_grid_type_openvdb(grid);
ClearGridOp op{grid};
BKE_volume_grid_type_operation(grid_type, op);
}
void BKE_volume_grid_clear_tree(Volume &volume, VolumeGrid &volume_grid)
{
openvdb::GridBase::Ptr grid = BKE_volume_grid_openvdb_for_write(&volume, &volume_grid, false);
BKE_volume_grid_clear_tree(*grid);
}
VolumeGridType BKE_volume_grid_type_openvdb(const openvdb::GridBase &grid)
{
if (grid.isType<openvdb::FloatGrid>()) {
@ -1451,6 +1471,23 @@ void BKE_volume_grid_transform_matrix(const VolumeGrid *volume_grid, float mat[4
#endif
}
void BKE_volume_grid_transform_matrix_set(struct VolumeGrid *volume_grid, const float mat[4][4])
{
#ifdef WITH_OPENVDB
openvdb::math::Mat4f mat_openvdb;
for (int col = 0; col < 4; col++) {
for (int row = 0; row < 4; row++) {
mat_openvdb(col, row) = mat[col][row];
}
}
openvdb::GridBase::Ptr grid = volume_grid->grid();
grid->setTransform(std::make_shared<openvdb::math::Transform>(
std::make_shared<openvdb::math::AffineMap>(mat_openvdb)));
#else
UNUSED_VARS(volume_grid, mat);
#endif
}
/* Grid Tree and Voxels */
/* Volume Editing */
@ -1547,6 +1584,17 @@ void BKE_volume_grid_remove(Volume *volume, VolumeGrid *grid)
#endif
}
bool BKE_volume_grid_determinant_valid(const double determinant)
{
#ifdef WITH_OPENVDB
/* Limit taken from openvdb/math/Maps.h. */
return std::abs(determinant) >= 3.0 * openvdb::math::Tolerance<double>::value();
#else
UNUSED_VARS(determinant);
return true;
#endif
}
int BKE_volume_simplify_level(const Depsgraph *depsgraph)
{
if (DEG_get_mode(depsgraph) != DAG_EVAL_RENDER) {

View File

@ -23,6 +23,8 @@
* see of the increased compile time and binary size is worth it.
*/
#include <optional>
#include "BLI_any.hh"
#include "BLI_array.hh"
#include "BLI_index_mask.hh"
@ -106,25 +108,7 @@ template<typename T> class VArrayImpl {
*/
virtual void materialize(IndexMask mask, MutableSpan<T> r_span) const
{
T *dst = r_span.data();
/* Optimize for a few different common cases. */
const CommonVArrayInfo info = this->common_info();
switch (info.type) {
case CommonVArrayInfo::Type::Any: {
mask.foreach_index([&](const int64_t i) { dst[i] = this->get(i); });
break;
}
case CommonVArrayInfo::Type::Span: {
const T *src = static_cast<const T *>(info.data);
mask.foreach_index([&](const int64_t i) { dst[i] = src[i]; });
break;
}
case CommonVArrayInfo::Type::Single: {
const T single = *static_cast<const T *>(info.data);
mask.foreach_index([&](const int64_t i) { dst[i] = single; });
break;
}
}
mask.foreach_index([&](const int64_t i) { r_span[i] = this->get(i); });
}
/**
@ -133,24 +117,7 @@ template<typename T> class VArrayImpl {
virtual void materialize_to_uninitialized(IndexMask mask, MutableSpan<T> r_span) const
{
T *dst = r_span.data();
/* Optimize for a few different common cases. */
const CommonVArrayInfo info = this->common_info();
switch (info.type) {
case CommonVArrayInfo::Type::Any: {
mask.foreach_index([&](const int64_t i) { new (dst + i) T(this->get(i)); });
break;
}
case CommonVArrayInfo::Type::Span: {
const T *src = static_cast<const T *>(info.data);
mask.foreach_index([&](const int64_t i) { new (dst + i) T(src[i]); });
break;
}
case CommonVArrayInfo::Type::Single: {
const T single = *static_cast<const T *>(info.data);
mask.foreach_index([&](const int64_t i) { new (dst + i) T(single); });
break;
}
}
mask.foreach_index([&](const int64_t i) { new (dst + i) T(this->get(i)); });
}
/**
@ -286,8 +253,20 @@ template<typename T> class VArrayImpl_For_Span : public VMutableArrayImpl<T> {
return data_ == static_cast<const T *>(other_info.data);
}
void materialize(IndexMask mask, MutableSpan<T> r_span) const override
{
mask.foreach_index([&](const int64_t i) { r_span[i] = data_[i]; });
}
void materialize_to_uninitialized(IndexMask mask, MutableSpan<T> r_span) const override
{
T *dst = r_span.data();
mask.foreach_index([&](const int64_t i) { new (dst + i) T(data_[i]); });
}
void materialize_compressed(IndexMask mask, MutableSpan<T> r_span) const override
{
BLI_assert(mask.size() == r_span.size());
mask.to_best_mask_type([&](auto best_mask) {
for (const int64_t i : IndexRange(best_mask.size())) {
r_span[i] = data_[best_mask[i]];
@ -298,6 +277,7 @@ template<typename T> class VArrayImpl_For_Span : public VMutableArrayImpl<T> {
void materialize_compressed_to_uninitialized(IndexMask mask,
MutableSpan<T> r_span) const override
{
BLI_assert(mask.size() == r_span.size());
T *dst = r_span.data();
mask.to_best_mask_type([&](auto best_mask) {
for (const int64_t i : IndexRange(best_mask.size())) {
@ -376,6 +356,17 @@ template<typename T> class VArrayImpl_For_Single final : public VArrayImpl<T> {
return CommonVArrayInfo(CommonVArrayInfo::Type::Single, true, &value_);
}
void materialize(IndexMask mask, MutableSpan<T> r_span) const override
{
r_span.fill_indices(mask, value_);
}
void materialize_to_uninitialized(IndexMask mask, MutableSpan<T> r_span) const override
{
T *dst = r_span.data();
mask.foreach_index([&](const int64_t i) { new (dst + i) T(value_); });
}
void materialize_compressed(IndexMask mask, MutableSpan<T> r_span) const override
{
BLI_assert(mask.size() == r_span.size());
@ -802,6 +793,18 @@ template<typename T> class VArrayCommon {
return *static_cast<const T *>(info.data);
}
/**
* Return the value that is returned for every index, if the array is stored as a single value.
*/
std::optional<T> get_if_single() const
{
const CommonVArrayInfo info = impl_->common_info();
if (info.type != CommonVArrayInfo::Type::Single) {
return std::nullopt;
}
return *static_cast<const T *>(info.data);
}
/**
* Return true when the other virtual references the same underlying memory.
*/
@ -873,12 +876,9 @@ template<typename T> class VMutableArray;
* construct the virtual array first and then move it into the vector.
*/
namespace varray_tag {
struct span {
};
struct single_ref {
};
struct single {
};
struct span {};
struct single_ref {};
struct single {};
} // namespace varray_tag
/**

View File

@ -710,7 +710,7 @@ bool IMesh::erase_face_positions(int f_index, Span<bool> face_pos_erase, IMeshAr
* mark with null pointer and caller should call remove_null_faces().
* the loop is done.
*/
this->face_[f_index] = NULL;
this->face_[f_index] = nullptr;
return true;
}
Array<const Vert *> new_vert(new_len);

View File

@ -1105,29 +1105,29 @@ bool BLI_path_program_search(char *fullname, const size_t maxlen, const char *na
path = BLI_getenv("PATH");
if (path) {
char filename[FILE_MAX];
char filepath_test[FILE_MAX];
const char *temp;
do {
temp = strchr(path, separator);
if (temp) {
memcpy(filename, path, temp - path);
filename[temp - path] = 0;
memcpy(filepath_test, path, temp - path);
filepath_test[temp - path] = 0;
path = temp + 1;
}
else {
BLI_strncpy(filename, path, sizeof(filename));
BLI_strncpy(filepath_test, path, sizeof(filepath_test));
}
BLI_path_append(filename, maxlen, name);
BLI_path_append(filepath_test, maxlen, name);
if (
#ifdef _WIN32
BLI_path_program_extensions_add_win32(filename, maxlen)
BLI_path_program_extensions_add_win32(filepath_test, maxlen)
#else
BLI_exists(filename)
BLI_exists(filepath_test)
#endif
) {
BLI_strncpy(fullname, filename, maxlen);
BLI_strncpy(fullname, filepath_test, maxlen);
retval = true;
break;
}

View File

@ -84,11 +84,11 @@ class Task {
free_taskdata(other.free_taskdata),
freedata(other.freedata)
{
((Task &)other).pool = NULL;
((Task &)other).run = NULL;
((Task &)other).taskdata = NULL;
((Task &)other).pool = nullptr;
((Task &)other).run = nullptr;
((Task &)other).taskdata = nullptr;
((Task &)other).free_taskdata = false;
((Task &)other).freedata = NULL;
((Task &)other).freedata = nullptr;
}
#else
Task(const Task &other) = delete;

View File

@ -181,7 +181,7 @@ static void testbuffer_list_state_from_data__stride_expand(ListBase *lb,
#define TESTBUFFER_STRINGS_CREATE(lb, ...) \
{ \
BLI_listbase_clear(lb); \
const char *data_array[] = {__VA_ARGS__ NULL}; \
const char *data_array[] = {__VA_ARGS__ nullptr}; \
testbuffer_list_state_from_string_array((lb), data_array); \
} \
((void)0)
@ -795,10 +795,10 @@ TEST(array_store, TestChunk_Rand31_Stride11_Chunk21)
/* Test From Files (disabled, keep for local tests.) */
void *file_read_binary_as_mem(const char *filepath, size_t pad_bytes, size_t *r_size)
static void *file_read_binary_as_mem(const char *filepath, size_t pad_bytes, size_t *r_size)
{
FILE *fp = fopen(filepath, "rb");
void *mem = NULL;
void *mem = nullptr;
if (fp) {
long int filelen_read;
@ -810,14 +810,14 @@ void *file_read_binary_as_mem(const char *filepath, size_t pad_bytes, size_t *r_
fseek(fp, 0L, SEEK_SET);
mem = MEM_mallocN(filelen + pad_bytes, __func__);
if (mem == NULL) {
if (mem == nullptr) {
goto finally;
}
filelen_read = fread(mem, 1, filelen, fp);
if ((filelen_read != filelen) || ferror(fp)) {
MEM_freeN(mem);
mem = NULL;
mem = nullptr;
goto finally;
}

View File

@ -116,7 +116,7 @@ bool BlendfileLoadingBaseTest::blendfile_load(const char *filepath)
}
char abspath[FILENAME_MAX];
BLI_path_join(abspath, sizeof(abspath), test_assets_dir.c_str(), filepath, NULL);
BLI_path_join(abspath, sizeof(abspath), test_assets_dir.c_str(), filepath, nullptr);
BlendFileReadReport bf_reports = {nullptr};
bfile = BLO_read_from_file(abspath, BLO_READ_SKIP_NONE, &bf_reports);

View File

@ -237,7 +237,23 @@ set(SRC
engines/eevee/eevee_lightcache.h
engines/eevee/eevee_lut.h
engines/eevee/eevee_private.h
engines/eevee_next/eevee_camera.hh
engines/eevee_next/eevee_depth_of_field.hh
engines/eevee_next/eevee_engine.h
engines/eevee_next/eevee_film.hh
engines/eevee_next/eevee_hizbuffer.hh
engines/eevee_next/eevee_instance.hh
engines/eevee_next/eevee_light.hh
engines/eevee_next/eevee_material.hh
engines/eevee_next/eevee_motion_blur.hh
engines/eevee_next/eevee_pipeline.hh
engines/eevee_next/eevee_renderbuffers.hh
engines/eevee_next/eevee_sampling.hh
engines/eevee_next/eevee_shader.hh
engines/eevee_next/eevee_sync.hh
engines/eevee_next/eevee_velocity.hh
engines/eevee_next/eevee_view.hh
engines/eevee_next/eevee_world.hh
engines/external/external_engine.h
engines/image/image_batches.hh
engines/image/image_buffer_cache.hh

View File

@ -55,7 +55,7 @@ static bool pointcloud_batch_cache_valid(PointCloud &pointcloud)
{
PointCloudBatchCache *cache = pointcloud_batch_cache_get(pointcloud);
if (cache == NULL) {
if (cache == nullptr) {
return false;
}
if (cache->mat_len != DRW_pointcloud_material_count_get(&pointcloud)) {
@ -86,7 +86,7 @@ static void pointcloud_batch_cache_init(PointCloud &pointcloud)
void DRW_pointcloud_batch_cache_dirty_tag(PointCloud *pointcloud, int mode)
{
PointCloudBatchCache *cache = pointcloud_batch_cache_get(*pointcloud);
if (cache == NULL) {
if (cache == nullptr) {
return;
}
switch (mode) {
@ -137,7 +137,7 @@ static void pointcloud_batch_cache_ensure_pos(const PointCloud &pointcloud,
PointCloudBatchCache &cache)
{
using namespace blender;
if (cache.pos != NULL) {
if (cache.pos != nullptr) {
return;
}
@ -198,7 +198,7 @@ static const uint half_octahedron_tris[4][3] = {
static void pointcloud_batch_cache_ensure_geom(PointCloudBatchCache &cache)
{
if (cache.geom != NULL) {
if (cache.geom != nullptr) {
return;
}
@ -232,9 +232,9 @@ GPUBatch *DRW_pointcloud_batch_cache_get_dots(Object *ob)
PointCloud &pointcloud = *static_cast<PointCloud *>(ob->data);
PointCloudBatchCache *cache = pointcloud_batch_cache_get(pointcloud);
if (cache->dots == NULL) {
if (cache->dots == nullptr) {
pointcloud_batch_cache_ensure_pos(pointcloud, *cache);
cache->dots = GPU_batch_create(GPU_PRIM_POINTS, cache->pos, NULL);
cache->dots = GPU_batch_create(GPU_PRIM_POINTS, cache->pos, nullptr);
}
return cache->dots;
@ -245,7 +245,7 @@ GPUBatch *DRW_pointcloud_batch_cache_get_surface(Object *ob)
PointCloud &pointcloud = *static_cast<PointCloud *>(ob->data);
PointCloudBatchCache *cache = pointcloud_batch_cache_get(pointcloud);
if (cache->surface == NULL) {
if (cache->surface == nullptr) {
pointcloud_batch_cache_ensure_pos(pointcloud, *cache);
pointcloud_batch_cache_ensure_geom(*cache);
@ -265,7 +265,7 @@ GPUBatch **DRW_cache_pointcloud_surface_shaded_get(Object *ob,
BLI_assert(cache->mat_len == gpumat_array_len);
UNUSED_VARS(gpumat_array_len);
if (cache->surface_per_mat[0] == NULL) {
if (cache->surface_per_mat[0] == nullptr) {
pointcloud_batch_cache_ensure_pos(pointcloud, *cache);
pointcloud_batch_cache_ensure_geom(*cache);

View File

@ -724,7 +724,7 @@ static void draw_subdiv_cache_update_extra_coarse_face_data(DRWSubdivCache *cach
if (mr->extract_type == MR_EXTRACT_BMESH) {
draw_subdiv_cache_extra_coarse_face_data_bm(cache->bm, mr->efa_act, flags_data);
}
else if (mr->p_origindex != NULL) {
else if (mr->p_origindex != nullptr) {
draw_subdiv_cache_extra_coarse_face_data_mapped(mesh, cache->bm, mr, flags_data);
}
else {

View File

@ -286,8 +286,10 @@ static void pose_slide_exit(bContext *C, wmOperator *op)
ED_slider_destroy(C, pso->slider);
/* Hide Bone Overlay. */
View3D *v3d = pso->area->spacedata.first;
v3d->overlay.flag = pso->overlay_flag;
if (pso->area) {
View3D *v3d = pso->area->spacedata.first;
v3d->overlay.flag = pso->overlay_flag;
}
/* Free the temp pchan links and their data. */
poseAnim_mapping_free(&pso->pfLinks);

View File

@ -2076,6 +2076,9 @@ static void gpencil_brush_delete_mode_brushes(Main *bmain,
}
BKE_brush_delete(bmain, brush);
if (brush == brush_active) {
brush_active = NULL;
}
}
}
@ -2109,8 +2112,8 @@ static int gpencil_brush_reset_all_exec(bContext *C, wmOperator *UNUSED(op))
char tool = '0';
if (paint) {
Brush *brush_active = paint->brush;
if (brush_active) {
if (paint->brush) {
Brush *brush_active = paint->brush;
switch (mode) {
case CTX_MODE_PAINT_GPENCIL: {
tool = brush_active->gpencil_tool;

View File

@ -1571,6 +1571,7 @@ void GPENCIL_OT_interpolate_sequence(wmOperatorType *ot)
/* identifiers */
ot->name = "Interpolate Sequence";
ot->idname = "GPENCIL_OT_interpolate_sequence";
ot->translation_context = BLT_I18NCONTEXT_ID_GPENCIL;
ot->description = "Generate 'in-betweens' to smoothly interpolate between Grease Pencil frames";
/* api callbacks */

View File

@ -918,6 +918,64 @@ static void gpencil_stroke_unselect(bGPdata *gpd, bGPDstroke *gps)
}
}
static bGPDstroke *gpencil_stroke_to_outline(tGPsdata *p, bGPDstroke *gps)
{
bGPDlayer *gpl = p->gpl;
RegionView3D *rv3d = p->region->regiondata;
Brush *brush = p->brush;
BrushGpencilSettings *gpencil_settings = brush->gpencil_settings;
MaterialGPencilStyle *gp_style = BKE_gpencil_material_settings(p->ob, gps->mat_nr + 1);
const bool is_stroke = ((gp_style->flag & GP_MATERIAL_STROKE_SHOW) != 0);
if (!is_stroke) {
return gps;
}
/* Duplicate the stroke to apply any layer thickness change. */
bGPDstroke *gps_duplicate = BKE_gpencil_stroke_duplicate(gps, true, false);
/* Apply layer thickness change. */
gps_duplicate->thickness += gpl->line_change;
/* Apply object scale to thickness. */
gps_duplicate->thickness *= mat4_to_scale(p->ob->obmat);
CLAMP_MIN(gps_duplicate->thickness, 1.0f);
/* Stroke. */
float diff_mat[4][4];
unit_m4(diff_mat);
bGPDstroke *gps_perimeter = BKE_gpencil_stroke_perimeter_from_view(
rv3d, p->gpd, gpl, gps_duplicate, 3, diff_mat);
/* Assign material. */
if (gpencil_settings->material_alt == NULL) {
gps_perimeter->mat_nr = gps->mat_nr;
}
else {
Material *ma = gpencil_settings->material_alt;
int mat_idx = BKE_gpencil_material_find_index_by_name_prefix(p->ob, ma->id.name + 2);
if (mat_idx > -1) {
gps_perimeter->mat_nr = mat_idx;
}
else {
gps_perimeter->mat_nr = gps->mat_nr;
}
}
/* Set pressure constant. */
bGPDspoint *pt;
for (int i = 0; i < gps_perimeter->totpoints; i++) {
pt = &gps_perimeter->points[i];
pt->pressure = 1.0f;
}
/* Remove original stroke. */
BKE_gpencil_free_stroke(gps);
/* Free Temp stroke. */
BKE_gpencil_free_stroke(gps_duplicate);
return gps_perimeter;
}
/* make a new stroke from the buffer data */
static void gpencil_stroke_newfrombuffer(tGPsdata *p)
{
@ -1221,6 +1279,23 @@ static void gpencil_stroke_newfrombuffer(tGPsdata *p)
BKE_gpencil_stroke_simplify_adaptive(gpd, gps, brush->gpencil_settings->simplify_f);
}
/* Set material index. */
gps->mat_nr = BKE_gpencil_object_material_get_index_from_brush(p->ob, p->brush);
if (gps->mat_nr < 0) {
if (p->ob->actcol - 1 < 0) {
gps->mat_nr = 0;
}
else {
gps->mat_nr = p->ob->actcol - 1;
}
}
/* Convert to Outline. */
if ((brush->gpencil_settings->flag & GP_BRUSH_GROUP_SETTINGS) &&
(brush->gpencil_settings->flag & GP_BRUSH_OUTLINE_STROKE)) {
gps = gpencil_stroke_to_outline(p, gps);
}
/* reproject to plane (only in 3d space) */
gpencil_reproject_toplane(p, gps);
/* change position relative to parent object */
@ -1235,17 +1310,6 @@ static void gpencil_stroke_newfrombuffer(tGPsdata *p)
}
}
/* Save material index */
gps->mat_nr = BKE_gpencil_object_material_get_index_from_brush(p->ob, p->brush);
if (gps->mat_nr < 0) {
if (p->ob->actcol - 1 < 0) {
gps->mat_nr = 0;
}
else {
gps->mat_nr = p->ob->actcol - 1;
}
}
/* add stroke to frame, usually on tail of the listbase, but if on back is enabled the stroke
* is added on listbase head because the drawing order is inverse and the head stroke is the
* first to draw. This is very useful for artist when drawing the background.

View File

@ -294,7 +294,7 @@ void ED_screen_refresh(struct wmWindowManager *wm, struct wmWindow *win);
void ED_screen_ensure_updated(struct wmWindowManager *wm,
struct wmWindow *win,
struct bScreen *screen);
void ED_screen_do_listen(struct bContext *C, struct wmNotifier *note);
void ED_screen_do_listen(struct bContext *C, const struct wmNotifier *note);
/**
* \brief Change the active screen.
*

View File

@ -130,7 +130,7 @@ void ui_but_drag_start(bContext *C, uiBut *but)
(but->dragflag & UI_BUT_DRAGPOIN_FREE) ? WM_DRAG_FREE_DATA :
WM_DRAG_NOP);
/* wmDrag has ownership over dragpoin now, stop messing with it. */
but->dragpoin = NULL;
but->dragpoin = nullptr;
if (but->imb) {
WM_event_drag_image(drag, but->imb, but->imb_scale);
@ -141,6 +141,6 @@ void ui_but_drag_start(bContext *C, uiBut *but)
/* Special feature for assets: We add another drag item that supports multiple assets. It
* gets the assets from context. */
if (ELEM(but->dragtype, WM_DRAG_ASSET, WM_DRAG_ID)) {
WM_event_start_drag(C, ICON_NONE, WM_DRAG_ASSET_LIST, NULL, 0, WM_DRAG_NOP);
WM_event_start_drag(C, ICON_NONE, WM_DRAG_ASSET_LIST, nullptr, 0, WM_DRAG_NOP);
}
}

View File

@ -756,13 +756,13 @@ static void override_idtemplate_ids_get(
PropertyRNA *prop;
UI_context_active_but_prop_get_templateID(C, &owner_ptr, &prop);
if (owner_ptr.data == NULL || prop == NULL) {
*r_owner_id = *r_id = NULL;
if (r_owner_ptr != NULL) {
if (owner_ptr.data == nullptr || prop == nullptr) {
*r_owner_id = *r_id = nullptr;
if (r_owner_ptr != nullptr) {
*r_owner_ptr = PointerRNA_NULL;
}
if (r_prop != NULL) {
*r_prop = NULL;
if (r_prop != nullptr) {
*r_prop = nullptr;
}
return;
}
@ -770,10 +770,10 @@ static void override_idtemplate_ids_get(
*r_owner_id = owner_ptr.owner_id;
PointerRNA idptr = RNA_property_pointer_get(&owner_ptr, prop);
*r_id = static_cast<ID *>(idptr.data);
if (r_owner_ptr != NULL) {
if (r_owner_ptr != nullptr) {
*r_owner_ptr = owner_ptr;
}
if (r_prop != NULL) {
if (r_prop != nullptr) {
*r_prop = prop;
}
}
@ -781,9 +781,9 @@ static void override_idtemplate_ids_get(
static bool override_idtemplate_poll(bContext *C, const bool is_create_op)
{
ID *owner_id, *id;
override_idtemplate_ids_get(C, &owner_id, &id, NULL, NULL);
override_idtemplate_ids_get(C, &owner_id, &id, nullptr, nullptr);
if (owner_id == NULL || id == NULL) {
if (owner_id == nullptr || id == nullptr) {
return false;
}
@ -812,14 +812,14 @@ static int override_idtemplate_make_exec(bContext *C, wmOperator *UNUSED(op))
PointerRNA owner_ptr;
PropertyRNA *prop;
override_idtemplate_ids_get(C, &owner_id, &id, &owner_ptr, &prop);
if (ELEM(NULL, owner_id, id)) {
if (ELEM(nullptr, owner_id, id)) {
return OPERATOR_CANCELLED;
}
ID *id_override = ui_template_id_liboverride_hierarchy_make(
C, CTX_data_main(C), owner_id, id, NULL);
C, CTX_data_main(C), owner_id, id, nullptr);
if (id_override == NULL) {
if (id_override == nullptr) {
return OPERATOR_CANCELLED;
}
@ -833,16 +833,16 @@ static int override_idtemplate_make_exec(bContext *C, wmOperator *UNUSED(op))
* override of the data too. */
if (!ID_IS_LINKED(owner_id)) {
RNA_id_pointer_create(id_override, &idptr);
RNA_property_pointer_set(&owner_ptr, prop, idptr, NULL);
RNA_property_pointer_set(&owner_ptr, prop, idptr, nullptr);
}
RNA_property_update(C, &owner_ptr, prop);
/* 'Security' extra tagging, since this process may also affect the owner ID and not only the
* used ID, relying on the property update code only is not always enough. */
DEG_id_tag_update(&CTX_data_scene(C)->id, ID_RECALC_BASE_FLAGS | ID_RECALC_COPY_ON_WRITE);
WM_event_add_notifier(C, NC_WINDOW, NULL);
WM_event_add_notifier(C, NC_WM | ND_LIB_OVERRIDE_CHANGED, NULL);
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, NULL);
WM_event_add_notifier(C, NC_WINDOW, nullptr);
WM_event_add_notifier(C, NC_WM | ND_LIB_OVERRIDE_CHANGED, nullptr);
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, nullptr);
return OPERATOR_FINISHED;
}
@ -875,7 +875,7 @@ static int override_idtemplate_reset_exec(bContext *C, wmOperator *UNUSED(op))
PointerRNA owner_ptr;
PropertyRNA *prop;
override_idtemplate_ids_get(C, &owner_id, &id, &owner_ptr, &prop);
if (ELEM(NULL, owner_id, id)) {
if (ELEM(nullptr, owner_id, id)) {
return OPERATOR_CANCELLED;
}
@ -888,7 +888,7 @@ static int override_idtemplate_reset_exec(bContext *C, wmOperator *UNUSED(op))
PointerRNA idptr;
/* `idptr` is re-assigned to owner property to ensure proper updates etc. */
RNA_id_pointer_create(id, &idptr);
RNA_property_pointer_set(&owner_ptr, prop, idptr, NULL);
RNA_property_pointer_set(&owner_ptr, prop, idptr, nullptr);
RNA_property_update(C, &owner_ptr, prop);
/* No need for 'security' extra tagging here, since this process will never affect the owner ID.
@ -923,7 +923,7 @@ static int override_idtemplate_clear_exec(bContext *C, wmOperator *UNUSED(op))
PointerRNA owner_ptr;
PropertyRNA *prop;
override_idtemplate_ids_get(C, &owner_id, &id, &owner_ptr, &prop);
if (ELEM(NULL, owner_id, id)) {
if (ELEM(nullptr, owner_id, id)) {
return OPERATOR_CANCELLED;
}
@ -948,7 +948,7 @@ static int override_idtemplate_clear_exec(bContext *C, wmOperator *UNUSED(op))
if (do_remap_active) {
Object *ref_object = (Object *)id_new;
Base *basact = BKE_view_layer_base_find(view_layer, ref_object);
if (basact != NULL) {
if (basact != nullptr) {
view_layer->basact = basact;
}
DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
@ -967,9 +967,9 @@ static int override_idtemplate_clear_exec(bContext *C, wmOperator *UNUSED(op))
/* 'Security' extra tagging, since this process may also affect the owner ID and not only the
* used ID, relying on the property update code only is not always enough. */
DEG_id_tag_update(&scene->id, ID_RECALC_BASE_FLAGS | ID_RECALC_COPY_ON_WRITE);
WM_event_add_notifier(C, NC_WINDOW, NULL);
WM_event_add_notifier(C, NC_WM | ND_LIB_OVERRIDE_CHANGED, NULL);
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, NULL);
WM_event_add_notifier(C, NC_WINDOW, nullptr);
WM_event_add_notifier(C, NC_WM | ND_LIB_OVERRIDE_CHANGED, nullptr);
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, nullptr);
return OPERATOR_FINISHED;
}
@ -995,9 +995,9 @@ static bool override_idtemplate_menu_poll(const bContext *C_const, MenuType *UNU
{
bContext *C = (bContext *)C_const;
ID *owner_id, *id;
override_idtemplate_ids_get(C, &owner_id, &id, NULL, NULL);
override_idtemplate_ids_get(C, &owner_id, &id, nullptr, nullptr);
if (owner_id == NULL || id == NULL) {
if (owner_id == nullptr || id == nullptr) {
return false;
}
@ -2353,6 +2353,9 @@ static bool ui_view_drop_poll(bContext *C)
{
const wmWindow *win = CTX_wm_window(C);
const ARegion *region = CTX_wm_region(C);
if (region == nullptr) {
return false;
}
const uiViewItemHandle *hovered_item = UI_region_views_find_item_at(region, win->eventstate->xy);
return hovered_item != nullptr;
@ -2401,6 +2404,9 @@ static void UI_OT_view_drop(wmOperatorType *ot)
static bool ui_view_item_rename_poll(bContext *C)
{
const ARegion *region = CTX_wm_region(C);
if (region == nullptr) {
return false;
}
const uiViewItemHandle *active_item = UI_region_views_find_active_item(region);
return active_item != nullptr && UI_view_item_can_rename(active_item);
}

View File

@ -397,7 +397,7 @@ static void ui_block_region_draw(const bContext *C, ARegion *region)
static void ui_block_region_popup_window_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
switch (wmn->category) {
case NC_WINDOW: {

View File

@ -5204,7 +5204,7 @@ static void CurveProfile_buttons_layout(uiLayout *layout, PointerRNA *ptr, RNAUp
0.0,
0.0,
0.0,
"Reapply and update the preset, removing changes");
TIP_("Reapply and update the preset, removing changes"));
UI_but_funcN_set(bt, CurveProfile_buttons_reset, MEM_dupallocN(cb), profile);
}
}
@ -6329,7 +6329,7 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
0,
width + UI_UNIT_X,
UI_UNIT_Y,
"Show in Info Log");
TIP_("Show in Info Log"));
UI_block_emboss_set(block, previous_emboss);
}

View File

@ -645,7 +645,7 @@ void paintvert_hide(bContext *C, Object *ob, const bool unselected)
{
using namespace blender;
Mesh *me = BKE_mesh_from_object(ob);
if (me == NULL || me->totvert == 0) {
if (me == nullptr || me->totvert == 0) {
return;
}
@ -679,7 +679,7 @@ void paintvert_reveal(bContext *C, Object *ob, const bool select)
{
using namespace blender;
Mesh *me = BKE_mesh_from_object(ob);
if (me == NULL || me->totvert == 0) {
if (me == nullptr || me->totvert == 0) {
return;
}

View File

@ -1418,6 +1418,7 @@ void MESH_OT_select_similar(wmOperatorType *ot)
/* properties */
prop = ot->prop = RNA_def_enum(ot->srna, "type", prop_similar_types, SIMVERT_NORMAL, "Type", "");
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_MESH);
RNA_def_enum_funcs(prop, select_similar_type_itemf);
RNA_def_enum(ot->srna, "compare", prop_similar_compare_types, SIM_CMP_EQ, "Compare", "");

View File

@ -3664,7 +3664,7 @@ static int duplicate_exec(bContext *C, wmOperator *op)
Object *ob_new_active = nullptr;
CTX_DATA_BEGIN (C, Base *, base, selected_bases) {
Object *ob_new = NULL;
Object *ob_new = nullptr;
object_add_duplicate_internal(bmain,
scene,
view_layer,

View File

@ -680,8 +680,7 @@ static int gpencil_modifier_move_to_index_exec(bContext *C, wmOperator *op)
Object *ob = ED_object_active_context(C);
GpencilModifierData *md = gpencil_edit_modifier_property_get(op, ob, 0);
int index = RNA_int_get(op->ptr, "index");
if (!ED_object_gpencil_modifier_move_to_index(op->reports, ob, md, index)) {
if (!(md && ED_object_gpencil_modifier_move_to_index(op->reports, ob, md, index))) {
return OPERATOR_CANCELLED;
}

View File

@ -1376,7 +1376,7 @@ static int modifier_move_to_index_exec(bContext *C, wmOperator *op)
ModifierData *md = edit_modifier_property_get(op, ob, 0);
int index = RNA_int_get(op->ptr, "index");
if (!ED_object_modifier_move_to_index(op->reports, ob, md, index)) {
if (!(md && ED_object_modifier_move_to_index(op->reports, ob, md, index))) {
return OPERATOR_CANCELLED;
}
@ -3358,6 +3358,7 @@ void OBJECT_OT_geometry_nodes_input_attribute_toggle(wmOperatorType *ot)
ot->idname = "OBJECT_OT_geometry_nodes_input_attribute_toggle";
ot->exec = geometry_nodes_input_attribute_toggle_exec;
ot->poll = ED_operator_object_active;
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
@ -3375,9 +3376,8 @@ static int geometry_node_tree_copy_assign_exec(bContext *C, wmOperator *UNUSED(o
{
Main *bmain = CTX_data_main(C);
Object *ob = ED_object_active_context(C);
ModifierData *md = BKE_object_active_modifier(ob);
if (md->type != eModifierType_Nodes) {
if (!(md && md->type == eModifierType_Nodes)) {
return OPERATOR_CANCELLED;
}
@ -3409,6 +3409,7 @@ void OBJECT_OT_geometry_node_tree_copy_assign(wmOperatorType *ot)
ot->idname = "OBJECT_OT_geometry_node_tree_copy_assign";
ot->exec = geometry_node_tree_copy_assign_exec;
ot->poll = ED_operator_object_active;
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}

View File

@ -481,12 +481,15 @@ static int shaderfx_remove_exec(bContext *C, wmOperator *op)
Main *bmain = CTX_data_main(C);
Object *ob = ED_object_active_context(C);
ShaderFxData *fx = edit_shaderfx_property_get(op, ob, 0);
if (!fx) {
return OPERATOR_CANCELLED;
}
/* Store name temporarily for report. */
char name[MAX_NAME];
strcpy(name, fx->name);
if (!fx || !ED_object_shaderfx_remove(op->reports, bmain, ob, fx)) {
if (!ED_object_shaderfx_remove(op->reports, bmain, ob, fx)) {
return OPERATOR_CANCELLED;
}
@ -671,7 +674,9 @@ static int shaderfx_copy_exec(bContext *C, wmOperator *op)
{
Object *ob = ED_object_active_context(C);
ShaderFxData *fx = edit_shaderfx_property_get(op, ob, 0);
if (!fx) {
return OPERATOR_CANCELLED;
}
ShaderFxData *nfx = BKE_shaderfx_new(fx->type);
if (!nfx) {
return OPERATOR_CANCELLED;

View File

@ -127,7 +127,7 @@ void ED_region_pixelspace(const ARegion *region)
void ED_region_do_listen(wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *notifier = params->notifier;
const wmNotifier *notifier = params->notifier;
/* generic notes first */
switch (notifier->category) {

View File

@ -580,7 +580,7 @@ static void region_cursor_set(wmWindow *win, bool swin_changed)
}
}
void ED_screen_do_listen(bContext *C, wmNotifier *note)
void ED_screen_do_listen(bContext *C, const wmNotifier *note)
{
wmWindow *win = CTX_wm_window(C);
bScreen *screen = CTX_wm_screen(C);

View File

@ -307,7 +307,7 @@ static void action_header_region_draw(const bContext *C, ARegion *region)
static void action_channel_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {
@ -401,7 +401,7 @@ static void saction_channel_region_message_subscribe(const wmRegionMessageSubscr
static void action_main_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {
@ -499,7 +499,7 @@ static void saction_main_region_message_subscribe(const wmRegionMessageSubscribe
static void action_listener(const wmSpaceTypeListenerParams *params)
{
ScrArea *area = params->area;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
SpaceAction *saction = (SpaceAction *)area->spacedata.first;
/* context changes */
@ -653,7 +653,7 @@ static void action_header_region_listener(const wmRegionListenerParams *params)
{
ScrArea *area = params->area;
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
SpaceAction *saction = (SpaceAction *)area->spacedata.first;
/* context changes */
@ -728,7 +728,7 @@ static void action_buttons_area_draw(const bContext *C, ARegion *region)
static void action_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {

View File

@ -507,7 +507,7 @@ static void buttons_main_region_layout(const bContext *C, ARegion *region)
static void buttons_main_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {
@ -645,7 +645,7 @@ static void buttons_area_redraw(ScrArea *area, short buttons)
static void buttons_area_listener(const wmSpaceTypeListenerParams *params)
{
ScrArea *area = params->area;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
SpaceProperties *sbuts = area->spacedata.first;
/* context changes */

View File

@ -314,7 +314,7 @@ static SpaceLink *clip_duplicate(SpaceLink *sl)
static void clip_listener(const wmSpaceTypeListenerParams *params)
{
ScrArea *area = params->area;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
const Scene *scene = params->scene;
/* context changes */
@ -919,7 +919,7 @@ static void clip_main_region_draw(const bContext *C, ARegion *region)
static void clip_main_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {
@ -1118,7 +1118,7 @@ static void clip_header_region_draw(const bContext *C, ARegion *region)
static void clip_header_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {
@ -1160,7 +1160,7 @@ static void clip_tools_region_draw(const bContext *C, ARegion *region)
static void clip_props_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {
@ -1212,7 +1212,7 @@ static void clip_properties_region_draw(const bContext *C, ARegion *region)
static void clip_properties_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {

View File

@ -257,7 +257,7 @@ static void console_main_region_listener(const wmRegionListenerParams *params)
{
ScrArea *area = params->area;
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {

View File

@ -426,7 +426,7 @@ static void file_reset_filelist_showing_main_data(ScrArea *area, SpaceFile *sfil
static void file_listener(const wmSpaceTypeListenerParams *listener_params)
{
ScrArea *area = listener_params->area;
wmNotifier *wmn = listener_params->notifier;
const wmNotifier *wmn = listener_params->notifier;
SpaceFile *sfile = (SpaceFile *)area->spacedata.first;
/* context changes */
@ -514,7 +514,7 @@ static void file_main_region_init(wmWindowManager *wm, ARegion *region)
static void file_main_region_listener(const wmRegionListenerParams *listener_params)
{
ARegion *region = listener_params->region;
wmNotifier *wmn = listener_params->notifier;
const wmNotifier *wmn = listener_params->notifier;
/* context changes */
switch (wmn->category) {
@ -820,7 +820,7 @@ static void file_execution_region_draw(const bContext *C, ARegion *region)
static void file_ui_region_listener(const wmRegionListenerParams *listener_params)
{
ARegion *region = listener_params->region;
wmNotifier *wmn = listener_params->notifier;
const wmNotifier *wmn = listener_params->notifier;
/* context changes */
switch (wmn->category) {

View File

@ -226,15 +226,15 @@ static void graph_panel_properties(const bContext *C, Panel *panel)
/* color settings */
col = uiLayoutColumn(layout, true);
uiItemR(col, &fcu_ptr, "color_mode", 0, "Display Color", ICON_NONE);
uiItemR(col, &fcu_ptr, "color_mode", 0, IFACE_("Display Color"), ICON_NONE);
if (fcu->color_mode == FCURVE_COLOR_CUSTOM) {
uiItemR(col, &fcu_ptr, "color", 0, "Color", ICON_NONE);
uiItemR(col, &fcu_ptr, "color", 0, IFACE_("Color"), ICON_NONE);
}
/* smoothing setting */
col = uiLayoutColumn(layout, true);
uiItemR(col, &fcu_ptr, "auto_smoothing", 0, "Handle Smoothing", ICON_NONE);
uiItemR(col, &fcu_ptr, "auto_smoothing", 0, IFACE_("Handle Smoothing"), ICON_NONE);
MEM_freeN(ale);
}

View File

@ -393,7 +393,7 @@ static void graph_buttons_region_draw(const bContext *C, ARegion *region)
static void graph_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {
@ -529,7 +529,7 @@ static void graph_region_message_subscribe(const wmRegionMessageSubscribeParams
static void graph_listener(const wmSpaceTypeListenerParams *params)
{
ScrArea *area = params->area;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
SpaceGraph *sipo = (SpaceGraph *)area->spacedata.first;
/* context changes */

View File

@ -298,7 +298,7 @@ static void image_listener(const wmSpaceTypeListenerParams *params)
{
wmWindow *win = params->window;
ScrArea *area = params->area;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
SpaceImage *sima = (SpaceImage *)area->spacedata.first;
/* context changes */
@ -713,7 +713,7 @@ static void image_main_region_listener(const wmRegionListenerParams *params)
{
ScrArea *area = params->area;
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {
@ -827,7 +827,7 @@ static void image_buttons_region_draw(const bContext *C, ARegion *region)
static void image_buttons_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {
@ -889,7 +889,7 @@ static void image_tools_region_draw(const bContext *C, ARegion *region)
static void image_tools_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {
@ -945,7 +945,7 @@ static void image_header_region_draw(const bContext *C, ARegion *region)
static void image_header_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {

View File

@ -186,7 +186,7 @@ static void info_header_region_draw(const bContext *C, ARegion *region)
static void info_main_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {
@ -202,7 +202,7 @@ static void info_main_region_listener(const wmRegionListenerParams *params)
static void info_header_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {

View File

@ -303,7 +303,7 @@ static void nla_buttons_region_draw(const bContext *C, ARegion *region)
static void nla_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {
@ -342,7 +342,7 @@ static void nla_region_listener(const wmRegionListenerParams *params)
static void nla_main_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {
@ -436,7 +436,7 @@ static void nla_main_region_message_subscribe(const wmRegionMessageSubscribePara
static void nla_channel_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {
@ -512,7 +512,7 @@ static void nla_channel_region_message_subscribe(const wmRegionMessageSubscribeP
static void nla_listener(const wmSpaceTypeListenerParams *params)
{
ScrArea *area = params->area;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {

View File

@ -211,6 +211,13 @@ static bNodeSocketLink *add_reroute_do_socket_section(bContext *C,
reroute_node->locx = insert_point[0] / UI_DPI_FAC;
reroute_node->locy = insert_point[1] / UI_DPI_FAC;
LISTBASE_FOREACH_BACKWARD (bNode *, frame_node, &ntree->nodes) {
if (frame_node->type == NODE_FRAME && BLI_rctf_isect_pt_v(&frame_node->totr, insert_point)) {
nodeAttachNode(reroute_node, frame_node);
break;
}
}
}
return socklink;

View File

@ -29,6 +29,8 @@
#include "BKE_scene.h"
#include "BKE_workspace.h"
#include "BLT_translation.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "DEG_depsgraph_query.h"
@ -2442,7 +2444,7 @@ static int ntree_socket_add_exec(bContext *C, wmOperator *op)
const eNodeSocketInOut in_out = (eNodeSocketInOut)RNA_enum_get(op->ptr, "in_out");
ListBase *sockets = (in_out == SOCK_IN) ? &ntree->inputs : &ntree->outputs;
const char *default_name = (in_out == SOCK_IN) ? "Input" : "Output";
const char *default_name = (in_out == SOCK_IN) ? DATA_("Input") : DATA_("Output");
bNodeSocket *active_sock = ntree_get_active_interface_socket(sockets);
bNodeSocket *sock;

View File

@ -362,7 +362,7 @@ static void node_area_tag_tree_recalc(SpaceNode *snode, ScrArea *area)
static void node_area_listener(const wmSpaceTypeListenerParams *params)
{
ScrArea *area = params->area;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* NOTE: #ED_area_tag_refresh will re-execute compositor. */
SpaceNode *snode = (SpaceNode *)area->spacedata.first;
@ -753,7 +753,7 @@ static void node_header_region_draw(const bContext *C, ARegion *region)
static void node_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
wmGizmoMap *gzmap = region->gizmo_map;
/* context changes */

View File

@ -376,7 +376,7 @@ void outliner_collection_delete(
const IDTypeInfo *id_type = BKE_idtype_get_info_from_id(&parent->id);
BLI_assert(id_type->owner_get != nullptr);
ID *scene_owner = id_type->owner_get(bmain, &parent->id, NULL);
ID *scene_owner = id_type->owner_get(bmain, &parent->id, nullptr);
BLI_assert(GS(scene_owner->name) == ID_SCE);
if (ID_IS_LINKED(scene_owner) || ID_IS_OVERRIDE_LIBRARY(scene_owner)) {
skip = true;
@ -609,7 +609,7 @@ static int collection_duplicate_exec(bContext *C, wmOperator *op)
const IDTypeInfo *id_type = BKE_idtype_get_info_from_id(&parent->id);
BLI_assert(id_type->owner_get != nullptr);
Scene *scene_owner = (Scene *)id_type->owner_get(bmain, &parent->id, NULL);
Scene *scene_owner = (Scene *)id_type->owner_get(bmain, &parent->id, nullptr);
BLI_assert(scene_owner != nullptr);
BLI_assert(GS(scene_owner->id.name) == ID_SCE);

View File

@ -95,7 +95,7 @@ static void outliner_main_region_listener(const wmRegionListenerParams *params)
{
ScrArea *area = params->area;
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
SpaceOutliner *space_outliner = static_cast<SpaceOutliner *>(area->spacedata.first);
/* context changes */
@ -291,7 +291,7 @@ static void outliner_header_region_free(ARegion *UNUSED(region))
static void outliner_header_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {

View File

@ -292,7 +292,7 @@ void OverrideRNAPathTreeBuilder::build_path(TreeElement &parent,
PointerRNA idpoin;
RNA_id_pointer_create(&override_data.id, &idpoin);
ListBase path_elems = {NULL};
ListBase path_elems = {nullptr};
if (!RNA_path_resolve_elements(&idpoin, override_data.override_property.rna_path, &path_elems)) {
return;
}

View File

@ -374,7 +374,7 @@ static SpaceLink *sequencer_duplicate(SpaceLink *sl)
static void sequencer_listener(const wmSpaceTypeListenerParams *params)
{
ScrArea *area = params->area;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* Context changes. */
switch (wmn->category) {
@ -630,7 +630,7 @@ static void sequencer_main_region_view2d_changed(const bContext *C, ARegion *reg
static void sequencer_main_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* Context changes. */
switch (wmn->category) {
@ -862,7 +862,7 @@ static void sequencer_preview_region_draw(const bContext *C, ARegion *region)
static void sequencer_preview_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
WM_gizmomap_tag_refresh(region->gizmo_map);
@ -933,7 +933,7 @@ static void sequencer_buttons_region_draw(const bContext *C, ARegion *region)
static void sequencer_buttons_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* Context changes. */
switch (wmn->category) {

View File

@ -436,7 +436,7 @@ static void spreadsheet_main_region_draw(const bContext *C, ARegion *region)
static void spreadsheet_main_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
switch (wmn->category) {
case NC_SCENE: {
@ -486,7 +486,7 @@ static void spreadsheet_header_region_free(ARegion *UNUSED(region))
static void spreadsheet_header_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
switch (wmn->category) {
case NC_SCENE: {
@ -570,7 +570,7 @@ static void spreadsheet_footer_region_listener(const wmRegionListenerParams *UNU
static void spreadsheet_dataset_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
switch (wmn->category) {
case NC_SCENE: {

View File

@ -83,7 +83,7 @@ static void statusbar_keymap(struct wmKeyConfig *UNUSED(keyconf))
static void statusbar_header_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
const wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {

Some files were not shown because too many files have changed in this diff Show More