Jump to content
Sign in to follow this  
Masoud

I want to retrieve a ramp value from some selected edges...

Recommended Posts

Hello;

How can I retrieve a (ramp) attribute value (like the “curveu” attribute in "Resample SOP"), from some selected edges?

I mean a (ramp pos) attribute value from 0 to 1, from the start of some selected edges to the end of that selection.

 

Thanks for helping.

Ramp.jpg

Ramp.hip

Share this post


Link to post
Share on other sites
Posted (edited)

sidefx labs>edgegroup_to_curve1>resample ?

prolly need to attribtransfer back to orig geo...

dunno if this suits you...note the other pts not on the curve will have curveu = 0

vu_Ramp.hiplc

Edited by Noobini

Share this post


Link to post
Share on other sites

Hi " Vusta ",

Thank you for your reply.

Your solution works, but I want to use the VEX functions...

Share this post


Link to post
Share on other sites

expandpointgroup() would enroll points in the order you had them selected.

 loop_group.jpg.bcd95448eab4dcf053633142fdb79874.jpg

int pts[] = expandpointgroup(0, 'loop');
int num = len(pts);
foreach(int i; int pt; pts){
    float u = i / float(num - 1);
    setpointattrib(0, 'u', pt, u, 'set');
}

expand_group.hipnc

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×