Polyphase Game Engine
Loading...
Searching...
No Matches
ActionReplaceNodeType Class Reference

Action to replace a node with a new node of a different type. The new node keeps the old node's slot in its parent, all children move over, portable properties (matched by name + type) transfer, and the persistent UUID is preserved so Timeline bindings and node-graph refs remain resolvable. More...

#include <ActionManager.h>

Inheritance diagram for ActionReplaceNodeType:
Action

Public Member Functions

 DECLARE_ACTION_INTERFACE (ReplaceNodeType)
 
 ActionReplaceNodeType (Node *oldNode, TypeId newType)
 
- Public Member Functions inherited from Action
virtual ~Action ()
 
virtual void Execute ()
 
virtual void Reverse ()
 
virtual const char * GetName ()=0
 

Protected Attributes

NodePtr mOldNode
 
NodePtr mNewNode
 
NodePtr mParent
 
int32_t mChildIndex = -1
 
std::vector< NodePtrmMovedChildren
 
TypeId mNewType
 
uint64_t mSavedUuid = 0
 
bool mFirstExecute = true
 

Detailed Description

Action to replace a node with a new node of a different type. The new node keeps the old node's slot in its parent, all children move over, portable properties (matched by name + type) transfer, and the persistent UUID is preserved so Timeline bindings and node-graph refs remain resolvable.

Constructor & Destructor Documentation

◆ ActionReplaceNodeType()

ActionReplaceNodeType::ActionReplaceNodeType ( Node oldNode,
TypeId  newType 
)

Member Function Documentation

◆ DECLARE_ACTION_INTERFACE()

ActionReplaceNodeType::DECLARE_ACTION_INTERFACE ( ReplaceNodeType  )

Member Data Documentation

◆ mChildIndex

int32_t ActionReplaceNodeType::mChildIndex = -1
protected

◆ mFirstExecute

bool ActionReplaceNodeType::mFirstExecute = true
protected

◆ mMovedChildren

std::vector<NodePtr> ActionReplaceNodeType::mMovedChildren
protected

◆ mNewNode

NodePtr ActionReplaceNodeType::mNewNode
protected

◆ mNewType

TypeId ActionReplaceNodeType::mNewType
protected

◆ mOldNode

NodePtr ActionReplaceNodeType::mOldNode
protected

◆ mParent

NodePtr ActionReplaceNodeType::mParent
protected

◆ mSavedUuid

uint64_t ActionReplaceNodeType::mSavedUuid = 0
protected

The documentation for this class was generated from the following file: