Jump to content
Marc

hda's and opparm

Recommended Posts

Hey all

So I was under the impression that you could use the opparm expression in an hda? Well, let me rephrase that, it seems like you can, but only if the hda is unlocked, which seems to defeat the purpose.

I must be missing something..

What I have is a ROP inside my digital asset with this opparm expression :

opparm -c `oppwf()`/bakeout_points/starting_points execute

Works great when its unlocked, doesn't work at all when its locked. Is it possible to do this things? And if not, then why not?

Thanks

M

P.S. My first foray into building a serious digital asset and its a little frustrating, I must say.

Share this post


Link to post
Share on other sites

You can render a ROP inside of the subnet if you:

*) use the render command instead of opparming the buttonpress: "render bakeout_points/starting_points"

-or

*) promote the render button to the HDA top level. i havne't done this but i'm sure its possible.

Share this post


Link to post
Share on other sites

That's what I was trying to do with the opparm (promote the button).

From the help :

...The fourth form executes any callbacks associated with a
parameter. If the parameter is a button which executes a
callback, it is possible to use the third form to invoke the
function. Examples of these type of buttons are in the creep
SOP (initialize), and many render output drivers (the render
buttons).

eg. opparm -c /out/mantra1 execute

The problem with doing it the first way is that my ROP is an hda too, so I guess the 'render' button isn't recognised internally as a render button. Who knows.... it definitely doesn't work though.

M

Share this post


Link to post
Share on other sites

we do something like this on a ROPnet:

opparm myROPnet execute ( '!!ch("../someParam")!!' ) trange ( off ) f ( 1 300 1 )

so the execute command will be run whenever the button - "../someParm" is pressed

hope this helps

Share this post


Link to post
Share on other sites

sure, but you can't opparm something if the network is locked. Unless this one is different in some way.

M

P.S. I also just learnt not to duplicate parameters inside the dialog editing thingy. It changes all your channel references to the new duplicated names (for some reason).

argh.

Share this post


Link to post
Share on other sites

Don't try and set it up manually, in the type properties manager click on the plus button next to "create new" and navigate to the render button. This will then set up the link automatically. Only time I've had problems with this is in cops, but I think that might be fixed in the latest build.

Share this post


Link to post
Share on other sites

hmmm...yeah, something must be different in your network...

can you post it?...or make a small eg hda that we can goof around with?

hda's should always be locked...

Share this post


Link to post
Share on other sites
opparm myROPnet execute ( '!!ch("../someParam")!!' ) trange ( off ) f ( 1 300 1 )
hda's should always be locked...

So you run the opparm with your network locked? hmmm ....

Share this post


Link to post
Share on other sites

One tip is to use opsave in a callback rather than linking to a render button. Good for sops and chops. Maybe you could use the normal render command in a callback for other situations where linking to the button doesn't work.

Share this post


Link to post
Share on other sites

ok I'm returning to this topic, since it was meant to address my specific problem while the other one was more of a generic HDA's improvement discussion.

So I think I've figured out why my render button isn't working. I don't know why it works when its unlocked and doesn't work when it's locked... but perhaps its related.

So this is my basic setup.

I have an HDA which will do all of my geometry deformations. Inside that is a ROP network which will be responsible for writing out the relevant geometry to disk.

So inside that ROP network are two ROP's, one is a geometry output node and the other is our custom output node which calls a bunch of scripts to add everything to the database and put the geometry in the correct place on the shottree. And it references the geometry ROP.

I think the problem lies in the fact that this custom node is an HDA too, so inside it is a bunch of networks which make it work (chop, rop etc.).

It seems like my top level dialog script can access the 'execute' button in my first ROP subnet and that's all. Sadly I need to go down another level to the second ROP subnet and hit that execute button. I have a feeling its linked to the 'Forbid Linking Parameters from Outside this Subnet' toggle but I'm not sure. If I turn that off then I get a crapload of warnings and it still ends up not working, so it may not be the reason.

Does this make sense? It's well nigh impossible to get an example file out without sending the custom ROP node...

Thanks

Marc

Share this post


Link to post
Share on other sites

Render buttons on ROPs definately have some issues, I've run into this before. If you want to keep the network locked I'd put an opsave script in the callback for the render button. Basically roll your own. But tell sesi about it not working.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×