static Posted June 26, 2009 Share Posted June 26, 2009 (edited) So I have a post render script on a mantra node (named 'test_singleFrames') that edits the frame range and renders again (trying to render single frames in a batch mode). But when it reaches the callback script, I get a warning/error: test_singleFrames:Render - Recursion in parm callback Just off the top of anyone's head, is it possible to get past this detection? I'm trying to run a somewhat recursive function ...obviously. The code for the callback script is as follows: def isolate_frameRange(frames,node): ''' frames => list of frames to render, node => hou.Node() for rop Edits the mantra nodes frame range and renders ''' nextFrame = frames[0] remaining = '' node.parm('f1').set(nextFrame) node.parm('f2').set(nextFrame) if len(frames) > 1: #<--------------------- basically the recursion limit for f in frames[1:]: remaining += '%s,' % f remaining = remaining[:-1] post_script = 'import test;test.isolate_frameRange([%s],hou.pwd())' % remaining node.parm('postrender').set(post_script) node.parm('execute').pressButton() #<------ assuming this is the culprit for that recursion problem else: print '...Render Completed' Of course, if there's a better way to go about batch rendering single frames, I'm all ears EDIT: Well I replaced some of the code so it would just spawn a new node and render from it, rather than trying to repeatedly render the same node over and over... and the recursive error went away. Edited June 26, 2009 by static Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.