Skip to content

Commit

Permalink
Merge pull request #125 from goldenPiGames/master
Browse files Browse the repository at this point in the history
ExportSpine.hx: set output directory
  • Loading branch information
jeremyfa authored Dec 10, 2023
2 parents d70d5c8 + 8bf23a4 commit 351f782
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions plugins/spine/tools/src/tools/tasks/spine/ExportSpine.hx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class ExportSpine extends tools.Task {

// Get project info
var projectPath = Path.join([cwd, 'ceramic.yml']);
var assetsPath = Path.join([cwd, 'assets']);
var projectCachePath = Path.join([cwd, '.cache']);
var tmpPath = Path.join([cwd, '.tmp']);
var spineDefaultConfigPath = Path.join([cwd, 'resources/spine-config.json']);
Expand Down Expand Up @@ -98,6 +97,7 @@ class ExportSpine extends tools.Task {

var spineConfigPath:String = null;
var rename:DynamicAccess<String> = null;
var outputDir:String = 'assets';

var path:String = null;
if (Std.isOfType(rawItem, String)) {
Expand All @@ -115,6 +115,10 @@ class ExportSpine extends tools.Task {
print(' $key -> ${rename.get(key)}');
}
}
if (rawItem.output != null) {
print('Export to directory: '+rawItem.output);
outputDir = rawItem.output;
}
}

if (path == null) {
Expand Down Expand Up @@ -254,9 +258,9 @@ class ExportSpine extends tools.Task {
// Do the actual moving
//
for (groupName in skeletons.keys()) {
print('Add assets/' + groupName + '.spine');
print('Add ' + outputDir + '/' + groupName + '.spine');

var groupDir = Path.join([assetsPath, groupName + '.spine']);
var groupDir = Path.join([cwd, outputDir, groupName + '.spine']);

if (FileSystem.exists(groupDir)) {
Files.deleteRecursive(groupDir);
Expand Down

0 comments on commit 351f782

Please sign in to comment.