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

Cannot delete nodes in generator graph #575

Closed
NatCracken opened this issue Oct 29, 2023 · 2 comments
Closed

Cannot delete nodes in generator graph #575

NatCracken opened this issue Oct 29, 2023 · 2 comments

Comments

@NatCracken
Copy link

NatCracken commented Oct 29, 2023

Describe the bug
Pressing delete with generator nodes selected doesn't do anything, Node isn't deleted and no errors in console. Upon startup the error message In Object of type 'GraphEdit': Attempt to connect nonexistent signal 'close_nodes_request' to callable 'VoxelGraphEditor::_on_graph_edit_delete_nodes_request'. is printed which I assume to be related. This error occurred after rebuilding to updated versions yesterday.

To Reproduce
Steps to reproduce the behavior:

  1. matching versions (see environment) might be necessary
  2. create a generator graph
  3. attempt to delete a generator graph mode

Expected behavior
no error on startup, being able to delete generator nodes

Screenshots
console on startup
https://imgur.com/a/E45JdGx

Environment
Windows 10 Home
RTX 3060
4.1.2 dev mono
godot 214405350f3893bb6960c5200ec6f683dd10b41d
voxel e495b76

@Zylann
Copy link
Owner

Zylann commented Oct 29, 2023

Are you sure you're using Godot 4.1.2?

The name of that signal has been a problem in the development of Godot 4.2:

// Name of the GraphEdit signal to listen to, for the intent of deleting nodes
//
// There was a rename in Godot 4.2 PR #79311 2167694965ca2f4f16cfc1362d32a2fa01e817a2
// https://github.com/godotengine/godot/pull/79311#issuecomment-1671901961
// The original code of GraphEdit referred to deleting GraphNodes as "close" and "delete" interchangeably. It was
// unified for consistency, but the term chosen was "close", which breaks compatibility with a name that is less related
// to what it was used for...
#if GODOT_VERSION_MAJOR == 4 && GODOT_VERSION_MINOR <= 1
#define GODOT_GraphEdit_delete_nodes_request "delete_nodes_request"
#else
#define GODOT_GraphEdit_delete_nodes_request "close_nodes_request"
#endif

But in 4.1.x it should be using delete_nodes_request, which is the right signal.

Your console screenshot is showing 4.2.
The name of the signal has been later renamed back to what it was, so the workaround just needs to be removed.

@NatCracken
Copy link
Author

That'll do it. It seems my automation stuff has been grabbing the wrong version of Godot for a while now, but only now did it actually break anything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants