diff --git a/package.json b/package.json index ffe6d0c..907e7b0 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "1.3.1", + "version": "1.3.2", "private": true, "devDependencies": { "grunt": "^0.4.5", diff --git a/src/Commands/Utilities/Copy Layers To Bitmap.jsfl b/src/Commands/Utilities/Copy Layers To Bitmap.jsfl index b0ec9dc..1b8cf2a 100644 --- a/src/Commands/Utilities/Copy Layers To Bitmap.jsfl +++ b/src/Commands/Utilities/Copy Layers To Bitmap.jsfl @@ -235,7 +235,7 @@ // Get the new timeline timeline = doc.getTimeline(); - var element = doc.selection[0]; + var element = doc.selection.length ? doc.selection[0] : null; if (element && element.libraryItem == libraryItem) { scaleX *= element.scaleX; @@ -243,12 +243,16 @@ } else { + fl.outputPanel.clear(); + fl.trace("WARNING: Unable to measure the relative scale either because the current item was opened directly from the library "); + fl.trace(" or because a tween is preventing the exit and enter of the symbol. Prompting for scale..."); + // Go back into the symbol after we exited - doc.library.editItem(libraryItem.name); + doc.library.editItem(originalItem.name); // Get the saved scale amount - var defaultScale = libraryItem.hasData(scaleKey) ? - libraryItem.getData(scaleKey) : 1; + var defaultScale = originalItem.hasData(scaleKey) ? + originalItem.getData(scaleKey) : 1; // Aask for the scale var scale = prompt("Output scale", defaultScale); @@ -258,7 +262,7 @@ scale = parseFloat(scale); // Save the scale to use at the default later on - libraryItem.addData(scaleKey, "double", scale); + originalItem.addData(scaleKey, "double", scale); return scale; } diff --git a/src/io.springroll.toolkit.mxi b/src/io.springroll.toolkit.mxi index 80b145b..ad901bf 100644 --- a/src/io.springroll.toolkit.mxi +++ b/src/io.springroll.toolkit.mxi @@ -3,7 +3,7 @@ name="SpringRoll Flash Toolkit" id="io.springroll.toolkit" requires-restart="true" - version="1.3.1"> + version="1.3.2">