Supports Spine atlas with paths as file name
This commit is contained in:
Submodule h2d-libgdx-spine-extension updated: 2753ca6373...4ba740dbb2
@@ -11,6 +11,7 @@ import java.awt.image.AffineTransformOp;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
/** Unpacks a texture atlas into individual image files.
|
||||
* @author Geert Konijnendijk
|
||||
@@ -98,6 +99,7 @@ public class TextureUnpacker {
|
||||
|
||||
// check if the parent directories of this image file exist and create them if not
|
||||
File imgOutput;
|
||||
region.name = region.name.replaceAll("/", Matcher.quoteReplacement("$"));
|
||||
if (prefix != null) {
|
||||
imgOutput = new File(outputDirFile,
|
||||
String.format("%s%s.%s", prefix, region.index == -1 ? region.name : region.name + "_" + region.index, extension));
|
||||
|
||||
@@ -184,6 +184,7 @@ public class SpineAsset extends Asset {
|
||||
for (JsonValue slotEntry = skinMap.getChild("attachments"); slotEntry != null; slotEntry = slotEntry.next) {
|
||||
for (JsonValue entry = slotEntry.child; entry != null; entry = entry.next) {
|
||||
String name = spineName + entry.getString("name", entry.name);
|
||||
name = name.replaceAll("/", Matcher.quoteReplacement("$"));
|
||||
deleteSingleImage(resolutionName, name);
|
||||
projectManager.deleteRegionFromPack(projectManager.getCurrentProjectInfoVO().animationsPacks, name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user