Jump to content

addattribute in wrangle node


mawi

Recommended Posts

Hi.

Is there a way to create primitive attributes for each point in a curve containing the point position.

int i;
int np = npoints(geoself())-1;

for (i=0; i <= np; i++)
{
v@p0 = point(geoself(),"P",i);
}[/CODE]

Some thing like this in the attribute wrangle primitive mode but with the @p0 concatinated to @p+"i".

Its almost midnight so bare with my messed up brain...

Link to comment
Share on other sites

I don't think you can do it purely in VEX. You could if you used the addattribute function but that's not available in CVEX.

Are you trying to add all point positions to all primitives, or just the primitives that actually have that point?

In any case you could probably do it in a ForEach SOP where the attribute access has a channel reference to a parameter on the Wrangle SOP:

v@`chs("attributeName")` = ...;[/CODE]

It's gonna be slow though.

Link to comment
Share on other sites

I have x-curves cointaining x-points each.

Now I want primitive attributes (p0,p1,p2,p3...) representing the position of the points in every curve.

I was trying to find a shortcut thru vex, but thinking about it in daylight I might have solved it.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...