Jump to content

how to quickly bypass group of operators?


Recommended Posts

HI, I am trying to understand how to bypass/unbypass a list of operators, so that I can eaily switch from a slow version of my scene to a fast one. I would like to easily add operators to this list. I was thinking of making groups of them, as there is a button allowing to manage this for all operators in it, but..I would like this to be done automaticly by script, like before a render. And, althought you can change the flag states for any operators with "opset", I found no equivalent for groups. Why is this so?

does anyone has a solution for this?

At first, I was updating a script containing one by one all operators I wanted to bypass. but updating this script is not really handy. I was also thinking about putting a specific prefix for those operators, so that the cript could easily find them, but I don't really like that.

so, any help or advice will be apreciated! :)

Link to comment
Share on other sites

I know some people like to use switch operators in conjunction with environment variables.

set HIRES = 1

Then in your switch OPs have the switch parameter $HIRES.

So when your doing tests or animating your have set HIRES = 0, when your render set HIRES = 1

jim.

Link to comment
Share on other sites

yes, I am doing this too. this is really useful, but it means you have to put a switch for all OPs you want to bypass or not. this can make the graph quite heavy. But maybe it is me who is not really organised :).

So I was looking for another solution.

And I am so much surprised not to find an equivalent of "opset" for groups...

Link to comment
Share on other sites

And, althought you can change the flag states for any operators with "opset", I found no equivalent for groups. Why is this so?

does anyone has a solution for this?

Loop through each OP in a group and turn on the bypass flag.

foreach obj (`execute("opgls -L")`)
opset -b on $obj
end

jim.

Link to comment
Share on other sites

You can use the above in conjunction with the Pre-Render Script. Which you can specify in the Scripts Tab in the Mantra Output Driver.

You end the location of your turn_on_hires_objects.cmd and right before the render it will run the script. It works, I just tried it. :D

jim.

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...