|
@@ -681,6 +681,10 @@ Vector<StringName> VisualShaderNodeTexture::get_editable_properties() const {
|
|
|
|
|
|
String VisualShaderNodeTexture::get_warning(Shader::Mode p_mode, VisualShader::Type p_type) const {
|
|
String VisualShaderNodeTexture::get_warning(Shader::Mode p_mode, VisualShader::Type p_type) const {
|
|
|
|
|
|
|
|
+ if (is_input_port_connected(2) && source != SOURCE_PORT) {
|
|
|
|
+ return TTR("The sampler port is connected but not used. Consider changing the source to 'SamplerPort'.");
|
|
|
|
+ }
|
|
|
|
+
|
|
if (source == SOURCE_TEXTURE) {
|
|
if (source == SOURCE_TEXTURE) {
|
|
return String(); // all good
|
|
return String(); // all good
|
|
}
|
|
}
|
|
@@ -907,6 +911,13 @@ Vector<StringName> VisualShaderNodeCubeMap::get_editable_properties() const {
|
|
return props;
|
|
return props;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+String VisualShaderNodeCubeMap::get_warning(Shader::Mode p_mode, VisualShader::Type p_type) const {
|
|
|
|
+ if (is_input_port_connected(2) && source != SOURCE_PORT) {
|
|
|
|
+ return TTR("The sampler port is connected but not used. Consider changing the source to 'SamplerPort'.");
|
|
|
|
+ }
|
|
|
|
+ return String();
|
|
|
|
+}
|
|
|
|
+
|
|
void VisualShaderNodeCubeMap::_bind_methods() {
|
|
void VisualShaderNodeCubeMap::_bind_methods() {
|
|
|
|
|
|
ClassDB::bind_method(D_METHOD("set_source", "value"), &VisualShaderNodeCubeMap::set_source);
|
|
ClassDB::bind_method(D_METHOD("set_source", "value"), &VisualShaderNodeCubeMap::set_source);
|