From 10469c1962172db954d02a3912053a99e2a0dfa3 Mon Sep 17 00:00:00 2001 From: Bojidar Marinov Date: Thu, 28 Sep 2017 13:07:20 +0300 Subject: Document some of the VisualScript classes. --- doc/classes/VisualScriptCustomNode.xml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'doc/classes/VisualScriptCustomNode.xml') diff --git a/doc/classes/VisualScriptCustomNode.xml b/doc/classes/VisualScriptCustomNode.xml index ec442e993c..e321c8854a 100644 --- a/doc/classes/VisualScriptCustomNode.xml +++ b/doc/classes/VisualScriptCustomNode.xml @@ -1,8 +1,10 @@ + A scripted Visual Script node. + A custom Visual Script node which can be scripted in powerful ways. @@ -13,18 +15,21 @@ + Return the node's title. + Return the node's category. + Return the count of input value ports. @@ -33,6 +38,7 @@ + Return the specified input port's name. @@ -41,12 +47,14 @@ + Return the specified input port's type. See the TYPE_* enum in [@GlobalScope]. + Return the amount of output [b]sequence[/b] ports. @@ -55,12 +63,14 @@ + Return the specified [b]sequence[/b] output's name. + Return the amount of output value ports. @@ -69,6 +79,7 @@ + Return the specified output's name. @@ -77,24 +88,28 @@ + Return the specified output's type. See the TYPE_* enum in [@GlobalScope]. + Return the custom node's text, which is shown right next to the input [b]sequence[/b] port (if there is none, on the place that is usually taken by it). + Return the size of the custom node's working memory. See [method _step] for more details. + Return whether the custom node has an input [b]sequence[/b] port. @@ -109,25 +124,42 @@ + Execute the custom node's logic, returning the index of the output sequence port to use or a [String] when there is an error. + + The [code]inputs[/code] array contains the values of the input ports. + [code]outputs[/code] is an array whose indices should be set to the respective outputs. + The [code]start_mode[/code] is usually [code]START_MODE_BEGIN_SEQUENCE[/code], unless you have used the STEP_* constants. + [code]working_mem[/code] is an array which can be used to persist information between runs of the custom node. + + When returning, you can mask the returned value with one of the STEP_* constants. + The start mode used the first time when [method _step] is called. + The start mode used when [method _step] is called after coming back from a STEP_PUSH_STACK_BIT. + The start mode used when [method _step] is called after resuming from STEP_YIELD_BIT. + Hint used by [method _step] to tell that control should return to it when there is no other node left to execute. + This is used by [VisualScriptCondition] to redirect the sequence to the "Done" port after the true/false branch has finished execution. + Hint used by [method _step] to tell that control should return back, either hitting a previous STEP_PUSH_STACK_BIT or exiting the function. + Hint used by [method _step] to tell that control should stop and exit the function. + Hint used by [method _step] to tell that the function should be yielded. + Using this requires you to have at least one working memory slot, which is used for the [VisualScriptFunctionState]. -- cgit v1.2.3