Skip to content

Commit 96c9e23

Browse files
committed
Fix AutoMesh texture locking for direct targets
1 parent 0505963 commit 96c9e23

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • source/nijigenerate/commands/automesh

source/nijigenerate/commands/automesh/dynamic.d

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ template ApplyAutoMeshPT(alias PT)
105105
if (auto n = cast(Node)t) lockTargets ~= n;
106106
}
107107
auto drawables = enumerateDrawablesForAutoMesh(lockTargets);
108+
// The selected target itself may be skipped by traversal rules such as coverOthers().
109+
// AutoMesh processors can still read the direct target's texture, so lock it explicitly.
110+
foreach (t; targets) {
111+
if (auto d = cast(Drawable)t) drawables ~= d;
112+
}
108113
foreach (d; drawables) {
109114
auto p = cast(Part)d;
110115
if (p is null) continue;

0 commit comments

Comments
 (0)