friedasparagus Posted June 25, 2018 Share Posted June 25, 2018 Hello out there, I've been taking a good hard look at the SOP_NodeVerb API, and was wondering whether anyone had any pointers on best practices for calling certain functions only when the input geometry has changed. In my case this building a GEO_PointTree and a GEO_DetachedHedgeInterface, the result of which I've been storing in the subclassed SOP_NodeCache. I managed to get something working using COOK_GENERIC and DEP_MicroNode to check when the input node had last been visited to decide whether or not to run cookInputs() and update the cache. But it feels hacky and horrible There's a strong possibility that I've over-complicated things here, and just wanted to reach out in case anyone had any 'patterns' to hand for this before I go down any other blind alleys Cheers! Henry Quote Link to comment Share on other sites More sharing options...
MrScienceOfficer Posted June 25, 2018 Share Posted June 25, 2018 Does the SOP_WindingNumber sample not show what your looking for? A GU_Detail is a collection of attributes(like a position attribute but also for topology) so when your asking if a geometry has changed, your really asking what attributes in the GU_Detail have changed. All attributes are tracked with GA_DataId, so caching the data id of the attribute you're interested in and checking that against the incoming geometry will allow you to check for any relevant changes. The SOP_WindingNumberCache::update3D function in particular seems to show a way to do what your describing. 1 Quote Link to comment Share on other sites More sharing options...
friedasparagus Posted June 25, 2018 Author Share Posted June 25, 2018 Ah, thanks MrScienceOfficer! I think I've looked at the same thing for too long and stopped actually seeing... That does indeed look like what I was looking for. 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.