Layer scripts to be referenced only by name
Moderators: Víctor Paredes, Belgarath, slowtiger
Layer scripts to be referenced only by name
I would like to see the layers script references in the anme file just be the script file name, rather than the whole path, as this stops scenes being easily portable from one artist to another. If the script exists somewhere in the Scripts folder in the AS directory, AS should find them and load them. This means all scripts should have a different name, but I think it's very rare that two names will be the same (don't they have to be all different names anyway?)
As it is, if user A keeps AS in B:\Art\Anime Studio, and use B keeps AS in P:\anime Studio pro, then all layer_script references in scenes swapped between them will be wrong.
As it is, if user A keeps AS in B:\Art\Anime Studio, and use B keeps AS in P:\anime Studio pro, then all layer_script references in scenes swapped between them will be wrong.
If you keep scripts in a folder below the file name it won't lose the reference. It will then use a relative path to the script:
Project folder
----> Anime Studio File
----> Script folder
-----------> Layer script file
-----------> Another Layer script file
----> Audio folder
-----------> Sound file
-----------> Another sound file
----> Images folder
-----------> image file
-----------> Another image file
Now if you drag this whole structure to a new computer all the links will be maintained.
-vern
Project folder
----> Anime Studio File
----> Script folder
-----------> Layer script file
-----------> Another Layer script file
----> Audio folder
-----------> Sound file
-----------> Another sound file
----> Images folder
-----------> image file
-----------> Another image file
Now if you drag this whole structure to a new computer all the links will be maintained.
-vern
- synthsin75
- Posts: 10260
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
You could write a menu script that would have the user select their AS installation folder. Then as long as they have the layer script in, say, ...ASP/scripts/layer/*, it'll be found. You'd need to write that path to the file, but that can also be done by the same menu script.
If passing this file back and forth, this menu script would need to be run each time. Also, it'd do no good if the other person didn't have the same layer script in the same location within the AS installation folders.
If passing this file back and forth, this menu script would need to be run each time. Also, it'd do no good if the other person didn't have the same layer script in the same location within the AS installation folders.
- synthsin75
- Posts: 10260
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Vern, I was just talking about pulling it from the file format, since you can find it easy enough searching for 'layer_script'.
Not really something I have a need for, so I'm just putting the idea out there if someone else really needs something like this. Not a script I'd be interested in writing, though it should be easy enough, I think.

Not really something I have a need for, so I'm just putting the idea out there if someone else really needs something like this. Not a script I'd be interested in writing, though it should be easy enough, I think.

- synthsin75
- Posts: 10260
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Actually maybe this could be even easier using some kind of "external" batch editor application using that windows basic.. programming... thingy. Suppose you need to transfer a whole bunch of AS files, you could just run them through a batch text editor to modify the path to the scripts.synthsin75 wrote:Well, I wouldn't expect it to update, but since this only needs to run once for each transfer of the file, I think just reopenning the same file (without closing AS) should work.
An absolute path works ANYWHERE. The exact same path string would work in any file no matter where it is on the computer. You could even put the scripts in any folder instead of in the application folder as long as it was "above" the AS file.
-vern
The way it works in LightWave is the program has a list of installed plugins/scripts, and when the scene is written it only saves the name of the script in the scene, not the absolute path, so you just have to have the script in the LW plugins directory, not anywhere else.
I'm kind of torn between that, because you only need one place to keep scripts, or the AS way of doing it, because the scripts get backed up/copied wherever the .anme files are, so you'll never be in the position of digging up the scene only not have it work because you don't have the script anymore.
On the other hand, if you find a bug in the script, you have to update alllll the copies of the script wherever it's been copied to, whereas in LW you just update the one script.
I'm kind of torn between that, because you only need one place to keep scripts, or the AS way of doing it, because the scripts get backed up/copied wherever the .anme files are, so you'll never be in the position of digging up the scene only not have it work because you don't have the script anymore.
On the other hand, if you find a bug in the script, you have to update alllll the copies of the script wherever it's been copied to, whereas in LW you just update the one script.