forked from blender/blender
me-main #1
@ -22,7 +22,7 @@ elseif(UNIX AND NOT APPLE)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Boolean crashes with Arm assembly, see T103423.
|
# Boolean crashes with Arm assembly, see #103423.
|
||||||
if(BLENDER_PLATFORM_ARM)
|
if(BLENDER_PLATFORM_ARM)
|
||||||
set(GMP_OPTIONS
|
set(GMP_OPTIONS
|
||||||
${GMP_OPTIONS}
|
${GMP_OPTIONS}
|
||||||
|
@ -544,7 +544,7 @@ endfunction()
|
|||||||
function(setup_platform_linker_libs
|
function(setup_platform_linker_libs
|
||||||
target
|
target
|
||||||
)
|
)
|
||||||
# jemalloc must be early in the list, to be before pthread (see T57998)
|
# jemalloc must be early in the list, to be before pthread (see #57998).
|
||||||
if(WITH_MEM_JEMALLOC)
|
if(WITH_MEM_JEMALLOC)
|
||||||
target_link_libraries(${target} ${JEMALLOC_LIBRARIES})
|
target_link_libraries(${target} ${JEMALLOC_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
@ -440,7 +440,7 @@ string(APPEND PLATFORM_LINKFLAGS " -stdlib=libc++")
|
|||||||
# Make stack size more similar to Embree, required for Embree.
|
# Make stack size more similar to Embree, required for Embree.
|
||||||
string(APPEND PLATFORM_LINKFLAGS_EXECUTABLE " -Wl,-stack_size,0x100000")
|
string(APPEND PLATFORM_LINKFLAGS_EXECUTABLE " -Wl,-stack_size,0x100000")
|
||||||
|
|
||||||
# Suppress ranlib "has no symbols" warnings (workaround for T48250)
|
# Suppress ranlib "has no symbols" warnings (workaround for #48250).
|
||||||
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
|
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||||
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
|
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||||
# llvm-ranlib doesn't support this flag. Xcode's libtool does.
|
# llvm-ranlib doesn't support this flag. Xcode's libtool does.
|
||||||
|
@ -121,7 +121,7 @@ if(WITH_WINDOWS_BUNDLE_CRT)
|
|||||||
include(InstallRequiredSystemLibraries)
|
include(InstallRequiredSystemLibraries)
|
||||||
|
|
||||||
# ucrtbase(d).dll cannot be in the manifest, due to the way windows 10 handles
|
# ucrtbase(d).dll cannot be in the manifest, due to the way windows 10 handles
|
||||||
# redirects for this dll, for details see T88813.
|
# redirects for this dll, for details see #88813.
|
||||||
foreach(lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
|
foreach(lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
|
||||||
string(FIND ${lib} "ucrtbase" pos)
|
string(FIND ${lib} "ucrtbase" pos)
|
||||||
if(NOT pos EQUAL -1)
|
if(NOT pos EQUAL -1)
|
||||||
|
@ -476,7 +476,7 @@ MODULE_GROUPING = {
|
|||||||
|
|
||||||
# -------------------------------BLENDER----------------------------------------
|
# -------------------------------BLENDER----------------------------------------
|
||||||
|
|
||||||
# converting bytes to strings, due to T30154
|
# Converting bytes to strings, due to #30154.
|
||||||
BLENDER_REVISION = str(bpy.app.build_hash, 'utf_8')
|
BLENDER_REVISION = str(bpy.app.build_hash, 'utf_8')
|
||||||
BLENDER_REVISION_TIMESTAMP = bpy.app.build_commit_timestamp
|
BLENDER_REVISION_TIMESTAMP = bpy.app.build_commit_timestamp
|
||||||
|
|
||||||
@ -2200,7 +2200,7 @@ def write_rst_enum_items(basepath, key, key_no_prefix, enum_items):
|
|||||||
Write a single page for a static enum in RST.
|
Write a single page for a static enum in RST.
|
||||||
|
|
||||||
This helps avoiding very large lists being in-lined in many places which is an issue
|
This helps avoiding very large lists being in-lined in many places which is an issue
|
||||||
especially with icons in ``bpy.types.UILayout``. See T87008.
|
especially with icons in ``bpy.types.UILayout``. See #87008.
|
||||||
"""
|
"""
|
||||||
filepath = os.path.join(basepath, "%s.rst" % key_no_prefix)
|
filepath = os.path.join(basepath, "%s.rst" % key_no_prefix)
|
||||||
with open(filepath, "w", encoding="utf-8") as fh:
|
with open(filepath, "w", encoding="utf-8") as fh:
|
||||||
|
@ -20,7 +20,7 @@ class CyclesPresetPanel(PresetPanel, Panel):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def post_cb(context):
|
def post_cb(context):
|
||||||
# Modify an arbitrary built-in scene property to force a depsgraph
|
# Modify an arbitrary built-in scene property to force a depsgraph
|
||||||
# update, because add-on properties don't. (see T62325)
|
# update, because add-on properties don't. (see #62325)
|
||||||
render = context.scene.render
|
render = context.scene.render
|
||||||
render.filter_size = render.filter_size
|
render.filter_size = render.filter_size
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ BlenderImageLoader::BlenderImageLoader(BL::Image b_image,
|
|||||||
: b_image(b_image),
|
: b_image(b_image),
|
||||||
frame(frame),
|
frame(frame),
|
||||||
tile_number(tile_number),
|
tile_number(tile_number),
|
||||||
/* Don't free cache for preview render to avoid race condition from T93560, to be fixed
|
/* Don't free cache for preview render to avoid race condition from #93560, to be fixed
|
||||||
* properly later as we are close to release. */
|
* properly later as we are close to release. */
|
||||||
free_cache(!is_preview_render && !b_image.has_data())
|
free_cache(!is_preview_render && !b_image.has_data())
|
||||||
{
|
{
|
||||||
@ -72,7 +72,7 @@ bool BlenderImageLoader::load_metadata(const ImageDeviceFeatures &, ImageMetaDat
|
|||||||
metadata.colorspace = u_colorspace_raw;
|
metadata.colorspace = u_colorspace_raw;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* In some cases (e.g. T94135), the colorspace setting in Blender gets updated as part of the
|
/* In some cases (e.g. #94135), the colorspace setting in Blender gets updated as part of the
|
||||||
* metadata queries in this function, so update the colorspace setting here. */
|
* metadata queries in this function, so update the colorspace setting here. */
|
||||||
PointerRNA colorspace_ptr = b_image.colorspace_settings().ptr;
|
PointerRNA colorspace_ptr = b_image.colorspace_settings().ptr;
|
||||||
metadata.colorspace = get_enum_identifier(colorspace_ptr, "name");
|
metadata.colorspace = get_enum_identifier(colorspace_ptr, "name");
|
||||||
|
@ -24,7 +24,7 @@ void BlenderSync::sync_light(BL::Object &b_parent,
|
|||||||
Light *light = light_map.find(key);
|
Light *light = light_map.find(key);
|
||||||
|
|
||||||
/* Check if the transform was modified, in case a linked collection is moved we do not get a
|
/* Check if the transform was modified, in case a linked collection is moved we do not get a
|
||||||
* specific depsgraph update (T88515). This also mimics the behavior for Objects. */
|
* specific depsgraph update (#88515). This also mimics the behavior for Objects. */
|
||||||
const bool tfm_updated = (light && light->get_tfm() != tfm);
|
const bool tfm_updated = (light && light->get_tfm() != tfm);
|
||||||
|
|
||||||
/* Update if either object or light data changed. */
|
/* Update if either object or light data changed. */
|
||||||
|
@ -404,7 +404,7 @@ void BlenderSession::render(BL::Depsgraph &b_depsgraph_)
|
|||||||
* point we know that we've got everything to render current view layer.
|
* point we know that we've got everything to render current view layer.
|
||||||
*/
|
*/
|
||||||
/* At the moment we only free if we are not doing multi-view
|
/* At the moment we only free if we are not doing multi-view
|
||||||
* (or if we are rendering the last view). See T58142/D4239 for discussion.
|
* (or if we are rendering the last view). See #58142/D4239 for discussion.
|
||||||
*/
|
*/
|
||||||
if (view_index == num_views - 1) {
|
if (view_index == num_views - 1) {
|
||||||
free_blender_memory_if_possible();
|
free_blender_memory_if_possible();
|
||||||
|
@ -766,7 +766,7 @@ void BlenderSync::free_data_after_sync(BL::Depsgraph &b_depsgraph)
|
|||||||
(BlenderSession::headless || is_interface_locked) &&
|
(BlenderSession::headless || is_interface_locked) &&
|
||||||
/* Baking re-uses the depsgraph multiple times, clearing crashes
|
/* Baking re-uses the depsgraph multiple times, clearing crashes
|
||||||
* reading un-evaluated mesh data which isn't aligned with the
|
* reading un-evaluated mesh data which isn't aligned with the
|
||||||
* geometry we're baking, see T71012. */
|
* geometry we're baking, see #71012. */
|
||||||
!scene->bake_manager->get_baking() &&
|
!scene->bake_manager->get_baking() &&
|
||||||
/* Persistent data must main caches for performance and correctness. */
|
/* Persistent data must main caches for performance and correctness. */
|
||||||
!is_persistent_data;
|
!is_persistent_data;
|
||||||
|
@ -906,7 +906,7 @@ bool HIPDevice::should_use_graphics_interop()
|
|||||||
* possible, but from the empiric measurements it can be considerably slower than using naive
|
* possible, but from the empiric measurements it can be considerably slower than using naive
|
||||||
* pixels copy. */
|
* pixels copy. */
|
||||||
|
|
||||||
/* Disable graphics interop for now, because of driver bug in 21.40. See T92972 */
|
/* Disable graphics interop for now, because of driver bug in 21.40. See #92972 */
|
||||||
# if 0
|
# if 0
|
||||||
HIPContextScope scope(this);
|
HIPContextScope scope(this);
|
||||||
|
|
||||||
|
@ -586,7 +586,7 @@ void MetalDevice::erase_allocation(device_memory &mem)
|
|||||||
if (it != metal_mem_map.end()) {
|
if (it != metal_mem_map.end()) {
|
||||||
MetalMem *mmem = it->second.get();
|
MetalMem *mmem = it->second.get();
|
||||||
|
|
||||||
/* blank out reference to MetalMem* in the launch params (fixes crash T94736) */
|
/* blank out reference to MetalMem* in the launch params (fixes crash #94736) */
|
||||||
if (mmem->pointer_index >= 0) {
|
if (mmem->pointer_index >= 0) {
|
||||||
device_ptr *pointers = (device_ptr *)&launch_params;
|
device_ptr *pointers = (device_ptr *)&launch_params;
|
||||||
pointers[mmem->pointer_index] = 0;
|
pointers[mmem->pointer_index] = 0;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#ifndef WITH_CYCLES_OPTIMIZED_KERNEL_AVX2
|
#ifndef WITH_CYCLES_OPTIMIZED_KERNEL_AVX2
|
||||||
# define KERNEL_STUB
|
# define KERNEL_STUB
|
||||||
#else
|
#else
|
||||||
/* SSE optimization disabled for now on 32 bit, see bug T36316. */
|
/* SSE optimization disabled for now on 32 bit, see bug #36316. */
|
||||||
# if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
|
# if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
|
||||||
# define __KERNEL_SSE__
|
# define __KERNEL_SSE__
|
||||||
# define __KERNEL_SSE2__
|
# define __KERNEL_SSE2__
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#ifndef WITH_CYCLES_OPTIMIZED_KERNEL_SSE2
|
#ifndef WITH_CYCLES_OPTIMIZED_KERNEL_SSE2
|
||||||
# define KERNEL_STUB
|
# define KERNEL_STUB
|
||||||
#else
|
#else
|
||||||
/* SSE optimization disabled for now on 32 bit, see bug T36316. */
|
/* SSE optimization disabled for now on 32 bit, see bug #36316. */
|
||||||
# if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
|
# if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
|
||||||
# define __KERNEL_SSE2__
|
# define __KERNEL_SSE2__
|
||||||
# endif
|
# endif
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#ifndef WITH_CYCLES_OPTIMIZED_KERNEL_SSE41
|
#ifndef WITH_CYCLES_OPTIMIZED_KERNEL_SSE41
|
||||||
# define KERNEL_STUB
|
# define KERNEL_STUB
|
||||||
#else
|
#else
|
||||||
/* SSE optimization disabled for now on 32 bit, see bug T36316. */
|
/* SSE optimization disabled for now on 32 bit, see bug #36316. */
|
||||||
# if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
|
# if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
|
||||||
# define __KERNEL_SSE2__
|
# define __KERNEL_SSE2__
|
||||||
# define __KERNEL_SSE3__
|
# define __KERNEL_SSE3__
|
||||||
|
@ -645,7 +645,7 @@ ccl_device_inline void kernel_gpu_film_convert_half_write(ccl_global uchar4 *rgb
|
|||||||
const int y,
|
const int y,
|
||||||
const half4 half_pixel)
|
const half4 half_pixel)
|
||||||
{
|
{
|
||||||
/* Work around HIP issue with half float display, see T92972. */
|
/* Work around HIP issue with half float display, see #92972. */
|
||||||
#ifdef __KERNEL_HIP__
|
#ifdef __KERNEL_HIP__
|
||||||
ccl_global half *out = ((ccl_global half *)rgba) + (rgba_offset + y * rgba_stride + x) * 4;
|
ccl_global half *out = ((ccl_global half *)rgba) + (rgba_offset + y * rgba_stride + x) * 4;
|
||||||
out[0] = half_pixel.x;
|
out[0] = half_pixel.x;
|
||||||
|
@ -394,7 +394,7 @@ bool OSLShaderManager::osl_compile(const string &inputfile, const string &output
|
|||||||
|
|
||||||
/* Compile.
|
/* Compile.
|
||||||
*
|
*
|
||||||
* Mutex protected because the OSL compiler does not appear to be thread safe, see T92503. */
|
* Mutex protected because the OSL compiler does not appear to be thread safe, see #92503. */
|
||||||
static thread_mutex osl_compiler_mutex;
|
static thread_mutex osl_compiler_mutex;
|
||||||
thread_scoped_lock lock(osl_compiler_mutex);
|
thread_scoped_lock lock(osl_compiler_mutex);
|
||||||
|
|
||||||
|
@ -520,7 +520,7 @@ bool TileManager::write_tile(const RenderBuffers &tile_buffers)
|
|||||||
/* If there is an overscan used for the tile copy pixels into single continuous block of memory
|
/* If there is an overscan used for the tile copy pixels into single continuous block of memory
|
||||||
* without any "gaps".
|
* without any "gaps".
|
||||||
* This is a workaround for bug in OIIO (https://github.com/OpenImageIO/oiio/pull/3176).
|
* This is a workaround for bug in OIIO (https://github.com/OpenImageIO/oiio/pull/3176).
|
||||||
* Our task reference: T93008. */
|
* Our task reference: #93008. */
|
||||||
if (tile_params.window_x || tile_params.window_y ||
|
if (tile_params.window_x || tile_params.window_y ||
|
||||||
tile_params.window_width != tile_params.width ||
|
tile_params.window_width != tile_params.width ||
|
||||||
tile_params.window_height != tile_params.height) {
|
tile_params.window_height != tile_params.height) {
|
||||||
|
@ -421,7 +421,7 @@ ccl_device_inline float fast_expf(float x)
|
|||||||
|
|
||||||
#if !defined(__KERNEL_GPU__) && !defined(_MSC_VER)
|
#if !defined(__KERNEL_GPU__) && !defined(_MSC_VER)
|
||||||
/* MSVC seems to have a code-gen bug here in at least SSE41/AVX, see
|
/* MSVC seems to have a code-gen bug here in at least SSE41/AVX, see
|
||||||
* T78047 and T78869 for details. Just disable for now, it only makes
|
* #78047 and #78869 for details. Just disable for now, it only makes
|
||||||
* a small difference in denoising performance. */
|
* a small difference in denoising performance. */
|
||||||
ccl_device float4 fast_exp2f4(float4 x)
|
ccl_device float4 fast_exp2f4(float4 x)
|
||||||
{
|
{
|
||||||
|
@ -516,7 +516,7 @@ GHOST_TSuccess GHOST_ContextCGL::releaseNativeHandles()
|
|||||||
|
|
||||||
/* OpenGL on Metal
|
/* OpenGL on Metal
|
||||||
*
|
*
|
||||||
* Use Metal layer to avoid Viewport lagging on macOS, see T60043. */
|
* Use Metal layer to avoid Viewport lagging on macOS, see #60043. */
|
||||||
|
|
||||||
static const MTLPixelFormat METAL_FRAMEBUFFERPIXEL_FORMAT = MTLPixelFormatBGRA8Unorm;
|
static const MTLPixelFormat METAL_FRAMEBUFFERPIXEL_FORMAT = MTLPixelFormatBGRA8Unorm;
|
||||||
static const OSType METAL_CORE_VIDEO_PIXEL_FORMAT = kCVPixelFormatType_32BGRA;
|
static const OSType METAL_CORE_VIDEO_PIXEL_FORMAT = kCVPixelFormatType_32BGRA;
|
||||||
|
@ -141,7 +141,7 @@ GHOST_TSuccess GHOST_ContextGLX::initializeDrawingContext()
|
|||||||
/* -------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------- */
|
||||||
#else
|
#else
|
||||||
/* Important to initialize only GLXEW (_not_ GLEW),
|
/* Important to initialize only GLXEW (_not_ GLEW),
|
||||||
* since this breaks w/ Mesa's `swrast`, see: T46431. */
|
* since this breaks w/ Mesa's `swrast`, see: #46431. */
|
||||||
glxewInit();
|
glxewInit();
|
||||||
#endif /* USE_GLXEW_INIT_WORKAROUND */
|
#endif /* USE_GLXEW_INIT_WORKAROUND */
|
||||||
|
|
||||||
|
@ -302,7 +302,7 @@ bool GHOST_NDOFManager::setDevice(ushort vendor_id, ushort product_id)
|
|||||||
switch (product_id) {
|
switch (product_id) {
|
||||||
case 0xC62E: /* Plugged in. */
|
case 0xC62E: /* Plugged in. */
|
||||||
case 0xC62F: /* Wireless. */
|
case 0xC62F: /* Wireless. */
|
||||||
case 0xC658: /* Wireless (3DConnexion Universal Wireless Receiver in WIN32), see T82412. */
|
case 0xC658: /* Wireless (3DConnexion Universal Wireless Receiver in WIN32), see #82412. */
|
||||||
{
|
{
|
||||||
device_type_ = NDOF_SpaceMouseWireless;
|
device_type_ = NDOF_SpaceMouseWireless;
|
||||||
hid_map_button_num_ = 2;
|
hid_map_button_num_ = 2;
|
||||||
|
@ -141,7 +141,7 @@ constexpr size_t events_pending_default_size = 4096 / sizeof(void *);
|
|||||||
* \{ */
|
* \{ */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GNOME (mutter 42.2 had a bug with confine not respecting scale - Hi-DPI), See: T98793.
|
* GNOME (mutter 42.2 had a bug with confine not respecting scale - Hi-DPI), See: #98793.
|
||||||
* Even though this has been fixed, at time of writing it's not yet in a release.
|
* Even though this has been fixed, at time of writing it's not yet in a release.
|
||||||
* Workaround the problem by implementing confine with a software cursor.
|
* Workaround the problem by implementing confine with a software cursor.
|
||||||
* While this isn't ideal, it's not adding a lot of overhead as software
|
* While this isn't ideal, it's not adding a lot of overhead as software
|
||||||
@ -176,7 +176,7 @@ static bool use_gnome_confine_hack = false;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* KDE (plasma 5.26.1) has a bug where the cursor surface needs to be committed
|
* KDE (plasma 5.26.1) has a bug where the cursor surface needs to be committed
|
||||||
* (via `wl_surface_commit`) when it was hidden and is being set to visible again, see: T102048.
|
* (via `wl_surface_commit`) when it was hidden and is being set to visible again, see: #102048.
|
||||||
* See: https://bugs.kde.org/show_bug.cgi?id=461001
|
* See: https://bugs.kde.org/show_bug.cgi?id=461001
|
||||||
*/
|
*/
|
||||||
#define USE_KDE_TABLET_HIDDEN_CURSOR_HACK
|
#define USE_KDE_TABLET_HIDDEN_CURSOR_HACK
|
||||||
@ -197,8 +197,8 @@ static bool use_gnome_confine_hack = false;
|
|||||||
* \{ */
|
* \{ */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fix short-cut part of keyboard reading code not properly handling some keys, see: T102194.
|
* Fix short-cut part of keyboard reading code not properly handling some keys, see: #102194.
|
||||||
* \note This is similar to X11 workaround by the same name, see: T47228.
|
* \note This is similar to X11 workaround by the same name, see: #47228.
|
||||||
*/
|
*/
|
||||||
#define USE_NON_LATIN_KB_WORKAROUND
|
#define USE_NON_LATIN_KB_WORKAROUND
|
||||||
|
|
||||||
@ -1328,7 +1328,7 @@ static void ghost_wl_display_report_error(struct wl_display *display)
|
|||||||
* So in practice re-connecting to the display server isn't an option.
|
* So in practice re-connecting to the display server isn't an option.
|
||||||
*
|
*
|
||||||
* Exit since leaving the process open will simply flood the output and do nothing.
|
* Exit since leaving the process open will simply flood the output and do nothing.
|
||||||
* Although as the process is in a valid state, auto-save for e.g. is possible, see: T100855. */
|
* Although as the process is in a valid state, auto-save for e.g. is possible, see: #100855. */
|
||||||
::exit(-1);
|
::exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1442,7 +1442,7 @@ static GHOST_TKey xkb_map_gkey(const xkb_keysym_t sym)
|
|||||||
|
|
||||||
/* Additional keys for non US layouts. */
|
/* Additional keys for non US layouts. */
|
||||||
|
|
||||||
/* Uses the same physical key as #XKB_KEY_KP_Decimal for QWERTZ layout, see: T102287. */
|
/* Uses the same physical key as #XKB_KEY_KP_Decimal for QWERTZ layout, see: #102287. */
|
||||||
GXMAP(gkey, XKB_KEY_KP_Separator, GHOST_kKeyNumpadPeriod);
|
GXMAP(gkey, XKB_KEY_KP_Separator, GHOST_kKeyNumpadPeriod);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -3810,7 +3810,7 @@ static xkb_keysym_t xkb_state_key_get_one_sym_without_modifiers(
|
|||||||
|
|
||||||
/* NOTE(@ideasman42): Only perform the number-locked lookup as a fallback
|
/* NOTE(@ideasman42): Only perform the number-locked lookup as a fallback
|
||||||
* when a number-pad key has been pressed. This is important as some key-maps use number lock
|
* when a number-pad key has been pressed. This is important as some key-maps use number lock
|
||||||
* for switching other layers (in particular `de(neo_qwertz)` turns on layer-4), see: T96170.
|
* for switching other layers (in particular `de(neo_qwertz)` turns on layer-4), see: #96170.
|
||||||
* Alternative solutions could be to inspect the layout however this could get involved
|
* Alternative solutions could be to inspect the layout however this could get involved
|
||||||
* and turning on the number-lock is only needed for a limited set of keys. */
|
* and turning on the number-lock is only needed for a limited set of keys. */
|
||||||
|
|
||||||
@ -4467,7 +4467,7 @@ static void xdg_output_handle_logical_size(void *data,
|
|||||||
|
|
||||||
#ifdef USE_GNOME_CONFINE_HACK
|
#ifdef USE_GNOME_CONFINE_HACK
|
||||||
/* Use a bug in GNOME to check GNOME is in use. If the bug is fixed this won't cause an issue
|
/* Use a bug in GNOME to check GNOME is in use. If the bug is fixed this won't cause an issue
|
||||||
* as T98793 has been fixed up-stream too, but not in a release at time of writing. */
|
* as #98793 has been fixed up-stream too, but not in a release at time of writing. */
|
||||||
use_gnome_confine_hack = true;
|
use_gnome_confine_hack = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ class GHOST_SystemWayland : public GHOST_System {
|
|||||||
* Clear all references to this output.
|
* Clear all references to this output.
|
||||||
*
|
*
|
||||||
* \note The compositor should have already called the `wl_surface_listener.leave` callback,
|
* \note The compositor should have already called the `wl_surface_listener.leave` callback,
|
||||||
* however some compositors may not (see T103586).
|
* however some compositors may not (see #103586).
|
||||||
* So remove references to the output before it's destroyed to avoid crashing.
|
* So remove references to the output before it's destroyed to avoid crashing.
|
||||||
*
|
*
|
||||||
* \return true when any references were removed.
|
* \return true when any references were removed.
|
||||||
|
@ -565,8 +565,8 @@ GHOST_TKey GHOST_SystemWin32::hardKey(RAWINPUT const &raw, bool *r_key_down)
|
|||||||
/**
|
/**
|
||||||
* \note this function can be extended to include other exotic cases as they arise.
|
* \note this function can be extended to include other exotic cases as they arise.
|
||||||
*
|
*
|
||||||
* This function was added in response to bug T25715.
|
* This function was added in response to bug #25715.
|
||||||
* This is going to be a long list T42426.
|
* This is going to be a long list #42426.
|
||||||
*/
|
*/
|
||||||
GHOST_TKey GHOST_SystemWin32::processSpecialKey(short vKey, short scanCode) const
|
GHOST_TKey GHOST_SystemWin32::processSpecialKey(short vKey, short scanCode) const
|
||||||
{
|
{
|
||||||
@ -1083,7 +1083,7 @@ GHOST_EventCursor *GHOST_SystemWin32::processCursorEvent(GHOST_WindowWin32 *wind
|
|||||||
* so the box needs to small enough not to let the cursor escape the window but large
|
* so the box needs to small enough not to let the cursor escape the window but large
|
||||||
* enough that the cursor isn't being warped every time.
|
* enough that the cursor isn't being warped every time.
|
||||||
* If this was not the case it would be less trouble to simply warp the cursor to the
|
* If this was not the case it would be less trouble to simply warp the cursor to the
|
||||||
* center of the screen on every motion, see: D16558 (alternative fix for T102346). */
|
* center of the screen on every motion, see: D16558 (alternative fix for #102346). */
|
||||||
const int32_t subregion_div = 4; /* One quarter of the region. */
|
const int32_t subregion_div = 4; /* One quarter of the region. */
|
||||||
const int32_t size[2] = {bounds.getWidth(), bounds.getHeight()};
|
const int32_t size[2] = {bounds.getWidth(), bounds.getHeight()};
|
||||||
const int32_t center[2] = {(bounds.m_l + bounds.m_r) / 2, (bounds.m_t + bounds.m_b) / 2};
|
const int32_t center[2] = {(bounds.m_l + bounds.m_r) / 2, (bounds.m_t + bounds.m_b) / 2};
|
||||||
@ -1209,7 +1209,7 @@ GHOST_EventKey *GHOST_SystemWin32::processKeyEvent(GHOST_WindowWin32 *window, RA
|
|||||||
const bool ctrl_pressed = has_state && state[VK_CONTROL] & 0x80;
|
const bool ctrl_pressed = has_state && state[VK_CONTROL] & 0x80;
|
||||||
const bool alt_pressed = has_state && state[VK_MENU] & 0x80;
|
const bool alt_pressed = has_state && state[VK_MENU] & 0x80;
|
||||||
|
|
||||||
/* We can be here with !key_down if processing dead keys (diacritics). See T103119. */
|
/* We can be here with !key_down if processing dead keys (diacritics). See #103119. */
|
||||||
|
|
||||||
/* No text with control key pressed (Alt can be used to insert special characters though!). */
|
/* No text with control key pressed (Alt can be used to insert special characters though!). */
|
||||||
if (ctrl_pressed && !alt_pressed) {
|
if (ctrl_pressed && !alt_pressed) {
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
#ifdef WITH_X11_XFIXES
|
#ifdef WITH_X11_XFIXES
|
||||||
# include <X11/extensions/Xfixes.h>
|
# include <X11/extensions/Xfixes.h>
|
||||||
/* Workaround for XWayland grab glitch: T53004. */
|
/* Workaround for XWayland grab glitch: #53004. */
|
||||||
# define WITH_XWAYLAND_HACK
|
# define WITH_XWAYLAND_HACK
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -71,11 +71,11 @@
|
|||||||
# define USE_XINPUT_HOTPLUG
|
# define USE_XINPUT_HOTPLUG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* see T34039 Fix Alt key glitch on Unity desktop */
|
/* see #34039 Fix Alt key glitch on Unity desktop */
|
||||||
#define USE_UNITY_WORKAROUND
|
#define USE_UNITY_WORKAROUND
|
||||||
|
|
||||||
/* Fix 'shortcut' part of keyboard reading code only ever using first defined key-map
|
/* Fix 'shortcut' part of keyboard reading code only ever using first defined key-map
|
||||||
* instead of active one. See T47228 and D1746 */
|
* instead of active one. See #47228 and D1746 */
|
||||||
#define USE_NON_LATIN_KB_WORKAROUND
|
#define USE_NON_LATIN_KB_WORKAROUND
|
||||||
|
|
||||||
static uchar bit_is_on(const uchar *ptr, int bit)
|
static uchar bit_is_on(const uchar *ptr, int bit)
|
||||||
@ -928,7 +928,7 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
|
|||||||
window->getClientBounds(bounds);
|
window->getClientBounds(bounds);
|
||||||
|
|
||||||
/* TODO(@ideasman42): warp the cursor to `window->getCursorGrabInitPos`,
|
/* TODO(@ideasman42): warp the cursor to `window->getCursorGrabInitPos`,
|
||||||
* on every motion event, see: D16557 (alternative fix for T102346). */
|
* on every motion event, see: D16557 (alternative fix for #102346). */
|
||||||
const int32_t subregion_div = 4; /* One quarter of the region. */
|
const int32_t subregion_div = 4; /* One quarter of the region. */
|
||||||
const int32_t size[2] = {bounds.getWidth(), bounds.getHeight()};
|
const int32_t size[2] = {bounds.getWidth(), bounds.getHeight()};
|
||||||
const int32_t center[2] = {
|
const int32_t center[2] = {
|
||||||
@ -964,7 +964,7 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
|
|||||||
if (x_new != xme.x_root || y_new != xme.y_root) {
|
if (x_new != xme.x_root || y_new != xme.y_root) {
|
||||||
/* Use time of last event to avoid wrapping several times on the 'same' actual wrap.
|
/* Use time of last event to avoid wrapping several times on the 'same' actual wrap.
|
||||||
* Note that we need to deal with X and Y separately as those might wrap at the same time
|
* Note that we need to deal with X and Y separately as those might wrap at the same time
|
||||||
* but still in two different events (corner case, see T74918).
|
* but still in two different events (corner case, see #74918).
|
||||||
* We also have to add a few extra milliseconds of 'padding', as sometimes we get two
|
* We also have to add a few extra milliseconds of 'padding', as sometimes we get two
|
||||||
* close events that will generate extra wrap on the same axis within those few
|
* close events that will generate extra wrap on the same axis within those few
|
||||||
* milliseconds. */
|
* milliseconds. */
|
||||||
@ -1028,7 +1028,7 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
|
|||||||
/* XXX: Code below is kinda awfully convoluted... Issues are:
|
/* XXX: Code below is kinda awfully convoluted... Issues are:
|
||||||
* - In keyboards like Latin ones, numbers need a 'Shift' to be accessed but key_sym
|
* - In keyboards like Latin ones, numbers need a 'Shift' to be accessed but key_sym
|
||||||
* is unmodified (or anyone swapping the keys with `xmodmap`).
|
* is unmodified (or anyone swapping the keys with `xmodmap`).
|
||||||
* - #XLookupKeysym seems to always use first defined key-map (see T47228), which generates
|
* - #XLookupKeysym seems to always use first defined key-map (see #47228), which generates
|
||||||
* key-codes unusable by ghost_key_from_keysym for non-Latin-compatible key-maps.
|
* key-codes unusable by ghost_key_from_keysym for non-Latin-compatible key-maps.
|
||||||
*
|
*
|
||||||
* To address this, we:
|
* To address this, we:
|
||||||
@ -1715,7 +1715,7 @@ GHOST_TSuccess GHOST_SystemX11::setCursorPosition(int32_t x, int32_t y)
|
|||||||
|
|
||||||
#if defined(WITH_X11_XINPUT) && defined(USE_X11_XINPUT_WARP)
|
#if defined(WITH_X11_XINPUT) && defined(USE_X11_XINPUT_WARP)
|
||||||
if ((m_xinput_version.present) && (m_xinput_version.major_version >= 2)) {
|
if ((m_xinput_version.present) && (m_xinput_version.major_version >= 2)) {
|
||||||
/* Needed to account for XInput "Coordinate Transformation Matrix", see T48901 */
|
/* Needed to account for XInput "Coordinate Transformation Matrix", see #48901 */
|
||||||
int device_id;
|
int device_id;
|
||||||
if (XIGetClientPointer(m_display, None, &device_id) != False) {
|
if (XIGetClientPointer(m_display, None, &device_id) != False) {
|
||||||
XIWarpPointer(m_display, device_id, None, None, 0, 0, 0, 0, relx, rely);
|
XIWarpPointer(m_display, device_id, None, None, 0, 0, 0, 0, relx, rely);
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
|
|
||||||
/* Disable XINPUT warp, currently not implemented by Xorg for multi-head display.
|
/* Disable XINPUT warp, currently not implemented by Xorg for multi-head display.
|
||||||
* (see comment in XSERVER `Xi/xiwarppointer.c` -> `FIXME: panoramix stuff is missing` ~ v1.13.4)
|
* (see comment in XSERVER `Xi/xiwarppointer.c` -> `FIXME: panoramix stuff is missing` ~ v1.13.4)
|
||||||
* If this is supported we can add back XINPUT for warping (fixing T48901).
|
* If this is supported we can add back XINPUT for warping (fixing #48901).
|
||||||
* For now disable (see T50383). */
|
* For now disable (see #50383). */
|
||||||
// # define USE_X11_XINPUT_WARP
|
// # define USE_X11_XINPUT_WARP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -812,12 +812,12 @@ GHOST_WindowWayland::GHOST_WindowWayland(GHOST_SystemWayland *system,
|
|||||||
* when the `window_->scale` changed. */
|
* when the `window_->scale` changed. */
|
||||||
const int32_t size_min[2] = {320, 240};
|
const int32_t size_min[2] = {320, 240};
|
||||||
|
|
||||||
/* This value is expected to match the base name of the `.desktop` file. see T101805.
|
/* This value is expected to match the base name of the `.desktop` file. see #101805.
|
||||||
*
|
*
|
||||||
* NOTE: the XDG desktop-entry-spec defines that this should follow the "reverse DNS" convention.
|
* NOTE: the XDG desktop-entry-spec defines that this should follow the "reverse DNS" convention.
|
||||||
* For e.g. `org.blender.Blender` - however the `.desktop` file distributed with Blender is
|
* For e.g. `org.blender.Blender` - however the `.desktop` file distributed with Blender is
|
||||||
* simply called `blender.desktop`, so the it's important to follow that name.
|
* simply called `blender.desktop`, so the it's important to follow that name.
|
||||||
* Other distributions such as SNAP & FLATPAK may need to change this value T101779.
|
* Other distributions such as SNAP & FLATPAK may need to change this value #101779.
|
||||||
* Currently there isn't a way to configure this, we may want to support that. */
|
* Currently there isn't a way to configure this, we may want to support that. */
|
||||||
const char *xdg_app_id = (
|
const char *xdg_app_id = (
|
||||||
#ifdef WITH_GHOST_WAYLAND_APP_ID
|
#ifdef WITH_GHOST_WAYLAND_APP_ID
|
||||||
@ -1080,7 +1080,7 @@ GHOST_WindowWayland::~GHOST_WindowWayland()
|
|||||||
|
|
||||||
/* NOTE(@ideasman42): Flushing will often run the appropriate handlers event
|
/* NOTE(@ideasman42): Flushing will often run the appropriate handlers event
|
||||||
* (#wl_surface_listener.leave in particular) to avoid attempted access to the freed surfaces.
|
* (#wl_surface_listener.leave in particular) to avoid attempted access to the freed surfaces.
|
||||||
* This is not fool-proof though, hence the call to #window_surface_unref, see: T99078. */
|
* This is not fool-proof though, hence the call to #window_surface_unref, see: #99078. */
|
||||||
wl_display_flush(system_->wl_display());
|
wl_display_flush(system_->wl_display());
|
||||||
|
|
||||||
delete window_;
|
delete window_;
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include <wayland-util.h> /* For #wl_fixed_t */
|
#include <wayland-util.h> /* For #wl_fixed_t */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define to workaround for a bug/limitation in WAYLAND, see: T100855 & upstream report:
|
* Define to workaround for a bug/limitation in WAYLAND, see: #100855 & upstream report:
|
||||||
* https://gitlab.freedesktop.org/wayland/wayland/-/issues/159
|
* https://gitlab.freedesktop.org/wayland/wayland/-/issues/159
|
||||||
*
|
*
|
||||||
* Consume events from WAYLAND in a thread, this is needed because overflowing the event queue
|
* Consume events from WAYLAND in a thread, this is needed because overflowing the event queue
|
||||||
|
@ -154,7 +154,7 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (parentwindow) {
|
if (parentwindow) {
|
||||||
/* Release any parent capture to allow immediate interaction (T90110). */
|
/* Release any parent capture to allow immediate interaction (#90110). */
|
||||||
::ReleaseCapture();
|
::ReleaseCapture();
|
||||||
parentwindow->lostMouseCapture();
|
parentwindow->lostMouseCapture();
|
||||||
}
|
}
|
||||||
|
@ -418,7 +418,7 @@ void GHOST_WindowX11::refreshXInputDevices()
|
|||||||
for (GHOST_SystemX11::GHOST_TabletX11 &xtablet : m_system->GetXTablets()) {
|
for (GHOST_SystemX11::GHOST_TabletX11 &xtablet : m_system->GetXTablets()) {
|
||||||
/* With modern XInput (XLIB 1.6.2 at least and/or EVDEV 2.9.0) and some 'no-name' tablets
|
/* With modern XInput (XLIB 1.6.2 at least and/or EVDEV 2.9.0) and some 'no-name' tablets
|
||||||
* like 'UC-LOGIC Tablet WP5540U', we also need to 'select' ButtonPress for motion event,
|
* like 'UC-LOGIC Tablet WP5540U', we also need to 'select' ButtonPress for motion event,
|
||||||
* otherwise we do not get any tablet motion event once pen is pressed... See T43367.
|
* otherwise we do not get any tablet motion event once pen is pressed... See #43367.
|
||||||
*/
|
*/
|
||||||
XEventClass ev;
|
XEventClass ev;
|
||||||
|
|
||||||
@ -1467,7 +1467,7 @@ GHOST_TSuccess GHOST_WindowX11::setWindowCursorGrab(GHOST_TGrabCursorMode mode)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Perform this last so to workaround XWayland bug, see: T53004. */
|
/* Perform this last so to workaround XWayland bug, see: #53004. */
|
||||||
if (m_cursorGrab == GHOST_kGrabHide) {
|
if (m_cursorGrab == GHOST_kGrabHide) {
|
||||||
setWindowCursorVisibility(true);
|
setWindowCursorVisibility(true);
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ void bl_locale_set(const char *locale)
|
|||||||
}
|
}
|
||||||
/* Extra catch on `std::runtime_error` is needed for macOS/Clang as it seems that exceptions
|
/* Extra catch on `std::runtime_error` is needed for macOS/Clang as it seems that exceptions
|
||||||
* like `boost::locale::conv::conversion_error` (which inherit from `std::runtime_error`) are
|
* like `boost::locale::conv::conversion_error` (which inherit from `std::runtime_error`) are
|
||||||
* not caught by their ancestor `std::exception`. See T88877#1177108 */
|
* not caught by their ancestor `std::exception`. See #88877#1177108 */
|
||||||
catch (std::runtime_error const &e) {
|
catch (std::runtime_error const &e) {
|
||||||
std::cout << "bl_locale_set(" << locale << "): " << e.what() << " \n";
|
std::cout << "bl_locale_set(" << locale << "): " << e.what() << " \n";
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ const char *osx_user_locale()
|
|||||||
[myNSLocale autorelease];
|
[myNSLocale autorelease];
|
||||||
|
|
||||||
// This produces gettext-invalid locale in recent macOS versions (11.4),
|
// This produces gettext-invalid locale in recent macOS versions (11.4),
|
||||||
// like `ko-Kore_KR` instead of `ko_KR`. See T88877.
|
// like `ko-Kore_KR` instead of `ko_KR`. See #88877.
|
||||||
// NSString *nsIdentifier = [myNSLocale localeIdentifier];
|
// NSString *nsIdentifier = [myNSLocale localeIdentifier];
|
||||||
|
|
||||||
const NSString *nsIdentifier = [myNSLocale languageCode];
|
const NSString *nsIdentifier = [myNSLocale languageCode];
|
||||||
|
@ -193,7 +193,7 @@ static bool createGPUShader(OCIO_GPUShader &shader,
|
|||||||
info.fragment_source("gpu_shader_display_transform_frag.glsl");
|
info.fragment_source("gpu_shader_display_transform_frag.glsl");
|
||||||
info.fragment_source_generated = source;
|
info.fragment_source_generated = source;
|
||||||
|
|
||||||
/* T96502: Work around for incorrect OCIO GLSL code generation when using
|
/* #96502: Work around for incorrect OCIO GLSL code generation when using
|
||||||
* GradingPrimaryTransform. Should be reevaluated when changing to a next version of OCIO.
|
* GradingPrimaryTransform. Should be reevaluated when changing to a next version of OCIO.
|
||||||
* (currently v2.1.1). */
|
* (currently v2.1.1). */
|
||||||
info.define("inf 1e32");
|
info.define("inf 1e32");
|
||||||
|
@ -145,7 +145,7 @@ const UserDef U_default = {
|
|||||||
.ndof_flag = (NDOF_MODE_ORBIT | NDOF_LOCK_HORIZON | NDOF_SHOULD_PAN | NDOF_SHOULD_ZOOM |
|
.ndof_flag = (NDOF_MODE_ORBIT | NDOF_LOCK_HORIZON | NDOF_SHOULD_PAN | NDOF_SHOULD_ZOOM |
|
||||||
NDOF_SHOULD_ROTATE |
|
NDOF_SHOULD_ROTATE |
|
||||||
/* Software from the driver authors follows this convention
|
/* Software from the driver authors follows this convention
|
||||||
* so invert this by default, see: T67579. */
|
* so invert this by default, see: #67579. */
|
||||||
NDOF_ROTX_INVERT_AXIS | NDOF_ROTY_INVERT_AXIS | NDOF_ROTZ_INVERT_AXIS |
|
NDOF_ROTX_INVERT_AXIS | NDOF_ROTY_INVERT_AXIS | NDOF_ROTZ_INVERT_AXIS |
|
||||||
NDOF_PANX_INVERT_AXIS | NDOF_PANY_INVERT_AXIS | NDOF_PANZ_INVERT_AXIS |
|
NDOF_PANX_INVERT_AXIS | NDOF_PANY_INVERT_AXIS | NDOF_PANZ_INVERT_AXIS |
|
||||||
NDOF_ZOOM_INVERT | NDOF_CAMERA_PAN_ZOOM),
|
NDOF_ZOOM_INVERT | NDOF_CAMERA_PAN_ZOOM),
|
||||||
|
@ -286,7 +286,7 @@ class pySketchyChainingIterator(ChainingIterator):
|
|||||||
|
|
||||||
if not found:
|
if not found:
|
||||||
# This is a fatal error condition: self.current_edge must be found
|
# This is a fatal error condition: self.current_edge must be found
|
||||||
# among the edges seen by the AdjacencyIterator [bug T35695].
|
# among the edges seen by the AdjacencyIterator [bug #35695].
|
||||||
if bpy.app.debug_freestyle:
|
if bpy.app.debug_freestyle:
|
||||||
print('pySketchyChainingIterator: current edge not found')
|
print('pySketchyChainingIterator: current edge not found')
|
||||||
return None
|
return None
|
||||||
|
@ -113,7 +113,7 @@ def expand(line, cursor, namespace, *, private=True):
|
|||||||
if len(matches) == 1:
|
if len(matches) == 1:
|
||||||
scrollback = ''
|
scrollback = ''
|
||||||
else:
|
else:
|
||||||
# causes blender bug T27495 since string keys may contain '.'
|
# causes blender bug #27495 since string keys may contain '.'
|
||||||
# scrollback = ' '.join([m.split('.')[-1] for m in matches])
|
# scrollback = ' '.join([m.split('.')[-1] for m in matches])
|
||||||
|
|
||||||
# add white space to align with the cursor
|
# add white space to align with the cursor
|
||||||
|
@ -32,7 +32,7 @@ class _BPyOpsSubModOp:
|
|||||||
# XXX You never quite know what you get from bpy.types,
|
# XXX You never quite know what you get from bpy.types,
|
||||||
# with operators... Operator and OperatorProperties
|
# with operators... Operator and OperatorProperties
|
||||||
# are shadowing each other, and not in the same way for
|
# are shadowing each other, and not in the same way for
|
||||||
# native ops and py ones! See T39158.
|
# native ops and py ones! See #39158.
|
||||||
# op_class = getattr(bpy.types, idname)
|
# op_class = getattr(bpy.types, idname)
|
||||||
op_class = _op_get_rna_type(idname)
|
op_class = _op_get_rna_type(idname)
|
||||||
descr = op_class.description
|
descr = op_class.description
|
||||||
|
@ -259,15 +259,15 @@ def bake_action_iter(
|
|||||||
if is_new_action:
|
if is_new_action:
|
||||||
action = bpy.data.actions.new("Action")
|
action = bpy.data.actions.new("Action")
|
||||||
|
|
||||||
# Only leave tweak mode if we actually need to modify the action (T57159)
|
# Only leave tweak mode if we actually need to modify the action (#57159)
|
||||||
if action != atd.action:
|
if action != atd.action:
|
||||||
# Leave tweak mode before trying to modify the action (T48397)
|
# Leave tweak mode before trying to modify the action (#48397)
|
||||||
if atd.use_tweak_mode:
|
if atd.use_tweak_mode:
|
||||||
atd.use_tweak_mode = False
|
atd.use_tweak_mode = False
|
||||||
|
|
||||||
atd.action = action
|
atd.action = action
|
||||||
|
|
||||||
# Baking the action only makes sense in Replace mode, so force it (T69105)
|
# Baking the action only makes sense in Replace mode, so force it (#69105)
|
||||||
if not atd.use_tweak_mode:
|
if not atd.use_tweak_mode:
|
||||||
atd.action_blend_type = 'REPLACE'
|
atd.action_blend_type = 'REPLACE'
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ def orientation_helper(axis_forward='Y', axis_up='Z'):
|
|||||||
"""
|
"""
|
||||||
def wrapper(cls):
|
def wrapper(cls):
|
||||||
# Without that, we may end up adding those fields to some **parent** class' __annotations__ property
|
# Without that, we may end up adding those fields to some **parent** class' __annotations__ property
|
||||||
# (like the ImportHelper or ExportHelper ones)! See T58772.
|
# (like the ImportHelper or ExportHelper ones)! See #58772.
|
||||||
if "__annotations__" not in cls.__dict__:
|
if "__annotations__" not in cls.__dict__:
|
||||||
setattr(cls, "__annotations__", {})
|
setattr(cls, "__annotations__", {})
|
||||||
|
|
||||||
|
@ -564,7 +564,7 @@ class Mesh(bpy_types.ID):
|
|||||||
|
|
||||||
face_lengths = tuple(map(len, faces))
|
face_lengths = tuple(map(len, faces))
|
||||||
|
|
||||||
# NOTE: check non-empty lists by length because of how `numpy` handles truth tests, see: T90268.
|
# NOTE: check non-empty lists by length because of how `numpy` handles truth tests, see: #90268.
|
||||||
vertices_len = len(vertices)
|
vertices_len = len(vertices)
|
||||||
edges_len = len(edges)
|
edges_len = len(edges)
|
||||||
faces_len = len(faces)
|
faces_len = len(faces)
|
||||||
|
@ -86,7 +86,7 @@ class Prefs(bpy.types.KeyConfigPreferences):
|
|||||||
update=update_fn,
|
update=update_fn,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Experimental: only show with developer extras, see: T96544.
|
# Experimental: only show with developer extras, see: #96544.
|
||||||
use_tweak_select_passthrough: BoolProperty(
|
use_tweak_select_passthrough: BoolProperty(
|
||||||
name="Tweak Select: Mouse Select & Move",
|
name="Tweak Select: Mouse Select & Move",
|
||||||
description=(
|
description=(
|
||||||
@ -96,7 +96,7 @@ class Prefs(bpy.types.KeyConfigPreferences):
|
|||||||
default=False,
|
default=False,
|
||||||
update=update_fn,
|
update=update_fn,
|
||||||
)
|
)
|
||||||
# Experimental: only show with developer extras, see: T96544.
|
# Experimental: only show with developer extras, see: #96544.
|
||||||
use_tweak_tool_lmb_interaction: BoolProperty(
|
use_tweak_tool_lmb_interaction: BoolProperty(
|
||||||
name="Tweak Tool: Left Mouse Select & Move",
|
name="Tweak Tool: Left Mouse Select & Move",
|
||||||
description=(
|
description=(
|
||||||
|
@ -37,7 +37,7 @@ class Params:
|
|||||||
# instead be bound to a binding that doesn't de-select all, this way:
|
# instead be bound to a binding that doesn't de-select all, this way:
|
||||||
# - Click-drag moves the current selection.
|
# - Click-drag moves the current selection.
|
||||||
# - Click selects only the item at the cursor position.
|
# - Click selects only the item at the cursor position.
|
||||||
# See: T97032.
|
# See: #97032.
|
||||||
"use_tweak_select_passthrough",
|
"use_tweak_select_passthrough",
|
||||||
"use_tweak_tool_lmb_interaction",
|
"use_tweak_tool_lmb_interaction",
|
||||||
"use_mouse_emulate_3_button",
|
"use_mouse_emulate_3_button",
|
||||||
@ -465,7 +465,7 @@ def _template_items_tool_select(
|
|||||||
fallback=False,
|
fallback=False,
|
||||||
):
|
):
|
||||||
if not params.legacy and not fallback:
|
if not params.legacy and not fallback:
|
||||||
# Experimental support for LMB interaction for the tweak tool. see: T96544.
|
# Experimental support for LMB interaction for the tweak tool. see: #96544.
|
||||||
# NOTE: For RMB-select this is a much bigger change as it disables 3D cursor placement on LMB.
|
# NOTE: For RMB-select this is a much bigger change as it disables 3D cursor placement on LMB.
|
||||||
# For LMB-select this means an LMB -drag will not first de-select all (similar to node/graph editor).
|
# For LMB-select this means an LMB -drag will not first de-select all (similar to node/graph editor).
|
||||||
select_passthrough = False
|
select_passthrough = False
|
||||||
@ -498,7 +498,7 @@ def _template_items_tool_select(
|
|||||||
{"properties": [("toggle", True), *operator_props]}),
|
{"properties": [("toggle", True), *operator_props]}),
|
||||||
|
|
||||||
# Fallback key-map must transform as the primary tool is expected
|
# Fallback key-map must transform as the primary tool is expected
|
||||||
# to be accessed via gizmos in this case. See: T96885.
|
# to be accessed via gizmos in this case. See: #96885.
|
||||||
*(() if not fallback else (
|
*(() if not fallback else (
|
||||||
("transform.translate", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG'},
|
("transform.translate", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG'},
|
||||||
{"properties": [("release_confirm", True)]}),
|
{"properties": [("release_confirm", True)]}),
|
||||||
@ -4730,7 +4730,7 @@ def _template_paint_radial_control(paint, rotation=False, secondary_rotation=Fal
|
|||||||
|
|
||||||
def _template_view3d_select(*, type, value, legacy, select_passthrough, exclude_mod=None):
|
def _template_view3d_select(*, type, value, legacy, select_passthrough, exclude_mod=None):
|
||||||
# NOTE: `exclude_mod` is needed since we don't want this tool to exclude Control-RMB actions when this is used
|
# NOTE: `exclude_mod` is needed since we don't want this tool to exclude Control-RMB actions when this is used
|
||||||
# as a tool key-map with RMB-select and `use_fallback_tool` is enabled with RMB select. See T92467.
|
# as a tool key-map with RMB-select and `use_fallback_tool` is enabled with RMB select. See #92467.
|
||||||
|
|
||||||
props_vert_without_handles = ()
|
props_vert_without_handles = ()
|
||||||
if select_passthrough:
|
if select_passthrough:
|
||||||
@ -5683,7 +5683,7 @@ def km_object_non_modal(params):
|
|||||||
])
|
])
|
||||||
else:
|
else:
|
||||||
items.extend([
|
items.extend([
|
||||||
# NOTE: this shortcut (while not temporary) is not ideal, see: T89757.
|
# NOTE: this shortcut (while not temporary) is not ideal, see: #89757.
|
||||||
("object.transfer_mode", {"type": 'Q', "value": 'PRESS', "alt": True}, None),
|
("object.transfer_mode", {"type": 'Q', "value": 'PRESS', "alt": True}, None),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@ -790,7 +790,7 @@ class TransformsToDeltasAnim(Operator):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# first pass over F-Curves: ensure that we don't have conflicting
|
# first pass over F-Curves: ensure that we don't have conflicting
|
||||||
# transforms already (e.g. if this was applied already) T29110.
|
# transforms already (e.g. if this was applied already) #29110.
|
||||||
existingFCurves = {}
|
existingFCurves = {}
|
||||||
for fcu in adt.action.fcurves:
|
for fcu in adt.action.fcurves:
|
||||||
# get "delta" path - i.e. the final paths which may clash
|
# get "delta" path - i.e. the final paths which may clash
|
||||||
|
@ -700,7 +700,7 @@ class PREFERENCES_OT_addon_install(Operator):
|
|||||||
addons_new.discard("modules")
|
addons_new.discard("modules")
|
||||||
|
|
||||||
# disable any addons we may have enabled previously and removed.
|
# disable any addons we may have enabled previously and removed.
|
||||||
# this is unlikely but do just in case. bug T23978.
|
# this is unlikely but do just in case. bug #23978.
|
||||||
for new_addon in addons_new:
|
for new_addon in addons_new:
|
||||||
addon_utils.disable(new_addon, default_set=True)
|
addon_utils.disable(new_addon, default_set=True)
|
||||||
|
|
||||||
|
@ -581,7 +581,7 @@ class LightMapPack(Operator):
|
|||||||
# Proper solution would be to make undo stack aware of such things,
|
# Proper solution would be to make undo stack aware of such things,
|
||||||
# but for now just disable redo. Keep undo here so unwanted changes to uv
|
# but for now just disable redo. Keep undo here so unwanted changes to uv
|
||||||
# coords might be undone.
|
# coords might be undone.
|
||||||
# This fixes infinite image creation reported there T30968 (sergey)
|
# This fixes infinite image creation reported there #30968 (sergey)
|
||||||
bl_options = {'UNDO'}
|
bl_options = {'UNDO'}
|
||||||
|
|
||||||
PREF_CONTEXT: bpy.props.EnumProperty(
|
PREF_CONTEXT: bpy.props.EnumProperty(
|
||||||
|
@ -90,7 +90,7 @@ def applyVertexDirt(me, blur_iterations, blur_strength, clamp_dirt, clamp_clean,
|
|||||||
tone_range = max_tone - min_tone
|
tone_range = max_tone - min_tone
|
||||||
|
|
||||||
if tone_range < 0.0001:
|
if tone_range < 0.0001:
|
||||||
# weak, don't cancel, see T43345
|
# weak, don't cancel, see #43345
|
||||||
tone_range = 0.0
|
tone_range = 0.0
|
||||||
else:
|
else:
|
||||||
tone_range = 1.0 / tone_range
|
tone_range = 1.0 / tone_range
|
||||||
|
@ -42,7 +42,7 @@ class VIEW3D_OT_edit_mesh_extrude_individual_move(Operator):
|
|||||||
bpy.ops.mesh.extrude_vertices_move('INVOKE_REGION_WIN')
|
bpy.ops.mesh.extrude_vertices_move('INVOKE_REGION_WIN')
|
||||||
|
|
||||||
# ignore return from operators above because they are 'RUNNING_MODAL',
|
# ignore return from operators above because they are 'RUNNING_MODAL',
|
||||||
# and cause this one not to be freed. T24671.
|
# and cause this one not to be freed. #24671.
|
||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
|
|
||||||
def invoke(self, context, _event):
|
def invoke(self, context, _event):
|
||||||
@ -104,7 +104,7 @@ class VIEW3D_OT_edit_mesh_extrude_move(Operator):
|
|||||||
'INVOKE_REGION_WIN',
|
'INVOKE_REGION_WIN',
|
||||||
TRANSFORM_OT_translate={
|
TRANSFORM_OT_translate={
|
||||||
# Don't set the constraint axis since users will expect MMB
|
# Don't set the constraint axis since users will expect MMB
|
||||||
# to use the user setting, see: T61637
|
# to use the user setting, see: #61637
|
||||||
# "orient_type": 'NORMAL',
|
# "orient_type": 'NORMAL',
|
||||||
# Not a popular choice, too restrictive for retopo.
|
# Not a popular choice, too restrictive for retopo.
|
||||||
# "constraint_axis": (True, True, False)})
|
# "constraint_axis": (True, True, False)})
|
||||||
@ -114,7 +114,7 @@ class VIEW3D_OT_edit_mesh_extrude_move(Operator):
|
|||||||
bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN')
|
bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN')
|
||||||
|
|
||||||
# ignore return from operators above because they are 'RUNNING_MODAL',
|
# ignore return from operators above because they are 'RUNNING_MODAL',
|
||||||
# and cause this one not to be freed. T24671.
|
# and cause this one not to be freed. #24671.
|
||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
|
@ -1725,7 +1725,7 @@ class WM_OT_properties_edit(Operator):
|
|||||||
for nt in adt.nla_tracks:
|
for nt in adt.nla_tracks:
|
||||||
_update_strips(nt.strips)
|
_update_strips(nt.strips)
|
||||||
|
|
||||||
# Otherwise existing buttons which reference freed memory may crash Blender (T26510).
|
# Otherwise existing buttons which reference freed memory may crash Blender (#26510).
|
||||||
for win in context.window_manager.windows:
|
for win in context.window_manager.windows:
|
||||||
for area in win.screen.areas:
|
for area in win.screen.areas:
|
||||||
area.tag_redraw()
|
area.tag_redraw()
|
||||||
|
@ -91,7 +91,7 @@ class TEXTURE_PT_preview(TextureButtonsPanel, Panel):
|
|||||||
else:
|
else:
|
||||||
layout.template_preview(tex, slot=slot)
|
layout.template_preview(tex, slot=slot)
|
||||||
|
|
||||||
# Show Alpha Button for Brush Textures, see T29502.
|
# Show Alpha Button for Brush Textures, see #29502.
|
||||||
idblock = context_tex_datablock(context)
|
idblock = context_tex_datablock(context)
|
||||||
if isinstance(idblock, Brush):
|
if isinstance(idblock, Brush):
|
||||||
layout.prop(tex, "use_preview_alpha")
|
layout.prop(tex, "use_preview_alpha")
|
||||||
|
@ -62,7 +62,7 @@ class NODE_HT_header(Header):
|
|||||||
|
|
||||||
types_that_support_material = {'MESH', 'CURVE', 'SURFACE', 'FONT', 'META',
|
types_that_support_material = {'MESH', 'CURVE', 'SURFACE', 'FONT', 'META',
|
||||||
'GPENCIL', 'VOLUME', 'CURVES', 'POINTCLOUD'}
|
'GPENCIL', 'VOLUME', 'CURVES', 'POINTCLOUD'}
|
||||||
# disable material slot buttons when pinned, cannot find correct slot within id_from (T36589)
|
# disable material slot buttons when pinned, cannot find correct slot within id_from (#36589)
|
||||||
# disable also when the selected object does not support materials
|
# disable also when the selected object does not support materials
|
||||||
has_material_slots = not snode.pin and ob_type in types_that_support_material
|
has_material_slots = not snode.pin and ob_type in types_that_support_material
|
||||||
|
|
||||||
|
@ -407,7 +407,7 @@ class SEQUENCER_MT_view(Menu):
|
|||||||
if st.view_type == 'PREVIEW':
|
if st.view_type == 'PREVIEW':
|
||||||
# Specifying the REGION_PREVIEW context is needed in preview-only
|
# Specifying the REGION_PREVIEW context is needed in preview-only
|
||||||
# mode, else the lookup for the shortcut will fail in
|
# mode, else the lookup for the shortcut will fail in
|
||||||
# wm_keymap_item_find_props() (see T32595).
|
# wm_keymap_item_find_props() (see #32595).
|
||||||
layout.operator_context = 'INVOKE_REGION_PREVIEW'
|
layout.operator_context = 'INVOKE_REGION_PREVIEW'
|
||||||
layout.prop(st, "show_region_ui")
|
layout.prop(st, "show_region_ui")
|
||||||
layout.prop(st, "show_region_tool_header")
|
layout.prop(st, "show_region_tool_header")
|
||||||
@ -429,7 +429,7 @@ class SEQUENCER_MT_view(Menu):
|
|||||||
|
|
||||||
layout.operator_context = 'INVOKE_REGION_WIN'
|
layout.operator_context = 'INVOKE_REGION_WIN'
|
||||||
if st.view_type == 'PREVIEW':
|
if st.view_type == 'PREVIEW':
|
||||||
# See above (T32595)
|
# See above (#32595)
|
||||||
layout.operator_context = 'INVOKE_REGION_PREVIEW'
|
layout.operator_context = 'INVOKE_REGION_PREVIEW'
|
||||||
layout.operator("sequencer.view_selected", text="Frame Selected")
|
layout.operator("sequencer.view_selected", text="Frame Selected")
|
||||||
|
|
||||||
|
@ -326,7 +326,7 @@ class TOPBAR_MT_file_new(Menu):
|
|||||||
# Expand template paths.
|
# Expand template paths.
|
||||||
|
|
||||||
# Use a set to avoid duplicate user/system templates.
|
# Use a set to avoid duplicate user/system templates.
|
||||||
# This is a corner case, but users managed to do it! T76849.
|
# This is a corner case, but users managed to do it! #76849.
|
||||||
app_templates = set()
|
app_templates = set()
|
||||||
for path in template_paths:
|
for path in template_paths:
|
||||||
for d in os.listdir(path):
|
for d in os.listdir(path):
|
||||||
|
@ -892,7 +892,7 @@ class VIEW3D_HT_header(Header):
|
|||||||
row.active = (object_mode == 'EDIT') or (shading.type in {'WIREFRAME', 'SOLID'})
|
row.active = (object_mode == 'EDIT') or (shading.type in {'WIREFRAME', 'SOLID'})
|
||||||
|
|
||||||
# While exposing `shading.show_xray(_wireframe)` is correct.
|
# While exposing `shading.show_xray(_wireframe)` is correct.
|
||||||
# this hides the key shortcut from users: T70433.
|
# this hides the key shortcut from users: #70433.
|
||||||
if has_pose_mode:
|
if has_pose_mode:
|
||||||
draw_depressed = overlay.show_xray_bone
|
draw_depressed = overlay.show_xray_bone
|
||||||
elif shading.type == 'WIREFRAME':
|
elif shading.type == 'WIREFRAME':
|
||||||
@ -2270,7 +2270,7 @@ class VIEW3D_MT_add(Menu):
|
|||||||
# NOTE: don't use 'EXEC_SCREEN' or operators won't get the `v3d` context.
|
# NOTE: don't use 'EXEC_SCREEN' or operators won't get the `v3d` context.
|
||||||
|
|
||||||
# NOTE: was `EXEC_AREA`, but this context does not have the `rv3d`, which prevents
|
# NOTE: was `EXEC_AREA`, but this context does not have the `rv3d`, which prevents
|
||||||
# "align_view" to work on first call (see T32719).
|
# "align_view" to work on first call (see #32719).
|
||||||
layout.operator_context = 'EXEC_REGION_WIN'
|
layout.operator_context = 'EXEC_REGION_WIN'
|
||||||
|
|
||||||
# layout.operator_menu_enum("object.mesh_add", "type", text="Mesh", icon='OUTLINER_OB_MESH')
|
# layout.operator_menu_enum("object.mesh_add", "type", text="Mesh", icon='OUTLINER_OB_MESH')
|
||||||
@ -5378,7 +5378,7 @@ class VIEW3D_MT_shading_ex_pie(Menu):
|
|||||||
pie.prop_enum(view.shading, "type", value='WIREFRAME')
|
pie.prop_enum(view.shading, "type", value='WIREFRAME')
|
||||||
pie.prop_enum(view.shading, "type", value='SOLID')
|
pie.prop_enum(view.shading, "type", value='SOLID')
|
||||||
|
|
||||||
# Note this duplicates "view3d.toggle_xray" logic, so we can see the active item: T58661.
|
# Note this duplicates "view3d.toggle_xray" logic, so we can see the active item: #58661.
|
||||||
if context.pose_object:
|
if context.pose_object:
|
||||||
pie.prop(view.overlay, "show_xray_bone", icon='XRAY')
|
pie.prop(view.overlay, "show_xray_bone", icon='XRAY')
|
||||||
else:
|
else:
|
||||||
|
@ -639,7 +639,7 @@ class BUILTIN_KSI_DeltaScale(KeyingSetInfo):
|
|||||||
|
|
||||||
# Note that this controls order of options in `insert keyframe` menu.
|
# Note that this controls order of options in `insert keyframe` menu.
|
||||||
# Better try to keep some logical order here beyond mere alphabetical one, also because of menu entries shortcut.
|
# Better try to keep some logical order here beyond mere alphabetical one, also because of menu entries shortcut.
|
||||||
# See also T51867.
|
# See also #51867.
|
||||||
classes = (
|
classes = (
|
||||||
BUILTIN_KSI_Available,
|
BUILTIN_KSI_Available,
|
||||||
BUILTIN_KSI_Location,
|
BUILTIN_KSI_Location,
|
||||||
|
@ -165,7 +165,7 @@ int BLF_load_unique(const char *name)
|
|||||||
|
|
||||||
/* XXX: Temporarily disable kerning in our main font. Kerning had been accidentally removed from
|
/* XXX: Temporarily disable kerning in our main font. Kerning had been accidentally removed from
|
||||||
* our font in 3.1. In 3.4 we disable kerning here in the new version to keep spacing the same
|
* our font in 3.1. In 3.4 we disable kerning here in the new version to keep spacing the same
|
||||||
* (T101506). Enable again later with change of font, placement, or rendering - Harley. */
|
* (#101506). Enable again later with change of font, placement, or rendering - Harley. */
|
||||||
if (font && BLI_str_endswith(filepath, BLF_DEFAULT_PROPORTIONAL_FONT)) {
|
if (font && BLI_str_endswith(filepath, BLF_DEFAULT_PROPORTIONAL_FONT)) {
|
||||||
font->face_flags &= ~FT_FACE_FLAG_KERNING;
|
font->face_flags &= ~FT_FACE_FLAG_KERNING;
|
||||||
}
|
}
|
||||||
|
@ -271,7 +271,7 @@ struct bPoseChannel *BKE_pose_channel_active_if_layer_visible(struct Object *ob)
|
|||||||
* In this case the active-selected is an obvious choice when finding the target for a
|
* In this case the active-selected is an obvious choice when finding the target for a
|
||||||
* constraint for eg. however from the users perspective the active pose bone of the
|
* constraint for eg. however from the users perspective the active pose bone of the
|
||||||
* active object is the _real_ active bone, so any other non-active selected bone
|
* active object is the _real_ active bone, so any other non-active selected bone
|
||||||
* is a candidate for being the other selected bone, see: T58447.
|
* is a candidate for being the other selected bone, see: #58447.
|
||||||
*/
|
*/
|
||||||
struct bPoseChannel *BKE_pose_channel_active_or_first_selected(struct Object *ob);
|
struct bPoseChannel *BKE_pose_channel_active_or_first_selected(struct Object *ob);
|
||||||
/**
|
/**
|
||||||
|
@ -37,7 +37,7 @@ struct bActionGroup;
|
|||||||
/* Container for data required to do FCurve and Driver evaluation. */
|
/* Container for data required to do FCurve and Driver evaluation. */
|
||||||
typedef struct AnimationEvalContext {
|
typedef struct AnimationEvalContext {
|
||||||
/* For drivers, so that they have access to the dependency graph and the current view layer. See
|
/* For drivers, so that they have access to the dependency graph and the current view layer. See
|
||||||
* T77086. */
|
* #77086. */
|
||||||
struct Depsgraph *depsgraph;
|
struct Depsgraph *depsgraph;
|
||||||
|
|
||||||
/* FCurves and Drivers can be evaluated at a different time than the current scene time, for
|
/* FCurves and Drivers can be evaluated at a different time than the current scene time, for
|
||||||
|
@ -134,7 +134,7 @@ typedef struct Main {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* When linking, disallow creation of new data-blocks.
|
* When linking, disallow creation of new data-blocks.
|
||||||
* Make sure we don't do this by accident, see T76738.
|
* Make sure we don't do this by accident, see #76738.
|
||||||
*/
|
*/
|
||||||
bool is_locked_for_linking;
|
bool is_locked_for_linking;
|
||||||
|
|
||||||
|
@ -812,7 +812,7 @@ struct Mesh *BKE_mesh_merge_verts(struct Mesh *mesh,
|
|||||||
* Account for custom-data such as UVs becoming detached because of imprecision
|
* Account for custom-data such as UVs becoming detached because of imprecision
|
||||||
* in custom-data interpolation.
|
* in custom-data interpolation.
|
||||||
* Without running this operation subdivision surface can cause UVs to be disconnected,
|
* Without running this operation subdivision surface can cause UVs to be disconnected,
|
||||||
* see: T81065.
|
* see: #81065.
|
||||||
*/
|
*/
|
||||||
void BKE_mesh_merge_customdata_for_apply_modifier(struct Mesh *me);
|
void BKE_mesh_merge_customdata_for_apply_modifier(struct Mesh *me);
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ struct MeshRuntime {
|
|||||||
*
|
*
|
||||||
* Modifiers that edit the mesh data in-place must set this to false
|
* Modifiers that edit the mesh data in-place must set this to false
|
||||||
* (most #eModifierTypeType_NonGeometrical modifiers). Otherwise the edit-mesh
|
* (most #eModifierTypeType_NonGeometrical modifiers). Otherwise the edit-mesh
|
||||||
* data will be used for drawing, missing changes from modifiers. See T79517.
|
* data will be used for drawing, missing changes from modifiers. See #79517.
|
||||||
*/
|
*/
|
||||||
bool is_original_bmesh = false;
|
bool is_original_bmesh = false;
|
||||||
|
|
||||||
|
@ -995,7 +995,7 @@ void node_type_size(struct bNodeType *ntype, int width, int minwidth, int maxwid
|
|||||||
void node_type_size_preset(struct bNodeType *ntype, eNodeSizePreset size);
|
void node_type_size_preset(struct bNodeType *ntype, eNodeSizePreset size);
|
||||||
/**
|
/**
|
||||||
* \warning Nodes defining a storage type _must_ allocate this for new nodes.
|
* \warning Nodes defining a storage type _must_ allocate this for new nodes.
|
||||||
* Otherwise nodes will reload as undefined (T46619).
|
* Otherwise nodes will reload as undefined (#46619).
|
||||||
*/
|
*/
|
||||||
void node_type_storage(struct bNodeType *ntype,
|
void node_type_storage(struct bNodeType *ntype,
|
||||||
const char *storagename,
|
const char *storagename,
|
||||||
|
@ -370,7 +370,7 @@ void BKE_object_dimensions_get(struct Object *ob, float r_vec[3]);
|
|||||||
* typically this caused by parenting, constraints or delta-scale.
|
* typically this caused by parenting, constraints or delta-scale.
|
||||||
*
|
*
|
||||||
* Re-using these values from the object causes a feedback loop
|
* Re-using these values from the object causes a feedback loop
|
||||||
* when multiple values are modified at once in some situations. see: T69536.
|
* when multiple values are modified at once in some situations. see: #69536.
|
||||||
*/
|
*/
|
||||||
void BKE_object_dimensions_set_ex(struct Object *ob,
|
void BKE_object_dimensions_set_ex(struct Object *ob,
|
||||||
const float value[3],
|
const float value[3],
|
||||||
|
@ -775,7 +775,7 @@ void BKE_pbvh_node_get_bm_orco_data(PBVHNode *node,
|
|||||||
/**
|
/**
|
||||||
* \note doing a full search on all vertices here seems expensive,
|
* \note doing a full search on all vertices here seems expensive,
|
||||||
* however this is important to avoid having to recalculate bound-box & sync the buffers to the
|
* however this is important to avoid having to recalculate bound-box & sync the buffers to the
|
||||||
* GPU (which is far more expensive!) See: T47232.
|
* GPU (which is far more expensive!) See: #47232.
|
||||||
*/
|
*/
|
||||||
bool BKE_pbvh_node_has_vert_with_normal_update_tag(PBVH *pbvh, PBVHNode *node);
|
bool BKE_pbvh_node_has_vert_with_normal_update_tag(PBVH *pbvh, PBVHNode *node);
|
||||||
|
|
||||||
|
@ -911,7 +911,7 @@ static void mesh_calc_modifiers(struct Depsgraph *depsgraph,
|
|||||||
|
|
||||||
/* set the Mesh to only copy needed data */
|
/* set the Mesh to only copy needed data */
|
||||||
CustomData_MeshMasks mask = md_datamask->mask;
|
CustomData_MeshMasks mask = md_datamask->mask;
|
||||||
/* needMapping check here fixes bug T28112, otherwise it's
|
/* needMapping check here fixes bug #28112, otherwise it's
|
||||||
* possible that it won't be copied */
|
* possible that it won't be copied */
|
||||||
CustomData_MeshMasks_update(&mask, &append_mask);
|
CustomData_MeshMasks_update(&mask, &append_mask);
|
||||||
if (need_mapping) {
|
if (need_mapping) {
|
||||||
@ -1678,7 +1678,7 @@ void makeDerivedMesh(struct Depsgraph *depsgraph,
|
|||||||
BLI_assert(ob->type == OB_MESH);
|
BLI_assert(ob->type == OB_MESH);
|
||||||
|
|
||||||
/* Evaluated meshes aren't supposed to be created on original instances. If you do,
|
/* Evaluated meshes aren't supposed to be created on original instances. If you do,
|
||||||
* they aren't cleaned up properly on mode switch, causing crashes, e.g T58150. */
|
* they aren't cleaned up properly on mode switch, causing crashes, e.g #58150. */
|
||||||
BLI_assert(ob->id.tag & LIB_TAG_COPIED_ON_WRITE);
|
BLI_assert(ob->id.tag & LIB_TAG_COPIED_ON_WRITE);
|
||||||
|
|
||||||
BKE_object_free_derived_caches(ob);
|
BKE_object_free_derived_caches(ob);
|
||||||
@ -1715,7 +1715,7 @@ Mesh *mesh_get_eval_final(struct Depsgraph *depsgraph,
|
|||||||
BLI_assert(DEG_is_evaluating(depsgraph) == false);
|
BLI_assert(DEG_is_evaluating(depsgraph) == false);
|
||||||
|
|
||||||
/* Evaluated meshes aren't supposed to be created on original instances. If you do,
|
/* Evaluated meshes aren't supposed to be created on original instances. If you do,
|
||||||
* they aren't cleaned up properly on mode switch, causing crashes, e.g T58150. */
|
* they aren't cleaned up properly on mode switch, causing crashes, e.g #58150. */
|
||||||
BLI_assert(ob->id.tag & LIB_TAG_COPIED_ON_WRITE);
|
BLI_assert(ob->id.tag & LIB_TAG_COPIED_ON_WRITE);
|
||||||
|
|
||||||
/* if there's no evaluated mesh or the last data mask used doesn't include
|
/* if there's no evaluated mesh or the last data mask used doesn't include
|
||||||
@ -1757,7 +1757,7 @@ Mesh *mesh_get_eval_deform(struct Depsgraph *depsgraph,
|
|||||||
BLI_assert(DEG_is_evaluating(depsgraph) == false);
|
BLI_assert(DEG_is_evaluating(depsgraph) == false);
|
||||||
|
|
||||||
/* Evaluated meshes aren't supposed to be created on original instances. If you do,
|
/* Evaluated meshes aren't supposed to be created on original instances. If you do,
|
||||||
* they aren't cleaned up properly on mode switch, causing crashes, e.g T58150. */
|
* they aren't cleaned up properly on mode switch, causing crashes, e.g #58150. */
|
||||||
BLI_assert(ob->id.tag & LIB_TAG_COPIED_ON_WRITE);
|
BLI_assert(ob->id.tag & LIB_TAG_COPIED_ON_WRITE);
|
||||||
|
|
||||||
/* if there's no derived mesh or the last data mask used doesn't include
|
/* if there's no derived mesh or the last data mask used doesn't include
|
||||||
|
@ -1406,7 +1406,7 @@ void calc_action_range(const bAction *act, float *start, float *end, short incl_
|
|||||||
* - no "selected only", since this is often used in the backend
|
* - no "selected only", since this is often used in the backend
|
||||||
* - no "minimum length" (we will apply this later), otherwise
|
* - no "minimum length" (we will apply this later), otherwise
|
||||||
* single-keyframe curves will increase the overall length by
|
* single-keyframe curves will increase the overall length by
|
||||||
* a phantom frame (T50354)
|
* a phantom frame (#50354)
|
||||||
*/
|
*/
|
||||||
BKE_fcurve_calc_range(fcu, &nmin, &nmax, false, false);
|
BKE_fcurve_calc_range(fcu, &nmin, &nmax, false, false);
|
||||||
|
|
||||||
|
@ -1461,7 +1461,7 @@ void BKE_animdata_blend_read_data(BlendDataReader *reader, AnimData *adt)
|
|||||||
|
|
||||||
/* relink active track/strip - even though strictly speaking this should only be used
|
/* relink active track/strip - even though strictly speaking this should only be used
|
||||||
* if we're in 'tweaking mode', we need to be able to have this loaded back for
|
* if we're in 'tweaking mode', we need to be able to have this loaded back for
|
||||||
* undo, but also since users may not exit tweak-mode before saving (T24535).
|
* undo, but also since users may not exit tweak-mode before saving (#24535).
|
||||||
*/
|
*/
|
||||||
/* TODO: it's not really nice that anyone should be able to save the file in this
|
/* TODO: it's not really nice that anyone should be able to save the file in this
|
||||||
* state, but it's going to be too hard to enforce this single case. */
|
* state, but it's going to be too hard to enforce this single case. */
|
||||||
|
@ -2880,7 +2880,7 @@ static void nlastrip_evaluate_meta(const int evaluation_mode,
|
|||||||
STRIP_EVAL_NOBLEND));
|
STRIP_EVAL_NOBLEND));
|
||||||
|
|
||||||
/* directly evaluate child strip into accumulation buffer...
|
/* directly evaluate child strip into accumulation buffer...
|
||||||
* - there's no need to use a temporary buffer (as it causes issues [T40082])
|
* - there's no need to use a temporary buffer (as it causes issues [#40082])
|
||||||
*/
|
*/
|
||||||
if (tmp_nes) {
|
if (tmp_nes) {
|
||||||
nlastrip_evaluate(evaluation_mode,
|
nlastrip_evaluate(evaluation_mode,
|
||||||
@ -4163,7 +4163,7 @@ void BKE_animsys_eval_driver(Depsgraph *depsgraph, ID *id, int driver_index, FCu
|
|||||||
const float curval = calculate_fcurve(&anim_rna, fcu, &anim_eval_context);
|
const float curval = calculate_fcurve(&anim_rna, fcu, &anim_eval_context);
|
||||||
ok = BKE_animsys_write_to_rna_path(&anim_rna, curval);
|
ok = BKE_animsys_write_to_rna_path(&anim_rna, curval);
|
||||||
|
|
||||||
/* Flush results & status codes to original data for UI (T59984) */
|
/* Flush results & status codes to original data for UI (#59984) */
|
||||||
if (ok && DEG_is_active(depsgraph)) {
|
if (ok && DEG_is_active(depsgraph)) {
|
||||||
animsys_write_orig_anim_rna(&id_ptr, fcu->rna_path, fcu->array_index, curval);
|
animsys_write_orig_anim_rna(&id_ptr, fcu->rna_path, fcu->array_index, curval);
|
||||||
|
|
||||||
|
@ -925,7 +925,7 @@ static void pose_channel_flush_to_orig_if_needed(struct Depsgraph *depsgraph,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bPoseChannel *pchan_orig = pchan->orig_pchan;
|
bPoseChannel *pchan_orig = pchan->orig_pchan;
|
||||||
/* TODO(sergey): Using BKE_pose_copy_pchan_result() introduces T70901, but why? */
|
/* TODO(sergey): Using BKE_pose_copy_pchan_result() introduces #70901, but why? */
|
||||||
copy_m4_m4(pchan_orig->pose_mat, pchan->pose_mat);
|
copy_m4_m4(pchan_orig->pose_mat, pchan->pose_mat);
|
||||||
copy_m4_m4(pchan_orig->chan_mat, pchan->chan_mat);
|
copy_m4_m4(pchan_orig->chan_mat, pchan->chan_mat);
|
||||||
copy_v3_v3(pchan_orig->pose_head, pchan->pose_mat[3]);
|
copy_v3_v3(pchan_orig->pose_head, pchan->pose_mat[3]);
|
||||||
|
@ -203,7 +203,7 @@ static void setup_app_data(bContext *C,
|
|||||||
* But if they close one of the screens,
|
* But if they close one of the screens,
|
||||||
* undo will ensure that the scene being operated on will be activated
|
* undo will ensure that the scene being operated on will be activated
|
||||||
* (otherwise we'd be undoing on an off-screen scene which isn't acceptable).
|
* (otherwise we'd be undoing on an off-screen scene which isn't acceptable).
|
||||||
* see: T43424
|
* see: #43424
|
||||||
*/
|
*/
|
||||||
wmWindow *win;
|
wmWindow *win;
|
||||||
bScreen *curscreen = nullptr;
|
bScreen *curscreen = nullptr;
|
||||||
|
@ -613,10 +613,10 @@ static void loose_data_instantiate_collection_process(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Forced instantiation of indirectly appended collections is not wanted. Users can now
|
/* Forced instantiation of indirectly appended collections is not wanted. Users can now
|
||||||
* easily instantiate collections (and their objects) as needed by themselves. See T67032. */
|
* easily instantiate collections (and their objects) as needed by themselves. See #67032. */
|
||||||
/* We need to check that objects in that collections are already instantiated in a scene.
|
/* We need to check that objects in that collections are already instantiated in a scene.
|
||||||
* Otherwise, it's better to add the collection to the scene's active collection, than to
|
* Otherwise, it's better to add the collection to the scene's active collection, than to
|
||||||
* instantiate its objects in active scene's collection directly. See T61141.
|
* instantiate its objects in active scene's collection directly. See #61141.
|
||||||
*
|
*
|
||||||
* NOTE: We only check object directly into that collection, not recursively into its
|
* NOTE: We only check object directly into that collection, not recursively into its
|
||||||
* children.
|
* children.
|
||||||
@ -625,7 +625,7 @@ static void loose_data_instantiate_collection_process(
|
|||||||
/* The collection could be linked/appended together with an Empty object instantiating it,
|
/* The collection could be linked/appended together with an Empty object instantiating it,
|
||||||
* better not instantiate the collection in the view-layer in that case.
|
* better not instantiate the collection in the view-layer in that case.
|
||||||
*
|
*
|
||||||
* Can easily happen when copy/pasting such instantiating empty, see T93839. */
|
* Can easily happen when copy/pasting such instantiating empty, see #93839. */
|
||||||
const bool collection_is_instantiated = collection_instantiated_by_any_object(bmain,
|
const bool collection_is_instantiated = collection_instantiated_by_any_object(bmain,
|
||||||
collection);
|
collection);
|
||||||
/* Always consider adding collections directly selected by the user. */
|
/* Always consider adding collections directly selected by the user. */
|
||||||
@ -751,7 +751,7 @@ static void loose_data_instantiate_object_process(LooseDataInstantiateContext *i
|
|||||||
* While this is not ideal (in theory no object should remain un-owned), in case of indirectly
|
* While this is not ideal (in theory no object should remain un-owned), in case of indirectly
|
||||||
* linked objects, the other solution would be to add them to a local collection, which would
|
* linked objects, the other solution would be to add them to a local collection, which would
|
||||||
* make them directly linked. Think for now keeping them indirectly linked is more important.
|
* make them directly linked. Think for now keeping them indirectly linked is more important.
|
||||||
* Ref. T93757.
|
* Ref. #93757.
|
||||||
*/
|
*/
|
||||||
if (is_linking && (item->tag & LINK_APPEND_TAG_INDIRECT) != 0) {
|
if (is_linking && (item->tag & LINK_APPEND_TAG_INDIRECT) != 0) {
|
||||||
continue;
|
continue;
|
||||||
@ -935,7 +935,7 @@ static int foreach_libblock_link_append_callback(LibraryIDLinkCallbackData *cb_d
|
|||||||
* the dependency here. Indeed, either they are both linked in another way (through their own
|
* the dependency here. Indeed, either they are both linked in another way (through their own
|
||||||
* meshes for shape keys e.g.), or this is an unsupported case (two shape-keys depending on
|
* meshes for shape keys e.g.), or this is an unsupported case (two shape-keys depending on
|
||||||
* each-other need to be also 'linked' in by their respective meshes, independent shape-keys
|
* each-other need to be also 'linked' in by their respective meshes, independent shape-keys
|
||||||
* are not allowed). ref T96048. */
|
* are not allowed). ref #96048. */
|
||||||
if (id != cb_data->id_self && BKE_idtype_idcode_is_linkable(GS(cb_data->id_self->name))) {
|
if (id != cb_data->id_self && BKE_idtype_idcode_is_linkable(GS(cb_data->id_self->name))) {
|
||||||
BKE_library_foreach_ID_link(
|
BKE_library_foreach_ID_link(
|
||||||
cb_data->bmain, id, foreach_libblock_link_append_callback, data, IDWALK_NOP);
|
cb_data->bmain, id, foreach_libblock_link_append_callback, data, IDWALK_NOP);
|
||||||
@ -1244,7 +1244,7 @@ void BKE_blendfile_link(BlendfileLinkAppendContext *lapp_context, ReportList *re
|
|||||||
mainl = BLO_library_link_begin(&blo_handle, libname, lapp_context->params);
|
mainl = BLO_library_link_begin(&blo_handle, libname, lapp_context->params);
|
||||||
lib = mainl->curlib;
|
lib = mainl->curlib;
|
||||||
BLI_assert(lib != NULL);
|
BLI_assert(lib != NULL);
|
||||||
/* In case lib was already existing but not found originally, see T99820. */
|
/* In case lib was already existing but not found originally, see #99820. */
|
||||||
lib->id.tag &= ~LIB_TAG_MISSING;
|
lib->id.tag &= ~LIB_TAG_MISSING;
|
||||||
|
|
||||||
if (mainl->versionfile < 250) {
|
if (mainl->versionfile < 250) {
|
||||||
@ -1424,7 +1424,7 @@ void BKE_blendfile_library_relocate(BlendfileLinkAppendContext *lapp_context,
|
|||||||
|
|
||||||
/* All override rules need to be up to date, since there will be no do_version here, otherwise
|
/* All override rules need to be up to date, since there will be no do_version here, otherwise
|
||||||
* older, now-invalid rules might be applied and likely fail, or some changes might be missing,
|
* older, now-invalid rules might be applied and likely fail, or some changes might be missing,
|
||||||
* etc. See T93353. */
|
* etc. See #93353. */
|
||||||
BKE_lib_override_library_main_operations_create(bmain, true, NULL);
|
BKE_lib_override_library_main_operations_create(bmain, true, NULL);
|
||||||
|
|
||||||
/* Remove all IDs to be reloaded from Main. */
|
/* Remove all IDs to be reloaded from Main. */
|
||||||
|
@ -537,7 +537,7 @@ void BKE_camera_view_frame_ex(const Scene *scene,
|
|||||||
r_vec[3][2] = depth;
|
r_vec[3][2] = depth;
|
||||||
|
|
||||||
if (do_clip) {
|
if (do_clip) {
|
||||||
/* Ensure the frame isn't behind the near clipping plane, T62814. */
|
/* Ensure the frame isn't behind the near clipping plane, #62814. */
|
||||||
float fac = ((camera->clip_start + 0.1f) / -r_vec[0][2]) * scale[2];
|
float fac = ((camera->clip_start + 0.1f) / -r_vec[0][2]) * scale[2];
|
||||||
for (uint i = 0; i < 4; i++) {
|
for (uint i = 0; i < 4; i++) {
|
||||||
if (camera->type == CAM_ORTHO) {
|
if (camera->type == CAM_ORTHO) {
|
||||||
|
@ -469,7 +469,7 @@ bool BKE_colorband_evaluate(const ColorBand *coba, float in, float out[4])
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* was setting to 0.0 in 2.56 & previous, but this
|
/* was setting to 0.0 in 2.56 & previous, but this
|
||||||
* is incorrect for the last element, see T26732. */
|
* is incorrect for the last element, see #26732. */
|
||||||
fac = (a != coba->tot) ? 0.0f : 1.0f;
|
fac = (a != coba->tot) ? 0.0f : 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ bConstraintOb *BKE_constraints_make_evalob(
|
|||||||
/* NOTE: Versions <= 2.76 assumed that "default" order
|
/* NOTE: Versions <= 2.76 assumed that "default" order
|
||||||
* would always get used, so we may seem some rig
|
* would always get used, so we may seem some rig
|
||||||
* breakage as a result. However, this change here
|
* breakage as a result. However, this change here
|
||||||
* is needed to fix T46599
|
* is needed to fix #46599
|
||||||
*/
|
*/
|
||||||
cob->rotOrder = ob->rotmode;
|
cob->rotOrder = ob->rotmode;
|
||||||
}
|
}
|
||||||
@ -1222,7 +1222,7 @@ static void vectomat(const float vec[3],
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* NOTE: even though 'n' is normalized, don't use 'project_v3_v3v3_normalized' below
|
/* NOTE: even though 'n' is normalized, don't use 'project_v3_v3v3_normalized' below
|
||||||
* because precision issues cause a problem in near degenerate states, see: T53455. */
|
* because precision issues cause a problem in near degenerate states, see: #53455. */
|
||||||
|
|
||||||
/* project the up vector onto the plane specified by n */
|
/* project the up vector onto the plane specified by n */
|
||||||
project_v3_v3v3(proj, u, n); /* first u onto n... */
|
project_v3_v3v3(proj, u, n); /* first u onto n... */
|
||||||
@ -1953,7 +1953,7 @@ static void rotlike_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *tar
|
|||||||
/* To allow compatible rotations, must get both rotations in the order of the owner... */
|
/* To allow compatible rotations, must get both rotations in the order of the owner... */
|
||||||
mat4_to_eulO(obeul, rot_order, cob->matrix);
|
mat4_to_eulO(obeul, rot_order, cob->matrix);
|
||||||
/* We must get compatible eulers from the beginning because
|
/* We must get compatible eulers from the beginning because
|
||||||
* some of them can be modified below (see bug T21875).
|
* some of them can be modified below (see bug #21875).
|
||||||
* Additionally, since this constraint is based on euler rotation math, it doesn't work well
|
* Additionally, since this constraint is based on euler rotation math, it doesn't work well
|
||||||
* with shear. The Y axis is chosen as the main axis when we orthogonalize the matrix because
|
* with shear. The Y axis is chosen as the main axis when we orthogonalize the matrix because
|
||||||
* constraints are used most commonly on bones. */
|
* constraints are used most commonly on bones. */
|
||||||
@ -4024,7 +4024,7 @@ static void transform_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
|
|||||||
mat4_to_size(dvec, ct->matrix);
|
mat4_to_size(dvec, ct->matrix);
|
||||||
|
|
||||||
if (is_negative_m4(ct->matrix)) {
|
if (is_negative_m4(ct->matrix)) {
|
||||||
/* Bugfix T27886: (this is a limitation that riggers will have to live with for now).
|
/* Bugfix #27886: (this is a limitation that riggers will have to live with for now).
|
||||||
* We can't be sure which axis/axes are negative,
|
* We can't be sure which axis/axes are negative,
|
||||||
* though we know that something is negative.
|
* though we know that something is negative.
|
||||||
* Assume we don't care about negativity of separate axes. */
|
* Assume we don't care about negativity of separate axes. */
|
||||||
@ -4307,7 +4307,7 @@ static void shrinkwrap_get_tarmat(struct Depsgraph *UNUSED(depsgraph),
|
|||||||
/* Transform normal into requested space */
|
/* Transform normal into requested space */
|
||||||
/* Note that in this specific case, we need to keep scaling in non-parented 'local2world'
|
/* Note that in this specific case, we need to keep scaling in non-parented 'local2world'
|
||||||
* object case, because SpaceTransform also takes it into account when handling normals.
|
* object case, because SpaceTransform also takes it into account when handling normals.
|
||||||
* See T42447. */
|
* See #42447. */
|
||||||
unit_m4(mat);
|
unit_m4(mat);
|
||||||
BKE_constraint_mat_convertspace(
|
BKE_constraint_mat_convertspace(
|
||||||
cob->ob, cob->pchan, cob, mat, CONSTRAINT_SPACE_LOCAL, scon->projAxisSpace, true);
|
cob->ob, cob->pchan, cob, mat, CONSTRAINT_SPACE_LOCAL, scon->projAxisSpace, true);
|
||||||
@ -5605,7 +5605,7 @@ bool BKE_constraint_remove_ex(ListBase *list, Object *ob, bConstraint *con, bool
|
|||||||
{
|
{
|
||||||
const short type = con->type;
|
const short type = con->type;
|
||||||
if (BKE_constraint_remove(list, con)) {
|
if (BKE_constraint_remove(list, con)) {
|
||||||
/* ITASC needs to be rebuilt once a constraint is removed T26920. */
|
/* ITASC needs to be rebuilt once a constraint is removed #26920. */
|
||||||
if (clear_dep && ELEM(type, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_SPLINEIK)) {
|
if (clear_dep && ELEM(type, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_SPLINEIK)) {
|
||||||
BIK_clear_data(ob->pose);
|
BIK_clear_data(ob->pose);
|
||||||
}
|
}
|
||||||
@ -5831,7 +5831,7 @@ static bConstraint *add_new_constraint(Object *ob,
|
|||||||
}
|
}
|
||||||
case CONSTRAINT_TYPE_ACTION: {
|
case CONSTRAINT_TYPE_ACTION: {
|
||||||
/* The Before or Split modes require computing in local space, but
|
/* The Before or Split modes require computing in local space, but
|
||||||
* for objects the Local space doesn't make sense (T78462, D6095 etc).
|
* for objects the Local space doesn't make sense (#78462, D6095 etc).
|
||||||
* So only default to Before (Split) if the constraint is on a bone. */
|
* So only default to Before (Split) if the constraint is on a bone. */
|
||||||
if (pchan) {
|
if (pchan) {
|
||||||
bActionConstraint *data = con->data;
|
bActionConstraint *data = con->data;
|
||||||
@ -6422,7 +6422,7 @@ void BKE_constraints_solve(struct Depsgraph *depsgraph,
|
|||||||
|
|
||||||
/* Interpolate the enforcement, to blend result of constraint into final owner transform
|
/* Interpolate the enforcement, to blend result of constraint into final owner transform
|
||||||
* - all this happens in world-space to prevent any weirdness creeping in
|
* - all this happens in world-space to prevent any weirdness creeping in
|
||||||
* (T26014 and T25725), since some constraints may not convert the solution back to the input
|
* (#26014 and #25725), since some constraints may not convert the solution back to the input
|
||||||
* space before blending but all are guaranteed to end up in good "world-space" result.
|
* space before blending but all are guaranteed to end up in good "world-space" result.
|
||||||
*/
|
*/
|
||||||
/* NOTE: all kind of stuff here before (caused trouble), much easier to just interpolate,
|
/* NOTE: all kind of stuff here before (caused trouble), much easier to just interpolate,
|
||||||
|
@ -398,7 +398,7 @@ int BKE_sculpt_get_first_deform_matrices(struct Depsgraph *depsgraph,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* More complex handling will continue in BKE_crazyspace_build_sculpt.
|
/* More complex handling will continue in BKE_crazyspace_build_sculpt.
|
||||||
* Exiting the loop on a non-deform modifier causes issues - T71213. */
|
* Exiting the loop on a non-deform modifier causes issues - #71213. */
|
||||||
BLI_assert(crazyspace_modifier_supports_deform(md));
|
BLI_assert(crazyspace_modifier_supports_deform(md));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2097,10 +2097,10 @@ static void bevel_list_calc_bisect(BevList *bl)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* In the unlikely situation that handles define a zeroed direction,
|
/* In the unlikely situation that handles define a zeroed direction,
|
||||||
* calculate it from the adjacent points, see T80742.
|
* calculate it from the adjacent points, see #80742.
|
||||||
*
|
*
|
||||||
* Only do this as a fallback since we typically want the end-point directions
|
* Only do this as a fallback since we typically want the end-point directions
|
||||||
* to be exactly aligned with the handles at the end-point, see T83117. */
|
* to be exactly aligned with the handles at the end-point, see #83117. */
|
||||||
if (is_cyclic == false) {
|
if (is_cyclic == false) {
|
||||||
bevp0 = &bl->bevpoints[0];
|
bevp0 = &bl->bevpoints[0];
|
||||||
bevp1 = &bl->bevpoints[1];
|
bevp1 = &bl->bevpoints[1];
|
||||||
@ -2252,7 +2252,7 @@ static void make_bevel_list_3D_minimum_twist(BevList *bl)
|
|||||||
float q[4];
|
float q[4];
|
||||||
const bool is_cyclic = bl->poly != -1;
|
const bool is_cyclic = bl->poly != -1;
|
||||||
/* NOTE(@ideasman42): For non-cyclic curves only initialize the first direction
|
/* NOTE(@ideasman42): For non-cyclic curves only initialize the first direction
|
||||||
* (via `vec_to_quat`), necessary for symmetry, see T71137.
|
* (via `vec_to_quat`), necessary for symmetry, see #71137.
|
||||||
* Otherwise initialize the first and second points before propagating rotation forward.
|
* Otherwise initialize the first and second points before propagating rotation forward.
|
||||||
* This is historical as changing this can cause significantly different output.
|
* This is historical as changing this can cause significantly different output.
|
||||||
* Specifically: `deform_modifiers` test: (`CurveMeshDeform`).
|
* Specifically: `deform_modifiers` test: (`CurveMeshDeform`).
|
||||||
@ -2906,7 +2906,7 @@ void BKE_curve_bevelList_make(Object *ob, const ListBase *nurbs, const bool for_
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Scale the threshold so high resolution shapes don't get over reduced, see: T49850. */
|
/* Scale the threshold so high resolution shapes don't get over reduced, see: #49850. */
|
||||||
const float threshold_resolu = 0.00001f / resolu;
|
const float threshold_resolu = 0.00001f / resolu;
|
||||||
const bool is_cyclic = bl->poly != -1;
|
const bool is_cyclic = bl->poly != -1;
|
||||||
nr = bl->nr;
|
nr = bl->nr;
|
||||||
@ -3284,7 +3284,7 @@ static void calchandleNurb_intern(BezTriple *bezt,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (skip_align ||
|
if (skip_align ||
|
||||||
/* When one handle is free, aligning makes no sense, see: T35952 */
|
/* When one handle is free, aligning makes no sense, see: #35952 */
|
||||||
ELEM(HD_FREE, bezt->h1, bezt->h2) ||
|
ELEM(HD_FREE, bezt->h1, bezt->h2) ||
|
||||||
/* Also when no handles are aligned, skip this step. */
|
/* Also when no handles are aligned, skip this step. */
|
||||||
(!ELEM(HD_ALIGN, bezt->h1, bezt->h2) && !ELEM(HD_ALIGN_DOUBLESIDE, bezt->h1, bezt->h2))) {
|
(!ELEM(HD_ALIGN, bezt->h1, bezt->h2) && !ELEM(HD_ALIGN_DOUBLESIDE, bezt->h1, bezt->h2))) {
|
||||||
|
@ -147,7 +147,7 @@ struct LayerTypeInfo {
|
|||||||
* \note in some cases \a dest pointer is in \a sources
|
* \note in some cases \a dest pointer is in \a sources
|
||||||
* so all functions have to take this into account and delay
|
* so all functions have to take this into account and delay
|
||||||
* applying changes while reading from sources.
|
* applying changes while reading from sources.
|
||||||
* See bug T32395 - Campbell.
|
* See bug #32395 - Campbell.
|
||||||
*/
|
*/
|
||||||
cd_interp interp;
|
cd_interp interp;
|
||||||
|
|
||||||
@ -4356,7 +4356,7 @@ bool CustomData_verify_versions(CustomData *data, const int index)
|
|||||||
}
|
}
|
||||||
/* This is a preemptive fix for cases that should not happen
|
/* This is a preemptive fix for cases that should not happen
|
||||||
* (layers that should not be written in .blend files),
|
* (layers that should not be written in .blend files),
|
||||||
* but can happen due to bugs (see e.g. T62318).
|
* but can happen due to bugs (see e.g. #62318).
|
||||||
* Also for forward compatibility, in future,
|
* Also for forward compatibility, in future,
|
||||||
* we may put into `.blend` file some currently un-written data types,
|
* we may put into `.blend` file some currently un-written data types,
|
||||||
* this should cover that case as well.
|
* this should cover that case as well.
|
||||||
@ -4397,9 +4397,9 @@ static bool CustomData_layer_ensure_data_exists(CustomDataLayer *layer, size_t c
|
|||||||
|
|
||||||
switch (layer->type) {
|
switch (layer->type) {
|
||||||
/* When more instances of corrupt files are found, add them here. */
|
/* When more instances of corrupt files are found, add them here. */
|
||||||
case CD_PROP_BOOL: /* See T84935. */
|
case CD_PROP_BOOL: /* See #84935. */
|
||||||
case CD_MLOOPUV: /* See T90620. */
|
case CD_MLOOPUV: /* See #90620. */
|
||||||
case CD_PROP_FLOAT2: /* See T90620. */
|
case CD_PROP_FLOAT2: /* See #90620. */
|
||||||
layer->data = MEM_calloc_arrayN(count, typeInfo->size, layerType_getName(layer->type));
|
layer->data = MEM_calloc_arrayN(count, typeInfo->size, layerType_getName(layer->type));
|
||||||
BLI_assert(layer->data);
|
BLI_assert(layer->data);
|
||||||
if (typeInfo->set_default_value) {
|
if (typeInfo->set_default_value) {
|
||||||
@ -5150,7 +5150,7 @@ void CustomData_blend_read(BlendDataReader *reader, CustomData *data, const int
|
|||||||
{
|
{
|
||||||
BLO_read_data_address(reader, &data->layers);
|
BLO_read_data_address(reader, &data->layers);
|
||||||
|
|
||||||
/* Annoying workaround for bug T31079 loading legacy files with
|
/* Annoying workaround for bug #31079 loading legacy files with
|
||||||
* no polygons _but_ have stale custom-data. */
|
* no polygons _but_ have stale custom-data. */
|
||||||
if (UNLIKELY(count == 0 && data->layers == nullptr && data->totlayer != 0)) {
|
if (UNLIKELY(count == 0 && data->layers == nullptr && data->totlayer != 0)) {
|
||||||
CustomData_reset(data);
|
CustomData_reset(data);
|
||||||
@ -5173,8 +5173,8 @@ void CustomData_blend_read(BlendDataReader *reader, CustomData *data, const int
|
|||||||
BLO_read_data_address(reader, &layer->data);
|
BLO_read_data_address(reader, &layer->data);
|
||||||
if (CustomData_layer_ensure_data_exists(layer, count)) {
|
if (CustomData_layer_ensure_data_exists(layer, count)) {
|
||||||
/* Under normal operations, this shouldn't happen, but...
|
/* Under normal operations, this shouldn't happen, but...
|
||||||
* For a CD_PROP_BOOL example, see T84935.
|
* For a CD_PROP_BOOL example, see #84935.
|
||||||
* For a CD_MLOOPUV example, see T90620. */
|
* For a CD_MLOOPUV example, see #90620. */
|
||||||
CLOG_WARN(&LOG,
|
CLOG_WARN(&LOG,
|
||||||
"Allocated custom data layer that was not saved correctly for layer->type = %d.",
|
"Allocated custom data layer that was not saved correctly for layer->type = %d.",
|
||||||
layer->type);
|
layer->type);
|
||||||
|
@ -1353,7 +1353,7 @@ void BKE_displist_make_curveTypes(Depsgraph *depsgraph,
|
|||||||
* but it doesn't seem to work in this case.
|
* but it doesn't seem to work in this case.
|
||||||
*
|
*
|
||||||
* Since the plan is to replace this legacy curve object with the curves data-block
|
* Since the plan is to replace this legacy curve object with the curves data-block
|
||||||
* (see T95355), this somewhat hacky inefficient solution is relatively temporary.
|
* (see #95355), this somewhat hacky inefficient solution is relatively temporary.
|
||||||
*/
|
*/
|
||||||
Curve &cow_curve = *reinterpret_cast<Curve *>(
|
Curve &cow_curve = *reinterpret_cast<Curve *>(
|
||||||
BKE_id_copy_ex(nullptr, &original_curve.id, nullptr, LIB_ID_COPY_LOCALIZE));
|
BKE_id_copy_ex(nullptr, &original_curve.id, nullptr, LIB_ID_COPY_LOCALIZE));
|
||||||
|
@ -683,7 +683,7 @@ bool get_effector_data(EffectorCache *eff,
|
|||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
/* In case surface object is in Edit mode when loading the .blend,
|
/* In case surface object is in Edit mode when loading the .blend,
|
||||||
* surface modifier is never executed and bvhtree never built, see T48415. */
|
* surface modifier is never executed and bvhtree never built, see #48415. */
|
||||||
if (eff->pd && eff->pd->shape == PFIELD_SHAPE_SURFACE && eff->surmd &&
|
if (eff->pd && eff->pd->shape == PFIELD_SHAPE_SURFACE && eff->surmd &&
|
||||||
eff->surmd->runtime.bvhtree) {
|
eff->surmd->runtime.bvhtree) {
|
||||||
/* closest point in the object surface is an effector */
|
/* closest point in the object surface is an effector */
|
||||||
|
@ -1903,10 +1903,10 @@ static float fcurve_eval_keyframes_interpolate(const FCurve *fcu,
|
|||||||
*
|
*
|
||||||
* The threshold here has the following constraints:
|
* The threshold here has the following constraints:
|
||||||
* - 0.001 is too coarse:
|
* - 0.001 is too coarse:
|
||||||
* We get artifacts with 2cm driver movements at 1BU = 1m (see T40332).
|
* We get artifacts with 2cm driver movements at 1BU = 1m (see #40332).
|
||||||
*
|
*
|
||||||
* - 0.00001 is too fine:
|
* - 0.00001 is too fine:
|
||||||
* Weird errors, like selecting the wrong keyframe range (see T39207), occur.
|
* Weird errors, like selecting the wrong keyframe range (see #39207), occur.
|
||||||
* This lower bound was established in b888a32eee8147b028464336ad2404d8155c64dd.
|
* This lower bound was established in b888a32eee8147b028464336ad2404d8155c64dd.
|
||||||
*/
|
*/
|
||||||
a = BKE_fcurve_bezt_binarysearch_index_ex(bezts, evaltime, fcu->totvert, 0.0001, &exact);
|
a = BKE_fcurve_bezt_binarysearch_index_ex(bezts, evaltime, fcu->totvert, 0.0001, &exact);
|
||||||
@ -1914,7 +1914,7 @@ static float fcurve_eval_keyframes_interpolate(const FCurve *fcu,
|
|||||||
|
|
||||||
if (exact) {
|
if (exact) {
|
||||||
/* Index returned must be interpreted differently when it sits on top of an existing keyframe
|
/* Index returned must be interpreted differently when it sits on top of an existing keyframe
|
||||||
* - That keyframe is the start of the segment we need (see action_bug_2.blend in T39207).
|
* - That keyframe is the start of the segment we need (see action_bug_2.blend in #39207).
|
||||||
*/
|
*/
|
||||||
return bezt->vec[1][1];
|
return bezt->vec[1][1];
|
||||||
}
|
}
|
||||||
@ -1925,7 +1925,7 @@ static float fcurve_eval_keyframes_interpolate(const FCurve *fcu,
|
|||||||
const BezTriple *prevbezt = (a > 0) ? (bezt - 1) : bezt;
|
const BezTriple *prevbezt = (a > 0) ? (bezt - 1) : bezt;
|
||||||
|
|
||||||
/* Use if the key is directly on the frame, in rare cases this is needed else we get 0.0 instead.
|
/* Use if the key is directly on the frame, in rare cases this is needed else we get 0.0 instead.
|
||||||
* XXX: consult T39207 for examples of files where failure of these checks can cause issues. */
|
* XXX: consult #39207 for examples of files where failure of these checks can cause issues. */
|
||||||
if (fabsf(bezt->vec[1][0] - evaltime) < eps) {
|
if (fabsf(bezt->vec[1][0] - evaltime) < eps) {
|
||||||
return bezt->vec[1][1];
|
return bezt->vec[1][1];
|
||||||
}
|
}
|
||||||
@ -1976,7 +1976,7 @@ static float fcurve_eval_keyframes_interpolate(const FCurve *fcu,
|
|||||||
if (fabsf(v1[1] - v4[1]) < FLT_EPSILON && fabsf(v2[1] - v3[1]) < FLT_EPSILON &&
|
if (fabsf(v1[1] - v4[1]) < FLT_EPSILON && fabsf(v2[1] - v3[1]) < FLT_EPSILON &&
|
||||||
fabsf(v3[1] - v4[1]) < FLT_EPSILON) {
|
fabsf(v3[1] - v4[1]) < FLT_EPSILON) {
|
||||||
/* Optimization: If all the handles are flat/at the same values,
|
/* Optimization: If all the handles are flat/at the same values,
|
||||||
* the value is simply the shared value (see T40372 -> F91346).
|
* the value is simply the shared value (see #40372 -> F91346).
|
||||||
*/
|
*/
|
||||||
return v1[1];
|
return v1[1];
|
||||||
}
|
}
|
||||||
@ -2285,7 +2285,7 @@ float evaluate_fcurve_driver(PathResolvedRNA *anim_rna,
|
|||||||
* XXX: additive is a bit more dicey; it really depends then if things are in range or not...
|
* XXX: additive is a bit more dicey; it really depends then if things are in range or not...
|
||||||
*/
|
*/
|
||||||
LISTBASE_FOREACH (FModifier *, fcm, &fcu->modifiers) {
|
LISTBASE_FOREACH (FModifier *, fcm, &fcu->modifiers) {
|
||||||
/* If there are range-restrictions, we must definitely block T36950. */
|
/* If there are range-restrictions, we must definitely block #36950. */
|
||||||
if ((fcm->flag & FMODIFIER_FLAG_RANGERESTRICT) == 0 ||
|
if ((fcm->flag & FMODIFIER_FLAG_RANGERESTRICT) == 0 ||
|
||||||
(fcm->sfra <= evaltime && fcm->efra >= evaltime)) {
|
(fcm->sfra <= evaltime && fcm->efra >= evaltime)) {
|
||||||
/* Within range: here it probably doesn't matter,
|
/* Within range: here it probably doesn't matter,
|
||||||
@ -2507,7 +2507,7 @@ void BKE_fcurve_blend_read_data(BlendDataReader *reader, ListBase *fcurves)
|
|||||||
/* group */
|
/* group */
|
||||||
BLO_read_data_address(reader, &fcu->grp);
|
BLO_read_data_address(reader, &fcu->grp);
|
||||||
|
|
||||||
/* clear disabled flag - allows disabled drivers to be tried again (T32155),
|
/* clear disabled flag - allows disabled drivers to be tried again (#32155),
|
||||||
* but also means that another method for "reviving disabled F-Curves" exists
|
* but also means that another method for "reviving disabled F-Curves" exists
|
||||||
*/
|
*/
|
||||||
fcu->flag &= ~FCURVE_DISABLED;
|
fcu->flag &= ~FCURVE_DISABLED;
|
||||||
@ -2523,7 +2523,7 @@ void BKE_fcurve_blend_read_data(BlendDataReader *reader, ListBase *fcurves)
|
|||||||
driver->expr_simple = NULL;
|
driver->expr_simple = NULL;
|
||||||
|
|
||||||
/* Give the driver a fresh chance - the operating environment may be different now
|
/* Give the driver a fresh chance - the operating environment may be different now
|
||||||
* (addons, etc. may be different) so the driver namespace may be sane now T32155. */
|
* (addons, etc. may be different) so the driver namespace may be sane now #32155. */
|
||||||
driver->flag &= ~DRIVER_FLAG_INVALID;
|
driver->flag &= ~DRIVER_FLAG_INVALID;
|
||||||
|
|
||||||
/* relink variables, targets and their paths */
|
/* relink variables, targets and their paths */
|
||||||
|
@ -472,8 +472,8 @@ static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar)
|
|||||||
|
|
||||||
/* Check if object or bone, and get transform matrix accordingly:
|
/* Check if object or bone, and get transform matrix accordingly:
|
||||||
* - "use_eulers" code is used to prevent the problems associated with non-uniqueness
|
* - "use_eulers" code is used to prevent the problems associated with non-uniqueness
|
||||||
* of euler decomposition from matrices T20870.
|
* of euler decomposition from matrices #20870.
|
||||||
* - "local-space" is for T21384, where parent results are not wanted
|
* - "local-space" is for #21384, where parent results are not wanted
|
||||||
* but #DTAR_FLAG_LOCAL_CONSTS is for all the common "corrective-shapes-for-limbs" situations.
|
* but #DTAR_FLAG_LOCAL_CONSTS is for all the common "corrective-shapes-for-limbs" situations.
|
||||||
*/
|
*/
|
||||||
if (pchan) {
|
if (pchan) {
|
||||||
|
@ -34,7 +34,7 @@ TEST(evaluate_fcurve, OnKeys)
|
|||||||
EXPECT_NEAR(evaluate_fcurve(fcu, 2.0f), 13.0f, EPSILON); /* hits 'between' function */
|
EXPECT_NEAR(evaluate_fcurve(fcu, 2.0f), 13.0f, EPSILON); /* hits 'between' function */
|
||||||
EXPECT_NEAR(evaluate_fcurve(fcu, 3.0f), 19.0f, EPSILON); /* hits 'on or after last' function */
|
EXPECT_NEAR(evaluate_fcurve(fcu, 3.0f), 19.0f, EPSILON); /* hits 'on or after last' function */
|
||||||
|
|
||||||
/* Also test within a specific time epsilon of the keys, as this was an issue in T39207.
|
/* Also test within a specific time epsilon of the keys, as this was an issue in #39207.
|
||||||
* This epsilon is just slightly smaller than the epsilon given to
|
* This epsilon is just slightly smaller than the epsilon given to
|
||||||
* BKE_fcurve_bezt_binarysearch_index_ex() in fcurve_eval_between_keyframes(), so it should hit
|
* BKE_fcurve_bezt_binarysearch_index_ex() in fcurve_eval_between_keyframes(), so it should hit
|
||||||
* the "exact" code path. */
|
* the "exact" code path. */
|
||||||
|
@ -215,7 +215,7 @@ void BKE_fluid_reallocate_copy_fluid(FluidDomainSettings *fds,
|
|||||||
# if 0
|
# if 0
|
||||||
/* Note (sebbas):
|
/* Note (sebbas):
|
||||||
* Disabling this "skip section" as not copying borders results in weird cut-off effects.
|
* Disabling this "skip section" as not copying borders results in weird cut-off effects.
|
||||||
* It is possible that this cutting off is the reason for line effects as seen in T74559.
|
* It is possible that this cutting off is the reason for line effects as seen in #74559.
|
||||||
* Since domain borders will be handled on the simulation side anyways,
|
* Since domain borders will be handled on the simulation side anyways,
|
||||||
* copying border values should not be an issue. */
|
* copying border values should not be an issue. */
|
||||||
|
|
||||||
@ -3812,7 +3812,7 @@ static void fluid_modifier_processDomain(FluidModifierData *fmd,
|
|||||||
|
|
||||||
/* When reading data from cache (has_config == true) ensure that active fields are allocated.
|
/* When reading data from cache (has_config == true) ensure that active fields are allocated.
|
||||||
* update_flowsflags() and update_obstacleflags() will not find flow sources hidden from renders.
|
* update_flowsflags() and update_obstacleflags() will not find flow sources hidden from renders.
|
||||||
* See also: T72192. */
|
* See also: #72192. */
|
||||||
if (has_config) {
|
if (has_config) {
|
||||||
ensure_flowsfields(fds);
|
ensure_flowsfields(fds);
|
||||||
ensure_obstaclefields(fds);
|
ensure_obstaclefields(fds);
|
||||||
@ -4169,7 +4169,7 @@ Mesh *BKE_fluid_modifier_do(
|
|||||||
* This does not seem particularly useful, but it's backwards compatible.
|
* This does not seem particularly useful, but it's backwards compatible.
|
||||||
*
|
*
|
||||||
* Smoke simulation needs a texture space relative to the adaptive domain bounds, not the
|
* Smoke simulation needs a texture space relative to the adaptive domain bounds, not the
|
||||||
* original mesh. So recompute it at this point in the modifier stack. See T58492. */
|
* original mesh. So recompute it at this point in the modifier stack. See #58492. */
|
||||||
BKE_mesh_texspace_calc(result);
|
BKE_mesh_texspace_calc(result);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -313,7 +313,7 @@ static void image_foreach_path(ID *id, BPathForeachPathData *bpath_data)
|
|||||||
if (result) {
|
if (result) {
|
||||||
if (flag & BKE_BPATH_FOREACH_PATH_RELOAD_EDITED) {
|
if (flag & BKE_BPATH_FOREACH_PATH_RELOAD_EDITED) {
|
||||||
if (!BKE_image_has_packedfile(ima) &&
|
if (!BKE_image_has_packedfile(ima) &&
|
||||||
/* Image may have been painted onto (and not saved, T44543). */
|
/* Image may have been painted onto (and not saved, #44543). */
|
||||||
!BKE_image_is_dirty(ima)) {
|
!BKE_image_is_dirty(ima)) {
|
||||||
BKE_image_signal(bpath_data->bmain, ima, nullptr, IMA_SIGNAL_RELOAD);
|
BKE_image_signal(bpath_data->bmain, ima, nullptr, IMA_SIGNAL_RELOAD);
|
||||||
}
|
}
|
||||||
|
@ -1875,7 +1875,7 @@ KeyBlock *BKE_keyblock_add_ctime(Key *key, const char *name, const bool do_force
|
|||||||
/* In case of absolute keys, there is no point in adding more than one key with the same pos.
|
/* In case of absolute keys, there is no point in adding more than one key with the same pos.
|
||||||
* Hence only set new key-block pos to current time if none previous one already use it.
|
* Hence only set new key-block pos to current time if none previous one already use it.
|
||||||
* Now at least people just adding absolute keys without touching to ctime
|
* Now at least people just adding absolute keys without touching to ctime
|
||||||
* won't have to systematically use retiming func (and have ordering issues, too). See T39897.
|
* won't have to systematically use retiming func (and have ordering issues, too). See #39897.
|
||||||
*/
|
*/
|
||||||
if (!do_force && (key->type != KEY_RELATIVE)) {
|
if (!do_force && (key->type != KEY_RELATIVE)) {
|
||||||
KeyBlock *it_kb;
|
KeyBlock *it_kb;
|
||||||
|
@ -765,7 +765,7 @@ int BKE_layer_collection_findindex(ViewLayer *view_layer, const LayerCollection
|
|||||||
* regarding this resync process.
|
* regarding this resync process.
|
||||||
* Proper fix would be to make resync itself lazy, i.e. only happen
|
* Proper fix would be to make resync itself lazy, i.e. only happen
|
||||||
* when actually needed.
|
* when actually needed.
|
||||||
* See also T73411.
|
* See also #73411.
|
||||||
* \{ */
|
* \{ */
|
||||||
|
|
||||||
static bool no_resync = false;
|
static bool no_resync = false;
|
||||||
|
@ -1810,7 +1810,7 @@ void BKE_library_make_local(Main *bmain,
|
|||||||
/* Step 4: We have to remap local usages of old (linked) ID to new (local)
|
/* Step 4: We have to remap local usages of old (linked) ID to new (local)
|
||||||
* ID in a separated loop,
|
* ID in a separated loop,
|
||||||
* as lbarray ordering is not enough to ensure us we did catch all dependencies
|
* as lbarray ordering is not enough to ensure us we did catch all dependencies
|
||||||
* (e.g. if making local a parent object before its child...). See T48907. */
|
* (e.g. if making local a parent object before its child...). See #48907. */
|
||||||
/* TODO: This is now the biggest step by far (in term of processing time).
|
/* TODO: This is now the biggest step by far (in term of processing time).
|
||||||
* We may be able to gain here by using again main->relations mapping, but...
|
* We may be able to gain here by using again main->relations mapping, but...
|
||||||
* this implies BKE_libblock_remap & co to be able to update main->relations on the fly.
|
* this implies BKE_libblock_remap & co to be able to update main->relations on the fly.
|
||||||
@ -1828,7 +1828,7 @@ void BKE_library_make_local(Main *bmain,
|
|||||||
|
|
||||||
/* Special hack for groups... Thing is, since we can't instantiate them here, we need to
|
/* Special hack for groups... Thing is, since we can't instantiate them here, we need to
|
||||||
* ensure they remain 'alive' (only instantiation is a real group 'user'... *sigh* See
|
* ensure they remain 'alive' (only instantiation is a real group 'user'... *sigh* See
|
||||||
* T49722. */
|
* #49722. */
|
||||||
if (GS(id->name) == ID_GR && (id->tag & LIB_TAG_INDIRECT) != 0) {
|
if (GS(id->name) == ID_GR && (id->tag & LIB_TAG_INDIRECT) != 0) {
|
||||||
id_us_ensure_real(id->newid);
|
id_us_ensure_real(id->newid);
|
||||||
}
|
}
|
||||||
|
@ -396,7 +396,7 @@ ID *BKE_lib_override_library_create_from_id(Main *bmain,
|
|||||||
ID *local_id = lib_override_library_create_from(bmain, nullptr, reference_id, 0);
|
ID *local_id = lib_override_library_create_from(bmain, nullptr, reference_id, 0);
|
||||||
/* We cannot allow automatic hierarchy resync on this ID, it is highly likely to generate a giant
|
/* We cannot allow automatic hierarchy resync on this ID, it is highly likely to generate a giant
|
||||||
* mess in case there are a lot of hidden, non-instantiated, non-properly organized dependencies.
|
* mess in case there are a lot of hidden, non-instantiated, non-properly organized dependencies.
|
||||||
* Ref T94650. */
|
* Ref #94650. */
|
||||||
local_id->override_library->flag |= IDOVERRIDE_LIBRARY_FLAG_NO_HIERARCHY;
|
local_id->override_library->flag |= IDOVERRIDE_LIBRARY_FLAG_NO_HIERARCHY;
|
||||||
local_id->override_library->flag &= ~IDOVERRIDE_LIBRARY_FLAG_SYSTEM_DEFINED;
|
local_id->override_library->flag &= ~IDOVERRIDE_LIBRARY_FLAG_SYSTEM_DEFINED;
|
||||||
local_id->override_library->hierarchy_root = local_id;
|
local_id->override_library->hierarchy_root = local_id;
|
||||||
@ -2105,7 +2105,7 @@ static bool lib_override_library_resync(Main *bmain,
|
|||||||
if (ID_IS_OVERRIDE_LIBRARY_REAL(id) &&
|
if (ID_IS_OVERRIDE_LIBRARY_REAL(id) &&
|
||||||
id->override_library->reference->lib->id.tag & LIB_TAG_MISSING) {
|
id->override_library->reference->lib->id.tag & LIB_TAG_MISSING) {
|
||||||
/* Do not delete overrides which reference is missing because the library itself is missing
|
/* Do not delete overrides which reference is missing because the library itself is missing
|
||||||
* (ref. T100586). */
|
* (ref. #100586). */
|
||||||
}
|
}
|
||||||
else if (!BKE_lib_override_library_is_user_edited(id)) {
|
else if (!BKE_lib_override_library_is_user_edited(id)) {
|
||||||
/* If user never edited them, we can delete them. */
|
/* If user never edited them, we can delete them. */
|
||||||
@ -2720,7 +2720,7 @@ void BKE_lib_override_library_main_resync(Main *bmain,
|
|||||||
|
|
||||||
/* Necessary to improve performances, and prevent layers matching override sub-collections to be
|
/* Necessary to improve performances, and prevent layers matching override sub-collections to be
|
||||||
* lost when re-syncing the parent override collection.
|
* lost when re-syncing the parent override collection.
|
||||||
* Ref. T73411. */
|
* Ref. #73411. */
|
||||||
BKE_layer_collection_resync_forbid();
|
BKE_layer_collection_resync_forbid();
|
||||||
|
|
||||||
int library_indirect_level = lib_override_libraries_index_define(bmain);
|
int library_indirect_level = lib_override_libraries_index_define(bmain);
|
||||||
|
@ -45,7 +45,7 @@ bool BKE_lib_override_library_proxy_convert(Main *bmain,
|
|||||||
&ob_proxy->proxy->id;
|
&ob_proxy->proxy->id;
|
||||||
ID *id_instance_hint = is_override_instancing_object ? &ob_proxy_group->id : &ob_proxy->id;
|
ID *id_instance_hint = is_override_instancing_object ? &ob_proxy_group->id : &ob_proxy->id;
|
||||||
|
|
||||||
/* In some cases the instance collection of a proxy object may be local (see e.g. T83875). Not
|
/* In some cases the instance collection of a proxy object may be local (see e.g. #83875). Not
|
||||||
* sure this is a valid state, but for now just abort the overriding process. */
|
* sure this is a valid state, but for now just abort the overriding process. */
|
||||||
if (!ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY(id_root)) {
|
if (!ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY(id_root)) {
|
||||||
if (ob_proxy->proxy != NULL) {
|
if (ob_proxy->proxy != NULL) {
|
||||||
@ -73,7 +73,7 @@ bool BKE_lib_override_library_proxy_convert(Main *bmain,
|
|||||||
/* In case of proxy conversion, remap all local ID usages to linked IDs to their newly created
|
/* In case of proxy conversion, remap all local ID usages to linked IDs to their newly created
|
||||||
* overrides. Also do that for the IDs from the same lib as the proxy in case it is linked.
|
* overrides. Also do that for the IDs from the same lib as the proxy in case it is linked.
|
||||||
* While this might not be 100% the desired behavior, it is likely to be the case most of the
|
* While this might not be 100% the desired behavior, it is likely to be the case most of the
|
||||||
* time. Ref: T91711. */
|
* time. Ref: #91711. */
|
||||||
ID *id_iter;
|
ID *id_iter;
|
||||||
FOREACH_MAIN_ID_BEGIN (bmain, id_iter) {
|
FOREACH_MAIN_ID_BEGIN (bmain, id_iter) {
|
||||||
if (!ID_IS_LINKED(id_iter) || id_iter->lib == ob_proxy->id.lib) {
|
if (!ID_IS_LINKED(id_iter) || id_iter->lib == ob_proxy->id.lib) {
|
||||||
|
@ -165,7 +165,7 @@ void BKE_library_foreach_ID_embedded(LibraryForeachIDData *data, ID **id_pp)
|
|||||||
}
|
}
|
||||||
else if (flag & IDWALK_RECURSE) {
|
else if (flag & IDWALK_RECURSE) {
|
||||||
/* Defer handling into main loop, recursively calling BKE_library_foreach_ID_link in
|
/* Defer handling into main loop, recursively calling BKE_library_foreach_ID_link in
|
||||||
* IDWALK_RECURSE case is troublesome, see T49553. */
|
* IDWALK_RECURSE case is troublesome, see #49553. */
|
||||||
/* XXX note that this breaks the 'owner id' thing now, we likely want to handle that
|
/* XXX note that this breaks the 'owner id' thing now, we likely want to handle that
|
||||||
* differently at some point, but for now it should not be a problem in practice. */
|
* differently at some point, but for now it should not be a problem in practice. */
|
||||||
if (BLI_gset_add(data->ids_handled, id)) {
|
if (BLI_gset_add(data->ids_handled, id)) {
|
||||||
|
@ -608,7 +608,7 @@ static void libblock_remap_foreach_idpair_cb(ID *old_id, ID *new_id, void *user_
|
|||||||
|
|
||||||
/* Node trees may virtually use any kind of data-block... */
|
/* Node trees may virtually use any kind of data-block... */
|
||||||
/* XXX Yuck!!!! nodetree update can do pretty much any thing when talking about py nodes,
|
/* XXX Yuck!!!! nodetree update can do pretty much any thing when talking about py nodes,
|
||||||
* including creating new data-blocks (see T50385), so we need to unlock main here. :(
|
* including creating new data-blocks (see #50385), so we need to unlock main here. :(
|
||||||
* Why can't we have re-entrent locks? */
|
* Why can't we have re-entrent locks? */
|
||||||
BKE_main_unlock(bmain);
|
BKE_main_unlock(bmain);
|
||||||
libblock_remap_data_postprocess_nodetree_update(bmain, new_id);
|
libblock_remap_data_postprocess_nodetree_update(bmain, new_id);
|
||||||
|
@ -877,7 +877,7 @@ void BKE_object_materials_test(Main *bmain, Object *ob, ID *id)
|
|||||||
/* Exception: In case the object is a valid data, but its obdata is an empty place-holder,
|
/* Exception: In case the object is a valid data, but its obdata is an empty place-holder,
|
||||||
* use object's material slots amount as reference.
|
* use object's material slots amount as reference.
|
||||||
* This avoids losing materials in a local object when its linked obdata goes missing.
|
* This avoids losing materials in a local object when its linked obdata goes missing.
|
||||||
* See T92780. */
|
* See #92780. */
|
||||||
BKE_id_material_resize(bmain, id, short(ob->totcol), false);
|
BKE_id_material_resize(bmain, id, short(ob->totcol), false);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1311,7 +1311,7 @@ bool BKE_object_material_slot_remove(Main *bmain, Object *ob)
|
|||||||
for (Object *obt = static_cast<Object *>(bmain->objects.first); obt;
|
for (Object *obt = static_cast<Object *>(bmain->objects.first); obt;
|
||||||
obt = static_cast<Object *>(obt->id.next)) {
|
obt = static_cast<Object *>(obt->id.next)) {
|
||||||
if (obt->data == ob->data) {
|
if (obt->data == ob->data) {
|
||||||
/* Can happen when object material lists are used, see: T52953 */
|
/* Can happen when object material lists are used, see: #52953 */
|
||||||
if (actcol > obt->totcol) {
|
if (actcol > obt->totcol) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -907,7 +907,7 @@ void BKE_mesh_free_data_for_undo(Mesh *me)
|
|||||||
*
|
*
|
||||||
* - Edit-Mesh (#Mesh.edit_mesh)
|
* - Edit-Mesh (#Mesh.edit_mesh)
|
||||||
* Since edit-mesh is tied to the objects mode,
|
* Since edit-mesh is tied to the objects mode,
|
||||||
* which crashes when called in edit-mode, see: T90972.
|
* which crashes when called in edit-mode, see: #90972.
|
||||||
*/
|
*/
|
||||||
static void mesh_clear_geometry(Mesh *mesh)
|
static void mesh_clear_geometry(Mesh *mesh)
|
||||||
{
|
{
|
||||||
|
@ -176,7 +176,7 @@ static void update_edge_indices_in_poly_loops(Mesh *mesh,
|
|||||||
else {
|
else {
|
||||||
/* This is an invalid edge; normally this does not happen in Blender,
|
/* This is an invalid edge; normally this does not happen in Blender,
|
||||||
* but it can be part of an imported mesh with invalid geometry. See
|
* but it can be part of an imported mesh with invalid geometry. See
|
||||||
* T76514. */
|
* #76514. */
|
||||||
edge_index = 0;
|
edge_index = 0;
|
||||||
}
|
}
|
||||||
prev_loop->e = edge_index;
|
prev_loop->e = edge_index;
|
||||||
|
@ -154,7 +154,7 @@ static float UNUSED_FUNCTION(mesh_calc_poly_volume_centroid)(const MPoly *mpoly,
|
|||||||
/**
|
/**
|
||||||
* A version of mesh_calc_poly_volume_centroid that takes an initial reference center,
|
* A version of mesh_calc_poly_volume_centroid that takes an initial reference center,
|
||||||
* use this to increase numeric stability as the quality of the result becomes
|
* use this to increase numeric stability as the quality of the result becomes
|
||||||
* very low quality as the value moves away from 0.0, see: T65986.
|
* very low quality as the value moves away from 0.0, see: #65986.
|
||||||
*/
|
*/
|
||||||
static float mesh_calc_poly_volume_centroid_with_reference_center(const MPoly *mpoly,
|
static float mesh_calc_poly_volume_centroid_with_reference_center(const MPoly *mpoly,
|
||||||
const MLoop *loopstart,
|
const MLoop *loopstart,
|
||||||
|
@ -651,7 +651,7 @@ static void mesh_ensure_tessellation_customdata(Mesh *me)
|
|||||||
{
|
{
|
||||||
if (UNLIKELY((me->totface != 0) && (me->totpoly == 0))) {
|
if (UNLIKELY((me->totface != 0) && (me->totpoly == 0))) {
|
||||||
/* Pass, otherwise this function clears 'mface' before
|
/* Pass, otherwise this function clears 'mface' before
|
||||||
* versioning 'mface -> mpoly' code kicks in T30583.
|
* versioning 'mface -> mpoly' code kicks in #30583.
|
||||||
*
|
*
|
||||||
* Callers could also check but safer to do here - campbell */
|
* Callers could also check but safer to do here - campbell */
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,7 @@ Mesh *BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(MirrorModifierData *mmd,
|
|||||||
copy_v3_v3(plane_co, itmp[3]);
|
copy_v3_v3(plane_co, itmp[3]);
|
||||||
copy_v3_v3(plane_no, itmp[axis]);
|
copy_v3_v3(plane_no, itmp[axis]);
|
||||||
|
|
||||||
/* Account for non-uniform scale in `ob`, see: T87592. */
|
/* Account for non-uniform scale in `ob`, see: #87592. */
|
||||||
float ob_scale[3] = {
|
float ob_scale[3] = {
|
||||||
len_squared_v3(ob->object_to_world[0]),
|
len_squared_v3(ob->object_to_world[0]),
|
||||||
len_squared_v3(ob->object_to_world[1]),
|
len_squared_v3(ob->object_to_world[1]),
|
||||||
@ -248,7 +248,7 @@ Mesh *BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(MirrorModifierData *mmd,
|
|||||||
* generate a 1:1 mapping by scanning vertices from the beginning of the array
|
* generate a 1:1 mapping by scanning vertices from the beginning of the array
|
||||||
* as is done in #BKE_editmesh_vert_coords_when_deformed. Without this,
|
* as is done in #BKE_editmesh_vert_coords_when_deformed. Without this,
|
||||||
* the coordinates returned will sometimes point to the copied vertex locations, see:
|
* the coordinates returned will sometimes point to the copied vertex locations, see:
|
||||||
* T91444.
|
* #91444.
|
||||||
*
|
*
|
||||||
* However, such a change also affects non-versionable things like some modifiers binding, so
|
* However, such a change also affects non-versionable things like some modifiers binding, so
|
||||||
* we cannot enforce that behavior on existing modifiers, in which case we keep using the
|
* we cannot enforce that behavior on existing modifiers, in which case we keep using the
|
||||||
|
@ -1749,7 +1749,7 @@ static void mesh_normals_loop_custom_set(const float (*positions)[3],
|
|||||||
/* We also have to check between last and first loops,
|
/* We also have to check between last and first loops,
|
||||||
* otherwise we may miss some sharp edges here!
|
* otherwise we may miss some sharp edges here!
|
||||||
* This is just a simplified version of above while loop.
|
* This is just a simplified version of above while loop.
|
||||||
* See T45984. */
|
* See #45984. */
|
||||||
loops = lnors_spacearr.lspacearr[i]->loops;
|
loops = lnors_spacearr.lspacearr[i]->loops;
|
||||||
if (loops && org_nor) {
|
if (loops && org_nor) {
|
||||||
const int lidx = POINTER_AS_INT(loops->link);
|
const int lidx = POINTER_AS_INT(loops->link);
|
||||||
|
@ -1666,7 +1666,7 @@ void BKE_mesh_remap_calc_loops_from_mesh(const int mode,
|
|||||||
|
|
||||||
if (dot > best_nor_dot - 1e-6f) {
|
if (dot > best_nor_dot - 1e-6f) {
|
||||||
/* We need something as fallback decision in case dest normal matches several
|
/* We need something as fallback decision in case dest normal matches several
|
||||||
* source normals (see T44522), using distance between polys' centers here. */
|
* source normals (see #44522), using distance between polys' centers here. */
|
||||||
float *pcent_src;
|
float *pcent_src;
|
||||||
float sqdist;
|
float sqdist;
|
||||||
|
|
||||||
|
@ -1045,7 +1045,7 @@ Mesh *BKE_modifier_get_evaluated_mesh_from_evaluated_object(Object *ob_eval)
|
|||||||
if ((ob_eval->type == OB_MESH) && (ob_eval->mode & OB_MODE_EDIT)) {
|
if ((ob_eval->type == OB_MESH) && (ob_eval->mode & OB_MODE_EDIT)) {
|
||||||
/* In EditMode, evaluated mesh is stored in BMEditMesh, not the object... */
|
/* In EditMode, evaluated mesh is stored in BMEditMesh, not the object... */
|
||||||
BMEditMesh *em = BKE_editmesh_from_object(ob_eval);
|
BMEditMesh *em = BKE_editmesh_from_object(ob_eval);
|
||||||
/* 'em' might not exist yet in some cases, just after loading a .blend file, see T57878. */
|
/* 'em' might not exist yet in some cases, just after loading a .blend file, see #57878. */
|
||||||
if (em != nullptr) {
|
if (em != nullptr) {
|
||||||
me = BKE_object_get_editmesh_eval_final(ob_eval);
|
me = BKE_object_get_editmesh_eval_final(ob_eval);
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user