Commit Graph

51 Commits

Author SHA1 Message Date
john manard
53f37e6fe6 Sequencer: Track Gutter UI Framework, Outliner Column Creation and Settings
#jira UE-105291
#rb max.chen

[CL 26286273 by john manard in ue5-main branch]
2023-06-28 11:25:52 -04:00
john manard
889e3d920d Sequencer: Track Gutter UI Framework, Outliner Column Creation and Settings
#jira UE-105291
#rb max.chen

[CL 26273588 by john manard in ue5-main branch]
2023-06-27 18:19:42 -04:00
max chen
b0f2b032cb Sequencer: When a track or binding is added, adjust sorting orders if there is going to be clash. The incoming track should be sorted to the bottom amongst the other tracks of the same class and name.
#jira UE-186432
#rb andrew.rodham, ludovic.chabant

[CL 26242858 by max chen in ue5-main branch]
2023-06-26 15:54:15 -04:00
john manard
6d06a1857c Sequencer: Outliner column registration and column interface declaration
#jira UE-105291
#rb max.chen

[CL 26028906 by john manard in ue5-main branch]
2023-06-15 18:16:21 -04:00
john manard
14fc05eb24 Sequencer: Outliner column registration and column interface declaration
#jira UE-105291
#rb max.chen

[CL 26028143 by john manard in ue5-main branch]
2023-06-15 17:56:10 -04:00
andrew rodham
9dce7cca59 Sequencer: Fixed a crash when duplicating keys
The tempoarary structure used by duplication has no owner, so doesn't need to report changes

#rb none
#jira UE-188234

[CL 25879219 by andrew rodham in ue5-main branch]
2023-06-08 15:29:43 -04:00
ludovic chabant
b912c0e4e9 Sequencer: don't assert on zero-width sections
#jira UE-187497
#rb max.chen
#preflight skip

[CL 25712517 by ludovic chabant in ue5-main branch]
2023-05-31 16:17:36 -04:00
ludovic chabant
ec974790d6 Sequencer: improve edge interaction for sections
- Draw easing handles as rounded triangles sized to match the grip size, instead of the previous bitmap.
- Easing handles are bigger, with bigger hit-testing area.
- Expose key size through the section interface in addition to grip size
- Fix bug where small sections can result in negative time-to-pixel conversion

#jira UE-171407
#rb max.chen
#preflight 6476202b4b1ead7c7f1db4e0

[CL 25694826 by ludovic chabant in ue5-main branch]
2023-05-30 19:34:48 -04:00
max chen
a5419cbe9a Sequencer: Added custom, persistent scheduler for dispatching ECS tasks
The aim of this work is to improve overall CPU cost in 3 ways:

  - to reduce the per-frame overhead of running ECS tasks
  - to decrease latency between useful gamethread work being able to run
  - to increase thread ultilization where many cores are available

In both single-threaded and multi-threaded mode this is showing a wall-clock speed improvement of ~25%, upon which other optimizations can now be made.

Previously, the Dispatch_ methods would construct tasks and filters for their work every frame. Tasks dispatched by downstream systems that were added as implicit dependencies would always depend on all the work of their upstream systems, even if they didn't necessarily need to be (for example, float properties would need to wait for *all* float channels to be evaluated and blended before they could be applied, even ones that only applied to transform properties).

The new approach introduces a new system phase (ESystemPhase::Scheduling) which is only run as part of the post-instantiation. This phase invokes a new method (OnSchedulePersistentTasks) which allows systems to define the task-structure for the current state of the ECS. Tasks defined here are stored inside the scheduler, and live for the duration of the instantiation - if the structure of the entity manager materially changes, the task graph is re-constructed.

Entity task builders are still used in this new method, but can only call Schedule_ and Fork_ functions for running tasks. These methods define serial and parallel behavior respectively that is to be run across the ECS (as should already be familiar). Crucially, each relevant entity allocation now gets its own task - the filter is run when the task graph is constructed, and a new task is created for each match. This allows us to interleave and/or distribute tasks across as many cores as possible, as soon as prerequisites are completed.

Tasks may also 'prelock' their component data - doing so will cache the location of the component data for each task (using a new type, TRelativePtr) so that it doesn't have to go hunting for component headers when the task is run.

