Support for Anime Studio 9.5

Hi guys,

we’re new to Deadline but are hoping to utilize it on a new animated production for broadcast in the UK and Ireland starting in the coming months. We’ll be using the latest version of Anime Studio (9.5) as well as After Effects CC.

  1. So far our tests using it with Anime Studio haven’t quite worked out. To keep things simple we’ve been testing on a single machine (repository and client apps). After a bit we’ve gotten it to process fine, render executable is recognized and every frame is processed without error. Unfortunately the output folder is always completely empty, and the scanner always tells us that every frame is missing. We’re thinking this is not a problem with our use of deadline, as the Slave seems to communicate fine with the repository and processes / logs everything but never actually produces images.

Perhaps the latest Anime Studio is not supported as a Render Executable yet?

  1. in the event of us getting it to render from Anime properly, we have one further inquiry. Every render option is catered for in the Anime Studio plugin bar one important one called ‘Render Only Layer Comp:’. This would be a crucial component in us choosing to use Deadline on this production. Layer Comps are selections made inside Anime Studio’s layer tree that allow each layer or combinations of layers to be separately exposed in the UI and crucially, to easily export separate layers to allow our After Effects compositing team to do their magic. ‘Render Only Layer Comp:’ is actually not an option in the main export dialogue in Anime Studio (so understandably it was overlooked). It is however a function of the Batch Export function, which is almost identical, bar that and a couple of other minor options. We were hoping that this would be an easy enough feature to implement to the Anime Studio Plugin Script as hopefully accessing Layer Comps from the Command Line should be covered in the Anime Studio API.

Layer Comps are however, scene-specific, so the submit-job dialogue in Deadline would require a dropdown menu of the available layer comps in the source Anime Project, which may be complicated to implement into the script. I’m not sure…

Any help on this would be greatly appreciated. Deadline looks like exactly what our new production will need and we would love to work it into the pipeline if at all possible. Thanks in advance.

Regards,

Mark

Hello,

I have passed the request for 9.5 support along to our dev team, as well as the request for that functionality. I hope we can get this into a future build.

Hi Mark,

For (1), can you check the render log for the job to see what the render executable and arguments are? You should see something like this:

Render Executable: "C:\Program Files\Smith Micro\Anime Studio Pro 8\Anime Studio Pro.exe"
Render Argument:  -r "[path to scene]" -v -f JPEG -o "[path to output]" -start 1 -end 1 -aa yes -shapefx yes -layerfx yes -halfsize no -halffps no -fewparticles no -extrasmooth yes -ntscsafe no -premultiply yes

If you can post this information here, we’ll have a look. If all looks well, we can then get you to run the same command from a command line outside of Deadline to see if the problem still occurs. This is a test to see if the problem is related to anything Deadline is doing, or if it’s a more general Anime Studio issue.

For (2), do you happen to have any documentation on the available command line arguments for Anime Studio 9.5? We can look at it to see if we’re missing anything else. We currently only have version 8, so we’re a little out of date, but we’ll contact the Anime Studio guys to see if we can get an updated copy.

Thanks!

  • Ryan

Hey guys,

thanks for replying so quick! As a default, it doesn’t work whatsoever, but I assume that’s just a broken file path in executable list:

When I amend the list to include the 9.5 and the 64bit 9.5 executables, then I get this

Like I say, it processes every frame that way, logs no errors, but leaves my output folder empty, which the scanner confirms.

Now, on the second point, we’ve just requested as much info on the available arguments (particularly those referencing Layer Comps) from Jason at Smith Micro so hopefully we can provide you with more info on that shortly.

I’ll be happy to try out a command line test for you guys, but you’ll need to ‘speak slowly’ :wink: I’m sure it’s pretty obvious I don’t really know anything about this stuff!

Thanks again for addressing this so quickly, guys.

Mark

Hey Mark,

That’s correct. We should add explicit support for versions 8 and 9 of Anime Studio, and have the proper default paths for both.

Thanks for the log! Here is the command line that Deadline is using to render with Anime Studio:

"C:\Program Files\Smith Micro\Anime Studio Pro 9.5\Anime Studio Pro x64.exe" -r "C:\Users\mmullery\AppData\Local\Thinkbox\Deadline\slave\Cs-comp-058\jobsData\q032c002-Extended.anme" -v -f JPEG -o "C:\Users\mmullery\Desktop\Render.jpg" -start 8 -end 8 -aa yes -shapefx yes -layerfx yes -halfsize no -halffps no -fewparticles no -extrasmooth yes -ntscsafe no -premultiply yes

Two things stand out to me here. The first is that the Anime Studio scene file is being submitted with the job. When this happens, the scene gets copied to a temporary location on the slave and Anime Studio loads it from this temporary location. Perhaps there are some relative paths in the scene that break when referenced from this temporary location, which causes the render to fail. Can you try submitting again, but this time disable the option to submit the scene with the job?

The second is that the output path is a local one (“C:\Users\mmullery\Desktop\Render.jpg”). Perhaps this is intentional because you are just testing on one machine? Just wanted to double check and make sure, because local output paths are a common cause for “missing” output. :slight_smile:

