godot-visual-script icon indicating copy to clipboard operation
godot-visual-script copied to clipboard

Rename VisualScript properties and signals

Open Gallilus opened this issue 4 years ago • 3 comments

Describe the project you are working on

General VisualScript improvements and learning c++

Describe the problem or limitation you are having in your project

When editing a property name or signal name in the visual script the vs_nodes do not get renamed. This is the case for functions

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Implement Similar functionality ass for Function rename. image

This will increase refactor capability a lot.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

  1. Add an edit button like on the right of the function. @ VisualScriptEditor::_update_members
  2. Add edit name to dropdown edit member @ VisualScriptEditor::_member_rmb_selected
  3. when doing any edit in the member's menu assume it needs to be implemented in all the script's nodes that implement that member. Example code @ VisualScriptEditor::_rename_function @ VisualScript::rename_variable

If this enhancement will not be used often, can it be worked around with a few lines of script?

The lack of this function is mentioned every so often in discord

Is there a reason why this should be core and not an add-on in the asset library?

This seems base editor functionality

Gallilus avatar Nov 15 '21 16:11 Gallilus

@Gallilus Got it working for variable setters/getters. Now onto signals.

https://user-images.githubusercontent.com/41969735/142773567-70c2f5d3-bfc9-4448-ac78-908d644b4ccd.mp4

theoway avatar Nov 21 '21 10:11 theoway

I've made an issue in the godot repo, because it is a bug that nodes are not renamed. I'll make a PR soon. As far as the the addition/removal of editing/pencil button is concerned, it should be discussed here, in this proposal issue.

theoway avatar Nov 23 '21 16:11 theoway

Is this ready for merging?

Edited:

What is remaining? The issue was merged but was not closed.

fire avatar Jan 06 '22 01:01 fire