VisualScriptCustomNode

Inherits: VisualScriptNode < Resource < Reference < Object

Un nodo de Visual Script con script.

Descripción

Un nodo de Visual Script personalizado que puede ser programado de manera poderosa.

Métodos

String

_get_caption ( ) virtual

String

_get_category ( ) virtual

int

_get_input_value_port_count ( ) virtual

int

_get_input_value_port_hint ( int idx ) virtual

String

_get_input_value_port_hint_string ( int idx ) virtual

String

_get_input_value_port_name ( int idx ) virtual

int

_get_input_value_port_type ( int idx ) virtual

int

_get_output_sequence_port_count ( ) virtual

String

_get_output_sequence_port_text ( int idx ) virtual

int

_get_output_value_port_count ( ) virtual

int

_get_output_value_port_hint ( int idx ) virtual

String

_get_output_value_port_hint_string ( int idx ) virtual

String

_get_output_value_port_name ( int idx ) virtual

int

_get_output_value_port_type ( int idx ) virtual

String

_get_text ( ) virtual

int

_get_working_memory_size ( ) virtual

bool

_has_input_sequence_port ( ) virtual

Variant

_step ( Array inputs, Array outputs, int start_mode, Array working_mem ) virtual

Enumeraciones

enum StartMode:

  • START_MODE_BEGIN_SEQUENCE = 0 --- El modo de inicio utilizado la primera vez cuando se llama a _step.

  • START_MODE_CONTINUE_SEQUENCE = 1 --- El modo de inicio utilizado cuando se llama a _step después de volver de una STEP_PUSH_STACK_BIT.

  • START_MODE_RESUME_YIELD = 2 --- El modo de inicio utilizado cuando se llama a _step después de reanudar desde STEP_YIELD_BIT.

Constantes

  • STEP_PUSH_STACK_BIT = 16777216 --- Sugerencia usada por _step para decir que el control debe volver a él cuando no quede ningún otro nodo por ejecutar.

Esto lo usa VisualScriptCondition para redirigir la secuencia al puerto "Done" después de que la rama true/false haya terminado la ejecución.

  • STEP_GO_BACK_BIT = 33554432 --- Sugerencia usada por _step para decir que el control debe regresar, ya sea golpeando una STEP_PUSH_STACK_BIT anterior o saliendo de la función.

  • STEP_NO_ADVANCE_BIT = 67108864

  • STEP_EXIT_FUNCTION_BIT = 134217728 --- Sugerencia usada por _step para decir que el control debe detenerse y salir de la función.

  • STEP_YIELD_BIT = 268435456 --- Sugerencia utilizada por el _step para decir que la función debe ser cedida.

Usar esto requiere que tengas al menos una ranura de memoria de trabajo, que se usa para el VisualScriptFunctionState.

Descripciones de Métodos

  • String _get_caption ( ) virtual

Devuelve el título del nodo.


  • String _get_category ( ) virtual

Devuelve la categoría del nodo.


  • int _get_input_value_port_count ( ) virtual

Devuelve el recuento de los puertos de valor de entrada.


  • int _get_input_value_port_hint ( int idx ) virtual

Return the specified input port's hint. See the PropertyHint hints.


  • String _get_input_value_port_hint_string ( int idx ) virtual

Return the specified input port's hint string.


  • String _get_input_value_port_name ( int idx ) virtual

Devuelve el nombre del puerto de entrada especificado.


  • int _get_input_value_port_type ( int idx ) virtual

Devuelve el tipo de puerto de entrada especificado. Vea los valores de Variant.Type.


  • int _get_output_sequence_port_count ( ) virtual

Devuelve la cantidad de puertos secuencia de salida.


  • String _get_output_sequence_port_text ( int idx ) virtual

Devuelve el nombre de la salida de la secuencia especificada.


  • int _get_output_value_port_count ( ) virtual

Devuelve la cantidad de puertos de valor de salida.


  • int _get_output_value_port_hint ( int idx ) virtual

Return the specified output port's hint. See the PropertyHint hints.


  • String _get_output_value_port_hint_string ( int idx ) virtual

Return the specified output port's hint string.


  • String _get_output_value_port_name ( int idx ) virtual

Return the specified output port's name.


  • int _get_output_value_port_type ( int idx ) virtual

Return the specified output port's type. See the Variant.Type values.


  • String _get_text ( ) virtual

Devuelve el texto del nodo personalizado, que se muestra justo al lado del puerto de entrada secuencia (si no hay ninguno, en el lugar que suele ocupar).


  • int _get_working_memory_size ( ) virtual

Devuelve el texto del nodo personalizado, que se muestra justo al lado del puerto de entrada secuencia (si no hay ninguno, en el lugar que suele ocupar).


  • bool _has_input_sequence_port ( ) virtual

Devuelve si el nodo personalizado tiene un puerto secuencia entrada.


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 inputs array contains the values of the input ports.

outputs is an array whose indices should be set to the respective outputs.

The start_mode is usually START_MODE_BEGIN_SEQUENCE, unless you have used the STEP_* constants.

working_mem is an array which can be used to persist information between runs of the custom node. The size needs to be predefined using _get_working_memory_size.

When returning, you can mask the returned value with one of the STEP_* constants.