Create Json Parameters

../../../../_images/create_json.svg

Documentation

Manually Create a Sympathy parameter structure by writing a python expression which modifies the parameters variable using the sympathy parameter api (same class as nodes use to create their parameters).

Example:

parameters.set_integer(
    'number',
    description='Description of the number parameter.',
    value=1)
parameters.set_string(
    'string',
    description='Description of the string parameter.',
    value="1")
parameters.set_integer(
    'bounded_number',
    label='Bounded number',
    description='Description of the bounded_nummber parameter.',
    value=0,
    editor=synode.editors.bounded_lineedit_editor(
        0, 4))

In order to create editors and doing some other operations, synode is defined when the code is evaluated.

Optional input port, named arg, can be used in the code. Have a look at the Data type APIs to see what methods and attributes are available on the data type that you are working with.

The evaluation context contains parameters of type ParameterRoot, synode - which is the module obtained from sympathy.api.node, and optionally arg which is an instance of some sympathy datatype corresponding to the data type connected to the input port.

Definition

Input ports

arg 0 - 1, <a>

Input

Output ports

output json

Output

Configuration

Parameters: (code)

Python code that modifies the parameter structure.

Examples

Implementation

class node_create_json.CreateParameters[source]