nestumkiller Posted June 9, 2008 Share Posted June 9, 2008 (edited) Hi! I'm wondering the following. I have a camera object on which I attach a curve path object. If I delete the curve object the camera automatically updates. I need this sort of behavior as I have a situation where a master node (derived from OBJ_Null) is the link to a bake format. And other nodes, like SOP for example, point to this one. So if I delete the master node I want the dependent nodes to be updated (throw an error). Any clues about this? Thanks guys! P.S. - In the SOP's case is not a big deal as they copy the geometry, but later I'll want to add cameras an so... Edited June 9, 2008 by nestumkiller Quote Link to comment Share on other sites More sharing options...
edward Posted June 9, 2008 Share Posted June 9, 2008 Are these custom SOPs? If so, they need to call addExtraInput(OP_DATA_INTEREST, obj_node) and make sure to do right thing when obj_node is NULL. Quote Link to comment Share on other sites More sharing options...
nestumkiller Posted June 10, 2008 Author Share Posted June 10, 2008 Are these custom SOPs? If so, they need to call addExtraInput(OP_DATA_INTEREST, obj_node) and make sure to do right thing when obj_node is NULL. Yes, they are custom ones. By the way, I call that code inside cookMySop() and I start having my node out of date after I change something on the object I'm pointing to. The SOP basically extracts pieces of geo from the other node, and when I change the scene the SOP all shows the previous one. So, I noticed the existence of clearExtraInputs(), which seems to make it work fine. Do you know why? This mechanism seems like a kind of Listener pattern... is it something like this? Anyway, thanks a lot Ed! Cheers Quote Link to comment Share on other sites More sharing options...
edward Posted June 10, 2008 Share Posted June 10, 2008 Yes, they are custom ones. By the way, I call that code inside cookMySop() and I start having my node out of date after I change something on the object I'm pointing to. From your description it sounds like you're dependent on a different SOP, not an object since you're extracting geometry from a SOP. Then make sure that you're doing addExtraInput() with the other SOP node. Anyhow, it sounds like its behaving as it should since changing a parameter on the other node changes its data, which in turn means that your extract node needs to recook. Quote Link to comment Share on other sites More sharing options...
nestumkiller Posted June 10, 2008 Author Share Posted June 10, 2008 From your description it sounds like you're dependent on a different SOP, not an object since you're extracting geometry from a SOP. Then make sure that you're doing addExtraInput() with the other SOP node. Anyhow, it sounds like its behaving as it should since changing a parameter on the other node changes its data, which in turn means that your extract node needs to recook. The other objecyt is not actually a SOP but a OBJ_Null-derived object. Since it represents more than geometry (cams, lights, etc...) I decided to code it at that level. Do I need to also add the addExtraInput() to that node (when you say "Then make sure that you're doing addExtraInput() with the other SOP node")? Having cross-references? Thanks once again Ed Quote Link to comment Share on other sites More sharing options...
edward Posted June 10, 2008 Share Posted June 10, 2008 I'm confused about your setup then. In anycase, here's how it works generically. Suppose we have node_A which uses data created by node_B. Then in node_A's cook method, it needs a addExtraInput(OP_DATA_INTEREST, node_ call. Quote Link to comment Share on other sites More sharing options...
nestumkiller Posted June 10, 2008 Author Share Posted June 10, 2008 I'm confused about your setup then. In anycase, here's how it works generically. Suppose we have node_A which uses data created by node_B. Then in node_A's cook method, it needs a addExtraInput(OP_DATA_INTEREST, node_ call. Lol. Sorry if I wasn't clear. Well, it's pretty simple, I have a custom importer node, derived from OBJ_Null which acts as a bake format importer. Then, the SOP that I mentioned, when connected to the importer, gets the geo. Anyway, I did what you said, and it's working just fine . Thanks a lot for all the help. It's pretty hard to get documentation on HDK :S (as everyone knows...). Cheers 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.