class MAGES::SceneGraph::Editor::BaseActionNode

Overview

Base class of action nodes. More…

class BaseActionNode:
    public MAGES::SceneGraph::Editor::BaseNode,
    public MAGES::SceneGraph::Editor::IActionImplementor
{
public:
    // properties

    override bool Deleted;
    override bool BoundToAsset;
    string ActionID;
    string ActionName;
    override string Name;
    override BaseActionData ActionData;
    override SerializedObject SerializedData;
    override string Identifier;
    override bool HasUnsavedChanges;
    override bool HasAnyIncomingConnections;
    override ActionIActionImplementor>> OnCanonicalInputChanged;

    // methods

    BaseActionNode();

    override void Initialize(
        Type actionType,
        BaseActionData data,
        Action<IActionImplementor, string, string> onNameChanged,
        string name
    );

    void DisableRuntimeControls();
    void EnableRuntimeControls(Action onNext, Action onPrev);
    virtual override void Save(string path);

    virtual override void OnConnectionCreated(
        Port thisPort,
        Port otherPort,
        GraphElement other
    );

    virtual override void OnConnectionRemoved(
        Port thisPort,
        Port otherPort,
        GraphElement other
    );

    virtual override void OnRemoved();

    virtual override void Restore(
        Func<BaseActionData, GraphElement> lookup,
        Action addEdge
    );

    virtual override void SetRuntimeControlsEnalbed(
        bool enabled,
        Action performAction,
        Action undoAction
    );
};

// direct descendants

class ActionNode;
class BeginNode;
class EndNode;
class OldRepeatNode;

Inherited Members

public:
    // properties

    string Identifier;
    string Title;
    string Name;
    bool HasUnsavedChanges;
    bool Deleted;
    bool HasAnyIncomingConnections;
    bool BoundToAsset;
    SceneGraphView View;
    Port InActionPort;
    Port OutActionPort;
    VisualElement InputContainer;
    VisualElement OutputContainer;
    BaseActionData ActionData;
    SerializedObject SerializedData;
    System.ActionIActionImplementor>> OnCanonicalInputChanged;
    abstract string Identifier;
    abstract bool HasUnsavedChanges;
    SceneGraphView View;
    Port InActionPort;
    Port OutActionPort;
    string Title;
    string Name;
    bool Deleted;
    VisualElement InputContainer;
    SerializedObject SerializedData;
    VisualElement OutputContainer;
    BaseActionData ActionData;
    bool HasAnyIncomingConnections;
    bool BoundToAsset;
    ActionIActionImplementor>> OnCanonicalInputChanged;

    // methods

    void Initialize(
        System.Type actionType,
        BaseActionData data,
        System.Action<IActionImplementor, string, string> onNameChanged,
        string name
    );

    void OnConnectionCreated(Port thisPort, Port otherPort, GraphElement other);
    void OnConnectionRemoved(Port thisPort, Port otherPort, GraphElement other);
    void OnRemoved();
    void Save(string path);

    void Restore(
        Func<BaseActionData, GraphElement> lookup,
        Action addEdge
    );

    void SetRuntimeControlsEnalbed(
        bool enabled,
        Action performAction,
        Action undoAction
    );

    void SetPosition(Rect newPosition);
    BaseNode();
    override void SetPosition(Rect newPos);

    virtual void Initialize(
        System.Type actionType,
        BaseActionData data,
        Action<IActionImplementor, string, string> onNameChanged,
        string name
    );

    virtual void OnConnectionCreated(
        Port thisPort,
        Port otherPort,
        GraphElement other
    );

    virtual void OnConnectionRemoved(
        Port thisPort,
        Port otherPort,
        GraphElement other
    );

    virtual void OnRemoved();

    virtual void Restore(
        Func<BaseActionData, GraphElement> lookup,
        Action addEdge
    );

    virtual void SetRuntimeControlsEnalbed(
        bool enabled,
        Action performAction,
        Action undoAction
    );

    virtual void Save(string path);

Detailed Documentation

Base class of action nodes.

Properties

override bool Deleted

Gets or sets a value indicating whether the node has been deleted.

override bool BoundToAsset

Gets or sets a value indicating whether the node is bound to an asset.

string ActionID

Gets or sets the action id.

string ActionName

Gets or sets the action name.

override string Name

Gets or sets the name.

override BaseActionData ActionData

Gets the action data.

override SerializedObject SerializedData

Gets the serialized data.

override string Identifier

Gets the identifier of the node.

override bool HasUnsavedChanges

Gets a value indicating whether this instance has unsaved changes.

override bool HasAnyIncomingConnections

Gets a value indicating whether this instance has any incoming connections.

override ActionIActionImplementor>> OnCanonicalInputChanged

Sets the on canonical input changed delegate.

Methods

BaseActionNode()

Initializes a new instance of the BaseActionNode class.

void DisableRuntimeControls()

Disable the runtime controls.

void EnableRuntimeControls(Action onNext, Action onPrev)

Enable the runtime controls.

Parameters:

onNext

Action to invoke when skip is pressed.

onPrev

Action to invoke when prev is pressed.

virtual override void Save(string path)

Save this node.

Parameters:

path

The path to save to.

virtual override void OnConnectionCreated(
    Port thisPort,
    Port otherPort,
    GraphElement other
)

Called when a connection is created.

Parameters:

thisPort

The port belonging to this node.

otherPort

The port belonging to the other node.

other

The other node.

NotImplementedException

This class should never be instantiated.

virtual override void OnConnectionRemoved(
    Port thisPort,
    Port otherPort,
    GraphElement other
)

Called when a connection is removed.

Parameters:

thisPort

The port belonging to this node.

otherPort

The port belonging to the other node.

other

The other node.

NotImplementedException

This class should never be instantiated.

virtual override void OnRemoved()

Called when the node is removed.

Parameters:

NotImplementedException

This class should never be instantiated.

virtual override void Restore(
    Func<BaseActionData, GraphElement> lookup,
    Action addEdge
)

Restores the node conenctions from a serialized state.

Parameters:

lookup

The lookup function.

addEdge

The add edge function.

NotImplementedException

This class should never be instantiated.

virtual override void SetRuntimeControlsEnalbed(
    bool enabled,
    Action performAction,
    Action undoAction
)

Sets the runtime controls enabled.

Parameters:

enabled

True to enable controls.

performAction

The action to call to skip this action.

undoAction

The action to call to undo this action.

NotImplementedException

This class should never be instantiated.