Skip to content

Commit

Permalink
GH-487 Changing function argument type resets default value
Browse files Browse the repository at this point in the history
  • Loading branch information
Naros committed Jul 10, 2024
1 parent 9dfde8a commit f7e000a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/script/nodes/functions/call_function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,11 @@ void OScriptNodeCallFunction::reallocate_pins_during_reconstruction(const Vector
{
if (old_pin->get_direction() == input->get_direction() && old_pin->get_pin_name() == input->get_pin_name())
{
input->set_generated_default_value(old_pin->get_generated_default_value());
input->set_default_value(old_pin->get_default_value());
if (old_pin->get_property_info().type == input->get_property_info().type)
{
input->set_generated_default_value(old_pin->get_generated_default_value());
input->set_default_value(old_pin->get_default_value());
}
}
}
}
Expand Down

0 comments on commit f7e000a

Please sign in to comment.