9.4.0 #79

Merged
kkbp-dev merged 10 commits from development into master 2026-07-04 15:01:30 +00:00
Owner
No description provided.
The "Prep for target application" merge gets extremely slow on high-bone-count models. On a 89-object model with ~600–1000 bones each it runs for hours, sometimes effectively days.

Cause: merge_weights calls mix_weights once per (mesh, bone) pair, and each call creates a VERTEX_WEIGHT_MIX modifier and runs bpy.ops.object.modifier_apply. Every modifier_apply forces a full depsgraph re-evaluation and an undo push, so the work scales with meshes × bones × per-apply overhead and is entirely main-thread bound (extra CPU cores don't help).

Fix: Do the same operation directly on vertex-group data. A VERTEX_WEIGHT_MIX in ADD mode is just target_weight += source_weight for vertices in the source group, followed by deleting the source group — so this rewrites the merge to accumulate weights with vertex_group.add(..., 'ADD') in a single pass per mesh. No modifiers, no operators, no per-bone depsgraph evaluation. Cost is now roughly proportional to total vertex count.
I verified the direct-add output is numerically identical to the modifier-based result.

Tested on this card (https://db.bepis.moe/koikatsu/view/392842), VRM + "very simple" preset: merge dropped from ~[3-4 hours] to ~[30 seconds]. Output weights unchanged.
Reviewed-on: #75
default eye shapekey was supposed to be 1. all other shapekeys were supposed to be limited to 1 minus value except gag eyes
Add expression shapekey, support gag shapekey for SVS and AC
Reviewed-on: #76
kkbp-dev merged commit 3b0a8ce868 into master 2026-07-04 15:01:30 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kkbp-dev/KKBP_Importer!79
No description provided.