This is my current script:
Dim Wheel As xpBaseObject
Dim EndFrame As xpTextObject
If Not Self.GetObjectByName("Row Wheel", Wheel) Then Exit Sub
If Not Self.GetObjectByName("End Frame", EndFrame) Then Exit Sub
Dim endFrameValue As Integer
If Integer.TryParse(EndFrame.Text, endFrameValue) Then
Wheel.SetKeyFrameRotation(200, 0, 0, endFrameValue)
Wheel.SetKeyFrameTCB (200, 32, 1, 4, 1)
End If
In the layout, it plays out properly but when I play in sequence, the ending jumps to the last frame instead of slowing. I put a project file here if you'd have any insight.
------------------------------
Emilio Lopez
------------------------------
Original Message:
Sent: 12-01-2024 15:18
From: Zachary Fradette
Subject: Scripting A Key Frame Change
What does your script look like currently? Are you using SetKeyFrameValueTCB (or SetKeyFrameVectorTCB)?
------------------------------
Zachary Fradette
United States
------------------------------
Original Message:
Sent: 11-29-2024 22:11
From: Emilio Lopez
Subject: Scripting A Key Frame Change
I should be able to get a test file but I'm using this to create a wheel and I want the wheel to slow down at the end of the rotation, using the Bezier. However, this script has the wheel end on the last frame instantly. No slow down, no Bezier. Is there a way to add a Bezier to this script?
------------------------------
Emilio Lopez
Original Message:
Sent: 11-28-2024 06:34
From: Simon Redmile
Subject: Scripting A Key Frame Change
Do you have an example of what you would like the motion to look like and how it is behaving in XPression that you don't like as a comparison?
------------------------------
Simon Redmile
Senior Graphic Programmer & Designer
Ross Video
Bristol United Kingdom
Original Message:
Sent: 11-27-2024 23:46
From: Emilio Lopez
Subject: Scripting A Key Frame Change
I've tried TCB Spline and Bezier Spline but when it gets to the end of the animation, it stops suddenly without taking the spline. In the SDK Help file, it says that I should be able to use "Interpolation As KeyInterpolation = 0" but I'm struggling with how to write it as a script.
------------------------------
Emilio Lopez
Original Message:
Sent: 11-25-2024 16:16
From: Simon Redmile
Subject: Scripting A Key Frame Change
Do you try playing with TCB keyframe type, you have bias and tension etc.
------------------------------
Simon Redmile
Senior Graphic Programmer & Designer
Ross Video
Bristol United Kingdom
Original Message:
Sent: 11-22-2024 20:46
From: Emilio Lopez
Subject: Scripting A Key Frame Change
This works! Thank you! I also had set up a Bezier Spline on the keyframes. Would you know how to maintain the spline? In the SDK help, in says I should be able to add
How would I be able to add this to the script to keep the Spline? Thank you in advance
------------------------------
Emilio Lopez
Original Message:
Sent: 11-20-2024 01:40
From: steve diaz
Subject: Scripting A Key Frame Change
Hello
The errors are due to uninitialized variables and syntax issues.
Dim Wheel As xpBaseObject
Dim EndFrame As xpTextObject
If Not Self.GetObjectByName("Row Wheel", Wheel) Then Exit Sub
If Not Self.GetObjectByName("End Frame", EndFrame) Then Exit Sub
Dim endFrameValue As Integer
If Integer.TryParse(EndFrame.Text, endFrameValue) Then
Wheel.SetKeyFrameRotation(180, 0, 0, endFrameValue)
End If
This should resolve your issues.
Thank you !
------------------------------
steve diaz
Software Developer
Walmart