Batch rendering in COFFEE?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/09/2008 at 02:37, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.1
Platform: Windows ;
Language(s) : C.O.F.F.E.E ;---------
I can invoke the render process in c4d by using CallCommand(12099) - however, the rendering does only begin if my script has ended, thus I cannot render multiple pictures in one script call. Is there any way how to do this in COFFEE? -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/09/2008 at 01:59, xxxxxxxx wrote:
In C++ you have RenderDocument(), unfortunatly there is no such function in COFFEE. Currently I see no way how to do this in COFFEE.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/09/2008 at 10:02, xxxxxxxx wrote:
Sigh. I'll try to abuse the animation system then.
I'll write a script that will use the document animation time to switch the object's visibility on that I want to render, while deactivating every other object. By setting the animation time to the number of objects that I want to render and by renaming the produced filenames, I should be able to do the kind of batch rendering that I want to have ... right? -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/09/2008 at 11:19, xxxxxxxx wrote:
Ok, this is incredible.
I have set up a Coffee script that enumerates all objects that I want to render, sets the document's playback time to match the number, activates the right object at the right time - but now I am stuck (well working on the next workaround after 2 other workarounds failed).
In theory, I only need to rename the image file. Sounds easy? It isn't. The first idea was to call a remote script after each frame which would simply rename the current image. Well that works in principle. But in order to make it work, I would need to pass some information to that script I want to run: the target's filename.
Well, so I tried to access that remote variable in Coffee. But right now, it seems impossible. The RDATA_EXTERNAL id seems to be used for something different. Or doesn't work. Or is not the right ID. I don't know, the filename object I retrieve is not containing anything meaningful it seems or at least I can't access it.
Ok, then the second idea was to write the current frame filename into a info.txt file and my remote-rename script would open that file and rename the file. But new(Filename) or new(BaseFile) just returned nil in my coffee script function. Ok, looks like it should not be done.
So I wrote a plugin coffee script which spits out the currently active object's name into a file. Works fine. But not if called from the coffee expression. C4d freezes then. Well, maybe not a good idea it seems.
Then I tried to invoke an OS command. Didn't work neither.
Actually I am now considering to write a plugin that spits out the full list of filenames into a file that is then processed by a single remote script. I only need to figure out in that remote script then which number is referring to which filename.... I think that plan is now failsafe.
I just want to say: the whole thing is horrible. The irony is that on the draft board it sounded perfectly easy and well suited for a scripting language: rendering a couple of objects into distinct files...
I wanted to avoid to install a C++ environment, downloading the SDK, setting all up just for this "simple" task - how wrong was I.I really like c4d - but this whole experience is just ... disappointing.