Page 1 of 1
fixing broken resource links
Posted: Sat Nov 08, 2008 6:53 pm
by montblankdesign
I have a lot of assets and sometimes they get moved. Is there a way to fix broken asset links? In Adobe IN DESIGN you are asked to relocate them.
Posted: Sat Nov 08, 2008 7:33 pm
by slowtiger
Two solutions:
1. In AS, click the image layer properties and get to the last card, there you can update the image file.
2. If you have a lot of images, it is faster to open the AS file in a text editor, search for the string with the old path to the image, and replace that string with the new path.
Of course it's not a good idea to change the relative location of AS and image files during a project. I keep AS files within one project folder, and one images folder at the same level as the AS files. If I move the whole project folder, paths from AS files to images remain intact.
Posted: Sat Nov 08, 2008 7:41 pm
by heyvern
There is a script floating around for fixing broken image links, but in general there is no "global" fix for this issue. You can also use a text editor and do a search and replace for the linked files but the key is to set up the project folder ahead of time to avoid broken links. Keep all the Anime Studio files ABOVE or at the same level as any other files/folders with linked assets. This makes the paths "relative" and the folder can be moved anywhere without breaking links.
Project folder
--->AS File 1
--->AS File 2
--->Images folder
---------->image files
--->Audio folder
---------->Audio files
If you re-set up an existing project this way, you could use a text editor and search and replace to fix the paths to the assets. Just replace everything in the path up to the asset name with "Images/" or "Sound/" or "Scripts/" or whatever you choose.
This system works PERFECTLY. I use it all the time to transfer files through email. The beauty of is I can send just one AS file to someone. As long as their folders are set up the same way they drop the file in the right spot and it works.
-vern
Thanks for the solution
Posted: Sat Nov 08, 2008 7:44 pm
by montblankdesign
I have been trying to keep that work method. But I am importing anime studio objects to reuse characters and sometimes I do not foresee what I am going to do. I would love a collect for project command like they have in Audio programs.
Posted: Sat Nov 08, 2008 8:03 pm
by heyvern
You are right. Importing files doesn't account for this problem.
This would be a great script idea. I'm not sure if you can "copy" other files using the script interface but I could test this and see. If I can copy/move files using lua, then a "collection" script would be very doable.
I have a couple of ideas on my list of new scripts to try out... this one sounds very cool.
-vern
Posted: Sat Nov 08, 2008 8:26 pm
by synthsin75
That's definitely doable, Vern. This one's also on my todo list.
As long as people use a properly defined folder structure for their projects, you'd just need them to pick the location of where the resources are coming from. These could then be copied to the current projects location (preferably already in its own project folder), and the paths updated in the AS file.
I was even thinking of automatically generating the projects folder structure. But alas, other scripting has all of my attention at the moment.

Posted: Sat Nov 08, 2008 8:44 pm
by montblankdesign
Any idea why the layer scale gets lost in relinking
Posted: Sat Nov 08, 2008 8:58 pm
by synthsin75
Layer scaling shouldn't 'get lost' as it is keyframed within the AS file. Make sure you are relinking to the right image. If nothing else, when you select the scale layer tool, check the tool options at the top of the work space. These should still reflect any changes to that layer's scaling.
Posted: Sun Nov 09, 2008 12:10 am
by heyvern
I had problems in the past with image layers "rescaling" that is why I use the text editor. But recently this problem doesn't happen any more for some reason. Maybe it was fixed. I don't know.
I think this will be my next script. An AS "Consolidation" script. It's straight forward, I've already got the code for reading and writing files. I plan to incorporate the "folder structure" into it. It will generate the folders for each thing, images, audio, scripts and place copies of any linked items inside it.
This will actually be a fairly straight forward script. Good grief I already know the file format inside and out from my save bone animation script (still in progress) and this is just a verbatim copy.
I'm excited again!
-vern
consolidation
Posted: Sun Nov 09, 2008 4:13 pm
by montblankdesign
That would be so great. I do not see why Anime Studio Pro shouldn't have a steady stream of updates and improvements. I would gladly pay $50 for that script alone.