Skip to content

Commit

Permalink
GH-771 Make exported variables searchable in All Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Naros committed Aug 23, 2024
1 parent bad7072 commit 4adb35c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/editor/graph/actions/default_action_registrar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ void OrchestratorDefaultGraphActionRegistrar::register_actions(const Orchestrato
_register_signals(class_name, global_class.get_signal_list());
}
}
else if (script.is_valid() && !script->get_class().match(OScript::get_class_static()))
else if (script.is_valid())
{
const String script_class_name = p_context.filter->get_target_class();
_register_methods(script_class_name, script->get_script_method_list());
Expand Down
7 changes: 6 additions & 1 deletion src/script/script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,12 @@ TypedArray<Dictionary> OScript::_get_script_method_list() const

TypedArray<Dictionary> OScript::_get_script_property_list() const
{
return {};
TypedArray<Dictionary> results;
for (const KeyValue<StringName, Ref<OScriptVariable>>& E : _variables)
if (E.value->is_exported())
results.push_back(DictionaryUtils::from_property(E.value->get_info()));

return results;
}

bool OScript::_is_tool() const
Expand Down

0 comments on commit 4adb35c

Please sign in to comment.