Jump to content

Accessing first and last keyframes of a node.


Symbolic

Recommended Posts

Hi,

I am trying to query a node some where in my scene...

ex: "/obj/curve_pack/sblend1" with a channel "seqctrl"

I am trying to access the first kayframe and the last keyframe values in Frames for a specific channel.

I looked through the help...

I found the "chkeyls" command...

chkeyls /sblend1/seqctrl

and it lists: seqctrl 101 142

which are my first and last keyframes.

But how can I use this in an expression?

ex: automatically setting the input range and the output range of a TimeWrap node.

Thanks.

Link to comment
Share on other sites

now tested:

arg(run("chkeyls /obj/null1/parm"), 1)

arg(run("chkeyls /obj/null1/parm"), 2)

chkeyls is a hscript command and needs run() to output something in an expression

Edited by rdg
Link to comment
Share on other sites

Hi!

Now I am in a new trouble.

:)

The previous command works great with actual keyframes in a channel. You know when it is green (blue) :)

How can I access the first and the last keyframe of a channel that is overridden by a chop.

ex:

* I have two channels on a Null

1: sequence

2:processed_sequence

* channel (1) has an animation going from 1 to 10... just normal keyframes.

* I fetch this channel into chops... strech it and export it to channel (2), which is called in our case "processed_sequence"

So channel (1) is blue (green)

and channel (2) is orange.

I can access channel (1) with:

arg(run("chkeyls ./NULL/sequence"), 1)

arg(run("chkeyls ./NULL/sequence"), 2)

It gives me the results of 1 and 10

I am using these outputs inside a TimeWarp Node which is in the same network with my Null.

But how can I get the same data for channel (2)... which is linked to a chop network...

Thanks.

Link to comment
Share on other sites

can't you just multiply by your streching factor?

I think there is something like $IC and $OC which gives you the first and last keyframes in chops.

You might need to extract them into constant channels and read them from there ...

Link to comment
Share on other sites

  • 3 weeks later...
can't you just multiply by your streching factor?

I think there is something like $IC and $OC which gives you the first and last keyframes in chops.

You might need to extract them into constant channels and read them from there ...

The "arg(run("chkeyls ./NULL/sequence"), 1), arg(run("chkeyls ./NULL/sequence"), 2)" technique is very buggy...

It just do not evaluate properly.

Is there a better way of getting the frame data of the first and the last keyframes? How can I do that in CHOPs... I tried $IC and $OC in an expression CHOP but did not work...

What are the exact variables? (my help is not working :( )

Thanks.

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...