Skip to content

Commit

Permalink
Fix resolving key path for matte layers (#2544)
Browse files Browse the repository at this point in the history
This PR adds the check for matte layer name before going deeper during key path resolution.

Without the fix the key path matches children inside the matte layer even though it should not, for example:

'layer_1.group_1.child_1' could match 'layer_1.**matte_1**.group_1.child_1'

With the fix it is not possible anymore.

Co-authored-by: Alexander Dorokhov <[email protected]>
  • Loading branch information
alex-dorokhov and Alexander Dorokhov authored Oct 4, 2024
1 parent b15f9bf commit e320c99
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ public void resolveKeyPath(
accumulator.add(matteCurrentPartialKeyPath.resolve(matteLayer));
}

if (keyPath.propagateToChildren(getName(), depth)) {
if (keyPath.matches(matteLayer.getName(), depth) && keyPath.propagateToChildren(getName(), depth)) {
int newDepth = depth + keyPath.incrementDepthBy(matteLayer.getName(), depth);
matteLayer.resolveChildKeyPath(keyPath, newDepth, accumulator, matteCurrentPartialKeyPath);
}
Expand Down

0 comments on commit e320c99

Please sign in to comment.