You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Merge pull request #57056 from Chaosus/vs_fix_defaults
This commit is contained in:
@@ -351,6 +351,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
|
||||
if (!graph_plugin) {
|
||||
return;
|
||||
}
|
||||
Shader::Mode mode = visual_shader->get_mode();
|
||||
|
||||
Control *offset;
|
||||
|
||||
@@ -707,9 +708,9 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
|
||||
label->add_theme_style_override("normal", label_style); //more compact
|
||||
hb->add_child(label);
|
||||
|
||||
if (vsnode->get_input_port_default_hint(i) != "" && !port_left_used) {
|
||||
if (vsnode->is_input_port_default(i, mode) && !port_left_used) {
|
||||
Label *hint_label = memnew(Label);
|
||||
hint_label->set_text("[" + vsnode->get_input_port_default_hint(i) + "]");
|
||||
hint_label->set_text(TTR("[default]"));
|
||||
hint_label->add_theme_color_override("font_color", editor->get_theme_color(SNAME("font_readonly_color"), SNAME("TextEdit")));
|
||||
hint_label->add_theme_style_override("normal", label_style);
|
||||
hb->add_child(hint_label);
|
||||
@@ -840,7 +841,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
|
||||
offset->set_custom_minimum_size(Size2(0, 4 * EDSCALE));
|
||||
node->add_child(offset);
|
||||
|
||||
String error = vsnode->get_warning(visual_shader->get_mode(), p_type);
|
||||
String error = vsnode->get_warning(mode, p_type);
|
||||
if (!error.is_empty()) {
|
||||
Label *error_label = memnew(Label);
|
||||
error_label->add_theme_color_override("font_color", editor->get_theme_color(SNAME("error_color"), SNAME("Editor")));
|
||||
|
||||
Reference in New Issue
Block a user