Implementation details:
    IMovieSceneTaskScheduler exists as the public front-end to the new routines, but allows us to keep all the implementation details private.

    Tasks can be in one of two states: a single task can have multiple prerequisites and subsequents, a parent task can have many children which must be complete in order for the parent to be considered complete. This is used for depending on the results of forked and serial tasks that may be spawned multiple times.

    When constructing the graph, we keep track of the read and write dependencies for each component type within each allocation. When a task reads from a component it must first depend on any tasks that write to the same component on the same allocation. When a task writes to a component it must depend on all upstream read and write dependencies for that component, on that allocation.

    Moved TSparseBitSet to UE::MovieScene so I can use it for task dependencies

    Introduced TRelativePtr which allows storage of pointers relative to another pointer using a smaller type than a raw ptr would, and isn't invalidated like a raw ptr would be if is pointing to an element in a dynamic array.
    This is used for our prelocked component data, but may have uses elsewhere. Note that this is not a TRelativePtr that is relative to 'this' like some other relative pointer implementations (though one could easily be written that uses this implementation if necessary.

#rb Ludovic.Chabant, Max.Chen
#preflight 646e782e64351d76f3c508a2

[CL 25644373 by max chen in ue5-main branch]
2023-05-26 12:04:49 -04:00
Patrick Boutot
abd2be3706 Slate: Deprecate the SListView functions that managed the item in the STreeView. User should use the RootItem version instead.
#rb yohann.dossantos
#preflight 6463ce842d446eac965feb48

[CL 25505361 by Patrick Boutot in ue5-main branch]
2023-05-17 08:51:13 -04:00
max chen
163a79a8a1 Sequencer: New selection API
#rb andrew.rodham
#preflight 645bf3fd8b3e445e810bfb11
#jira UE-181670
#jira UE-181295
#jira UE-118265

[CL 25420127 by max chen in ue5-main branch]
2023-05-10 20:27:32 -04:00
mike zyracki
2f3c5cfe35 Sequencer: Add time scrubbing(b) to sequencer and curve editor to match viewport behavior. Had to add playback status to the time controller, add key up/down events to sequencer input handlers, and for both created new drag operations.
#rb max.chen
#preflight 644c5b21864f15ebf51579c7
#jira UE-151242

[CL 25327689 by mike zyracki in ue5-main branch]
2023-05-03 18:06:02 -04:00
andrew rodham
3b69a38163 Sequencer: Tightened up implicit viewmodel conversions, introduced static type information for ICastable instances
In order to support incoming improvements to the selection API, it is required that we no longer allow implicit construction of view model ptr types.
FViewModelPtr itself has now become a template alias of TViewModelPtr rather than a base class.
Casting between model types is now implemented through a static type table structure for each instance that stores type IDs and class offsets for each type, and no longer requires any virtual interface on the base class.
Casting models measured ~30% faster using this approach in my tests.
This will later be used by the scripting API to provide type information as well.
A new sparse bit set type has been added that provides the foundation for storing type information with the minimal amount of memory.

#rb Max.Chen
#preflight 64514705c86798f650c007fb

[CL 25323078 by andrew rodham in ue5-main branch]
2023-05-03 15:29:20 -04:00
Andrew Rodham
7751e8cb5e Sequencer: Fixed shared data not necessarily being initialized in OnConstruct calls for child models
When a model was being (re)constructed after a change (in the case of the bug it was moving a sub-folder out of its parent) it was possible for the shared data of its children to be null, whilst its parent was non-null. This creates the issue that the parent recycling its children would not trigger hierarchy change notifications for those children (because there is no shared data to trigger the event on). For layerbars this means leaving a dangling ptr in FViewModelExtensionCollection.

Really this breaks the invariants of the shared data - it should not ever be possible for a child to have different shared data than its parent (and that invariant was reliable outside of these OnConstruct calls). To correct it we now assign all shared data before calling OnConstruct/OnDestruct. In order to prevent multiple OnConstruct calls we now have to track whether it models need construction.

Also fixed destruction of FScopedViewModelListHead not calling hierarchy changed events by explicity emptying the list on destruction. This technically is not required to fix the bug, but I think is good practice nonetheless to avoid future problems with models being destructed while they are still parented.

#jira UE-176865
#preflight 63fcda14dd78dd50f6928073

[CL 24425107 by Andrew Rodham in ue5-main branch]
2023-02-27 11:48:54 -05:00
Andrew Rodham
588f4f9e10 Sequencer: Ensure that shared data is correctly propagated to children when detaching models from a hierarchy
#rb Max.Chen
#jira UE-176865
#preflight 63f4f79126233b957f698a76

[CL 24341868 by Andrew Rodham in ue5-main branch]
2023-02-21 12:05:31 -05:00
Max Chen
e0db9ee107 Sequencer: Remove rollover visibility of Add button text. Now the text is just in the tooltip so that there's no overlap with key editor buttons
#rb andrew.rodham
#preflight 63e6abd7de74ffbae5305a45
#jira UE-176827

[CL 24290890 by Max Chen in ue5-main branch]
2023-02-17 16:12:41 -05:00
ludovic chabant
502c4fd5dd Sequencer: fix incorrect setup and design for track areas
The pinned track area was shared with the normal track area, resulting in much painting and user interaction happening simultaneously in both areas. Now we properly create a pinned track area.

This change highlighted a problem which existed before the mvvm refactor, but became worse with that refactor: a lot of code needing access to the track area would simply get the "normal" track area from the sequencer editor, instead of getting the actual track area they are related to. This mean a lot of code was getting the "normal" track area when they were instead operating on the pinned one. Regressions have been fixed, but incorrect code from before the refactor has also been fixed. There might still be more to fix.

Before the mvvm refactor, the active hotspot was stored on the sequencer itself. Now, it's stored on the track area, which means there's no one place to figure out where the current hotspot is -- we would have to know which track area the mouse cursor is currently over. To avoid that, we bubble up the current hotspot from any of our track areas up to the sequencer editor view model. So now any code needing to simply know what is the current hotspot can look that up on the view model.

#jira UE-175785
#preflight 63e6dfd5211c20974f0b3d27
#rb max.chen

[CL 24179637 by ludovic chabant in ue5-main branch]
2023-02-13 12:51:45 -05:00
Andrew Rodham
4ff7bab147 Slate: Initial phase of FVector2D deprecation
- Expanded FDeprecateSlateVector2D to provide structs for parameters, return types and member variables that use FVector2f, while still allowing conversion to/from FVector2d with optional per-module deprecation mechanisms.
  - Many of the high-traffic SlateCore types like FSlateBrush, FGeometry and FSlateLayoutTransform have been converted to use these deprecation mechanisms.
  - Some legacy FGeometry::ToPaintGeometry and MakeChild overloads have been explicitly deprecated since they cause ambiguous overloads with FSlateLayoutTransform if it were to support implicit construction.
  - Deprecated ULocalPlayer::GetPixelBoundingBox and GetPixelPoint to prefer FVector2f for OptionalAllotedSize parameter since this parameter is expected to come from FGeometry
  - Exposed FVector2f members to blueprints

#jira none
#rb Andy.Davidson, Dave.Jones, Vincent.Gauthier, Patrick.Boutot
#preflight 63bc6fd068068a8bd6027c9f

[CL 23631073 by Andrew Rodham in ue5-main branch]
2023-01-10 14:46:43 -05:00
Patrick Boutot
acff5d3a7d Slate: Deprecated protected access to SListView::ItemsSource. This will allow us to use other container type.
#jira UE-132673
#rb sebastian.nordgren
#preflight 6398beed2540a78d2730da51

[CL 23512016 by Patrick Boutot in ue5-main branch]
2022-12-14 10:22:25 -05:00
henrik karlsson
b5164ac775 Fixes to make modules compile with IWYU. We've added to IWYU toolchain so it compiles "orphaned" headers which does not have a owning cpp file. This identified lots of headers that couldn't be compiled by themselves (or if they were to included first)
Change consist of only forward declaration and additional includes

#preflight 63789c1de30d438849c48188
#rb none

[CL 23218412 by henrik karlsson in ue5-main branch]
2022-11-21 03:22:23 -05:00
ludovic chabant
da73a683f7 Sequencer: fix loophole where non-renameable tracks could be renamed by simply clicking on their label in the sequencer outliner view
#rb andrew.rodham

[CL 22812043 by ludovic chabant in ue5-main branch]
2022-10-27 12:39:50 -04:00
henrik karlsson
b5b86c796c This change is a strategical submit for a coming change that removes lots of includes in headers that are included by many files. This change contains adding of includes in files that previously got those includes transitively from other inclkudes
#preflight 6355d4940313c24974b2107b
#rb none

[CL 22783162 by henrik karlsson in ue5-main branch]
2022-10-26 12:57:32 -04:00
andrew rodham
a9fb6ad1e7 Sequencer: Added an ensure to protect against adding a model as a child of itself
#jira none
#rb Max.Chen
#preflight 633744e2b34118b9b4bb4b49

[CL 22284287 by andrew rodham in ue5-main branch]
2022-09-30 19:26:01 -04:00
ludovic chabant
c8596663d6 Sequencer: Clean internal state when recycling VMs
This fixes a problem of pre-recycling state leaking through after an update

#rb max.chen, andrew.rodham
#jira none
#preflight 6328be3e6919ce39982d8266

[CL 22087360 by ludovic chabant in ue5-main branch]
2022-09-19 22:28:57 -04:00
ludovic chabant
1ec5865d8a Sequencer: Fix report of hierarchical changes
#rb max.chen, andrew.rodham
#jira none
#preflight 63289426ae4e65ae63ea01cd

[CL 22087247 by ludovic chabant in ue5-main branch]
2022-09-19 22:14:59 -04:00