Is it possibile to execute a render through scripting?
Moderators: Víctor Paredes, Belgarath, slowtiger
-
- Posts: 303
- Joined: Thu May 13, 2010 2:01 pm
Is it possibile to execute a render through scripting?
I'd like to code an export script with certain set properties, but i wouldn't know where to start with the actual export command. Any help?
- synthsin75
- Posts: 9934
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Is it possibile to execute a render through scripting?
Just off hand, yes, using the command line renderer and Lua OS library commands....I think.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
-
- Posts: 303
- Joined: Thu May 13, 2010 2:01 pm
Re: Is it possibile to execute a render through scripting?
Hi Synthsin,
Thanks for your input.
I got it to work using:
Do you know if there is a way to call the application path of AS?
Thanks for your input.
I got it to work using:
Code: Select all
os.execute('start "Anime Studio Pro" "C:\\Program Files\\Anime Studio Pro 10\\Anime Studio Pro Win32.exe" -r "C:\\Projects\\file.anme"')
- synthsin75
- Posts: 9934
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Is it possibile to execute a render through scripting?
moho.AppDir()
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
-
- Posts: 303
- Joined: Thu May 13, 2010 2:01 pm
Re: Is it possibile to execute a render through scripting?
Yeah, i found that one, but it points to a location where it saves or gets data from. On Windows its path somtimes even goes: users/me/appdata/roaming/...
I think i'll have to ask the user to point towards the .exe and use SavePrefs(prefs), prefs:SetString(path) to be able to recall it.
I think i'll have to ask the user to point towards the .exe and use SavePrefs(prefs), prefs:SetString(path) to be able to recall it.
- synthsin75
- Posts: 9934
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Is it possibile to execute a render through scripting?
Are you saying it points to the working directory? If so, did you change the working directory in your script? If not, this may be a scripting interface bug. I'll test some when I get home tonight.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
-
- Posts: 303
- Joined: Thu May 13, 2010 2:01 pm
Re: Is it possibile to execute a render through scripting?
Nah, haven't changed a thing. I think it gave me back these two paths in different instances:
C:\Program Files\Anime Studio Pro 10\Resources\Support
C:\Users\me\AppData\Roaming\Smith Micro\Anime Studio Pro\10
I'm guessing the path changes to wherever it last gathered data from.
If you could check, that would be awesome.
C:\Program Files\Anime Studio Pro 10\Resources\Support
C:\Users\me\AppData\Roaming\Smith Micro\Anime Studio Pro\10
I'm guessing the path changes to wherever it last gathered data from.
If you could check, that would be awesome.
- synthsin75
- Posts: 9934
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Is it possibile to execute a render through scripting?
Oops, should have been: moho:AppDir()
But that first path (correct one) is the only one I can get AS to produce with this function. I can't even guess at why you are getting any other path, especially without seeing your code.
Once you sort that out, it's just a matter of stripping the path down to the directory the exe is in and using: moho:BeginFileListing(const char *dir, bool listHiddenAndSystemFiles = true)
And:
moho:GetNextFile()
To make sure you have the AS exe.
But that first path (correct one) is the only one I can get AS to produce with this function. I can't even guess at why you are getting any other path, especially without seeing your code.
Once you sort that out, it's just a matter of stripping the path down to the directory the exe is in and using: moho:BeginFileListing(const char *dir, bool listHiddenAndSystemFiles = true)
And:
moho:GetNextFile()
To make sure you have the AS exe.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/