doc: Sync classref with current source

This commit is contained in:
Rémi Verschelde 2020-09-08 14:20:53 +02:00
parent c5f6d2097b
commit 4a9264271d
No known key found for this signature in database
GPG Key ID: C3336907360768E1
3 changed files with 3 additions and 2 deletions

View File

@ -55,7 +55,7 @@
<member name="code" type="String" setter="set_code" getter="get_code" default="&quot;&quot;"> <member name="code" type="String" setter="set_code" getter="get_code" default="&quot;&quot;">
Returns the shader's code as the user has written it, not the full generated code used internally. Returns the shader's code as the user has written it, not the full generated code used internally.
</member> </member>
<member name="custom_defines" type="String" setter="set_custom_defines" getter="get_custom_defines" default="&quot;#define MAX_LIGHT_DATA_STRUCTS 409#define MAX_FORWARD_LIGHTS 8#define MAX_REFLECTION_DATA_STRUCTS 455#define MAX_SKELETON_BONES 1365&quot;"> <member name="custom_defines" type="String" setter="set_custom_defines" getter="get_custom_defines" default="&quot;&quot;">
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. 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. [b]Note:[/b] Custom defines are not validated by the Godot shader parser, so care should be taken when using them.
</member> </member>

View File

@ -193,7 +193,6 @@
</method> </method>
</methods> </methods>
<members> <members>
<member name="code" type="String" setter="set_code" getter="get_code" override="true" default="&quot;shader_type spatial;void vertex() {// Output:0}void fragment() {// Output:0}void light() {// Output:0}&quot;" />
<member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2( 0, 0 )"> <member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2( 0, 0 )">
The offset vector of the whole graph. The offset vector of the whole graph.
</member> </member>

View File

@ -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(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_VERTEX);
BIND_ENUM_CONSTANT(TYPE_FRAGMENT); BIND_ENUM_CONSTANT(TYPE_FRAGMENT);
BIND_ENUM_CONSTANT(TYPE_LIGHT); BIND_ENUM_CONSTANT(TYPE_LIGHT);