Create and publish HTML5 Canvas documents in Animate.Convert Animate projects to other document type formats.How to use mask layers in Adobe Animate.Working with Motion tweens saved as XML files.Editing the motion path of a tween animation.How to edit motion tweens using Motion Editor.How to work with classic tween animation in Animate.How to use frames and keyframes in Animate.Work with Multiple File Types in Animate.This would prevent needing a script for every layer. TPS file onto app, then the the script could extract the filename and do the rest. AppleScript can help convert a shell script into an app that allows files to be dropped on that app. But, what I’d like to do in the future is investigate AppleScript. This isn’t nearly as bad as it sounds since we typically only have 2-3 layers. Using this method, I need to create a shell script for every UIToolkit layer. Then I can run this script by a simple double-click. Now, if a new asset is sent to me, I open the. This part took a bit more time as I learned spaces on either side of the equals sign will confuse bash, so I had to leave those out. When the shell script runs, we get the directory name where the script lives, cd into that directory and call pwd and assign that value into our DIR variable. TexturePacker -sheet "$DIR"/./Resources/layer02x.png -data "$DIR"/./Resources/layer02x.txt -scale 1.0 -width 2048 -height 2048 -format unity "$DIR"/layer0.tps TexturePacker -sheet "$DIR"/./Resources/layer0.png -data "$DIR"/./Resources/layer0.txt -scale 0.5 -width 1024 -height 1024 -format unity "$DIR"/layer0.tps To fix this issue, I had to modify the script a bit more: Running the script through Finder would simply return an error since the terminal would be in my home directory. TPS file, I would be in Finder, and being able to double-click the script would be nicer than opening a terminal to execute it. I had created a script that I could run through command line, but I wanted the script to be easier to use. The reason is, I had just learned about this option after looking over the command line help! You might ask why I didn’t just set this option in the TexturePacker GUI. One interesting thing to note is the –format option which prevents needing to rename the. The options all correspond with the changes that I mentioned previously. This helps keep the script short and sweet. TPS file such as padding, rotation, algorithm, etc. Note that I can omit changing any of the options that are already set in the. Resources/layer02x.txt -scale 1.0 -width 2048 -height 2048 -format unity layer0.tps Resources/layer0.txt -scale 0.5 -width 1024 -height 1024 -format unity layer0.tps So, this would be a script for one layer for UIToolkit: However, since the output sheets go into a folder that only contain the sheets and data files, so I need to reference these paths relative from where the shell script lives. I placed the script within the directory that contains all our assets. After some tinkering, I came up with a short script that reduces the number of click and edits that I need to make. I began by looking into TexturePacker’s command line options. TPS file, I could simply run a script that would take care of the rest of the work. I wanted a solution such that after editing the. This weekend I had some time to investigate a way to automate this tedious process. This process would be done over and over again, until insanity. Once TexturePacker creates the 4 files (layer0.png, layer0.json, layer02x.png, layer02x.json ), I would rename the.
0 Comments
Leave a Reply. |