Merge pull request #65457 from Chaosus/vs_fix2
Add conversion for uniform_name property in visual shader
This commit is contained in:
commit
647f345ffe
2 changed files with 15 additions and 0 deletions
|
@ -3718,6 +3718,17 @@ bool VisualShaderNodeParameter::is_global_code_generated() const {
|
|||
return global_code_generated;
|
||||
}
|
||||
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
// Kept for compatibility from 3.x to 4.0.
|
||||
bool VisualShaderNodeParameter::_set(const StringName &p_name, const Variant &p_value) {
|
||||
if (p_name == "uniform_name") {
|
||||
set_parameter_name(p_value);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
void VisualShaderNodeParameter::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_parameter_name", "name"), &VisualShaderNodeParameter::set_parameter_name);
|
||||
ClassDB::bind_method(D_METHOD("get_parameter_name"), &VisualShaderNodeParameter::get_parameter_name);
|
||||
|
|
|
@ -519,6 +519,10 @@ protected:
|
|||
static void _bind_methods();
|
||||
String _get_qual_str() const;
|
||||
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
bool _set(const StringName &p_name, const Variant &p_value);
|
||||
#endif
|
||||
|
||||
public:
|
||||
void set_parameter_name(const String &p_name);
|
||||
String get_parameter_name() const;
|
||||
|
|
Loading…
Reference in a new issue