PDA

View Full Version : help with render settings related script


georgedrakakis
10-31-2008, 09:44 PM
hi,
i had troubles rendering all the frames in one go in this thread (http://forums.cgsociety.org/showthread.php?f=176&t=690800) , so i thought i could try to run a script that batch renders a sequence of images, when the frame parameter in the render settings is set to "current frame". (render single images in a row).
this is the script

// render single frames
// a simple script for rendering a batch of images
// when the frame is in "current frame" mode

main(doc,op)
{
//var first = RDATA_FRAMEFROM;
//var last = RDATA_FRAMETO ;
//op#RDATA_FRAMESEQUENCE=0;
var first = 0; // a dialogue box is needed to specify
var last =24 ; // the start & end of the sequence
var i;
for (i=first; i<last; i++)
{
CallCommand(12414); // Goto Next Frame
CallCommand(12099); // Render to Picture Viewer
}


the script seems to work, but there is a major problem; i can't find a way to delay the timeline moving a frame ahead, until the render is finished.
how can i declare "Goto Next Frame only if the render is finished"?

any help is much appreciated,
george

bandini
10-31-2008, 10:01 PM
I believe you need to listen for a message from Cinema that the render is finished, which I'm not sure can be detected in COFFEE. I believe you can also create your own thread for rendering and use that to send a message when the thread is finished. But, once again, I'm not sure that can be done in COFFEE.

May be better to ask this on plugincafe or see if a search there turns up anything related to COFFEE.

georgedrakakis
10-31-2008, 10:18 PM
tnx, plugincafe sounds like a good idea.
btw, i've found this Finishing sound (http://www.c4dplugs.com/viewPlug.php?RECORD_KEY%28PluginsRec%29=ID&ID%28PluginsRec%29=393&PHPSESSID=4ad184b659a6ff3dadd4e5cc7c2a8a7b) plugin, which somehow uses this message.
cheers,
george

bandini
10-31-2008, 10:47 PM
I don't think it is detecting a finished render message. Just using the remote post effect to launch an app, which is what the remote post effect does.

You probably won't be able to do it in COFFEE, but in C++ should be pretty doable.

http://www.plugincafe.com/forum/display_topic_threads.asp?ForumID=4&TopicID=3294&SearchPagePosition=2&search=render&searchMode=allwords&searchIn=Topic&forum=0&searchSort=dateDESC&ReturnPage=Search

georgedrakakis
10-31-2008, 11:06 PM
tnx again for the info.
it sounds more complicated than i thought.

CGTalk Moderation
10-31-2008, 11:06 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.