From 4d6790e9dfe5dcb0cde9372ae8e731b5306e13b3 Mon Sep 17 00:00:00 2001 From: Yuri Roubinsky Date: Mon, 7 Feb 2022 22:58:37 +0300 Subject: Add `_get_func_code/_is_available` virtual functions to custom nodes --- doc/classes/VisualShaderNodeCustom.xml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'doc/classes') diff --git a/doc/classes/VisualShaderNodeCustom.xml b/doc/classes/VisualShaderNodeCustom.xml index 7b992abe24..0a962a4aa4 100644 --- a/doc/classes/VisualShaderNodeCustom.xml +++ b/doc/classes/VisualShaderNodeCustom.xml @@ -44,6 +44,17 @@ Defining this method is [b]optional[/b]. + + + + + + Override this method to add a shader code to the beginning of each shader function (once). The shader code should be returned as a string, which can have multiple lines (the [code]"""[/code] multiline string construct can be used for convenience). + If there are multiple custom nodes of different types which use this feature the order of each insertion is undefined. + You can customize the generated code based on the shader [code]mode[/code] (see [enum Shader.Mode]) and/or [code]type[/code] (see [enum VisualShader.Type]). + Defining this method is [b]optional[/b]. + + @@ -114,11 +125,20 @@ Defining this method is [b]optional[/b]. If not overridden, no return icon is shown. + + + + + + Override this method to prevent the node to be visible in the member dialog for the certain [code]mode[/code] (see [enum Shader.Mode]) and/or [code]type[/code] (see [enum VisualShader.Type]). + Defining this method is [b]optional[/b]. If not overridden, it's [code]true[/code]. + + Override this method to enable high-end mark in the Visual Shader Editor's members dialog. - Defining this method is [b]optional[/b]. If not overridden, it's false. + Defining this method is [b]optional[/b]. If not overridden, it's [code]false[/code]. -- cgit v1.2.3