After submitting a new job without the scene file included, if it still doesn’t work, please send us the new log and we’ll have a look.

I also sent an email to Smith Micro this morning to see if we can get a copy of Anime Studio 9.5 for testing.

Cool! First, we’ll see how your test goes without submitting the scene file. If that fails, please send us the log, and then we’ll show you how you can test from the command line outside of Deadline.

Thanks!

  • Ryan

Ok so changing the files and outputs to network ones, and stopping it from submitting to the temporary folder didn’t make a difference. Still no output jpgs, still no noticeable errors.

0: Plugin rendering frame(s): 1 0: INFO: Stdout Handling Enabled: True 0: INFO: Popup Handling Enabled: False 0: INFO: Using Process Tree: True 0: INFO: Hiding DOS Window: True 0: INFO: Creating New Console: False 0: INFO: Render Executable: "C:\Program Files\Smith Micro\Anime Studio Pro 9.5\Anime Studio Pro x64.exe" 0: INFO: Render Argument: -r "S:\SoS_Production\09_FX\AnimeStudioPro_Models\stormy_boats\q054c010_boat.anme" -v -f JPEG -o "S:\SoS_Pre_Production\06_Tests\deadline test\deadline test.jpg" -start 1 -end 1 -aa yes -shapefx yes -layerfx yes -halfsize no -halffps no -fewparticles no -extrasmooth yes -ntscsafe no -premultiply yes 0: INFO: Startup Directory: "C:\Program Files\Smith Micro\Anime Studio Pro 9.5" 0: INFO: Process Priority: BelowNormal 0: INFO: Process Affinity: default 0: INFO: Process is now running 0: INFO: Process exit code: 0

Though, I have an additional question. Is Deadline fine with network file paths being ‘mapped’ as in “S:/SoS_Production” or does it require the format “\CS_SONG\Song_of_the_sea\SoS_Production”?

Anyway let me know and we can try a command line test.

Unfortunately, according to Jason from Smith Micro there are no Layer Comp command line arguments available for Anime Studio yet, so we may have to leave that part out. But we could still utilize Deadline effectively without them, as long as we can get 9.5 running with it. We’ll likely be using it with After Effects on the next production too.

It looks like the command line arguments have been fairly static for years now: lostmarble.com/forum/viewtopic.php?t=1318

Mark

Thanks for running that test. Now we can do a command line test just to confirm if this is a Deadline issue or not. Here is the command line that Deadline is running in this case:

"C:\Program Files\Smith Micro\Anime Studio Pro 9.5\Anime Studio Pro x64.exe" -r "S:\SoS_Production\09_FX\AnimeStudioPro_Models\stormy_boats\q054c010_boat.anme" -v -f JPEG -o "S:\SoS_Pre_Production\06_Tests\deadline test\deadline test.jpg" -start 1 -end 1 -aa yes -shapefx yes -layerfx yes -halfsize no -halffps no -fewparticles no -extrasmooth yes -ntscsafe no -premultiply yes

On your current test machine, open a command prompt. You should be able to find this under Start Menu -> All Programs -> Accessories -> Command Prompt. Copy the full command above, and then paste it into your command prompt (right-click on the command prompt window to find the Paste option). Then press Enter to run the command.

If you still don’t get any output, then at least we can reproduce this problem outside of Deadline, and you can contact the Smith Micro guys to see if they have any ideas (since we’ve confirmed it’s not a Deadline specific issue). If you do get output this time, then Deadline must be doing something wrong, and we’ll have to do some digging.

In the meantime, we’re going to get Anime Studio 9.5 set up here and see if we can get something to render out on our test farm.

Cheers,

  • Ryan

We have Anime Studio 9.5 installed now, and we’re able to reproduce the problem (both with and without Deadline). It looks like it’s related to how we’re specifying the output format. We’ll keep digging and report back.

We figured it out. This is from the link you sent us with the command line arguments:

As you can see in the command line arguments, “JPEG” is all capitals, and that’s why no output is generated. The solution to render with 9.5 is to simply convert the format to lowercase. I’ve attached an updated AnimeStudio plugin file here that does the conversion. Note that this change will probably prevent previous versions of Anime Studio from working (since they expect the format in uppercase), but it sounds like you guys are only using 9.5, so this shouldn’t be a problem. In Deadline 6.1 (which is currently in beta), we’ll be improving our Anime Studio plugin to support versions 8, 9, and 9.5, and it will convert the format to upper or lower case as necessary based on the version.

To install the Anime Studio patch, go to [Repository Folder]\plugins\AnimeStudio, and rename the current AnimeStudio.py file to AnimeStudio_bak.py so that you have a backup. Then unzip the attached file to the same folder. Submit a new job, and let us know if you get some output this time.

Thanks!

Cheers man!

Slight problem with that patch though. It spits this back at me:

