summaryrefslogtreecommitdiff
path: root/modules/gdscript/editor_templates/VisualShaderNodeCustom
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript/editor_templates/VisualShaderNodeCustom')
-rw-r--r--modules/gdscript/editor_templates/VisualShaderNodeCustom/basic.gd16
1 files changed, 14 insertions, 2 deletions
diff --git a/modules/gdscript/editor_templates/VisualShaderNodeCustom/basic.gd b/modules/gdscript/editor_templates/VisualShaderNodeCustom/basic.gd
index cf6d68333d..283a95d3b4 100644
--- a/modules/gdscript/editor_templates/VisualShaderNodeCustom/basic.gd
+++ b/modules/gdscript/editor_templates/VisualShaderNodeCustom/basic.gd
@@ -1,38 +1,50 @@
# meta-description: Visual shader's node plugin template
@tool
-extends _BASE_
class_name VisualShaderNode_CLASS_
+extends _BASE_
+
func _get_name() -> String:
return "_CLASS_"
+
func _get_category() -> String:
return ""
+
func _get_description() -> String:
return ""
+
func _get_return_icon_type() -> int:
return PORT_TYPE_SCALAR
+
func _get_input_port_count() -> int:
return 0
+
func _get_input_port_name(port: int) -> String:
return ""
+
func _get_input_port_type(port: int) -> int:
return PORT_TYPE_SCALAR
+
func _get_output_port_count() -> int:
return 1
+
func _get_output_port_name(port: int) -> String:
return "result"
+
func _get_output_port_type(port: int) -> int:
return PORT_TYPE_SCALAR
-func _get_code(input_vars: Array[String], output_vars: Array[String], mode: int, type: int) -> String:
+
+func _get_code(input_vars: Array[String], output_vars: Array[String],
+ mode: int, type: int) -> String:
return output_vars[0] + " = 0.0;"