@xcxz-a, there will be some limitations. This version only works in Double2D parameters (i.e. x,y positions) but should also work with Double parameters with some small changes (possibly used for "size" changes?). As I said, right now it's hard coded to the "second and third keyframe" but does work well going between them. I've moved them around and it still works. I think that covers everything in your video on 5/28. For your last video on 5/29, we'd need an "invert" option.
So the next step would be to open it up to using any keyframes. I can think of two options for selecting those:
1. Your suggestion of using the cursor and take the first ones left and right of the cursor.
2. Listing all of the available keyframes and choosing them from a list
I have also converted all of the functions on the website you listed so we can also add a selection of which one to use in the final version.
This version only works in Double2D parameters (i.e. x,y positions)
@jetdv Maybe X and Y positions can be split into two ordinary parameters? We can deal with X and Y separately. That would be easier.
1. Your suggestion of using the cursor and take the first ones left and right of the cursor.
This will be the most intuitive and convenient way!
I have also converted all of the functions on the website you listed so we can also add a selection of which one to use in the final version.
This is awesome, and if we were allowed to input our own functions, the script would function very close to expressions of After Effects! We can make a lot of MG animations with this script!
@xcxz-a, that's what a "Double2D" is! It's an X,Y parameter. You have to use the parameters the effect uses. And they X and Y are being dealt with separate. I'm calculating the "X" value and then I'm calculating the "Y" value all based on what it should be at this "Frame".
The "X" value is moving from "the start X value" to "the end X value" over time. In this case, if the "X" position did not move, it would be like dropping a ball straight down and it just bouncing until the ending frame.
The "Y" value is calculated by the function and getting "the value for this frame".
So I think the X and Y are being handled correctly. I already have four tutorials created on this and I guess the next step will be to create an actual working compiled script with a form.
As for adding your own functions, I'd need more details on that - that might not be a quick proposition.
@xcxz-a, I see there needing to be 6 steps to go through before adding the keyframes (in this first version):
1. Find the (first) selected event
2. Select the effect on that event to be used (if that event has multiple effects applied)
3. Select the property that is to be changed on that effect (will list all available properties that can be changed)
4. Verify there is a keyframe on both the left and right of the cursor (once we know which effect and which property)
5. Select the "easing" type (we can have 30 choices right now)
6. Apply the "easing" keyframes
So I'm looking at having a button to do number 1 that will then show information about the selected event and will automatically fill in a list box of possible effects. You would then select the effect for number 2 which would automatically fill in a list box of possible parameters. You would then select the desire parameter for number 3 which would then verify the necessary keyframes exist. Then select the "easing" type from a list box and finally tell it to apply the keyframes.
Thoughts on the process? Ideas on what the screen should look like?
I see there needing to be 6 steps to go through before adding the keyframes (in this first version):
1. Find the (first) selected event
2. Select the effect on that event to be used (if that event has multiple effects applied)
3. Select the property that is to be changed on that effect (will list all available properties that can be changed)
I always thought that once the keyframe lane was selected, there would be a scripting API that would tell you the current event, the FX name, the parameter name. Isn't that true? I don't know much about scripts.
4. Verify there is a keyframe on both the left and right of the cursor (once we know which effect and which property)
Maybe we can get all the keyframe times for the current parameter, subtract playhead's time, and pick the largest of the negative values, and the smallest of the positive values, and those two are the keyframes we're looking for.
5. Select the "easing" type (we can have 30 choices right now)
As to easing icon of that list , can go to that website for screenshots. It seems to workable.
I always thought that once the keyframe lane was selected, there would be a scripting API that would tell you the current event, the FX name, the parameter name. Isn't that true? I don't know much about scripts.
Maybe we can get all the keyframe times for the current parameter, subtract playhead's time, and pick the largest of the negative values, and the smallest of the positive values, and those two are the keyframes we're looking for.
5. Select the "easing" type (we can have 30 choices right now)
As to easing icon of that list , can go to that website for screenshots. It seems to workable.
1. No, I can find the "selected" event but a script would have no clue which of multiple effects or which of multiple parameters you wanted to adjust. A script cannot see that you have an effect window open and the only place to get the "cursor" from will be the timeline.
2. Not following your largest and smallest numbers. You have to pick specific keyframes. I can get the cursor position on the timeline and extrapolate that to a position inside the event to get the keyframe left and right of the timeline cursor position. If you have the effect window open, I can't see the cursor on that timeline (if it's different that the main timeline cursor - which is possible). The other option would be to list the all the keyframes and let you pick the first one (and the "last" one would be the "next" one
3. I think the images could be added in (maybe not on the initial test).
@xcxz-a, you need TWO keyframes and it will go from the first one to the second one. But I could list keyframes (all but the last one) and let you pick from the list. Then it could go from the selected keyframe to the "next" keyframe.
Or, if you wanted to use, say, from keyframe 2 to keyframe 5, (overwriting keyframes 3 and 4), I could let you choose both the starting and ending keyframes from a list. Bottom line, I need a starting and ending "value". If you started on the last keyframe, where do I go TO?
you need TWO keyframes and it will go from the first one to the second one. But I could list keyframes (all but the last one) and let you pick from the list. Then it could go from the selected keyframe to the "next" keyframe.
When a parameter has many keyframes (e.g., 6 or 7), select two from the keyframe list, which will take us much time to compare and count.
Or, if you wanted to use, say, from keyframe 2 to keyframe 5, (overwriting keyframes 3 and 4), I could let you choose both the starting and ending keyframes from a list. Bottom line, I need a starting and ending "value". If you started on the last keyframe, where do I go TO?
We can select a OFX keyframe, And easing will be applied between that keyframe and the next one; If there is no keyframe after that keyframe, we can throw a error/notice. This may be a good plan!
@jetdv Cool! Can we click the keyframe in OFX lane to get the current event , current FX, current parameter & current_next keyframe range by scripting api?
@jetdv Cool! Can we click the keyframe in OFX lane to get the current event , current FX, current parameter & current_next keyframe range by scripting api?
@xcxz-a No. As I previously said, I can't see anything on the VideoFX window. I have to be able to get that information from outside that window which is why I designed the screen the way I did. At least I do have it automatically selecting the keyframe range around where the cursor is located. But knowing what effect and what parameter is impossible to get without specifically asking as I am doing on this screen.
@xcxz-a, at this point it appears to be working very well. I'm creating an entire series of tutorials from this post which will start in about a 10 days. They start with our "proof of concept" examples all the way through creating this custom command.
@jetdv This tutorial will make a lot of sense because it will not only cover the knowledge, but also finish up with a useful feature. It makes up for what Vegas lacks. If you could extend that functionality to Pan, Crop, Mask, Track Motion, it would be an aircraft carrier.
If you could extend that functionality to Pan, Crop, Mask, Track Motion, it would be an aircraft carrier.
@xcxz-a, it could certainly be expanded to other types of keyframes. Want to finish what's been started here first and then that can be discussed. On these other options, what are you wanting to control? Just the position as shown in the first proof of concepts videos in this thread?
@xcxz-a, In looking at this, changing the "rotation center" x and y would be fairly easy. However, there is no "position center" as shown on the Pan/Crop display - there's only TopLeft, TopRight, BottomLeft, and BottomRight X and Y values. It appears you would need to modify all four corners to properly work. Previously, I was just taking the first position and "moving" from that one position for each of the additional keyframes but that does not make sense if you are going from one preset position to another one. I could easily do one of the four corners but you'd really need to do all four corners to get things to work right.
As far as masks are concerned, a script cannot access a mask created in Pan/Crop.
Ok, the 8th tutorial in this series has been released this week. It also includes the free custom command created in this series which anyone can download and use. Let me know what additional changes that might be possible to make to this tool. I've already added a Pan/Crop parameter change allowing a change of these parameters:
Rotation Top Left Position X Top Left Position Y Top Left Position X and Y Rotation Center X Rotation Center Y Rotation Center X and Y