One command line render and one keyframe question

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
resle2
Posts: 9
Joined: Tue Feb 08, 2011 8:10 pm

One command line render and one keyframe question

Post by resle2 »

Hello,
I am using Anime Studio to create various frame sequences for an animated character to be used elsewhere.

Thus, I have several separate actions.

Now, I'd need to render such actions from command line in some way, but for now I'm able only to render the mainline. Is there some way to specify the action of which I want to render some frames?

Also: I'd like to know if there's some way to put a keyframe for all bones of a certain bone layer at the same time, on a given frame. This, because if I put all the actions in sequence on the mainline, by referencing them one after another - I'd need to put some... "stop" frame between them, to prevent one from influencing the movement of the following.

Thanks in advance for your assistance!

andrea
User avatar
neeters_guy
Posts: 1618
Joined: Mon Sep 14, 2009 7:33 pm
Contact:

Re: One command line render and one keyframe question

Post by neeters_guy »

resle2 wrote:Hello,
Also: I'd like to know if there's some way to put a keyframe for all bones of a certain bone layer at the same time, on a given frame.
There are several scripts that do this, notably, MKelley Key Skeleton script. See this thread:

How to key all bones at one touch?
User avatar
slowtiger
Posts: 6079
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

The batch render works like this: drag several .anme files on it and start the render.
ponysmasher
Posts: 370
Joined: Thu Aug 05, 2004 2:23 am
Location: Los Angeles
Contact:

Post by ponysmasher »

Unfortunately you can't send parameters like that via the command line renderer. Sure would be nice though if you could specify to only render certain layers or certain actions.
Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Post by Rudiger »

I may have a Python script laying around that may give you a hand to do what you want. It basically acts as a wrapper for the Anime Studio command line renderer and offers some useful extra options. The one you would be interested in is the startup script option which you could use by writing a simple startup script that places the action that you want on the main timeline. However, it works using embedded scripts, so if you are using version 7 with a multi-core processor you will most likely have problems.
resle2
Posts: 9
Joined: Tue Feb 08, 2011 8:10 pm

Post by resle2 »

Thanks for the Key Skeleton script, neeters_guy! It works almost flawlessly. There's just one thing left out from it as far as I tested it for now: layer translation, which doesn't get keyed (at least in AS 7)

Rudiger wrote:I may have a Python script laying around that may give you a hand to do what you want. It basically acts as a wrapper for the Anime Studio command line renderer and offers some useful extra options. The one you would be interested in is the startup script option which you could use by writing a simple startup script that places the action that you want on the main timeline. However, it works using embedded scripts, so if you are using version 7 with a multi-core processor you will most likely have problems.
Aaawww... yes, I am using a multicore setup... many, many cores infact... what problems could I have?
Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Post by Rudiger »

resle2 wrote: Aaawww... yes, I am using a multicore setup... many, many cores infact... what problems could I have?
There appears to be a bug in the multi-core rendering in AS7 that causes it to crash when you have embedded scripts. I reported the issue to Smith-Micro slightly before 7.1 was released, but there's no news on a fix at this stage.
resle2
Posts: 9
Joined: Tue Feb 08, 2011 8:10 pm

Post by resle2 »

ponysmasher wrote:Unfortunately you can't send parameters like that via the command line renderer. Sure would be nice though if you could specify to only render certain layers or certain actions.
And, from a coder's point of view - I am reasonably sure that both things would be extremely easy to implement.

Selective layer rendering would be as easy as adding a -layers "name1,name2,name3" and/or -hide "name1,name2,name3" switch which the program would parse to set visibility on given layers.

Rendering actions: -timeline "name", or even timeline "name1,name2,name3".

In general, if the GUI can do something without in-between interaction from the user (answer dialogs, click somewhere etc.) - then porting that to the command line is as easy as writing ten lines of additional code.

Version 8 perhaps? ;)
Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Post by Rudiger »

resle2 wrote:
ponysmasher wrote:Unfortunately you can't send parameters like that via the command line renderer. Sure would be nice though if you could specify to only render certain layers or certain actions.
And, from a coder's point of view - I am reasonably sure that both things would be extremely easy to implement.

Selective layer rendering would be as easy as adding a -layers "name1,name2,name3" and/or -hide "name1,name2,name3" switch which the program would parse to set visibility on given layers.

Rendering actions: -timeline "name", or even timeline "name1,name2,name3".

In general, if the GUI can do something without in-between interaction from the user (answer dialogs, click somewhere etc.) - then porting that to the command line is as easy as writing ten lines of additional code.

Version 8 perhaps? ;)
Selecting an action to render instead of the main timeline is probably OK, but I wouldn't want the command-line interface to get too many options. I think specifying a startup script that specifies which layers you want to make visible is a cleaner way to do it. I guess the best of both worlds would be if the scripting interface had access to the command-line that was used to invoke AS. Then you could pass command-line arguments to your start-up script and have all the crazy options you might think of.
Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Post by Rudiger »

Wow, putting together a polished product sure is a whole lot more work than throwing together a quick script that does the job. My Python wrapper script for Anime Studio Pro's command-line renderer is now up on ContentParadise http://www.contentparadise.com/productDetails.aspx?id=17468. Sorry about charging for it, but I plan on continuing to provide startup scripts for it, free of charge.

Anyway, once such script is selective_render.lua. If you're still interested in rendering only selected layers and actions, you can use this script together with ASPWrap it to do just that, right now!

Here are the options it supports. As as you will see, they are very similar to what you requested for a future version of Anime Studio :):

Code: Select all

--
--    -show_layers "layer_name1,layer_name2"        Specify list of top-level layers to show.
--
--    -show_only_layers "layer_name1,layer_name2"   Specify list of top-level layers to show and
--                                                  make all other top-level layers invisible.
--
--    -hide_layers "layer_name1,layer_name2"        Specify list of top-level layers to hide.
--
--    -hide_only_layers "layer_name1,layer_name2"   Specify list of top-level layers to hide and
--                                                  make all other top-level layers visible.
--
--    -action "action_name"                         Render specified action instead of main timeline.
--
--    -auto_frame_range yes*/no                     Automatically adjust frame range to match selected action.
Example:

Code: Select all

python "c:\Program Files (x86)\Anime Studio Pro 7\ASPWrap.pyo" -r selective_render_test.anme -s selective_render.lua -show_only_layers "Layer 1" -action "Scene 1" 
User avatar
rylleman
Posts: 750
Joined: Tue Feb 15, 2005 5:22 pm
Location: sweden
Contact:

Post by rylleman »

Rudiger wrote:...My Python wrapper script for Anime Studio Pro's command-line renderer is now up on ContentParadise ...
Wow!
This is going to be a tremendous help as I'm almost always uses renderpasses. Up until now I've had to manually select layers and save different renderpass files.
Thank you.
Post Reply