Added support of time updates for simple embedded graphs.
This commit is contained in:
@@ -100,6 +100,32 @@ struct BlendTreeResource {
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
size_t GetNodeIndexForOutputSocket(const std::string& socket_name) const {
|
||||
for (size_t i = 0; i < m_connections.size(); i++) {
|
||||
const BlendTreeConnectionResource& connection = m_connections[i];
|
||||
if (connection.target_node_index == 0 && connection.target_socket_name == socket_name) {
|
||||
return connection.source_node_index;
|
||||
}
|
||||
}
|
||||
|
||||
std::cerr << "Error: could not find a node connected to output '" << socket_name << "'." << std::endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
size_t GetNodeIndexForInputSocket(const std::string& socket_name) const {
|
||||
for (size_t i = 0; i < m_connections.size(); i++) {
|
||||
const BlendTreeConnectionResource& connection = m_connections[i];
|
||||
if (connection.source_node_index == 1 && connection.source_socket_name == socket_name) {
|
||||
return connection.target_node_index;
|
||||
}
|
||||
}
|
||||
|
||||
std::cerr << "Error: could not find a node connected to input '" << socket_name << "'." << std::endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
};
|
||||
|
||||
struct StateMachineTransitionResources {
|
||||
@@ -131,6 +157,7 @@ struct AnimGraphResource: AnimNodeResource {
|
||||
bool SaveBlendTreeResourceToFile(const char* filename) const;
|
||||
void CreateBlendTreeRuntimeNodeInstances(AnimGraphBlendTree& result) const;
|
||||
void PrepareBlendTreeIOData(AnimGraphBlendTree& instance) const;
|
||||
void CreateBlendTreeConnectionInstances(AnimGraphBlendTree& instance) const;
|
||||
void SetRuntimeNodeProperties(AnimGraphBlendTree& result) const;
|
||||
|
||||
bool SaveStateMachineResourceToFile(const char* filename) const;
|
||||
|
||||
Reference in New Issue
Block a user