Atom Posted February 5, 2016 Share Posted February 5, 2016 (edited) Hi All, I have an attribute wrangle inside the remove_broken SOP Solver of the Glue constraint system. I am running over primitives. The relationship geometry does have a name field that identifies which pieceX of my fracture object that the glue bond is constraining. Here is what I want to do... I want to break a single glue bond, using remove prim() and then assign a velocity to the piece that bone was constraining. The velocity attribute exists on the points of the named piece. All the VEX set attribute functions accept geoself() or an integer as the first parameter handle. But all I have is a string path to the geometry I want to modify. string handle_path = "op:/obj/AutoDopNetwork:sphere_object1/piece0"; How can I turn that string path into an integer handle I can pass to setpointattrib? I can't locate any function in the help that returns a handle to named geometry. Is there another way to do this? Edited February 5, 2016 by Atom Quote Link to comment Share on other sites More sharing options...
f1480187 Posted February 7, 2016 Share Posted February 7, 2016 Handles and path signatures exists for reading functions, all writing performs over inputs, and, as stated here, handle argument there for the future compatibility. All writing handles are zeros at this time, I guess, because of writing into zeroth input. Quote Link to comment Share on other sites More sharing options...
Malf Posted February 7, 2016 Share Posted February 7, 2016 Hi Atom. If I understand your goal correctly you want to give the pieces which have just had their constraints broken some velocity? If so here is an example of one way to go about it, sorry if it isn't what your after. I believe your question about the 'geohandle' input in vex expressions was answered in the previous post. Cheers Jake. glueVel.hipnc Quote Link to comment Share on other sites More sharing options...
Atom Posted February 7, 2016 Author Share Posted February 7, 2016 (edited) Thanks for the replies. @F1: I guess it can't be done at this time. @Jake: Thanks for the example file, that is close. I was able to modify it to affect only a single piece by setting the Pattern on static_grp (* ^55). Then I added an Impulse force in the direction that I wanted to extract the piece. I used an expression to switch between Impluse and Gravity. After a certain frame count they flip-flop so Impulse extracts the piece then Gravity takes over. ap_MALF_glueVel_REVISED.hipnc Edited February 7, 2016 by Atom 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.