commandline rendering layercomp -All not working,overwrites images

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
mschreck
Posts: 5
Joined: Tue Oct 01, 2019 1:25 pm

commandline rendering layercomp -All not working,overwrites images

Post by mschreck »

Hi, this is my first post.

I´m currently looking into the commandline rendering flags described here:
http://www.lostmarble.com/forum/viewtopic.php?t=1318

(windows 10 moho 12)
my command currently looks like this:

"C:\Program Files\Smith Micro\Moho 12\MohoRT x64.exe" -r "C:\Temp\Moho\Rendertest.moho" -layercomp All -start 2 -end 4 -outfolder "C:\Temp\Moho\RenderOut" -f png

I have 4 layer comps and all get rendered correctly BUT the output image file is overwritten each time instead of adding the Layer comp name into the filename like described in the post:
MyAnimation-LayerComp1.mp4

where is my mistake? Can someone guide me into the right direction?
User avatar
synthsin75
Posts: 9934
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: commandline rendering layercomp -All not working,overwrites images

Post by synthsin75 »

My guess would be that the -outfolder tag is conflicting with the -layercomp All tag, as outfolder says "The name of the output file will be named based on the file name of the document". You might try doing the -outfolder tag before the -layercomp tag.
mschreck
Posts: 5
Joined: Tue Oct 01, 2019 1:25 pm

Re: commandline rendering layercomp -All not working,overwrites images

Post by mschreck »

Thanks for the suggestion.

Unofrtunately even if i don´t set any -outfolder in my commandline it still overwrites every image with the same filename:

"C:\Program Files\Smith Micro\Moho 12\MohoRT x64.exe" -r -layercomp All "C:\Temp\Moho\Rendertest.moho"

same with setting the outfile flag:

"C:\Program Files\Smith Micro\Moho 12\MohoRT x64.exe" -r "C:\Temp\Moho\Rendertest.moho" -layercomp All -o "C:\Temp\Moho\RenderOut\myrender.png" -f png

changing the order of the flags also didn´t fix the issue...
mschreck
Posts: 5
Joined: Tue Oct 01, 2019 1:25 pm

Re: commandline rendering layercomp -All not working,overwrites images

Post by mschreck »

I´m not getting anywhere....
It would be really really helpful to get the "-layercomp All" flag working. Currently I´m wondering if it might be related to windows itself...
As mentioned in my previous post, Moho DOES render all Layercomps in my scene BUT the layercomps´name doesn´t get added to the filename resulting in Moho overwriting every already rendered frame with the next layercomp.
changing the order of the flags didn´t help.

"C:\Program Files\Smith Micro\Moho 12\MohoRT x64.exe" -r "C:\Temp\Moho\Rendertest.moho" -o "C:\Temp\Moho\RenderOut\image.png" -layercomp All

Could anyone help me on this matter? Would someone be able to confirm this behaviour? Has anyone succeeded in using the -layercomp All flag?

any help appreciated!
Stan
Posts: 199
Joined: Sun Apr 19, 2009 3:22 pm

Re: commandline rendering layercomp -All not working,overwrites images

Post by Stan »

Well, I can confirm, -layercomp All doesn't work.

However, if you use the Moho Exporter ("File > Moho Exporter..."), and use the Split button, it does the job. Maybe that's what you actually need?

Image
________________________________________________________________________
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
User avatar
Greenlaw
Posts: 9191
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: commandline rendering layercomp -All not working,overwrites images

Post by Greenlaw »

Not being a programmer, I can't be much help but I can confirm that it should work. The programmers at my workplace were able to get Moho integrated in our render controller using the command lines, and when I submit a project to our render farm using a custom button in Moho, I have the option to break out the layer comps to separate folders. Works every time.

At home, I use Moho Exporter to break out Layer Comps and it works well. The only thing I really dislike about Moho Exporter is that I can't define a fixed output path with it (unlike our controller at work.) However, if you select your preferred path before you break out the passes by clicking the 'Split' button described in the above post, Moho Exporter will output all the layer comp renders to the same location in separately named folders. (You just have to remember to choose your preferred output path every time you render the project. Sigh!)
User avatar
synthsin75
Posts: 9934
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: commandline rendering layercomp -All not working,overwrites images

Post by synthsin75 »

Yeah, I can't get -layercomp All to work here either.

Two possible solutions:
mschreck
Posts: 5
Joined: Tue Oct 01, 2019 1:25 pm

Re: commandline rendering layercomp -All not working,overwrites images

Post by mschreck »

Greenlaw wrote: Fri Nov 01, 2019 12:21 am Not being a programmer, I can't be much help but I can confirm that it should work. The programmers at my workplace were able to get Moho integrated in our render controller using the command lines, and when I submit a project to our render farm using a custom button in Moho, I have the option to break out the layer comps to separate folders. Works every time.
This is exactly what we´re trying to do at our studio. The benefit of being able to use a "all" flag would have made the export to our render farm (royal render) easier. I guess we have to look into reading out the layercomp names then.
Thanks for the help!
User avatar
Greenlaw
Posts: 9191
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: commandline rendering layercomp -All not working,overwrites images

Post by Greenlaw »

I'm guessing the programmers at my workplace have done something 'under the hood' like what Wes described, but I really don't know anything about this. Sorry, wish I could be more help. :(

I hope you get it working at your studio.
User avatar
SimplSam
Posts: 1033
Joined: Thu Mar 13, 2014 5:09 pm
Location: London, UK
Contact:

Re: commandline rendering layercomp -All not working,overwrites images

Post by SimplSam »

old post but ...

You need to add either (or both):

-addlayercompsuffix yes
Which will append the layer comp name to the project name.

-or-

-createfolderforlayercomp yes
Which will create subfolder/s with the layer comp name, containing files with the project name.
Moho 14.1 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.1 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam


Sam
Post Reply