2019-12-26 15:33:43 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
This is a significant overhaul to the Curve Editor used by Sequencer which adds a plugin-based architecture and extensibility. New tools and toolbar buttons can be added to all usages of the curve editor via user plugins, and the different views for data can be created modularly so new implementations of the editor can register their own way of drawing their data and the tools should just work. Additionally, you can now write your own filters to operate on curve editor data for custom implementations of smoothing, key generation, etc.
The curve editor supports three view types by default - an absolute view (default, matches old behavior), a stacked view and a normalized view. Stacked views draw each curve separately (so non-overlapping) and normalized against their own min/max values. The normalized view draws all curves overlapping with each one normalized against its own min/max values.
A tree view has been added to help effectively manage large numbers of curves. Selecting curves in the treeview controls which curves are visible in the view area. The treeview also supports pinning curves. These pinned curves will always be visible regardless of your selection in the tree view.
A transform tool and a retiming tool have been implemented (via a plugin) which is enabled by default. The transform tool allows you to do a marquee selection of keys and then translate and scale the positions of these keys. The retiming tool allows you to create a 1 dimensional lattice to adjust the timing of your keys with a linear falloff between each lattice point. These tools work across multiple views at the same time which is especially useful if you are representing one dimensional data (such as event keys) in a view, as it allows you to adjust this data at the same time as your animation curves. A smoothing filter has been implemented (via a plugin) to allow running highpass and lowpass filters on your keys.
Opening the curve editor in Sequencer/UMG now creates a separate dockable tab which can be resized and docked as desired. A time slider has been added to the Curve Editor which is synchronized to the playback time in Sequencer. This allows you to scrub time in the curve editor without having to find the Sequencer window and adjust time there while looking at your keys and previewing your animation in the viewport at the same time.
Rudimentary support has been added for saving and later restoring a set of curves in your current session. This allows you to do a rudimentary copy/paste of entire curves but can also be useful for saving a curve, making adjustments to it and then deciding you want to go back - simply reapply the saved curve! Each curve added supports an intention name (such as "Location.X" or "FieldOfView"), and these intention names will be used when trying to apply curves. This allows you to reliably take all of the curves of a transform on one object and apply them to another object (and ensure that Location.X gets applied to the new Location.X, etc.) this can be helpful if you have a mixed set of curves buffered (such as a location and a field of view). In the event that no curves match by intention you can store and apply a single curve at a time from any intention to any other intention.
The Curve Asset editors (float, vector and color curve assets) have been changed to use the new editor. They support the same treeviews, filtering and tools that the Sequencer editor does. In addition, the Color Curve asset editor adds an additional view which provides a 1 dimensional gradient editor as an easier way to visualize and edit colors instead of the channels individually.
#rb Max.Chen, Andrew.Rodham
#ROBOMERGE-SOURCE: CL 6631811 via CL 6633746
#ROBOMERGE-BOT: (vundefined-6620334)
[CL 6633863 by matt hoffman in Main branch]
2019-05-24 14:42:05 -04:00
|
|
|
|
|
|
|
|
#include "SCurveEditorViewContainer.h"
|
|
|
|
|
#include "SCurveEditorPanel.h"
|
|
|
|
|
#include "SCurveEditorView.h"
|
|
|
|
|
#include "Views/SInteractiveCurveEditorView.h"
|
|
|
|
|
|
|
|
|
|
#include "DragOperations/CurveEditorDragOperation_Tangent.h"
|
|
|
|
|
#include "DragOperations/CurveEditorDragOperation_MoveKeys.h"
|
|
|
|
|
#include "DragOperations/CurveEditorDragOperation_Pan.h"
|
|
|
|
|
#include "DragOperations/CurveEditorDragOperation_Zoom.h"
|
|
|
|
|
#include "DragOperations/CurveEditorDragOperation_Marquee.h"
|
|
|
|
|
|
2022-05-09 13:12:28 -04:00
|
|
|
#include "Styling/AppStyle.h"
|
This is a significant overhaul to the Curve Editor used by Sequencer which adds a plugin-based architecture and extensibility. New tools and toolbar buttons can be added to all usages of the curve editor via user plugins, and the different views for data can be created modularly so new implementations of the editor can register their own way of drawing their data and the tools should just work. Additionally, you can now write your own filters to operate on curve editor data for custom implementations of smoothing, key generation, etc.
The curve editor supports three view types by default - an absolute view (default, matches old behavior), a stacked view and a normalized view. Stacked views draw each curve separately (so non-overlapping) and normalized against their own min/max values. The normalized view draws all curves overlapping with each one normalized against its own min/max values.
A tree view has been added to help effectively manage large numbers of curves. Selecting curves in the treeview controls which curves are visible in the view area. The treeview also supports pinning curves. These pinned curves will always be visible regardless of your selection in the tree view.
A transform tool and a retiming tool have been implemented (via a plugin) which is enabled by default. The transform tool allows you to do a marquee selection of keys and then translate and scale the positions of these keys. The retiming tool allows you to create a 1 dimensional lattice to adjust the timing of your keys with a linear falloff between each lattice point. These tools work across multiple views at the same time which is especially useful if you are representing one dimensional data (such as event keys) in a view, as it allows you to adjust this data at the same time as your animation curves. A smoothing filter has been implemented (via a plugin) to allow running highpass and lowpass filters on your keys.
Opening the curve editor in Sequencer/UMG now creates a separate dockable tab which can be resized and docked as desired. A time slider has been added to the Curve Editor which is synchronized to the playback time in Sequencer. This allows you to scrub time in the curve editor without having to find the Sequencer window and adjust time there while looking at your keys and previewing your animation in the viewport at the same time.
Rudimentary support has been added for saving and later restoring a set of curves in your current session. This allows you to do a rudimentary copy/paste of entire curves but can also be useful for saving a curve, making adjustments to it and then deciding you want to go back - simply reapply the saved curve! Each curve added supports an intention name (such as "Location.X" or "FieldOfView"), and these intention names will be used when trying to apply curves. This allows you to reliably take all of the curves of a transform on one object and apply them to another object (and ensure that Location.X gets applied to the new Location.X, etc.) this can be helpful if you have a mixed set of curves buffered (such as a location and a field of view). In the event that no curves match by intention you can store and apply a single curve at a time from any intention to any other intention.
The Curve Asset editors (float, vector and color curve assets) have been changed to use the new editor. They support the same treeviews, filtering and tools that the Sequencer editor does. In addition, the Color Curve asset editor adds an additional view which provides a 1 dimensional gradient editor as an easier way to visualize and edit colors instead of the channels individually.
#rb Max.Chen, Andrew.Rodham
#ROBOMERGE-SOURCE: CL 6631811 via CL 6633746
#ROBOMERGE-BOT: (vundefined-6620334)
[CL 6633863 by matt hoffman in Main branch]
2019-05-24 14:42:05 -04:00
|
|
|
#include "Widgets/Layout/SBox.h"
|
|
|
|
|
|
|
|
|
|
#define LOCTEXT_NAMESPACE "SCurveEditorViewContainer"
|
|
|
|
|
|
|
|
|
|
void SCurveEditorViewContainer::Construct(const FArguments& InArgs, TSharedRef<FCurveEditor> InCurveEditor)
|
|
|
|
|
{
|
|
|
|
|
SetCanTick(true);
|
|
|
|
|
CurveEditor = InCurveEditor;
|
|
|
|
|
|
|
|
|
|
TimeSliderController = InArgs._ExternalTimeSliderController;
|
2021-02-18 18:13:28 -04:00
|
|
|
MinimumPanelHeight = InArgs._MinimumPanelHeight;
|
This is a significant overhaul to the Curve Editor used by Sequencer which adds a plugin-based architecture and extensibility. New tools and toolbar buttons can be added to all usages of the curve editor via user plugins, and the different views for data can be created modularly so new implementations of the editor can register their own way of drawing their data and the tools should just work. Additionally, you can now write your own filters to operate on curve editor data for custom implementations of smoothing, key generation, etc.
The curve editor supports three view types by default - an absolute view (default, matches old behavior), a stacked view and a normalized view. Stacked views draw each curve separately (so non-overlapping) and normalized against their own min/max values. The normalized view draws all curves overlapping with each one normalized against its own min/max values.
A tree view has been added to help effectively manage large numbers of curves. Selecting curves in the treeview controls which curves are visible in the view area. The treeview also supports pinning curves. These pinned curves will always be visible regardless of your selection in the tree view.
A transform tool and a retiming tool have been implemented (via a plugin) which is enabled by default. The transform tool allows you to do a marquee selection of keys and then translate and scale the positions of these keys. The retiming tool allows you to create a 1 dimensional lattice to adjust the timing of your keys with a linear falloff between each lattice point. These tools work across multiple views at the same time which is especially useful if you are representing one dimensional data (such as event keys) in a view, as it allows you to adjust this data at the same time as your animation curves. A smoothing filter has been implemented (via a plugin) to allow running highpass and lowpass filters on your keys.
Opening the curve editor in Sequencer/UMG now creates a separate dockable tab which can be resized and docked as desired. A time slider has been added to the Curve Editor which is synchronized to the playback time in Sequencer. This allows you to scrub time in the curve editor without having to find the Sequencer window and adjust time there while looking at your keys and previewing your animation in the viewport at the same time.
Rudimentary support has been added for saving and later restoring a set of curves in your current session. This allows you to do a rudimentary copy/paste of entire curves but can also be useful for saving a curve, making adjustments to it and then deciding you want to go back - simply reapply the saved curve! Each curve added supports an intention name (such as "Location.X" or "FieldOfView"), and these intention names will be used when trying to apply curves. This allows you to reliably take all of the curves of a transform on one object and apply them to another object (and ensure that Location.X gets applied to the new Location.X, etc.) this can be helpful if you have a mixed set of curves buffered (such as a location and a field of view). In the event that no curves match by intention you can store and apply a single curve at a time from any intention to any other intention.
The Curve Asset editors (float, vector and color curve assets) have been changed to use the new editor. They support the same treeviews, filtering and tools that the Sequencer editor does. In addition, the Color Curve asset editor adds an additional view which provides a 1 dimensional gradient editor as an easier way to visualize and edit colors instead of the channels individually.
#rb Max.Chen, Andrew.Rodham
#ROBOMERGE-SOURCE: CL 6631811 via CL 6633746
#ROBOMERGE-BOT: (vundefined-6620334)
[CL 6633863 by matt hoffman in Main branch]
2019-05-24 14:42:05 -04:00
|
|
|
|
|
|
|
|
CurveEditor->OnActiveToolChangedDelegate.AddSP(this, &SCurveEditorViewContainer::OnCurveEditorToolChanged);
|
|
|
|
|
|
|
|
|
|
SetClipping(EWidgetClipping::ClipToBounds);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool SCurveEditorViewContainer::ComputeVolatility() const
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FVector2D SCurveEditorViewContainer::ComputeDesiredSize(float) const
|
|
|
|
|
{
|
|
|
|
|
FVector2D MyDesiredSize(0,0);
|
|
|
|
|
|
|
|
|
|
int32 NumStretchPanels = 0;
|
|
|
|
|
for (int32 Index = 0; Index < Children.Num(); ++Index)
|
|
|
|
|
{
|
|
|
|
|
const SBoxPanel::FSlot& Child = Children[Index];
|
|
|
|
|
if (Child.GetWidget()->GetVisibility() != EVisibility::Collapsed)
|
|
|
|
|
{
|
|
|
|
|
const FVector2D& ChildDesiredSize = Child.GetWidget()->GetDesiredSize();
|
|
|
|
|
|
2021-05-17 11:08:42 -04:00
|
|
|
FMargin SlotPadding = Child.GetPadding();
|
This is a significant overhaul to the Curve Editor used by Sequencer which adds a plugin-based architecture and extensibility. New tools and toolbar buttons can be added to all usages of the curve editor via user plugins, and the different views for data can be created modularly so new implementations of the editor can register their own way of drawing their data and the tools should just work. Additionally, you can now write your own filters to operate on curve editor data for custom implementations of smoothing, key generation, etc.
The curve editor supports three view types by default - an absolute view (default, matches old behavior), a stacked view and a normalized view. Stacked views draw each curve separately (so non-overlapping) and normalized against their own min/max values. The normalized view draws all curves overlapping with each one normalized against its own min/max values.
A tree view has been added to help effectively manage large numbers of curves. Selecting curves in the treeview controls which curves are visible in the view area. The treeview also supports pinning curves. These pinned curves will always be visible regardless of your selection in the tree view.
A transform tool and a retiming tool have been implemented (via a plugin) which is enabled by default. The transform tool allows you to do a marquee selection of keys and then translate and scale the positions of these keys. The retiming tool allows you to create a 1 dimensional lattice to adjust the timing of your keys with a linear falloff between each lattice point. These tools work across multiple views at the same time which is especially useful if you are representing one dimensional data (such as event keys) in a view, as it allows you to adjust this data at the same time as your animation curves. A smoothing filter has been implemented (via a plugin) to allow running highpass and lowpass filters on your keys.
Opening the curve editor in Sequencer/UMG now creates a separate dockable tab which can be resized and docked as desired. A time slider has been added to the Curve Editor which is synchronized to the playback time in Sequencer. This allows you to scrub time in the curve editor without having to find the Sequencer window and adjust time there while looking at your keys and previewing your animation in the viewport at the same time.
Rudimentary support has been added for saving and later restoring a set of curves in your current session. This allows you to do a rudimentary copy/paste of entire curves but can also be useful for saving a curve, making adjustments to it and then deciding you want to go back - simply reapply the saved curve! Each curve added supports an intention name (such as "Location.X" or "FieldOfView"), and these intention names will be used when trying to apply curves. This allows you to reliably take all of the curves of a transform on one object and apply them to another object (and ensure that Location.X gets applied to the new Location.X, etc.) this can be helpful if you have a mixed set of curves buffered (such as a location and a field of view). In the event that no curves match by intention you can store and apply a single curve at a time from any intention to any other intention.
The Curve Asset editors (float, vector and color curve assets) have been changed to use the new editor. They support the same treeviews, filtering and tools that the Sequencer editor does. In addition, the Color Curve asset editor adds an additional view which provides a 1 dimensional gradient editor as an easier way to visualize and edit colors instead of the channels individually.
#rb Max.Chen, Andrew.Rodham
#ROBOMERGE-SOURCE: CL 6631811 via CL 6633746
#ROBOMERGE-BOT: (vundefined-6620334)
[CL 6633863 by matt hoffman in Main branch]
2019-05-24 14:42:05 -04:00
|
|
|
MyDesiredSize.Y += SlotPadding.GetTotalSpaceAlong<Orient_Vertical>();
|
|
|
|
|
|
|
|
|
|
// For a vertical panel, we want to find the maximum desired width (including margin).
|
|
|
|
|
// That will be the desired width of the whole panel.
|
|
|
|
|
MyDesiredSize.X = FMath::Max(MyDesiredSize.X, ChildDesiredSize.X + SlotPadding.GetTotalSpaceAlong<Orient_Horizontal>());
|
|
|
|
|
|
2021-07-13 15:30:37 -04:00
|
|
|
if (Child.GetSizeRule() == FSizeParam::SizeRule_Stretch)
|
This is a significant overhaul to the Curve Editor used by Sequencer which adds a plugin-based architecture and extensibility. New tools and toolbar buttons can be added to all usages of the curve editor via user plugins, and the different views for data can be created modularly so new implementations of the editor can register their own way of drawing their data and the tools should just work. Additionally, you can now write your own filters to operate on curve editor data for custom implementations of smoothing, key generation, etc.
The curve editor supports three view types by default - an absolute view (default, matches old behavior), a stacked view and a normalized view. Stacked views draw each curve separately (so non-overlapping) and normalized against their own min/max values. The normalized view draws all curves overlapping with each one normalized against its own min/max values.
A tree view has been added to help effectively manage large numbers of curves. Selecting curves in the treeview controls which curves are visible in the view area. The treeview also supports pinning curves. These pinned curves will always be visible regardless of your selection in the tree view.
A transform tool and a retiming tool have been implemented (via a plugin) which is enabled by default. The transform tool allows you to do a marquee selection of keys and then translate and scale the positions of these keys. The retiming tool allows you to create a 1 dimensional lattice to adjust the timing of your keys with a linear falloff between each lattice point. These tools work across multiple views at the same time which is especially useful if you are representing one dimensional data (such as event keys) in a view, as it allows you to adjust this data at the same time as your animation curves. A smoothing filter has been implemented (via a plugin) to allow running highpass and lowpass filters on your keys.
Opening the curve editor in Sequencer/UMG now creates a separate dockable tab which can be resized and docked as desired. A time slider has been added to the Curve Editor which is synchronized to the playback time in Sequencer. This allows you to scrub time in the curve editor without having to find the Sequencer window and adjust time there while looking at your keys and previewing your animation in the viewport at the same time.
Rudimentary support has been added for saving and later restoring a set of curves in your current session. This allows you to do a rudimentary copy/paste of entire curves but can also be useful for saving a curve, making adjustments to it and then deciding you want to go back - simply reapply the saved curve! Each curve added supports an intention name (such as "Location.X" or "FieldOfView"), and these intention names will be used when trying to apply curves. This allows you to reliably take all of the curves of a transform on one object and apply them to another object (and ensure that Location.X gets applied to the new Location.X, etc.) this can be helpful if you have a mixed set of curves buffered (such as a location and a field of view). In the event that no curves match by intention you can store and apply a single curve at a time from any intention to any other intention.
The Curve Asset editors (float, vector and color curve assets) have been changed to use the new editor. They support the same treeviews, filtering and tools that the Sequencer editor does. In addition, the Color Curve asset editor adds an additional view which provides a 1 dimensional gradient editor as an easier way to visualize and edit colors instead of the channels individually.
#rb Max.Chen, Andrew.Rodham
#ROBOMERGE-SOURCE: CL 6631811 via CL 6633746
#ROBOMERGE-BOT: (vundefined-6620334)
[CL 6633863 by matt hoffman in Main branch]
2019-05-24 14:42:05 -04:00
|
|
|
{
|
|
|
|
|
++NumStretchPanels;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
MyDesiredSize.Y += ChildDesiredSize.Y;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const float PanelHeight = CurveEditor->GetPanel()->GetScrollPanelGeometry().GetLocalSize().Y - 1.f;
|
2021-02-18 18:13:28 -04:00
|
|
|
MyDesiredSize.Y += FMath::Max(MinimumPanelHeight, (PanelHeight - MyDesiredSize.Y) / NumStretchPanels) * NumStretchPanels;
|
This is a significant overhaul to the Curve Editor used by Sequencer which adds a plugin-based architecture and extensibility. New tools and toolbar buttons can be added to all usages of the curve editor via user plugins, and the different views for data can be created modularly so new implementations of the editor can register their own way of drawing their data and the tools should just work. Additionally, you can now write your own filters to operate on curve editor data for custom implementations of smoothing, key generation, etc.
The curve editor supports three view types by default - an absolute view (default, matches old behavior), a stacked view and a normalized view. Stacked views draw each curve separately (so non-overlapping) and normalized against their own min/max values. The normalized view draws all curves overlapping with each one normalized against its own min/max values.
A tree view has been added to help effectively manage large numbers of curves. Selecting curves in the treeview controls which curves are visible in the view area. The treeview also supports pinning curves. These pinned curves will always be visible regardless of your selection in the tree view.
A transform tool and a retiming tool have been implemented (via a plugin) which is enabled by default. The transform tool allows you to do a marquee selection of keys and then translate and scale the positions of these keys. The retiming tool allows you to create a 1 dimensional lattice to adjust the timing of your keys with a linear falloff between each lattice point. These tools work across multiple views at the same time which is especially useful if you are representing one dimensional data (such as event keys) in a view, as it allows you to adjust this data at the same time as your animation curves. A smoothing filter has been implemented (via a plugin) to allow running highpass and lowpass filters on your keys.
Opening the curve editor in Sequencer/UMG now creates a separate dockable tab which can be resized and docked as desired. A time slider has been added to the Curve Editor which is synchronized to the playback time in Sequencer. This allows you to scrub time in the curve editor without having to find the Sequencer window and adjust time there while looking at your keys and previewing your animation in the viewport at the same time.
Rudimentary support has been added for saving and later restoring a set of curves in your current session. This allows you to do a rudimentary copy/paste of entire curves but can also be useful for saving a curve, making adjustments to it and then deciding you want to go back - simply reapply the saved curve! Each curve added supports an intention name (such as "Location.X" or "FieldOfView"), and these intention names will be used when trying to apply curves. This allows you to reliably take all of the curves of a transform on one object and apply them to another object (and ensure that Location.X gets applied to the new Location.X, etc.) this can be helpful if you have a mixed set of curves buffered (such as a location and a field of view). In the event that no curves match by intention you can store and apply a single curve at a time from any intention to any other intention.
The Curve Asset editors (float, vector and color curve assets) have been changed to use the new editor. They support the same treeviews, filtering and tools that the Sequencer editor does. In addition, the Color Curve asset editor adds an additional view which provides a 1 dimensional gradient editor as an easier way to visualize and edit colors instead of the channels individually.
#rb Max.Chen, Andrew.Rodham
#ROBOMERGE-SOURCE: CL 6631811 via CL 6633746
#ROBOMERGE-BOT: (vundefined-6620334)
[CL 6633863 by matt hoffman in Main branch]
2019-05-24 14:42:05 -04:00
|
|
|
|
|
|
|
|
MyDesiredSize.Y = FMath::Max(MyDesiredSize.Y, PanelHeight);
|
|
|
|
|
return MyDesiredSize;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SCurveEditorViewContainer::Tick(const FGeometry& AllottedGeometry, const double InCurrentTime, const float InDeltaTime)
|
|
|
|
|
{
|
|
|
|
|
ExpandInputBounds(AllottedGeometry.GetLocalSize().X);
|
|
|
|
|
|
|
|
|
|
if (CurveEditor->GetCurrentTool())
|
|
|
|
|
{
|
|
|
|
|
CurveEditor->GetCurrentTool()->Tick(AllottedGeometry, InCurrentTime, InDeltaTime);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int32 SCurveEditorViewContainer::OnPaint(const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled) const
|
|
|
|
|
{
|
|
|
|
|
const ESlateDrawEffect DrawEffects = ShouldBeEnabled(bParentEnabled) ? ESlateDrawEffect::None : ESlateDrawEffect::DisabledEffect;
|
|
|
|
|
|
2021-01-07 14:20:25 -04:00
|
|
|
static const FName BackgroundBrushName("Brushes.Panel");
|
2022-05-09 13:12:28 -04:00
|
|
|
const FSlateBrush* Background = FAppStyle::GetBrush(BackgroundBrushName);
|
2020-08-24 09:17:23 -04:00
|
|
|
FSlateDrawElement::MakeBox(OutDrawElements, LayerId, AllottedGeometry.ToPaintGeometry(), Background, DrawEffects, Background->GetTint(InWidgetStyle));
|
This is a significant overhaul to the Curve Editor used by Sequencer which adds a plugin-based architecture and extensibility. New tools and toolbar buttons can be added to all usages of the curve editor via user plugins, and the different views for data can be created modularly so new implementations of the editor can register their own way of drawing their data and the tools should just work. Additionally, you can now write your own filters to operate on curve editor data for custom implementations of smoothing, key generation, etc.
The curve editor supports three view types by default - an absolute view (default, matches old behavior), a stacked view and a normalized view. Stacked views draw each curve separately (so non-overlapping) and normalized against their own min/max values. The normalized view draws all curves overlapping with each one normalized against its own min/max values.
A tree view has been added to help effectively manage large numbers of curves. Selecting curves in the treeview controls which curves are visible in the view area. The treeview also supports pinning curves. These pinned curves will always be visible regardless of your selection in the tree view.
A transform tool and a retiming tool have been implemented (via a plugin) which is enabled by default. The transform tool allows you to do a marquee selection of keys and then translate and scale the positions of these keys. The retiming tool allows you to create a 1 dimensional lattice to adjust the timing of your keys with a linear falloff between each lattice point. These tools work across multiple views at the same time which is especially useful if you are representing one dimensional data (such as event keys) in a view, as it allows you to adjust this data at the same time as your animation curves. A smoothing filter has been implemented (via a plugin) to allow running highpass and lowpass filters on your keys.
Opening the curve editor in Sequencer/UMG now creates a separate dockable tab which can be resized and docked as desired. A time slider has been added to the Curve Editor which is synchronized to the playback time in Sequencer. This allows you to scrub time in the curve editor without having to find the Sequencer window and adjust time there while looking at your keys and previewing your animation in the viewport at the same time.
Rudimentary support has been added for saving and later restoring a set of curves in your current session. This allows you to do a rudimentary copy/paste of entire curves but can also be useful for saving a curve, making adjustments to it and then deciding you want to go back - simply reapply the saved curve! Each curve added supports an intention name (such as "Location.X" or "FieldOfView"), and these intention names will be used when trying to apply curves. This allows you to reliably take all of the curves of a transform on one object and apply them to another object (and ensure that Location.X gets applied to the new Location.X, etc.) this can be helpful if you have a mixed set of curves buffered (such as a location and a field of view). In the event that no curves match by intention you can store and apply a single curve at a time from any intention to any other intention.
The Curve Asset editors (float, vector and color curve assets) have been changed to use the new editor. They support the same treeviews, filtering and tools that the Sequencer editor does. In addition, the Color Curve asset editor adds an additional view which provides a 1 dimensional gradient editor as an easier way to visualize and edit colors instead of the channels individually.
#rb Max.Chen, Andrew.Rodham
#ROBOMERGE-SOURCE: CL 6631811 via CL 6633746
#ROBOMERGE-BOT: (vundefined-6620334)
[CL 6633863 by matt hoffman in Main branch]
2019-05-24 14:42:05 -04:00
|
|
|
|
|
|
|
|
SVerticalBox::OnPaint(Args, AllottedGeometry, MyCullingRect, OutDrawElements, LayerId, InWidgetStyle, bParentEnabled);
|
|
|
|
|
|
|
|
|
|
if (CurveEditor->GetCurrentTool())
|
|
|
|
|
{
|
|
|
|
|
CurveEditor->GetCurrentTool()->OnPaint(Args, AllottedGeometry, MyCullingRect, OutDrawElements, LayerId + CurveViewConstants::ELayerOffset::Tools, InWidgetStyle, bParentEnabled);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (DragOperation.IsSet() && DragOperation->IsDragging())
|
|
|
|
|
{
|
|
|
|
|
// We want this to be relative to the view pane for the curves and not the global editor.
|
|
|
|
|
DragOperation->DragImpl->Paint(AllottedGeometry, OutDrawElements, LayerId + CurveViewConstants::ELayerOffset::DragOperations);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (TimeSliderController)
|
|
|
|
|
{
|
|
|
|
|
FPaintViewAreaArgs PaintArgs;
|
|
|
|
|
PaintArgs.bDisplayTickLines = false;
|
|
|
|
|
PaintArgs.bDisplayScrubPosition = true;
|
|
|
|
|
PaintArgs.bDisplayMarkedFrames = false;
|
|
|
|
|
PaintArgs.PlaybackRangeArgs = FPaintPlaybackRangeArgs(
|
2022-05-09 13:12:28 -04:00
|
|
|
FAppStyle::GetBrush("Sequencer.Timeline.PlayRange_Bottom_L"),
|
|
|
|
|
FAppStyle::GetBrush("Sequencer.Timeline.PlayRange_Bottom_R"),
|
This is a significant overhaul to the Curve Editor used by Sequencer which adds a plugin-based architecture and extensibility. New tools and toolbar buttons can be added to all usages of the curve editor via user plugins, and the different views for data can be created modularly so new implementations of the editor can register their own way of drawing their data and the tools should just work. Additionally, you can now write your own filters to operate on curve editor data for custom implementations of smoothing, key generation, etc.
The curve editor supports three view types by default - an absolute view (default, matches old behavior), a stacked view and a normalized view. Stacked views draw each curve separately (so non-overlapping) and normalized against their own min/max values. The normalized view draws all curves overlapping with each one normalized against its own min/max values.
A tree view has been added to help effectively manage large numbers of curves. Selecting curves in the treeview controls which curves are visible in the view area. The treeview also supports pinning curves. These pinned curves will always be visible regardless of your selection in the tree view.
A transform tool and a retiming tool have been implemented (via a plugin) which is enabled by default. The transform tool allows you to do a marquee selection of keys and then translate and scale the positions of these keys. The retiming tool allows you to create a 1 dimensional lattice to adjust the timing of your keys with a linear falloff between each lattice point. These tools work across multiple views at the same time which is especially useful if you are representing one dimensional data (such as event keys) in a view, as it allows you to adjust this data at the same time as your animation curves. A smoothing filter has been implemented (via a plugin) to allow running highpass and lowpass filters on your keys.
Opening the curve editor in Sequencer/UMG now creates a separate dockable tab which can be resized and docked as desired. A time slider has been added to the Curve Editor which is synchronized to the playback time in Sequencer. This allows you to scrub time in the curve editor without having to find the Sequencer window and adjust time there while looking at your keys and previewing your animation in the viewport at the same time.
Rudimentary support has been added for saving and later restoring a set of curves in your current session. This allows you to do a rudimentary copy/paste of entire curves but can also be useful for saving a curve, making adjustments to it and then deciding you want to go back - simply reapply the saved curve! Each curve added supports an intention name (such as "Location.X" or "FieldOfView"), and these intention names will be used when trying to apply curves. This allows you to reliably take all of the curves of a transform on one object and apply them to another object (and ensure that Location.X gets applied to the new Location.X, etc.) this can be helpful if you have a mixed set of curves buffered (such as a location and a field of view). In the event that no curves match by intention you can store and apply a single curve at a time from any intention to any other intention.
The Curve Asset editors (float, vector and color curve assets) have been changed to use the new editor. They support the same treeviews, filtering and tools that the Sequencer editor does. In addition, the Color Curve asset editor adds an additional view which provides a 1 dimensional gradient editor as an easier way to visualize and edit colors instead of the channels individually.
#rb Max.Chen, Andrew.Rodham
#ROBOMERGE-SOURCE: CL 6631811 via CL 6633746
#ROBOMERGE-BOT: (vundefined-6620334)
[CL 6633863 by matt hoffman in Main branch]
2019-05-24 14:42:05 -04:00
|
|
|
6.f);
|
|
|
|
|
|
|
|
|
|
TimeSliderController->OnPaintViewArea(AllottedGeometry, MyCullingRect, OutDrawElements, LayerId + CurveViewConstants::ELayerOffset::GridOverlays, bParentEnabled, PaintArgs);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return LayerId + CurveViewConstants::ELayerOffset::Last;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FReply SCurveEditorViewContainer::OnKeyDown(const FGeometry& MyGeometry, const FKeyEvent& InKeyEvent)
|
|
|
|
|
{
|
|
|
|
|
if (InKeyEvent.GetKey() == EKeys::Escape && DragOperation.IsSet())
|
|
|
|
|
{
|
|
|
|
|
DragOperation->DragImpl->CancelDrag();
|
|
|
|
|
DragOperation.Reset();
|
|
|
|
|
return FReply::Handled();
|
|
|
|
|
}
|
|
|
|
|
return FReply::Unhandled();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FReply SCurveEditorViewContainer::OnPreviewMouseButtonDown(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent)
|
|
|
|
|
{
|
2019-10-01 20:41:42 -04:00
|
|
|
bCaughtMouseDown = true;
|
|
|
|
|
|
This is a significant overhaul to the Curve Editor used by Sequencer which adds a plugin-based architecture and extensibility. New tools and toolbar buttons can be added to all usages of the curve editor via user plugins, and the different views for data can be created modularly so new implementations of the editor can register their own way of drawing their data and the tools should just work. Additionally, you can now write your own filters to operate on curve editor data for custom implementations of smoothing, key generation, etc.
The curve editor supports three view types by default - an absolute view (default, matches old behavior), a stacked view and a normalized view. Stacked views draw each curve separately (so non-overlapping) and normalized against their own min/max values. The normalized view draws all curves overlapping with each one normalized against its own min/max values.
A tree view has been added to help effectively manage large numbers of curves. Selecting curves in the treeview controls which curves are visible in the view area. The treeview also supports pinning curves. These pinned curves will always be visible regardless of your selection in the tree view.
A transform tool and a retiming tool have been implemented (via a plugin) which is enabled by default. The transform tool allows you to do a marquee selection of keys and then translate and scale the positions of these keys. The retiming tool allows you to create a 1 dimensional lattice to adjust the timing of your keys with a linear falloff between each lattice point. These tools work across multiple views at the same time which is especially useful if you are representing one dimensional data (such as event keys) in a view, as it allows you to adjust this data at the same time as your animation curves. A smoothing filter has been implemented (via a plugin) to allow running highpass and lowpass filters on your keys.
Opening the curve editor in Sequencer/UMG now creates a separate dockable tab which can be resized and docked as desired. A time slider has been added to the Curve Editor which is synchronized to the playback time in Sequencer. This allows you to scrub time in the curve editor without having to find the Sequencer window and adjust time there while looking at your keys and previewing your animation in the viewport at the same time.
Rudimentary support has been added for saving and later restoring a set of curves in your current session. This allows you to do a rudimentary copy/paste of entire curves but can also be useful for saving a curve, making adjustments to it and then deciding you want to go back - simply reapply the saved curve! Each curve added supports an intention name (such as "Location.X" or "FieldOfView"), and these intention names will be used when trying to apply curves. This allows you to reliably take all of the curves of a transform on one object and apply them to another object (and ensure that Location.X gets applied to the new Location.X, etc.) this can be helpful if you have a mixed set of curves buffered (such as a location and a field of view). In the event that no curves match by intention you can store and apply a single curve at a time from any intention to any other intention.
The Curve Asset editors (float, vector and color curve assets) have been changed to use the new editor. They support the same treeviews, filtering and tools that the Sequencer editor does. In addition, the Color Curve asset editor adds an additional view which provides a 1 dimensional gradient editor as an easier way to visualize and edit colors instead of the channels individually.
#rb Max.Chen, Andrew.Rodham
#ROBOMERGE-SOURCE: CL 6631811 via CL 6633746
#ROBOMERGE-BOT: (vundefined-6620334)
[CL 6633863 by matt hoffman in Main branch]
2019-05-24 14:42:05 -04:00
|
|
|
if (CurveEditor->GetCurrentTool())
|
|
|
|
|
{
|
|
|
|
|
return CurveEditor->GetCurrentTool()->OnMouseButtonDown(AsShared(), MyGeometry, MouseEvent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return FReply::Unhandled();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FReply SCurveEditorViewContainer::OnMouseButtonDown(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent)
|
|
|
|
|
{
|
|
|
|
|
FVector2D MousePixel = MyGeometry.AbsoluteToLocal(MouseEvent.GetScreenSpacePosition());
|
|
|
|
|
|
|
|
|
|
// Marquee Selection
|
|
|
|
|
if (MouseEvent.GetEffectingButton() == EKeys::LeftMouseButton)
|
|
|
|
|
{
|
|
|
|
|
DragOperation = FCurveEditorDelayedDrag(MousePixel, MouseEvent.GetEffectingButton());
|
|
|
|
|
DragOperation->DragImpl = MakeUnique<FCurveEditorDragOperation_Marquee>(CurveEditor.Get());
|
|
|
|
|
return FReply::Handled();
|
|
|
|
|
}
|
|
|
|
|
// Middle Click + Alt Pan
|
|
|
|
|
else if (MouseEvent.GetEffectingButton() == EKeys::MiddleMouseButton)
|
|
|
|
|
{
|
|
|
|
|
if (MouseEvent.IsAltDown())
|
|
|
|
|
{
|
|
|
|
|
DragOperation = FCurveEditorDelayedDrag(MousePixel, MouseEvent.GetEffectingButton());
|
|
|
|
|
DragOperation->DragImpl = MakeUnique<FCurveEditorDragOperation_PanInput>(CurveEditor.Get());
|
|
|
|
|
return FReply::Handled();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (MouseEvent.GetEffectingButton() == EKeys::RightMouseButton)
|
|
|
|
|
{
|
|
|
|
|
// Zoom Timeline
|
|
|
|
|
if (MouseEvent.IsAltDown())
|
|
|
|
|
{
|
|
|
|
|
DragOperation = FCurveEditorDelayedDrag(MousePixel, MouseEvent.GetEffectingButton());
|
|
|
|
|
DragOperation->DragImpl = MakeUnique<FCurveEditorDragOperation_Zoom>(CurveEditor.Get(), nullptr);
|
|
|
|
|
return FReply::Handled();
|
|
|
|
|
}
|
|
|
|
|
// Pan Timeline
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
DragOperation = FCurveEditorDelayedDrag(MousePixel, MouseEvent.GetEffectingButton());
|
|
|
|
|
DragOperation->DragImpl = MakeUnique<FCurveEditorDragOperation_PanInput>(CurveEditor.Get());
|
|
|
|
|
return FReply::Handled();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return FReply::Unhandled();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FReply SCurveEditorViewContainer::OnMouseButtonDoubleClick(const FGeometry& InMyGeometry, const FPointerEvent& InMouseEvent)
|
|
|
|
|
{
|
|
|
|
|
if (CurveEditor->GetCurrentTool())
|
|
|
|
|
{
|
|
|
|
|
return CurveEditor->GetCurrentTool()->OnMouseButtonDoubleClick(AsShared(), InMyGeometry, InMouseEvent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return FReply::Unhandled();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FReply SCurveEditorViewContainer::OnMouseMove(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent)
|
|
|
|
|
{
|
|
|
|
|
FVector2D MousePixel = MyGeometry.AbsoluteToLocal(MouseEvent.GetScreenSpacePosition());
|
2019-08-21 18:09:09 -04:00
|
|
|
FReply ToolReply = FReply::Unhandled();
|
This is a significant overhaul to the Curve Editor used by Sequencer which adds a plugin-based architecture and extensibility. New tools and toolbar buttons can be added to all usages of the curve editor via user plugins, and the different views for data can be created modularly so new implementations of the editor can register their own way of drawing their data and the tools should just work. Additionally, you can now write your own filters to operate on curve editor data for custom implementations of smoothing, key generation, etc.
The curve editor supports three view types by default - an absolute view (default, matches old behavior), a stacked view and a normalized view. Stacked views draw each curve separately (so non-overlapping) and normalized against their own min/max values. The normalized view draws all curves overlapping with each one normalized against its own min/max values.
A tree view has been added to help effectively manage large numbers of curves. Selecting curves in the treeview controls which curves are visible in the view area. The treeview also supports pinning curves. These pinned curves will always be visible regardless of your selection in the tree view.
A transform tool and a retiming tool have been implemented (via a plugin) which is enabled by default. The transform tool allows you to do a marquee selection of keys and then translate and scale the positions of these keys. The retiming tool allows you to create a 1 dimensional lattice to adjust the timing of your keys with a linear falloff between each lattice point. These tools work across multiple views at the same time which is especially useful if you are representing one dimensional data (such as event keys) in a view, as it allows you to adjust this data at the same time as your animation curves. A smoothing filter has been implemented (via a plugin) to allow running highpass and lowpass filters on your keys.
Opening the curve editor in Sequencer/UMG now creates a separate dockable tab which can be resized and docked as desired. A time slider has been added to the Curve Editor which is synchronized to the playback time in Sequencer. This allows you to scrub time in the curve editor without having to find the Sequencer window and adjust time there while looking at your keys and previewing your animation in the viewport at the same time.
Rudimentary support has been added for saving and later restoring a set of curves in your current session. This allows you to do a rudimentary copy/paste of entire curves but can also be useful for saving a curve, making adjustments to it and then deciding you want to go back - simply reapply the saved curve! Each curve added supports an intention name (such as "Location.X" or "FieldOfView"), and these intention names will be used when trying to apply curves. This allows you to reliably take all of the curves of a transform on one object and apply them to another object (and ensure that Location.X gets applied to the new Location.X, etc.) this can be helpful if you have a mixed set of curves buffered (such as a location and a field of view). In the event that no curves match by intention you can store and apply a single curve at a time from any intention to any other intention.
The Curve Asset editors (float, vector and color curve assets) have been changed to use the new editor. They support the same treeviews, filtering and tools that the Sequencer editor does. In addition, the Color Curve asset editor adds an additional view which provides a 1 dimensional gradient editor as an easier way to visualize and edit colors instead of the channels individually.
#rb Max.Chen, Andrew.Rodham
#ROBOMERGE-SOURCE: CL 6631811 via CL 6633746
#ROBOMERGE-BOT: (vundefined-6620334)
[CL 6633863 by matt hoffman in Main branch]
2019-05-24 14:42:05 -04:00
|
|
|
|
2019-08-21 18:09:09 -04:00
|
|
|
if (CurveEditor->GetCurrentTool())
|
|
|
|
|
{
|
|
|
|
|
ToolReply = CurveEditor->GetCurrentTool()->OnMouseMove(AsShared(), MyGeometry, MouseEvent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!ToolReply.IsEventHandled() && DragOperation.IsSet())
|
This is a significant overhaul to the Curve Editor used by Sequencer which adds a plugin-based architecture and extensibility. New tools and toolbar buttons can be added to all usages of the curve editor via user plugins, and the different views for data can be created modularly so new implementations of the editor can register their own way of drawing their data and the tools should just work. Additionally, you can now write your own filters to operate on curve editor data for custom implementations of smoothing, key generation, etc.
The curve editor supports three view types by default - an absolute view (default, matches old behavior), a stacked view and a normalized view. Stacked views draw each curve separately (so non-overlapping) and normalized against their own min/max values. The normalized view draws all curves overlapping with each one normalized against its own min/max values.
A tree view has been added to help effectively manage large numbers of curves. Selecting curves in the treeview controls which curves are visible in the view area. The treeview also supports pinning curves. These pinned curves will always be visible regardless of your selection in the tree view.
A transform tool and a retiming tool have been implemented (via a plugin) which is enabled by default. The transform tool allows you to do a marquee selection of keys and then translate and scale the positions of these keys. The retiming tool allows you to create a 1 dimensional lattice to adjust the timing of your keys with a linear falloff between each lattice point. These tools work across multiple views at the same time which is especially useful if you are representing one dimensional data (such as event keys) in a view, as it allows you to adjust this data at the same time as your animation curves. A smoothing filter has been implemented (via a plugin) to allow running highpass and lowpass filters on your keys.
Opening the curve editor in Sequencer/UMG now creates a separate dockable tab which can be resized and docked as desired. A time slider has been added to the Curve Editor which is synchronized to the playback time in Sequencer. This allows you to scrub time in the curve editor without having to find the Sequencer window and adjust time there while looking at your keys and previewing your animation in the viewport at the same time.
Rudimentary support has been added for saving and later restoring a set of curves in your current session. This allows you to do a rudimentary copy/paste of entire curves but can also be useful for saving a curve, making adjustments to it and then deciding you want to go back - simply reapply the saved curve! Each curve added supports an intention name (such as "Location.X" or "FieldOfView"), and these intention names will be used when trying to apply curves. This allows you to reliably take all of the curves of a transform on one object and apply them to another object (and ensure that Location.X gets applied to the new Location.X, etc.) this can be helpful if you have a mixed set of curves buffered (such as a location and a field of view). In the event that no curves match by intention you can store and apply a single curve at a time from any intention to any other intention.
The Curve Asset editors (float, vector and color curve assets) have been changed to use the new editor. They support the same treeviews, filtering and tools that the Sequencer editor does. In addition, the Color Curve asset editor adds an additional view which provides a 1 dimensional gradient editor as an easier way to visualize and edit colors instead of the channels individually.
#rb Max.Chen, Andrew.Rodham
#ROBOMERGE-SOURCE: CL 6631811 via CL 6633746
#ROBOMERGE-BOT: (vundefined-6620334)
[CL 6633863 by matt hoffman in Main branch]
2019-05-24 14:42:05 -04:00
|
|
|
{
|
|
|
|
|
FVector2D InitialPosition = DragOperation->GetInitialPosition();
|
|
|
|
|
|
|
|
|
|
if (!DragOperation->IsDragging() && DragOperation->AttemptDragStart(MouseEvent))
|
|
|
|
|
{
|
|
|
|
|
DragOperation->DragImpl->BeginDrag(InitialPosition, MousePixel, MouseEvent);
|
|
|
|
|
return FReply::Handled().CaptureMouse(AsShared());
|
|
|
|
|
}
|
|
|
|
|
else if (DragOperation->IsDragging())
|
|
|
|
|
{
|
|
|
|
|
DragOperation->DragImpl->Drag(InitialPosition, MousePixel, MouseEvent);
|
|
|
|
|
return FReply::Handled();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-08-21 18:09:09 -04:00
|
|
|
return ToolReply;
|
This is a significant overhaul to the Curve Editor used by Sequencer which adds a plugin-based architecture and extensibility. New tools and toolbar buttons can be added to all usages of the curve editor via user plugins, and the different views for data can be created modularly so new implementations of the editor can register their own way of drawing their data and the tools should just work. Additionally, you can now write your own filters to operate on curve editor data for custom implementations of smoothing, key generation, etc.
The curve editor supports three view types by default - an absolute view (default, matches old behavior), a stacked view and a normalized view. Stacked views draw each curve separately (so non-overlapping) and normalized against their own min/max values. The normalized view draws all curves overlapping with each one normalized against its own min/max values.
A tree view has been added to help effectively manage large numbers of curves. Selecting curves in the treeview controls which curves are visible in the view area. The treeview also supports pinning curves. These pinned curves will always be visible regardless of your selection in the tree view.
A transform tool and a retiming tool have been implemented (via a plugin) which is enabled by default. The transform tool allows you to do a marquee selection of keys and then translate and scale the positions of these keys. The retiming tool allows you to create a 1 dimensional lattice to adjust the timing of your keys with a linear falloff between each lattice point. These tools work across multiple views at the same time which is especially useful if you are representing one dimensional data (such as event keys) in a view, as it allows you to adjust this data at the same time as your animation curves. A smoothing filter has been implemented (via a plugin) to allow running highpass and lowpass filters on your keys.
Opening the curve editor in Sequencer/UMG now creates a separate dockable tab which can be resized and docked as desired. A time slider has been added to the Curve Editor which is synchronized to the playback time in Sequencer. This allows you to scrub time in the curve editor without having to find the Sequencer window and adjust time there while looking at your keys and previewing your animation in the viewport at the same time.
Rudimentary support has been added for saving and later restoring a set of curves in your current session. This allows you to do a rudimentary copy/paste of entire curves but can also be useful for saving a curve, making adjustments to it and then deciding you want to go back - simply reapply the saved curve! Each curve added supports an intention name (such as "Location.X" or "FieldOfView"), and these intention names will be used when trying to apply curves. This allows you to reliably take all of the curves of a transform on one object and apply them to another object (and ensure that Location.X gets applied to the new Location.X, etc.) this can be helpful if you have a mixed set of curves buffered (such as a location and a field of view). In the event that no curves match by intention you can store and apply a single curve at a time from any intention to any other intention.
The Curve Asset editors (float, vector and color curve assets) have been changed to use the new editor. They support the same treeviews, filtering and tools that the Sequencer editor does. In addition, the Color Curve asset editor adds an additional view which provides a 1 dimensional gradient editor as an easier way to visualize and edit colors instead of the channels individually.
#rb Max.Chen, Andrew.Rodham
#ROBOMERGE-SOURCE: CL 6631811 via CL 6633746
#ROBOMERGE-BOT: (vundefined-6620334)
[CL 6633863 by matt hoffman in Main branch]
2019-05-24 14:42:05 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FReply SCurveEditorViewContainer::OnMouseButtonUp(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent)
|
|
|
|
|
{
|
|
|
|
|
FVector2D MousePosition = MyGeometry.AbsoluteToLocal(MouseEvent.GetScreenSpacePosition());
|
|
|
|
|
|
|
|
|
|
FReply Reply = FReply::Unhandled();
|
|
|
|
|
|
|
|
|
|
if (DragOperation.IsSet() && DragOperation->IsDragging())
|
|
|
|
|
{
|
|
|
|
|
FVector2D InitialPosition = DragOperation->GetInitialPosition();
|
|
|
|
|
DragOperation->DragImpl->EndDrag(InitialPosition, MousePosition, MouseEvent);
|
|
|
|
|
Reply = FReply::Handled();
|
|
|
|
|
}
|
|
|
|
|
else if (CurveEditor->GetCurrentTool())
|
|
|
|
|
{
|
|
|
|
|
Reply = CurveEditor->GetCurrentTool()->OnMouseButtonUp(AsShared(), MyGeometry, MouseEvent);
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-01 20:41:42 -04:00
|
|
|
if (!Reply.IsEventHandled() && MouseEvent.GetEffectingButton() == EKeys::LeftMouseButton && bCaughtMouseDown)
|
This is a significant overhaul to the Curve Editor used by Sequencer which adds a plugin-based architecture and extensibility. New tools and toolbar buttons can be added to all usages of the curve editor via user plugins, and the different views for data can be created modularly so new implementations of the editor can register their own way of drawing their data and the tools should just work. Additionally, you can now write your own filters to operate on curve editor data for custom implementations of smoothing, key generation, etc.
The curve editor supports three view types by default - an absolute view (default, matches old behavior), a stacked view and a normalized view. Stacked views draw each curve separately (so non-overlapping) and normalized against their own min/max values. The normalized view draws all curves overlapping with each one normalized against its own min/max values.
A tree view has been added to help effectively manage large numbers of curves. Selecting curves in the treeview controls which curves are visible in the view area. The treeview also supports pinning curves. These pinned curves will always be visible regardless of your selection in the tree view.
A transform tool and a retiming tool have been implemented (via a plugin) which is enabled by default. The transform tool allows you to do a marquee selection of keys and then translate and scale the positions of these keys. The retiming tool allows you to create a 1 dimensional lattice to adjust the timing of your keys with a linear falloff between each lattice point. These tools work across multiple views at the same time which is especially useful if you are representing one dimensional data (such as event keys) in a view, as it allows you to adjust this data at the same time as your animation curves. A smoothing filter has been implemented (via a plugin) to allow running highpass and lowpass filters on your keys.
Opening the curve editor in Sequencer/UMG now creates a separate dockable tab which can be resized and docked as desired. A time slider has been added to the Curve Editor which is synchronized to the playback time in Sequencer. This allows you to scrub time in the curve editor without having to find the Sequencer window and adjust time there while looking at your keys and previewing your animation in the viewport at the same time.
Rudimentary support has been added for saving and later restoring a set of curves in your current session. This allows you to do a rudimentary copy/paste of entire curves but can also be useful for saving a curve, making adjustments to it and then deciding you want to go back - simply reapply the saved curve! Each curve added supports an intention name (such as "Location.X" or "FieldOfView"), and these intention names will be used when trying to apply curves. This allows you to reliably take all of the curves of a transform on one object and apply them to another object (and ensure that Location.X gets applied to the new Location.X, etc.) this can be helpful if you have a mixed set of curves buffered (such as a location and a field of view). In the event that no curves match by intention you can store and apply a single curve at a time from any intention to any other intention.
The Curve Asset editors (float, vector and color curve assets) have been changed to use the new editor. They support the same treeviews, filtering and tools that the Sequencer editor does. In addition, the Color Curve asset editor adds an additional view which provides a 1 dimensional gradient editor as an easier way to visualize and edit colors instead of the channels individually.
#rb Max.Chen, Andrew.Rodham
#ROBOMERGE-SOURCE: CL 6631811 via CL 6633746
#ROBOMERGE-BOT: (vundefined-6620334)
[CL 6633863 by matt hoffman in Main branch]
2019-05-24 14:42:05 -04:00
|
|
|
{
|
|
|
|
|
if (!MouseEvent.IsShiftDown() && !MouseEvent.IsAltDown() && !MouseEvent.IsControlDown())
|
|
|
|
|
{
|
|
|
|
|
CurveEditor->GetSelection().Clear();
|
|
|
|
|
Reply = FReply::Handled();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-01 20:41:42 -04:00
|
|
|
bCaughtMouseDown = false;
|
This is a significant overhaul to the Curve Editor used by Sequencer which adds a plugin-based architecture and extensibility. New tools and toolbar buttons can be added to all usages of the curve editor via user plugins, and the different views for data can be created modularly so new implementations of the editor can register their own way of drawing their data and the tools should just work. Additionally, you can now write your own filters to operate on curve editor data for custom implementations of smoothing, key generation, etc.
The curve editor supports three view types by default - an absolute view (default, matches old behavior), a stacked view and a normalized view. Stacked views draw each curve separately (so non-overlapping) and normalized against their own min/max values. The normalized view draws all curves overlapping with each one normalized against its own min/max values.
A tree view has been added to help effectively manage large numbers of curves. Selecting curves in the treeview controls which curves are visible in the view area. The treeview also supports pinning curves. These pinned curves will always be visible regardless of your selection in the tree view.
A transform tool and a retiming tool have been implemented (via a plugin) which is enabled by default. The transform tool allows you to do a marquee selection of keys and then translate and scale the positions of these keys. The retiming tool allows you to create a 1 dimensional lattice to adjust the timing of your keys with a linear falloff between each lattice point. These tools work across multiple views at the same time which is especially useful if you are representing one dimensional data (such as event keys) in a view, as it allows you to adjust this data at the same time as your animation curves. A smoothing filter has been implemented (via a plugin) to allow running highpass and lowpass filters on your keys.
Opening the curve editor in Sequencer/UMG now creates a separate dockable tab which can be resized and docked as desired. A time slider has been added to the Curve Editor which is synchronized to the playback time in Sequencer. This allows you to scrub time in the curve editor without having to find the Sequencer window and adjust time there while looking at your keys and previewing your animation in the viewport at the same time.
Rudimentary support has been added for saving and later restoring a set of curves in your current session. This allows you to do a rudimentary copy/paste of entire curves but can also be useful for saving a curve, making adjustments to it and then deciding you want to go back - simply reapply the saved curve! Each curve added supports an intention name (such as "Location.X" or "FieldOfView"), and these intention names will be used when trying to apply curves. This allows you to reliably take all of the curves of a transform on one object and apply them to another object (and ensure that Location.X gets applied to the new Location.X, etc.) this can be helpful if you have a mixed set of curves buffered (such as a location and a field of view). In the event that no curves match by intention you can store and apply a single curve at a time from any intention to any other intention.
The Curve Asset editors (float, vector and color curve assets) have been changed to use the new editor. They support the same treeviews, filtering and tools that the Sequencer editor does. In addition, the Color Curve asset editor adds an additional view which provides a 1 dimensional gradient editor as an easier way to visualize and edit colors instead of the channels individually.
#rb Max.Chen, Andrew.Rodham
#ROBOMERGE-SOURCE: CL 6631811 via CL 6633746
#ROBOMERGE-BOT: (vundefined-6620334)
[CL 6633863 by matt hoffman in Main branch]
2019-05-24 14:42:05 -04:00
|
|
|
DragOperation.Reset();
|
|
|
|
|
return Reply.ReleaseMouseCapture();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FCursorReply SCurveEditorViewContainer::OnCursorQuery(const FGeometry& MyGeometry, const FPointerEvent& CursorEvent) const
|
|
|
|
|
{
|
|
|
|
|
// Override the cursor while the Marquee select is happening. Ideally we'd be able to do a "+" and "-" while holding
|
|
|
|
|
// shift and alt, but there's not built in OS cursor to do this.
|
|
|
|
|
if (DragOperation.IsSet() && DragOperation->IsDragging())
|
|
|
|
|
{
|
|
|
|
|
return FCursorReply::Cursor(EMouseCursor::Crosshairs);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return FCursorReply::Unhandled();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void SCurveEditorViewContainer::OnFocusLost(const FFocusEvent& InFocusEvent)
|
|
|
|
|
{
|
|
|
|
|
if (DragOperation.IsSet())
|
|
|
|
|
{
|
|
|
|
|
DragOperation->DragImpl->CancelDrag();
|
|
|
|
|
DragOperation.Reset();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (CurveEditor->GetCurrentTool())
|
|
|
|
|
{
|
|
|
|
|
CurveEditor->GetCurrentTool()->OnFocusLost(InFocusEvent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SVerticalBox::OnFocusLost(InFocusEvent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SCurveEditorViewContainer::OnCurveEditorToolChanged(FCurveEditorToolID InToolId)
|
|
|
|
|
{
|
|
|
|
|
// We need to end drag-drop operations if they switch tools. Otherwise they can start
|
|
|
|
|
// a marquee select, use the keyboard to switch to a diferent tool, and then the marquee
|
|
|
|
|
// select finishes after the tool has had a chance to activate.
|
|
|
|
|
if (DragOperation.IsSet())
|
|
|
|
|
{
|
|
|
|
|
// We have to cancel it instead of ending it because ending it needs mouse position and some other stuff.
|
|
|
|
|
DragOperation->DragImpl->CancelDrag();
|
|
|
|
|
DragOperation.Reset();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SCurveEditorViewContainer::ExpandInputBounds(float NewWidth)
|
|
|
|
|
{
|
|
|
|
|
const float OldWidth = GetCachedGeometry().GetLocalSize().X;
|
|
|
|
|
if (NewWidth != OldWidth && OldWidth > 0)
|
|
|
|
|
{
|
|
|
|
|
// Retrieve the current bounds and cache them
|
|
|
|
|
double InputMin = 0.0, InputMax = 1.0;
|
|
|
|
|
CurveEditor->GetBounds().GetInputBounds(InputMin, InputMax);
|
|
|
|
|
|
|
|
|
|
// Increase the visible input/output ranges based on the new size of the panel
|
|
|
|
|
const double PixelToInputRatio = (InputMax - InputMin) / OldWidth;
|
|
|
|
|
InputMax += PixelToInputRatio * (NewWidth - OldWidth);
|
|
|
|
|
|
|
|
|
|
CurveEditor->GetBounds().SetInputBounds(InputMin, InputMax);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FMargin SCurveEditorViewContainer::GetSlotPadding(int32 SlotIndex) const
|
|
|
|
|
{
|
|
|
|
|
const bool bIsFirstView = SlotIndex == 0;
|
|
|
|
|
const bool bIsLastView = SlotIndex == Views.Num()-1;
|
|
|
|
|
|
|
|
|
|
return FMargin(0.f, bIsFirstView ? 0.f : 5.f, 0.f, bIsLastView ? 0.f : 5.f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SCurveEditorViewContainer::AddView(TSharedRef<SCurveEditorView> ViewToAdd)
|
|
|
|
|
{
|
|
|
|
|
const int32 InsertIndex = Views.Num();
|
|
|
|
|
ViewToAdd->RelativeOrder = Views.Num();
|
|
|
|
|
|
|
|
|
|
Views.Add(ViewToAdd);
|
2021-05-26 06:42:00 -04:00
|
|
|
SVerticalBox::FSlot* SlotPointer = nullptr;
|
|
|
|
|
AddSlot()
|
|
|
|
|
.Expose(SlotPointer)
|
This is a significant overhaul to the Curve Editor used by Sequencer which adds a plugin-based architecture and extensibility. New tools and toolbar buttons can be added to all usages of the curve editor via user plugins, and the different views for data can be created modularly so new implementations of the editor can register their own way of drawing their data and the tools should just work. Additionally, you can now write your own filters to operate on curve editor data for custom implementations of smoothing, key generation, etc.
The curve editor supports three view types by default - an absolute view (default, matches old behavior), a stacked view and a normalized view. Stacked views draw each curve separately (so non-overlapping) and normalized against their own min/max values. The normalized view draws all curves overlapping with each one normalized against its own min/max values.
A tree view has been added to help effectively manage large numbers of curves. Selecting curves in the treeview controls which curves are visible in the view area. The treeview also supports pinning curves. These pinned curves will always be visible regardless of your selection in the tree view.
A transform tool and a retiming tool have been implemented (via a plugin) which is enabled by default. The transform tool allows you to do a marquee selection of keys and then translate and scale the positions of these keys. The retiming tool allows you to create a 1 dimensional lattice to adjust the timing of your keys with a linear falloff between each lattice point. These tools work across multiple views at the same time which is especially useful if you are representing one dimensional data (such as event keys) in a view, as it allows you to adjust this data at the same time as your animation curves. A smoothing filter has been implemented (via a plugin) to allow running highpass and lowpass filters on your keys.
Opening the curve editor in Sequencer/UMG now creates a separate dockable tab which can be resized and docked as desired. A time slider has been added to the Curve Editor which is synchronized to the playback time in Sequencer. This allows you to scrub time in the curve editor without having to find the Sequencer window and adjust time there while looking at your keys and previewing your animation in the viewport at the same time.
Rudimentary support has been added for saving and later restoring a set of curves in your current session. This allows you to do a rudimentary copy/paste of entire curves but can also be useful for saving a curve, making adjustments to it and then deciding you want to go back - simply reapply the saved curve! Each curve added supports an intention name (such as "Location.X" or "FieldOfView"), and these intention names will be used when trying to apply curves. This allows you to reliably take all of the curves of a transform on one object and apply them to another object (and ensure that Location.X gets applied to the new Location.X, etc.) this can be helpful if you have a mixed set of curves buffered (such as a location and a field of view). In the event that no curves match by intention you can store and apply a single curve at a time from any intention to any other intention.
The Curve Asset editors (float, vector and color curve assets) have been changed to use the new editor. They support the same treeviews, filtering and tools that the Sequencer editor does. In addition, the Color Curve asset editor adds an additional view which provides a 1 dimensional gradient editor as an easier way to visualize and edit colors instead of the channels individually.
#rb Max.Chen, Andrew.Rodham
#ROBOMERGE-SOURCE: CL 6631811 via CL 6633746
#ROBOMERGE-BOT: (vundefined-6620334)
[CL 6633863 by matt hoffman in Main branch]
2019-05-24 14:42:05 -04:00
|
|
|
[
|
|
|
|
|
SNew(SBox)
|
|
|
|
|
.Padding(MakeAttributeSP(this, &SCurveEditorViewContainer::GetSlotPadding, InsertIndex))
|
|
|
|
|
.Clipping(EWidgetClipping::ClipToBounds)
|
|
|
|
|
[
|
|
|
|
|
ViewToAdd
|
|
|
|
|
]
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
if (ViewToAdd->ShouldAutoSize())
|
|
|
|
|
{
|
2021-05-26 06:42:00 -04:00
|
|
|
SlotPointer->SetAutoHeight();
|
This is a significant overhaul to the Curve Editor used by Sequencer which adds a plugin-based architecture and extensibility. New tools and toolbar buttons can be added to all usages of the curve editor via user plugins, and the different views for data can be created modularly so new implementations of the editor can register their own way of drawing their data and the tools should just work. Additionally, you can now write your own filters to operate on curve editor data for custom implementations of smoothing, key generation, etc.
The curve editor supports three view types by default - an absolute view (default, matches old behavior), a stacked view and a normalized view. Stacked views draw each curve separately (so non-overlapping) and normalized against their own min/max values. The normalized view draws all curves overlapping with each one normalized against its own min/max values.
A tree view has been added to help effectively manage large numbers of curves. Selecting curves in the treeview controls which curves are visible in the view area. The treeview also supports pinning curves. These pinned curves will always be visible regardless of your selection in the tree view.
A transform tool and a retiming tool have been implemented (via a plugin) which is enabled by default. The transform tool allows you to do a marquee selection of keys and then translate and scale the positions of these keys. The retiming tool allows you to create a 1 dimensional lattice to adjust the timing of your keys with a linear falloff between each lattice point. These tools work across multiple views at the same time which is especially useful if you are representing one dimensional data (such as event keys) in a view, as it allows you to adjust this data at the same time as your animation curves. A smoothing filter has been implemented (via a plugin) to allow running highpass and lowpass filters on your keys.
Opening the curve editor in Sequencer/UMG now creates a separate dockable tab which can be resized and docked as desired. A time slider has been added to the Curve Editor which is synchronized to the playback time in Sequencer. This allows you to scrub time in the curve editor without having to find the Sequencer window and adjust time there while looking at your keys and previewing your animation in the viewport at the same time.
Rudimentary support has been added for saving and later restoring a set of curves in your current session. This allows you to do a rudimentary copy/paste of entire curves but can also be useful for saving a curve, making adjustments to it and then deciding you want to go back - simply reapply the saved curve! Each curve added supports an intention name (such as "Location.X" or "FieldOfView"), and these intention names will be used when trying to apply curves. This allows you to reliably take all of the curves of a transform on one object and apply them to another object (and ensure that Location.X gets applied to the new Location.X, etc.) this can be helpful if you have a mixed set of curves buffered (such as a location and a field of view). In the event that no curves match by intention you can store and apply a single curve at a time from any intention to any other intention.
The Curve Asset editors (float, vector and color curve assets) have been changed to use the new editor. They support the same treeviews, filtering and tools that the Sequencer editor does. In addition, the Color Curve asset editor adds an additional view which provides a 1 dimensional gradient editor as an easier way to visualize and edit colors instead of the channels individually.
#rb Max.Chen, Andrew.Rodham
#ROBOMERGE-SOURCE: CL 6631811 via CL 6633746
#ROBOMERGE-BOT: (vundefined-6620334)
[CL 6633863 by matt hoffman in Main branch]
2019-05-24 14:42:05 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SCurveEditorViewContainer::Clear()
|
|
|
|
|
{
|
|
|
|
|
Views.Reset();
|
|
|
|
|
ClearChildren();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#undef LOCTEXT_NAMESPACE
|