2019-12-26 15:33:43 -05:00
// Copyright Epic Games, Inc. All Rights Reserved.
2014-03-14 14:13:41 -04:00
# include "AnimSequenceDetails.h"
2022-08-30 23:03:03 -04:00
2014-03-14 14:13:41 -04:00
# include "AnimMontageSegmentDetails.h"
2014-04-24 08:49:31 -04:00
# include "AnimPreviewInstance.h"
2022-08-30 23:03:03 -04:00
# include "Animation/AnimEnums.h"
# include "Animation/AnimInstance.h"
# include "Animation/AnimSequence.h"
# include "Animation/AnimSingleNodeInstance.h"
# include "Animation/AnimTypes.h"
# include "Animation/DebugSkelMeshComponent.h"
# include "Components/SceneComponent.h"
# include "Components/SkinnedMeshComponent.h"
# include "Containers/Map.h"
# include "Containers/UnrealString.h"
# include "Delegates/Delegate.h"
# include "DetailCategoryBuilder.h"
# include "DetailLayoutBuilder.h"
# include "DetailWidgetRow.h"
# include "Editor/UnrealEdTypes.h"
# include "EditorViewportClient.h"
# include "Engine/EngineBaseTypes.h"
# include "Engine/SkeletalMesh.h"
# include "Engine/World.h"
# include "Fonts/SlateFontInfo.h"
# include "Framework/Application/SlateApplication.h"
# include "HAL/PlatformCrt.h"
# include "Internationalization/Internationalization.h"
# include "Layout/Children.h"
# include "Layout/Margin.h"
# include "Math/BoxSphereBounds.h"
# include "Math/Transform.h"
# include "Math/UnrealMathSSE.h"
# include "Math/Vector.h"
# include "Misc/AssertionMacros.h"
# include "PreviewScene.h"
# include "PropertyEditorModule.h"
# include "PropertyHandle.h"
# include "SSearchableComboBox.h"
# include "SceneInterface.h"
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3209340 on 2016/11/23 by Ben.Marsh
Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.
Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.
* Every header now includes everything it needs to compile.
* There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
* There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
* Every .cpp file includes its matching .h file first.
* This helps validate that each header is including everything it needs to compile.
* No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
* You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
* There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
* No engine code explicitly includes a precompiled header any more.
* We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
* PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.
Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.
[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
# include "Slate/SceneViewport.h"
2022-08-30 23:03:03 -04:00
# include "SlateOptMacros.h"
# include "SlotBase.h"
# include "Templates/Casts.h"
# include "Templates/SubclassOf.h"
# include "UObject/Object.h"
# include "UObject/ObjectPtr.h"
# include "UObject/SoftObjectPtr.h"
# include "UObject/UObjectGlobals.h"
# include "UObject/UnrealNames.h"
# include "UObject/UnrealType.h"
# include "Viewports.h"
# include "Widgets/Input/SButton.h"
# include "Widgets/Layout/SBorder.h"
# include "Widgets/SBoxPanel.h"
# include "Widgets/SViewport.h"
# include "Widgets/Text/STextBlock.h"
2024-01-17 07:05:53 -05:00
# include "PropertyCustomizationHelpers.h"
# include "IDetailChildrenBuilder.h"
2022-08-30 23:03:03 -04:00
class SWidget ;
struct FGeometry ;
2014-03-14 14:13:41 -04:00
# define LOCTEXT_NAMESPACE "AnimSequenceDetails"
// default name for retarget source
# define DEFAULT_RETARGET_SOURCE_NAME TEXT("Default")
TSharedRef < IDetailCustomization > FAnimSequenceDetails : : MakeInstance ( )
{
return MakeShareable ( new FAnimSequenceDetails ) ;
}
BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION
void FAnimSequenceDetails : : CustomizeDetails ( IDetailLayoutBuilder & DetailBuilder )
{
2015-08-14 15:59:41 -04:00
/////////////////////////////////////////////////////////////////////////////////
2024-01-17 07:05:53 -05:00
// Animation
2015-08-14 15:59:41 -04:00
/////////////////////////////////////////////////////////////////////////////////
2014-03-14 14:13:41 -04:00
IDetailCategoryBuilder & AnimationCategory = DetailBuilder . EditCategory ( " Animation " ) ;
2024-01-17 07:05:53 -05:00
// *** Retarget source handler ***
2014-03-14 14:13:41 -04:00
RetargetSourceNameHandler = DetailBuilder . GetProperty ( GET_MEMBER_NAME_CHECKED ( UAnimSequence , RetargetSource ) ) ;
2020-09-24 00:43:27 -04:00
RetargetSourceAssetHandle = DetailBuilder . GetProperty ( GET_MEMBER_NAME_CHECKED ( UAnimSequence , RetargetSourceAsset ) ) ;
2014-03-14 14:13:41 -04:00
// first create profile combo list
RetargetSourceComboList . Empty ( ) ;
// first one is default one
RetargetSourceComboList . Add ( MakeShareable ( new FString ( DEFAULT_RETARGET_SOURCE_NAME ) ) ) ;
// find skeleton
TSharedPtr < IPropertyHandle > SkeletonHanlder = DetailBuilder . GetProperty ( TEXT ( " Skeleton " ) ) ;
FName CurrentPoseName ;
ensure ( RetargetSourceNameHandler - > GetValue ( CurrentPoseName ) ! = FPropertyAccess : : Fail ) ;
// Check if we use only one skeleton
2014-10-01 14:45:23 -04:00
USkeleton * Skeleton = NULL ;
2015-08-14 15:59:41 -04:00
SelectedAnimSequences . Reset ( ) ;
Copying //UE4/Dev-Editor to //UE4/Dev-Main (Source: //UE4/Dev-Editor @ 3566944)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3363699 by Mike.Fricker
VR Editor: Improved extensibility (for mesh editor)
- This was merged from CL 3352612 and re-opened for edit before commit
- All mesh editor changes were stripped before merging
Change 3499858 by Matt.Kuhlenschmidt
PR #3673: Fixed UE-36416 (Contributed by DarkSlot)
Change 3499872 by Matt.Kuhlenschmidt
PR #3682: Details view - matrix button visibility toggle and crash fix (Contributed by kamrann)
Change 3499873 by Matt.Kuhlenschmidt
Hide property matrix button from settings editor. For the combined settings objects view this produces nonsensical results and the property matrix is for bulk editing which settings are not designed for.
Change 3501154 by Arciel.Rekman
Fix incorrect RPATH.
- Fixed LinuxToolChain to use FileItem instead of strings.
- Fixed string-based Utils.MakePathRelativeTo - workaround for an old Mono bug was causing invalid "correction" of the relative path, triggered by the fact that path "Foo/Bar/../Baz" was not considered equal to "Foo/Baz". Instead of removing the workaround altogether, added a better comparison.
Change 3501337 by Arciel.Rekman
Better fix for RPATH.
- Ben Marsh's suggestion.
Change 3502572 by Matt.Kuhlenschmidt
PR #3693: Because "becuase" is spelled because (Contributed by getnamo)
Change 3502731 by Matt.Kuhlenschmidt
Guard against empty warning toasts
#jira UE-46285
Change 3502788 by Matt.Kuhlenschmidt
Avoid shutting down the editor during loads and slow tasks if a windows close message comes in during this time
Change 3503027 by Michael.Dupuis
Optimized UpdateLayerUsageInformation
Change 3503299 by Michael.Dupuis
Fixed crash when having no layer info object
Change 3504529 by Yannick.Lange
Use UWorld instead of FWorldContext for EditorWorldExtensions, since we don't use it.
Change 3504550 by Jamie.Dale
Fixed/Improved DnD validation between Content Browsers
Dragging assets between Content Browsers now goes through the same common DnD code (DragDropHandler) as dragging assets between the SPathView and SAssetView, and between items within an SAssetView. This also improves the validation of asset/file drops to prevent you dropping assets/files into class paths.
#jira UE-45857
Change 3505369 by Alexis.Matte
Make sure undo/redo transactions works for all fbx dialog options.
#jira UE-43465
#jira UE-43569
Change 3505500 by Matt.Kuhlenschmidt
Fix child usd meshes not importing properly.
Change 3505645 by Arciel.Rekman
Add USD support on Linux (UE-45383).
#jira UE-45383
Change 3505658 by Arciel.Rekman
USD: add CMake toolchain file I missed.
Change 3506796 by Yannick.Lange
Fix EditorWorldExtensionCollection using TWeakObjectPtr for UWorlds instead of UPROPERTY
Change 3508082 by Alexis.Matte
Make sure the fbx re-import editor preference "show option dialog at reimport" is working when re-importing an animation sequence.
Change 3508855 by Max.Chen
Add CanFindInContentBrowser to AssetEditorToolkit.
False for LevelSequenceEditorToolkit so that sequencer doesn't take over Find In Content Browser and show only the sequencer asset.
#jira UE-46241
Change 3509282 by Bradut.Palas
#jira UE-45337
Removed check for Actor->GetWorld() against GWorld because the latter would switch between editor world and PIE world during a tick, causing the widget to not update properly.
Since the Actor would always point to the PIE world, the check was no longer needed.
Change 3509298 by Nick.Darnell
Slate - Now has better support for analog navigation, the NavigationConfig is now created per user, and has the ability to deal with repeats and can handle navigation better by waiting until the user has moved enough to intend a direction to move.
Change 3509313 by Bradut.Palas
#jira UE-44630
As the bug description says, the Undo History was not refreshing correctly because an undo coupled with an action would result in the same number of transactions as the previous tick. Now we also check the variation of undo actions count in order to refresh the list.
Change 3509318 by Bradut.Palas
#jira UE-1406
To fix the issue we simply close the Consolidate window if ListViewItems is empty.
Change 3509402 by Nick.Darnell
PR #3703: UE-46362: Fixing typo in EUMGSequencePlayMode.PingPong comment (Contributed by gsfreema)
Change 3510447 by Arciel.Rekman
ReplayProxy: changed protected to private.
Change 3510467 by Max.Chen
Property Editor: Disable color widget when editing is disabled.
#jira UE-46331
Change 3511249 by Matt.Kuhlenschmidt
PR #3715: Turn off the automatic expiration of the restore assets notification (Contributed by IHappyDayI)
Change 3511286 by Matt.Kuhlenschmidt
Added ability to set properties from USD attributes when using scene import to import USD files. See
UsdPropTestScene.usda for an example file of how this works
Change 3511528 by Cody.Albert
Updated FMoviePlayerWidgetRenderer to use Slate time instea of application time
Change 3512149 by Matt.Kuhlenschmidt
Dont save non-dirty built data when playing PIE in a standalone process
#jira UE-46422
Change 3512259 by Matt.Kuhlenschmidt
Fix static analysis
Change 3512291 by Matt.Kuhlenschmidt
PR #3719: Updating UEditorEngine::ReplaceActors to not copy array of actors (Contributed by gsfreema)
Change 3512911 by Matt.Kuhlenschmidt
Fixed USD property setting crashing if the usd file contained an array with 0 elements.
Fixed USD property setting creating invalid tmaps if the usd file contained a key that already existed
Change 3513725 by Matt.Kuhlenschmidt
PR #3726: Copy/paste fix for SAdvancedDropdownRow::Construct() (Contributed by jovisgCL)
Change 3514453 by Jamie.Dale
Added a way to set the UEnum used by a UEnumProperty after using the default constructor
This will assert if called on an instance that has already been initialized
Change 3514858 by Alexis.Matte
Fix crash when importing animation and choosing a different value for option "Import Meshes In Bone Hierarchy" then the value use to import the skeletal mesh. In some case there is no skinned mesh.
Change 3514875 by Matt.Kuhlenschmidt
PR #3721: Fixed. Screen Message was showed always when screenshot is captured(F9) (Contributed by shuaiharry)
Change 3515859 by Bradut.Palas
#jira UE-46516
The RenameTextBox didn't handle the OnTextCommitted event (which can be triggered when pressing Enter in the box). Now it does.
Change 3515998 by Jamie.Dale
Adding missing ) to some log messages
Change 3517681 by Matt.Kuhlenschmidt
Fix automated import not applying any texure settings to imported textures
Change 3517703 by Nick.Darnell
Slate - Marking SWidget's destructor as virtual (it always has been because of the parent), but this makes it more obvious.
Change 3517737 by Nick.Darnell
Slate - The retainer widget now only knows how to store the images in gamma space, rather than rendering in linear and storing using sRGB writes. If you do it that way - you end up in a state of having premultiplied linear space stored in sRGB, and getting that back into a state that looks correct when you finally render it with the rest of Slate becomes very difficult, so to make things simpler
Change 3517758 by Nick.Darnell
UMG - Updating the retainer box categories and visibility.
Change 3517795 by Nick.Darnell
Slate - We now don't do inherited volatility if we're also caching.
Change 3517861 by Matt.Kuhlenschmidt
Update windows USD to .75
Change 3517867 by Matt.Kuhlenschmidt
Delete OpenEXR from USD dependencies. It is no longer used
Change 3517873 by Matt.Kuhlenschmidt
Updated USD windows binaries
Change 3517896 by Max.Chen
Sequencer: Call SkyLightComponent's SetLightColor() directly, similar to LightComponent
#jira UE-46669
Change 3518240 by Max.Chen
Sequencer: Set needs update when binding.
#jira UE-46619
Change 3518492 by Max.Chen
Sequencer: If already at the correct play position, don't jump to it. This fixes a bug where if you play to a position and pause, resuming play will playforward and not keep pausing.
#jira UE-45996, UE-45997
Change 3518997 by Max.Chen
Fbx: Fix aperture width, height, focal length and field of view calculations.
#jira UE-46754
Change 3520190 by Jamie.Dale
Cleaned up SCC log spam when finding out-of-date dependencies
Change 3520237 by Yannick.Lange
VR Editor: cleanup auto entry. Removed TimeSinceHMDChecked and added extra check for if there is currently a vr mode active.
Change 3520923 by Max.Chen
Sequencer: Refactor displaying sequencer settings in editor so that they're always available and not only when the sequencer type is instantiated.
#jira UE-46301
Change 3521212 by Matt.Kuhlenschmidt
PR #3757: MAX_NAME_LENGHT -> MAX_NAME_LENGTH (Contributed by Josef-CL)
#jira UE-46821
Change 3521216 by Matt.Kuhlenschmidt
PR #3751: Spelling fix for ESlateVisibility comment (Contributed by Triplelexx)
#jira UE-46810
Change 3521221 by Matt.Kuhlenschmidt
PR #3733: UE-46683: Don't increment MovieIndex when playing next movie (Contributed by projectgheist)
#jira UE-46683,UE-46714
Change 3521344 by Yannick.Lange
Fix selection tools in the Levels editor window. After selecting all levels SWorldHierarchyImpl::OnUpdateSelection used GetSelectedTreeItems(). At that point the tree items were not updated yet and it would return the 'previous' items. Making it look like nothing happened. Instead WorldModel->GetSelectedLevels() had to be used to get the new list of selected levels (this was used in 4.16) and then convert the list of FLevelModel to the new system that uses WorldHierarchy::FWorldTreeItemID.
#jira UE-46741
Change 3521825 by Joe.Graf
#Xb1
Added missing VectorSetFloat1 by copying the one in UnrealMathSSE.h
#CodeReview: ben.woodhouse
Change 3522114 by Joe.Graf
#Xb1
Changed the missing VectorSetFloat1 to use MakeRegisterVector to be more consistent with other Xbox defines per Ben's code review
#CodeReview: ben.woodhouse
Change 3524202 by Matt.Kuhlenschmidt
Prevent resizing when a context menu is open. This prevents a number of rare crashes when a window is resized when a child menu is open causing the child to lose connection to the parent (happens when the parent widgets are clipped and no longer processed). This is consistent with behavior on windows and mac.
#jira UE-46653
Change 3524263 by Bradut.Palas
#jira UE-46671
The issue happened because a parent callback of OnAssetRenameCommitted would allow an implicit sync and it would reset the search. Solved by blocking the parent callback if the user is searching.
Change 3524265 by Bradut.Palas
#jira UE-46261
Console command was doing something illegal. Opening a map from editor when multiprocess and client mode were enabled is prohibited by code in Playlevel.cpp (( !CanRunUnderOneProcess && PlayNetMode == EPlayNetMode::PIE_Client ))
Solved by banning that specific use of the command.
Change 3524266 by Bradut.Palas
#jira UE-45592
The bug was caused by an iteration in EndPlayMap() that re-selected all previous actors but without the notify flag (hence, not triggering the code that validated showing the transform widget). Fixed by notifying just once per group, for performance reasons.
Change 3524585 by Bradut.Palas
Back out changelist 3524265 until I can figure out why the build system doesn't like it.
Change 3525921 by Bradut.Palas
Resubmitting revision 3524265 with properly guarded editor code (#if WITH_EDITOR)
Change 3526124 by Matt.Kuhlenschmidt
Remvoe debug canvas proxy
Change 3526139 by Matt.Kuhlenschmidt
Force low quality fallback mode on ES2 devices for slate blur widgets. This feature does not work on es2
Change 3526663 by Cody.Albert
Fixed sequencer bindings to correctly work on streamed level in standalone preview mode
Change 3527028 by Cody.Albert
Back out changelist 3526663
Change 3527241 by Cody.Albert
Fixed sequencer bindings to correctly work on streamed level in standalone preview mode
Change 3527829 by Max.Chen
Fbx: Add static transform values to curve data import.
#jira UE-46888
Change 3527830 by Max.Chen
Sequencer: Import static/default transforms and camera focal lengths from fbx.
#jira UE-46888
Change 3528768 by Matt.Kuhlenschmidt
Refactor of GetDetailsView method on IDetalLayoutBuilder for some upcoming changes. There is no longer a guarantee that a physical details panel is present wwhen customizing a property so GetDetailsView now returns a pointer and will be null if no details view exists. This refactor is necessary for a change to allow us to make loose property widgets for use outside of a details view.
Change 3528776 by Yannick.Lange
Allow thumbnails to be captured from a viewport always.
#jira UE-45392
Change 3530675 by Michael.Dupuis
#jira UE-46913 : Added extra validation to prevent possible crash
Change 3530991 by Matt.Kuhlenschmidt
Added ability for users to specifiy usd plugins for the USD importer
Change 3531110 by Matt.Kuhlenschmidt
Added automated import support for USD.
Automated import now also supports loading a level per import group so that factories may spawn actors and manipulate the level
Change 3531119 by Matt.Kuhlenschmidt
USD Scene import now uses actor factories to determine the correct actor type to spawn for an asset specified in USD
Change 3531220 by Jamie.Dale
Fixed some places that were iterating over sets/maps using their element indices as if they were the sparse indices
Change 3531831 by Cody.Albert
BP nodes can no longer be renamed on read-only graphs.
Change 3531938 by Yannick.Lange
Enable setting justification at runtime for multi-line text boxes.
#jira UE-44801
Change 3533011 by Matt.Kuhlenschmidt
Exporting render targets now chooses PNG if the render target format is an LDR format
Change 3533370 by Arciel.Rekman
Fix comparison of the RT format.
Change 3533717 by Nick.Darnell
Slate - Adding justification to SEditableText and SpinBox, also adding the field for UMG.
Change 3534756 by Arciel.Rekman
Linux: add path to bundled GL headers.
- Seems like we have been implicitly relying on it being added someplace else or simply present in the system.
- Change by Cengiz.Terzibas
Change 3535421 by Arciel.Rekman
Reduce SCW logspam on Linux (UE-46634)
#jira UE-46634
Change 3537520 by Matt.Kuhlenschmidt
PR #3780: Fix typo steam to stream (Contributed by YuchenMei)
Change 3537539 by Nick.Darnell
UMG - Fixing a bug with aspect ratio locking cameras when in HDPI mode, the spaces were slightly different. Moving over the code that calculates the offsets to function in normalized space, so that it's trivial to combine with the existing normalized viewport dimensions and offset information, without space confusion.
Change 3537542 by Nick.Darnell
UMG - Fixing some bugs with the retainer widget which was not properly resetting or registering the hit testing information when rendered every frame. This should fix some issues that have been seen with clicks locking the viewport rendering, or not being clickable.
Change 3537596 by Alexis.Matte
Fbx SDK 2018.1.1 Integration
#jira UE-45070
Change 3537672 by Matt.Kuhlenschmidt
Simple fix for seconds of time being spent refreshing the settings editor if commands are registered while it is open. The request to refresh is deferred until next tick, meaning that each command list registered in a frame is not refreshing the details panel.
Change 3537796 by Alexis.Matte
Make sure all general settings are persist when we re-import a staticmesh from fbx file.
#jira UE-46829
Change 3537961 by Michael.Dupuis
#jira UE-47222: Prevent possible crash in some bad drag & drop case
Change 3538149 by Alexis.Matte
Make sure we export NTB information instead of just the normal when exporting to fbx
#jira UE-46785
Change 3538237 by Alexis.Matte
Fix import of large fbx scene (over 2 Gb) pr #3784
#jira UE-47124
Change 3538270 by Lauren.Ridge
Epic Friday: Preview scenes in material editors
Change 3539707 by Yannick.Lange
Optimize viewport interactor hitresult for laser. Store the first hitresult and use that when calling UViewportInteractor::GetHitResultFromLaserPointer multiple times a frame.
Change 3539964 by Lauren.Ridge
Fix for cubemap not persisting between loads
Change 3540321 by Arciel.Rekman
Linux: CEF rebuilt with fewer dependencies (UE-46433).
- Removed source-only binary to save size (we can link to the runtime one, this also allows RPATH to be generated automatically).
- Change by Cengiz.Terzibas, polished by RCL.
Change 3540458 by Alexis.Matte
Fix the HDR pixel inspector. The HDR value is now RGBA in editor viewport and RGB in Game mode.
#jira UE-47199
Change 3540681 by Arciel.Rekman
Linux: fix flickering (UE-46351) - redoing fix from 4.17
- Slate rendering policy can set a scissor rect equal to a (smaller) window, which would get inherited by the scene renderer later.
#jira UE-46351
(Redoing the fix from CL 3538578 in 4.17).
Change 3540838 by Matt.Kuhlenschmidt
Fix locked actors still being moved by piloting them
Change 3542212 by Nick.Darnell
Slate - Fixing a crash with per character wrapping. When used in rich text fields, it can cause a crash due to negative lengths for measurements, due to the way we calculate start and end indexes. New code now ensures the End is always >= to the Start.
Change 3544033 by Arciel.Rekman
Drop and deprecate /-prefixed commandline switches.
- Dropped on all platforms except Windows, where it will produce a warning. Complete drop is expected in 4.19.
Change 3544213 by Nick.Darnell
Slate - Fixing another potential crash with the slate loading thread. The default movie player was listening for map load finishing using the AddSP callaback, which means the weakptr would be accessed, switching these over to AddRaws to be safer.
Change 3546113 by Nick.Darnell
Slate - Resurecting the slate visualizer support in the slate renderer for batch visualization, and overdraw.
Change 3547129 by Michael.Trepka
Few small changes that make UnrealBuildTool faster when running on Mono
Change 3547454 by Jamie.Dale
Added search to editable texts
Change 3547460 by Jamie.Dale
The output log now applies a search to its editable text when filtering
This highlights the term matches on each line
Change 3548177 by Jamie.Dale
Optimized PO entry look-up
Change 3548287 by Matt.Kuhlenschmidt
Fix one off speedtree crash
#jira UE-47538
Change 3548377 by Lauren.Ridge
Checking that the Environment Map Path is set before trying to load it.
#jira UE-47365
Change 3548628 by Matt.Kuhlenschmidt
Fix focus graphic for tabs not pointing to the correct image
Change 3549289 by Max.Chen
Movie Scene Capture: Move window to within the desktop bounds when resizing.
#jira UE-37330
Change 3549290 by Arciel.Rekman
Fix hlslcc not working properly with newer clangs.
- Both the clang 3.8+ problem and UB reported by UBSan.
Change 3550573 by Max.Chen
Sequencer: Track drag drop.
Implement drag and drop onto a camera track, subscene track, and cinematic shot track.
#jira UE-45773
#jira UE-45387
Change 3550729 by Max.Chen
Sequence Recorder: Add interpolation and tangent settings for animation recording keys
#jira UE-46146
Change 3551558 by Nick.Darnell
UMG - Tweaking some designer elements, playing around with a 'real-time' mode. Also fixing a bug with decendant widgets in named slots not triggering design effects like updating the widget switcher.
#jira UE-39404
Change 3551671 by Joe.Graf
Merged over the change to expose more of dormancy to Blueprints (UE-46240)
Change 3551684 by Cody.Albert
Removing some unused code from map check
Change 3552673 by Yannick.Lange
Fix crash select all levels with folders in the treewidget.
Change 3552960 by Yannick.Lange
Frontend filter for files referenced by any level in the project and a filter for not referenced by any level.
#jira UE-22153
Change 3553727 by Max.Chen
Sequencer: Capture thumbnail before pre save so that the thumbnail isn't captured with the evaluation in a reset state.
#jira UE-47693
Change 3553778 by Arciel.Rekman
Cache check for compiler availability (UE-47699).
- Fixes performance drop in the blueprint editor. Better than caching in a particular source accessors because affects all accessors (incl. Mac which isn't cached either) and reduces calls.
Change 3554128 by Matt.Kuhlenschmidt
Null out GEditor after it has been destoyed. Any modules that access GEditor can now properly check for a null geditor instead of blindly accessing it
Change 3554266 by Max.Chen
Movie Scene Capture: Override cinematic mode in the movie scene capture.
#jira UE-33473
Change 3555563 by Alexis.Matte
Fix static mesh screensize lost when converting from an old version. The conversion require valid extended bounds which was converted after the LOD screensize.
#jira UE-47697
Change 3555755 by Yannick.Lange
VR Editor: Add exit button inside new menu called "system" on radial menu. Still needs correct icons.
Change 3556334 by Matt.Kuhlenschmidt
Added a new type of property editor called a property row generator. This is essentially a details panel that can generate each unique row but adds no visual styling around the property editors and does not generate a master tree widget for the properties. This is useful for creating proper widgets for properties and displaying them in a UI that is not the details panel
Change 3558100 by Matt.Kuhlenschmidt
PR #3823: Incorrect comment syntax in ini files (Contributed by projectgheist)
Change 3558240 by Lauren.Ridge
Move floor in material editor preview scene based on preview mesh
Change 3558242 by Matt.Kuhlenschmidt
Fix console variables help page showing only rendering cvars by default
Change 3558243 by Matt.Kuhlenschmidt
Fix static analysis
Change 3558342 by Alexis.Matte
Make the code to find the best sample rate to import fbx animation more simple and more robust. The code need to be able to support all the possible case.
Add a lot of animation sample rate automation tests
#jira UE-47342
Change 3558515 by Yannick.Lange
VR Editor: Changed icon for system and exit button on radial menu.
Change 3558973 by Matt.Kuhlenschmidt
Fix camera placement of the default map
Change 3559230 by Arciel.Rekman
Do not link CEF3 for servers (UE-47721).
Change 3559572 by Arciel.Rekman
Linux: make sure the engine is rebuilt during the updates.
Change 3560197 by Arciel.Rekman
Linux: cosmetic cleanup of an old code.
Change 3560904 by Max.Chen
Movie Scene Capture: Expose "Open Folder" hyperlink while capturing.
Change 3561213 by Matt.Kuhlenschmidt
Enable USD by default in QA game for testing
Change 3561928 by Matt.Kuhlenschmidt
Fix green glowing in the mateiral editor
#jira UE-47826
Change 3562259 by Arciel.Rekman
Made FPlatformMisc::DebugBreak() not inlined on Linux.
- Saves a great deal of binary size without really impacting a performance.
Change 3562630 by Arciel.Rekman
Make Linux editor compilable with clang 5.0-rc1.
Change 3563564 by Yannick.Lange
Fix Cube Static Mesh Thumbnail renders black. Cleared out the thumbnail, causing it to create the correct new one.
#jira UE-47777
Change 3564529 by Jamie.Dale
Const-correct UScriptStruct::ExportText
Change 3564972 by Alexis.Matte
Fix staticmesh merge applying build scale multiple time Git PR #3807
#jira UE-47645
Change 3565253 by Arciel.Rekman
Fix "Anim to Play" being inaccessible after import (UE-47885).
- The variable was not initialized and could remain false on Linux.
#jira UE-47885
Change 3565293 by Jamie.Dale
Merged "Categories" into the main Output Log filter list
Change 3565939 by Alexis.Matte
Back out revision 3 from //UE4/Dev-Editor/Engine/Source/Developer/MeshMergeUtilities/Private/MeshMergeHelpers.cpp
Change 3566081 by Alexis.Matte
Fix staticmesh merge applying scale twice PR #3807
#jira UE-47645
Change 3566232 by Matt.Kuhlenschmidt
Fix edit inline properties not clipping properly
#jira UE-47775
[CL 3567077 by Matt Kuhlenschmidt in Main branch]
2017-08-01 15:55:31 -04:00
TArray < TWeakObjectPtr < UObject > > SelectedObjectsList = DetailBuilder . GetSelectedObjects ( ) ;
2014-03-14 14:13:41 -04:00
for ( auto SelectionIt = SelectedObjectsList . CreateIterator ( ) ; SelectionIt ; + + SelectionIt )
{
if ( UAnimSequence * TestAnimSequence = Cast < UAnimSequence > ( SelectionIt - > Get ( ) ) )
{
2015-08-14 15:59:41 -04:00
SelectedAnimSequences . Add ( TestAnimSequence ) ;
2014-03-14 14:13:41 -04:00
}
}
2015-08-14 15:59:41 -04:00
// do it in separate loop since before it only cared AnimSequence
for ( auto & It : SelectedAnimSequences )
{
// we should only have one selected anim sequence
if ( Skeleton & & Skeleton ! = It - > GetSkeleton ( ) )
{
// Multiple different skeletons
Skeleton = NULL ;
break ;
}
Skeleton = It - > GetSkeleton ( ) ;
}
2014-03-14 14:13:41 -04:00
// set target skeleton. It can be null
TargetSkeleton = Skeleton ;
// find what is initial selection is
TSharedPtr < FString > InitialSelected ;
if ( TargetSkeleton . IsValid ( ) )
{
RegisterRetargetSourceChanged ( ) ;
2022-11-01 06:25:59 -04:00
// Add each retarget source
TArray < FName > RetargetSources ;
TargetSkeleton - > GetRetargetSources ( RetargetSources ) ;
// go through profile and see if it has mine
for ( FName & RetargetSource : RetargetSources )
{
RetargetSourceComboList . Add ( MakeShareable ( new FString ( RetargetSource . ToString ( ) ) ) ) ;
if ( RetargetSource = = CurrentPoseName )
2014-03-14 14:13:41 -04:00
{
InitialSelected = RetargetSourceComboList . Last ( ) ;
}
}
}
// add widget for editing retarget source
2022-04-01 09:41:25 -04:00
AnimationCategory
. AddCustomRow ( RetargetSourceNameHandler - > GetPropertyDisplayName ( ) )
. RowTag ( RetargetSourceNameHandler - > GetProperty ( ) - > GetFName ( ) )
2014-03-14 14:13:41 -04:00
. NameContent ( )
[
RetargetSourceNameHandler - > CreatePropertyNameWidget ( )
]
. ValueContent ( )
[
2019-05-28 14:58:53 -04:00
SAssignNew ( RetargetSourceComboBox , SSearchableComboBox )
2014-03-14 14:13:41 -04:00
. OptionsSource ( & RetargetSourceComboList )
. OnGenerateWidget ( this , & FAnimSequenceDetails : : MakeRetargetSourceComboWidget )
. OnSelectionChanged ( this , & FAnimSequenceDetails : : OnRetargetSourceChanged )
. OnComboBoxOpening ( this , & FAnimSequenceDetails : : OnRetargetSourceComboOpening )
. InitiallySelectedItem ( InitialSelected )
. IsEnabled ( FSlateApplication : : Get ( ) . GetNormalExecutionAttribute ( ) )
. ContentPadding ( 0 )
. Content ( )
[
SNew ( STextBlock )
. Text ( this , & FAnimSequenceDetails : : GetRetargetSourceComboBoxContent )
. Font ( IDetailLayoutBuilder : : GetDetailFont ( ) )
. ToolTipText ( this , & FAnimSequenceDetails : : GetRetargetSourceComboBoxToolTip )
]
] ;
2022-04-01 09:41:25 -04:00
AnimationCategory
. AddCustomRow ( RetargetSourceAssetHandle - > GetPropertyDisplayName ( ) )
. RowTag ( RetargetSourceAssetHandle - > GetProperty ( ) - > GetFName ( ) )
2020-09-24 00:43:27 -04:00
. NameContent ( )
[
RetargetSourceAssetHandle - > CreatePropertyNameWidget ( )
]
. ValueContent ( )
. HAlign ( EHorizontalAlignment : : HAlign_Fill )
[
SNew ( SVerticalBox )
+ SVerticalBox : : Slot ( )
. AutoHeight ( )
. HAlign ( EHorizontalAlignment : : HAlign_Left )
[
RetargetSourceAssetHandle - > CreatePropertyValueWidget ( )
]
+ SVerticalBox : : Slot ( )
. AutoHeight ( )
. HAlign ( EHorizontalAlignment : : HAlign_Left )
[
SNew ( SButton )
. Text ( LOCTEXT ( " UpdateRetargetSourceAssetDataButton " , " Update " ) )
. ToolTipText ( LOCTEXT ( " UpdateRetargetSourceAssetDataButtonToolTip " , " Updates retargeting data for RetargetSourceAsset. This is updated automatically at save, but you can click here to update without saving. " ) )
. Visibility ( this , & FAnimSequenceDetails : : UpdateRetargetSourceAssetDataVisibility )
. OnClicked ( this , & FAnimSequenceDetails : : UpdateRetargetSourceAssetData )
]
] ;
2014-03-14 14:13:41 -04:00
DetailBuilder . HideProperty ( RetargetSourceNameHandler ) ;
2020-09-24 00:43:27 -04:00
DetailBuilder . HideProperty ( RetargetSourceAssetHandle ) ;
2014-03-14 14:13:41 -04:00
2024-01-17 07:05:53 -05:00
// *** Animation Track Names ***
PRAGMA_DISABLE_DEPRECATION_WARNINGS
AnimationTrackNamesHandle = DetailBuilder . GetProperty ( GET_MEMBER_NAME_CHECKED ( UAnimSequence , AnimationTrackNames ) ) ;
PRAGMA_ENABLE_DEPRECATION_WARNINGS
if ( AnimationTrackNamesHandle . IsValid ( ) )
{
TArray < TWeakObjectPtr < UAnimSequence > > AnimSequences = DetailBuilder . GetSelectedObjectsOfType < UAnimSequence > ( ) ;
AnimationTrackNamesList . Empty ( ) ;
if ( ! AnimSequences . IsEmpty ( ) )
{
for ( const TWeakObjectPtr < UAnimSequence > & AnimSequenceWeak : AnimSequences )
{
if ( AnimSequenceWeak . IsValid ( ) )
{
if ( AnimSequenceWeak - > IsDataModelValid ( ) )
{
AnimSequenceWeak - > GetDataModelInterface ( ) - > GetBoneTrackNames ( AnimationTrackNamesList ) ;
}
}
}
}
TSharedRef < FDetailArrayBuilder > AnimationTrackNamesArrayBuilder = MakeShareable ( new FDetailArrayBuilder ( AnimationTrackNamesHandle . ToSharedRef ( ) , true , false , true ) ) ;
AnimationTrackNamesArrayBuilder - > OnGenerateArrayElementWidget ( FOnGenerateArrayElementWidget : : CreateSP ( this , & FAnimSequenceDetails : : GenerateAnimationTrackNameArrayElementWidget , & DetailBuilder ) ) ;
AnimationCategory . AddCustomBuilder ( AnimationTrackNamesArrayBuilder ) ;
DetailBuilder . HideProperty ( AnimationTrackNamesHandle ) ;
}
2015-08-14 15:59:41 -04:00
/////////////////////////////////////////////////////////////////////////////
// Additive settings category
/////////////////////////////////////////////////////////////////////////////
2014-03-14 14:13:41 -04:00
// now customize to combo box
IDetailCategoryBuilder & AdditiveSettingsCategory = DetailBuilder . EditCategory ( " AdditiveSettings " ) ;
// hide all properties for additive anim and replace them with custom additive settings setup
AdditiveAnimTypeHandle = DetailBuilder . GetProperty ( GET_MEMBER_NAME_CHECKED ( UAnimSequence , AdditiveAnimType ) ) ;
RefPoseTypeHandle = DetailBuilder . GetProperty ( GET_MEMBER_NAME_CHECKED ( UAnimSequence , RefPoseType ) ) ;
RefPoseSeqHandle = DetailBuilder . GetProperty ( GET_MEMBER_NAME_CHECKED ( UAnimSequence , RefPoseSeq ) ) ;
RefFrameIndexHandle = DetailBuilder . GetProperty ( GET_MEMBER_NAME_CHECKED ( UAnimSequence , RefFrameIndex ) ) ;
CreateOverridenProperty ( DetailBuilder , AdditiveSettingsCategory , AdditiveAnimTypeHandle , TAttribute < EVisibility > ( EVisibility : : Visible ) ) ;
CreateOverridenProperty ( DetailBuilder , AdditiveSettingsCategory , RefPoseTypeHandle , TAttribute < EVisibility > ( this , & FAnimSequenceDetails : : ShouldShowRefPoseType ) ) ;
DetailBuilder . HideProperty ( RefPoseSeqHandle ) ;
AdditiveSettingsCategory . AddCustomRow ( RefPoseSeqHandle - > GetPropertyDisplayName ( ) )
. Visibility ( TAttribute < EVisibility > ( this , & FAnimSequenceDetails : : ShouldShowRefAnimInfo ) )
. NameContent ( )
[
RefPoseSeqHandle - > CreatePropertyNameWidget ( )
]
. ValueContent ( )
[
SNew ( SVerticalBox )
+ SVerticalBox : : Slot ( )
. AutoHeight ( )
[
RefPoseSeqHandle - > CreatePropertyValueWidget ( )
]
+ SVerticalBox : : Slot ( )
. AutoHeight ( )
[
SNew ( SAnimationRefPoseViewport )
. Skeleton ( TargetSkeleton . Get ( ) )
. AnimRefPropertyHandle ( RefPoseSeqHandle )
. RefPoseTypeHandle ( RefPoseTypeHandle )
. RefFrameIndexPropertyHandle ( RefFrameIndexHandle )
]
] ;
CreateOverridenProperty ( DetailBuilder , AdditiveSettingsCategory , RefFrameIndexHandle , TAttribute < EVisibility > ( this , & FAnimSequenceDetails : : ShouldShowRefFrameIndex ) ) ;
}
END_SLATE_FUNCTION_BUILD_OPTIMIZATION
2024-01-17 07:05:53 -05:00
void FAnimSequenceDetails : : GenerateAnimationTrackNameArrayElementWidget ( TSharedRef < IPropertyHandle > PropertyHandle , int32 ArrayIndex , IDetailChildrenBuilder & ChildrenBuilder , IDetailLayoutBuilder * DetailLayout )
{
IDetailPropertyRow & PropRow = ChildrenBuilder . AddProperty ( PropertyHandle ) ;
PropRow . ShowPropertyButtons ( false ) ;
PropRow . OverrideResetToDefault ( FResetToDefaultOverride : : Hide ( ) ) ;
FDetailWidgetRow & WidgetRow = PropRow . CustomWidget ( true ) ;
WidgetRow . NameContent ( )
[
PropertyHandle - > CreatePropertyNameWidget ( )
] ;
WidgetRow . ValueContent ( )
[
SNew ( SHorizontalBox )
+ SHorizontalBox : : Slot ( )
. VAlign ( VAlign_Center )
. HAlign ( HAlign_Fill )
. Padding ( 5 , 0 , 0 , 0 )
. AutoWidth ( )
[
SNew ( SEditableTextBox )
2024-06-18 17:24:36 -04:00
. Text_Lambda ( [ this , ArrayIndex ] ( )
{
if ( AnimationTrackNamesList . IsValidIndex ( ArrayIndex ) )
{
return FText : : FromName ( AnimationTrackNamesList [ ArrayIndex ] ) ;
}
return FText : : GetEmpty ( ) ;
} )
2024-01-17 07:05:53 -05:00
. IsReadOnly ( true )
]
] ;
}
2014-03-14 14:13:41 -04:00
void FAnimSequenceDetails : : CreateOverridenProperty ( IDetailLayoutBuilder & DetailBuilder , IDetailCategoryBuilder & AdditiveSettingsCategory , TSharedPtr < IPropertyHandle > PropertyHandle , TAttribute < EVisibility > VisibilityAttribute )
{
DetailBuilder . HideProperty ( PropertyHandle ) ;
AdditiveSettingsCategory . AddCustomRow ( PropertyHandle - > GetPropertyDisplayName ( ) )
. Visibility ( VisibilityAttribute )
. NameContent ( )
[
PropertyHandle - > CreatePropertyNameWidget ( )
]
. ValueContent ( )
[
PropertyHandle - > CreatePropertyValueWidget ( )
] ;
}
EVisibility FAnimSequenceDetails : : ShouldShowRefPoseType ( ) const
{
uint8 AdditiveAnimType = AAT_None ;
AdditiveAnimTypeHandle - > GetValue ( AdditiveAnimType ) ;
return AdditiveAnimType ! = AAT_None ? EVisibility : : Visible : EVisibility : : Hidden ;
}
EVisibility FAnimSequenceDetails : : ShouldShowRefAnimInfo ( ) const
{
uint8 AdditiveAnimType = AAT_None ;
uint8 RefPoseType = ABPT_None ;
AdditiveAnimTypeHandle - > GetValue ( AdditiveAnimType ) ;
RefPoseTypeHandle - > GetValue ( RefPoseType ) ;
return TargetSkeleton . IsValid ( ) & & AdditiveAnimType ! = AAT_None & & ( RefPoseType = = ABPT_AnimScaled | | RefPoseType = = ABPT_AnimFrame ) ? EVisibility : : Visible : EVisibility : : Collapsed ;
}
EVisibility FAnimSequenceDetails : : ShouldShowRefFrameIndex ( ) const
{
uint8 AdditiveAnimType = AAT_None ;
uint8 RefPoseType = ABPT_None ;
AdditiveAnimTypeHandle - > GetValue ( AdditiveAnimType ) ;
RefPoseTypeHandle - > GetValue ( RefPoseType ) ;
2021-03-09 18:12:09 -04:00
return TargetSkeleton . IsValid ( ) & & AdditiveAnimType ! = AAT_None & & ( RefPoseType = = ABPT_AnimFrame | | RefPoseType = = ABPT_LocalAnimFrame ) ? EVisibility : : Visible : EVisibility : : Collapsed ;
2014-03-14 14:13:41 -04:00
}
TSharedRef < SWidget > FAnimSequenceDetails : : MakeRetargetSourceComboWidget ( TSharedPtr < FString > InItem )
{
2015-01-07 09:52:40 -05:00
return SNew ( STextBlock ) . Text ( FText : : FromString ( * InItem ) ) . Font ( IDetailLayoutBuilder : : GetDetailFont ( ) ) ;
2014-03-14 14:13:41 -04:00
}
void FAnimSequenceDetails : : DelegateRetargetSourceChanged ( )
{
if ( TargetSkeleton . IsValid ( ) )
{
// first create profile combo list
RetargetSourceComboList . Empty ( ) ;
// first one is default one
RetargetSourceComboList . Add ( MakeShareable ( new FString ( DEFAULT_RETARGET_SOURCE_NAME ) ) ) ;
// go through profile and see if it has mine
for ( auto Iter = TargetSkeleton - > AnimRetargetSources . CreateConstIterator ( ) ; Iter ; + + Iter )
{
RetargetSourceComboList . Add ( MakeShareable ( new FString ( Iter . Key ( ) . ToString ( ) ) ) ) ;
}
RetargetSourceComboBox - > RefreshOptions ( ) ;
}
}
void FAnimSequenceDetails : : RegisterRetargetSourceChanged ( )
{
if ( TargetSkeleton . IsValid ( ) & & ! OnDelegateRetargetSourceChanged . IsBound ( ) )
{
OnDelegateRetargetSourceChanged = USkeleton : : FOnRetargetSourceChanged : : CreateSP ( this , & FAnimSequenceDetails : : DelegateRetargetSourceChanged ) ;
2015-01-08 09:29:27 -05:00
OnDelegateRetargetSourceChangedDelegateHandle = TargetSkeleton - > RegisterOnRetargetSourceChanged ( OnDelegateRetargetSourceChanged ) ;
2014-03-14 14:13:41 -04:00
}
}
FAnimSequenceDetails : : ~ FAnimSequenceDetails ( )
{
if ( TargetSkeleton . IsValid ( ) & & OnDelegateRetargetSourceChanged . IsBound ( ) )
{
2015-01-08 09:29:27 -05:00
TargetSkeleton - > UnregisterOnRetargetSourceChanged ( OnDelegateRetargetSourceChangedDelegateHandle ) ;
2014-03-14 14:13:41 -04:00
}
}
void FAnimSequenceDetails : : OnRetargetSourceComboOpening ( )
{
FName RetargetSourceName ;
if ( RetargetSourceNameHandler - > GetValue ( RetargetSourceName ) ! = FPropertyAccess : : Result : : MultipleValues )
{
TSharedPtr < FString > ComboStringPtr = GetRetargetSourceString ( RetargetSourceName ) ;
if ( ComboStringPtr . IsValid ( ) )
{
RetargetSourceComboBox - > SetSelectedItem ( ComboStringPtr ) ;
}
}
}
void FAnimSequenceDetails : : OnRetargetSourceChanged ( TSharedPtr < FString > NewSelection , ESelectInfo : : Type SelectInfo )
{
// if it's set from code, we did that on purpose
if ( SelectInfo ! = ESelectInfo : : Direct )
{
FString NewValue = * NewSelection . Get ( ) ;
if ( NewValue = = DEFAULT_RETARGET_SOURCE_NAME )
{
NewValue = TEXT ( " " ) ;
}
// set profile set up
ensure ( RetargetSourceNameHandler - > SetValue ( NewValue ) = = FPropertyAccess : : Result : : Success ) ;
}
}
2015-01-07 09:52:40 -05:00
FText FAnimSequenceDetails : : GetRetargetSourceComboBoxContent ( ) const
2014-03-14 14:13:41 -04:00
{
FName RetargetSourceName ;
if ( RetargetSourceNameHandler - > GetValue ( RetargetSourceName ) = = FPropertyAccess : : Result : : MultipleValues )
{
2015-01-07 09:52:40 -05:00
return LOCTEXT ( " MultipleValues " , " Multiple Values " ) ;
2014-03-14 14:13:41 -04:00
}
2015-01-07 09:52:40 -05:00
return FText : : FromString ( * GetRetargetSourceString ( RetargetSourceName ) . Get ( ) ) ;
2014-03-14 14:13:41 -04:00
}
2015-01-07 09:52:40 -05:00
FText FAnimSequenceDetails : : GetRetargetSourceComboBoxToolTip ( ) const
2014-03-14 14:13:41 -04:00
{
2015-01-07 09:52:40 -05:00
return LOCTEXT ( " RetargetSourceComboToolTip " , " When retargeting, this pose will be used as a base of animation " ) ;
2014-03-14 14:13:41 -04:00
}
TSharedPtr < FString > FAnimSequenceDetails : : GetRetargetSourceString ( FName RetargetSourceName ) const
{
FString RetargetSourceString = RetargetSourceName . ToString ( ) ;
// go through profile and see if it has mine
for ( int32 Index = 1 ; Index < RetargetSourceComboList . Num ( ) ; + + Index )
{
if ( RetargetSourceString = = * RetargetSourceComboList [ Index ] )
{
return RetargetSourceComboList [ Index ] ;
}
}
return RetargetSourceComboList [ 0 ] ;
}
2020-09-24 00:43:27 -04:00
EVisibility FAnimSequenceDetails : : UpdateRetargetSourceAssetDataVisibility ( ) const
{
for ( const TWeakObjectPtr < UAnimSequence > & WeakAnimSequence : SelectedAnimSequences )
{
if ( UAnimSequence * AnimSequence = WeakAnimSequence . Get ( ) )
{
if ( ! AnimSequence - > RetargetSourceAsset . IsNull ( ) )
{
return EVisibility : : Visible ;
}
}
}
return EVisibility : : Collapsed ;
}
FReply FAnimSequenceDetails : : UpdateRetargetSourceAssetData ( )
{
RetargetSourceAssetHandle - > NotifyPostChange ( EPropertyChangeType : : Unspecified ) ;
return FReply : : Handled ( ) ;
}
2014-03-14 14:13:41 -04:00
////////////////////////////////////////////////
// based on SAnimationSegmentViewport
SAnimationRefPoseViewport : : ~ SAnimationRefPoseViewport ( )
{
// clean up components
if ( PreviewComponent )
{
2016-02-04 10:55:30 -05:00
for ( int32 I = PreviewComponent - > GetAttachChildren ( ) . Num ( ) - 1 ; I > = 0 ; - - I ) // Iterate backwards because CleanupComponent will remove from AttachChildren
2014-03-14 14:13:41 -04:00
{
// PreviewComponet will be cleaned up by PreviewScene,
// but if anything is attached, it won't be cleaned up,
// so we'll need to clean them up manually
2016-02-04 10:55:30 -05:00
CleanupComponent ( PreviewComponent - > GetAttachChildren ( ) [ I ] ) ;
2014-03-14 14:13:41 -04:00
}
2016-02-04 10:55:30 -05:00
check ( PreviewComponent - > GetAttachChildren ( ) . Num ( ) = = 0 ) ;
2014-03-14 14:13:41 -04:00
}
// Close viewport
if ( LevelViewportClient . IsValid ( ) )
{
LevelViewportClient - > Viewport = NULL ;
}
}
void SAnimationRefPoseViewport : : CleanupComponent ( USceneComponent * Component )
{
if ( Component )
{
2016-02-04 10:55:30 -05:00
for ( int32 I = Component - > GetAttachChildren ( ) . Num ( ) - 1 ; I > = 0 ; - - I ) // Iterate backwards because CleanupComponent will remove from AttachChildren
2014-03-14 14:13:41 -04:00
{
2016-02-04 10:55:30 -05:00
CleanupComponent ( Component - > GetAttachChildren ( ) [ I ] ) ;
2014-03-14 14:13:41 -04:00
}
2016-02-04 10:55:30 -05:00
check ( Component - > GetAttachChildren ( ) . Num ( ) = = 0 ) ;
2014-03-14 14:13:41 -04:00
Component - > DestroyComponent ( ) ;
}
}
SAnimationRefPoseViewport : : SAnimationRefPoseViewport ( )
: PreviewScene ( FPreviewScene : : ConstructionValues ( ) )
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
, PreviewComponent ( nullptr )
2014-03-14 14:13:41 -04:00
{
}
BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION
void SAnimationRefPoseViewport : : Construct ( const FArguments & InArgs )
{
TargetSkeleton = InArgs . _Skeleton ;
AnimRefPropertyHandle = InArgs . _AnimRefPropertyHandle ;
RefPoseTypeHandle = InArgs . _RefPoseTypeHandle ;
RefFrameIndexPropertyHandle = InArgs . _RefFrameIndexPropertyHandle ;
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
// Create the preview component
2015-02-03 05:40:57 -05:00
PreviewComponent = NewObject < UDebugSkelMeshComponent > ( ) ;
2018-05-14 17:04:44 -04:00
PreviewComponent - > VisibilityBasedAnimTickOption = EVisibilityBasedAnimTickOption : : AlwaysTickPoseAndRefreshBones ;
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
PreviewScene . AddComponent ( PreviewComponent , FTransform : : Identity ) ;
2014-03-14 14:13:41 -04:00
this - > ChildSlot
[
SNew ( SVerticalBox )
+ SVerticalBox : : Slot ( )
. AutoHeight ( )
[
SAssignNew ( Description , STextBlock )
. Text ( LOCTEXT ( " DefaultViewportLabel " , " Default View " ) )
2014-07-24 23:32:20 -04:00
. AutoWrapText ( true )
2014-03-14 14:13:41 -04:00
]
+ SVerticalBox : : Slot ( )
. AutoHeight ( )
[
SNew ( SBorder )
. HAlign ( HAlign_Center )
[
SAssignNew ( ViewportWidget , SViewport )
. EnableGammaCorrection ( false )
]
]
+ SVerticalBox : : Slot ( )
. AutoHeight ( )
[
SNew ( SAnimationSegmentScrubPanel )
. ViewInputMin ( this , & SAnimationRefPoseViewport : : GetViewMinInput )
. ViewInputMax ( this , & SAnimationRefPoseViewport : : GetViewMaxInput )
. PreviewInstance ( this , & SAnimationRefPoseViewport : : GetPreviewInstance )
. DraggableBars ( this , & SAnimationRefPoseViewport : : GetBars )
. OnBarDrag ( this , & SAnimationRefPoseViewport : : OnBarDrag )
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
. OnTickPlayback ( this , & SAnimationRefPoseViewport : : OnTickPreview )
2014-03-14 14:13:41 -04:00
. bAllowZoom ( true )
]
] ;
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
// Create the viewport
LevelViewportClient = MakeShareable ( new FAnimationSegmentViewportClient ( PreviewScene ) ) ;
2014-03-14 14:13:41 -04:00
LevelViewportClient - > ViewportType = LVT_Perspective ;
LevelViewportClient - > bSetListenerPosition = false ;
LevelViewportClient - > SetViewLocation ( EditorViewportDefs : : DefaultPerspectiveViewLocation ) ;
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
LevelViewportClient - > SetViewRotation ( EditorViewportDefs : : DefaultPerspectiveViewRotation ) ;
2014-03-14 14:13:41 -04:00
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
SceneViewport = MakeShareable ( new FSceneViewport ( LevelViewportClient . Get ( ) , ViewportWidget ) ) ;
2014-03-14 14:13:41 -04:00
LevelViewportClient - > Viewport = SceneViewport . Get ( ) ;
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
LevelViewportClient - > SetRealtime ( true ) ;
LevelViewportClient - > VisibilityDelegate . BindSP ( this , & SAnimationRefPoseViewport : : IsVisible ) ;
LevelViewportClient - > SetViewMode ( VMI_Lit ) ;
2014-03-14 14:13:41 -04:00
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
ViewportWidget - > SetViewportInterface ( SceneViewport . ToSharedRef ( ) ) ;
2014-03-14 14:13:41 -04:00
InitSkeleton ( ) ;
}
END_SLATE_FUNCTION_BUILD_OPTIMIZATION
void SAnimationRefPoseViewport : : InitSkeleton ( )
{
2021-10-27 15:14:40 -04:00
UObject * Object = nullptr ;
2014-03-14 14:13:41 -04:00
AnimRefPropertyHandle - > GetValue ( Object ) ;
2021-10-27 15:14:40 -04:00
PreviewAnimationSequence = Cast < UAnimSequence > ( Object ) ;
const USkeleton * Skeleton = nullptr ;
if ( PreviewAnimationSequence ! = nullptr )
2014-03-14 14:13:41 -04:00
{
2021-10-27 15:14:40 -04:00
Skeleton = PreviewAnimationSequence - > GetSkeleton ( ) ;
2014-03-14 14:13:41 -04:00
}
2014-07-24 23:32:20 -04:00
// if skeleton doesn't match with target skeleton, this is error, we can't support it
2021-10-27 15:14:40 -04:00
if ( PreviewComponent & & Skeleton & & ( Skeleton = = TargetSkeleton ) )
{
UAnimSingleNodeInstance * PreviewAnimInstance = PreviewComponent - > PreviewInstance ;
USkeletalMesh * PreviewSkeletalMesh = [ Skeleton , this ] ( ) - > USkeletalMesh *
2014-07-24 23:32:20 -04:00
{
2021-10-27 15:14:40 -04:00
// Try preview mesh on Anim Sequence
USkeletalMesh * Mesh = PreviewAnimationSequence - > GetPreviewMesh ( ) ;
// Otherwise try skeleton preview mesh
if ( Mesh = = nullptr )
2014-07-24 23:32:20 -04:00
{
2021-10-27 15:14:40 -04:00
Mesh = Skeleton - > GetPreviewMesh ( ) ;
2014-07-24 23:32:20 -04:00
}
2021-10-27 15:14:40 -04:00
// Last resort try to find a _any_ compatible mesh for the skeleton
if ( Mesh = = nullptr )
{
Mesh = Skeleton - > FindCompatibleMesh ( ) ;
}
return Mesh ;
} ( ) ;
const bool bInvalidPreviewInstance = PreviewAnimInstance = = nullptr | | PreviewAnimInstance - > GetCurrentAsset ( ) ! = PreviewAnimationSequence ;
2022-08-15 09:26:50 -04:00
const bool bPreviewMeshMismatch = PreviewComponent - > GetSkeletalMeshAsset ( ) ! = PreviewSkeletalMesh ;
2021-10-27 15:14:40 -04:00
if ( bInvalidPreviewInstance | | bPreviewMeshMismatch )
{
PreviewComponent - > SetSkeletalMesh ( PreviewSkeletalMesh ) ;
PreviewComponent - > EnablePreview ( true , PreviewAnimationSequence ) ;
PreviewComponent - > PreviewInstance - > SetLooping ( true ) ;
//Place the camera at a good viewer position
FVector NewPosition = LevelViewportClient - > GetViewLocation ( ) ;
NewPosition . Normalize ( ) ;
if ( PreviewSkeletalMesh )
{
NewPosition * = ( PreviewSkeletalMesh - > GetImportedBounds ( ) . SphereRadius * 1.5f ) ;
}
LevelViewportClient - > SetViewLocation ( NewPosition ) ;
2014-07-24 23:32:20 -04:00
}
}
2014-03-14 14:13:41 -04:00
}
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
void SAnimationRefPoseViewport : : OnTickPreview ( double InCurrentTime , float InDeltaTime )
2014-03-14 14:13:41 -04:00
{
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
LevelViewportClient - > Invalidate ( ) ;
}
2014-03-14 14:13:41 -04:00
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
void SAnimationRefPoseViewport : : Tick ( const FGeometry & AllottedGeometry , const double InCurrentTime , const float InDeltaTime )
{
2014-03-14 14:13:41 -04:00
class UDebugSkelMeshComponent * Component = PreviewComponent ;
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
FString TargetSkeletonName = TargetSkeleton ? TargetSkeleton - > GetName ( ) : FName ( NAME_None ) . ToString ( ) ;
2014-03-14 14:13:41 -04:00
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
if ( Component ! = NULL )
2014-03-14 14:13:41 -04:00
{
// Reinit the skeleton if the anim ref has changed
InitSkeleton ( ) ;
2021-10-27 15:14:40 -04:00
if ( Component - > IsPreviewOn ( ) & & PreviewAnimationSequence ! = NULL )
2014-03-14 14:13:41 -04:00
{
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
if ( PreviewComponent ! = NULL & & PreviewComponent - > PreviewInstance ! = NULL )
2014-03-14 14:13:41 -04:00
{
uint8 RefPoseType ;
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
RefPoseTypeHandle - > GetValue ( RefPoseType ) ;
if ( RefPoseType = = ABPT_AnimFrame )
2014-03-14 14:13:41 -04:00
{
int RefFrameIndex ;
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
RefFrameIndexPropertyHandle - > GetValue ( RefFrameIndex ) ;
2021-10-27 15:14:40 -04:00
float Fraction = ( PreviewAnimationSequence - > GetNumberOfSampledKeys ( ) > 0 ) ? FMath : : Clamp < float > ( ( float ) RefFrameIndex / ( float ) PreviewAnimationSequence - > GetNumberOfSampledKeys ( ) , 0.f , 1.f ) : 0.f ;
float RefTime = PreviewAnimationSequence - > GetPlayLength ( ) * Fraction ;
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
PreviewComponent - > PreviewInstance - > SetPosition ( RefTime , false ) ;
PreviewComponent - > PreviewInstance - > SetPlaying ( false ) ;
LevelViewportClient - > Invalidate ( ) ;
2014-03-14 14:13:41 -04:00
}
}
2015-01-07 09:52:40 -05:00
Description - > SetText ( FText : : Format ( LOCTEXT ( " Previewing " , " Previewing {0} " ) , FText : : FromString ( Component - > GetPreviewText ( ) ) ) ) ;
2014-03-14 14:13:41 -04:00
}
Copying //UE4/Dev-Blueprints to Dev-Main (//UE4/Dev-Main) @ 2781164
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2716841 on 2015/10/05 by Mike.Beach
(WIP) Cleaning up how we setup script assets for replacement on cook (aligning more with the Blueprint conversion tool).
#codereview Maciej.Mroz
Change 2719089 on 2015/10/07 by Maciej.Mroz
ToValidCPPIdentifierChars handles propertly '?' char.
#codereview Dan.Oconnor
Change 2719361 on 2015/10/07 by Maciej.Mroz
Generated native code for AnimBPGC - some preliminary changes.
Refactor: UAnimBlueprintGeneratedClass is not accessed directly in runtime. It is accessed via UAnimClassInterface interface.
Properties USkeletalMeshComponent::AnimBlueprintGeneratedClass and UInterpTrackFloatAnimBPParam::AnimBlueprintClass were changed into "TSubclassOf<UAnimInstance> AnimClass"
The UDynamicClass also can deliver the IAnimClassInterface interface. See UAnimClassData, IAnimClassInterface::GetFromClass and UDynamicClass::AnimClassImplementation.
#codereview Lina.Halper, Thomas.Sarkanen
Change 2719383 on 2015/10/07 by Maciej.Mroz
Debug-only code removed
Change 2720528 on 2015/10/07 by Dan.Oconnor
Fix for determinsitc cooking of async tasks and load asset nodes
#codereview Mike.Beach, Maciej.Mroz
Change 2721273 on 2015/10/08 by Maciej.Mroz
Blueprint Compiler Cpp Backend
- Anim Blueprints can be converted
- Various fixes/improvements
Change 2721310 on 2015/10/08 by Maciej.Mroz
refactor (cl#2719361) - no "auto" keyword
Change 2721727 on 2015/10/08 by Mike.Beach
(WIP) Setup the cook commandlet so it handles converted assets, replacing them with generated classes.
- Refactored the conversion manifest (using a map over an array)
- Centralized destination paths into a helper struct (for the manifest)
- Generating an Editor module that automatically hooks into the cook process when enabled
- Loading and applying native replacments for the cook
Change 2723276 on 2015/10/09 by Michael.Schoell
Blueprints duplicated for PIE will no longer register as dependencies to other Blueprint.
#jira UE-16695 - Editor freezes then crashes while attempting to save during PIE
#jira UE-21614 - [CrashReport] Crash while saving during PIE - FKismetEditorUtilities::CompileBlueprint() kismet2.cpp:736
Change 2724345 on 2015/10/11 by Ben.Cosh
Blueprint profiler at first pass, this includes the ability to instrument specific blueprints with realtime editor stat display.
#UEBP-21 - Profiling data capture and storage
#UEBP-13 - Performance capture landing page
#Branch UE4
#Proj BlueprintProfiler, BlueprintGraph, EditorStyle, Kismet, UnrealEd, CoreUObject, Engine
Change 2724613 on 2015/10/12 by Ben.Cosh
Incremental update for blueprint profiler to fix the way some of the reported stats cascade through events and branches and additionally some missed bits of code are refactored/removed.
#Branch UE4
#Proj BlueprintProfiler
#info Whilst looking into this I spotted the reason why the stats seem so erratic, There appears to be an issue with FText's use of EXPERIMENTAL_TEXT_FAST_DECIMAL_FORMAT which I have reported, but ideally disable this locally until a fix is integrated.
Change 2724723 on 2015/10/12 by Maciej.Mroz
Constructor of a dynamic class creates CDO.
#codereview Robert.Manuszewski
Change 2725108 on 2015/10/12 by Mike.Beach
[UE-21891] Minor fix to the array shuffle() function; now processes the last entry like all the others.
Change 2726358 on 2015/10/13 by Maciej.Mroz
UDataTable is properly saved even if its RowStruct is null.
https://udn.unrealengine.com/questions/264064/crash-using-hotreload-in-custom-datatable-cdo-clas.html
Change 2727395 on 2015/10/13 by Mike.Beach
(WIP) Second pass on the Blueprint conversion pipeline; setting it up for more optimal (speedier) performance.
* Using stubs for replacements (rather than loading dynamic replacement).
* Giving the cook commandlet more control (so a conversion could be ran directly).
* Now logging replacements by old object path (to account for UPackage replacement queries).
* Fix for [UE-21947], unshelved from CL 2724944 (by Maciej.Mroz).
#codereview Maciej.Mroz
Change 2727484 on 2015/10/13 by Mike.Beach
[UE-22008] Fixing up comment/tooltip typo for UActorComponent::bAutoActivate.
Change 2727527 on 2015/10/13 by Mike.Beach
Downgrading an inactionable EdGraph warning, while adding more info so we could possibly determine what's happening.
Change 2727702 on 2015/10/13 by Dan.Oconnor
Fix for crash in UDelegateProperty::GetCPPType when called on a function with no OwnerClass (events)
Change 2727968 on 2015/10/14 by Maciej.Mroz
Since ConstructorHelpers::FClassFinder is usually static, the loaded class should be in root set, to prevent the pointer stored in ConstructorHelpers::FClassFinder from being obsolete.
FindOrLoadClass behaves now like FindOrLoadObject.
#codereview Robert.Manuszewski, Nick.Whiting
Change 2728139 on 2015/10/14 by Phillip.Kavan
2015-11-25 18:47:20 -05:00
else if ( Component - > AnimClass )
2014-03-14 14:13:41 -04:00
{
Copying //UE4/Dev-Blueprints to Dev-Main (//UE4/Dev-Main) @ 2781164
#lockdown Nick.Penwarden
==========================
MAJOR FEATURES + CHANGES
==========================
Change 2716841 on 2015/10/05 by Mike.Beach
(WIP) Cleaning up how we setup script assets for replacement on cook (aligning more with the Blueprint conversion tool).
#codereview Maciej.Mroz
Change 2719089 on 2015/10/07 by Maciej.Mroz
ToValidCPPIdentifierChars handles propertly '?' char.
#codereview Dan.Oconnor
Change 2719361 on 2015/10/07 by Maciej.Mroz
Generated native code for AnimBPGC - some preliminary changes.
Refactor: UAnimBlueprintGeneratedClass is not accessed directly in runtime. It is accessed via UAnimClassInterface interface.
Properties USkeletalMeshComponent::AnimBlueprintGeneratedClass and UInterpTrackFloatAnimBPParam::AnimBlueprintClass were changed into "TSubclassOf<UAnimInstance> AnimClass"
The UDynamicClass also can deliver the IAnimClassInterface interface. See UAnimClassData, IAnimClassInterface::GetFromClass and UDynamicClass::AnimClassImplementation.
#codereview Lina.Halper, Thomas.Sarkanen
Change 2719383 on 2015/10/07 by Maciej.Mroz
Debug-only code removed
Change 2720528 on 2015/10/07 by Dan.Oconnor
Fix for determinsitc cooking of async tasks and load asset nodes
#codereview Mike.Beach, Maciej.Mroz
Change 2721273 on 2015/10/08 by Maciej.Mroz
Blueprint Compiler Cpp Backend
- Anim Blueprints can be converted
- Various fixes/improvements
Change 2721310 on 2015/10/08 by Maciej.Mroz
refactor (cl#2719361) - no "auto" keyword
Change 2721727 on 2015/10/08 by Mike.Beach
(WIP) Setup the cook commandlet so it handles converted assets, replacing them with generated classes.
- Refactored the conversion manifest (using a map over an array)
- Centralized destination paths into a helper struct (for the manifest)
- Generating an Editor module that automatically hooks into the cook process when enabled
- Loading and applying native replacments for the cook
Change 2723276 on 2015/10/09 by Michael.Schoell
Blueprints duplicated for PIE will no longer register as dependencies to other Blueprint.
#jira UE-16695 - Editor freezes then crashes while attempting to save during PIE
#jira UE-21614 - [CrashReport] Crash while saving during PIE - FKismetEditorUtilities::CompileBlueprint() kismet2.cpp:736
Change 2724345 on 2015/10/11 by Ben.Cosh
Blueprint profiler at first pass, this includes the ability to instrument specific blueprints with realtime editor stat display.
#UEBP-21 - Profiling data capture and storage
#UEBP-13 - Performance capture landing page
#Branch UE4
#Proj BlueprintProfiler, BlueprintGraph, EditorStyle, Kismet, UnrealEd, CoreUObject, Engine
Change 2724613 on 2015/10/12 by Ben.Cosh
Incremental update for blueprint profiler to fix the way some of the reported stats cascade through events and branches and additionally some missed bits of code are refactored/removed.
#Branch UE4
#Proj BlueprintProfiler
#info Whilst looking into this I spotted the reason why the stats seem so erratic, There appears to be an issue with FText's use of EXPERIMENTAL_TEXT_FAST_DECIMAL_FORMAT which I have reported, but ideally disable this locally until a fix is integrated.
Change 2724723 on 2015/10/12 by Maciej.Mroz
Constructor of a dynamic class creates CDO.
#codereview Robert.Manuszewski
Change 2725108 on 2015/10/12 by Mike.Beach
[UE-21891] Minor fix to the array shuffle() function; now processes the last entry like all the others.
Change 2726358 on 2015/10/13 by Maciej.Mroz
UDataTable is properly saved even if its RowStruct is null.
https://udn.unrealengine.com/questions/264064/crash-using-hotreload-in-custom-datatable-cdo-clas.html
Change 2727395 on 2015/10/13 by Mike.Beach
(WIP) Second pass on the Blueprint conversion pipeline; setting it up for more optimal (speedier) performance.
* Using stubs for replacements (rather than loading dynamic replacement).
* Giving the cook commandlet more control (so a conversion could be ran directly).
* Now logging replacements by old object path (to account for UPackage replacement queries).
* Fix for [UE-21947], unshelved from CL 2724944 (by Maciej.Mroz).
#codereview Maciej.Mroz
Change 2727484 on 2015/10/13 by Mike.Beach
[UE-22008] Fixing up comment/tooltip typo for UActorComponent::bAutoActivate.
Change 2727527 on 2015/10/13 by Mike.Beach
Downgrading an inactionable EdGraph warning, while adding more info so we could possibly determine what's happening.
Change 2727702 on 2015/10/13 by Dan.Oconnor
Fix for crash in UDelegateProperty::GetCPPType when called on a function with no OwnerClass (events)
Change 2727968 on 2015/10/14 by Maciej.Mroz
Since ConstructorHelpers::FClassFinder is usually static, the loaded class should be in root set, to prevent the pointer stored in ConstructorHelpers::FClassFinder from being obsolete.
FindOrLoadClass behaves now like FindOrLoadObject.
#codereview Robert.Manuszewski, Nick.Whiting
Change 2728139 on 2015/10/14 by Phillip.Kavan
2015-11-25 18:47:20 -05:00
Description - > SetText ( FText : : Format ( LOCTEXT ( " Previewing " , " Previewing {0} " ) , FText : : FromString ( Component - > AnimClass - > GetName ( ) ) ) ) ;
2014-03-14 14:13:41 -04:00
}
2022-11-01 06:25:59 -04:00
else if ( PreviewAnimationSequence & & ! PreviewAnimationSequence - > GetSkeleton ( ) - > IsCompatibleForEditor ( TargetSkeleton ) )
2014-07-24 23:32:20 -04:00
{
2022-11-01 06:25:59 -04:00
Description - > SetText ( FText : : Format ( LOCTEXT ( " IncorrectSkeleton " , " The preview asset is incompatible with the skeleton '{0}' " ) , FText : : FromString ( TargetSkeletonName ) ) ) ;
2014-07-24 23:32:20 -04:00
}
2022-08-15 09:26:50 -04:00
else if ( Component - > GetSkeletalMeshAsset ( ) = = NULL )
2014-03-14 14:13:41 -04:00
{
2015-01-07 09:52:40 -05:00
Description - > SetText ( FText : : Format ( LOCTEXT ( " NoMeshFound " , " No skeletal mesh found for skeleton '{0}' " ) , FText : : FromString ( TargetSkeletonName ) ) ) ;
2014-03-14 14:13:41 -04:00
}
else
{
2015-01-07 09:52:40 -05:00
Description - > SetText ( FText : : Format ( LOCTEXT ( " SelectAnimation " , " Select animation that works for skeleton '{0}' " ) , FText : : FromString ( TargetSkeletonName ) ) ) ;
2014-03-14 14:13:41 -04:00
}
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
Component - > GetScene ( ) - > GetWorld ( ) - > Tick ( LEVELTICK_All , InDeltaTime ) ;
2014-03-14 14:13:41 -04:00
}
else
{
2015-01-07 09:52:40 -05:00
Description - > SetText ( FText : : Format ( LOCTEXT ( " NoMeshFound " , " No skeletal mesh found for skeleton '{0}' " ) , FText : : FromString ( TargetSkeletonName ) ) ) ;
2014-03-14 14:13:41 -04:00
}
}
void SAnimationRefPoseViewport : : RefreshViewport ( )
{
}
bool SAnimationRefPoseViewport : : IsVisible ( ) const
{
return ViewportWidget . IsValid ( ) ;
}
float SAnimationRefPoseViewport : : GetViewMinInput ( ) const
{
if ( PreviewComponent ! = NULL )
{
if ( PreviewComponent - > PreviewInstance ! = NULL )
{
return 0.0f ;
}
2015-10-06 15:59:09 -04:00
else if ( PreviewComponent - > GetAnimInstance ( ) ! = NULL )
2014-03-14 14:13:41 -04:00
{
2015-10-06 15:59:09 -04:00
return FMath : : Max < float > ( ( float ) ( PreviewComponent - > GetAnimInstance ( ) - > LifeTimer - 30.0 ) , 0.0f ) ;
2014-03-14 14:13:41 -04:00
}
}
return 0.f ;
}
float SAnimationRefPoseViewport : : GetViewMaxInput ( ) const
{
if ( PreviewComponent ! = NULL )
{
if ( PreviewComponent - > PreviewInstance ! = NULL )
{
return PreviewComponent - > PreviewInstance - > GetLength ( ) ;
}
2015-10-06 15:59:09 -04:00
else if ( PreviewComponent - > GetAnimInstance ( ) ! = NULL )
2014-03-14 14:13:41 -04:00
{
2015-10-06 15:59:09 -04:00
return PreviewComponent - > GetAnimInstance ( ) - > LifeTimer ;
2014-03-14 14:13:41 -04:00
}
}
return 0.f ;
}
TArray < float > SAnimationRefPoseViewport : : GetBars ( ) const
{
TArray < float > Bars ;
2021-10-27 15:14:40 -04:00
if ( PreviewAnimationSequence )
2014-03-14 14:13:41 -04:00
{
Animation data MVC refactor
#jira UE-104234
#rb Thomas.Sarkanen, Martin.Wilson, Alexis.Matte, Michael.Zyracki
+ Introduced UAnimDataModel, this currently represents the source data for bone and curve animation. It contains:
+ Bone animation tracks (FBoneAnimationTrack)
+ Key data (coarse)
+ Name
+ Bone tree index
+ Curve data (FAnimationCurveData)
+ Float Curves
+ Transform Curves
+ Play length
+ Sampling rate
+ Used for deriving the expected number of keys/frames when combined with the PlayLength
+ Transient data for supporting backwards compatibility APIs
+ (Dynamic) delegate which broadcasts the mutation Notifies
+ Introduced UAnimDataController, this has sole authority over mutating data contained by UAnimDataModel
+ API functionality allows to transform the contained data in all ways currently expected in the engine.
+ Any mutation will add an undo/redo-able FChange object into the transaction buffer
+ FChangeTransactor helper object allows for keeping track of (compounded) FChange's and inserting them into GUndo
+ Broadcasts change notifies alongside a payload object containing details about the change
+ Interested systems/objects can register to these changes through UAnimDataModel::OnModelModified event
+ Almost all functionality is exposed to both Blueprint and Python scripting
+ Allows for opening 'Brackets', these define the beginning and end of a chain of mutations. Allowing anything registered to OnModelModified to halt responding to the notifies until the (top-level) bracket is closed
+ Undo/redo actions
+ Each mutation to the UAnimDataModel is covered by a 'Action' which is based of FChange and is used to insert a undo/redo-able operation into the transactions buffer
+ Introduced EAnimDataModelNotifType and per-notify payload types. These are used to update views, and any model derived data
+ Introduced FAnimationCurveIdentifier, exposed to scripting, this is used for referencing a curve by name and type when passed to the controller
+ Allows for targetting a specific RichCurve as part of a TransformCurve
+ Introduced FAnimationDataNotifyCollectorused for keeping track of which notifies of type EAnimDataModelNotifType are broadcasted between top-level EAnimDataModelNotifType::BracketOpened and EAnimDataModelNotifType::BracketClosed notifies
+ Added CanTransact to UEngine, returns whether or not a transaction can be made
+ Added UAnimCompositeBase::SetCompositeLength, used for runtime changing of play length value
+ Animation Sequence helpers, containing 'helper' functionality for both AnimSequence and AnimDataModel
* Animation Sequence Base
+ virtual PopulateModel, called during upgrade path for converting existing (legacy) data to the new UAnimDataModel data
+ virtual OnModelModified, registered to the Model's OnModified event to handle any Notifies and payloads
+ Added UAnimDataModel sub-object (editor only)
+ Added UAnimDataController instance (transient and editor only)
+ FAnimationDataNotifyCollector to keep track of model bracketed notifies
* Deprecated
* SetSequenceLength()
* RefreshCurveData()
* MarkRawDataAsModified()
* RegisterOnAnimCurvesChanged()
* UnregisterOnAnimCurvesChanged()
* UnregisterOnAnimTrackCurvesChanged()
* RegisterOnAnimTrackCurvesChanged()
* Public access to RawCurveData
* Animation Sequence
+ Implements PopulateModel/OnModelModified for AnimationSequence related data
+ Added TargetFrameRate, currently locked to the initial sampling rate, but allows for resampling the UAnimDataModel data according to the set rate
+ Added NumberOfSampledKeys (editor only), populated by resampling process
+ Added NumberOfSampledFrames (editor only), populated by resampling process
+ Added ResampledAnimationTrackData (editor only and transient), populated by resampling process
+ Added bBlockCompressionRequests (editor only), used for blocking compression during automation tests
* Deprecated
* SetNumberOfSampledKeys()
* MarkRawDataAsModified()
* GetRawAnimationData()
* GetAnimationTrackNames()
* AddNewRawTrack()
* GetRawTrackToSkeletonMapTable()
* GetRawAnimationTrack()
* GetRawAnimationTrack()
* UpdateFrameRate()
* ExtractBoneTransform()
* CompressRawAnimData()
* GetSkeletonIndexFromRawDataTrackIndex()
* RecycleAnimSequence()
* CleanAnimSequenceForImport()
* CopyNotifies()
* PostProcessSequence()
* AddLoopingInterpolation()
* RemoveAllTracks()
* DoesContainTransformCurves()
* InsertFramesToRawAnimData()
* CropRawAnimData()
* RemoveTrack()
* InsertTrack()
* ResizeSequence()
* Non-editor access to GetUncompressedRawSize()
* Non-editor access to GetApproxRawSize()
* Public access to UpdateCompressedCurveName()
* NumberOfKeys
* SamplingFrameRate
* TrackToSkeletonMapTable
* RawAnimationData
* AnimationTrackNames
* Animation Streamable
* Model from source Sequence is duplicated rather than copying animation data
* Deprecated ERawCurveTrackTypes::RCT_Vector (marked as hidden)
+ Added automated test for
+ All script exposed controller functionality
+ Undo/redo actions
* Updated existing AnimSequence tests with deprecation and new expected data
+ Base data for compression is now populated from the 'resampled' version stored on the AnimSequence
+ Data cleanup and validation is now performed during compression
+ Track sanitization is now performed during compression (normalizing Quats and clamping near-zero values to zero)
+ Key reduction
+ Invalid track (missing bone from skeleton) removal
+ Curve name validation against skeleton
* Replaced RawCurves with Float curves
* Updated DDC key
- Removed all Guid generation related functionality (now part of the model)
* AnimSequenceBase model registers to AnimModel's notify event, used for refreshing the tracks
* Replaces the in-place calling of RefreshTracks()
* All curve tracks now hold a const CurveType* rather than a CurveType*/& for introspection of its data
+ Any mutations now go through the controller API
+ Uses AnimationCurveIdentifier to set Transform's per-channel tracks
* RichCurveEditorModelNamed conformed to model/controller
+ Any modifications are applied to an temporary CurveType which always contains a copy of the const-ptr after any previous mutation
+ Registers to the outer AnimModel's notify event, used for updating the cached curve data
+ Registers to CurveModifiedDelegate, used for copying the temp curve data to the model using SetCurveKeys
* Not-ideal but point that I got to for V1
* Would be replaced with either refactoring FRichCurve to be MVC like, or by calling UAnimDataController functionality from an implementation of FRichCurveEditorModel
* Mark FChange overrides as final for swap/command change permutations
* Changed FCompoundChange GetDescription to return concatenation of all sub-changes
* Added GetDescription to FTransaction which returns the ToString() value of any contained FChange entries.
* Entries in SUndoHistory tab now have a ToolTip showing the GetDescription() value
+ FChangeTransactor helper object allows for keeping track of (compounded) FChange's and inserting them into GUndo
* Deprecation handling, conforming code to new APIs and exposing structure/objects/properties to scripting
* Conforming AnimSequence importing from FBX to Model/Controller changes
[CL 15106211 by Jurre deBaare in ue5-main branch]
2021-01-15 06:41:11 -04:00
int32 RefFrameIndex ;
2014-03-14 14:13:41 -04:00
RefFrameIndexPropertyHandle - > GetValue ( RefFrameIndex ) ;
2021-10-27 15:14:40 -04:00
float Fraction = ( PreviewAnimationSequence - > GetNumberOfSampledKeys ( ) > 0 ) ? FMath : : Clamp < float > ( ( float ) RefFrameIndex / ( float ) PreviewAnimationSequence - > GetNumberOfSampledKeys ( ) , 0.f , 1.f ) : 0.f ;
Bars . Add ( PreviewAnimationSequence - > GetPlayLength ( ) * Fraction ) ;
2014-03-14 14:13:41 -04:00
}
else
{
Bars . Add ( 0.0f ) ;
}
return Bars ;
}
void SAnimationRefPoseViewport : : OnBarDrag ( int32 Index , float Position )
{
2021-10-27 15:14:40 -04:00
if ( PreviewAnimationSequence )
2014-03-14 14:13:41 -04:00
{
2021-10-27 15:14:40 -04:00
int RefFrameIndex = FMath : : Clamp < int > ( PreviewAnimationSequence - > GetPlayLength ( ) > 0.0f ? ( int ) ( Position * ( float ) PreviewAnimationSequence - > GetNumberOfSampledKeys ( ) / PreviewAnimationSequence - > GetPlayLength ( ) + 0.5f ) : 0.0f , 0 , PreviewAnimationSequence - > GetNumberOfSampledKeys ( ) - 1 ) ;
2014-03-14 14:13:41 -04:00
RefFrameIndexPropertyHandle - > SetValue ( RefFrameIndex ) ;
}
}
UAnimSingleNodeInstance * SAnimationRefPoseViewport : : GetPreviewInstance ( ) const
{
return PreviewComponent ? PreviewComponent - > PreviewInstance : NULL ;
}
# undef LOCTEXT_NAMESPACE