Symbolic Posted December 9, 2008 Share Posted December 9, 2008 Hi, This may sound strange. But I have to do the following. * I have a curve with UV attribute. (0-1) * I scatter n points on the curve (ex: 4 points) * I know the UV attribute for each point: P1 = 0.1 P2 = 0.4 P3 = 0.6 P4 = 0.9 * Somewhere else I have ramp parameter. I need to make something like that: "I have 4 points, create 4 points on the ramp as well and set their position to the corresponding U locations" So I get a ramp with 4 points... set eaxctly at 0.1, 0.4, 0.6, 0.9 Please do not get mad if this sounds creazy! (And I do not know what is going on, but my firefox is not performing splle check anymore! ) Quote Link to comment Share on other sites More sharing options...
rdg Posted December 9, 2008 Share Posted December 9, 2008 (edited) So I get a ramp with 4 points... set eaxctly at 0.1, 0.4, 0.6, 0.9 just some bricks that might help .... from the help: __init__(self, basis, keys, values) >>> lin = hou.rampBasis.Linear >>> hou.Ramp( (lin, lin), (0, 1), (0, 1) ) basis is the interpolation, keys are the keys and values the values ... for p in node.geometry().points(): p.floatListAttribValue("uv") this returns the UV values of your points. the problem here might be that scattering along a curve doesn't necessarily create an ordered sequence of points. Edited December 9, 2008 by rdg Quote Link to comment Share on other sites More sharing options...
Symbolic Posted December 9, 2008 Author Share Posted December 9, 2008 Thanks rdg! I will give it a try... Although my python skills are still very poor. So If I want to have a button around my ramp... something like "Update ramp"... Then I will build my script inside this button? Right? So the script can dive into the sub networks... find the points... get their 0-1 position and transfer this into the ramp? 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.