SSCSEditor

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Kismet

Header

/Engine/Source/Editor/Kismet/Public/SSCSEditor.h

Include

#include "SSCSEditor.h"

Syntax

class SSCSEditor : public SCompoundWidget

Variables

Name Description

Public variable

TAttribute< cla...

 

ActorContext

Attribute that provides access to the Actor context for which we are viewing/editing the SCS.

Public variable

TAttribute< boo...

 

AllowEditing

Attribute to indicate whether or not editing is allowed.

Public variable

TSharedPtr< FUI...

 

CommandList

Command list for handling actions in the SSCSEditor

Public variable

TAttribute< TSu...

 

ComponentTypeFilter

Attribute to limit visible nodes to a particular component type when filtering the tree view.

Public variable

TUniquePtr< FSc...

 

DeferredOngoingCreateTransaction

Scope the creation of a component which ends when the initial component 'name' is given/accepted by the user, which can be several frames after the component was actually created.

Public variable

FName

 

DeferredRenameRequest

Name of a node that has been requested to be renamed

Public variable

TAttribute< boo...

 

HideComponentClassCombo

Attribute to indicate whether or not the "Add Component" button is visible.

Public variable

FOnHighlightPro...

 

OnHighlightPropertyInDetailsView

Delegate to invoke when the given property should be highlighted in the details view (e.g. diff).

Public variable

FOnItemDoubleCl...

 

OnItemDoubleClicked

Delegate to invoke when an item in the tree is double clicked.

Public variable

FOnSelectionUpd...

 

OnSelectionUpdated

Delegate to invoke on selection update.

Public variable

FDelegateHandle

 

PostTickHandle

Used to unregister from the post tick event.

Public variable

TAttribute< cla...

 

PreviewActor

