class MAGES::SceneGraph::Editor::ScopeNode¶
Overview¶
The base class for any node that can contain one or more instances of BaseNode. More…
class ScopeNode: public Group, public MAGES::SceneGraph::Editor::IActionImplementor { public: // properties Port InActionPort; SerializedObject SerializedData; Port OutActionPort; string Identifier; string Title; bool BoundToAsset; string Name; BaseActionData ActionData; bool HasUnsavedChanges; bool Deleted; SceneGraphView View; VisualElement InputContainer; VisualElement OutputContainer; bool HasAnyIncomingConnections; ActionIActionImplementor>> OnCanonicalInputChanged; // methods ScopeNode(); override bool IsRenamable(); void Initialize( Type actionType, BaseActionData data, 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(); virtual void Restore( Func<BaseActionData, GraphElement> lookup, Action addEdge ); void SetRuntimeControlsEnalbed( bool enabled, Action performAction, Action undoAction ); virtual void Save(string path); override void SetPosition(Rect newPos); }; // direct descendants class RepeatNode;
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; // 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);
Detailed Documentation¶
The base class for any node that can contain one or more instances of BaseNode.
Properties¶
Port InActionPort
Gets or sets the input port.
SerializedObject SerializedData
Gets the serialized data.
Port OutActionPort
Gets or sets the output port.
string Identifier
Gets or sets the identifier of the action.
string Title
Gets or sets the title of the node.
bool BoundToAsset
Gets or sets a value indicating whether this instance is bound to an asset.
string Name
Gets or sets the name of the action.
BaseActionData ActionData
Gets the action data.
bool HasUnsavedChanges
Gets a value indicating whether this instance has unsaved changes.
bool Deleted
Gets or sets a value indicating whether this IActionImplementor is deleted.
SceneGraphView View
Gets or sets the view.
VisualElement InputContainer
Gets the input container.
VisualElement OutputContainer
Gets the output container.
bool HasAnyIncomingConnections
Gets a value indicating whether this instance has any incoming connections.
ActionIActionImplementor>> OnCanonicalInputChanged
Sets the on canonical input changed delegate.
Methods¶
ScopeNode()
Initializes a new instance of the ScopeNode class.
void Initialize( Type actionType, BaseActionData data, Action<IActionImplementor, string, string> onNameChanged, string name )
Initializes the node.
Parameters:
actionType |
The type of the action. |
data |
The action data instance. Can be null. |
onNameChanged |
The delegate to invoke when the name is changed. |
name |
The initial name of the action. |
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. |
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. |
void OnRemoved()
Called before this node is removed.
virtual void Restore( Func<BaseActionData, GraphElement> lookup, ActionaddEdge )
Restores the node connections from a serialized state.
Parameters:
lookup |
The lookup function. |
addEdge |
The function to add an edge. |
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. |
virtual void Save(string path)
Saves the node to a serialized state.
Parameters:
path |
The path to save this node to. |
override void SetPosition(Rect newPos)
Set the position of the node.
Parameters:
newPosition |
The new position. |