You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb none #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3297108 on 2017/02/10 by Mieszko.Zielinski Added AISight's peripherial vision angle claming as well as marked up UI to not allow values from outside of [0,180] range #UE4 #jira UE-41114 Change 3299467 on 2017/02/13 by Marc.Audy Don't try to update active sounds on audio thread if the audio component is not active. If these functions are callled from a constructor on an async loading thread it can cause a crash Change 3300692 on 2017/02/13 by Marc.Audy no auto Change 3301424 on 2017/02/14 by Marc.Audy Handle gateway expansion before the node matching loop #jira UE-41858 Change 3301547 on 2017/02/14 by Marc.Audy PR #3246: Added BindDelegate that supports functions with custom (static) arguments (Contributed by PhoenixBlack) #jira UE-41926 Change 3301557 on 2017/02/14 by Marc.Audy When passing null to Rename for the new name, maintain the OldName is possible #jira UE-41937 Change 3301676 on 2017/02/14 by Marc.Audy Fix pending occlusion async traces from crashing during shutdown #jira UE-41939 Change 3302705 on 2017/02/14 by Mieszko.Zielinski Removed 'PRAGMA_DISABLE_OPTIMIZATION' uccurences from AIModule #UE4 Change 3302898 on 2017/02/14 by Dan.Oconnor Fix double negative Change 3302954 on 2017/02/14 by Dan.Oconnor Make sure we use a good version of the class Change 3302977 on 2017/02/14 by Dan.Oconnor Optimization in reinstancer turned back on - 3302898 has fixed the regression Change 3302984 on 2017/02/14 by Dan.Oconnor Relink classes that were not recompiled in a wave of the compilation manager - currently only happens for data only blueprints. This fixes issues in Odin when using the compilation manager Change3303824on 2017/02/15 by Richard.Hinckley Updating URL for FABRIK system information. Change 3304284 on 2017/02/15 by Dan.Oconnor Build fix Change 3304297 on 2017/02/15 by Dan.Oconnor Shadow variable fix Change 3304465 on 2017/02/15 by Lukasz.Furman fixed handling pathfollowing's requests by FloatingPawnMovement #jira UE-41884 Change 3305031 on 2017/02/15 by Marc.Audy All objects should get PostLoadSubobjects calls, regardless of whether they are outered to a CDO or not #jira UE-41708 Change 3305505 on 2017/02/15 by Michael.Noland Blueprints: Fix a crash when opening a BP with a parent class that no longer exists (unguarded access to the parent class) Change 3305506 on 2017/02/15 by Michael.Noland QAGame: Created some assets that reference a non-existent type to test 'gracefully' handling missing native class types Change 3306091 on 2017/02/16 by Marc.Audy PR #3263: Fixed duplicate comment from OnAudioFinished (Contributed by FrostByteGER) #jira UE-42027 Change 3306574 on 2017/02/16 by Marc.Audy Linked To pins can belong to invalid nodes and fail to load, this shouldn't be considered fatal Change 3307160 on 2017/02/16 by Marc.Audy Rename(null, null ... is sometimes used to just force a name out of the way, so in that case don't try and maintain old name. Change 3307982 on 2017/02/16 by Michael.Noland QAGame: Added another test asset for missing classes (this time a missing node class placed in a BP) Change 3308097 on 2017/02/16 by Michael.Noland Graph Editor: Instantly clear GraphNodeForMenu and GraphPinForMenu as soon as the menu is dismissed, fixing crashes and other odd issues after deleting pins #jira UE-41789 Change 3308303 on 2017/02/16 by Dan.Oconnor Make sure we don't call GetDefaultObject while compiling on a non-native class Change 3308850 on 2017/02/17 by Mieszko.Zielinski Fully exposed NavModifierVolume as ENGINE_API #UE4 Change 3309624 on 2017/02/17 by Phillip.Kavan [UE-40443] Recursively emit ctor initialization code for nested default subobjects when nativizing a Blueprint class. change summary: - modified FEmitDefaultValueHelper::OuterGenerate() to recursively detect and handle nested default subobjects. #jira UE-40443 Change 3310475 on 2017/02/17 by Dan.Oconnor Split bluepint compilation into CompileClassLayout and CompileFunctions, fix class hierarchy after creating reinstancers in blueprintcompilation manager. Together this means we don't need to run RecompileBlueprintBytecode Change 3310487 on 2017/02/17 by Dan.Oconnor Fix build error missed by preflgiht Change 3310497 on 2017/02/17 by Dan.Oconnor More build fixes for things missed by preflight... Change 3310635 on 2017/02/17 by Dan.Oconnor Remove unused parameter and add comment to blueprint compilation manager explaining abuse of bBeingCompiled Change 3310639 on 2017/02/17 by Dan.Oconnor Shadow variable fixes, not sure why these are being detected now Change3311855on 2017/02/20 by Marc.Audy Fix UChildActorComponent::ParentComponent being null on the client #jira UE-42140 Change 3312444 on 2017/02/20 by Marc.Audy Add a bAutoDestroy pin to BP Spawn Sound and Force Feedback nodes to allow users to reuse the created component #jira UE-41267 Change 3312691 on 2017/02/20 by mason.seay Deleting map now that bug has been fixed Change 3312709 on 2017/02/20 by Phillip.Kavan [UE-39705] Fix broken collision shapes when cooking with optimized BP component data option. change summary: - modified FComponentInstancingDataUtils::RecursivePropertyGather() to exclude deprecated properties, since they won't be serialized on save. - modified FBlueprintCookedComponentInstancingData::LoadCachedPropertyDataForSerialization() to remove the PPF_UseDeprecatedProperties flag (these are no longer included in the delta). - modified UBlueprintGeneratedClass::CheckAndApplyComponentTemplateOverrides() to remove the PPF_UseDeprecatedProperties flag (was being incorrectly used here). - modified AActor::CreateComponentFromTemplateData() to remove the PPF_UseDeprecatedProperties flag (was being incorrectly used here; this caused deprecated property defaults to be copied out to the instance). - modified AActor::CreateComponentFromTemplateData() to append RF_PostLoad/RF_NeedPostLoadSubobjects and call PostDuplicate()/ConditionalPostLoad() on the new instance (needed to mirror what SDO does in the unoptimized case - for proper physics RB setup specifically, but may be other areas where that's needed). #jira UE-39705 Change 3313161 on 2017/02/20 by Mieszko.Zielinski PR #3272: Use Pawn for GetNavAgentPropertiesRef(). (Contributed by drelidan7) Change 3314151 on 2017/02/21 by Mieszko.Zielinski fix to hlods complaining about missing nav collision in cooked builds #UE4 Made sure hlod-generated StaticMeshes are marked as not having navigation data #jira UE-42034 Change 3314355 on 2017/02/21 by Marc.Audy Set error message back to be correctly about mobility #jira UE-42209 Change 3314566 on 2017/02/21 by Phillip.Kavan [UE-40801] Switch to an ensure() to potentially help diagnose a one-off assertion crash in the SCS editor if encountered again in a future release. #jira UE-40801 Change 3315459 on 2017/02/21 by Mike.Beach Updated marquee selection in graph editors. Ctrl dragging now inverts nodes' selection state (not only deselects them - holding alt is now for only deselection). #jira UE-16359 Change 3315546 on 2017/02/21 by Mike.Beach Mirroring CL 3294552 Count "GeneratedStub" as a success for cooked file generation - ensures the saved asset gets recorded in the asset registry. #jira ODIN-5869 Change 3315554 on 2017/02/21 by Mike.Beach Do not generate NativizedAsset plugin files if no Blueprints were nativized (cut down on mod generate/cook time). #jira ODIN-6211 Change 3317225 on 2017/02/22 by mason.seay Enable Net Use Owner Frequency on blueprints. This allows the client to use different weapons. Doesn't fix UE-42017 though. Change 3317495 on 2017/02/22 by Marc.Audy Expose raw input device configurations to other modules by request #jira UE-42204 Change 3319966 on 2017/02/23 by Nick.Atamas Polished up the material reroute node: - Removed some unnecessary widgets - Centered the pin node Change 3320099 on 2017/02/23 by Mike.Beach Guarding against passing self pins to referance parameters (it is not a property that is referencable, and would crash). Notifying the user through pin connection messages, and providing a script exception. #jira UE-40861 Change 3321227 on 2017/02/24 by Marc.Audy Just use name rather than going Name -> String -> TCHAR -> Name Change 3321425 on 2017/02/24 by Marc.Audy Minor optimizations to avoid string construction when doing StaticFindObject and ResolveName Change 3321630 on 2017/02/24 by Mike.Beach Removing reference notation from actor pointer param - allowing you to pass 'self' to Blueprint exposed function. Change 3321845 on 2017/02/24 by Lukasz.Furman fixed navlink processor trace accepting only components with WorldStatic object type #ue4 Change 3322474 on 2017/02/24 by Aaron.McLeran UE-42345 Rewriting thumbnail renderer Change 3322490 on 2017/02/24 by Aaron.McLeran UE-42345 Forgot to take abs of sample before averaging Change 3323562 on 2017/02/27 by Mike.Beach Fixing bad merge, copying loop from //UE4/Main that accidently got replaced. Change 3323685 on 2017/02/27 by Mike.Beach Preventing us from cross-binding editor & PIE actors when we fixup level script actor bindings (on duplicate for PIE). #jira UE-30816 Change 3323776 on 2017/02/27 by Marc.Audy Coding standard clean up pass Change 3324050 on 2017/02/27 by Ben.Zeigler Fix issue with a StreamableHandle being cancelled while in progress leaving the in progress flag active. Added and improved error messages when streaming goes wrong Port of 3317217, 3315540, and 3314374 from UE4-Fortnite Change 3324294 on 2017/02/27 by Ben.Zeigler Engine changes needed to support "Asset Management" UI: Add concept of "Manage" dependency to the Asset Registry, to represent that an asset like a texture is managed by a Primary Asset. This will be used to compute usage statistics and chunking Add ability for AssetManager to override the PrimaryAssetType/Id on a asset data loaded off disk. Needed so the asset audit tools work properly Significant performance improvements to the asset registry dependency gather, and correctly report as in progress while dependencies are still being gathered. On Fortnite it now finishes in 10 seconds instead of 100 Add bUpdateDiskCacheAfterLoad option for the asset registry, if true (default) this will update the Asset Registry's disk cache when an object is loaded, only in the editor. This is so changes made in PostLoad are correctly mirrored in the disk cache Add PrimaryAssetType as a wrapper struct around FName to allow customizations and blueprint usage, clean up the noexport definitions for a few related classes Add Asset Manager code to create and query "Manage" references used for auditing and chunking Add code to read AssetManager scanning rules out of the AssetManagerSettings object, also settable in editor Made it so UWorlds are now PrimaryAssets of the type Map, and enable the AssetManager by default for all games Port of CL #3323720 and related fixes from Fortnite Change 3324295 on 2017/02/27 by Ben.Zeigler Add AssetManagerEditor which contains the editor interface for the AssetManager system, and engine code needed to support it Add support for Management references to the Reference Viewer, and add ability to extend that context menu from plugins/games Add struct customizations for PrimaryAssetId and PrimaryAssetType Add AssetAuditBrowser window that shows a specialized asset picker for auditing, accessible from content browser, reference viewer, and main windows pane Add AssetAuditContext, which is a cleaned up port of the one from Paragon. This needs some more work before being final Expose PropertyCustomizationHelpers::MakePropertyComboBox which allows making an "enum-like" combo box for struct customizations, it now works much like the PropertyEditorAsset UI Add Custom Column support to AssetView/AssetPicker. This can be used to show runtime-generated column data Fix bug in SAssetView where column view did not work with a filter predicate, because the column view was generated before the deferred filter predicate run, leading to an empty filter Port of CL #3323722 and related fixes from Fortnite Change 3324398 on 2017/02/27 by Ben.Zeigler CIS fix Change 3324442 on 2017/02/27 by Ben.Zeigler Nonunity fix discovered while testing my nonunity fix Change 3325465 on 2017/02/28 by Marc.Audy Expand RawInput to support up to 20 buttons Change 3325468 on 2017/02/28 by Marc.Audy Fix CIS Change 3325887 on 2017/02/28 by Phillip.Kavan [UE-41893] Implicitly nativize child Blueprints that override one or more BlueprintCallable functions from a parent Blueprint. change summary: - added FBlueprintEditorUtils::ShouldNativizeImplicitly() - modified FBlueprintGlobalOptionsDetails::IsNativizeEnabled() to disable the 'Nativize' checkbox when the BP is implicitly enabled - modified FBlueprintGlobalOptionsDetails::GetNativizeState() to set the 'Checked' state when the BP is implicitly enabled - modified FBlueprintGlobalOptionsDetails::GetNativizeTooltip() to set an alternate tooltip for the disabled state (when the BP is implicitly enabled) - modified FBlueprintNativeCodeGenModule::IsTargetedForReplacement() to ensure that implicitly-enabled BPs are flagged as selected for nativization #jira UE-41893 Change 3326713 on 2017/02/28 by Marc.Audy Update MAX_NUM_CONTROLLER_BUTTONS to match number of keys created Change 3327688 on 2017/03/01 by Marc.Audy Fix spelling, remove autos Change 3328139 on 2017/03/01 by Marc.Audy Win32 doesn't report the DeviceData in the same way that Win64 does, removing filtered check for now so that Win32 packaged games can use RawInput (4.15.1) #jira UE-42375 Change 3328550 on 2017/03/01 by Mike.Beach Typo fix in cast node tooltip. Change 3328575 on 2017/03/01 by Nicholas.Blackford Submitting Tick Interval Functional Test Change 3328972 on 2017/03/02 by Jack.Porter Fix for crash entering Landscape mode #jira UE-42497 Change 3329224 on 2017/03/02 by Nick.Bullard Removing Redirector from EngineTest project Change 3330093 on 2017/03/02 by Mike.Beach Modified fix from Marc.Audy - Guarding against malformed graphs (missing their schema), which can happen in the middle of an undo transaction (removing the graph). Returning the graph's path name in this situation (instead of the display name), so we atleast have some semblance of context. #jira UE-42166 Change 3330306 on 2017/03/02 by Mike.Beach Replacing ArrayLibrary Get() calls in blueprints with a custom node, which can be toggled back and forth from returning by reference or by value. #jira UE-6451 Change 3330626 on 2017/03/02 by samuel.proctor Functional Test for Blueprint Containers Change 3330690 on 2017/03/02 by Mike.Beach Modified the fix from CL 3308097 - cannot clear the edgraph pin context since many menu actions expect it be available still as the menu is clossing (menu's dismiss gets triggered before the action is executed). #jira UE-42500 Change 3330704 on 2017/03/02 by Mike.Beach CIS fix - fallout from CL 3330306 Change 3330875 on 2017/03/02 by Dan.Oconnor Iteration on compile manager - removed skeleton compile pass in favor of FastGenerateSkeletonClass (directly generate reflection data from blueprint source data - no graph cloning) Change 3330892 on 2017/03/02 by Mike.Beach CIS fix for linux builds - include filename is case sensitive. Change 3331585 on 2017/03/03 by Mike.Beach Fix for CIS issues (fallout from CL 3330306) - had success/failure return value flipped. Spuriously failing on deprecated node fixup. Change 3333455 on 2017/03/06 by Ben.Zeigler Cleaned up version of CL #3332060, fixes crashes when calling StreamableManager::SynchronousLoad from inside a async PostLoad callback Also disable the "do sync load as async load" code in EDL, as EDL basically already does that internally Move the recursion guard inside async load tick outside of the EDL section, it's just as unsafe with EDL off Change 3333484 on 2017/03/06 by Ben.Zeigler #jira UE-42312 Fix crash trying to read Searchable Name references to objects in the same package, now guess at package/object name Change 3333553 on 2017/03/06 by Ben.Zeigler #jira UE-42387 Don't write out empty generated ini files for config files that are empty in both source and destination, this stops plugins without configs from ending up in cache Change 3333697 on 2017/03/06 by Mike.Beach Resolving some CIS errors - fix for missed handling of split-struct pins (fallout from CL 3330306) on deprecated node conversion (mapping old pins to new pins). Change 3334047 on 2017/03/06 by Ben.Zeigler #jira UE-42587 Now that we handle Add gameplay cues correctly by deferring them until after load, we also need to handle Remove cues, to avoid cues being stuck on permanently. Change 3334228 on 2017/03/06 by Ben.Zeigler #jira UE-42153 Fix several crashes with gameplay tag query structs #jira UE-39760 Fix it to display tag query description on creation Change 3335221 on 2017/03/07 by Lukasz.Furman fixed compilation errors for macros: UE_VLOG_MESH, UE_CVLOG_MESH #ue4 Change 3335733 on 2017/03/07 by dan.reynolds Fixing Attenuation Shape Material Reference Change 3335918 on 2017/03/07 by Mike.Beach More deeply nesting an active world check in UMeshComponent::CacheMaterialParameterNameIndices(). Only guarding the parts that use the world (prior to this, we were blocking material parameter discovery, which was causing cooked content to loose material settings). #jira UE-42480 Change 3336053 on 2017/03/07 by zack.letters Moved and renamed test to meet naming convention and proper location Change 3336087 on 2017/03/07 by Phillip.Kavan [UE-18618] Fix an ensure() misfire on PIE exit for listen server mode. change summary: - Modified UWorld::TransferBlueprintDebugReferences() to allow the LevelScript BP's target debug object reference to be reset to NULL when CreatePIEWorldBySavingToTemp() has recompiled it during the PIE startup process and autosaved the BP as a temporary. #jira UE-18618 Change 3336118 on 2017/03/07 by Phillip.Kavan Ensure that BP class component templates are included as preload dependencies where appropriate. Change 3336418 on 2017/03/07 by Marc.Audy Set the PIEInstanceID before calling ConvertToPIEPackageName (4.15.1) #jira UE-42507 Change 3336529 on 2017/03/07 by dan.reynolds AEOverview UMG Interface Change 3336729 on 2017/03/07 by Michael.Noland Blueprints: Changed a checkSlow() followed by unguarded access to an if and ensure() in BlueprintActionFilterImpl::IsDeprecated to prevent a potential crash in release if the node class is invalid for some reason #jira UE-42519 Change 3337054 on 2017/03/08 by Mieszko.Zielinski Fixed UGameplayTaskResource::AutoResourceID getting cleared on hot reload #UE4 Change 3337605 on 2017/03/08 by Mieszko.Zielinski PR #3345: Fix reversed comparison in FGameplayResourceSet::HasAllIDs (Contributed by hoelzl) Change 3337612 on 2017/03/08 by Lina.Halper Commenting out ensure as this doesn't cause any harm and fix it up later by itself. - adding ticket for further investigation #rb: Martin.Wilson #jira: UE-42062 Change 3338353 on 2017/03/08 by Mike.Beach Undoing CL 3320099, and instead allowing self nodes to be plugged into const ref inputs. Now auto-generating ref terms for the self node (the input param expects an addressable UProperty). Skipping this for native functions, as UHT already does something similar. #jira UE-40861 Change 3340052 on 2017/03/09 by Marc.Audy Don't mark a blueprint dirty if the default value isn't actually set #jira UE-42511 Change 3340211 on 2017/03/09 by samuel.proctor Adding TMap/TSet tests for Containers Functional Test Change 3340272 on 2017/03/09 by Marc.Audy auto removals small optimizations Change 3340341 on 2017/03/09 by Marc.Audy Fortnite fixes for blueprint exposed editor only struct members #jira UE-42430 Change 3340356 on 2017/03/09 by Marc.Audy Do not allow blueprint exposed editor only struct members #jira UE-42430 Change 3340369 on 2017/03/09 by Mike.Beach Certain operations expect set/map elements to be constructed, instead of using an 'uninitialized' value (like with FStrings, previously this would blow up attempting to assign a value to an FString that hadn't been constructed). Fix is to construct the member when we make space in the container (emulating execSetArray). #jira UE-42572 Change 3340445 on 2017/03/09 by mason.seay Renamed and updated test map. Also disabled tests until reviewed Change 3340627 on 2017/03/09 by Marc.Audy Remove autos Change 3340639 on 2017/03/09 by Dan.Oconnor Avoid CDO creation when asking if an object IsDefaultSubobject Change 3340642 on 2017/03/09 by Marc.Audy Correctly maintain removed items from arrays when duplicating actors via T3D #jira UE-42278 Change 3340689 on 2017/03/09 by Dan.Oconnor Avoid UObject::Modify calls when renaming edgraph nodes as part of UEdGraphNode::PostLoad() or UEdGraph::MoveNodesToAnotherGraph Change 3340709 on 2017/03/09 by Dan.Oconnor Remove misplace dClassDefaultObject null check for now Change 3340710 on 2017/03/09 by Dan.Oconnor Avoid FindRedirectedPropertyName when performing StaticDuplicateObject Change 3340728 on 2017/03/09 by Dan.Oconnor Null checking CDO so that we can duplicate a class with no CDO Change 3342184 on 2017/03/10 by mason.seay Nav mesh generation test - not finished Change 3342930 on 2017/03/13 by Mieszko.Zielinski Added missing undefining of local macros in VisualLoggerAutomationTests.cpp #UE4 Change 3343739 on 2017/03/13 by Marc.Audy Protect against ChildActorClass becoming null while ChildActorTemplate remains valid. Change 3343758 on 2017/03/13 by Marc.Audy Ensure that when you change visibility, children also get marked dirty as needed. SetVisibility is no longer virtual, use OnVisibilityChanged in subclasses instead #jira UE-42240 Change 3343816 on 2017/03/13 by Mike.Beach Making sure we build CrashReporter for nativized clients. #jira UE-42056 Change 3343858 on 2017/03/13 by Phillip.Kavan Back out changelist 3336118 (per discussion) - did not solve the issue. Change 3344218 on 2017/03/13 by Mike.Beach Patching some holes in the wildcard pin logic for our new array GetItem node (making sure the node properly retains its type). Change 3344388 on 2017/03/13 by Mike.Beach Preventing make/break nodes from being in the context menu for structs that are not labeled 'BlueprintType' (still available if you drag off a node with a struct pin of that type). #jira UE-37971 Change 3344411 on 2017/03/13 by dan.reynolds AEOverviewMain update - Organized Variables - Added comments on level interface with UI script Change 3344956 on 2017/03/14 by Marc.Audy Remove autos Slight optimization Change 3345365 on 2017/03/14 by Mike.Beach In the Blueprint diff tool, no longer assuming that graph names are unique (using the outer path to find matching graphs between diff panels). #jira UE-42787 Change 3345565 on 2017/03/14 by Marc.Audy auto removal Change 3345654 on 2017/03/14 by Marc.Audy Allow hierarchical metadata querying when HACK_HEADER_GENERATION is true Change 3345771 on 2017/03/14 by Zak.Middleton #ue4 - Refactored CharacterMovementComponent determination of net send rate when combining moves into a virtual function GetClientNetSendDeltaTime(). Added configurable values to GameNetworkManager under [/Script/Engine.GameNetworkManager]: ClientNetSendMoveDeltaTime=0.0111f ClientNetSendMoveDeltaTime=0.0222f ClientNetSendMoveThrottleAtNetSpeed = 10000 ClientNetSendMoveThrottleOverPlayerCount=10 These are the default values maintained for backwards compat. Related to OR-36422. Change 3346314 on 2017/03/14 by Dan.Oconnor Add two features to FBlueprintCompileReinstancer. Exposing it's CPFUO extensions and add a flag to avoid potentially unneeded CDO duplication. Change 3346329 on 2017/03/14 by Dan.Oconnor Avoid CDO creation in UBlueprintGeneratedClass::PostLoad - rely instead on compiler Change 3346436 on 2017/03/14 by Dan.Oconnor Compilation Manager iteration - improvements to reinstancing logic and postponement of reinstancing reference replacement until after loading has finished (done strictly to reduce the number of 'find references' calls). Behavior change is behind the GMinimalCompileOnLoad flag Change 3346632 on 2017/03/14 by Ben.Zeigler Change StringClassReference customization to use MustImplement and BlueprintBaseOnly metadata, to match the metadata used by SubclassOf customization Add missing Class Property metadata to the metadata list Change 3347525 on 2017/03/15 by Marc.Audy PR #3371: Fix for binding ability action to input component (Contributed by ryanjon2040) #jira UE-42810 Change3347562on 2017/03/15 by Phillip.Kavan [UE-32816] Support for value-based bitfield enum associations in the editor. notes: - default mode is still index-based, so there are no backwards-compatibility issues change summary: - new metadata key for flagging enums as value-based (UseEnumValuesAsMaskValuesInEditor) - modified SPropertyEditorNumeric::Construct() to include logic for handling value-based enum associations - modified SGraphPinInteger::Construct() to include logic for handling value-based enum associations - added default value fixup to UK2Node_BitmaskLiteral, so that changed/removed values get masked out on load - switched UK2Node_BitmaskLiteral::PostLoad() to Serialize(), so that default value fixup occurs before compilation #jira UE-32816 Change 3348030 on 2017/03/15 by Marc.Audy Remove experimental blueprintable components setting, they are supported fully Change 3348034 on 2017/03/15 by Phillip.Kavan CIS fix. Change 3348054 on 2017/03/15 by Marc.Audy Fix shadow error Change 3348063 on 2017/03/15 by mason.seay Updateed bp logic to use asserts. Added scenarios to descriptions of tests Change 3348131 on 2017/03/15 by mason.seay Updating maps and reorganizing content Change 3348146 on 2017/03/15 by Mike.Beach Making it so we can use DataTable variables as inputs in the GetDataTableRow node. The output pin is now a wildcard when the row type is undefined, and we throw an access error at runtime if the table and output type don't match. Change 3348213 on 2017/03/15 by dan.reynolds AEOverview UMG Update - Added level selection persistence between categories (so you can pick and choose from multiple categories) - Added a clear all selections button - Added comments to the UMG BP Change 3348344 on 2017/03/15 by Lukasz.Furman fixed missing path following result flag descriptions #ue4 Change 3348489 on 2017/03/15 by mason.seay Moved content and updated test descriptions Change 3348496 on 2017/03/15 by Mike.Beach Keeping the new version of the GetArrayItem node from causing a stack overflow with wildcard reroute nodes. Change 3348502 on 2017/03/15 by Ben.Zeigler #jira UE-42935 Fix several issues with GameplayTag and Container switch nodes crashing. Container didn't handling having multiple empty nodes correctly Fix general issue with Switch nodes where removing an execution pin with right click was not synchronizing the pin list properly Change it so the Container switch shows the simple tag string instead of Case 0, and change it to not quote by default for Container display strings Change 3348504 on 2017/03/15 by Ben.Zeigler #jira UE-41554 Add GameplayTag initialization to InitializeObjectReferences if it hasn't been initialized yet, this is important so it gets initialized before being initialized from unsafe areas like Serialize Change 3348512 on 2017/03/15 by Mike.Beach Reroute nodes connected to a new output, will propagate the type through its inputs (was previously treating the input's wildcard type as authoritative). Change 3348513 on 2017/03/15 by Phillip.Kavan [UE-38979] Error out on an attempt to nativize a Blueprint class that also implements a native C++ interface with a pure virtual function declaration. change summary: - added TIsAbstract<T> for traits testing to see if native C++ types are abstract (in terms of C++, not UE4) - changed TCppStructOps::IsAbstract() to use TIsAbstract<T> - added UClass::CppClassOps to capture class-specific traits info for the underlying C++ class type - modified UClass::PurgeClass() to clean up class-specific traits info (if valid) - modified FNativeClassHeaderGenerator::ExportNativeGeneratedInitCode() to generate code to initialize class-specific traits info for compiled-in class types - modified FBlueprintNativeCodeGenModule::IsTargetedForReplacement() to throw an error during nativization if a target BP class is found to implement a native interface class that's also abstract (i.e. an interface class that declares one or more of its methods as pure virtual) - modified BlueprintActionFilterImpl::IsExtraneousInterfaceCall() to initially exclude any native interface class that is also abstract - modified FKismetEditorUtilities::CanBlueprintImplementInterface() to additionally exclude any native class that is also abstract - modified FBlueprintInterfaceFilter::IsClassAllowed() to additionally exclude any native class that is also abstract #jira UE-38979 Change 3348651 on 2017/03/15 by Mike.Beach Fixing the new GetDataTableRow node so that it'll give you the option of reroute nodes. Change 3348684 on 2017/03/15 by Michael.Noland Blueprints: Allow string and text variables to be marked as multi-line PR #3294: UE-42147: Add multiline to BP view details (Contributed by projectgheist) #jira UE-42275 Change 3348691 on 2017/03/15 by Michael.Noland Cameras: Added support for specifying a default aspect ratio and whether or not to constrain to it in a camera manager subclass; useful when using custom view logic that doesn't source from a camera component as the view target PR #2593: Finish implementing aspect ratio handling for PlayerCameraManager (Contributed by CleanCut) #jira UE-33052 Change 3348698 on 2017/03/15 by Michael.Noland Removed a sprite reference from trigger shape classes and excluded some component references from camera rigs in cooked builds PR #2922: Ensuring editor data is not accessed when excluded from cook (Contributed by moritz-wundke) #jira UE-38484 Change 3348722 on 2017/03/15 by Dan.Oconnor Fix replacement bug - due to last minute refactor of this reference replacer call Change 3348736 on 2017/03/15 by Michael.Noland Blueprints: Added missing include for UTextProperty (compiled fine locally both with the file checked out and the file unmodified) Change 3348810 on 2017/03/15 by Michael.Noland Blueprints: Added support for seeing the user defined tooltip on get/set nodes for local variables PR #3256: UE-41098: Added UFunction argument (Contributed by projectgheist) Change 3348811 on 2017/03/15 by Michael.Noland PR #3380: Added CancelAbility Blueprint node (Contributed by ryanjon2040) #jira UE-42904 Change 3348969 on 2017/03/15 by Dan.Oconnor Build fix Change 3349023 on 2017/03/16 by Aaron.McLeran Copying //Tasks/UE4/Private-GDC17-Audio to Dev-Framework (//UE4/Dev-Framework) Change 3349389 on 2017/03/16 by mason.seay Finished up Navigation map. Improved Navmesh map (still needs some work before review) Change 3349575 on 2017/03/16 by Marc.Audy Emit ScriptMacros.h in addition to ObjectMacros.h in generated headers Change 3349628 on 2017/03/16 by Ben.Zeigler Add direct support for Chunk setting to AssetManager. If AssetManager exists and no game callback is set it uses the new, much faster method. Otherwise it falls back to the old one Fix some memory corruption issues in ChunkManifestGenerator where it was modifying a map while iterating it, could lead to assets ending up in multiple chunks accidentally Remove the "Old Cooker" entirely, it hasn't functioned since around 4.9 Various fixes to AssetManagerEditorModule Convert ShooterGame to use the AssetManager for chunking Change 3349629 on 2017/03/16 by Ben.Zeigler Change Fortnite to use the AssetManager chunking system, which simplifies the chunk 1 setup significantly Also includes changes made on Fortnite Branch as CL #3323724: Fortnite changes to take advantage of the Manage dependency in the asset manager Move definition of asset types to ini from native, and simplify it so all zone themes are scanned, even if not used Make FeedbackBank a primary asset type. It's currently editor only as there are some outdated banks we don't want to cook Change 3350043 on 2017/03/16 by Marc.Audy Fix Audio compile errors Change 3350092 on 2017/03/16 by Dan.Oconnor Fix missing output parameters when the function result node is pruned Change 3350190 on 2017/03/16 by Ben.Zeigler CIS fix Change 3350707 on 2017/03/16 by Dan.Oconnor Add means of enabling BlueprintCompilationManager via editor ini. Wedging the check into LaunchEngineLoop because of assets that are loaded during engine initialization Change 3350820 on 2017/03/16 by Joe.Conley Xenakis project: Setting GameMode to GameMode instead of None so the game doesn't crash on Play Change 3350893 on 2017/03/16 by Dan.Oconnor Build fix Change 3351017 on 2017/03/16 by Dan.Oconnor Using ordered arguments instead of named arguments improves load time in BP heavy projects Change 3351056 on 2017/03/16 by Dan.Oconnor Avoiding Copies Change 3351062 on 2017/03/16 by Dan.Oconnor Enable BlueprintCompilationManager by default - this is a major change in code path when loading uassets that contain blueprints Change 3351770 on 2017/03/17 by Marc.Audy Fix CIS warnings Change 3351818 on 2017/03/17 by Mike.Beach CopyPropertiesForUnrelatedObjects() will now only copy tagged data when the two objects truly are unrelated (different native base classes). We have to do this because the two native base classes may have different serialization methods that add/expect different data, which is not compatible with the other. #jira UE-35970 Change 3351918 on 2017/03/17 by Mike.Beach CIS fix - renaming local so it doesn't conflict with the one in the outer scope. Change 3351931 on 2017/03/17 by Ben.Zeigler Make CoreRedirects a proper Automated Test, and fix a test failure with not handling : in the output string Fix legitimate regression where doing a package -> package rename would clear Outer, this was a result of a fix I made in Main a few weeks ago Change 3351956 on 2017/03/17 by Dan.Oconnor Make sure result element is emptied when calling Intersect, Union, or Difference #jira UE-42993 Change 3352049 on 2017/03/17 by Ben.Zeigler #Jira UE-42118 Add RemoveGameplayTag to the tag blueprint library Delete (with redirector) redundant AddGameplayTagToContainer function that got accidentally added in parallel on Fortnite. Decided to keep the shorter TagContainer parameter name for both though Change3352065on 2017/03/17 by Aaron.McLeran Fixing compile errors - deleting unused files - removing #pragma once in SSynthKnob.cpp - Making phonon have win64 whitelist to avoid compiling on other platforms Change 3352100 on 2017/03/17 by Aaron.McLeran Fixing compile errors - Moving header file to public folder since it's used outside of module Change 3352182 on 2017/03/17 by Ben.Zeigler #jira UE-39815 Fix several issues with renaming tags in the tag settings view, it now deletes redirectors properly when renaming or making a new tag that matches an existing redirector Change 3352286 on 2017/03/17 by Ben.Zeigler #jira UE-39519 Add error messages when only one of GameMode/GameState is derived from the outdated parent classes Modified version of PR #3285: Add error log messages if the GameMode/GameState are mis-matched (Contributed by jwatte) Change 3352299 on 2017/03/17 by Ben.Zeigler #jira UE-40544 PR #3130: UE-40544: Check pause state if state change is allowed (Contributed by projectgheist) Change 3352303 on 2017/03/17 by Ben.Zeigler #jira UE-40856 Commit PR #3147: Remove unnecessary directory separator for GetSaveGamePath (Contributed by projectgheist) Remove unnecessary FString casting and in OpenGLDebugFrameDump.cpp there were FString multiplications that would never compile Change 3352320 on 2017/03/17 by Ben.Zeigler #jira UE-40087 Fix it so console keybind can be used in shipping games with console enabled Commit PR #3079: Fix ALLOW_CONSOLE define usage (Contributed by KrisRedbeard) Change 3352338 on 2017/03/17 by Ben.Zeigler #jira UE-42800 PR #3367: Made CheatManager more useful for non-FPShooters (Contributed by crumblycake) Change 3352352 on 2017/03/17 by Dan.Oconnor Emptying map instead of trying to remove an element when conversion of a value type fails - can't remove a single element until the map is rehashed #jira UE-42937 Change 3352581 on 2017/03/17 by Lukasz.Furman fixed memory leak in navmesh generators copy of CL# 3352356 #ue4 Change 3352665 on 2017/03/17 by Aaron.McLeran Fixing build error - Adding virtual destructor to FSoundWaveSoundWaveAssetActionExtender - Also renamed the class to only include SoundWave once! - Fixing static analysis warning on null deref. Change 3352685 on 2017/03/17 by Dan.Oconnor Fix for bad behavior of GetValues and GetKeys functions when there are gaps in a TMap (e.g. due to Remove calls) #jira UE-42547 Change 3352706 on 2017/03/17 by Aaron.McLeran Fixing build error Changing TSharedPtr<FSoundWaveSoundWaveAssetActionExtender> to TSharedPtr<ISoundWaveAssetActionExtensions> Change 3352708 on 2017/03/17 by Dan.Oconnor Data only and interface blueprints need SkeletonGeneratedClass set on load so that they can be used by the BlueprintEditor #jira UE-43023 Change 3352860 on 2017/03/17 by Lukasz.Furman fixed memory leak in navmesh generators copy of CL# 3352849 #ue4 Change3352967on 2017/03/17 by Dan.Oconnor Avoid tagging blueprints as modified while compiling with the new compilation manager. Leaving old code path unaffected, although it may benefit from this change. #jira UE-43027 Change 3352979 on 2017/03/17 by Dan.Oconnor Static analysis driven fixes #jira UE-43044 Change 3352987 on 2017/03/17 by Aaron.McLeran Fixing build error - Removing myo from other platforms, win64 only Change 3353234 on 2017/03/18 by Marc.Audy Fix Win32 build Change 3353344 on 2017/03/19 by Marc.Audy Fix cyclic includes in new Audio code Change 3353350 on 2017/03/19 by Marc.Audy Disable static analysis for myo third party code Change 3353750 on 2017/03/20 by Marc.Audy Fix additional cyclic include Change 3353926 on 2017/03/20 by Mieszko.Zielinski Made FNavAgentProperties::GetExtent return INVALID_NAVEXTENT if prop's AgentRadius is not set #UE4 This results in using FNavAgentProperties::DefaultProperties in navigation system queries to fallback to default query extent. #jira UE-18493 Change 3354249 on 2017/03/20 by Mike.Beach Raising a UHT error if you use a non-byte enum type in a Blueprint function. Blueprints currently only support uint8 enums (already an error if you tag the enum with 'BlueprintType', this error just emulates/extends that one). #jira UE-42479 Change 3354464 on 2017/03/20 by Dan.Oconnor Fix missing source path when using compilation manager Change 3354499 on 2017/03/20 by Dan.Oconnor Disable compilation manager Change 3354620 on 2017/03/20 by Ben.Zeigler #jira UE-43087 Fix crash when calling HasGPUEmitter on a Server build, this is newly an issue because it is calling GetAssetRegistryTags in more places than it used to Change 3354714 on 2017/03/20 by Michael.Noland PR #3352: Fixed issue with diffed Blueprints being searchable (Contributed by MichaelSchoell) #jira UE-42655 Change 3354718 on 2017/03/20 by Michael.Noland Engine: Change FViewport::IsGameRenderingEnabled to be static PR #3317: FViewport::IsGameRenderingEnabled (Contributed by tomix1024) #jira UE-42471 Change 3354721 on 2017/03/20 by Michael.Noland PR #3293: Made GetDefaultLocale accessible in blueprint (Contributed by derekvanvliet) #jira UE-42274 Change 3354907 on 2017/03/20 by Aaron.McLeran Fixing content in xenakis map Change 3355223 on 2017/03/20 by Ben.Zeigler #jira UE-43096 Fix crash when trying to ResolveName a path that ends in . (apparently when you LoadObject empty string, it ends up trying to load "." before giving up Change 3355297 on 2017/03/20 by Dan.Oconnor Fix incorrect flag settings from fast skeleton path.. this is part of the fix for UE-43083 Change 3355373 on 2017/03/20 by Michael.Noland PR #3222: Allow Blueprint Variables to be Readonly (Contributed by FrostByteGER) #jira UE-41640 Change 3355417 on 2017/03/20 by Ben.Zeigler Fix formatting bug where I forgot some braces Change 3355462 on 2017/03/20 by Aaron.McLeran UE-43046 Property type changed with no possible conversion Resaved asset in question Change 3355629 on 2017/03/20 by Dan.Oconnor Don't warn the user when their return node that has no pins (other than an exec pin). These return nodes cannot be deleted and connecting them does nothing. Prior to recent changes the warning never fired because the return node would be pruned and not validated. Change3355631on 2017/03/20 by Dan.Oconnor Fix compilation results spam in compilation manager. Scoped compiler events (e.g. BP_SCOPED_COMPILER_EVENT_STAT(EKismetCompilerStats_CompileTime);) will flush the results log if no 'event' has been started. Timing data collected via this mechanism will not be useful (can only measure entire call to ::Flush in compilation manager) Change 3356127 on 2017/03/21 by Richard.Hinckley #jira UEDOC-4711 Updated an invalid/old URL in a comment to a valid/current URL. Change 3356193 on 2017/03/21 by Marc.Audy Temporarily remove editor only properties in FCameraFocusSettings until we correctly no longer create pins for struct properties that are not exposed to blueprints #jira UE-43420 Change 3356222 on 2017/03/21 by Marc.Audy Expose new attenuation settings to blueprints to resolve cook warnings. Change 3356286 on 2017/03/21 by Richard.Hinckley #jira UEDOC-4711 Selected a different URL for the update. Change 3356339 on 2017/03/21 by Marc.Audy Delete unconnected return nodes to fix fortnite cook warnings Change 3356827 on 2017/03/21 by Ben.Zeigler Explicitly disable copy operations for streamable manager objects. This may be causing some obscure crashes like WEX-5182 but I am not sure how the copy constructor would be getting called. Either way it's unsafe Put in protection against passing in duplicate items to RequestAsyncLoad, which is another possible cause of internal data corruption Add some more ensures to track down possible issues with handle corruption Change 3356920 on 2017/03/21 by Ben.Zeigler Fix ensure just checked in to not go off when handles are halfway through being cancelled Change 3358152 on 2017/03/22 by Phillip.Kavan #jira UE-43102 - Fix an occasional crash on load in nativized EDL-enabled builds with non-nativized child BPs. Change summary: - Modified AActor::PostLoadSubobjects() to skip the CheckAndApplyComponentTemplateOverrides() call in the CDO case; at that point the ICH may not be fully loaded, but we don't require the non-nativized child BP's CDO to be fixed up anyway. [CL 3358685 by Marc Audy in Main branch]
975 lines
31 KiB
C++
975 lines
31 KiB
C++
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Misc/Attribute.h"
|
|
#include "Layout/Visibility.h"
|
|
#include "Layout/SlateRect.h"
|
|
#include "Layout/Geometry.h"
|
|
#include "Input/CursorReply.h"
|
|
#include "Input/Reply.h"
|
|
#include "Styling/SlateColor.h"
|
|
#include "Layout/ArrangedWidget.h"
|
|
#include "Layout/Margin.h"
|
|
#include "Animation/CurveSequence.h"
|
|
#include "SlotBase.h"
|
|
#include "Layout/Children.h"
|
|
#include "Widgets/SPanel.h"
|
|
#include "Styling/CoreStyle.h"
|
|
#include "Framework/Commands/InputChord.h"
|
|
#include "GraphEditor.h"
|
|
#include "Templates/ScopedPointer.h"
|
|
#include "Layout/ArrangedChildren.h"
|
|
#include "Types/PaintArgs.h"
|
|
#include "EditorStyleSet.h"
|
|
#include "Layout/LayoutUtils.h"
|
|
#include "MarqueeOperation.h"
|
|
#include "UniquePtr.h"
|
|
|
|
class FActiveTimerHandle;
|
|
class FScopedTransaction;
|
|
class FSlateWindowElementList;
|
|
struct FMarqueeOperation;
|
|
struct Rect;
|
|
|
|
//@TODO: Too generic of a name to expose at this scope
|
|
typedef class UObject* SelectedItemType;
|
|
|
|
// Level of detail for graph rendering (lower numbers are 'further away' with fewer details)
|
|
namespace EGraphRenderingLOD
|
|
{
|
|
enum Type
|
|
{
|
|
// Detail level when zoomed all the way out (all performance optimizations enabled)
|
|
LowestDetail,
|
|
|
|
// Detail level that text starts being disabled because it is unreadable
|
|
LowDetail,
|
|
|
|
// Detail level at which text starts to get hard to read but is still drawn
|
|
MediumDetail,
|
|
|
|
// Detail level when zoomed in at 1:1
|
|
DefaultDetail,
|
|
|
|
// Detail level when fully zoomed in (past 1:1)
|
|
FullyZoomedIn,
|
|
};
|
|
}
|
|
|
|
// Context passed in when getting popup info
|
|
struct FNodeInfoContext
|
|
{
|
|
public:
|
|
bool bSelected;
|
|
};
|
|
|
|
// Entry for an overlay brush in the node panel
|
|
struct FOverlayBrushInfo
|
|
{
|
|
public:
|
|
/** Brush to draw */
|
|
const FSlateBrush* Brush;
|
|
/** Scale of animation to apply */
|
|
FVector2D AnimationEnvelope;
|
|
/** Offset origin of the overlay from the widget */
|
|
FVector2D OverlayOffset;
|
|
|
|
public:
|
|
FOverlayBrushInfo()
|
|
: Brush(NULL)
|
|
, AnimationEnvelope(0.0f, 0.0f)
|
|
, OverlayOffset(0.f, 0.f)
|
|
{
|
|
}
|
|
|
|
FOverlayBrushInfo(const FSlateBrush* InBrush)
|
|
: Brush(InBrush)
|
|
, AnimationEnvelope(0.0f, 0.0f)
|
|
, OverlayOffset(0.f, 0.f)
|
|
{
|
|
}
|
|
|
|
FOverlayBrushInfo(const FSlateBrush* InBrush, float HorizontalBounce)
|
|
: Brush(InBrush)
|
|
, AnimationEnvelope(HorizontalBounce, 0.0f)
|
|
, OverlayOffset(0.f, 0.f)
|
|
{
|
|
}
|
|
};
|
|
|
|
// Entry for an overlay widget in the node panel
|
|
struct FOverlayWidgetInfo
|
|
{
|
|
public:
|
|
/** Widget to use */
|
|
TSharedPtr<SWidget> Widget;
|
|
|
|
/** Offset origin of the overlay from the widget */
|
|
FVector2D OverlayOffset;
|
|
|
|
public:
|
|
FOverlayWidgetInfo()
|
|
: Widget(nullptr)
|
|
, OverlayOffset(0.f, 0.f)
|
|
{
|
|
}
|
|
|
|
FOverlayWidgetInfo(TSharedPtr<SWidget> InWidget)
|
|
: Widget(InWidget)
|
|
, OverlayOffset(0.f, 0.f)
|
|
{
|
|
}
|
|
};
|
|
|
|
// Entry for an information popup in the node panel
|
|
struct FGraphInformationPopupInfo
|
|
{
|
|
public:
|
|
const FSlateBrush* Icon;
|
|
FLinearColor BackgroundColor;
|
|
FString Message;
|
|
public:
|
|
FGraphInformationPopupInfo(const FSlateBrush* InIcon, FLinearColor InBackgroundColor, const FString& InMessage)
|
|
: Icon(InIcon)
|
|
, BackgroundColor(InBackgroundColor)
|
|
, Message(InMessage)
|
|
{
|
|
}
|
|
};
|
|
|
|
/**
|
|
* Interface for ZoomLevel values
|
|
* Provides mapping for a range of virtual ZoomLevel values to actual node scaling values
|
|
*/
|
|
struct FZoomLevelsContainer
|
|
{
|
|
/**
|
|
* @param InZoomLevel virtual zoom level value
|
|
*
|
|
* @return associated scaling value
|
|
*/
|
|
virtual float GetZoomAmount(int32 InZoomLevel) const = 0;
|
|
|
|
/**
|
|
* @param InZoomAmount scaling value
|
|
*
|
|
* @return nearest ZoomLevel mapping for provided scale value
|
|
*/
|
|
virtual int32 GetNearestZoomLevel(float InZoomAmount) const = 0;
|
|
|
|
/**
|
|
* @param InZoomLevel virtual zoom level value
|
|
*
|
|
* @return associated friendly name
|
|
*/
|
|
virtual FText GetZoomText(int32 InZoomLevel) const = 0;
|
|
|
|
/**
|
|
* @return count of supported zoom levels
|
|
*/
|
|
virtual int32 GetNumZoomLevels() const = 0;
|
|
|
|
/**
|
|
* @return the optimal(1:1) zoom level value, default zoom level for the graph
|
|
*/
|
|
virtual int32 GetDefaultZoomLevel() const = 0;
|
|
|
|
/**
|
|
* @param InZoomLevel virtual zoom level value
|
|
*
|
|
* @return associated LOD value
|
|
*/
|
|
virtual EGraphRenderingLOD::Type GetLOD(int32 InZoomLevel) const = 0;
|
|
|
|
// Necessary for Mac OS X to compile 'delete <pointer_to_this_object>;'
|
|
virtual ~FZoomLevelsContainer( void ) {};
|
|
};
|
|
|
|
struct GRAPHEDITOR_API FGraphSelectionManager
|
|
{
|
|
FGraphPanelSelectionSet SelectedNodes;
|
|
|
|
/** Invoked when the selected graph nodes have changed. */
|
|
SGraphEditor::FOnSelectionChanged OnSelectionChanged;
|
|
public:
|
|
/** @return the set of selected nodes */
|
|
const FGraphPanelSelectionSet& GetSelectedNodes() const;
|
|
|
|
/** Select just the specified node */
|
|
void SelectSingleNode(SelectedItemType Node);
|
|
|
|
/** Reset the selection state of all nodes */
|
|
void ClearSelectionSet();
|
|
|
|
/** Returns true if any nodes are selected */
|
|
bool AreAnyNodesSelected() const
|
|
{
|
|
return SelectedNodes.Num() > 0;
|
|
}
|
|
|
|
/** Changes the selection set to contain exactly all of the passed in nodes */
|
|
void SetSelectionSet(FGraphPanelSelectionSet& NewSet);
|
|
|
|
/**
|
|
* Add or remove a node from the selection set
|
|
*
|
|
* @param Node Node the affect.
|
|
* @param bSelect true to select the node; false to unselect.
|
|
*/
|
|
void SetNodeSelection(SelectedItemType Node, bool bSelect);
|
|
|
|
/** @return true if Node is selected; false otherwise */
|
|
bool IsNodeSelected(SelectedItemType Node) const;
|
|
|
|
// Handle the selection mechanics of starting to drag a node
|
|
void StartDraggingNode(SelectedItemType NodeBeingDragged, const FPointerEvent& MouseEvent);
|
|
|
|
// Handle the selection mechanics when a node is clicked on
|
|
void ClickedOnNode(SelectedItemType Node, const FPointerEvent& MouseEvent);
|
|
};
|
|
|
|
/**
|
|
* This class is designed to serve as the base class for a panel/canvas that contains interactive widgets
|
|
* which can be selected and moved around by the user. It also manages zooming and panning, allowing a larger
|
|
* virtual space to be used for the widget placement.
|
|
*
|
|
* The user is responsible for creating widgets (which must be derived from SNode) and any custom drawing
|
|
* code desired. The other main restriction is that each SNode instance must have a unique UObject* associated
|
|
* with it.
|
|
*/
|
|
namespace ENodeZone
|
|
{
|
|
enum Type
|
|
{
|
|
TopLeft,
|
|
TopCenter,
|
|
TopRight,
|
|
|
|
Left,
|
|
Center,
|
|
Right,
|
|
|
|
BottomLeft,
|
|
BottomCenter,
|
|
BottomRight,
|
|
|
|
Count
|
|
};
|
|
}
|
|
|
|
class GRAPHEDITOR_API SNodePanel : public SPanel
|
|
{
|
|
public:
|
|
|
|
class SNode : public SPanel
|
|
{
|
|
public:
|
|
|
|
/** A slot that support alignment of content and padding and z-order */
|
|
class FNodeSlot : public TSlotBase<FNodeSlot>
|
|
{
|
|
public:
|
|
FNodeSlot()
|
|
: TSlotBase<FNodeSlot>()
|
|
, HAlignment(HAlign_Fill)
|
|
, VAlignment(VAlign_Fill)
|
|
, SlotPadding(0.0f)
|
|
, Offset( FVector2D::ZeroVector )
|
|
, AllowScale( true )
|
|
{ }
|
|
|
|
FNodeSlot& HAlign( EHorizontalAlignment InHAlignment )
|
|
{
|
|
HAlignment = InHAlignment;
|
|
return *this;
|
|
}
|
|
|
|
FNodeSlot& VAlign( EVerticalAlignment InVAlignment )
|
|
{
|
|
VAlignment = InVAlignment;
|
|
return *this;
|
|
}
|
|
|
|
FNodeSlot& Padding( const TAttribute<FMargin> InPadding )
|
|
{
|
|
SlotPadding = InPadding;
|
|
return *this;
|
|
}
|
|
|
|
FNodeSlot& SlotOffset( const TAttribute<FVector2D> InOffset )
|
|
{
|
|
Offset = InOffset;
|
|
return *this;
|
|
}
|
|
|
|
FNodeSlot& SlotSize( const TAttribute<FVector2D> InSize )
|
|
{
|
|
Size = InSize;
|
|
return *this;
|
|
}
|
|
|
|
FNodeSlot& AllowScaling( const TAttribute<bool> InAllowScale )
|
|
{
|
|
AllowScale = InAllowScale;
|
|
return *this;
|
|
}
|
|
|
|
public:
|
|
|
|
/** The child widget contained in this slot. */
|
|
ENodeZone::Type Zone;
|
|
EHorizontalAlignment HAlignment;
|
|
EVerticalAlignment VAlignment;
|
|
TAttribute<FMargin> SlotPadding;
|
|
TAttribute<FVector2D> Offset;
|
|
TAttribute<FVector2D> Size;
|
|
TAttribute<bool> AllowScale;
|
|
};
|
|
|
|
typedef TSet<TWeakPtr<SNodePanel::SNode>> FNodeSet;
|
|
|
|
// SPanel Interface
|
|
virtual FChildren* GetChildren() override
|
|
{
|
|
return &Children;
|
|
}
|
|
|
|
virtual FVector2D ComputeDesiredSize(float) const override
|
|
{
|
|
for( int32 ChildIndex = 0; ChildIndex < Children.Num(); ++ChildIndex )
|
|
{
|
|
if( Children[ ChildIndex ].Zone == ENodeZone::Center )
|
|
{
|
|
const FNodeSlot& CenterZone = Children[ ChildIndex ];
|
|
const EVisibility ChildVisibility = CenterZone.GetWidget()->GetVisibility();
|
|
if( ChildVisibility != EVisibility::Collapsed )
|
|
{
|
|
return ( CenterZone.GetWidget()->GetDesiredSize() + CenterZone.SlotPadding.Get().GetDesiredSize() ) * DesiredSizeScale.Get();
|
|
}
|
|
}
|
|
}
|
|
return FVector2D::ZeroVector;
|
|
}
|
|
|
|
virtual float GetRelativeLayoutScale(const FSlotBase& Child, float LayoutScaleMultiplier) const override
|
|
{
|
|
const FNodeSlot& ThisSlot = static_cast<const FNodeSlot&>(Child);
|
|
if ( !ThisSlot.AllowScale.Get() )
|
|
{
|
|
// Child slots that do not allow zooming should scale themselves to negate the node panel's zoom.
|
|
TSharedPtr<SNodePanel> ParentPanel = GetParentPanel();
|
|
if (ParentPanel.IsValid())
|
|
{
|
|
return 1.0f/ParentPanel->GetZoomAmount();
|
|
}
|
|
}
|
|
|
|
return 1.0f;
|
|
}
|
|
|
|
virtual void OnArrangeChildren( const FGeometry& AllottedGeometry, FArrangedChildren& ArrangedChildren ) const override
|
|
{
|
|
for( int32 ChildIndex = 0; ChildIndex < Children.Num(); ++ChildIndex )
|
|
{
|
|
const FNodeSlot& CurChild = Children[ChildIndex];
|
|
const EVisibility ChildVisibility = CurChild.GetWidget()->GetVisibility();
|
|
if ( ArrangedChildren.Accepts(ChildVisibility) )
|
|
{
|
|
const FMargin SlotPadding(CurChild.SlotPadding.Get());
|
|
// If this child is not allowed to scale, its scale relative to its parent should undo the parent widget's scaling.
|
|
FVector2D Size;
|
|
|
|
if( CurChild.Size.IsSet() )
|
|
{
|
|
Size = CurChild.Size.Get();
|
|
}
|
|
else
|
|
{
|
|
AlignmentArrangeResult XResult = AlignChild<Orient_Horizontal>(AllottedGeometry.Size.X, CurChild, SlotPadding);
|
|
AlignmentArrangeResult YResult = AlignChild<Orient_Vertical>(AllottedGeometry.Size.Y, CurChild, SlotPadding);
|
|
Size = FVector2D( XResult.Size, YResult.Size );
|
|
}
|
|
const FArrangedWidget ChildGeom =
|
|
AllottedGeometry.MakeChild(
|
|
CurChild.GetWidget(),
|
|
CurChild.Offset.Get(),
|
|
Size,
|
|
GetRelativeLayoutScale(CurChild, AllottedGeometry.Scale)
|
|
);
|
|
ArrangedChildren.AddWidget( ChildVisibility, ChildGeom );
|
|
}
|
|
}
|
|
}
|
|
|
|
virtual int32 OnPaint( const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyClippingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled ) const override
|
|
{
|
|
FArrangedChildren ArrangedChildren( EVisibility::Visible );
|
|
{
|
|
ArrangeChildren( AllottedGeometry, ArrangedChildren );
|
|
}
|
|
|
|
int32 MaxLayerId = LayerId;
|
|
for( int32 ChildIndex = 0; ChildIndex < ArrangedChildren.Num(); ++ChildIndex )
|
|
{
|
|
const FArrangedWidget& CurWidget = ArrangedChildren[ ChildIndex ];
|
|
FSlateRect ChildClipRect = MyClippingRect.IntersectionWith(CurWidget.Geometry.GetClippingRect());
|
|
|
|
if( ChildClipRect.GetSize().SizeSquared() > 0.f )
|
|
{
|
|
const FSlateRect ClipRect = Children[ ChildIndex ].Zone == ENodeZone::Center ? ChildClipRect : MyClippingRect;
|
|
const int32 CurWidgetsMaxLayerId = CurWidget.Widget->Paint( Args.WithNewParent( this ), CurWidget.Geometry, ClipRect, OutDrawElements, LayerId, InWidgetStyle, ShouldBeEnabled( bParentEnabled ));
|
|
MaxLayerId = FMath::Max( MaxLayerId, CurWidgetsMaxLayerId );
|
|
}
|
|
}
|
|
return MaxLayerId;
|
|
}
|
|
// End of SPanel Interface
|
|
|
|
FNodeSlot& GetOrAddSlot( const ENodeZone::Type SlotId )
|
|
{
|
|
// Return existing
|
|
for( int32 ChildIndex = 0; ChildIndex < Children.Num(); ++ChildIndex )
|
|
{
|
|
if( Children[ ChildIndex ].Zone == SlotId )
|
|
{
|
|
return Children[ ChildIndex ];
|
|
}
|
|
}
|
|
// Add Zone
|
|
FNodeSlot& NewSlot = *new FNodeSlot();
|
|
NewSlot.Zone = SlotId;
|
|
Children.Add( &NewSlot );
|
|
|
|
return NewSlot;
|
|
}
|
|
|
|
FNodeSlot* GetSlot( const ENodeZone::Type SlotId )
|
|
{
|
|
FNodeSlot* Result = nullptr;
|
|
// Return existing
|
|
for( int32 ChildIndex = 0; ChildIndex < Children.Num(); ++ChildIndex )
|
|
{
|
|
if( Children[ ChildIndex ].Zone == SlotId )
|
|
{
|
|
Result = &Children[ ChildIndex ];
|
|
break;
|
|
}
|
|
}
|
|
return Result;
|
|
}
|
|
|
|
void RemoveSlot( const ENodeZone::Type SlotId )
|
|
{
|
|
for( int32 ChildIndex = 0; ChildIndex < Children.Num(); ++ChildIndex )
|
|
{
|
|
if( Children[ ChildIndex ].Zone == SlotId )
|
|
{
|
|
Children.RemoveAt( ChildIndex );
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @param NewPosition The Node should be relocated to this position in the graph panel
|
|
* @param NodeFilter Set of nodes to prevent movement on, after moving successfully a node is added to this set.
|
|
*/
|
|
virtual void MoveTo(const FVector2D& NewPosition, FNodeSet& NodeFilter )
|
|
{
|
|
}
|
|
|
|
/** @return the Node's position within the graph */
|
|
virtual FVector2D GetPosition() const
|
|
{
|
|
return FVector2D(0.0f, 0.0f);
|
|
}
|
|
|
|
/** @return a user-specified comment on this node; the comment gets drawn in a bubble above the node */
|
|
virtual FString GetNodeComment() const
|
|
{
|
|
return FString();
|
|
}
|
|
|
|
/** @return The backing object, used as a unique identifier in the selection set, etc... */
|
|
virtual UObject* GetObjectBeingDisplayed() const
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
/** @return The brush to use for drawing the shadow for this node */
|
|
virtual const FSlateBrush* GetShadowBrush(bool bSelected) const
|
|
{
|
|
return bSelected ? FEditorStyle::GetBrush(TEXT("Graph.Node.ShadowSelected")) : FEditorStyle::GetBrush(TEXT("Graph.Node.Shadow"));
|
|
}
|
|
|
|
/** Populate the brushes array with any overlay brushes to render */
|
|
virtual void GetOverlayBrushes(bool bSelected, const FVector2D WidgetSize, TArray<FOverlayBrushInfo>& Brushes) const
|
|
{
|
|
}
|
|
|
|
/** @return The profiler heat intensity */
|
|
virtual FLinearColor GetProfilerHeatmapIntensity() const
|
|
{
|
|
return FLinearColor(1.f, 1.f, 1.f, 0.f);
|
|
}
|
|
|
|
/** @return The brush to use for drawing the profiler heatmap with the heat intensity */
|
|
virtual const FSlateBrush* GetProfilerHeatmapBrush() const
|
|
{
|
|
return FEditorStyle::GetBrush(TEXT("BlueprintProfiler.RegularNode.HeatDisplay"));
|
|
}
|
|
|
|
/** Populate the widgets array with any overlay widgets to render */
|
|
virtual TArray<FOverlayWidgetInfo> GetOverlayWidgets(bool bSelected, const FVector2D& WidgetSize) const
|
|
{
|
|
return TArray<FOverlayWidgetInfo>();
|
|
}
|
|
|
|
/** Populate the popups array with any popups to render */
|
|
virtual void GetNodeInfoPopups(FNodeInfoContext* Context, TArray<FGraphInformationPopupInfo>& Popups) const
|
|
{
|
|
}
|
|
|
|
/** Returns true if this node is dependent on the location of other nodes (it can only depend on the location of first-pass only nodes) */
|
|
virtual bool RequiresSecondPassLayout() const
|
|
{
|
|
return false;
|
|
}
|
|
|
|
/** Performs second pass layout; only called if RequiresSecondPassLayout returned true */
|
|
virtual void PerformSecondPassLayout(const TMap< UObject*, TSharedRef<SNode> >& InNodeToWidgetLookup) const
|
|
{
|
|
}
|
|
|
|
/** Return false if this node should not be culled. Useful for potentially large nodes that may be improperly culled. */
|
|
virtual bool ShouldAllowCulling() const
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/** return if the node can be selected, by pointing given location */
|
|
virtual bool CanBeSelected(const FVector2D& MousePositionInNode) const
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/** Called when user interaction has completed */
|
|
virtual void EndUserInteraction() const {}
|
|
|
|
/**
|
|
* override, when area used to select node, should be different, than it's size
|
|
* e.g. comment node - only title bar is selectable
|
|
* return size of node used for Marquee selecting
|
|
*/
|
|
virtual FVector2D GetDesiredSizeForMarquee() const
|
|
{
|
|
return GetDesiredSize();
|
|
}
|
|
|
|
// Returns node sort depth, defaults to and is generally 0 for most nodes
|
|
virtual int32 GetSortDepth() const { return 0; }
|
|
|
|
// Node Sort Operator
|
|
bool operator < ( const SNodePanel::SNode& NodeIn ) const
|
|
{
|
|
return GetSortDepth() < NodeIn.GetSortDepth();
|
|
}
|
|
|
|
void SetParentPanel(const TSharedPtr<SNodePanel>& InParent)
|
|
{
|
|
ParentPanelPtr = InParent;
|
|
}
|
|
|
|
protected:
|
|
SNode()
|
|
: BorderImage( FCoreStyle::Get().GetBrush( "NoBorder" ) )
|
|
, BorderBackgroundColor( FEditorStyle::GetColor("Graph.ForegroundColor"))
|
|
, DesiredSizeScale(FVector2D(1,1))
|
|
{
|
|
}
|
|
|
|
protected:
|
|
|
|
// SBorder Begin
|
|
TAttribute<const FSlateBrush*> BorderImage;
|
|
TAttribute<FSlateColor> BorderBackgroundColor;
|
|
TAttribute<FVector2D> DesiredSizeScale;
|
|
/** Whether or not to show the disabled effect when this border is disabled */
|
|
TAttribute<bool> ShowDisabledEffect;
|
|
/** Mouse event handlers */
|
|
FPointerEventHandler MouseButtonDownHandler;
|
|
FPointerEventHandler MouseButtonUpHandler;
|
|
FPointerEventHandler MouseMoveHandler;
|
|
FPointerEventHandler MouseDoubleClickHandler;
|
|
// SBorder End
|
|
|
|
// SPanel Begin
|
|
/** The layout scale to apply to this widget's contents; useful for animation. */
|
|
TAttribute<FVector2D> ContentScale;
|
|
/** The color and opacity to apply to this widget and all its descendants. */
|
|
TAttribute<FLinearColor> ColorAndOpacity;
|
|
/** Optional foreground color that will be inherited by all of this widget's contents */
|
|
TAttribute<FSlateColor> ForegroundColor;
|
|
// SPanel End
|
|
|
|
private:
|
|
|
|
TSharedPtr<SNodePanel> GetParentPanel() const
|
|
{
|
|
return ParentPanelPtr.Pin();
|
|
}
|
|
|
|
TPanelChildren<FNodeSlot> Children;
|
|
TWeakPtr<SNodePanel> ParentPanelPtr;
|
|
|
|
};
|
|
|
|
SNodePanel();
|
|
|
|
// SPanel interface
|
|
virtual void OnArrangeChildren(const FGeometry& AllottedGeometry, FArrangedChildren& ArrangedChildren) const override;
|
|
virtual FVector2D ComputeDesiredSize(float) const override;
|
|
virtual FChildren* GetChildren() override;
|
|
// End of SPanel interface
|
|
|
|
// SWidget interface
|
|
virtual void Tick( const FGeometry& AllottedGeometry, const double InCurrentTime, const float InDeltaTime ) override;
|
|
virtual FReply OnMouseButtonDown(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) override;
|
|
virtual FReply OnMouseButtonUp(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) override;
|
|
virtual FReply OnMouseMove(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) override;
|
|
virtual FReply OnMouseWheel(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) override;
|
|
virtual FCursorReply OnCursorQuery( const FGeometry& MyGeometry, const FPointerEvent& CursorEvent ) const override;
|
|
virtual FReply OnKeyDown( const FGeometry& MyGeometry, const FKeyEvent& InKeyEvent ) override;
|
|
virtual FReply OnKeyUp( const FGeometry& MyGeometry, const FKeyEvent& InKeyEvent ) override;
|
|
virtual void OnFocusLost( const FFocusEvent& InFocusEvent ) override;
|
|
virtual FReply OnTouchGesture( const FGeometry& MyGeometry, const FPointerEvent& GestureEvent ) override;
|
|
virtual FReply OnTouchEnded( const FGeometry& MyGeometry, const FPointerEvent& InTouchEvent ) override;
|
|
virtual float GetRelativeLayoutScale(const FSlotBase& Child, float LayoutScaleMultiplier) const override;
|
|
// End of SWidget interface
|
|
public:
|
|
/**
|
|
* Is the given node being observed by a widget in this panel?
|
|
*
|
|
* @param Node The node to look for.
|
|
*
|
|
* @return True if the node is being observed by some widget in this panel; false otherwise.
|
|
*/
|
|
bool Contains(UObject* Node) const;
|
|
|
|
/** @retun the zoom amount; e.g. a value of 0.25f results in quarter-sized nodes */
|
|
float GetZoomAmount() const;
|
|
/** @return Zoom level as a pretty string */
|
|
FText GetZoomText() const;
|
|
FSlateColor GetZoomTextColorAndOpacity() const;
|
|
|
|
/** @return the view offset in graph space */
|
|
FVector2D GetViewOffset() const;
|
|
|
|
/** Given a coordinate in panel space (i.e. panel widget space), return the same coordinate in graph space while taking zoom and panning into account */
|
|
FVector2D PanelCoordToGraphCoord(const FVector2D& PanelSpaceCoordinate) const;
|
|
|
|
/** Restore the graph panel to the supplied view offset/zoom */
|
|
void RestoreViewSettings(const FVector2D& InViewOffset, float InZoomAmount);
|
|
|
|
/** Get the grid snap size */
|
|
static float GetSnapGridSize();
|
|
|
|
/**
|
|
* Zooms out to fit either all nodes or only the selected ones.
|
|
* @param bOnlySelection Whether to zoom to fit around only the current selection (if false, will zoom to the extents of all nodes)
|
|
*/
|
|
void ZoomToFit(bool bOnlySelection);
|
|
|
|
/** Get the bounding area for the currently selected nodes
|
|
@return false if nothing is selected */
|
|
bool GetBoundsForSelectedNodes(/*out*/ class FSlateRect& Rect, float Padding = 0.0f);
|
|
|
|
/** @return the position where where nodes should be pasted (i.e. from the clipboard) */
|
|
FVector2D GetPastePosition() const;
|
|
|
|
/** Ask panel to scroll to location */
|
|
void RequestDeferredPan(const FVector2D& TargetPosition);
|
|
|
|
/** If it is focusing on a particular object */
|
|
bool HasDeferredObjectFocus() const;
|
|
|
|
/** Returns the current LOD level of this panel, based on the zoom factor */
|
|
EGraphRenderingLOD::Type GetCurrentLOD() const { return CurrentLOD; }
|
|
|
|
/** Returns if the panel has been panned or zoomed since the last update */
|
|
bool HasMoved() const;
|
|
|
|
/** Returns all the panel children rather than only visible */
|
|
FChildren* GetAllChildren();
|
|
|
|
protected:
|
|
/** Initialize members */
|
|
void Construct();
|
|
|
|
/**
|
|
* Zooms to the specified target rect
|
|
* @param TopLeft The top left corner of the target rect
|
|
* @param BottomRight The bottom right corner of the target rect
|
|
*/
|
|
void ZoomToTarget(const FVector2D& TopLeft, const FVector2D& BottomRight);
|
|
|
|
/** Update the new view offset location */
|
|
void UpdateViewOffset(const FGeometry& MyGeometry, const FVector2D& TargetPosition);
|
|
|
|
/** Compute much panel needs to change to pan to location */
|
|
static FVector2D ComputeEdgePanAmount(const FGeometry& MyGeometry, const FVector2D& MouseEvent);
|
|
|
|
/** Given a coordinate in graph space (e.g. a node's position), return the same coordinate in widget space while taking zoom and panning into account */
|
|
FVector2D GraphCoordToPanelCoord(const FVector2D& GraphSpaceCoordinate) const;
|
|
|
|
/** Given a rectangle in panel space, return a rectangle in graph space. */
|
|
FSlateRect PanelRectToGraphRect(const FSlateRect& PanelSpaceRect) const;
|
|
|
|
/**
|
|
* Lets the CanvasPanel know that the user is interacting with a node.
|
|
*
|
|
* @param InNodeToDrag The node that the user wants to drag
|
|
* @param GrabOffset Where within the node the user grabbed relative to split between inputs and outputs.
|
|
*/
|
|
virtual void OnBeginNodeInteraction(const TSharedRef<SNode>& InNodeToDrag, const FVector2D& GrabOffset);
|
|
|
|
/**
|
|
* Lets the CanvasPanel know that the user has ended interacting with a node.
|
|
*
|
|
* @param InNodeToDrag The node that the user was to dragging
|
|
*/
|
|
virtual void OnEndNodeInteraction(const TSharedRef<SNode>& InNodeToDrag);
|
|
|
|
/** Figure out which nodes intersect the marquee rectangle */
|
|
void FindNodesAffectedByMarquee(FGraphPanelSelectionSet& OutAffectedNodes) const;
|
|
|
|
/**
|
|
* Apply the marquee operation to the current selection
|
|
*
|
|
* @param InMarquee The marquee operation to apply.
|
|
* @param CurrentSelection The selection before the marquee operation.
|
|
* @param OutNewSelection The selection resulting from Marquee being applied to CurrentSelection.
|
|
*/
|
|
static void ApplyMarqueeSelection(const FMarqueeOperation& InMarquee, const FGraphPanelSelectionSet& CurrentSelection, FGraphPanelSelectionSet& OutNewSelection);
|
|
|
|
/**
|
|
* On the next tick, centers and selects the widget associated with the object if it exists
|
|
*
|
|
* @param ObjectToSelect The object to select, and potentially center on
|
|
* @param bCenter Whether or not to center the graph node
|
|
*/
|
|
void SelectAndCenterObject(const UObject* ObjectToSelect, bool bCenter);
|
|
|
|
/**
|
|
* On the next tick, centers the widget associated with the object if it exists
|
|
*
|
|
* @param ObjectToCenter The object to center
|
|
*/
|
|
void CenterObject(const UObject* ObjectToCenter);
|
|
|
|
/** Add a slot to the CanvasPanel dynamically */
|
|
virtual void AddGraphNode(const TSharedRef<SNode>& NodeToAdd);
|
|
|
|
/** Remove all nodes from the panel */
|
|
virtual void RemoveAllNodes();
|
|
|
|
/** Populate visibile children array */
|
|
virtual void PopulateVisibleChildren(const FGeometry& AllottedGeometry);
|
|
|
|
/** Arrange child nodes - allows derived classes to supply non-node children in OnArrangeChildren */
|
|
virtual void ArrangeChildNodes(const FGeometry& AllottedGeometry, FArrangedChildren& ArrangedChildren) const;
|
|
|
|
// Paint the background as lines
|
|
void PaintBackgroundAsLines(const FSlateBrush* BackgroundImage, const FGeometry& AllottedGeometry, const FSlateRect& MyClippingRect, FSlateWindowElementList& OutDrawElements, int32& DrawLayerId) const;
|
|
|
|
// Paint the well shadow (around the perimeter)
|
|
void PaintSurroundSunkenShadow(const FSlateBrush* ShadowImage, const FGeometry& AllottedGeometry, const FSlateRect& MyClippingRect, FSlateWindowElementList& OutDrawElements, int32 DrawLayerId) const;
|
|
|
|
// Paint the marquee selection rectangle
|
|
void PaintMarquee(const FGeometry& AllottedGeometry, const FSlateRect& MyClippingRect, FSlateWindowElementList& OutDrawElements, int32 DrawLayerId) const;
|
|
|
|
// Paint the software mouse if necessary
|
|
void PaintSoftwareCursor(const FGeometry& AllottedGeometry, const FSlateRect& MyClippingRect, FSlateWindowElementList& OutDrawElements, int32 DrawLayerId) const;
|
|
|
|
// Paint a comment bubble
|
|
void PaintComment(const FString& CommentText, const FGeometry& AllottedGeometry, const FSlateRect& MyClippingRect, FSlateWindowElementList& OutDrawElements, int32 DrawLayerId, const FLinearColor& CommentTinting, float& HeightAboveNode, const FWidgetStyle& InWidgetStyle ) const;
|
|
|
|
/** Determines if a specified node is not visually relevant. */
|
|
bool IsNodeCulled(const TSharedRef<SNode>& Node, const FGeometry& AllottedGeometry) const;
|
|
|
|
protected:
|
|
///////////
|
|
// INTERFACE TO IMPLEMENT
|
|
///////////
|
|
/** @return the widget in the summoned context menu that should be focused. */
|
|
virtual TSharedPtr<SWidget> OnSummonContextMenu(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) { return TSharedPtr<SWidget>(); }
|
|
virtual bool OnHandleLeftMouseRelease(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) { return false; }
|
|
protected:
|
|
/**
|
|
* Get the bounds of the given node
|
|
* @return True if successful
|
|
*/
|
|
bool GetBoundsForNode(const UObject* InNode, /*out*/ FVector2D& MinCorner, /*out*/ FVector2D& MaxCorner, float Padding = 0.0f) const;
|
|
|
|
/**
|
|
* Get the bounds of the selected nodes
|
|
* @param bSelectionSetOnly If true, limits the query to just the selected nodes. Otherwise it does all nodes.
|
|
* @return True if successful
|
|
*/
|
|
bool GetBoundsForNodes(bool bSelectionSetOnly, /*out*/ FVector2D& MinCorner, /*out*/ FVector2D& MaxCorner, float Padding = 0.0f);
|
|
|
|
/**
|
|
* Scroll the view to the desired location
|
|
* @return true when the desired location is reached
|
|
*/
|
|
bool ScrollToLocation(const FGeometry& MyGeometry, FVector2D DesiredCenterPosition, const float InDeltaTime);
|
|
|
|
/**
|
|
* Zoom to fit the desired size
|
|
* @return true when zoom fade has completed & fits the desired size
|
|
*/
|
|
bool ZoomToLocation(const FVector2D& CurrentSizeWithoutZoom, const FVector2D& DesiredSize, bool bDoneScrolling);
|
|
|
|
/**
|
|
* Change zoom level by the specified zoom level delta, about the specified origin.
|
|
*/
|
|
void ChangeZoomLevel(int32 ZoomLevelDelta, const FVector2D& WidgetSpaceZoomOrigin, bool bOverrideZoomLimiting);
|
|
|
|
// Should be called whenever the zoom level has changed
|
|
void PostChangedZoom();
|
|
|
|
// Fires up a per-tick function to zoom the graph to fit
|
|
void RequestZoomToFit();
|
|
|
|
// Cancels any active zoom-to-fit action
|
|
void CancelZoomToFit();
|
|
protected:
|
|
// The interface for mapping ZoomLevel values to actual node scaling values
|
|
TUniquePtr<FZoomLevelsContainer> ZoomLevels;
|
|
|
|
/** The position within the graph at which the user is looking */
|
|
FVector2D ViewOffset;
|
|
|
|
/** The position within the graph at which the user was looking last tick */
|
|
FVector2D OldViewOffset;
|
|
|
|
/** How zoomed in/out we are. e.g. 0.25f results in quarter-sized nodes. */
|
|
int32 ZoomLevel;
|
|
|
|
/** Previous Zoom Level */
|
|
int32 PreviousZoomLevel;
|
|
|
|
/** The actual scalar zoom amount last tick */
|
|
float OldZoomAmount;
|
|
|
|
/** Are we panning the view at the moment? */
|
|
bool bIsPanning;
|
|
|
|
/** Are we zooming the view with trackpad at the moment? */
|
|
bool bIsZoomingWithTrackpad;
|
|
|
|
/** The graph node widgets owned by this panel */
|
|
TSlotlessChildren<SNode> Children;
|
|
TSlotlessChildren<SNode> VisibleChildren;
|
|
|
|
/** The node that the user is dragging. Null when they are not dragging a node. */
|
|
TWeakPtr<SNode> NodeUnderMousePtr;
|
|
|
|
/** Where in the title the user grabbed to initiate the drag */
|
|
FVector2D NodeGrabOffset;
|
|
|
|
/** The total distance that the mouse has been dragged while down */
|
|
float TotalMouseDelta;
|
|
|
|
/** The Y component of mouse drag (used when zooming) */
|
|
float TotalMouseDeltaY;
|
|
|
|
/** Offset in the panel the user started the LMB+RMB zoom from */
|
|
FVector2D ZoomStartOffset;
|
|
|
|
/** Cumulative magnify delta from trackpad gesture */
|
|
float TotalGestureMagnify;
|
|
public:
|
|
/** Nodes selected in this instance of the editor; the selection is per-instance of the GraphEditor */
|
|
FGraphSelectionManager SelectionManager;
|
|
protected:
|
|
/** A pending marquee operation if it's active */
|
|
FMarqueeOperation Marquee;
|
|
|
|
/** Is the graph editable (can nodes be moved, etc...)? */
|
|
TAttribute<bool> IsEditable;
|
|
|
|
/** Given a node, find the corresponding widget */
|
|
TMap< UObject*, TSharedRef<SNode> > NodeToWidgetLookup;
|
|
|
|
/** If not empty and a part of this panel, this node will be selected and brought into view on the next Tick */
|
|
TSet<const UObject*> DeferredSelectionTargetObjects;
|
|
/** If non-null and a part of this panel, this node will be brought into view on the next Tick */
|
|
const UObject* DeferredMovementTargetObject;
|
|
|
|
/** Deferred zoom to selected node extents */
|
|
bool bDeferredZoomToSelection;
|
|
|
|
/** Deferred zoom to node extents */
|
|
bool bDeferredZoomToNodeExtents;
|
|
|
|
/** Zoom selection padding */
|
|
float ZoomPadding;
|
|
|
|
/** Allow continous zoom interpolation? */
|
|
bool bAllowContinousZoomInterpolation;
|
|
|
|
/** Teleport immediately, or smoothly scroll when doing a deferred zoom */
|
|
bool bTeleportInsteadOfScrollingWhenZoomingToFit;
|
|
|
|
/** Fade on zoom for graph */
|
|
FCurveSequence ZoomLevelGraphFade;
|
|
|
|
/** Curve that handles fading the 'Zoom +X' text */
|
|
FCurveSequence ZoomLevelFade;
|
|
|
|
/** The position where we should paste when a user executes the paste command. */
|
|
FVector2D PastePosition;
|
|
|
|
/** Position to pan to */
|
|
FVector2D DeferredPanPosition;
|
|
|
|
/** true if pending request for deferred panning */
|
|
bool bRequestDeferredPan;
|
|
|
|
/** The current position of the software cursor */
|
|
FVector2D SoftwareCursorPosition;
|
|
|
|
/** Whether the software cursor should be drawn */
|
|
bool bShowSoftwareCursor;
|
|
|
|
/** Current LOD level for nodes/pins */
|
|
EGraphRenderingLOD::Type CurrentLOD;
|
|
|
|
/** Invoked when the user may be attempting to spawn a node using a shortcut */
|
|
SGraphEditor::FOnSpawnNodeByShortcut OnSpawnNodeByShortcut;
|
|
|
|
/** The last key chord detected in this graph panel */
|
|
FInputChord LastKeyChordDetected;
|
|
|
|
/** The current transaction for undo/redo */
|
|
TSharedPtr<FScopedTransaction> ScopedTransactionPtr;
|
|
|
|
private:
|
|
/** Active timer that handles deferred zooming until the target zoom is reached */
|
|
EActiveTimerReturnType HandleZoomToFit(double InCurrentTime, float InDeltaTime);
|
|
|
|
private:
|
|
/** The handle to the active timer */
|
|
TWeakPtr<FActiveTimerHandle> ActiveTimerHandle;
|
|
|
|
/** Cached geometry for use within the active timer */
|
|
FGeometry CachedGeometry;
|
|
|
|
/** Zoom target rectangle */
|
|
FVector2D ZoomTargetTopLeft;
|
|
FVector2D ZoomTargetBottomRight;
|
|
};
|