Graphics

 View Only
  • 1.  Help with .SetKeyFrame

    Posted 05-22-2014 22:20
    I'm experimenting with .SetKeyFrame and I'm having trouble getting it to work.

    Specifically I'm trying to set two keyframes for different X axis coordinates. So far I've gotten this:

    Dim MoveGroup as xpBaseObject

    Self.GetObjectByName("MOVE GROUP", MoveGroup)

    MoveGroup.SetKeyFrame(0, ******)

    MoveGoup.SetKeyFrame(30, *******)

    I tried using the help doc to figure this out, but I'm not sure what to put in the ****** areas. I know that I need to tell it which key channel to define (X Position's value = 1) and then I need to give the X axis a value, but I can't get it right. Anyone know what I'm missing and/or doing wrong? Thanks in advance!

    BTW I'm working on Xpressions 5.5


  • 2.  RE: Help with .SetKeyFrame

    Posted 05-23-2014 00:06
    You need to retrieve the animation controller object and set the keyframes inside of it rather than trying to set keyframes directly to a base object. See the thread from just a day or two ago when I posted some sample code for WDAY.

    #XPression


  • 3.  RE: Help with .SetKeyFrame

    Posted 05-23-2014 00:21
    Here is a more complete example (driven by datalinq).. This scene dynamically builds keyframes in an animation controller to move names in a scoreboard list into a sorted order. It's a bit complicated but you should be able to pull out the functions you need to call to set keyframes from it..

    The script is in the OnRender script of this scene.

    https://na11.springcm.com/atlas/Link/Document/12442/9dafe6f2-2704-e311-a16d-d89d67143433/33889acd-0fe2-e311-8d7c-d89d67132a6d

    This sample was written before it was possible to put a script directly on the scene director, that's why it is in the OnRender. It would be better to put this on the scene director instead..

    #XPression


  • 4.  RE: Help with .SetKeyFrame

    Posted 05-28-2014 00:48
    Did you figure it out Kevin?

    #XPression