Hi!
I recently started writing scripts and I'm currently writing one to copy and past the pan crop settings.
But there's a problem:
The coordinates and rotation are copied correctly, but I can't apply them correctly.
Do you have any tips on how to apply those correctly?
This is what I tried:
(C# Code, "events" are the selected VideoEvents)
for (int i = 0; i < events.Count; i++)
{
events[i].VideoMotion.Keyframes[0].Bounds = new VideoMotionBounds(
topLeftX, topLeftY, topRightX, topRightY, bottomRightX, bottomRightY, bottomLeftX, bottomLeftY);
events[i].VideoMotion.Keyframes[0].Center.X = rotationCenterX;
events[i].VideoMotion.Keyframes[0].Center.Y = rotationCenterY;
events[i].VideoMotion.Keyframes[0].Rotation = rotation;
}
I recently started writing scripts and I'm currently writing one to copy and past the pan crop settings.
But there's a problem:
The coordinates and rotation are copied correctly, but I can't apply them correctly.
Do you have any tips on how to apply those correctly?
This is what I tried:
(C# Code, "events" are the selected VideoEvents)
for (int i = 0; i < events.Count; i++)
{
events[i].VideoMotion.Keyframes[0].Bounds = new VideoMotionBounds(
topLeftX, topLeftY, topRightX, topRightY, bottomRightX, bottomRightY, bottomLeftX, bottomLeftY);
events[i].VideoMotion.Keyframes[0].Center.X = rotationCenterX;
events[i].VideoMotion.Keyframes[0].Center.Y = rotationCenterY;
events[i].VideoMotion.Keyframes[0].Rotation = rotation;
}