Attribute that provides access to a "preview" Actor context (may not be same as the Actor context that's being edited.

Public variable

TSharedPtr< SSC...

 

SCSTreeWidget

Tree widget

Destructors

Name Description

Public function

~SSCSEditor()

Functions

Name Description

Public function

UActorCompon...

 

AddNewComponent

(
    UClass* NewComponentClass,
    UObject* Asset,
    const FAddNewComponentParams Params
)

Adds a component to the SCS Table

Public function

void

 

AddNewNode

(
    FAddedNodeDetails& OutNodeDetails,
    TUniquePtr< FScopedTransaction > On...,
    USCS_Node* NewNode,
    UObject* Asset,
    bool bMarkBlueprintModified,
    bool bSetFocusToNewItem
)

Adds a new SCS Node to the component Table

Public function

UActorCompon...

 

AddNewNode

(
    TUniquePtr< FScopedTransaction > On...,
    USCS_Node* NewNode,
    UObject* Asset,
    bool bMarkBlueprintModified,
    bool bSetFocusToNewItem
)

Adds a new SCS Node to the component Table

Public function

void

 

AddNewNodeForInstancedComponent

(
    TUniquePtr< FScopedTransaction > On...,
    UActorComponent* NewInstanceCo...,
    FSCSEditorTreeNodePtrType InParentN...,
    UObject* Asset,
    bool bSetFocusToNewItem
)

Adds a new component instance node to the component Table

Protected function

FSCSEditorTr...

 

AddTreeNode

(
    USCS_Node* InSCSNode,
    FSCSEditorTreeNodePtrType InParentN...,
    const bool bIsInheritedSCS
)

Helper method to add a tree node for the given SCS node

Protected function

FSCSEditorTr...

 

AddTreeNodeFromChildActor

(
    FSCSEditorTreeNodePtrType InNodePtr
)

Helper method to add a tree node for the given node's child actor node, if present

Protected function

FSCSEditorTr...

 

AddTreeNodeFromComponent

(
    UActorComponent* InSceneCompon...,
    FSCSEditorTreeNodePtrType InParentT...
)

Helper method to add a tree node for the given actor component

Public function Static

void

 

BuildMenuEventsSection

(
    FMenuBuilder& Menu,
    UBlueprint* Blueprint,
    UClass* SelectedClass,
    FCanExecuteAction CanExecuteActionD...,
    FGetSelectedObjectsDelegate GetSele...
)

Fills out an events section in ui.

Protected function

void

 

BuildSubTreeForActorNode

(
    FSCSEditorActorNodePtrType InActorN...
)

Helper method to construct the subtree for the given actor (root) node.

Public function Const

bool

 

CanCopyNodes()

Public function Const

bool

 

CanCutNodes()

Public function Const

bool

 

CanDeleteNodes()

Public function Const

bool

 

CanDuplicateComponent()

Callbacks to duplicate the selected component

Public function Const

bool

 

CanPasteNodes()

Pastes previously copied node(s)

Protected function Const

bool

 

CanRenameComponent()

Checks to see if renaming is allowed on the selected component

Public function

void

 

ClearSelection()

Clears the current selection

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Protected function Static

void

 

ConstructEvent

(
    UBlueprint* Blueprint,
    const FName EventName,
    const FComponentEventConstructionDa...
)

Function to construct an event for a node

Public function

void

 

CopySelectedNodes()

Copy selected node(s)

Protected function

TSharedPtr< ...

 

CreateContextMenu()

Called to display context menu when right clicking on the widget

Protected function Static

void

 

CreateEventsForSelection

(
    UBlueprint* Blueprint,
    FName EventName,
    FGetSelectedObjectsDelegate GetSele...
)

Function to create events for the current selection

Protected function

UClass *

 

CreateNewBPComponent

(
    TSubclassOf< UActorComponent > Comp...
)

Creates a new Blueprint component from the specified class type The user will be prompted to pick a new subclass name and a blueprint asset will be created

Protected function

UClass *

 

CreateNewCPPComponent

(
    TSubclassOf< UActorComponent > Comp...
)

Creates a new C++ component from the specified class type The user will be prompted to pick a new subclass name and code will be recompiled

Public function

void

 

CutSelectedNodes()

Cut selected node(s)

Protected function Const

void

 

DepthFirstTraversal

(
    const FSCSEditorTreeNodePtrType& I...,
    TSet< FSCSEditorTreeNodePtrType >&...,
    const TFunctionRef< void...
)

Recursively visits the given node + its children and invokes the given function for each.

Public function

void

 

DumpTree()

Dumps out the tree view contents to the log (used to assist with debugging widget hierarchy issues)

Protected function

FSCSEditorTr...

 

FindOrCreateParentForExistingComponent

(
    UActorComponent* InActorCompon...,
    FSCSEditorActorNodePtrType ActorRoo...
)

Protected function Const

FSCSEditorTr...

 

FindParentForNewComponent

(
    UActorComponent* NewComponent
)

Protected function Const

FSCSEditorTr...

 

FindParentForNewNode

(
    USCS_Node* NewNode
)

Protected function Const

FSCSEditorTr...

 

FindTreeNode

(
    const UActorComponent* InCompo...,
    FSCSEditorTreeNodePtrType InStartNo...
)

Helper method to recursively find a tree node for the given scene component starting at the given tree node

Protected function Const

FSCSEditorTr...

 

FindTreeNode

(
    const USCS_Node* InSCSNode,
    FSCSEditorTreeNodePtrType InStartNo...
)

Helper method to recursively find a tree node for the given SCS node starting at the given tree node

Protected function Const

FSCSEditorTr...

 

FindTreeNode

(
    const FName& InVariableOrInstanceN...,
    FSCSEditorTreeNodePtrType InStartNo...
)

Helper method to recursively find a tree node for the given variable or instance name starting at the given tree node

Public function Const

AActor *

 

GetActorContext()

Returns the Actor context for which we are viewing/editing the SCS.

Public function Const

FSCSEditorAc...

 

GetActorNode()

Gets the actor root

Public function Const

UBlueprint &...

 

GetBlueprint()

Provides access to the Blueprint context that's being edited

Protected function Const

void

 

GetCollapsedNodes

(
    const FSCSEditorTreeNodePtrType& I...,
    TSet< FSCSEditorTreeNodePtrType >&...
)

Returns the set of expandable nodes that are currently collapsed in the UI

Protected function Const

EVisibility

 

GetComponentClassComboButtonVisibility()

Protected function Const

EVisibility

 

GetComponentsFilterBoxVisibility()

Protected function Const

EVisibility

 

GetComponentsTreeVisibility()

Protected function Const

TSubclassOf<...

 

GetComponentTypeFilterToApply()

Protected function Const

EVisibility

 

GetEditBlueprintButtonVisibility()

Public function Const

EComponentEd...

 

GetEditorMode()

Public function Const

FText

 

GetFilterText()

Callback for the action trees to get the filter text

Public function Const

FSCSEditorTr...

 

GetNodeFromActorComponent

(
    const UActorComponent* ActorCo...,
    bool bIncludeAttachedComponents
)

Given an actor component, attempts to find an associated tree node.

Public function Const

int32

 

GetNumSelectedNodes()

Get the number of currently selected tree nodes

Protected function Const

EVisibility

 

GetPromoteToBlueprintButtonVisibility()

Protected function Const

const TArray...

 

GetRootNodes()

Gets a root nodes of the tree

Public function Const

FSCSEditorTr...

 

GetSceneRootNode()

Get the root scene node

Public function Const

TArray< UObj...

 

GetSelectedEditableObjects()

Public function Const

void

 

GetSelectedItemsForContextMenu

Fills the supplied array with the currently selected objects

Public function Const

TArray< FSCS...

 

GetSelectedNodes()

Get the currently selected tree nodes

Protected function

void

 

HandleItemDoubleClicked

(
    FSCSEditorTreeNodePtrType InItem
)

Callback when a component item is double clicked.

Public function

void

 

HighlightTreeNode

(
    const USCS_Node* Node,
    FName Property
)

Highlight a tree node and, optionally, a property with in it

Public function

void

 

HighlightTreeNode

(
    FName TreeNodeName,
    const FPropertyPath& Property
)

Highlight a tree node and, optionally, a property with in it

Public function Const

bool

 

IsComponentSelected

(
    const UPrimitiveComponent* Pri...
)

Returns true if the specified component is currently selected

Public function Const

bool

 

IsEditingAllowed()

Returns true if editing is allowed

Public function Const

bool

 

IsNodeInSimpleConstructionScript

(
    USCS_Node* Node
)

Is this node still used by the Simple Construction Script

Public function

TSharedRef< ...

 

MakeTableRowWidget

(
    FSCSEditorTreeNodePtrType InNodePtr,
    const TSharedRef< STableViewBase > ...
)

Used by tree control - make a widget for a table row from a node

Public function

void

 

OnActorSelected

(
    const ECheckBoxState NewCheckedStat...
)

Called when the Actor is selected.

Protected function Const

void

 

OnApplyChangesToBlueprint()

Propagates instance changes to the blueprint

Public function

void

 

OnDeleteNodes()

Removes existing selected component nodes from the SCS

Public function

void

 

OnDuplicateComponent()

Protected function

void

 

OnFilterTextChanged

(
    const FText& InFilterText
)

Recursively updates the filtered state for each component item

Public function

void

 

OnFindReferences()

Callbacks to find references of the selected component

Protected function Const

FText

 

OnGetApplyChangesToBlueprintTooltip()

Public function

void

 

OnGetChildrenForTree

(
    FSCSEditorTreeNodePtrType InNodePtr,
    TArray< FSCSEditorTreeNodePtrType >...
)

Used by tree control - get children for a specified node

Protected function Const

FText

 

OnGetResetToBlueprintDefaultsTooltip()

Public function Const

ECheckBoxSta...

 

OnIsActorSelected()

Called to determine if actor is selected.

Protected function

void

 

OnItemScrolledIntoView

(
    FSCSEditorTreeNodePtrType InItem,
    const TSharedPtr< ITableRow >& InW...
)

Callback when a component item is scrolled into view

Protected function

void

 

OnLevelComponentRequestRename

(
    const UActorComponent* InCompo...
)

Called when the level editor requests a component to be renamed.

Protected function

void

 

OnObjectsReplaced

(
    const TMap< UObject*, UObject ...
)

Called when component objects are replaced following construction script execution

Protected function Const

void

 

OnOpenBlueprintEditor

(
    bool bForceCodeEditing
)

Opens the blueprint editor for the blueprint being viewed by the scseditor

Public function

void

 

OnPostTick

(
    float
)

Called at the end of each frame.

Protected function

FReply

 

OnPromoteToBlueprintClicked()

Called when the promote to blueprint button is clicked

Protected function

void

 

OnRenameComponent

(
    TUniquePtr< FScopedTransaction > On...
)

Requests a rename on the selected component just after creation so that the user can provide the initial component name (overwriting the default generated one), which is considered part of the creation process.

Protected function

void

 

OnRenameComponent()

Requests a rename on the selected component.

Protected function

void

 

OnResetToBlueprintDefaults()

Resets instance changes to the blueprint default

Public function

void

 

OnTreeSelectionChanged

(
    FSCSEditorTreeNodePtrType InSelecte...,
    ESelectInfo::Type SelectInfo
)

Called when selection in the tree changes

Public function

void

 

PasteNodes()

Pastes previously copied node(s)

Protected function

UActorCompon...

 

PerformComboAddClass

(
    TSubclassOf< UActorComponent > Comp...,
    EComponentCreateAction::Type Compon...,
    UObject* AssetOverride
)

Add a component from the selection in the combo box

Protected function

void

 

PopulateContextMenu

(
    UToolMenu* InMenu
)

Populate context menu on the fly

Protected function Const

void

 

PromoteToBlueprint()

Converts the current actor instance to a blueprint

Protected function

bool

 

RefreshFilteredState

(
    FSCSEditorTreeNodePtrType TreeNode,
    bool bRecursive
)

Compares the filter bar's text with the item's component name.

Public function

void

 

RefreshSelectionDetails()

Forces the details panel to refresh on the same objects

Protected function

void

 

RegisterContextMenu()

Registers context menu by name for later access

Public function

void

 

RemoveComponentNode

(
    FSCSEditorTreeNodePtrType InNodePtr
)

Removes an existing component node from the tree

Protected function

void

 

ReplaceComponentReferencesInTree

(
    FSCSEditorActorNodePtrType InActorN...,
    const TMap< UObject*, UObject ...
)

Helper method to update component pointers held by the given actor node's subtree

Protected function

void

 

ReplaceComponentReferencesInTree

(
    const TArray< FSCSEditorTreeNodePtr...,
    const TMap< UObject*, UObject ...
)

Update component pointers held by tree nodes if components have been replaced following construction script execution

Public function Static

void

 

SaveSCSCurrentState

(
    USimpleConstructionScript* SCS...
)

Function to save current state of SimpleConstructionScript and nodes associated with it.

Public function Static

void

 

SaveSCSNode

(
    USCS_Node* Node
)

Function to save the current state of SCS_Node and its children

Public function

void

 

SelectNode

(
    FSCSEditorTreeNodePtrType InNodeToS...,
    bool IsCntrlDown
)

Select the given tree node

Public function

void

 

SelectRoot()

Select the root of the tree

Public function

void

 

SetItemExpansionRecursive

(
    FSCSEditorTreeNodePtrType Model,
    bool bInExpansionState
)

Handler for recursively expanding/collapsing items

Public function

void

 

SetNodeExpansionState

(
    FSCSEditorTreeNodePtrType InNodeToC...,
    const bool bIsExpanded
)

Set the expansion state of a node

Public function

void

 

SetSceneRootNode

(
    FSCSEditorTreeNodePtrType NewSceneR...
)

Public function Const

void

 

SetSelectionOverride

(
    UPrimitiveComponent* PrimCompo...
)

Assigns a selection override delegate to the specified component

Public function

void

 

SetUICustomization

Sets UI customizations of this SCSEditor.

Public function

FReply

 

TryHandleAssetDragDropOperation

(
    const FDragDropEvent& DragDropEven...
)

Try to handle a drag-drop operation

Public function

void

 

UpdateSelectionFromNodes

(
    const TArray< FSCSEditorTreeNodePtr...
)

Update any associated selection (e.g. details view) from the passed in nodes

Public function

void

 

UpdateTree

(
    bool bRegenerateTreeNodes
)

Refresh the tree control to reflect changes in the SCS

Protected function Static

void

 

ViewEvent

(
    UBlueprint* Blueprint,
    const FName EventName,
    const FComponentEventConstructionDa...
)

Function to view an event for a node

Overridden from SWidget

Name Description

Public function Virtual

FReply

 

OnKeyDown

(
    const FGeometry& MyGeometry,
    const FKeyEvent& InKeyEvent
)

SWidget interface

Classes

Name

Description

Public struct

FAddedNodeDetails

Public struct

FAddNewComponentParams

Adds a component to the SCS tree

Public struct

FArguments

Typedefs

Deprecated Functions

Name Description

Public function

UActorCompon...

 

AddNewComponent

(
    UClass* NewComponentClass,
    UObject* Asset,
    const bool bSkipMarkBlueprintModifi...,
    bool bSetFocusToNewItem
)

Use version that takes parameter block

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss