-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Visual Script Fixes #37053
Visual Script Fixes #37053
Conversation
jdbener
commented
Mar 14, 2020
•
edited
Loading
edited
- Fixed bug causing variable setters/getters added from the add node menu to be unusable when only one variable is present.
- Updated setter/gettter port naming to make the node's state more clear.
- Fixed regression causing script members to not update.
0817905
to
cb7d287
Compare
Nice. And at last I am not sure why it was required to add another function to the |
@@ -116,6 +116,10 @@ void register_visual_script_types() { | |||
#ifdef TOOLS_ENABLED | |||
ClassDB::set_current_api(ClassDB::API_EDITOR); | |||
ClassDB::register_class<_VisualScriptEditor>(); | |||
|
|||
ClassDB::register_class<VisualScriptEditor>(); | |||
ClassDB::bind_method(D_METHOD("update_members"), &VisualScriptEditor::update_members); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move it inside VisualScriptEditor::_bind_methods()
cb7d287
to
415111b
Compare
There wasn't a virtual function which got executed when a node was added to the graph. I could have made |
415111b
to
2354c4a
Compare
1) Fixed bug causing variable setters/getters added from the add node menu to be unusable when only one variable is present. 2) Updated port naming to make the node's state more clear. 3) Fixed regression causing script members to not update.
@fire, @akien-mga I think we can merge it if everyone is fine with adding a new function to |
I believe, Otherwise it's fine by me. |
@swarnimarun That was my first solution, changing the property in the constructor, and I saw the property was getting assigned whenever you opened the add node menu but not when it was placed in the graph. I then tried every single virtual function to try and find one which might be obscurely named but called as a node entered the graph. I was also considering using |
Hmmm. That's something I didn't expect but if that's the case then I believe it's fine to add another function in VisualScriptNode. |
This was superseded by #49749, but it would be worth checking if all fixes from this PR are fully superseded or if some parts of it should be put in a new PR. |