Make merged layer take name of lower layer

Most of the time when merging layers, you'll want to keep the name of the Bottom layer. This saves users the trouble of having to rename the layer.
This commit is contained in:
Bigrat Enthusiast 2021-07-14 18:18:32 -04:00 committed by GitHub
parent 21b8bdd0f3
commit 72e8d74957
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,7 @@
var otherFrame = framesB[index]; var otherFrame = framesB[index];
mergedFrames.push(pskl.utils.FrameUtils.merge([otherFrame, frame])); mergedFrames.push(pskl.utils.FrameUtils.merge([otherFrame, frame]));
}); });
var mergedLayer = pskl.model.Layer.fromFrames(layerA.getName(), mergedFrames); var mergedLayer = pskl.model.Layer.fromFrames(layerB.getName(), mergedFrames);
return mergedLayer; return mergedLayer;
}, },