Sculpt: Improve Expand performance #120125

Closed
Raul Fernandez Hernandez wants to merge 181 commits from farsthary/blender:improve-expand-perf into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
6 changed files with 13 additions and 14 deletions
Showing only changes of commit 64bb745c3d - Show all commits

View File

@ -29,7 +29,7 @@ class VIEW3D_PT_animation_layers(Panel):
layout.use_property_split = True layout.use_property_split = True
layout.use_property_decorate = False layout.use_property_decorate = False
# FIXME: this should be done in response to a message-bus callback, notifier, whatnot. # FIXME: this should be done in response to a messagebus callback, notifier, whatnot.
adt = context.object.animation_data adt = context.object.animation_data
with _wm_selected_animation_lock: with _wm_selected_animation_lock:
if adt: if adt:
@ -38,7 +38,7 @@ class VIEW3D_PT_animation_layers(Panel):
context.window_manager.selected_animation = None context.window_manager.selected_animation = None
col = layout.column() col = layout.column()
# This has to go via an auxiliary property, as assigning an Animation # This has to go via an auxillary property, as assigning an Animation
# data-block should be possible even when `context.object.animation_data` # data-block should be possible even when `context.object.animation_data`
# is `None`, and thus its `animation` property does not exist. # is `None`, and thus its `animation` property does not exist.
col.template_ID(context.window_manager, 'selected_animation') col.template_ID(context.window_manager, 'selected_animation')

View File

@ -184,8 +184,8 @@ class Strip : public ::AnimationStrip {
* *
* The reason is that various functions will assume that the `Strip` is actually a down-cast * The reason is that various functions will assume that the `Strip` is actually a down-cast
* instance of another strip class, and that `Strip::type()` will say which type. To avoid having * instance of another strip class, and that `Strip::type()` will say which type. To avoid having
* to explicitly deal with an 'invalid' type everywhere, creating a `Strip` directly is simply * to explcitly deal with an 'invalid' type everywhere, creating a `Strip` directly is simply not
* not allowed. * allowed.
*/ */
Strip() = delete; Strip() = delete;
@ -443,14 +443,14 @@ static_assert(sizeof(ChannelBag) == sizeof(::AnimationChannelBag),
* *
* - By binding handle. * - By binding handle.
* - By fallback string. * - By fallback string.
* - By the ID's name (matching against the binding name). * - By the ID's name (matching agains the binding name).
* - If the above do not find a suitable binding, the animated ID will not * - If the above do not find a suitable binding, the animated ID will not
* receive any animation and the caller is responsible for creating a binding * receive any animation and the calller is responsible for creating a binding
* and assigning it. * and assigning it.
* *
* \return `false` if the assignment was not possible (for example the ID is of a type that cannot * \return `false` if the assignment was not possible (for example the ID is of a type that cannot
* be animated). If the above fall-through case of "no binding found" is reached, this function * be animated). If the above fall-through case of "no binding found" is reached, this function
* will still return `true` as the Animation was successfully assigned. * will still return `true` as the Animation was succesfully assigned.
*/ */
bool assign_animation(Animation &anim, ID &animated_id); bool assign_animation(Animation &anim, ID &animated_id);

View File

@ -186,7 +186,7 @@ Binding *Animation::binding_for_handle(const binding_handle_t handle)
const Binding *Animation::binding_for_handle(const binding_handle_t handle) const const Binding *Animation::binding_for_handle(const binding_handle_t handle) const
{ {
/* TODO: implement hash-map lookup. */ /* TODO: implement hashmap lookup. */
for (const Binding *binding : bindings()) { for (const Binding *binding : bindings()) {
if (binding->handle == handle) { if (binding->handle == handle) {
return binding; return binding;
@ -236,7 +236,7 @@ void Animation::binding_name_define(Binding &binding, const StringRefNull new_na
void Animation::binding_name_propagate(Main &bmain, const Binding &binding) void Animation::binding_name_propagate(Main &bmain, const Binding &binding)
{ {
/* Just loop over all animatable IDs in the main database. */ /* Just loop over all animatable IDs in the main dataabase. */
ListBase *lb; ListBase *lb;
ID *id; ID *id;
FOREACH_MAIN_LISTBASE_BEGIN (&bmain, lb) { FOREACH_MAIN_LISTBASE_BEGIN (&bmain, lb) {

View File

@ -33,7 +33,7 @@ class AnimationLayersTest : public testing::Test {
static void SetUpTestSuite() static void SetUpTestSuite()
{ {
/* BKE_id_free() hits a code path that uses CLOG, which crashes if not initialized properly. */ /* BKE_id_free() hits a code path that uses CLOG, which crashes if not initialised properly. */
CLG_init(); CLG_init();
/* To make id_can_have_animdata() and friends work, the `id_types` array needs to be set up. */ /* To make id_can_have_animdata() and friends work, the `id_types` array needs to be set up. */
@ -248,7 +248,7 @@ TEST_F(AnimationLayersTest, rename_binding)
EXPECT_STREQ("New Binding Name", out_cube.name); EXPECT_STREQ("New Binding Name", out_cube.name);
/* At this point the binding name will not have been copied to the cube /* At this point the binding name will not have been copied to the cube
* AnimData. However, I don't want to test for that here, as it's not exactly * AnimData. However, I don't want to test for that here, as it's not exactly
* desirable behavior, but more of a side-effect of the current * desirable behaviour, but more of a side-effect of the current
* implementation. */ * implementation. */
anim->binding_name_propagate(*bmain, out_cube); anim->binding_name_propagate(*bmain, out_cube);

View File

@ -47,8 +47,8 @@ void Manager::begin_sync()
acquired_textures.clear(); acquired_textures.clear();
layer_attributes.clear(); layer_attributes.clear();
/* For some reason, if this uninitialized data pattern was enabled (ie release asserts enabled), // For some reason, if this uninitialised data pattern was enabled (ie release asserts enabled),
* The viewport just gives up rendering objects on ARM64 devices. Possibly Mesa GLOn12-related. */ // The viewport just gives up rendering objects on ARM64 devices. Possibly Mesa GLOn12-related.
#if !defined(NDEBUG) && !defined(_M_ARM64) #if !defined(NDEBUG) && !defined(_M_ARM64)
/* Detect uninitialized data. */ /* Detect uninitialized data. */
memset(matrix_buf.current().data(), memset(matrix_buf.current().data(),

View File

@ -405,7 +405,6 @@ dict_custom = {
"unapplied", "unapplied",
"unapply", "unapply",
"unassign", "unassign",
"unassigning",
"unassociated", "unassociated",
"unbake", "unbake",
"unbuffered", "unbuffered",