Jump to content

How To Cook My Sop When A Dependent Sop Changes


Recommended Posts

Hi,

My Sop(sopA) has a string field that takes a path to a different sop(sopB).

I use this path to query different parameters on sopB and use these

values in sopA. In order to get at these values I create

a string with a "ch()" command and run it like this:

OP_CommandManager *mgr = OPgetDirector()->getCommandManager();

mgr->execute( my_cmd.c_str(), now, &output);

This works great. The problem I'm having is that when a parameter

value on sopB changes I need sopA to recook. Is there a way to do this?

Many thanks

L

Link to comment
Share on other sites

HI Ed,

thanks for the reply, I know you're busy

but I got some follow up questions:

How do I go about getting values for sopA and sopB?

I'm guessing I can use "this" in place of sopA?

And for sopB, is there a function that returns an OP_Node pointer

given a string with the path to the node? And if so will a relative

path work as well?

FYI I've also pinged support with this question

Many, Many thanks and much gratitude

L

Link to comment
Share on other sites

figured it out:

OP_Node *thisSop = OPgetDirector()->findNode(sop_path);

OP_Node *chSop = OPgetDirector()->findNode(UT_String(path.c_str()));

if(chSop!=NULL && thisSop!=NULL){

thisSop->addExtraInput(chSop, OP_INTEREST_DATA);

}

L

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