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.
4 changed files with 19 additions and 3 deletions
Showing only changes of commit efc088aa94 - Show all commits

View File

@ -186,7 +186,7 @@ const PointerRNA *CTX_store_ptr_lookup(const bContextStore *store,
{ {
for (auto entry = store->entries.rbegin(); entry != store->entries.rend(); ++entry) { for (auto entry = store->entries.rbegin(); entry != store->entries.rend(); ++entry) {
if (entry->name == name) { if (entry->name == name) {
if (!type || RNA_struct_is_a(entry->ptr.type, type)) { if (!type || (type && RNA_struct_is_a(entry->ptr.type, type))) {
return &entry->ptr; return &entry->ptr;
} }
} }

View File

@ -1582,8 +1582,8 @@ float UI_text_clip_middle_ex(const uiFontStyle *fstyle,
* probably reduce this to one pixel if we consolidate text output with length measuring. But * probably reduce this to one pixel if we consolidate text output with length measuring. But
* our text string lengths include the last character's right-side bearing anyway, so a string * our text string lengths include the last character's right-side bearing anyway, so a string
* can be longer by that amount and still fit visibly in the required space. */ * can be longer by that amount and still fit visibly in the required space. */
BLI_assert((strwidth <= (okwidth + 2)) || (okwidth <= 0.0f)); BLI_assert((strwidth <= (okwidth + 2)) || (okwidth <= 0.0f));
UNUSED_VARS_NDEBUG(okwidth);
return strwidth; return strwidth;
} }

View File

@ -115,6 +115,7 @@ static void insert_graph_keys(bAnimContext *ac, eGraphKeys_InsertKey_Types mode)
SpaceGraph *sipo = (SpaceGraph *)ac->sl; SpaceGraph *sipo = (SpaceGraph *)ac->sl;
Scene *scene = ac->scene; Scene *scene = ac->scene;
ToolSettings *ts = scene->toolsettings; ToolSettings *ts = scene->toolsettings;
eInsertKeyFlags flag = eInsertKeyFlags(0);
/* Filter data. */ /* Filter data. */
filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FCURVESONLY | filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FCURVESONLY |
@ -145,7 +146,7 @@ static void insert_graph_keys(bAnimContext *ac, eGraphKeys_InsertKey_Types mode)
} }
/* Init key-framing flag. */ /* Init key-framing flag. */
eInsertKeyFlags flag = ANIM_get_keyframing_flags(scene); flag = ANIM_get_keyframing_flags(scene);
KeyframeSettings settings = get_keyframe_settings(true); KeyframeSettings settings = get_keyframe_settings(true);
settings.keyframe_type = eBezTriple_KeyframeType(ts->keyframe_type); settings.keyframe_type = eBezTriple_KeyframeType(ts->keyframe_type);

View File

@ -66,6 +66,21 @@
/* Own include. */ /* Own include. */
#include "sequencer_intern.hh" #include "sequencer_intern.hh"
/* -------------------------------------------------------------------- */
/** \name Structs & Enums
* \{ */
struct TransSeq {
int start, machine;
int startofs, endofs;
int anim_startofs, anim_endofs;
// int final_left, final_right; /* UNUSED. */
int len;
float content_start;
};
/** \} */
/* -------------------------------------------------------------------- */ /* -------------------------------------------------------------------- */
/** \name Public Context Checks /** \name Public Context Checks
* \{ */ * \{ */