Page 1 of 1
Moving files with layer scripts between machines
Posted: Thu Oct 23, 2008 4:21 am
by madrobot
Is it just me?
I've got files with layers scripts (like for example meshinstance.)
I have AS on my own Laptop
and on the work Mac.
You can guess the rest.
When I take a file from the laptop and open it on the mac
I get error messages that the layerscript can't be found.
So my characters come in all WRONG
meshinstance broken and out of whack.
Is there a way to safely get these files back and forth?
Or do I have to segregate?
Files started on the laptop forever trapped there?
Posted: Thu Oct 23, 2008 4:42 am
by chucky
Hey dood ,funny you should say that,
I just had the exact same experience on my tablet.
I expected the meshinstance and aimbones to come through but I guess the anme file is expecting an absolute path not a relative one.
I think you can change that in the anme file by opening it up as text.
If that is the case I'll have to quote the horse and say" No Sir, I don't like it."
Posted: Thu Oct 23, 2008 4:46 am
by chucky
Yes, Mad,
that was the case, luckily I had been working off desktop so I moved the files to the desktop on the tablet and , boomshanka, all worked correctly.
Posted: Thu Oct 23, 2008 4:59 am
by chucky
If you can't do something as simple as that, open in the anme in wordpad and use the find function, type 'meshintance'- for instance

that way you will quickly find what you are looking for, in my case it was
layer_script "c:/Documents and Settings/CHUCKY/Desktop/BAMBOO/scripts/meshinstance/syn_meshinstance_final.lua"
then change that to the path you need.
same for all script layers.
save.... done.
Posted: Thu Oct 23, 2008 5:01 am
by madrobot
Thankyou sir!
Posted: Thu Oct 23, 2008 5:18 am
by madrobot
Dude that is so awesome.
Thanks heaps Chuck!
Now I don't have to re-rig all my characters and stuff
Posted: Thu Oct 23, 2008 6:20 am
by heyvern
What I usually do is create my own "project folder". Inside the project folder there is a scripts folder. I put scripts used in projects I know will be moved around to different machines in that folder. Script paths are "relative" when they are "below" the AS file in a folder. If AS has to look outside the folder of the open AS file it always uses absolute path names.
I know this can create issues regarding duplicated files... but... it's a bit easier than trying to remember where all the scripts are. I always know the scripts for that file are in that folder.
----
A more advanced technique I don't necessarily recommend due to its complexity... although I use it. I create small "stub" layer scripts that reference a custom utility script. Utility scripts stay inside the application folder and can be accessed by any other type of script. Many of the tools in AS reference the lm_utilities.lua script inside the applications script folder. The "stub" layer script only needs one line of code to access the utility script functions. You still need those stub scripts for the file to work but there is less chance of issues with different versions since those layer scripts don't have any "real" code, just a reference to a function that is in the utility script. This is complex because you have to paste code from your layer script into a utility script. Modifications may be needed.
This could be good for a production environment with a lot of people using the same scripts. Each computer only needs to keep one script file updated in one location.
------
I pray to all my pagan gods in the temple in my basement at night that the next big upgrade to AS has a way to store text data (like those "stub" layer scripts) inside the file format.
I hope this will happen... because that pentagram on the floor in the basement is very unsightly.
-venr
Posted: Thu Oct 23, 2008 6:25 am
by madrobot
heyvern wrote:Script paths are "relative" when they are "below" the AS file in a folder.
That's even better!
Posted: Thu Oct 23, 2008 6:52 am
by chucky
Funny Vern, that's exactly how I set up my project, with the scripts inside the scripts folder below the anme file and all inside a project file.
Unfortunately that wasn't good enough for AS.
That's why I was surprised that it didn't work and the anme file as I pasted in one of the last posts was looking for the absolute location.
I believe you Vern, that's why I saved like I did , but it didn't work, the images linked , but the scripts didn't.
I'm not arguing, I'm just saying what happened, using a vista tablet, whicj incidentally runs AS faster than my desktop, no screen real estate though, sigh.
Posted: Thu Oct 23, 2008 7:15 am
by heyvern
That's very strange Chucky. it works the way I described on the Mac. I will test on My PC when I get a chance. It isn't hooked up right now (have a new Mac and it's using my extra monitor), and I'm still using XP on it not Vista but I want to make sure it's the same for PC and Mac. I did this before using W2K and it worked. I haven't had my new PC long enough to test these things out much.
I wonder if it has to do with some system level directory... thingy? Maybe the folders in windows are handled differently? I have no clue about such things.
Anyway, from my experience with mac it works....
... I just did it now... there... did it again...
edit: I verified it worked by linking relative and absolute path scripts to the same layer, saving and opening the file in a text editor. I also quit AS each time just to be sure.
-vern
Posted: Sat Oct 25, 2008 1:12 pm
by Dodgy
I would really like to see layer scripts only referenced by their names rather than a path. Then you just have to copy the layer_script into your anime studio scripts directory for them to be looked up by AS and loaded. With absolute references, that doesn't allow users to have AS where they want it.