@@ -1002,7 +1002,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
10021002 button->hide ();
10031003 }
10041004
1005- if (i == 0 && custom_editor) {
1005+ if (j == 0 && custom_editor) {
10061006 hb->add_child (custom_editor);
10071007 custom_editor->set_h_size_flags (Control::SIZE_EXPAND_FILL);
10081008 } else {
@@ -1019,22 +1019,22 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
10191019 type_box->add_item (TTR (" Boolean" ));
10201020 type_box->add_item (TTR (" Transform" ));
10211021 type_box->add_item (TTR (" Sampler" ));
1022- type_box->select (group_node->get_input_port_type (i ));
1022+ type_box->select (group_node->get_input_port_type (j ));
10231023 type_box->set_custom_minimum_size (Size2 (100 * EDSCALE, 0 ));
1024- type_box->connect (" item_selected" , callable_mp (editor, &VisualShaderEditor::_change_input_port_type).bind (p_id, i ), CONNECT_DEFERRED);
1024+ type_box->connect (" item_selected" , callable_mp (editor, &VisualShaderEditor::_change_input_port_type).bind (p_id, j ), CONNECT_DEFERRED);
10251025
10261026 LineEdit *name_box = memnew (LineEdit);
10271027 hb->add_child (name_box);
10281028 name_box->set_custom_minimum_size (Size2 (65 * EDSCALE, 0 ));
10291029 name_box->set_h_size_flags (Control::SIZE_EXPAND_FILL);
10301030 name_box->set_text (name_left);
1031- name_box->connect (" text_submitted" , callable_mp (editor, &VisualShaderEditor::_change_input_port_name).bind (name_box, p_id, i ), CONNECT_DEFERRED);
1032- name_box->connect (" focus_exited" , callable_mp (editor, &VisualShaderEditor::_port_name_focus_out).bind (name_box, p_id, i , false ), CONNECT_DEFERRED);
1031+ name_box->connect (" text_submitted" , callable_mp (editor, &VisualShaderEditor::_change_input_port_name).bind (name_box, p_id, j ), CONNECT_DEFERRED);
1032+ name_box->connect (" focus_exited" , callable_mp (editor, &VisualShaderEditor::_port_name_focus_out).bind (name_box, p_id, j , false ), CONNECT_DEFERRED);
10331033
10341034 Button *remove_btn = memnew (Button);
10351035 remove_btn->set_icon (EditorNode::get_singleton ()->get_editor_theme ()->get_icon (SNAME (" Remove" ), EditorStringName (EditorIcons)));
10361036 remove_btn->set_tooltip_text (TTR (" Remove" ) + " " + name_left);
1037- remove_btn->connect (" pressed" , callable_mp (editor, &VisualShaderEditor::_remove_input_port).bind (p_id, i ), CONNECT_DEFERRED);
1037+ remove_btn->connect (" pressed" , callable_mp (editor, &VisualShaderEditor::_remove_input_port).bind (p_id, j ), CONNECT_DEFERRED);
10381038 hb->add_child (remove_btn);
10391039 } else {
10401040 Label *label = memnew (Label);
@@ -1043,7 +1043,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
10431043 label->add_theme_style_override (" normal" , editor->get_theme_stylebox (SNAME (" label_style" ), SNAME (" VShaderEditor" ))); // more compact
10441044 hb->add_child (label);
10451045
1046- if (vsnode->is_input_port_default (i , mode) && !port_left_used) {
1046+ if (vsnode->is_input_port_default (j , mode) && !port_left_used) {
10471047 Label *hint_label = memnew (Label);
10481048 hint_label->set_text (TTR (" [default]" ));
10491049 hint_label->add_theme_color_override (" font_color" , editor->get_theme_color (SNAME (" font_readonly_color" ), SNAME (" TextEdit" )));
0 commit comments