Hi everyone.
I'm trying to make a shelf tool to previsualise the breaking of a dop-object that has been set to be breakable.
I started out with the sop-part, which was rather easy. Just create a scatter, a voronoifracturepoints, a voronoifracture and a explodedview and automaticelly wire them in the right way and set a couple of parms on them to get a preview.
But that's just part 1.
Now of course i could add another shelf tool where i ask the use to select the sourceNode (in sops) and the targetNode (the fractureparms node in dops) and make all the relevant parameters relative references from source to target.
But this must be possible to do in just one single step.
So what i need now is to be able to select the RBD-object similar to anything in sops with toolutils.sceneViewer().selectedObjects()
When i have this RBD-object, i should be able to retrieve the node that is in the SopPath parameter and the fractureparms node is directly beneath it so there should be a way to get a hold of that one as well.
Come to think of it. I can't be 100% sure the next node is the fractureparms node so if i might have to go down the branch and select the first node of the “Voronoi Fracture Configure Object” type.
How would i check for this type?
As you can see, i could use some help. I promise to post the code here once i've got i all figured out though. :-)