2022-06-15 05:19:02 -04:00
// Copyright Epic Games, Inc. All Rights Reserved.
# include "MovieSceneToolsModule.h"
# include "Editor.h"
# include "Modules/ModuleManager.h"
# include "Curves/RichCurve.h"
# include "ISequencerModule.h"
# include "ICurveEditorModule.h"
# include "MovieSceneToolsProjectSettingsCustomization.h"
# include "MovieSceneCVarOverridesPropertyTypeCustomization.h"
# include "Engine/Blueprint.h"
# include "EdGraph/EdGraph.h"
# include "K2Node_CustomEvent.h"
# include "K2Node_FunctionEntry.h"
# include "KismetCompiler.h"
# include "Sections/MovieSceneEventSectionBase.h"
2022-07-12 13:45:01 -04:00
# include "Sections/MovieSceneParticleSection.h"
2022-06-15 05:19:02 -04:00
# include "TrackEditors/PropertyTrackEditors/BoolPropertyTrackEditor.h"
# include "TrackEditors/PropertyTrackEditors/BytePropertyTrackEditor.h"
# include "TrackEditors/PropertyTrackEditors/ColorPropertyTrackEditor.h"
# include "TrackEditors/PropertyTrackEditors/FloatPropertyTrackEditor.h"
# include "TrackEditors/PropertyTrackEditors/DoublePropertyTrackEditor.h"
# include "TrackEditors/PropertyTrackEditors/IntegerPropertyTrackEditor.h"
# include "TrackEditors/PropertyTrackEditors/VectorPropertyTrackEditor.h"
# include "TrackEditors/PropertyTrackEditors/TransformPropertyTrackEditor.h"
# include "TrackEditors/PropertyTrackEditors/EulerTransformPropertyTrackEditor.h"
2024-07-22 06:23:21 -04:00
# include "TrackEditors/PropertyTrackEditors/RotatorPropertyTrackEditor.h"
2022-06-15 05:19:02 -04:00
# include "TrackEditors/PropertyTrackEditors/VisibilityPropertyTrackEditor.h"
# include "TrackEditors/PropertyTrackEditors/ActorReferencePropertyTrackEditor.h"
# include "TrackEditors/PropertyTrackEditors/StringPropertyTrackEditor.h"
# include "TrackEditors/TransformTrackEditor.h"
# include "TrackEditors/CameraCutTrackEditor.h"
# include "TrackEditors/CinematicShotTrackEditor.h"
# include "TrackEditors/SlomoTrackEditor.h"
# include "TrackEditors/SubTrackEditor.h"
# include "TrackEditors/AudioTrackEditor.h"
# include "TrackEditors/SkeletalAnimationTrackEditor.h"
# include "TrackEditors/ParticleTrackEditor.h"
# include "TrackEditors/ParticleParameterTrackEditor.h"
# include "TrackEditors/AttachTrackEditor.h"
# include "TrackEditors/EventTrackEditor.h"
# include "TrackEditors/PathTrackEditor.h"
# include "TrackEditors/MaterialTrackEditor.h"
# include "TrackEditors/FadeTrackEditor.h"
# include "TrackEditors/SpawnTrackEditor.h"
# include "TrackEditors/LevelVisibilityTrackEditor.h"
# include "TrackEditors/DataLayerTrackEditor.h"
# include "TrackEditors/CameraShakeTrackEditor.h"
# include "TrackEditors/MaterialParameterCollectionTrackEditor.h"
# include "TrackEditors/ObjectPropertyTrackEditor.h"
# include "TrackEditors/PrimitiveMaterialTrackEditor.h"
# include "TrackEditors/CameraShakeSourceShakeTrackEditor.h"
# include "TrackEditors/CVarTrackEditor.h"
Sequencer- Adding a track for animating custom primitive data on PrimitiveComponents.
Custom primitive data is an alternative way of driving material parameters. It allows you to map any of 36 numbered float parameters on a PrimitiveComponent to one or more material parameters across multiple meshes and materials. You can apportion between 1-4 slots in a row to handle anything from scalar to color parameters. Previously these could only be set via code or blueprint, but now these can be animated in Sequencer.
A custom primitive data track can be added to a Primitive Component binding track in Sequencer.
From there, you can choose to add a float, Vector2D, Vector, or Color parameter, choosing the custom primitive data start index the parameter starts from. The UI will also scan the primitive component for material parameters currently mapped to any index to give you helpful suggestions for which parameters you may want to add. These parameters can then be animated and blended just like any parameter of that type.
As this was a new track, we had to build a new track editor, track, and section. The section inherits from MovieSceneParameterSection, as this was already capable of animating parameters of these types. We use the unique start index of the parameter as the name for these parameter sections.
To create the dynamic tooltips that show which material parameters the custom primitive data entries are mapped to, a change was made to the tooltiptext channel metadata to take a lambda instead of just an FText. This allows the tooltips to be generated live, so any changes to materials will be taken into account in the tooltip.
A new screenshot autotest using the feature was also created.
#jira UE-158852
[REVIEW] [at]ue-sequencer
[CL 27300987 by david bromberg in ue5-main branch]
2023-08-23 05:36:36 -04:00
# include "TrackEditors/CustomPrimitiveDataTrackEditor.h"
2023-11-10 07:34:17 -05:00
# include "TrackEditors/BindingLifetimeTrackEditor.h"
Sequencer: Added time-warp capabilities to sequences, sub-sections and skeletal animation sections
This is a large suite of changes that are being submitted in bulk for build-health reasons:
Core machinery:
- FMovieSceneNumericVariant: This is the base variant type that represents either a double, or a custom object. It is not much use on its own, but provides the basis for the time-warp variant, and will be the basis for parameterization.
- FMovieSceneTimeWarpVariant: This is a drop in replacement for a double PlayRate/TimeScale UProperty that can now represent a time-warp or play rate curve, a loop, a clamp, or a fixed time. It also provides functionality for remapping time, and inverse remapping time.
- The following interpolation types have been added/improved to add Derivative and Integral functionality
* FConstantValue: Represents a curve of the form y=c
* FLinearInterpolation: Represents a curve of the form y=mx + c
* FQuadraticInterpolation: Represents a curve of the form y=ax^2 + bx + c.
* FCubicInterpolation: Represents a curve of the form y=ax^3 + bx^2 + cx + d.
* FQuarticInterpolation: Represents a curve of the form y=ax^4 + bx^3 + cx^2 + dx + e. Does not support integration.
* FCubicBezierInterpolation now has an AsCubic method that converts it to a cubic polynomial form, which also allows derivative/integral functionality.
- FPiecewiseCurve(Model): A generic read-only piecewise curve implementation and curve editor model. Used to display derivative curves for playrate.
- FMovieSceneTimingParameters: A struct for specifying section timing that simplifies computation of a transform. I wanted to replace all implementations with this but current deprecation mechanisms were prohibitively restrictive. More work will be needed there to remove legacy code.
- FMovieSceneTimeWarpChannel: A new channel type that defines time in one of two domains: PlayRate or Time
Curve Editor: Added the ability to specify custom axes and child curves
- Custom Axes:
* Custom axes can now be assigned to each curve within a view, and the axis defines the scaling for that curve.
* This allows us to have multiple different 'spaces' on the same view that have vastly different scales (for instance, play rate, and tick resolution times)
- Child Curves:
* Child curves are added whenever their parent is added. This allows us to show the derivative of a play rate curve on the curve editor.
Sequencer: Added Owning Object and key offsets to channel meta-data and curve models, made Sequencer key-editors polymorphic,
- New options on channel proxy entries allow us to specify that a channel's keys are relative to their section start time via a key offset
- New options in the curve editor models allow for a non-UMovieSceneSection owner object type
#jira UE-149871
#rb Ludovic.Chabant, David.Bromberg, Max.Chen
[CL 34813298 by andrew rodham in ue5-main branch]
2024-07-15 10:52:09 -04:00
# include "TrackEditors/TimeWarpTrackEditor.h"
2022-06-15 05:19:02 -04:00
2022-08-23 23:19:26 -04:00
# include "Channels/PerlinNoiseChannelInterface.h"
2022-06-15 05:19:02 -04:00
# include "MVVM/ViewModels/CameraCutTrackModel.h"
# include "MVVM/ViewModels/CinematicShotTrackModel.h"
2023-11-10 07:34:17 -05:00
# include "MVVM/ViewModels/BindingLifetimeTrackModel.h"
2022-06-15 05:19:02 -04:00
# include "MovieSceneBuiltInEasingFunctionCustomization.h"
2022-10-25 03:28:25 -04:00
# include "MovieSceneAlphaBlendOptionCustomization.h"
2022-06-15 05:19:02 -04:00
# include "MovieSceneObjectBindingIDCustomization.h"
2023-03-30 17:57:41 -04:00
# include "MovieSceneDynamicBindingCustomization.h"
2022-06-15 05:19:02 -04:00
# include "MovieSceneEventCustomization.h"
Sequencer: Added time-warp capabilities to sequences, sub-sections and skeletal animation sections
This is a large suite of changes that are being submitted in bulk for build-health reasons:
Core machinery:
- FMovieSceneNumericVariant: This is the base variant type that represents either a double, or a custom object. It is not much use on its own, but provides the basis for the time-warp variant, and will be the basis for parameterization.
- FMovieSceneTimeWarpVariant: This is a drop in replacement for a double PlayRate/TimeScale UProperty that can now represent a time-warp or play rate curve, a loop, a clamp, or a fixed time. It also provides functionality for remapping time, and inverse remapping time.
- The following interpolation types have been added/improved to add Derivative and Integral functionality
* FConstantValue: Represents a curve of the form y=c
* FLinearInterpolation: Represents a curve of the form y=mx + c
* FQuadraticInterpolation: Represents a curve of the form y=ax^2 + bx + c.
* FCubicInterpolation: Represents a curve of the form y=ax^3 + bx^2 + cx + d.
* FQuarticInterpolation: Represents a curve of the form y=ax^4 + bx^3 + cx^2 + dx + e. Does not support integration.
* FCubicBezierInterpolation now has an AsCubic method that converts it to a cubic polynomial form, which also allows derivative/integral functionality.
- FPiecewiseCurve(Model): A generic read-only piecewise curve implementation and curve editor model. Used to display derivative curves for playrate.
- FMovieSceneTimingParameters: A struct for specifying section timing that simplifies computation of a transform. I wanted to replace all implementations with this but current deprecation mechanisms were prohibitively restrictive. More work will be needed there to remove legacy code.
- FMovieSceneTimeWarpChannel: A new channel type that defines time in one of two domains: PlayRate or Time
Curve Editor: Added the ability to specify custom axes and child curves
- Custom Axes:
* Custom axes can now be assigned to each curve within a view, and the axis defines the scaling for that curve.
* This allows us to have multiple different 'spaces' on the same view that have vastly different scales (for instance, play rate, and tick resolution times)
- Child Curves:
* Child curves are added whenever their parent is added. This allows us to show the derivative of a play rate curve on the curve editor.
Sequencer: Added Owning Object and key offsets to channel meta-data and curve models, made Sequencer key-editors polymorphic,
- New options on channel proxy entries allow us to specify that a channel's keys are relative to their section start time via a key offset
- New options in the curve editor models allow for a non-UMovieSceneSection owner object type
#jira UE-149871
#rb Ludovic.Chabant, David.Bromberg, Max.Chen
[CL 34813298 by andrew rodham in ue5-main branch]
2024-07-15 10:52:09 -04:00
# include "MovieSceneTimeWarpVariantCustomization.h"
Sequencer- Conditions
Core Condition Framework and Logic.
This changelist introduces movie scene conditions. Conditions can optionally be placed on Tracks, Sections, and Track Rows. If a condition evaluates to false, then the track, section, or track row will not evaluate. This allows developers to author Sequences with dynamic elements, for example:
* Different lighting for different times of day
* Different camera behavior or animation depending on bound character
* Different elements based on platform or performance metrics
Users can author their own condition classes in C++ or blueprints. A separate changelist will allow users to author director blueprint conditions in the sequence's blueprint.
Conditions are implemented as instanced UObjects that are stored in the MovieScene and referenced by their attached element (track, section) and as a separate piece of entity metadata in the compilation step. This entity metadata is evaluated by the entity ledger. Conditions can specify how often they need to be evaluated (once, or every tick), as well as what context they depend on for uniqueness (e.g. bound object or global context) for performance so they don't need to be evaluated more than necessary.
A note on Track Row Conditions- these have been implemented as part of a new 'Track Row Metadata' struct tying track row index to the metadata. While track row index can change, we keep track of these changes and move the metadata accordingly between these rows.
Finally a Group Condition class has been implemented as part of this changelist, allowing simple logic trees of conditions to be created. More complex logic would better be implemented as its own blueprint class or in the director blueprint. We use this group condition to combine track, section, and track row conditions as necessary.
For now, we prohibit Movie Scene Conditions from being used in UEFN Sequencer based on not exposing the UMovieSceneCondition class.
Director Blueprint Condition.
Adding condition type for 'Director Blueprint' conditions- allowing users to specify the logic for their movie scene condition within the Sequence director blueprint.
Sequencer- Condition framework UI customization and miscellaneous.
UI/details view customization for adding conditions in Sequencer. Adds a custom menu for selecting condition classes, creating new blueprint condition classes, or adding a director blueprint condition. Includes prevention for this UX to be used within UEFN Sequencer.
[REVIEW] [at]ue-sequencer
#jira UE-209603
#rb Max.Chen
[CL 35590470 by david bromberg in ue5-main branch]
2024-08-16 06:46:08 -04:00
# include "Conditions/MovieSceneConditionCustomization.h"
2022-06-15 05:19:02 -04:00
# include "SequencerClipboardReconciler.h"
# include "ClipboardTypes.h"
# include "ISettingsModule.h"
# include "PropertyEditorModule.h"
# include "IMovieSceneTools.h"
# include "IMovieSceneToolsTrackImporter.h"
# include "MovieSceneToolsProjectSettings.h"
# include "ISequencerChannelInterface.h"
# include "SequencerChannelInterface.h"
# include "Channels/BuiltInChannelEditors.h"
2022-07-12 13:45:01 -04:00
# include "Channels/MovieSceneByteChannel.h"
# include "Channels/MovieSceneChannel.h"
2022-06-15 05:19:02 -04:00
# include "Channels/MovieSceneEventChannel.h"
Sequencer: Added time-warp capabilities to sequences, sub-sections and skeletal animation sections
This is a large suite of changes that are being submitted in bulk for build-health reasons:
Core machinery:
- FMovieSceneNumericVariant: This is the base variant type that represents either a double, or a custom object. It is not much use on its own, but provides the basis for the time-warp variant, and will be the basis for parameterization.
- FMovieSceneTimeWarpVariant: This is a drop in replacement for a double PlayRate/TimeScale UProperty that can now represent a time-warp or play rate curve, a loop, a clamp, or a fixed time. It also provides functionality for remapping time, and inverse remapping time.
- The following interpolation types have been added/improved to add Derivative and Integral functionality
* FConstantValue: Represents a curve of the form y=c
* FLinearInterpolation: Represents a curve of the form y=mx + c
* FQuadraticInterpolation: Represents a curve of the form y=ax^2 + bx + c.
* FCubicInterpolation: Represents a curve of the form y=ax^3 + bx^2 + cx + d.
* FQuarticInterpolation: Represents a curve of the form y=ax^4 + bx^3 + cx^2 + dx + e. Does not support integration.
* FCubicBezierInterpolation now has an AsCubic method that converts it to a cubic polynomial form, which also allows derivative/integral functionality.
- FPiecewiseCurve(Model): A generic read-only piecewise curve implementation and curve editor model. Used to display derivative curves for playrate.
- FMovieSceneTimingParameters: A struct for specifying section timing that simplifies computation of a transform. I wanted to replace all implementations with this but current deprecation mechanisms were prohibitively restrictive. More work will be needed there to remove legacy code.
- FMovieSceneTimeWarpChannel: A new channel type that defines time in one of two domains: PlayRate or Time
Curve Editor: Added the ability to specify custom axes and child curves
- Custom Axes:
* Custom axes can now be assigned to each curve within a view, and the axis defines the scaling for that curve.
* This allows us to have multiple different 'spaces' on the same view that have vastly different scales (for instance, play rate, and tick resolution times)
- Child Curves:
* Child curves are added whenever their parent is added. This allows us to show the derivative of a play rate curve on the curve editor.
Sequencer: Added Owning Object and key offsets to channel meta-data and curve models, made Sequencer key-editors polymorphic,
- New options on channel proxy entries allow us to specify that a channel's keys are relative to their section start time via a key offset
- New options in the curve editor models allow for a non-UMovieSceneSection owner object type
#jira UE-149871
#rb Ludovic.Chabant, David.Bromberg, Max.Chen
[CL 34813298 by andrew rodham in ue5-main branch]
2024-07-15 10:52:09 -04:00
# include "Channels/MovieSceneTimeWarpChannel.h"
2022-07-12 13:45:01 -04:00
# include "Channels/MovieSceneObjectPathChannel.h"
2022-06-15 05:19:02 -04:00
# include "Channels/MovieSceneCameraShakeSourceTriggerChannel.h"
2022-07-12 13:45:01 -04:00
# include "Channels/MovieSceneStringChannel.h"
2022-08-23 23:19:26 -04:00
# include "Channels/MovieSceneFloatPerlinNoiseChannel.h"
# include "Channels/MovieSceneDoublePerlinNoiseChannel.h"
2022-06-15 05:19:02 -04:00
# include "Channels/EventChannelCurveModel.h"
# include "Channels/SCurveEditorEventChannelView.h"
# include "Channels/MovieSceneAudioTriggerChannel.h"
2022-07-06 13:49:40 -04:00
# include "ConstraintChannel.h"
2022-06-15 05:19:02 -04:00
# include "Channels/ConstraintChannelEditor.h"
2022-07-13 17:48:50 -04:00
# include "Channels/ConstraintChannelCurveModel.h"
# include "Channels/SCurveEditorKeyBarView.h"
2022-06-15 05:19:02 -04:00
# include "Sections/MovieSceneEventSection.h"
2022-08-23 23:19:26 -04:00
# include "Channels/MovieSceneDoublePerlinNoiseChannelContainer.h"
# include "Channels/MovieSceneFloatPerlinNoiseChannelContainer.h"
# include "Channels/PerlinNoiseChannelDetailsCustomization.h"
2022-06-15 05:19:02 -04:00
# include "MovieSceneEventUtils.h"
# include "EntitySystem/MovieSceneEntityManager.h"
# include "EditorModeManager.h"
# include "EditModes/SkeletalAnimationTrackEditMode.h"
# include "ClassViewerFilter.h"
# include "ClassViewerModule.h"
# include "LevelSequence.h"
# include "LevelSequenceAnimSequenceLink.h"
# include "AnimSequenceLevelSequenceLink.h"
# include "EditorAnimUtils.h"
2022-07-14 14:54:07 -04:00
# include "Animation/AnimSequence.h"
2022-06-15 05:19:02 -04:00
2023-01-05 04:08:25 -05:00
# include "TransformableHandle.h"
# include "Constraints/ComponentConstraintChannelInterface.h"
# include "Constraints/TransformConstraintChannelInterface.h"
Sequencer- Resubmission of changelist 34065553 that had been backed out for a versioning issue which is now fixed. Original description below:
Sequencer- Dynamic Binding Refactor
Refactor the 'Dynamic Binding' blueprint system to be Custom Bindings rather than tied directly to FMovieScenePossessable and FMovieSceneSpawnable. As part of this:
? Created UMovieSceneReplaceableDirectorBlueprintBinding and UMovieSceneSpawnableDirectorBlueprintBinding to replace the Possessable and Spawnable versions of DynamicBindings
? Deprecated the DynamicBinding references on possessable and spawnable and created Postload fixup code to automatically create custom bindings instead
? Note that because the previous Dynamic Bindings operated as overrides and the new ones don't, there is a no longer supported path which is using Possessables as a preview in editor for Possessable Dynamic Bindings. Now if you don't mark 'Call in Editor' for a Replaceable Director Blueprint binding, you'll need to define a spawnable preview binding for the binding in order to work with it in Sequencer.
? Since UMG also used Dynamic Bindings on possessables, temporarily add DynamicBinding as a member variable on FWidgetAnimationBinding and create postload logic to move DynamicBindings to live on there for WidgetAnimations.
? USD has custom code to create dynamic bindings automatically for its use case. Convert this also to use the new custom binding system.
? Some cleanup on object binding right-click menus was done as part of this.
? Some further MovieSceneSequence API deprecation and refactoring has been done for the creation of bindings to add SharedPlaybackState where possible which was necessary for dynamic binding setup.
FMovieSceneSpawnable deprecation in Level Sequences
Since I was having to write postload fixup logic for FMovieSceneSpawnables with Dynamic Bindings that converted these to FMovieScenePossessables with custom bindings, it felt like a good chance to deprecate all FMovieSceneSpawnable use in Level Sequences.
I chose at this time not to deprecate FMovieSceneSpawnable use for non-Level-Sequence Movie Scene Sequences. This includes Day Sequences, Template Sequences, Actor Sequences, Widget Animations, Niagara Sequences, and some Meta Human sequences. I made this choice because to do so would require also refactoring those sequence types to use MovieSceneBindingReferences in order to enable custom bindings for those sequence types. This will be a future refactor.
Some notes on this deprecation.
? I kept MovieScene specific code that references or creates FMovieSceneSpawnables due to not refactoring all MovieSceneSequences
? Binding creation code in tools such as Sequencer will check for the presence of Binding References and create custom bindings if present, otherwise will still create FMovieSceneSpawnables
? AvaSequences required some extra work to make this change, including some changes and bugfixes to copy/pasting bindings to move away from custom avalanche copy/paste code, as the copy/paste code for custom bindings is a bit intricate and I didn't want to duplicate it.
? Chaos Cache has been moved away from using an object spawner and instead uses a custom spawnable actor binding inheriting from the regular spawnable actor binding.
? Actor and Take Recording has been updated to support custom spawnable bindings
? Meta Human specific code has been updated to support custom spawnable bindings when using Level Sequences
? FortniteMainBranchObjectVersion has been bumped
Crash fix
As part of the USD work, I found a crash bug where the Binding Properties menu would hold a reference to a level sequence. In the case of USD, the outer of the sequences can be the level, and this caused issues when switching levels. To fix this I ended up needing to add some events when menus are being dismissed so I could clean up these references.
#jira UE-209839, UE-209548, UE-213115, UE-214195, UE-214443
#rb Marc.Audy
#lockdown Marc.Audy
[FYI] juan.portillo, Viktar.Mikhalchuk, Darrien.Blanchard, patrick.boutot
[CL 34127005 by david bromberg in ue5-main branch]
2024-06-05 11:54:07 -04:00
# include "Bindings/MovieSceneReplaceableDirectorBlueprintBinding.h"
# include "Bindings/MovieSceneSpawnableDirectorBlueprintBinding.h"
# include "EntitySystem/MovieSceneSharedPlaybackState.h"
# include "MovieSceneDynamicBindingUtils.h"
2024-09-10 13:26:49 -04:00
# include "EditModes/SubTrackEditorMode.h"
Sequencer- Resubmission of changelist 34065553 that had been backed out for a versioning issue which is now fixed. Original description below:
Sequencer- Dynamic Binding Refactor
Refactor the 'Dynamic Binding' blueprint system to be Custom Bindings rather than tied directly to FMovieScenePossessable and FMovieSceneSpawnable. As part of this:
? Created UMovieSceneReplaceableDirectorBlueprintBinding and UMovieSceneSpawnableDirectorBlueprintBinding to replace the Possessable and Spawnable versions of DynamicBindings
? Deprecated the DynamicBinding references on possessable and spawnable and created Postload fixup code to automatically create custom bindings instead
? Note that because the previous Dynamic Bindings operated as overrides and the new ones don't, there is a no longer supported path which is using Possessables as a preview in editor for Possessable Dynamic Bindings. Now if you don't mark 'Call in Editor' for a Replaceable Director Blueprint binding, you'll need to define a spawnable preview binding for the binding in order to work with it in Sequencer.
? Since UMG also used Dynamic Bindings on possessables, temporarily add DynamicBinding as a member variable on FWidgetAnimationBinding and create postload logic to move DynamicBindings to live on there for WidgetAnimations.
? USD has custom code to create dynamic bindings automatically for its use case. Convert this also to use the new custom binding system.
? Some cleanup on object binding right-click menus was done as part of this.
? Some further MovieSceneSequence API deprecation and refactoring has been done for the creation of bindings to add SharedPlaybackState where possible which was necessary for dynamic binding setup.
FMovieSceneSpawnable deprecation in Level Sequences
Since I was having to write postload fixup logic for FMovieSceneSpawnables with Dynamic Bindings that converted these to FMovieScenePossessables with custom bindings, it felt like a good chance to deprecate all FMovieSceneSpawnable use in Level Sequences.
I chose at this time not to deprecate FMovieSceneSpawnable use for non-Level-Sequence Movie Scene Sequences. This includes Day Sequences, Template Sequences, Actor Sequences, Widget Animations, Niagara Sequences, and some Meta Human sequences. I made this choice because to do so would require also refactoring those sequence types to use MovieSceneBindingReferences in order to enable custom bindings for those sequence types. This will be a future refactor.
Some notes on this deprecation.
? I kept MovieScene specific code that references or creates FMovieSceneSpawnables due to not refactoring all MovieSceneSequences
? Binding creation code in tools such as Sequencer will check for the presence of Binding References and create custom bindings if present, otherwise will still create FMovieSceneSpawnables
? AvaSequences required some extra work to make this change, including some changes and bugfixes to copy/pasting bindings to move away from custom avalanche copy/paste code, as the copy/paste code for custom bindings is a bit intricate and I didn't want to duplicate it.
? Chaos Cache has been moved away from using an object spawner and instead uses a custom spawnable actor binding inheriting from the regular spawnable actor binding.
? Actor and Take Recording has been updated to support custom spawnable bindings
? Meta Human specific code has been updated to support custom spawnable bindings when using Level Sequences
? FortniteMainBranchObjectVersion has been bumped
Crash fix
As part of the USD work, I found a crash bug where the Binding Properties menu would hold a reference to a level sequence. In the case of USD, the outer of the sequences can be the level, and this caused issues when switching levels. To fix this I ended up needing to add some events when menus are being dismissed so I could clean up these references.
#jira UE-209839, UE-209548, UE-213115, UE-214195, UE-214443
#rb Marc.Audy
#lockdown Marc.Audy
[FYI] juan.portillo, Viktar.Mikhalchuk, Darrien.Blanchard, patrick.boutot
[CL 34127005 by david bromberg in ue5-main branch]
2024-06-05 11:54:07 -04:00
# include "Kismet2/KismetEditorUtilities.h"
2023-01-05 04:08:25 -05:00
Sequencer- Conditions
Core Condition Framework and Logic.
This changelist introduces movie scene conditions. Conditions can optionally be placed on Tracks, Sections, and Track Rows. If a condition evaluates to false, then the track, section, or track row will not evaluate. This allows developers to author Sequences with dynamic elements, for example:
* Different lighting for different times of day
* Different camera behavior or animation depending on bound character
* Different elements based on platform or performance metrics
Users can author their own condition classes in C++ or blueprints. A separate changelist will allow users to author director blueprint conditions in the sequence's blueprint.
Conditions are implemented as instanced UObjects that are stored in the MovieScene and referenced by their attached element (track, section) and as a separate piece of entity metadata in the compilation step. This entity metadata is evaluated by the entity ledger. Conditions can specify how often they need to be evaluated (once, or every tick), as well as what context they depend on for uniqueness (e.g. bound object or global context) for performance so they don't need to be evaluated more than necessary.
A note on Track Row Conditions- these have been implemented as part of a new 'Track Row Metadata' struct tying track row index to the metadata. While track row index can change, we keep track of these changes and move the metadata accordingly between these rows.
Finally a Group Condition class has been implemented as part of this changelist, allowing simple logic trees of conditions to be created. More complex logic would better be implemented as its own blueprint class or in the director blueprint. We use this group condition to combine track, section, and track row conditions as necessary.
For now, we prohibit Movie Scene Conditions from being used in UEFN Sequencer based on not exposing the UMovieSceneCondition class.
Director Blueprint Condition.
Adding condition type for 'Director Blueprint' conditions- allowing users to specify the logic for their movie scene condition within the Sequence director blueprint.
Sequencer- Condition framework UI customization and miscellaneous.
UI/details view customization for adding conditions in Sequencer. Adds a custom menu for selecting condition classes, creating new blueprint condition classes, or adding a director blueprint condition. Includes prevention for this UX to be used within UEFN Sequencer.
[REVIEW] [at]ue-sequencer
#jira UE-209603
#rb Max.Chen
[CL 35590470 by david bromberg in ue5-main branch]
2024-08-16 06:46:08 -04:00
# include "Conditions/MovieSceneDirectorBlueprintCondition.h"
# include "Conditions/MovieSceneDirectorBlueprintConditionUtils.h"
# include "Conditions/MovieSceneDirectorBlueprintConditionCustomization.h"
2024-08-26 11:29:50 -04:00
# include "Conditions/MovieScenePlatformConditionCustomization.h"
Sequencer- Conditions
Core Condition Framework and Logic.
This changelist introduces movie scene conditions. Conditions can optionally be placed on Tracks, Sections, and Track Rows. If a condition evaluates to false, then the track, section, or track row will not evaluate. This allows developers to author Sequences with dynamic elements, for example:
* Different lighting for different times of day
* Different camera behavior or animation depending on bound character
* Different elements based on platform or performance metrics
Users can author their own condition classes in C++ or blueprints. A separate changelist will allow users to author director blueprint conditions in the sequence's blueprint.
Conditions are implemented as instanced UObjects that are stored in the MovieScene and referenced by their attached element (track, section) and as a separate piece of entity metadata in the compilation step. This entity metadata is evaluated by the entity ledger. Conditions can specify how often they need to be evaluated (once, or every tick), as well as what context they depend on for uniqueness (e.g. bound object or global context) for performance so they don't need to be evaluated more than necessary.
A note on Track Row Conditions- these have been implemented as part of a new 'Track Row Metadata' struct tying track row index to the metadata. While track row index can change, we keep track of these changes and move the metadata accordingly between these rows.
Finally a Group Condition class has been implemented as part of this changelist, allowing simple logic trees of conditions to be created. More complex logic would better be implemented as its own blueprint class or in the director blueprint. We use this group condition to combine track, section, and track row conditions as necessary.
For now, we prohibit Movie Scene Conditions from being used in UEFN Sequencer based on not exposing the UMovieSceneCondition class.
Director Blueprint Condition.
Adding condition type for 'Director Blueprint' conditions- allowing users to specify the logic for their movie scene condition within the Sequence director blueprint.
Sequencer- Condition framework UI customization and miscellaneous.
UI/details view customization for adding conditions in Sequencer. Adds a custom menu for selecting condition classes, creating new blueprint condition classes, or adding a director blueprint condition. Includes prevention for this UX to be used within UEFN Sequencer.
[REVIEW] [at]ue-sequencer
#jira UE-209603
#rb Max.Chen
[CL 35590470 by david bromberg in ue5-main branch]
2024-08-16 06:46:08 -04:00
2022-06-15 05:19:02 -04:00
# define LOCTEXT_NAMESPACE "FMovieSceneToolsModule"
2022-07-07 23:37:28 -04:00
TAutoConsoleVariable < bool > CVarDuplicateLinkedAnimSequence ( TEXT ( " Sequencer.DuplicateLinkedAnimSequence " ) , false , TEXT ( " When true when we duplicate a level sequence that has a linked anim sequence it will duplicate and link the anim sequencel, if false we leave any link alone. " ) ) ;
2022-06-15 05:19:02 -04:00
# if !IS_MONOLITHIC
2024-05-14 20:25:36 -04:00
UE_SELECT_ANY UE : : MovieScene : : FEntityManager * & GEntityManagerForDebugging = UE : : MovieScene : : GEntityManagerForDebuggingVisualizers ;
2022-06-15 05:19:02 -04:00
# endif
void FMovieSceneToolsModule : : StartupModule ( )
{
using namespace UE : : Sequencer ;
if ( GIsEditor )
{
if ( ISettingsModule * SettingsModule = FModuleManager : : GetModulePtr < ISettingsModule > ( " Settings " ) )
{
SettingsModule - > RegisterSettings ( " Project " , " Editor " , " Level Sequences " ,
LOCTEXT ( " RuntimeSettingsName " , " Level Sequences " ) ,
LOCTEXT ( " RuntimeSettingsDescription " , " Configure project settings relating to Level Sequences " ) ,
GetMutableDefault < UMovieSceneToolsProjectSettings > ( )
) ;
}
ISequencerModule & SequencerModule = FModuleManager : : Get ( ) . LoadModuleChecked < ISequencerModule > ( " Sequencer " ) ;
// register property track editors
BoolPropertyTrackCreateEditorHandle = SequencerModule . RegisterPropertyTrackEditor < FBoolPropertyTrackEditor > ( ) ;
BytePropertyTrackCreateEditorHandle = SequencerModule . RegisterPropertyTrackEditor < FBytePropertyTrackEditor > ( ) ;
ColorPropertyTrackCreateEditorHandle = SequencerModule . RegisterPropertyTrackEditor < FColorPropertyTrackEditor > ( ) ;
FloatPropertyTrackCreateEditorHandle = SequencerModule . RegisterPropertyTrackEditor < FFloatPropertyTrackEditor > ( ) ;
DoublePropertyTrackCreateEditorHandle = SequencerModule . RegisterPropertyTrackEditor < FDoublePropertyTrackEditor > ( ) ;
IntegerPropertyTrackCreateEditorHandle = SequencerModule . RegisterPropertyTrackEditor < FIntegerPropertyTrackEditor > ( ) ;
FloatVectorPropertyTrackCreateEditorHandle = SequencerModule . RegisterPropertyTrackEditor < FFloatVectorPropertyTrackEditor > ( ) ;
DoubleVectorPropertyTrackCreateEditorHandle = SequencerModule . RegisterPropertyTrackEditor < FDoubleVectorPropertyTrackEditor > ( ) ;
TransformPropertyTrackCreateEditorHandle = SequencerModule . RegisterPropertyTrackEditor < FTransformPropertyTrackEditor > ( ) ;
EulerTransformPropertyTrackCreateEditorHandle = SequencerModule . RegisterPropertyTrackEditor < FEulerTransformPropertyTrackEditor > ( ) ;
2024-07-22 06:23:21 -04:00
RotatorPropertyTrackCreateEditorHandle = SequencerModule . RegisterPropertyTrackEditor < FRotatorPropertyTrackEditor > ( ) ;
2022-06-15 05:19:02 -04:00
VisibilityPropertyTrackCreateEditorHandle = SequencerModule . RegisterPropertyTrackEditor < FVisibilityPropertyTrackEditor > ( ) ;
ActorReferencePropertyTrackCreateEditorHandle = SequencerModule . RegisterPropertyTrackEditor < FActorReferencePropertyTrackEditor > ( ) ;
StringPropertyTrackCreateEditorHandle = SequencerModule . RegisterPropertyTrackEditor < FStringPropertyTrackEditor > ( ) ;
ObjectTrackCreateEditorHandle = SequencerModule . RegisterPropertyTrackEditor < FObjectPropertyTrackEditor > ( ) ;
// register specialty track editors
AnimationTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & FSkeletalAnimationTrackEditor : : CreateTrackEditor ) ) ;
AttachTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & F3DAttachTrackEditor : : CreateTrackEditor ) ) ;
AudioTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & FAudioTrackEditor : : CreateTrackEditor ) ) ;
EventTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & FEventTrackEditor : : CreateTrackEditor ) ) ;
ParticleTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & FParticleTrackEditor : : CreateTrackEditor ) ) ;
ParticleParameterTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & FParticleParameterTrackEditor : : CreateTrackEditor ) ) ;
PathTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & F3DPathTrackEditor : : CreateTrackEditor ) ) ;
CameraCutTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & FCameraCutTrackEditor : : CreateTrackEditor ) ) ;
CinematicShotTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & FCinematicShotTrackEditor : : CreateTrackEditor ) ) ;
SlomoTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & FSlomoTrackEditor : : CreateTrackEditor ) ) ;
SubTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & FSubTrackEditor : : CreateTrackEditor ) ) ;
TransformTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & F3DTransformTrackEditor : : CreateTrackEditor ) ) ;
ComponentMaterialTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & FComponentMaterialTrackEditor : : CreateTrackEditor ) ) ;
FadeTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & FFadeTrackEditor : : CreateTrackEditor ) ) ;
SpawnTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & FSpawnTrackEditor : : CreateTrackEditor ) ) ;
LevelVisibilityTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & FLevelVisibilityTrackEditor : : CreateTrackEditor ) ) ;
DataLayerTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & FDataLayerTrackEditor : : CreateTrackEditor ) ) ;
CameraShakeTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & FCameraShakeTrackEditor : : CreateTrackEditor ) ) ;
MPCTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & FMaterialParameterCollectionTrackEditor : : CreateTrackEditor ) ) ;
PrimitiveMaterialCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & FPrimitiveMaterialTrackEditor : : CreateTrackEditor ) ) ;
CameraShakeSourceShakeCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & FCameraShakeSourceShakeTrackEditor : : CreateTrackEditor ) ) ;
CVarTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & FCVarTrackEditor : : CreateTrackEditor ) ) ;
2023-12-07 11:25:53 -05:00
CustomPrimitiveDataTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & FCustomPrimitiveDataTrackEditor : : CreateTrackEditor ) ) ;
2023-11-10 07:34:17 -05:00
BindingLifetimeTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & FBindingLifetimeTrackEditor : : CreateTrackEditor ) ) ;
Sequencer: Added time-warp capabilities to sequences, sub-sections and skeletal animation sections
This is a large suite of changes that are being submitted in bulk for build-health reasons:
Core machinery:
- FMovieSceneNumericVariant: This is the base variant type that represents either a double, or a custom object. It is not much use on its own, but provides the basis for the time-warp variant, and will be the basis for parameterization.
- FMovieSceneTimeWarpVariant: This is a drop in replacement for a double PlayRate/TimeScale UProperty that can now represent a time-warp or play rate curve, a loop, a clamp, or a fixed time. It also provides functionality for remapping time, and inverse remapping time.
- The following interpolation types have been added/improved to add Derivative and Integral functionality
* FConstantValue: Represents a curve of the form y=c
* FLinearInterpolation: Represents a curve of the form y=mx + c
* FQuadraticInterpolation: Represents a curve of the form y=ax^2 + bx + c.
* FCubicInterpolation: Represents a curve of the form y=ax^3 + bx^2 + cx + d.
* FQuarticInterpolation: Represents a curve of the form y=ax^4 + bx^3 + cx^2 + dx + e. Does not support integration.
* FCubicBezierInterpolation now has an AsCubic method that converts it to a cubic polynomial form, which also allows derivative/integral functionality.
- FPiecewiseCurve(Model): A generic read-only piecewise curve implementation and curve editor model. Used to display derivative curves for playrate.
- FMovieSceneTimingParameters: A struct for specifying section timing that simplifies computation of a transform. I wanted to replace all implementations with this but current deprecation mechanisms were prohibitively restrictive. More work will be needed there to remove legacy code.
- FMovieSceneTimeWarpChannel: A new channel type that defines time in one of two domains: PlayRate or Time
Curve Editor: Added the ability to specify custom axes and child curves
- Custom Axes:
* Custom axes can now be assigned to each curve within a view, and the axis defines the scaling for that curve.
* This allows us to have multiple different 'spaces' on the same view that have vastly different scales (for instance, play rate, and tick resolution times)
- Child Curves:
* Child curves are added whenever their parent is added. This allows us to show the derivative of a play rate curve on the curve editor.
Sequencer: Added Owning Object and key offsets to channel meta-data and curve models, made Sequencer key-editors polymorphic,
- New options on channel proxy entries allow us to specify that a channel's keys are relative to their section start time via a key offset
- New options in the curve editor models allow for a non-UMovieSceneSection owner object type
#jira UE-149871
#rb Ludovic.Chabant, David.Bromberg, Max.Chen
[CL 34813298 by andrew rodham in ue5-main branch]
2024-07-15 10:52:09 -04:00
TimeWarpTrackCreateEditorHandle = SequencerModule . RegisterTrackEditor ( FOnCreateTrackEditor : : CreateStatic ( & FTimeWarpTrackEditor : : CreateTrackEditor ) ) ;
2023-11-10 07:34:17 -05:00
2022-06-15 05:19:02 -04:00
// register track models
CameraCutTrackModelHandle = SequencerModule . RegisterTrackModel ( FOnCreateTrackModel : : CreateStatic ( & FCameraCutTrackModel : : CreateTrackModel ) ) ;
CinematicShotTrackModelHandle = SequencerModule . RegisterTrackModel ( FOnCreateTrackModel : : CreateStatic ( & FCinematicShotTrackModel : : CreateTrackModel ) ) ;
2023-11-10 07:34:17 -05:00
BindingLifetimeTrackModelHandle = SequencerModule . RegisterTrackModel ( FOnCreateTrackModel : : CreateStatic ( & FBindingLifetimeTrackModel : : CreateTrackModel ) ) ;
2024-09-18 14:06:34 -04:00
TimeWarpTrackModelHandle = SequencerModule . RegisterTrackModel ( FOnCreateTrackModel : : CreateStatic ( & FTimeWarpTrackEditor : : CreateTrackModel ) ) ;
2022-06-15 05:19:02 -04:00
RegisterClipboardConversions ( ) ;
// register details customization
FPropertyEditorModule & PropertyModule = FModuleManager : : LoadModuleChecked < FPropertyEditorModule > ( " PropertyEditor " ) ;
PropertyModule . RegisterCustomClassLayout ( " MovieSceneToolsProjectSettings " , FOnGetDetailCustomizationInstance : : CreateStatic ( & FMovieSceneToolsProjectSettingsCustomization : : MakeInstance ) ) ;
PropertyModule . RegisterCustomClassLayout ( " MovieSceneBuiltInEasingFunction " , FOnGetDetailCustomizationInstance : : CreateLambda ( & MakeShared < FMovieSceneBuiltInEasingFunctionCustomization > ) ) ;
2022-10-25 03:28:25 -04:00
PropertyModule . RegisterCustomPropertyTypeLayout ( " EAlphaBlendOption " , FOnGetPropertyTypeCustomizationInstance : : CreateLambda ( & MakeShared < FAlphaBlendPropertyCustomization > ) ) ;
2022-08-23 23:19:26 -04:00
PropertyModule . RegisterCustomClassLayout ( " MovieSceneFloatPerlinNoiseChannelContainer " , FOnGetDetailCustomizationInstance : : CreateStatic ( & FMovieSceneFloatPerlinNoiseChannelDetailsCustomization : : MakeInstance ) ) ;
PropertyModule . RegisterCustomClassLayout ( " MovieSceneDoublePerlinNoiseChannelContainer " , FOnGetDetailCustomizationInstance : : CreateStatic ( & FMovieSceneDoublePerlinNoiseChannelDetailsCustomization : : MakeInstance ) ) ;
2022-06-15 05:19:02 -04:00
PropertyModule . RegisterCustomPropertyTypeLayout ( " MovieSceneObjectBindingID " , FOnGetPropertyTypeCustomizationInstance : : CreateLambda ( & MakeShared < FMovieSceneObjectBindingIDCustomization > ) ) ;
2023-03-30 17:57:41 -04:00
PropertyModule . RegisterCustomPropertyTypeLayout ( " MovieSceneDynamicBinding " , FOnGetPropertyTypeCustomizationInstance : : CreateStatic ( & FMovieSceneDynamicBindingCustomization : : MakeInstance ) ) ;
Sequencer- Conditions
Core Condition Framework and Logic.
This changelist introduces movie scene conditions. Conditions can optionally be placed on Tracks, Sections, and Track Rows. If a condition evaluates to false, then the track, section, or track row will not evaluate. This allows developers to author Sequences with dynamic elements, for example:
* Different lighting for different times of day
* Different camera behavior or animation depending on bound character
* Different elements based on platform or performance metrics
Users can author their own condition classes in C++ or blueprints. A separate changelist will allow users to author director blueprint conditions in the sequence's blueprint.
Conditions are implemented as instanced UObjects that are stored in the MovieScene and referenced by their attached element (track, section) and as a separate piece of entity metadata in the compilation step. This entity metadata is evaluated by the entity ledger. Conditions can specify how often they need to be evaluated (once, or every tick), as well as what context they depend on for uniqueness (e.g. bound object or global context) for performance so they don't need to be evaluated more than necessary.
A note on Track Row Conditions- these have been implemented as part of a new 'Track Row Metadata' struct tying track row index to the metadata. While track row index can change, we keep track of these changes and move the metadata accordingly between these rows.
Finally a Group Condition class has been implemented as part of this changelist, allowing simple logic trees of conditions to be created. More complex logic would better be implemented as its own blueprint class or in the director blueprint. We use this group condition to combine track, section, and track row conditions as necessary.
For now, we prohibit Movie Scene Conditions from being used in UEFN Sequencer based on not exposing the UMovieSceneCondition class.
Director Blueprint Condition.
Adding condition type for 'Director Blueprint' conditions- allowing users to specify the logic for their movie scene condition within the Sequence director blueprint.
Sequencer- Condition framework UI customization and miscellaneous.
UI/details view customization for adding conditions in Sequencer. Adds a custom menu for selecting condition classes, creating new blueprint condition classes, or adding a director blueprint condition. Includes prevention for this UX to be used within UEFN Sequencer.
[REVIEW] [at]ue-sequencer
#jira UE-209603
#rb Max.Chen
[CL 35590470 by david bromberg in ue5-main branch]
2024-08-16 06:46:08 -04:00
PropertyModule . RegisterCustomPropertyTypeLayout ( " MovieSceneDirectorBlueprintConditionData " , FOnGetPropertyTypeCustomizationInstance : : CreateStatic ( & FMovieSceneDirectorBlueprintConditionCustomization : : MakeInstance ) ) ;
2022-06-15 05:19:02 -04:00
PropertyModule . RegisterCustomPropertyTypeLayout ( " MovieSceneEvent " , FOnGetPropertyTypeCustomizationInstance : : CreateStatic ( & FMovieSceneEventCustomization : : MakeInstance ) ) ;
PropertyModule . RegisterCustomPropertyTypeLayout ( " MovieSceneCVarOverrides " , FOnGetPropertyTypeCustomizationInstance : : CreateStatic ( & UE : : MovieScene : : FCVarOverridesPropertyTypeCustomization : : MakeInstance ) ) ;
Sequencer: Added time-warp capabilities to sequences, sub-sections and skeletal animation sections
This is a large suite of changes that are being submitted in bulk for build-health reasons:
Core machinery:
- FMovieSceneNumericVariant: This is the base variant type that represents either a double, or a custom object. It is not much use on its own, but provides the basis for the time-warp variant, and will be the basis for parameterization.
- FMovieSceneTimeWarpVariant: This is a drop in replacement for a double PlayRate/TimeScale UProperty that can now represent a time-warp or play rate curve, a loop, a clamp, or a fixed time. It also provides functionality for remapping time, and inverse remapping time.
- The following interpolation types have been added/improved to add Derivative and Integral functionality
* FConstantValue: Represents a curve of the form y=c
* FLinearInterpolation: Represents a curve of the form y=mx + c
* FQuadraticInterpolation: Represents a curve of the form y=ax^2 + bx + c.
* FCubicInterpolation: Represents a curve of the form y=ax^3 + bx^2 + cx + d.
* FQuarticInterpolation: Represents a curve of the form y=ax^4 + bx^3 + cx^2 + dx + e. Does not support integration.
* FCubicBezierInterpolation now has an AsCubic method that converts it to a cubic polynomial form, which also allows derivative/integral functionality.
- FPiecewiseCurve(Model): A generic read-only piecewise curve implementation and curve editor model. Used to display derivative curves for playrate.
- FMovieSceneTimingParameters: A struct for specifying section timing that simplifies computation of a transform. I wanted to replace all implementations with this but current deprecation mechanisms were prohibitively restrictive. More work will be needed there to remove legacy code.
- FMovieSceneTimeWarpChannel: A new channel type that defines time in one of two domains: PlayRate or Time
Curve Editor: Added the ability to specify custom axes and child curves
- Custom Axes:
* Custom axes can now be assigned to each curve within a view, and the axis defines the scaling for that curve.
* This allows us to have multiple different 'spaces' on the same view that have vastly different scales (for instance, play rate, and tick resolution times)
- Child Curves:
* Child curves are added whenever their parent is added. This allows us to show the derivative of a play rate curve on the curve editor.
Sequencer: Added Owning Object and key offsets to channel meta-data and curve models, made Sequencer key-editors polymorphic,
- New options on channel proxy entries allow us to specify that a channel's keys are relative to their section start time via a key offset
- New options in the curve editor models allow for a non-UMovieSceneSection owner object type
#jira UE-149871
#rb Ludovic.Chabant, David.Bromberg, Max.Chen
[CL 34813298 by andrew rodham in ue5-main branch]
2024-07-15 10:52:09 -04:00
PropertyModule . RegisterCustomPropertyTypeLayout ( " MovieSceneTimeWarpVariant " , FOnGetPropertyTypeCustomizationInstance : : CreateLambda ( & MakeShared < UE : : MovieScene : : FMovieSceneTimeWarpVariantCustomization > ) ) ;
Sequencer- Conditions
Core Condition Framework and Logic.
This changelist introduces movie scene conditions. Conditions can optionally be placed on Tracks, Sections, and Track Rows. If a condition evaluates to false, then the track, section, or track row will not evaluate. This allows developers to author Sequences with dynamic elements, for example:
* Different lighting for different times of day
* Different camera behavior or animation depending on bound character
* Different elements based on platform or performance metrics
Users can author their own condition classes in C++ or blueprints. A separate changelist will allow users to author director blueprint conditions in the sequence's blueprint.
Conditions are implemented as instanced UObjects that are stored in the MovieScene and referenced by their attached element (track, section) and as a separate piece of entity metadata in the compilation step. This entity metadata is evaluated by the entity ledger. Conditions can specify how often they need to be evaluated (once, or every tick), as well as what context they depend on for uniqueness (e.g. bound object or global context) for performance so they don't need to be evaluated more than necessary.
A note on Track Row Conditions- these have been implemented as part of a new 'Track Row Metadata' struct tying track row index to the metadata. While track row index can change, we keep track of these changes and move the metadata accordingly between these rows.
Finally a Group Condition class has been implemented as part of this changelist, allowing simple logic trees of conditions to be created. More complex logic would better be implemented as its own blueprint class or in the director blueprint. We use this group condition to combine track, section, and track row conditions as necessary.
For now, we prohibit Movie Scene Conditions from being used in UEFN Sequencer based on not exposing the UMovieSceneCondition class.
Director Blueprint Condition.
Adding condition type for 'Director Blueprint' conditions- allowing users to specify the logic for their movie scene condition within the Sequence director blueprint.
Sequencer- Condition framework UI customization and miscellaneous.
UI/details view customization for adding conditions in Sequencer. Adds a custom menu for selecting condition classes, creating new blueprint condition classes, or adding a director blueprint condition. Includes prevention for this UX to be used within UEFN Sequencer.
[REVIEW] [at]ue-sequencer
#jira UE-209603
#rb Max.Chen
[CL 35590470 by david bromberg in ue5-main branch]
2024-08-16 06:46:08 -04:00
PropertyModule . RegisterCustomPropertyTypeLayout ( " MovieSceneConditionContainer " , FOnGetPropertyTypeCustomizationInstance : : CreateStatic ( & FMovieSceneConditionCustomization : : MakeInstance ) ) ;
2024-08-26 11:29:50 -04:00
PropertyModule . RegisterCustomClassLayout ( " MovieScenePlatformCondition " , FOnGetDetailCustomizationInstance : : CreateStatic ( & FMovieScenePlatformConditionCustomization : : MakeInstance ) ) ;
Sequencer- Conditions
Core Condition Framework and Logic.
This changelist introduces movie scene conditions. Conditions can optionally be placed on Tracks, Sections, and Track Rows. If a condition evaluates to false, then the track, section, or track row will not evaluate. This allows developers to author Sequences with dynamic elements, for example:
* Different lighting for different times of day
* Different camera behavior or animation depending on bound character
* Different elements based on platform or performance metrics
Users can author their own condition classes in C++ or blueprints. A separate changelist will allow users to author director blueprint conditions in the sequence's blueprint.
Conditions are implemented as instanced UObjects that are stored in the MovieScene and referenced by their attached element (track, section) and as a separate piece of entity metadata in the compilation step. This entity metadata is evaluated by the entity ledger. Conditions can specify how often they need to be evaluated (once, or every tick), as well as what context they depend on for uniqueness (e.g. bound object or global context) for performance so they don't need to be evaluated more than necessary.
A note on Track Row Conditions- these have been implemented as part of a new 'Track Row Metadata' struct tying track row index to the metadata. While track row index can change, we keep track of these changes and move the metadata accordingly between these rows.
Finally a Group Condition class has been implemented as part of this changelist, allowing simple logic trees of conditions to be created. More complex logic would better be implemented as its own blueprint class or in the director blueprint. We use this group condition to combine track, section, and track row conditions as necessary.
For now, we prohibit Movie Scene Conditions from being used in UEFN Sequencer based on not exposing the UMovieSceneCondition class.
Director Blueprint Condition.
Adding condition type for 'Director Blueprint' conditions- allowing users to specify the logic for their movie scene condition within the Sequence director blueprint.
Sequencer- Condition framework UI customization and miscellaneous.
UI/details view customization for adding conditions in Sequencer. Adds a custom menu for selecting condition classes, creating new blueprint condition classes, or adding a director blueprint condition. Includes prevention for this UX to be used within UEFN Sequencer.
[REVIEW] [at]ue-sequencer
#jira UE-209603
#rb Max.Chen
[CL 35590470 by david bromberg in ue5-main branch]
2024-08-16 06:46:08 -04:00
2022-06-15 05:19:02 -04:00
SequencerModule . RegisterChannelInterface < FMovieSceneBoolChannel > ( ) ;
SequencerModule . RegisterChannelInterface < FMovieSceneByteChannel > ( ) ;
SequencerModule . RegisterChannelInterface < FMovieSceneIntegerChannel > ( ) ;
SequencerModule . RegisterChannelInterface < FMovieSceneFloatChannel > ( ) ;
SequencerModule . RegisterChannelInterface < FMovieSceneDoubleChannel > ( ) ;
SequencerModule . RegisterChannelInterface < FMovieSceneStringChannel > ( ) ;
SequencerModule . RegisterChannelInterface < FMovieSceneParticleChannel > ( ) ;
SequencerModule . RegisterChannelInterface < FMovieSceneActorReferenceData > ( ) ;
SequencerModule . RegisterChannelInterface < FMovieSceneEventSectionData > ( ) ;
SequencerModule . RegisterChannelInterface < FMovieSceneObjectPathChannel > ( ) ;
Sequencer: Added time-warp capabilities to sequences, sub-sections and skeletal animation sections
This is a large suite of changes that are being submitted in bulk for build-health reasons:
Core machinery:
- FMovieSceneNumericVariant: This is the base variant type that represents either a double, or a custom object. It is not much use on its own, but provides the basis for the time-warp variant, and will be the basis for parameterization.
- FMovieSceneTimeWarpVariant: This is a drop in replacement for a double PlayRate/TimeScale UProperty that can now represent a time-warp or play rate curve, a loop, a clamp, or a fixed time. It also provides functionality for remapping time, and inverse remapping time.
- The following interpolation types have been added/improved to add Derivative and Integral functionality
* FConstantValue: Represents a curve of the form y=c
* FLinearInterpolation: Represents a curve of the form y=mx + c
* FQuadraticInterpolation: Represents a curve of the form y=ax^2 + bx + c.
* FCubicInterpolation: Represents a curve of the form y=ax^3 + bx^2 + cx + d.
* FQuarticInterpolation: Represents a curve of the form y=ax^4 + bx^3 + cx^2 + dx + e. Does not support integration.
* FCubicBezierInterpolation now has an AsCubic method that converts it to a cubic polynomial form, which also allows derivative/integral functionality.
- FPiecewiseCurve(Model): A generic read-only piecewise curve implementation and curve editor model. Used to display derivative curves for playrate.
- FMovieSceneTimingParameters: A struct for specifying section timing that simplifies computation of a transform. I wanted to replace all implementations with this but current deprecation mechanisms were prohibitively restrictive. More work will be needed there to remove legacy code.
- FMovieSceneTimeWarpChannel: A new channel type that defines time in one of two domains: PlayRate or Time
Curve Editor: Added the ability to specify custom axes and child curves
- Custom Axes:
* Custom axes can now be assigned to each curve within a view, and the axis defines the scaling for that curve.
* This allows us to have multiple different 'spaces' on the same view that have vastly different scales (for instance, play rate, and tick resolution times)
- Child Curves:
* Child curves are added whenever their parent is added. This allows us to show the derivative of a play rate curve on the curve editor.
Sequencer: Added Owning Object and key offsets to channel meta-data and curve models, made Sequencer key-editors polymorphic,
- New options on channel proxy entries allow us to specify that a channel's keys are relative to their section start time via a key offset
- New options in the curve editor models allow for a non-UMovieSceneSection owner object type
#jira UE-149871
#rb Ludovic.Chabant, David.Bromberg, Max.Chen
[CL 34813298 by andrew rodham in ue5-main branch]
2024-07-15 10:52:09 -04:00
SequencerModule . RegisterChannelInterface < FMovieSceneTimeWarpChannel > ( ) ;
2022-06-15 05:19:02 -04:00
SequencerModule . RegisterChannelInterface < FMovieSceneAudioTriggerChannel > ( ) ;
SequencerModule . RegisterChannelInterface < FMovieSceneEventChannel > ( ) ;
SequencerModule . RegisterChannelInterface < FMovieSceneCameraShakeSourceTriggerChannel > ( ) ;
SequencerModule . RegisterChannelInterface < FMovieSceneConstraintChannel > ( ) ;
2022-08-23 23:19:26 -04:00
SequencerModule . RegisterChannelInterface < FMovieSceneFloatPerlinNoiseChannel > ( MakeUnique < TPerlinNoiseChannelInterface < UMovieSceneFloatPerlinNoiseChannelContainer > > ( ) ) ;
SequencerModule . RegisterChannelInterface < FMovieSceneDoublePerlinNoiseChannel > ( MakeUnique < TPerlinNoiseChannelInterface < UMovieSceneDoublePerlinNoiseChannelContainer > > ( ) ) ;
2022-06-15 05:19:02 -04:00
ICurveEditorModule & CurveEditorModule = FModuleManager : : LoadModuleChecked < ICurveEditorModule > ( " CurveEditor " ) ;
FEventChannelCurveModel : : EventView = CurveEditorModule . RegisterView ( FOnCreateCurveEditorView : : CreateStatic (
[ ] ( TWeakPtr < FCurveEditor > WeakCurveEditor ) - > TSharedRef < SCurveEditorView >
{
return SNew ( SCurveEditorEventChannelView , WeakCurveEditor ) ;
}
) ) ;
2022-07-13 17:48:50 -04:00
FConstraintChannelCurveModel : : ViewID = CurveEditorModule . RegisterView ( FOnCreateCurveEditorView : : CreateStatic (
[ ] ( TWeakPtr < FCurveEditor > WeakCurveEditor ) - > TSharedRef < SCurveEditorView >
{
return SNew ( SCurveEditorKeyBarView , WeakCurveEditor ) ;
}
) ) ;
2022-06-15 05:19:02 -04:00
}
2023-03-30 17:57:41 -04:00
FixupDynamicBindingPayloadParameterNameHandle = UMovieScene : : FixupDynamicBindingPayloadParameterNameEvent . AddStatic ( FixupPayloadParameterNameForDynamicBinding ) ;
FixupEventSectionPayloadParameterNameHandle = UMovieSceneEventSectionBase : : FixupPayloadParameterNameEvent . AddStatic ( FixupPayloadParameterNameForSection ) ;
2022-06-15 05:19:02 -04:00
UMovieSceneEventSectionBase : : UpgradeLegacyEventEndpoint . BindStatic ( UpgradeLegacyEventEndpointForSection ) ;
UMovieSceneEventSectionBase : : PostDuplicateSectionEvent . BindStatic ( PostDuplicateEventSection ) ;
UMovieSceneEventSectionBase : : RemoveForCookEvent . BindStatic ( RemoveForCookEventSection ) ;
UMovieScene : : IsTrackClassAllowedEvent . BindStatic ( IsTrackClassAllowed ) ;
2024-06-06 04:42:34 -04:00
UMovieScene : : IsCustomBindingClassAllowedEvent . BindStatic ( IsCustomBindingClassAllowed ) ;
Sequencer- Conditions
Core Condition Framework and Logic.
This changelist introduces movie scene conditions. Conditions can optionally be placed on Tracks, Sections, and Track Rows. If a condition evaluates to false, then the track, section, or track row will not evaluate. This allows developers to author Sequences with dynamic elements, for example:
* Different lighting for different times of day
* Different camera behavior or animation depending on bound character
* Different elements based on platform or performance metrics
Users can author their own condition classes in C++ or blueprints. A separate changelist will allow users to author director blueprint conditions in the sequence's blueprint.
Conditions are implemented as instanced UObjects that are stored in the MovieScene and referenced by their attached element (track, section) and as a separate piece of entity metadata in the compilation step. This entity metadata is evaluated by the entity ledger. Conditions can specify how often they need to be evaluated (once, or every tick), as well as what context they depend on for uniqueness (e.g. bound object or global context) for performance so they don't need to be evaluated more than necessary.
A note on Track Row Conditions- these have been implemented as part of a new 'Track Row Metadata' struct tying track row index to the metadata. While track row index can change, we keep track of these changes and move the metadata accordingly between these rows.
Finally a Group Condition class has been implemented as part of this changelist, allowing simple logic trees of conditions to be created. More complex logic would better be implemented as its own blueprint class or in the director blueprint. We use this group condition to combine track, section, and track row conditions as necessary.
For now, we prohibit Movie Scene Conditions from being used in UEFN Sequencer based on not exposing the UMovieSceneCondition class.
Director Blueprint Condition.
Adding condition type for 'Director Blueprint' conditions- allowing users to specify the logic for their movie scene condition within the Sequence director blueprint.
Sequencer- Condition framework UI customization and miscellaneous.
UI/details view customization for adding conditions in Sequencer. Adds a custom menu for selecting condition classes, creating new blueprint condition classes, or adding a director blueprint condition. Includes prevention for this UX to be used within UEFN Sequencer.
[REVIEW] [at]ue-sequencer
#jira UE-209603
#rb Max.Chen
[CL 35590470 by david bromberg in ue5-main branch]
2024-08-16 06:46:08 -04:00
UMovieScene : : IsConditionClassAllowedEvent . BindStatic ( IsConditionClassAllowed ) ;
2022-06-15 05:19:02 -04:00
ULevelSequence : : PostDuplicateEvent . BindStatic ( PostDuplicateEvent ) ;
Sequencer- Conditions
Core Condition Framework and Logic.
This changelist introduces movie scene conditions. Conditions can optionally be placed on Tracks, Sections, and Track Rows. If a condition evaluates to false, then the track, section, or track row will not evaluate. This allows developers to author Sequences with dynamic elements, for example:
* Different lighting for different times of day
* Different camera behavior or animation depending on bound character
* Different elements based on platform or performance metrics
Users can author their own condition classes in C++ or blueprints. A separate changelist will allow users to author director blueprint conditions in the sequence's blueprint.
Conditions are implemented as instanced UObjects that are stored in the MovieScene and referenced by their attached element (track, section) and as a separate piece of entity metadata in the compilation step. This entity metadata is evaluated by the entity ledger. Conditions can specify how often they need to be evaluated (once, or every tick), as well as what context they depend on for uniqueness (e.g. bound object or global context) for performance so they don't need to be evaluated more than necessary.
A note on Track Row Conditions- these have been implemented as part of a new 'Track Row Metadata' struct tying track row index to the metadata. While track row index can change, we keep track of these changes and move the metadata accordingly between these rows.
Finally a Group Condition class has been implemented as part of this changelist, allowing simple logic trees of conditions to be created. More complex logic would better be implemented as its own blueprint class or in the director blueprint. We use this group condition to combine track, section, and track row conditions as necessary.
For now, we prohibit Movie Scene Conditions from being used in UEFN Sequencer based on not exposing the UMovieSceneCondition class.
Director Blueprint Condition.
Adding condition type for 'Director Blueprint' conditions- allowing users to specify the logic for their movie scene condition within the Sequence director blueprint.
Sequencer- Condition framework UI customization and miscellaneous.
UI/details view customization for adding conditions in Sequencer. Adds a custom menu for selecting condition classes, creating new blueprint condition classes, or adding a director blueprint condition. Includes prevention for this UX to be used within UEFN Sequencer.
[REVIEW] [at]ue-sequencer
#jira UE-209603
#rb Max.Chen
[CL 35590470 by david bromberg in ue5-main branch]
2024-08-16 06:46:08 -04:00
FixupDynamicBindingsHandle = ULevelSequence : : FixupDynamicBindingsEvent . AddStatic ( FixupDynamicBindingsEvent ) ;
FixupDirectorBlueprintConditionPayloadParameterNameHandle = UMovieScene : : FixupDirectorBlueprintConditionPayloadParameterNameEvent . AddStatic ( FixupPayloadParameterNameForDirectorBlueprintCondition ) ;
Sequencer- Resubmission of changelist 34065553 that had been backed out for a versioning issue which is now fixed. Original description below:
Sequencer- Dynamic Binding Refactor
Refactor the 'Dynamic Binding' blueprint system to be Custom Bindings rather than tied directly to FMovieScenePossessable and FMovieSceneSpawnable. As part of this:
? Created UMovieSceneReplaceableDirectorBlueprintBinding and UMovieSceneSpawnableDirectorBlueprintBinding to replace the Possessable and Spawnable versions of DynamicBindings
? Deprecated the DynamicBinding references on possessable and spawnable and created Postload fixup code to automatically create custom bindings instead
? Note that because the previous Dynamic Bindings operated as overrides and the new ones don't, there is a no longer supported path which is using Possessables as a preview in editor for Possessable Dynamic Bindings. Now if you don't mark 'Call in Editor' for a Replaceable Director Blueprint binding, you'll need to define a spawnable preview binding for the binding in order to work with it in Sequencer.
? Since UMG also used Dynamic Bindings on possessables, temporarily add DynamicBinding as a member variable on FWidgetAnimationBinding and create postload logic to move DynamicBindings to live on there for WidgetAnimations.
? USD has custom code to create dynamic bindings automatically for its use case. Convert this also to use the new custom binding system.
? Some cleanup on object binding right-click menus was done as part of this.
? Some further MovieSceneSequence API deprecation and refactoring has been done for the creation of bindings to add SharedPlaybackState where possible which was necessary for dynamic binding setup.
FMovieSceneSpawnable deprecation in Level Sequences
Since I was having to write postload fixup logic for FMovieSceneSpawnables with Dynamic Bindings that converted these to FMovieScenePossessables with custom bindings, it felt like a good chance to deprecate all FMovieSceneSpawnable use in Level Sequences.
I chose at this time not to deprecate FMovieSceneSpawnable use for non-Level-Sequence Movie Scene Sequences. This includes Day Sequences, Template Sequences, Actor Sequences, Widget Animations, Niagara Sequences, and some Meta Human sequences. I made this choice because to do so would require also refactoring those sequence types to use MovieSceneBindingReferences in order to enable custom bindings for those sequence types. This will be a future refactor.
Some notes on this deprecation.
? I kept MovieScene specific code that references or creates FMovieSceneSpawnables due to not refactoring all MovieSceneSequences
? Binding creation code in tools such as Sequencer will check for the presence of Binding References and create custom bindings if present, otherwise will still create FMovieSceneSpawnables
? AvaSequences required some extra work to make this change, including some changes and bugfixes to copy/pasting bindings to move away from custom avalanche copy/paste code, as the copy/paste code for custom bindings is a bit intricate and I didn't want to duplicate it.
? Chaos Cache has been moved away from using an object spawner and instead uses a custom spawnable actor binding inheriting from the regular spawnable actor binding.
? Actor and Take Recording has been updated to support custom spawnable bindings
? Meta Human specific code has been updated to support custom spawnable bindings when using Level Sequences
? FortniteMainBranchObjectVersion has been bumped
Crash fix
As part of the USD work, I found a crash bug where the Binding Properties menu would hold a reference to a level sequence. In the case of USD, the outer of the sequences can be the level, and this caused issues when switching levels. To fix this I ended up needing to add some events when menus are being dismissed so I could clean up these references.
#jira UE-209839, UE-209548, UE-213115, UE-214195, UE-214443
#rb Marc.Audy
#lockdown Marc.Audy
[FYI] juan.portillo, Viktar.Mikhalchuk, Darrien.Blanchard, patrick.boutot
[CL 34127005 by david bromberg in ue5-main branch]
2024-06-05 11:54:07 -04:00
2022-06-15 05:19:02 -04:00
auto OnObjectsReplaced = [ ] ( const TMap < UObject * , UObject * > & ReplacedObjects )
{
// If a movie scene signed object is reinstanced, it has to be marked as modified
// so that the data gets recompiled properly.
// @todo: this might cause cook non-determinism, but we need to verify that separately
for ( const TTuple < UObject * , UObject * > & Pair : ReplacedObjects )
{
if ( UMovieSceneSignedObject * SignedObject = Cast < UMovieSceneSignedObject > ( Pair . Value ) )
{
SignedObject - > MarkAsChanged ( ) ;
}
}
} ;
OnObjectsReplacedHandle = FCoreUObjectDelegates : : OnObjectsReplaced . AddLambda ( OnObjectsReplaced ) ;
FEditorModeRegistry : : Get ( ) . RegisterMode < FSkeletalAnimationTrackEditMode > (
FSkeletalAnimationTrackEditMode : : ModeName ,
NSLOCTEXT ( " SkeletalAnimationTrackEditorMode " , " SkelAnimTrackEditMode " , " Skeletal Anim Track Mode " ) ,
FSlateIcon ( ) ,
false ) ;
2023-01-05 04:08:25 -05:00
2024-09-10 13:26:49 -04:00
FEditorModeRegistry : : Get ( ) . RegisterMode < FSubTrackEditorMode > (
FSubTrackEditorMode : : ModeName ,
NSLOCTEXT ( " SubTrackEditorMode " , " SubTrackEditMode " , " Sub Track Mode " ) ,
FSlateIcon ( ) ,
false ) ;
2023-01-05 04:08:25 -05:00
// register UTransformableComponentHandle animatable interface
FConstraintChannelInterfaceRegistry & ConstraintChannelInterfaceRegistry = FConstraintChannelInterfaceRegistry : : Get ( ) ;
ConstraintChannelInterfaceRegistry . RegisterConstraintChannelInterface < UTransformableComponentHandle > ( MakeUnique < FComponentConstraintChannelInterface > ( ) ) ;
2022-06-15 05:19:02 -04:00
}
void FMovieSceneToolsModule : : ShutdownModule ( )
{
2023-03-30 17:57:41 -04:00
UMovieScene : : FixupDynamicBindingPayloadParameterNameEvent . Remove ( FixupDynamicBindingPayloadParameterNameHandle ) ;
UMovieSceneEventSectionBase : : FixupPayloadParameterNameEvent . Remove ( FixupEventSectionPayloadParameterNameHandle ) ;
2022-06-15 05:19:02 -04:00
UMovieSceneEventSectionBase : : UpgradeLegacyEventEndpoint = UMovieSceneEventSectionBase : : FUpgradeLegacyEventEndpoint ( ) ;
UMovieSceneEventSectionBase : : PostDuplicateSectionEvent = UMovieSceneEventSectionBase : : FPostDuplicateEvent ( ) ;
UMovieSceneEventSectionBase : : RemoveForCookEvent = UMovieSceneEventSectionBase : : FRemoveForCookEvent ( ) ;
UMovieScene : : IsTrackClassAllowedEvent = UMovieScene : : FIsTrackClassAllowedEvent ( ) ;
2024-06-06 04:42:34 -04:00
UMovieScene : : IsCustomBindingClassAllowedEvent = UMovieScene : : FIsCustomBindingClassAllowedEvent ( ) ;
Sequencer- Conditions
Core Condition Framework and Logic.
This changelist introduces movie scene conditions. Conditions can optionally be placed on Tracks, Sections, and Track Rows. If a condition evaluates to false, then the track, section, or track row will not evaluate. This allows developers to author Sequences with dynamic elements, for example:
* Different lighting for different times of day
* Different camera behavior or animation depending on bound character
* Different elements based on platform or performance metrics
Users can author their own condition classes in C++ or blueprints. A separate changelist will allow users to author director blueprint conditions in the sequence's blueprint.
Conditions are implemented as instanced UObjects that are stored in the MovieScene and referenced by their attached element (track, section) and as a separate piece of entity metadata in the compilation step. This entity metadata is evaluated by the entity ledger. Conditions can specify how often they need to be evaluated (once, or every tick), as well as what context they depend on for uniqueness (e.g. bound object or global context) for performance so they don't need to be evaluated more than necessary.
A note on Track Row Conditions- these have been implemented as part of a new 'Track Row Metadata' struct tying track row index to the metadata. While track row index can change, we keep track of these changes and move the metadata accordingly between these rows.
Finally a Group Condition class has been implemented as part of this changelist, allowing simple logic trees of conditions to be created. More complex logic would better be implemented as its own blueprint class or in the director blueprint. We use this group condition to combine track, section, and track row conditions as necessary.
For now, we prohibit Movie Scene Conditions from being used in UEFN Sequencer based on not exposing the UMovieSceneCondition class.
Director Blueprint Condition.
Adding condition type for 'Director Blueprint' conditions- allowing users to specify the logic for their movie scene condition within the Sequence director blueprint.
Sequencer- Condition framework UI customization and miscellaneous.
UI/details view customization for adding conditions in Sequencer. Adds a custom menu for selecting condition classes, creating new blueprint condition classes, or adding a director blueprint condition. Includes prevention for this UX to be used within UEFN Sequencer.
[REVIEW] [at]ue-sequencer
#jira UE-209603
#rb Max.Chen
[CL 35590470 by david bromberg in ue5-main branch]
2024-08-16 06:46:08 -04:00
UMovieScene : : IsConditionClassAllowedEvent = UMovieScene : : FIsConditionClassAllowedEvent ( ) ;
2022-06-15 05:19:02 -04:00
ULevelSequence : : PostDuplicateEvent = ULevelSequence : : FPostDuplicateEvent ( ) ;
Sequencer- Resubmission of changelist 34065553 that had been backed out for a versioning issue which is now fixed. Original description below:
Sequencer- Dynamic Binding Refactor
Refactor the 'Dynamic Binding' blueprint system to be Custom Bindings rather than tied directly to FMovieScenePossessable and FMovieSceneSpawnable. As part of this:
? Created UMovieSceneReplaceableDirectorBlueprintBinding and UMovieSceneSpawnableDirectorBlueprintBinding to replace the Possessable and Spawnable versions of DynamicBindings
? Deprecated the DynamicBinding references on possessable and spawnable and created Postload fixup code to automatically create custom bindings instead
? Note that because the previous Dynamic Bindings operated as overrides and the new ones don't, there is a no longer supported path which is using Possessables as a preview in editor for Possessable Dynamic Bindings. Now if you don't mark 'Call in Editor' for a Replaceable Director Blueprint binding, you'll need to define a spawnable preview binding for the binding in order to work with it in Sequencer.
? Since UMG also used Dynamic Bindings on possessables, temporarily add DynamicBinding as a member variable on FWidgetAnimationBinding and create postload logic to move DynamicBindings to live on there for WidgetAnimations.
? USD has custom code to create dynamic bindings automatically for its use case. Convert this also to use the new custom binding system.
? Some cleanup on object binding right-click menus was done as part of this.
? Some further MovieSceneSequence API deprecation and refactoring has been done for the creation of bindings to add SharedPlaybackState where possible which was necessary for dynamic binding setup.
FMovieSceneSpawnable deprecation in Level Sequences
Since I was having to write postload fixup logic for FMovieSceneSpawnables with Dynamic Bindings that converted these to FMovieScenePossessables with custom bindings, it felt like a good chance to deprecate all FMovieSceneSpawnable use in Level Sequences.
I chose at this time not to deprecate FMovieSceneSpawnable use for non-Level-Sequence Movie Scene Sequences. This includes Day Sequences, Template Sequences, Actor Sequences, Widget Animations, Niagara Sequences, and some Meta Human sequences. I made this choice because to do so would require also refactoring those sequence types to use MovieSceneBindingReferences in order to enable custom bindings for those sequence types. This will be a future refactor.
Some notes on this deprecation.
? I kept MovieScene specific code that references or creates FMovieSceneSpawnables due to not refactoring all MovieSceneSequences
? Binding creation code in tools such as Sequencer will check for the presence of Binding References and create custom bindings if present, otherwise will still create FMovieSceneSpawnables
? AvaSequences required some extra work to make this change, including some changes and bugfixes to copy/pasting bindings to move away from custom avalanche copy/paste code, as the copy/paste code for custom bindings is a bit intricate and I didn't want to duplicate it.
? Chaos Cache has been moved away from using an object spawner and instead uses a custom spawnable actor binding inheriting from the regular spawnable actor binding.
? Actor and Take Recording has been updated to support custom spawnable bindings
? Meta Human specific code has been updated to support custom spawnable bindings when using Level Sequences
? FortniteMainBranchObjectVersion has been bumped
Crash fix
As part of the USD work, I found a crash bug where the Binding Properties menu would hold a reference to a level sequence. In the case of USD, the outer of the sequences can be the level, and this caused issues when switching levels. To fix this I ended up needing to add some events when menus are being dismissed so I could clean up these references.
#jira UE-209839, UE-209548, UE-213115, UE-214195, UE-214443
#rb Marc.Audy
#lockdown Marc.Audy
[FYI] juan.portillo, Viktar.Mikhalchuk, Darrien.Blanchard, patrick.boutot
[CL 34127005 by david bromberg in ue5-main branch]
2024-06-05 11:54:07 -04:00
ULevelSequence : : FixupDynamicBindingsEvent . Remove ( FixupDynamicBindingsHandle ) ;
Sequencer- Conditions
Core Condition Framework and Logic.
This changelist introduces movie scene conditions. Conditions can optionally be placed on Tracks, Sections, and Track Rows. If a condition evaluates to false, then the track, section, or track row will not evaluate. This allows developers to author Sequences with dynamic elements, for example:
* Different lighting for different times of day
* Different camera behavior or animation depending on bound character
* Different elements based on platform or performance metrics
Users can author their own condition classes in C++ or blueprints. A separate changelist will allow users to author director blueprint conditions in the sequence's blueprint.
Conditions are implemented as instanced UObjects that are stored in the MovieScene and referenced by their attached element (track, section) and as a separate piece of entity metadata in the compilation step. This entity metadata is evaluated by the entity ledger. Conditions can specify how often they need to be evaluated (once, or every tick), as well as what context they depend on for uniqueness (e.g. bound object or global context) for performance so they don't need to be evaluated more than necessary.
A note on Track Row Conditions- these have been implemented as part of a new 'Track Row Metadata' struct tying track row index to the metadata. While track row index can change, we keep track of these changes and move the metadata accordingly between these rows.
Finally a Group Condition class has been implemented as part of this changelist, allowing simple logic trees of conditions to be created. More complex logic would better be implemented as its own blueprint class or in the director blueprint. We use this group condition to combine track, section, and track row conditions as necessary.
For now, we prohibit Movie Scene Conditions from being used in UEFN Sequencer based on not exposing the UMovieSceneCondition class.
Director Blueprint Condition.
Adding condition type for 'Director Blueprint' conditions- allowing users to specify the logic for their movie scene condition within the Sequence director blueprint.
Sequencer- Condition framework UI customization and miscellaneous.
UI/details view customization for adding conditions in Sequencer. Adds a custom menu for selecting condition classes, creating new blueprint condition classes, or adding a director blueprint condition. Includes prevention for this UX to be used within UEFN Sequencer.
[REVIEW] [at]ue-sequencer
#jira UE-209603
#rb Max.Chen
[CL 35590470 by david bromberg in ue5-main branch]
2024-08-16 06:46:08 -04:00
UMovieScene : : FixupDirectorBlueprintConditionPayloadParameterNameEvent . Remove ( FixupDirectorBlueprintConditionPayloadParameterNameHandle ) ;
2022-06-15 05:19:02 -04:00
if ( ICurveEditorModule * CurveEditorModule = FModuleManager : : GetModulePtr < ICurveEditorModule > ( " CurveEditor " ) )
{
CurveEditorModule - > UnregisterView ( FEventChannelCurveModel : : EventView ) ;
2022-07-13 17:48:50 -04:00
CurveEditorModule - > UnregisterView ( FConstraintChannelCurveModel : : ViewID ) ;
2022-06-15 05:19:02 -04:00
}
if ( ISettingsModule * SettingsModule = FModuleManager : : GetModulePtr < ISettingsModule > ( " Settings " ) )
{
SettingsModule - > UnregisterSettings ( " Project " , " Editor " , " Level Sequences " ) ;
}
FCoreUObjectDelegates : : OnObjectsReplaced . Remove ( OnObjectsReplacedHandle ) ;
if ( ! FModuleManager : : Get ( ) . IsModuleLoaded ( " Sequencer " ) )
{
return ;
}
ISequencerModule & SequencerModule = FModuleManager : : Get ( ) . GetModuleChecked < ISequencerModule > ( " Sequencer " ) ;
// unregister property track editors
SequencerModule . UnRegisterTrackEditor ( BoolPropertyTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( BytePropertyTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( ColorPropertyTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( FloatPropertyTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( DoublePropertyTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( IntegerPropertyTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( FloatVectorPropertyTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( DoubleVectorPropertyTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( TransformPropertyTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( EulerTransformPropertyTrackCreateEditorHandle ) ;
2024-07-22 06:23:21 -04:00
SequencerModule . UnRegisterTrackEditor ( RotatorPropertyTrackCreateEditorHandle ) ;
2022-06-15 05:19:02 -04:00
SequencerModule . UnRegisterTrackEditor ( VisibilityPropertyTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( ActorReferencePropertyTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( StringPropertyTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( CameraShakeSourceShakeCreateEditorHandle ) ;
// unregister specialty track editors
SequencerModule . UnRegisterTrackEditor ( AnimationTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( AttachTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( AudioTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( EventTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( ParticleTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( ParticleParameterTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( PathTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( CameraCutTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( CinematicShotTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( SlomoTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( SubTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( TransformTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( ComponentMaterialTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( FadeTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( SpawnTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( LevelVisibilityTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( DataLayerTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( CameraShakeTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( MPCTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( ObjectTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( PrimitiveMaterialCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( CVarTrackCreateEditorHandle ) ;
2023-12-07 11:25:53 -05:00
SequencerModule . UnRegisterTrackEditor ( CustomPrimitiveDataTrackCreateEditorHandle ) ;
SequencerModule . UnRegisterTrackEditor ( BindingLifetimeTrackCreateEditorHandle ) ;
Sequencer: Added time-warp capabilities to sequences, sub-sections and skeletal animation sections
This is a large suite of changes that are being submitted in bulk for build-health reasons:
Core machinery:
- FMovieSceneNumericVariant: This is the base variant type that represents either a double, or a custom object. It is not much use on its own, but provides the basis for the time-warp variant, and will be the basis for parameterization.
- FMovieSceneTimeWarpVariant: This is a drop in replacement for a double PlayRate/TimeScale UProperty that can now represent a time-warp or play rate curve, a loop, a clamp, or a fixed time. It also provides functionality for remapping time, and inverse remapping time.
- The following interpolation types have been added/improved to add Derivative and Integral functionality
* FConstantValue: Represents a curve of the form y=c
* FLinearInterpolation: Represents a curve of the form y=mx + c
* FQuadraticInterpolation: Represents a curve of the form y=ax^2 + bx + c.
* FCubicInterpolation: Represents a curve of the form y=ax^3 + bx^2 + cx + d.
* FQuarticInterpolation: Represents a curve of the form y=ax^4 + bx^3 + cx^2 + dx + e. Does not support integration.
* FCubicBezierInterpolation now has an AsCubic method that converts it to a cubic polynomial form, which also allows derivative/integral functionality.
- FPiecewiseCurve(Model): A generic read-only piecewise curve implementation and curve editor model. Used to display derivative curves for playrate.
- FMovieSceneTimingParameters: A struct for specifying section timing that simplifies computation of a transform. I wanted to replace all implementations with this but current deprecation mechanisms were prohibitively restrictive. More work will be needed there to remove legacy code.
- FMovieSceneTimeWarpChannel: A new channel type that defines time in one of two domains: PlayRate or Time
Curve Editor: Added the ability to specify custom axes and child curves
- Custom Axes:
* Custom axes can now be assigned to each curve within a view, and the axis defines the scaling for that curve.
* This allows us to have multiple different 'spaces' on the same view that have vastly different scales (for instance, play rate, and tick resolution times)
- Child Curves:
* Child curves are added whenever their parent is added. This allows us to show the derivative of a play rate curve on the curve editor.
Sequencer: Added Owning Object and key offsets to channel meta-data and curve models, made Sequencer key-editors polymorphic,
- New options on channel proxy entries allow us to specify that a channel's keys are relative to their section start time via a key offset
- New options in the curve editor models allow for a non-UMovieSceneSection owner object type
#jira UE-149871
#rb Ludovic.Chabant, David.Bromberg, Max.Chen
[CL 34813298 by andrew rodham in ue5-main branch]
2024-07-15 10:52:09 -04:00
SequencerModule . UnRegisterTrackEditor ( TimeWarpTrackCreateEditorHandle ) ;
2022-06-15 05:19:02 -04:00
// unregister track models
SequencerModule . UnregisterTrackModel ( CameraCutTrackModelHandle ) ;
SequencerModule . UnregisterTrackModel ( CinematicShotTrackModelHandle ) ;
2024-09-18 14:06:34 -04:00
SequencerModule . UnregisterTrackModel ( BindingLifetimeTrackModelHandle ) ;
SequencerModule . UnregisterTrackModel ( TimeWarpTrackModelHandle ) ;
2022-06-15 05:19:02 -04:00
if ( FModuleManager : : Get ( ) . IsModuleLoaded ( " PropertyEditor " ) )
{
FPropertyEditorModule & PropertyModule = FModuleManager : : LoadModuleChecked < FPropertyEditorModule > ( " PropertyEditor " ) ;
PropertyModule . UnregisterCustomClassLayout ( " MovieSceneToolsProjectSettings " ) ;
PropertyModule . UnregisterCustomClassLayout ( " MovieSceneBuiltInEasingFunction " ) ;
2022-10-25 03:28:25 -04:00
PropertyModule . UnregisterCustomPropertyTypeLayout ( " EAlphaBlendOption " ) ;
2022-06-15 05:19:02 -04:00
PropertyModule . UnregisterCustomPropertyTypeLayout ( " MovieSceneObjectBindingID " ) ;
PropertyModule . UnregisterCustomPropertyTypeLayout ( " MovieSceneEvent " ) ;
Sequencer- Conditions
Core Condition Framework and Logic.
This changelist introduces movie scene conditions. Conditions can optionally be placed on Tracks, Sections, and Track Rows. If a condition evaluates to false, then the track, section, or track row will not evaluate. This allows developers to author Sequences with dynamic elements, for example:
* Different lighting for different times of day
* Different camera behavior or animation depending on bound character
* Different elements based on platform or performance metrics
Users can author their own condition classes in C++ or blueprints. A separate changelist will allow users to author director blueprint conditions in the sequence's blueprint.
Conditions are implemented as instanced UObjects that are stored in the MovieScene and referenced by their attached element (track, section) and as a separate piece of entity metadata in the compilation step. This entity metadata is evaluated by the entity ledger. Conditions can specify how often they need to be evaluated (once, or every tick), as well as what context they depend on for uniqueness (e.g. bound object or global context) for performance so they don't need to be evaluated more than necessary.
A note on Track Row Conditions- these have been implemented as part of a new 'Track Row Metadata' struct tying track row index to the metadata. While track row index can change, we keep track of these changes and move the metadata accordingly between these rows.
Finally a Group Condition class has been implemented as part of this changelist, allowing simple logic trees of conditions to be created. More complex logic would better be implemented as its own blueprint class or in the director blueprint. We use this group condition to combine track, section, and track row conditions as necessary.
For now, we prohibit Movie Scene Conditions from being used in UEFN Sequencer based on not exposing the UMovieSceneCondition class.
Director Blueprint Condition.
Adding condition type for 'Director Blueprint' conditions- allowing users to specify the logic for their movie scene condition within the Sequence director blueprint.
Sequencer- Condition framework UI customization and miscellaneous.
UI/details view customization for adding conditions in Sequencer. Adds a custom menu for selecting condition classes, creating new blueprint condition classes, or adding a director blueprint condition. Includes prevention for this UX to be used within UEFN Sequencer.
[REVIEW] [at]ue-sequencer
#jira UE-209603
#rb Max.Chen
[CL 35590470 by david bromberg in ue5-main branch]
2024-08-16 06:46:08 -04:00
PropertyModule . UnregisterCustomPropertyTypeLayout ( " MovieSceneDynamicBinding " ) ;
PropertyModule . UnregisterCustomPropertyTypeLayout ( " MovieSceneDirectorBlueprintConditionData " ) ;
PropertyModule . UnregisterCustomPropertyTypeLayout ( " MovieSceneConditionContainer " ) ;
2024-08-26 11:29:50 -04:00
PropertyModule . UnregisterCustomClassLayout ( " MovieScenePlatformCondition " ) ;
2022-06-15 05:19:02 -04:00
}
FEditorModeRegistry : : Get ( ) . UnregisterMode ( FSkeletalAnimationTrackEditMode : : ModeName ) ;
2024-09-10 13:26:49 -04:00
FEditorModeRegistry : : Get ( ) . UnregisterMode ( FSubTrackEditorMode : : ModeName ) ;
2022-06-15 05:19:02 -04:00
}
void FMovieSceneToolsModule : : PostDuplicateEventSection ( UMovieSceneEventSectionBase * Section )
{
UMovieSceneSequence * Sequence = Section - > GetTypedOuter < UMovieSceneSequence > ( ) ;
FMovieSceneSequenceEditor * SequenceEditor = FMovieSceneSequenceEditor : : Find ( Sequence ) ;
UBlueprint * SequenceDirectorBP = SequenceEditor ? SequenceEditor - > FindDirectorBlueprint ( Sequence ) : nullptr ;
if ( SequenceDirectorBP )
{
// Always bind the event section onto the blueprint to ensure that we get another chance to upgrade when the BP compiles if this try wasn't successful
FMovieSceneEventUtils : : BindEventSectionToBlueprint ( Section , SequenceDirectorBP ) ;
}
}
void FMovieSceneToolsModule : : RemoveForCookEventSection ( UMovieSceneEventSectionBase * Section )
{
UMovieSceneSequence * Sequence = Section - > GetTypedOuter < UMovieSceneSequence > ( ) ;
FMovieSceneSequenceEditor * SequenceEditor = FMovieSceneSequenceEditor : : Find ( Sequence ) ;
UBlueprint * SequenceDirectorBP = SequenceEditor ? SequenceEditor - > FindDirectorBlueprint ( Sequence ) : nullptr ;
if ( SequenceDirectorBP )
{
FMovieSceneEventUtils : : RemoveEndpointsForEventSection ( Section , SequenceDirectorBP ) ;
}
}
//When we duplicate a ULevelSequence we check to see if there are any linked UAnimSequences in the asset user data,
2022-07-07 23:37:28 -04:00
//if so we either make a copy of the anim sequence, or leave it alone since a rename can also be a duplicate, the user will need to clean up this link later.
2022-06-15 05:19:02 -04:00
void FMovieSceneToolsModule : : PostDuplicateEvent ( ULevelSequence * LevelSequence )
{
if ( LevelSequence & & LevelSequence - > GetClass ( ) - > ImplementsInterface ( UInterface_AssetUserData : : StaticClass ( ) ) )
{
if ( IInterface_AssetUserData * AssetUserDataInterface = Cast < IInterface_AssetUserData > ( LevelSequence ) )
{
ULevelSequenceAnimSequenceLink * LevelAnimLink = AssetUserDataInterface - > GetAssetUserData < ULevelSequenceAnimSequenceLink > ( ) ;
if ( LevelAnimLink )
{
2022-07-07 23:37:28 -04:00
const bool bDuplicateAnimSequence = CVarDuplicateLinkedAnimSequence . GetValueOnGameThread ( ) ;
if ( bDuplicateAnimSequence )
2022-06-15 05:19:02 -04:00
{
2022-07-07 23:37:28 -04:00
for ( FLevelSequenceAnimSequenceLinkItem & Item : LevelAnimLink - > AnimSequenceLinks )
2022-06-15 05:19:02 -04:00
{
2022-07-07 23:37:28 -04:00
if ( UAnimSequence * AnimSequence = Item . ResolveAnimSequence ( ) )
2022-06-15 05:19:02 -04:00
{
2022-07-07 23:37:28 -04:00
TArray < UAnimSequence * > AnimSequencesToDuplicate ;
AnimSequencesToDuplicate . Add ( AnimSequence ) ;
UPackage * DestinationPackage = AnimSequence - > GetPackage ( ) ;
EditorAnimUtils : : FNameDuplicationRule NameRule ;
NameRule . FolderPath = FPackageName : : GetLongPackagePath ( AnimSequence - > GetPathName ( ) ) / TEXT ( " " ) ;
TMap < UAnimSequence * , UAnimSequence * > DuplicatedAnimAssets = EditorAnimUtils : : DuplicateAssets < UAnimSequence > ( AnimSequencesToDuplicate , DestinationPackage , & NameRule ) ;
for ( TPair < UAnimSequence * , UAnimSequence * > & Duplicates : DuplicatedAnimAssets )
2022-06-15 05:19:02 -04:00
{
2022-07-07 23:37:28 -04:00
if ( UAnimSequence * NewAnimSequence = Duplicates . Value )
2022-06-15 05:19:02 -04:00
{
2022-07-07 23:37:28 -04:00
Item . PathToAnimSequence = FSoftObjectPath ( NewAnimSequence ) ;
if ( IInterface_AssetUserData * AnimAssetUserData = Cast < IInterface_AssetUserData > ( NewAnimSequence ) )
2022-06-15 05:19:02 -04:00
{
2022-07-07 23:37:28 -04:00
UAnimSequenceLevelSequenceLink * AnimLevelLink = AnimAssetUserData - > GetAssetUserData < UAnimSequenceLevelSequenceLink > ( ) ;
if ( AnimLevelLink )
{
AnimLevelLink - > SetLevelSequence ( LevelSequence ) ;
}
2022-06-15 05:19:02 -04:00
}
}
}
}
}
}
}
}
}
}
Sequencer- Resubmission of changelist 34065553 that had been backed out for a versioning issue which is now fixed. Original description below:
Sequencer- Dynamic Binding Refactor
Refactor the 'Dynamic Binding' blueprint system to be Custom Bindings rather than tied directly to FMovieScenePossessable and FMovieSceneSpawnable. As part of this:
? Created UMovieSceneReplaceableDirectorBlueprintBinding and UMovieSceneSpawnableDirectorBlueprintBinding to replace the Possessable and Spawnable versions of DynamicBindings
? Deprecated the DynamicBinding references on possessable and spawnable and created Postload fixup code to automatically create custom bindings instead
? Note that because the previous Dynamic Bindings operated as overrides and the new ones don't, there is a no longer supported path which is using Possessables as a preview in editor for Possessable Dynamic Bindings. Now if you don't mark 'Call in Editor' for a Replaceable Director Blueprint binding, you'll need to define a spawnable preview binding for the binding in order to work with it in Sequencer.
? Since UMG also used Dynamic Bindings on possessables, temporarily add DynamicBinding as a member variable on FWidgetAnimationBinding and create postload logic to move DynamicBindings to live on there for WidgetAnimations.
? USD has custom code to create dynamic bindings automatically for its use case. Convert this also to use the new custom binding system.
? Some cleanup on object binding right-click menus was done as part of this.
? Some further MovieSceneSequence API deprecation and refactoring has been done for the creation of bindings to add SharedPlaybackState where possible which was necessary for dynamic binding setup.
FMovieSceneSpawnable deprecation in Level Sequences
Since I was having to write postload fixup logic for FMovieSceneSpawnables with Dynamic Bindings that converted these to FMovieScenePossessables with custom bindings, it felt like a good chance to deprecate all FMovieSceneSpawnable use in Level Sequences.
I chose at this time not to deprecate FMovieSceneSpawnable use for non-Level-Sequence Movie Scene Sequences. This includes Day Sequences, Template Sequences, Actor Sequences, Widget Animations, Niagara Sequences, and some Meta Human sequences. I made this choice because to do so would require also refactoring those sequence types to use MovieSceneBindingReferences in order to enable custom bindings for those sequence types. This will be a future refactor.
Some notes on this deprecation.
? I kept MovieScene specific code that references or creates FMovieSceneSpawnables due to not refactoring all MovieSceneSequences
? Binding creation code in tools such as Sequencer will check for the presence of Binding References and create custom bindings if present, otherwise will still create FMovieSceneSpawnables
? AvaSequences required some extra work to make this change, including some changes and bugfixes to copy/pasting bindings to move away from custom avalanche copy/paste code, as the copy/paste code for custom bindings is a bit intricate and I didn't want to duplicate it.
? Chaos Cache has been moved away from using an object spawner and instead uses a custom spawnable actor binding inheriting from the regular spawnable actor binding.
? Actor and Take Recording has been updated to support custom spawnable bindings
? Meta Human specific code has been updated to support custom spawnable bindings when using Level Sequences
? FortniteMainBranchObjectVersion has been bumped
Crash fix
As part of the USD work, I found a crash bug where the Binding Properties menu would hold a reference to a level sequence. In the case of USD, the outer of the sequences can be the level, and this caused issues when switching levels. To fix this I ended up needing to add some events when menus are being dismissed so I could clean up these references.
#jira UE-209839, UE-209548, UE-213115, UE-214195, UE-214443
#rb Marc.Audy
#lockdown Marc.Audy
[FYI] juan.portillo, Viktar.Mikhalchuk, Darrien.Blanchard, patrick.boutot
[CL 34127005 by david bromberg in ue5-main branch]
2024-06-05 11:54:07 -04:00
void FMovieSceneToolsModule : : FixupDynamicBindingsEvent ( ULevelSequence * LevelSequence )
{
if ( LevelSequence )
{
if ( UBlueprint * DirectorBlueprint = LevelSequence - > GetDirectorBlueprint ( ) )
{
FMovieSceneDynamicBindingUtils : : EnsureBlueprintExtensionCreated ( LevelSequence , DirectorBlueprint ) ;
FKismetEditorUtilities : : CompileBlueprint ( DirectorBlueprint ) ;
}
}
}
2022-06-15 05:19:02 -04:00
bool FMovieSceneToolsModule : : UpgradeLegacyEventEndpointForSection ( UMovieSceneEventSectionBase * Section )
{
UMovieSceneSequence * Sequence = Section - > GetTypedOuter < UMovieSceneSequence > ( ) ;
FMovieSceneSequenceEditor * SequenceEditor = FMovieSceneSequenceEditor : : Find ( Sequence ) ;
UBlueprint * SequenceDirectorBP = SequenceEditor ? SequenceEditor - > FindDirectorBlueprint ( Sequence ) : nullptr ;
if ( ! SequenceDirectorBP )
{
return true ;
}
// Always bind the event section onto the blueprint to ensure that we get another chance to upgrade when the BP compiles if this try wasn't successful
FMovieSceneEventUtils : : BindEventSectionToBlueprint ( Section , SequenceDirectorBP ) ;
// We can't do this upgrade if we any of the function graphs are RF_NeedLoad
for ( UEdGraph * EdGraph : SequenceDirectorBP - > FunctionGraphs )
{
if ( EdGraph - > HasAnyFlags ( RF_NeedLoad ) )
{
return false ;
}
}
// All the function graphs have been loaded, which means this is a good time to perform legacy data upgrade
for ( FMovieSceneEvent & EntryPoint : Section - > GetAllEntryPoints ( ) )
{
UK2Node * Endpoint = CastChecked < UK2Node > ( EntryPoint . WeakEndpoint . Get ( ) , ECastCheckedType : : NullAllowed ) ;
if ( ! Endpoint )
{
if ( UK2Node_FunctionEntry * LegacyFunctionEntry = Cast < UK2Node_FunctionEntry > ( EntryPoint . FunctionEntry_DEPRECATED . Get ( ) ) )
{
EntryPoint . WeakEndpoint = Endpoint = LegacyFunctionEntry ;
}
// If we don't have an endpoint but do have legacy graph or node guids, we do the manual upgrade
if ( ! Endpoint & & EntryPoint . GraphGuid_DEPRECATED . IsValid ( ) )
{
if ( EntryPoint . NodeGuid_DEPRECATED . IsValid ( ) )
{
if ( TObjectPtr < UEdGraph > const * GraphPtr = Algo : : FindBy ( SequenceDirectorBP - > UbergraphPages , EntryPoint . GraphGuid_DEPRECATED , & UEdGraph : : GraphGuid ) )
{
TObjectPtr < UEdGraphNode > const * NodePtr = Algo : : FindBy ( ( * GraphPtr ) - > Nodes , EntryPoint . NodeGuid_DEPRECATED , & UEdGraphNode : : NodeGuid ) ;
if ( NodePtr )
{
UK2Node_CustomEvent * CustomEvent = Cast < UK2Node_CustomEvent > ( * NodePtr ) ;
if ( ensureMsgf ( CustomEvent , TEXT ( " Encountered an event entry point node that is bound to something other than a custom event " ) ) )
{
CustomEvent - > OnUserDefinedPinRenamed ( ) . AddUObject ( Section , & UMovieSceneEventSectionBase : : OnUserDefinedPinRenamed ) ;
EntryPoint . WeakEndpoint = Endpoint = CustomEvent ;
}
}
}
}
// If the node guid is invalid, this must be a function graph on the BP
else if ( TObjectPtr < UEdGraph > const * GraphPtr = Algo : : FindBy ( SequenceDirectorBP - > FunctionGraphs , EntryPoint . GraphGuid_DEPRECATED , & UEdGraph : : GraphGuid ) )
{
TObjectPtr < UEdGraphNode > const * NodePtr = Algo : : FindByPredicate ( ( * GraphPtr ) - > Nodes , [ ] ( UEdGraphNode * InNode ) { return InNode & & InNode - > IsA < UK2Node_FunctionEntry > ( ) ; } ) ;
if ( NodePtr )
{
UK2Node_FunctionEntry * FunctionEntry = CastChecked < UK2Node_FunctionEntry > ( * NodePtr ) ;
FunctionEntry - > OnUserDefinedPinRenamed ( ) . AddUObject ( Section , & UMovieSceneEventSectionBase : : OnUserDefinedPinRenamed ) ;
EntryPoint . WeakEndpoint = Endpoint = FunctionEntry ;
}
}
if ( Endpoint )
{
// Discover its bound object pin name from the node
for ( UEdGraphPin * Pin : Endpoint - > Pins )
{
if ( Pin - > Direction = = EGPD_Output & & ( Pin - > PinType . PinCategory = = UEdGraphSchema_K2 : : PC_Object | | Pin - > PinType . PinCategory = = UEdGraphSchema_K2 : : PC_Interface ) )
{
EntryPoint . BoundObjectPinName = Pin - > PinName ;
break ;
}
}
}
}
}
// Set the compiled function name so that any immediate PostCompile steps find the correct function name
if ( Endpoint )
{
EntryPoint . CompiledFunctionName = Endpoint - > GetGraph ( ) - > GetFName ( ) ;
}
}
// If the BP has already been compiled (eg regenerate on load) we must perform PostCompile fixup immediately since
// We will not have had a chance to generate function entries. In this case we just bind directly to the already compiled functions.
if ( SequenceDirectorBP - > bHasBeenRegenerated )
{
Section - > OnPostCompile ( SequenceDirectorBP ) ;
}
return true ;
}
Sequencer- Conditions
Core Condition Framework and Logic.
This changelist introduces movie scene conditions. Conditions can optionally be placed on Tracks, Sections, and Track Rows. If a condition evaluates to false, then the track, section, or track row will not evaluate. This allows developers to author Sequences with dynamic elements, for example:
* Different lighting for different times of day
* Different camera behavior or animation depending on bound character
* Different elements based on platform or performance metrics
Users can author their own condition classes in C++ or blueprints. A separate changelist will allow users to author director blueprint conditions in the sequence's blueprint.
Conditions are implemented as instanced UObjects that are stored in the MovieScene and referenced by their attached element (track, section) and as a separate piece of entity metadata in the compilation step. This entity metadata is evaluated by the entity ledger. Conditions can specify how often they need to be evaluated (once, or every tick), as well as what context they depend on for uniqueness (e.g. bound object or global context) for performance so they don't need to be evaluated more than necessary.
A note on Track Row Conditions- these have been implemented as part of a new 'Track Row Metadata' struct tying track row index to the metadata. While track row index can change, we keep track of these changes and move the metadata accordingly between these rows.
Finally a Group Condition class has been implemented as part of this changelist, allowing simple logic trees of conditions to be created. More complex logic would better be implemented as its own blueprint class or in the director blueprint. We use this group condition to combine track, section, and track row conditions as necessary.
For now, we prohibit Movie Scene Conditions from being used in UEFN Sequencer based on not exposing the UMovieSceneCondition class.
Director Blueprint Condition.
Adding condition type for 'Director Blueprint' conditions- allowing users to specify the logic for their movie scene condition within the Sequence director blueprint.
Sequencer- Condition framework UI customization and miscellaneous.
UI/details view customization for adding conditions in Sequencer. Adds a custom menu for selecting condition classes, creating new blueprint condition classes, or adding a director blueprint condition. Includes prevention for this UX to be used within UEFN Sequencer.
[REVIEW] [at]ue-sequencer
#jira UE-209603
#rb Max.Chen
[CL 35590470 by david bromberg in ue5-main branch]
2024-08-16 06:46:08 -04:00
bool IsMovieSceneClassAllowed ( const UClass * InClass )
2022-06-15 05:19:02 -04:00
{
if ( ! InClass )
{
return false ;
}
FClassViewerModule & ClassViewerModule = FModuleManager : : LoadModuleChecked < FClassViewerModule > ( " ClassViewer " ) ;
const TSharedPtr < IClassViewerFilter > & GlobalClassFilter = ClassViewerModule . GetGlobalClassViewerFilter ( ) ;
TSharedRef < FClassViewerFilterFuncs > ClassFilterFuncs = ClassViewerModule . CreateFilterFuncs ( ) ;
FClassViewerInitializationOptions ClassViewerOptions = { } ;
if ( GlobalClassFilter . IsValid ( ) )
{
return GlobalClassFilter - > IsClassAllowed ( ClassViewerOptions , InClass , ClassFilterFuncs ) ;
}
return true ;
}
2024-06-06 04:42:34 -04:00
bool FMovieSceneToolsModule : : IsTrackClassAllowed ( UClass * InClass )
{
return IsMovieSceneClassAllowed ( InClass ) ;
}
bool FMovieSceneToolsModule : : IsCustomBindingClassAllowed ( UClass * InClass )
{
// For now this has the same implementation as IsTrackClassAllowed, but has been kept a separate function and event in the case we want
// different behavior here.
return IsMovieSceneClassAllowed ( InClass ) ;
}
Sequencer- Conditions
Core Condition Framework and Logic.
This changelist introduces movie scene conditions. Conditions can optionally be placed on Tracks, Sections, and Track Rows. If a condition evaluates to false, then the track, section, or track row will not evaluate. This allows developers to author Sequences with dynamic elements, for example:
* Different lighting for different times of day
* Different camera behavior or animation depending on bound character
* Different elements based on platform or performance metrics
Users can author their own condition classes in C++ or blueprints. A separate changelist will allow users to author director blueprint conditions in the sequence's blueprint.
Conditions are implemented as instanced UObjects that are stored in the MovieScene and referenced by their attached element (track, section) and as a separate piece of entity metadata in the compilation step. This entity metadata is evaluated by the entity ledger. Conditions can specify how often they need to be evaluated (once, or every tick), as well as what context they depend on for uniqueness (e.g. bound object or global context) for performance so they don't need to be evaluated more than necessary.
A note on Track Row Conditions- these have been implemented as part of a new 'Track Row Metadata' struct tying track row index to the metadata. While track row index can change, we keep track of these changes and move the metadata accordingly between these rows.
Finally a Group Condition class has been implemented as part of this changelist, allowing simple logic trees of conditions to be created. More complex logic would better be implemented as its own blueprint class or in the director blueprint. We use this group condition to combine track, section, and track row conditions as necessary.
For now, we prohibit Movie Scene Conditions from being used in UEFN Sequencer based on not exposing the UMovieSceneCondition class.
Director Blueprint Condition.
Adding condition type for 'Director Blueprint' conditions- allowing users to specify the logic for their movie scene condition within the Sequence director blueprint.
Sequencer- Condition framework UI customization and miscellaneous.
UI/details view customization for adding conditions in Sequencer. Adds a custom menu for selecting condition classes, creating new blueprint condition classes, or adding a director blueprint condition. Includes prevention for this UX to be used within UEFN Sequencer.
[REVIEW] [at]ue-sequencer
#jira UE-209603
#rb Max.Chen
[CL 35590470 by david bromberg in ue5-main branch]
2024-08-16 06:46:08 -04:00
bool FMovieSceneToolsModule : : IsConditionClassAllowed ( const UClass * InClass )
{
// For now this has the same implementation as IsTrackClassAllowed, but has been kept a separate function and event in the case we want
// different behavior here.
return IsMovieSceneClassAllowed ( InClass ) ;
}
2022-06-15 05:19:02 -04:00
void FMovieSceneToolsModule : : FixupPayloadParameterNameForSection ( UMovieSceneEventSectionBase * Section , UK2Node * InNode , FName OldPinName , FName NewPinName )
{
check ( Section & & InNode ) ;
for ( FMovieSceneEvent & EntryPoint : Section - > GetAllEntryPoints ( ) )
{
if ( EntryPoint . WeakEndpoint . Get ( ) ! = InNode )
{
continue ;
}
if ( EntryPoint . BoundObjectPinName = = OldPinName )
{
EntryPoint . BoundObjectPinName = NewPinName ;
}
if ( FMovieSceneEventPayloadVariable * Variable = EntryPoint . PayloadVariables . Find ( OldPinName ) )
{
EntryPoint . PayloadVariables . Add ( NewPinName , MoveTemp ( * Variable ) ) ;
EntryPoint . PayloadVariables . Remove ( OldPinName ) ;
}
}
}
2023-03-30 17:57:41 -04:00
void FMovieSceneToolsModule : : FixupPayloadParameterNameForDynamicBinding ( UMovieScene * MovieScene , UK2Node * InNode , FName OldPinName , FName NewPinName )
{
Sequencer- Resubmission of changelist 34065553 that had been backed out for a versioning issue which is now fixed. Original description below:
Sequencer- Dynamic Binding Refactor
Refactor the 'Dynamic Binding' blueprint system to be Custom Bindings rather than tied directly to FMovieScenePossessable and FMovieSceneSpawnable. As part of this:
? Created UMovieSceneReplaceableDirectorBlueprintBinding and UMovieSceneSpawnableDirectorBlueprintBinding to replace the Possessable and Spawnable versions of DynamicBindings
? Deprecated the DynamicBinding references on possessable and spawnable and created Postload fixup code to automatically create custom bindings instead
? Note that because the previous Dynamic Bindings operated as overrides and the new ones don't, there is a no longer supported path which is using Possessables as a preview in editor for Possessable Dynamic Bindings. Now if you don't mark 'Call in Editor' for a Replaceable Director Blueprint binding, you'll need to define a spawnable preview binding for the binding in order to work with it in Sequencer.
? Since UMG also used Dynamic Bindings on possessables, temporarily add DynamicBinding as a member variable on FWidgetAnimationBinding and create postload logic to move DynamicBindings to live on there for WidgetAnimations.
? USD has custom code to create dynamic bindings automatically for its use case. Convert this also to use the new custom binding system.
? Some cleanup on object binding right-click menus was done as part of this.
? Some further MovieSceneSequence API deprecation and refactoring has been done for the creation of bindings to add SharedPlaybackState where possible which was necessary for dynamic binding setup.
FMovieSceneSpawnable deprecation in Level Sequences
Since I was having to write postload fixup logic for FMovieSceneSpawnables with Dynamic Bindings that converted these to FMovieScenePossessables with custom bindings, it felt like a good chance to deprecate all FMovieSceneSpawnable use in Level Sequences.
I chose at this time not to deprecate FMovieSceneSpawnable use for non-Level-Sequence Movie Scene Sequences. This includes Day Sequences, Template Sequences, Actor Sequences, Widget Animations, Niagara Sequences, and some Meta Human sequences. I made this choice because to do so would require also refactoring those sequence types to use MovieSceneBindingReferences in order to enable custom bindings for those sequence types. This will be a future refactor.
Some notes on this deprecation.
? I kept MovieScene specific code that references or creates FMovieSceneSpawnables due to not refactoring all MovieSceneSequences
? Binding creation code in tools such as Sequencer will check for the presence of Binding References and create custom bindings if present, otherwise will still create FMovieSceneSpawnables
? AvaSequences required some extra work to make this change, including some changes and bugfixes to copy/pasting bindings to move away from custom avalanche copy/paste code, as the copy/paste code for custom bindings is a bit intricate and I didn't want to duplicate it.
? Chaos Cache has been moved away from using an object spawner and instead uses a custom spawnable actor binding inheriting from the regular spawnable actor binding.
? Actor and Take Recording has been updated to support custom spawnable bindings
? Meta Human specific code has been updated to support custom spawnable bindings when using Level Sequences
? FortniteMainBranchObjectVersion has been bumped
Crash fix
As part of the USD work, I found a crash bug where the Binding Properties menu would hold a reference to a level sequence. In the case of USD, the outer of the sequences can be the level, and this caused issues when switching levels. To fix this I ended up needing to add some events when menus are being dismissed so I could clean up these references.
#jira UE-209839, UE-209548, UE-213115, UE-214195, UE-214443
#rb Marc.Audy
#lockdown Marc.Audy
[FYI] juan.portillo, Viktar.Mikhalchuk, Darrien.Blanchard, patrick.boutot
[CL 34127005 by david bromberg in ue5-main branch]
2024-06-05 11:54:07 -04:00
using namespace UE : : MovieScene ;
2023-03-30 17:57:41 -04:00
check ( MovieScene ) ;
auto FixupPayloadParameterName = [ InNode , OldPinName , NewPinName ] ( FMovieSceneDynamicBinding & DynamicBinding )
{
if ( DynamicBinding . WeakEndpoint . Get ( ) = = InNode )
{
if ( FMovieSceneDynamicBindingPayloadVariable * Variable = DynamicBinding . PayloadVariables . Find ( OldPinName ) )
{
DynamicBinding . PayloadVariables . Add ( NewPinName , MoveTemp ( * Variable ) ) ;
DynamicBinding . PayloadVariables . Remove ( OldPinName ) ;
}
}
} ;
Sequencer- Resubmission of changelist 34065553 that had been backed out for a versioning issue which is now fixed. Original description below:
Sequencer- Dynamic Binding Refactor
Refactor the 'Dynamic Binding' blueprint system to be Custom Bindings rather than tied directly to FMovieScenePossessable and FMovieSceneSpawnable. As part of this:
? Created UMovieSceneReplaceableDirectorBlueprintBinding and UMovieSceneSpawnableDirectorBlueprintBinding to replace the Possessable and Spawnable versions of DynamicBindings
? Deprecated the DynamicBinding references on possessable and spawnable and created Postload fixup code to automatically create custom bindings instead
? Note that because the previous Dynamic Bindings operated as overrides and the new ones don't, there is a no longer supported path which is using Possessables as a preview in editor for Possessable Dynamic Bindings. Now if you don't mark 'Call in Editor' for a Replaceable Director Blueprint binding, you'll need to define a spawnable preview binding for the binding in order to work with it in Sequencer.
? Since UMG also used Dynamic Bindings on possessables, temporarily add DynamicBinding as a member variable on FWidgetAnimationBinding and create postload logic to move DynamicBindings to live on there for WidgetAnimations.
? USD has custom code to create dynamic bindings automatically for its use case. Convert this also to use the new custom binding system.
? Some cleanup on object binding right-click menus was done as part of this.
? Some further MovieSceneSequence API deprecation and refactoring has been done for the creation of bindings to add SharedPlaybackState where possible which was necessary for dynamic binding setup.
FMovieSceneSpawnable deprecation in Level Sequences
Since I was having to write postload fixup logic for FMovieSceneSpawnables with Dynamic Bindings that converted these to FMovieScenePossessables with custom bindings, it felt like a good chance to deprecate all FMovieSceneSpawnable use in Level Sequences.
I chose at this time not to deprecate FMovieSceneSpawnable use for non-Level-Sequence Movie Scene Sequences. This includes Day Sequences, Template Sequences, Actor Sequences, Widget Animations, Niagara Sequences, and some Meta Human sequences. I made this choice because to do so would require also refactoring those sequence types to use MovieSceneBindingReferences in order to enable custom bindings for those sequence types. This will be a future refactor.
Some notes on this deprecation.
? I kept MovieScene specific code that references or creates FMovieSceneSpawnables due to not refactoring all MovieSceneSequences
? Binding creation code in tools such as Sequencer will check for the presence of Binding References and create custom bindings if present, otherwise will still create FMovieSceneSpawnables
? AvaSequences required some extra work to make this change, including some changes and bugfixes to copy/pasting bindings to move away from custom avalanche copy/paste code, as the copy/paste code for custom bindings is a bit intricate and I didn't want to duplicate it.
? Chaos Cache has been moved away from using an object spawner and instead uses a custom spawnable actor binding inheriting from the regular spawnable actor binding.
? Actor and Take Recording has been updated to support custom spawnable bindings
? Meta Human specific code has been updated to support custom spawnable bindings when using Level Sequences
? FortniteMainBranchObjectVersion has been bumped
Crash fix
As part of the USD work, I found a crash bug where the Binding Properties menu would hold a reference to a level sequence. In the case of USD, the outer of the sequences can be the level, and this caused issues when switching levels. To fix this I ended up needing to add some events when menus are being dismissed so I could clean up these references.
#jira UE-209839, UE-209548, UE-213115, UE-214195, UE-214443
#rb Marc.Audy
#lockdown Marc.Audy
[FYI] juan.portillo, Viktar.Mikhalchuk, Darrien.Blanchard, patrick.boutot
[CL 34127005 by david bromberg in ue5-main branch]
2024-06-05 11:54:07 -04:00
UMovieSceneSequence * ThisSequence = MovieScene - > GetTypedOuter < UMovieSceneSequence > ( ) ;
TSharedRef < UE : : MovieScene : : FSharedPlaybackState > TransientPlaybackState = MovieSceneHelpers : : CreateTransientSharedPlaybackState ( GEditor - > GetEditorWorldContext ( ) . World ( ) , ThisSequence ) ;
Sequencer- Dynamic Binding Refactor
Refactor the 'Dynamic Binding' blueprint system to be Custom Bindings rather than tied directly to FMovieScenePossessable and FMovieSceneSpawnable. As part of this:
? Created UMovieSceneReplaceableDirectorBlueprintBinding and UMovieSceneSpawnableDirectorBlueprintBinding to replace the Possessable and Spawnable versions of DynamicBindings
? Deprecated the DynamicBinding references on possessable and spawnable and created Postload fixup code to automatically create custom bindings instead
? Note that because the previous Dynamic Bindings operated as overrides and the new ones don't, there is a no longer supported path which is using Possessables as a preview in editor for Possessable Dynamic Bindings. Now if you don't mark 'Call in Editor' for a Replaceable Director Blueprint binding, you'll need to define a spawnable preview binding for the binding in order to work with it in Sequencer.
? Since UMG also used Dynamic Bindings on possessables, temporarily add DynamicBinding as a member variable on FWidgetAnimationBinding and create postload logic to move DynamicBindings to live on there for WidgetAnimations.
? USD has custom code to create dynamic bindings automatically for its use case. Convert this also to use the new custom binding system.
? Some cleanup on object binding right-click menus was done as part of this.
? Some further MovieSceneSequence API deprecation and refactoring has been done for the creation of bindings to add SharedPlaybackState where possible which was necessary for dynamic binding setup.
FMovieSceneSpawnable deprecation in Level Sequences
Since I was having to write postload fixup logic for FMovieSceneSpawnables with Dynamic Bindings that converted these to FMovieScenePossessables with custom bindings, it felt like a good chance to deprecate all FMovieSceneSpawnable use in Level Sequences.
I chose at this time not to deprecate FMovieSceneSpawnable use for non-Level-Sequence Movie Scene Sequences. This includes Day Sequences, Template Sequences, Actor Sequences, Widget Animations, Niagara Sequences, and some Meta Human sequences. I made this choice because to do so would require also refactoring those sequence types to use MovieSceneBindingReferences in order to enable custom bindings for those sequence types. This will be a future refactor.
Some notes on this deprecation.
? I kept MovieScene specific code that references or creates FMovieSceneSpawnables due to not refactoring all MovieSceneSequences
? Binding creation code in tools such as Sequencer will check for the presence of Binding References and create custom bindings if present, otherwise will still create FMovieSceneSpawnables
? AvaSequences required some extra work to make this change, including some changes and bugfixes to copy/pasting bindings to move away from custom avalanche copy/paste code, as the copy/paste code for custom bindings is a bit intricate and I didn't want to duplicate it.
? Chaos Cache has been moved away from using an object spawner and instead uses a custom spawnable actor binding inheriting from the regular spawnable actor binding.
? Actor and Take Recording has been updated to support custom spawnable bindings
? Meta Human specific code has been updated to support custom spawnable bindings when using Level Sequences
? FortniteMainBranchObjectVersion has been bumped
Crash fix
As part of the USD work, I found a crash bug where the Binding Properties menu would hold a reference to a level sequence. In the case of USD, the outer of the sequences can be the level, and this caused issues when switching levels. To fix this I ended up needing to add some events when menus are being dismissed so I could clean up these references.
#jira UE-209839, UE-209548, UE-213115, UE-214195, UE-214443
#rb daniel.coelho, Max.Chen
[FYI] juan.portillo, Viktar.Mikhalchuk, Darrien.Blanchard, patrick.boutot
[CL 34065565 by david bromberg in ue5-main branch]
2024-06-03 10:27:49 -04:00
Sequencer- Resubmission of changelist 34065553 that had been backed out for a versioning issue which is now fixed. Original description below:
Sequencer- Dynamic Binding Refactor
Refactor the 'Dynamic Binding' blueprint system to be Custom Bindings rather than tied directly to FMovieScenePossessable and FMovieSceneSpawnable. As part of this:
? Created UMovieSceneReplaceableDirectorBlueprintBinding and UMovieSceneSpawnableDirectorBlueprintBinding to replace the Possessable and Spawnable versions of DynamicBindings
? Deprecated the DynamicBinding references on possessable and spawnable and created Postload fixup code to automatically create custom bindings instead
? Note that because the previous Dynamic Bindings operated as overrides and the new ones don't, there is a no longer supported path which is using Possessables as a preview in editor for Possessable Dynamic Bindings. Now if you don't mark 'Call in Editor' for a Replaceable Director Blueprint binding, you'll need to define a spawnable preview binding for the binding in order to work with it in Sequencer.
? Since UMG also used Dynamic Bindings on possessables, temporarily add DynamicBinding as a member variable on FWidgetAnimationBinding and create postload logic to move DynamicBindings to live on there for WidgetAnimations.
? USD has custom code to create dynamic bindings automatically for its use case. Convert this also to use the new custom binding system.
? Some cleanup on object binding right-click menus was done as part of this.
? Some further MovieSceneSequence API deprecation and refactoring has been done for the creation of bindings to add SharedPlaybackState where possible which was necessary for dynamic binding setup.
FMovieSceneSpawnable deprecation in Level Sequences
Since I was having to write postload fixup logic for FMovieSceneSpawnables with Dynamic Bindings that converted these to FMovieScenePossessables with custom bindings, it felt like a good chance to deprecate all FMovieSceneSpawnable use in Level Sequences.
I chose at this time not to deprecate FMovieSceneSpawnable use for non-Level-Sequence Movie Scene Sequences. This includes Day Sequences, Template Sequences, Actor Sequences, Widget Animations, Niagara Sequences, and some Meta Human sequences. I made this choice because to do so would require also refactoring those sequence types to use MovieSceneBindingReferences in order to enable custom bindings for those sequence types. This will be a future refactor.
Some notes on this deprecation.
? I kept MovieScene specific code that references or creates FMovieSceneSpawnables due to not refactoring all MovieSceneSequences
? Binding creation code in tools such as Sequencer will check for the presence of Binding References and create custom bindings if present, otherwise will still create FMovieSceneSpawnables
? AvaSequences required some extra work to make this change, including some changes and bugfixes to copy/pasting bindings to move away from custom avalanche copy/paste code, as the copy/paste code for custom bindings is a bit intricate and I didn't want to duplicate it.
? Chaos Cache has been moved away from using an object spawner and instead uses a custom spawnable actor binding inheriting from the regular spawnable actor binding.
? Actor and Take Recording has been updated to support custom spawnable bindings
? Meta Human specific code has been updated to support custom spawnable bindings when using Level Sequences
? FortniteMainBranchObjectVersion has been bumped
Crash fix
As part of the USD work, I found a crash bug where the Binding Properties menu would hold a reference to a level sequence. In the case of USD, the outer of the sequences can be the level, and this caused issues when switching levels. To fix this I ended up needing to add some events when menus are being dismissed so I could clean up these references.
#jira UE-209839, UE-209548, UE-213115, UE-214195, UE-214443
#rb Marc.Audy
#lockdown Marc.Audy
[FYI] juan.portillo, Viktar.Mikhalchuk, Darrien.Blanchard, patrick.boutot
[CL 34127005 by david bromberg in ue5-main branch]
2024-06-05 11:54:07 -04:00
if ( FMovieSceneBindingReferences * BindingReferences = MovieScene - > GetTypedOuter < UMovieSceneSequence > ( ) - > GetBindingReferences ( ) )
[Backout] - CL34065553
[FYI] david.bromberg
Original CL Desc
-----------------------------------------------------------------
Sequencer- Dynamic Binding Refactor
Refactor the 'Dynamic Binding' blueprint system to be Custom Bindings rather than tied directly to FMovieScenePossessable and FMovieSceneSpawnable. As part of this:
? Created UMovieSceneReplaceableDirectorBlueprintBinding and UMovieSceneSpawnableDirectorBlueprintBinding to replace the Possessable and Spawnable versions of DynamicBindings
? Deprecated the DynamicBinding references on possessable and spawnable and created Postload fixup code to automatically create custom bindings instead
? Note that because the previous Dynamic Bindings operated as overrides and the new ones don't, there is a no longer supported path which is using Possessables as a preview in editor for Possessable Dynamic Bindings. Now if you don't mark 'Call in Editor' for a Replaceable Director Blueprint binding, you'll need to define a spawnable preview binding for the binding in order to work with it in Sequencer.
? Since UMG also used Dynamic Bindings on possessables, temporarily add DynamicBinding as a member variable on FWidgetAnimationBinding and create postload logic to move DynamicBindings to live on there for WidgetAnimations.
? USD has custom code to create dynamic bindings automatically for its use case. Convert this also to use the new custom binding system.
? Some cleanup on object binding right-click menus was done as part of this.
? Some further MovieSceneSequence API deprecation and refactoring has been done for the creation of bindings to add SharedPlaybackState where possible which was necessary for dynamic binding setup.
FMovieSceneSpawnable deprecation in Level Sequences
Since I was having to write postload fixup logic for FMovieSceneSpawnables with Dynamic Bindings that converted these to FMovieScenePossessables with custom bindings, it felt like a good chance to deprecate all FMovieSceneSpawnable use in Level Sequences.
I chose at this time not to deprecate FMovieSceneSpawnable use for non-Level-Sequence Movie Scene Sequences. This includes Day Sequences, Template Sequences, Actor Sequences, Widget Animations, Niagara Sequences, and some Meta Human sequences. I made this choice because to do so would require also refactoring those sequence types to use MovieSceneBindingReferences in order to enable custom bindings for those sequence types. This will be a future refactor.
Some notes on this deprecation.
? I kept MovieScene specific code that references or creates FMovieSceneSpawnables due to not refactoring all MovieSceneSequences
? Binding creation code in tools such as Sequencer will check for the presence of Binding References and create custom bindings if present, otherwise will still create FMovieSceneSpawnables
? AvaSequences required some extra work to make this change, including some changes and bugfixes to copy/pasting bindings to move away from custom avalanche copy/paste code, as the copy/paste code for custom bindings is a bit intricate and I didn't want to duplicate it.
? Chaos Cache has been moved away from using an object spawner and instead uses a custom spawnable actor binding inheriting from the regular spawnable actor binding.
? Actor and Take Recording has been updated to support custom spawnable bindings
? Meta Human specific code has been updated to support custom spawnable bindings when using Level Sequences
? FortniteMainBranchObjectVersion has been bumped
Crash fix
As part of the USD work, I found a crash bug where the Binding Properties menu would hold a reference to a level sequence. In the case of USD, the outer of the sequences can be the level, and this caused issues when switching levels. To fix this I ended up needing to add some events when menus are being dismissed so I could clean up these references.
#jira UE-209839, UE-209548, UE-213115, UE-214195, UE-214443
#rb daniel.coelho, Max.Chen
[FYI] juan.portillo, Viktar.Mikhalchuk, Darrien.Blanchard, patrick.boutot
[CL 34080904 by bob tellez in ue5-main branch]
2024-06-03 19:14:21 -04:00
{
Sequencer- Resubmission of changelist 34065553 that had been backed out for a versioning issue which is now fixed. Original description below:
Sequencer- Dynamic Binding Refactor
Refactor the 'Dynamic Binding' blueprint system to be Custom Bindings rather than tied directly to FMovieScenePossessable and FMovieSceneSpawnable. As part of this:
? Created UMovieSceneReplaceableDirectorBlueprintBinding and UMovieSceneSpawnableDirectorBlueprintBinding to replace the Possessable and Spawnable versions of DynamicBindings
? Deprecated the DynamicBinding references on possessable and spawnable and created Postload fixup code to automatically create custom bindings instead
? Note that because the previous Dynamic Bindings operated as overrides and the new ones don't, there is a no longer supported path which is using Possessables as a preview in editor for Possessable Dynamic Bindings. Now if you don't mark 'Call in Editor' for a Replaceable Director Blueprint binding, you'll need to define a spawnable preview binding for the binding in order to work with it in Sequencer.
? Since UMG also used Dynamic Bindings on possessables, temporarily add DynamicBinding as a member variable on FWidgetAnimationBinding and create postload logic to move DynamicBindings to live on there for WidgetAnimations.
? USD has custom code to create dynamic bindings automatically for its use case. Convert this also to use the new custom binding system.
? Some cleanup on object binding right-click menus was done as part of this.
? Some further MovieSceneSequence API deprecation and refactoring has been done for the creation of bindings to add SharedPlaybackState where possible which was necessary for dynamic binding setup.
FMovieSceneSpawnable deprecation in Level Sequences
Since I was having to write postload fixup logic for FMovieSceneSpawnables with Dynamic Bindings that converted these to FMovieScenePossessables with custom bindings, it felt like a good chance to deprecate all FMovieSceneSpawnable use in Level Sequences.
I chose at this time not to deprecate FMovieSceneSpawnable use for non-Level-Sequence Movie Scene Sequences. This includes Day Sequences, Template Sequences, Actor Sequences, Widget Animations, Niagara Sequences, and some Meta Human sequences. I made this choice because to do so would require also refactoring those sequence types to use MovieSceneBindingReferences in order to enable custom bindings for those sequence types. This will be a future refactor.
Some notes on this deprecation.
? I kept MovieScene specific code that references or creates FMovieSceneSpawnables due to not refactoring all MovieSceneSequences
? Binding creation code in tools such as Sequencer will check for the presence of Binding References and create custom bindings if present, otherwise will still create FMovieSceneSpawnables
? AvaSequences required some extra work to make this change, including some changes and bugfixes to copy/pasting bindings to move away from custom avalanche copy/paste code, as the copy/paste code for custom bindings is a bit intricate and I didn't want to duplicate it.
? Chaos Cache has been moved away from using an object spawner and instead uses a custom spawnable actor binding inheriting from the regular spawnable actor binding.
? Actor and Take Recording has been updated to support custom spawnable bindings
? Meta Human specific code has been updated to support custom spawnable bindings when using Level Sequences
? FortniteMainBranchObjectVersion has been bumped
Crash fix
As part of the USD work, I found a crash bug where the Binding Properties menu would hold a reference to a level sequence. In the case of USD, the outer of the sequences can be the level, and this caused issues when switching levels. To fix this I ended up needing to add some events when menus are being dismissed so I could clean up these references.
#jira UE-209839, UE-209548, UE-213115, UE-214195, UE-214443
#rb Marc.Audy
#lockdown Marc.Audy
[FYI] juan.portillo, Viktar.Mikhalchuk, Darrien.Blanchard, patrick.boutot
[CL 34127005 by david bromberg in ue5-main branch]
2024-06-05 11:54:07 -04:00
for ( FMovieSceneBindingReference & BindingReference : BindingReferences - > GetAllReferences ( ) )
{
if ( BindingReference . CustomBinding )
{
if ( UMovieSceneReplaceableDirectorBlueprintBinding * ReplaceableDirectorBlueprintBinding = Cast < UMovieSceneReplaceableDirectorBlueprintBinding > ( BindingReference . CustomBinding ) )
{
FixupPayloadParameterName ( ReplaceableDirectorBlueprintBinding - > DynamicBinding ) ;
}
if ( UMovieSceneSpawnableDirectorBlueprintBinding * SpawnableDirectorBlueprintBinding = Cast < UMovieSceneSpawnableDirectorBlueprintBinding > ( BindingReference . CustomBinding - > AsSpawnable ( TransientPlaybackState ) ) )
{
FixupPayloadParameterName ( SpawnableDirectorBlueprintBinding - > DynamicBinding ) ;
}
}
}
2023-03-30 17:57:41 -04:00
}
}
Sequencer- Conditions
Core Condition Framework and Logic.
This changelist introduces movie scene conditions. Conditions can optionally be placed on Tracks, Sections, and Track Rows. If a condition evaluates to false, then the track, section, or track row will not evaluate. This allows developers to author Sequences with dynamic elements, for example:
* Different lighting for different times of day
* Different camera behavior or animation depending on bound character
* Different elements based on platform or performance metrics
Users can author their own condition classes in C++ or blueprints. A separate changelist will allow users to author director blueprint conditions in the sequence's blueprint.
Conditions are implemented as instanced UObjects that are stored in the MovieScene and referenced by their attached element (track, section) and as a separate piece of entity metadata in the compilation step. This entity metadata is evaluated by the entity ledger. Conditions can specify how often they need to be evaluated (once, or every tick), as well as what context they depend on for uniqueness (e.g. bound object or global context) for performance so they don't need to be evaluated more than necessary.
A note on Track Row Conditions- these have been implemented as part of a new 'Track Row Metadata' struct tying track row index to the metadata. While track row index can change, we keep track of these changes and move the metadata accordingly between these rows.
Finally a Group Condition class has been implemented as part of this changelist, allowing simple logic trees of conditions to be created. More complex logic would better be implemented as its own blueprint class or in the director blueprint. We use this group condition to combine track, section, and track row conditions as necessary.
For now, we prohibit Movie Scene Conditions from being used in UEFN Sequencer based on not exposing the UMovieSceneCondition class.
Director Blueprint Condition.
Adding condition type for 'Director Blueprint' conditions- allowing users to specify the logic for their movie scene condition within the Sequence director blueprint.
Sequencer- Condition framework UI customization and miscellaneous.
UI/details view customization for adding conditions in Sequencer. Adds a custom menu for selecting condition classes, creating new blueprint condition classes, or adding a director blueprint condition. Includes prevention for this UX to be used within UEFN Sequencer.
[REVIEW] [at]ue-sequencer
#jira UE-209603
#rb Max.Chen
[CL 35590470 by david bromberg in ue5-main branch]
2024-08-16 06:46:08 -04:00
void FMovieSceneToolsModule : : FixupPayloadParameterNameForDirectorBlueprintCondition ( UMovieScene * MovieScene , UK2Node * InNode , FName OldPinName , FName NewPinName )
{
using namespace UE : : MovieScene ;
check ( MovieScene ) ;
auto FixupPayloadParameterName = [ InNode , OldPinName , NewPinName ] ( FMovieSceneDirectorBlueprintConditionData & DirectorBlueprintConditionData )
{
if ( DirectorBlueprintConditionData . WeakEndpoint . Get ( ) = = InNode )
{
if ( FMovieSceneDirectorBlueprintConditionPayloadVariable * Variable = DirectorBlueprintConditionData . PayloadVariables . Find ( OldPinName ) )
{
DirectorBlueprintConditionData . PayloadVariables . Add ( NewPinName , MoveTemp ( * Variable ) ) ;
DirectorBlueprintConditionData . PayloadVariables . Remove ( OldPinName ) ;
}
}
} ;
FMovieSceneDirectorBlueprintConditionUtils : : IterateDirectorBlueprintConditions ( MovieScene , FixupPayloadParameterName ) ;
}
2022-06-15 05:19:02 -04:00
void FMovieSceneToolsModule : : RegisterClipboardConversions ( )
{
using namespace MovieSceneClipboard ;
DefineImplicitConversion < int32 , uint8 > ( ) ;
DefineImplicitConversion < int32 , bool > ( ) ;
DefineImplicitConversion < uint8 , int32 > ( ) ;
DefineImplicitConversion < uint8 , bool > ( ) ;
DefineExplicitConversion < int32 , FMovieSceneFloatValue > ( [ ] ( const int32 & In ) - > FMovieSceneFloatValue { return FMovieSceneFloatValue ( In ) ; } ) ;
DefineExplicitConversion < uint8 , FMovieSceneFloatValue > ( [ ] ( const uint8 & In ) - > FMovieSceneFloatValue { return FMovieSceneFloatValue ( In ) ; } ) ;
DefineExplicitConversion < FMovieSceneFloatValue , int32 > ( [ ] ( const FMovieSceneFloatValue & In ) - > int32 { return In . Value ; } ) ;
DefineExplicitConversion < FMovieSceneFloatValue , uint8 > ( [ ] ( const FMovieSceneFloatValue & In ) - > uint8 { return In . Value ; } ) ;
DefineExplicitConversion < FMovieSceneFloatValue , bool > ( [ ] ( const FMovieSceneFloatValue & In ) - > bool { return ! ! In . Value ; } ) ;
DefineExplicitConversion < int32 , FMovieSceneDoubleValue > ( [ ] ( const int32 & In ) - > FMovieSceneDoubleValue { return FMovieSceneDoubleValue ( In ) ; } ) ;
DefineExplicitConversion < uint8 , FMovieSceneDoubleValue > ( [ ] ( const uint8 & In ) - > FMovieSceneDoubleValue { return FMovieSceneDoubleValue ( In ) ; } ) ;
DefineExplicitConversion < FMovieSceneDoubleValue , int32 > ( [ ] ( const FMovieSceneDoubleValue & In ) - > int32 { return In . Value ; } ) ;
DefineExplicitConversion < FMovieSceneDoubleValue , uint8 > ( [ ] ( const FMovieSceneDoubleValue & In ) - > uint8 { return In . Value ; } ) ;
DefineExplicitConversion < FMovieSceneDoubleValue , bool > ( [ ] ( const FMovieSceneDoubleValue & In ) - > bool { return ! ! In . Value ; } ) ;
FSequencerClipboardReconciler : : AddTrackAlias ( " Location.X " , " R " ) ;
FSequencerClipboardReconciler : : AddTrackAlias ( " Location.Y " , " G " ) ;
FSequencerClipboardReconciler : : AddTrackAlias ( " Location.Z " , " B " ) ;
FSequencerClipboardReconciler : : AddTrackAlias ( " Rotation.X " , " R " ) ;
FSequencerClipboardReconciler : : AddTrackAlias ( " Rotation.Y " , " G " ) ;
FSequencerClipboardReconciler : : AddTrackAlias ( " Rotation.Z " , " B " ) ;
FSequencerClipboardReconciler : : AddTrackAlias ( " Scale.X " , " R " ) ;
FSequencerClipboardReconciler : : AddTrackAlias ( " Scale.Y " , " G " ) ;
FSequencerClipboardReconciler : : AddTrackAlias ( " Scale.Z " , " B " ) ;
FSequencerClipboardReconciler : : AddTrackAlias ( " X " , " R " ) ;
FSequencerClipboardReconciler : : AddTrackAlias ( " Y " , " G " ) ;
FSequencerClipboardReconciler : : AddTrackAlias ( " Z " , " B " ) ;
FSequencerClipboardReconciler : : AddTrackAlias ( " W " , " A " ) ;
}
void FMovieSceneToolsModule : : RegisterAnimationBakeHelper ( IMovieSceneToolsAnimationBakeHelper * InBakeHelper )
{
checkf ( ! BakeHelpers . Contains ( InBakeHelper ) , TEXT ( " Bake Helper is already registered " ) ) ;
BakeHelpers . Add ( InBakeHelper ) ;
}
void FMovieSceneToolsModule : : UnregisterAnimationBakeHelper ( IMovieSceneToolsAnimationBakeHelper * InBakeHelper )
{
checkf ( BakeHelpers . Contains ( InBakeHelper ) , TEXT ( " Bake Helper is not registered " ) ) ;
BakeHelpers . Remove ( InBakeHelper ) ;
}
void FMovieSceneToolsModule : : RegisterTakeData ( IMovieSceneToolsTakeData * InTakeData )
{
checkf ( ! TakeDatas . Contains ( InTakeData ) , TEXT ( " Take Data is already registered " ) ) ;
TakeDatas . Add ( InTakeData ) ;
}
void FMovieSceneToolsModule : : UnregisterTakeData ( IMovieSceneToolsTakeData * InTakeData )
{
checkf ( TakeDatas . Contains ( InTakeData ) , TEXT ( " Take Data is not registered " ) ) ;
TakeDatas . Remove ( InTakeData ) ;
}
void FMovieSceneToolsModule : : RegisterTrackImporter ( IMovieSceneToolsTrackImporter * InTrackImporter )
{
checkf ( ! TrackImporters . Contains ( InTrackImporter ) , TEXT ( " Track Importer is already registered " ) ) ;
TrackImporters . Add ( InTrackImporter ) ;
}
void FMovieSceneToolsModule : : UnregisterTrackImporter ( IMovieSceneToolsTrackImporter * InTrackImporter )
{
checkf ( TrackImporters . Contains ( InTrackImporter ) , TEXT ( " Take Importer is not registered " ) ) ;
TrackImporters . Remove ( InTrackImporter ) ;
}
bool FMovieSceneToolsModule : : GatherTakes ( const UMovieSceneSection * Section , TArray < FAssetData > & AssetData , uint32 & OutCurrentTakeNumber )
{
for ( IMovieSceneToolsTakeData * TakeData : TakeDatas )
{
if ( TakeData - > GatherTakes ( Section , AssetData , OutCurrentTakeNumber ) )
{
return true ;
}
}
return false ;
}
bool FMovieSceneToolsModule : : GetTakeNumber ( const UMovieSceneSection * Section , FAssetData AssetData , uint32 & OutTakeNumber )
{
for ( IMovieSceneToolsTakeData * TakeData : TakeDatas )
{
if ( TakeData - > GetTakeNumber ( Section , AssetData , OutTakeNumber ) )
{
return true ;
}
}
return false ;
}
bool FMovieSceneToolsModule : : SetTakeNumber ( const UMovieSceneSection * Section , uint32 InTakeNumber )
{
for ( IMovieSceneToolsTakeData * TakeData : TakeDatas )
{
if ( TakeData - > SetTakeNumber ( Section , InTakeNumber ) )
{
return true ;
}
}
return false ;
}
bool FMovieSceneToolsModule : : ImportAnimatedProperty ( const FString & InPropertyName , const FRichCurve & InCurve , FGuid InBinding , UMovieScene * InMovieScene )
{
for ( IMovieSceneToolsTrackImporter * TrackImporter : TrackImporters )
{
if ( TrackImporter - > ImportAnimatedProperty ( InPropertyName , InCurve , InBinding , InMovieScene ) )
{
return true ;
}
}
return false ;
}
bool FMovieSceneToolsModule : : ImportStringProperty ( const FString & InPropertyName , const FString & InStringValue , FGuid InBinding , UMovieScene * InMovieScene )
{
for ( IMovieSceneToolsTrackImporter * TrackImporter : TrackImporters )
{
if ( TrackImporter - > ImportStringProperty ( InPropertyName , InStringValue , InBinding , InMovieScene ) )
{
return true ;
}
}
return false ;
}
2023-10-03 17:17:44 -04:00
void FMovieSceneToolsModule : : RegisterKeyStructInstancedPropertyTypeCustomizer ( IMovieSceneToolsKeyStructInstancedPropertyTypeCustomizer * InCustomizer )
{
checkf ( ! KeyStructInstancedPropertyTypeCustomizers . Contains ( InCustomizer ) , TEXT ( " Key Struct Instanced Property Type Customizer is already registered " ) ) ;
KeyStructInstancedPropertyTypeCustomizers . Add ( InCustomizer ) ;
}
void FMovieSceneToolsModule : : UnregisterKeyStructInstancedPropertyTypeCustomizer ( IMovieSceneToolsKeyStructInstancedPropertyTypeCustomizer * InCustomizer )
{
checkf ( KeyStructInstancedPropertyTypeCustomizers . Contains ( InCustomizer ) , TEXT ( " Key Struct Instanced Property Type Customizer is not registered " ) ) ;
KeyStructInstancedPropertyTypeCustomizers . Remove ( InCustomizer ) ;
}
void FMovieSceneToolsModule : : CustomizeKeyStructInstancedPropertyTypes ( TSharedRef < IStructureDetailsView > StructureDetailsView , TWeakObjectPtr < UMovieSceneSection > Section )
{
for ( IMovieSceneToolsKeyStructInstancedPropertyTypeCustomizer * Customizer : KeyStructInstancedPropertyTypeCustomizers )
{
if ( Customizer )
{
Customizer - > RegisterKeyStructInstancedPropertyTypeCustomization ( StructureDetailsView , Section ) ;
}
}
}
2022-06-15 05:19:02 -04:00
IMPLEMENT_MODULE ( FMovieSceneToolsModule , MovieSceneTools ) ;
# undef LOCTEXT_NAMESPACE