acidbubbles / vam-timeline

Advanced and intuitive keyframe animations for Virt-A-Mate
GNU General Public License v3.0
75 stars 17 forks source link

A few things #35

Closed via5 closed 4 years ago

via5 commented 4 years ago

When selecting an animation, don't sample if vam is frozen

This adds a check for freezeAnimation in SelectAnimation(). It doesn't prevent sampling when moving the scrubber, which I think should still work because it's a manual user input. This just avoids jumps when selecting animations.

Don't clear the clipboard when there are no keyframes at the current time

I added an Empty property to AtomClipboardEntry that returns true if all lists are empty. When that happens, I log a message similar to "Clipboard is empty" and do nothing. This prevents from clearing the clipboard if there's nothing to cut or copy.

Select controller when right-clicking the button in the dope sheet

I added a new SelectInVam() in IAtomAnimationTarget. It's implemented as a no-op in AnimationTargetBase, but FreeControllerAnimationTarget overrides it to select the controller. I chose the name to avoid confusion with selection within Timeline.

There are two new events in Clickable to distinguish between left and right clicks, which were both firing the same onClick event, but I kept onClick as-is to keep the old behaviour for everything else. I also changed the "Select" button in ControllerTargetFrame to call the new function.

via5 commented 4 years ago

Agh, sorry for using tabs.