Jump to content

Mantra loop rendering


Recommended Posts

Hi all!

It is possible to render in loop?

For example I wrote some post render script which start mantra again. But I got warning - Recursion in parm callback.

This is Mantra1/postrender script:

i = hou.parm("/obj/control/num").eval()
i+= 1
if i < 10: 
    hou.parm("/obj/control/num").set(i)
    hou.parm("/out/Mantra1/execute").pressButton()

/obj/control/num is for to switch geometry. I want to switch geometry and render it. In this case I have 10 : /obj/geometry0 ... /obj/geometry10

If I press button Render - Mantra1 start once.

Script executed successes but last string. It seems merely ignored.

After render first frame script is started but without continue.

Thanx,

Sergiy

Edited by zaren
  • Like 1
Link to comment
Share on other sites

Hi all!

It is possible to render in loop?

For example I wrote some post render script which start mantra again. But I got warning - Recursion in parm callback.

This is Mantra1/postrender script:

i = hou.parm("/obj/control/num").eval()
i+= 1
if i < 10: 
    hou.parm("/obj/control/num").set(i)
    hou.parm("/out/Mantra1/execute").pressButton()

/obj/control/num is for to switch geometry. I want to switch geometry and render it. In this case I have 10 : /obj/geometry0 ... /obj/geometry10

If I press button Render - Mantra1 start once.

Script executed successes but last string. It seems merely ignored.

After render first frame script is started but without continue.

Thanx,

Take a look at the wedge ROP, it renders a ROP node n-times and can update parameters for each itteration.

There is a old video about it on the sidefx.com tutorials pages.

Edited by mawi
Link to comment
Share on other sites

  • 3 months later...
  • 4 years later...

Bump. Wedge ROP is not good enough for what I need. I'm building out a whole custom ROP loop node set, like the For Loop in SOPs. But every way I try to get a parm to re-execute a button's callback script, I get the "Recursion in parm callback" error. Which is annoying, because I know there's a recursion in the parm callback. That's exactly what I want lol. Is there any way around this?

EDIT: I suppose one way would be the Shell ROP, but I'd rather do it all through Python than having extra nodes laying around in my ROP loop.

Thanks,

 

~Chris

Edited by Shalinar
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...