Skip to content

Commit 31b5375

Browse files
committed
Don't save code property of VisualShader
1 parent 0dd9178 commit 31b5375

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

scene/resources/visual_shader.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2057,6 +2057,12 @@ void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const {
20572057
}
20582058
}
20592059

2060+
void VisualShader::_validate_property(PropertyInfo &p_property) const {
2061+
if (p_property.name == "code") {
2062+
p_property.usage = PROPERTY_USAGE_NONE;
2063+
}
2064+
}
2065+
20602066
Error VisualShader::_write_node(Type type, StringBuilder *p_global_code, StringBuilder *p_global_code_per_node, HashMap<Type, StringBuilder> *p_global_code_per_func, StringBuilder &r_code, Vector<VisualShader::DefaultTextureParam> &r_def_tex_params, const HashMap<ConnectionKey, const List<Connection>::Element *> &p_input_connections, int p_node, HashSet<int> &r_processed, bool p_for_preview, HashSet<StringName> &r_classes) const {
20612067
const Ref<VisualShaderNode> vsnode = graph[type].nodes[p_node].node;
20622068

scene/resources/visual_shader.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ class VisualShader : public Shader {
172172
bool _set(const StringName &p_name, const Variant &p_value);
173173
bool _get(const StringName &p_name, Variant &r_ret) const;
174174
void _get_property_list(List<PropertyInfo> *p_list) const;
175+
void _validate_property(PropertyInfo &p_property) const;
175176

176177
virtual void reset_state() override;
177178

0 commit comments

Comments
 (0)