Skip to content

Commit

Permalink
GH-533 Ignore default value widgets on target pins
Browse files Browse the repository at this point in the history
  • Loading branch information
Naros committed Jul 17, 2024
1 parent 7df2f18 commit 5f6de0e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/script/nodes/functions/call_member_function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ Ref<OScriptNodePin> OScriptNodeCallMemberFunction::_create_target_pin()
{
target->set_label(VariantUtils::get_friendly_type_name(property.type));
target->no_pretty_format();

// Target pins should never accept default values as they're implied to be provided an instance
// as a result of another node's output. So for example, to use a member function such as the
// "get_as_property_path" function on "NodePath", construct a NodePath and then connect that
// node to a member function call for "get_as_property_path".
target->set_flag(OScriptNodePin::Flags::IGNORE_DEFAULT);
}
else if (!property.class_name.is_empty())
{
Expand Down

0 comments on commit 5f6de0e

Please sign in to comment.