[code] Scheduler Thread - Synchronizing job files
Scheduler Thread - Synchronization time for job files: 18.001 ms
Scheduler Thread - Synchronizing plugin files
Scheduler Thread - Synchronization time for plugin files: 123.007 ms
Constructor: AnimeStudio
0: Task timeout is disabled.
0: Loaded job: Untitled (999_050_999_1506c261)
0: INFO: StartJob: initializing script plugin AnimeStudio
Scheduler Thread - Render Thread 0 threw an error:
Scheduler Thread - An error occurred in function “GetDeadlinePlugin” the plugin script file C:\Users\mmullery\AppData\Local\Thinkbox\Deadline\slave\Cs-comp-058\plugins\AnimeStudio.py: Python Error: ‘AnimeStudioPlugin’ object has no attribute ‘InitializeProcessCallback’ (System.MissingMemberException)

Exception Details
MissingMemberException – ‘AnimeStudioPlugin’ object has no attribute ‘InitializeProcessCallback’
Exception.Data: ( )
Exception.TargetSite: System.Object b__16(System.Runtime.CompilerServices.CallSite, System.Object, IronPython.Runtime.CodeContext)
Exception.Source: IronPython
Exception.StackTrace:
at IronPython.Runtime.Binding.MetaUserObject.FastGetBinderHelper.<>c__DisplayClass18.b__16(CallSite site, Object self, CodeContext context)
at IronPython.Runtime.Types.GetMemberDelegates.SlotDict(CallSite site, Object self, CodeContext context)
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at init$2(Closure , PythonFunction , Object )
at IronPython.Compiler.PythonCallTargets.OriginalCallTarget1(PythonFunction function, Object arg0)
at CallSite.Target(Closure , CallSite , CodeContext , PythonFunction , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at IronPython.Runtime.Types.LateBoundInitBinder.FastInitSite.CallTarget(CallSite site, CodeContext context, Object inst)
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at IronPython.Runtime.Types.PythonType.FastTypeSite.CallTarget(CallSite site, CodeContext context, Object type)
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at GetDeadlinePlugin$1(Closure , PythonFunction )
at IronPython.Compiler.PythonCallTargets.OriginalCallTarget0(PythonFunction function)
at CallSite.Target(Closure , CallSite , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
at Scripting(Object )
at FranticX.Scripting.IronPythonScriptEngine.CallFunction(Boolean interactive, String functionName, Object args)

Exception – Python Error: ‘AnimeStudioPlugin’ object has no attribute ‘InitializeProcessCallback’ (System.MissingMemberException)
Exception.Data: ( )
Exception.TargetSite: Void HandlePythonError(System.Exception, Boolean)
Exception.Source: franticx
Exception.StackTrace:
at FranticX.Scripting.IronPythonScriptEngine.HandlePythonError(Exception e, Boolean interactive)
at FranticX.Scripting.IronPythonScriptEngine.CallFunction(Boolean interactive, String functionName, Object args)
at Deadline.Scripting.DeadlineScriptManager.CallFunction(Boolean interactive, String scopeName, String functionName, Object args)
at Deadline.Plugins.ScriptPlugin.StartJob(Job job)

RenderPluginException – An error occurred in function “GetDeadlinePlugin” the plugin script file C:\Users\mmullery\AppData\Local\Thinkbox\Deadline\slave\Cs-comp-058\plugins\AnimeStudio.py: Python Error: ‘AnimeStudioPlugin’ object has no attribute ‘InitializeProcessCallback’ (System.MissingMemberException)
RenderPluginException.Cause: JobError (2)
RenderPluginException.HasSlaveLog: True
Exception.Data: ( )
Exception.TargetSite: Void StartJob(Deadline.Jobs.Job)
Exception.Source: deadline
Exception.StackTrace:
at Deadline.Plugins.ScriptPlugin.StartJob(Job job)
at Deadline.Plugins.Plugin.StartJob(Job job)
at Deadline.Slaves.SlaveRenderThread.RenderCurrentTask(TaskLogWriter tlw)
[/code]

It might be something I did wrong with the extract? Either way, when I remove it and rename AnimeStudio_bak.py back to AnimeStudio.py it doesn’t produce the error.

I’m guessing that the plugin stuff in that AppData path is something that the slave generates from the repository copy?

Any ideas? I think we’re nearly there anyway!

Mark

Hey Mark,

Which version of Deadline are you guys running? The patch I sent you should work with 6.0, but if you’re running an older version like 5.2, that would explain the problem.

Can you just zip up and post your original AnimeStudio.py file (the one you renamed to AnimeStudio_bak.py)? I can just quickly make the change in there and post it back again.

Thanks!

  • Ryan

Yeah it’s 5.2. Ok so that’s whole plugin folder. It’s got the one you gave me (AnimeStudio.py) and the original one I renamed (AnimeStudio_bak.py) as well as the other files, if they’re any help.

Mark
AnimeStudio.zip (5.91 KB)

Thanks! Attached is a new modified AnimeStudio.py file. Just unzip it to your AnimeStudio plugin folder like you did before.

Hope this does the trick!
AnimeStudio.zip (1.49 KB)

You did it! My folder overfloweth with jpgs!

Thank you so much for sticking with this, Ryan. This is brilliant.

Regards,
Mark

No problem! Glad to hear it’s working now. :slight_smile: