Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling get_path on node with attached script returns wrong value #121

Closed
Naros opened this issue Mar 1, 2024 · 1 comment · Fixed by #134
Closed

Calling get_path on node with attached script returns wrong value #121

Naros opened this issue Mar 1, 2024 · 1 comment · Fixed by #134
Labels
bug/confirmed Bug/regression has been confirmed. kind/bug A bug or regression in expected behavior.

Comments

@Naros
Copy link
Member

Naros commented Mar 1, 2024

Describe the bug

When calling get_path function on a scene node that refers to the node that has the Orchestrator script, the function call returns the path to the script file rather than the node path in the scene.

Expected behavior

Should return the NodePath of the node in the scene.

Actual behavior

Returns the script's file path, i.e. res://the_script_filename.os.

How to Reproduce?

  1. Attach a script to a child node in the scene.
  2. Drag the child node onto the graph.
  3. Drag the pin from the scene node and select get_path
  4. Attach a print string node to the output of get_path.

Godot full version

4.2.1-stable

Orchestrator version

2.0.dev3

Additional information

No response

@Naros Naros added kind/bug A bug or regression in expected behavior. bug/confirmed Bug/regression has been confirmed. labels Mar 1, 2024
@Naros
Copy link
Member Author

Naros commented Mar 1, 2024

The problem is that OScriptInstance::_call_internal mistakenly uses _script->has_method after the defined functions map has been inspected. In this case, this method should simply return that the method doesn't exist and let standard Godot handle dispatch to the node or the underlying Script interface as necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/confirmed Bug/regression has been confirmed. kind/bug A bug or regression in expected behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant