Jump to content

Set a value pre Primitive


Recommended Posts

Hi there.

I have an effect that triggers on a frame. This effect will happen on each primitive. I have an attribute on the primitive that says which frame the effect triggers.

My problem is that I dont know how to change that attribute for each Primitive. Right now I have something like this.

@effectTrigger = 10;

The effect triggers for all primitives on frame 10. What I would like to know how to do is something like this.

@effectTigger(PRIM number 0) = 10;

@effectTigger(PRIM number 1) = 13;

@effectTigger(PRIM number 2) = 23;

@effectTigger(PRIM number 3) = 48;

Cheers

Edited by revelationsr
Link to comment
Share on other sites

You can always use an AttributeWrangle in Primitive mode to set specific values.

// Set default value first.
@effectTigger = 10; 

// Override special cases.
if (@primnum == 1) {@effectTigger = 13;} 
if (@primnum == 2) {@effectTigger = 23;} 
if (@primnum == 3) {@effectTigger = 48;} 

 

Edited by Atom
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...