From 4a9264271dcac19a3571bd123990c657d3d2e816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 8 Sep 2020 14:20:53 +0200 Subject: [PATCH] doc: Sync classref with current source --- doc/classes/Shader.xml | 2 +- doc/classes/VisualShader.xml | 1 - scene/resources/visual_shader.cpp | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml index 39d4b44d1cf..3fbd06ce3d5 100644 --- a/doc/classes/Shader.xml +++ b/doc/classes/Shader.xml @@ -55,7 +55,7 @@ Returns the shader's code as the user has written it, not the full generated code used internally. - + Returns the shader's custom defines. Custom defines can be used in Godot to add GLSL preprocessor directives (e.g: extensions) required for the shader logic. [b]Note:[/b] Custom defines are not validated by the Godot shader parser, so care should be taken when using them. diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml index 6b823a89f7f..7435d2ef254 100644 --- a/doc/classes/VisualShader.xml +++ b/doc/classes/VisualShader.xml @@ -193,7 +193,6 @@ - The offset vector of the whole graph. diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp index 70f3eab3716..1b0c24e55a7 100644 --- a/scene/resources/visual_shader.cpp +++ b/scene/resources/visual_shader.cpp @@ -1428,6 +1428,8 @@ void VisualShader::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "graph_offset", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_graph_offset", "get_graph_offset"); + ADD_PROPERTY_DEFAULT("code", ""); // Inherited from Shader, prevents showing default code as override in docs. + BIND_ENUM_CONSTANT(TYPE_VERTEX); BIND_ENUM_CONSTANT(TYPE_FRAGMENT); BIND_ENUM_CONSTANT(TYPE_LIGHT);