Jump to content

Store the frame as some variable?


Juzwa

Recommended Posts

Hi, 

 

I've been scripting in maxscript for a very long time and I know this is very easy to do in a script. However I'm still very new to VEX and I learn it very slowly, mainly because it's completely different from maxscript.

 

Anyways, what I want to achieve is to store a frame number at the change of some parameter. This is a topic I tried to do this in VOPs http://forums.odforce.net/topic/22113-vops-get-and-store-frame/

 

I'm completely lost and tired right now and I think it's time to spend some time to learn VEX, because I'm sure this can be done in just a few lines. I think it is too complecated for the VOPs. But I might be wrong. If you have any ideas how to do this in VOPs I'm very happy to see some examples.

 

So this is my funny and probably completely wrong syntax code:

f@s1 = point(opinputpath(".", 0), 0, "overdriveClamp", 0); // my attribute from the original node
f@s2 = point(opinputpath(".", 1), 0, "overdriveClamp", 0); // my attribute from offset (-1) node
f@t = point(opinputpath(".", 0), 0, "Time", 0); //Current time of the original node

if (s1!=s2) do // change detection
{
    f@my_x = t  // keep the frame at the change
}

What I want this to do is to take two offset attributes just to detect a change (the attribute is changing ON/OFF 0/1) and if the change is deteced, store the frame at which this change happend, thats all :)

 

Here is the file I'm using (attachment).

 

Ofcourse I get errors because I have bad syntax, as I said I don't know VEX well ("Time" as an attribute, probably this is not how I should be doing this). But you have the idea what I have in mind.

temp.hip

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