Minor refactor.
parent
fd032c273b
commit
b9789bd1e1
|
@ -459,6 +459,7 @@ void AnimGraphEditorUpdate(ax::NodeEditor::EditorContext* context) {
|
|||
if (input_pin_id && output_pin_id) {
|
||||
int source_node_index;
|
||||
int source_node_socket_index;
|
||||
const Socket* source_socket = nullptr;
|
||||
|
||||
OutputPinIdToNodeIndexAndSocketIndex(
|
||||
input_pin_id.Get(),
|
||||
|
@ -471,10 +472,17 @@ void AnimGraphEditorUpdate(ax::NodeEditor::EditorContext* context) {
|
|||
if (source_node->m_socket_accessor->m_outputs.size()
|
||||
< source_node_socket_index) {
|
||||
source_node_socket_index = -1;
|
||||
} else {
|
||||
source_socket =
|
||||
sEditorState.hierarchyStack[sEditorState.hierarchyStackIndex]
|
||||
->m_blend_tree_resource.GetNodeOutputSocketByIndex(
|
||||
source_node,
|
||||
source_node_socket_index);
|
||||
}
|
||||
|
||||
int target_node_index;
|
||||
int target_node_socket_index;
|
||||
const Socket* target_socket = nullptr;
|
||||
|
||||
InputPinIdToNodeIndexAndSocketIndex(
|
||||
output_pin_id.Get(),
|
||||
|
@ -487,18 +495,13 @@ void AnimGraphEditorUpdate(ax::NodeEditor::EditorContext* context) {
|
|||
if (target_node->m_socket_accessor->m_inputs.size()
|
||||
< target_node_socket_index) {
|
||||
target_node_socket_index = -1;
|
||||
}
|
||||
|
||||
const Socket* source_socket =
|
||||
sEditorState.hierarchyStack[sEditorState.hierarchyStackIndex]
|
||||
->m_blend_tree_resource.GetNodeOutputSocketByIndex(
|
||||
source_node,
|
||||
source_node_socket_index);
|
||||
const Socket* target_socket =
|
||||
} else {
|
||||
target_socket =
|
||||
sEditorState.hierarchyStack[sEditorState.hierarchyStackIndex]
|
||||
->m_blend_tree_resource.GetNodeInputSocketByIndex(
|
||||
target_node,
|
||||
target_node_socket_index);
|
||||
}
|
||||
|
||||
if (source_socket == nullptr || target_socket == nullptr
|
||||
|| !sEditorState.hierarchyStack[sEditorState.hierarchyStackIndex]
|
||||
|
|
Loading…
Reference in New Issue