Tutorial Python Node: Attributes With Simple Data

This is a tutorial node. It creates both an input and output attribute of every simple supported data type. The values are modified in a simple way so that the compute modifies values. It is the same as node omni.graph.tutorials.SimpleData, except it is implemented in Python instead of C++.

Installation

To use this node enable omni.graph.tutorials in the Extension Manager.

Inputs

Name

Type

Descripton

Default

Simple Boolean Input (inputs:a_bool)

bool

This is an attribute of type boolean

True

A Constant Input (inputs:a_constant_input)

int

This is an input attribute whose value can be set but can only be connected as a source.

0

Metadata

outputOnly = 1

A Double (inputs:a_double)

double

This is an attribute of type 64 bit floating point

0

A Float (inputs:a_float)

float

This is an attribute of type 32 bit floating point

0

A Half (inputs:a_half)

half

This is an attribute of type 16 bit float

0.0

A Int (inputs:a_int)

int

This is an attribute of type 32 bit integer

0

A Int64 (inputs:a_int64)

int64

This is an attribute of type 64 bit integer

0

A Object Id (inputs:a_objectId)

objectId

This is an attribute of type objectId

0

A Path (inputs:a_path)

path

This is an attribute of type path

A String (inputs:a_string)

string

This is an attribute of type string

helloString

A Token (inputs:a_token)

token

This is an attribute of type interned string with fast comparison and hashing

helloToken

A Uchar (inputs:a_uchar)

uchar

This is an attribute of type unsigned 8 bit integer

0

A Uint (inputs:a_uint)

uint

This is an attribute of type unsigned 32 bit integer

0

A Uint64 (inputs:a_uint64)

uint64

This is an attribute of type unsigned 64 bit integer

0

Outputs

Name

Type

Descripton

Default

A A Bool Ui Name (outputs:a_a_boolUiName)

string

Computed attribute containing the UI name of input a_bool

None

A Bool (outputs:a_bool)

bool

This is a computed attribute of type boolean

None

A Double (outputs:a_double)

double

This is a computed attribute of type 64 bit floating point

None

A Float (outputs:a_float)

float

This is a computed attribute of type 32 bit floating point

None

A Half (outputs:a_half)

half

This is a computed attribute of type 16 bit float

None

A Int (outputs:a_int)

int

This is a computed attribute of type 32 bit integer

None

A Int64 (outputs:a_int64)

int64

This is a computed attribute of type 64 bit integer

None

A Node Type Ui Name (outputs:a_nodeTypeUiName)

string

Computed attribute containing the UI name of this node type

None

A Object Id (outputs:a_objectId)

objectId

This is a computed attribute of type objectId

None

A Path (outputs:a_path)

path

This is a computed attribute of type path

/Child

A String (outputs:a_string)

string

This is a computed attribute of type string

This string is empty

A Token (outputs:a_token)

token

This is a computed attribute of type interned string with fast comparison and hashing

None

A Uchar (outputs:a_uchar)

uchar

This is a computed attribute of type unsigned 8 bit integer

None

A Uint (outputs:a_uint)

uint

This is a computed attribute of type unsigned 32 bit integer

None

A Uint64 (outputs:a_uint64)

uint64

This is a computed attribute of type unsigned 64 bit integer

None

Metadata

Name

Value

Unique ID

omni.graph.tutorials.SimpleDataPy

Version

1

Extension

omni.graph.tutorials

Icon

ogn/icons/omni.graph.tutorials.SimpleDataPy.svg

Has State?

False

Implementation Language

Python

Default Memory Type

cpu

Generated Code Exclusions

None

uiName

Tutorial Python Node: Attributes With Simple Data

__iconColor

#FF00FF00

__iconBackgroundColor

#7FFF0000

__iconBorderColor

#FF0000FF

Categories

tutorials

Generated Class Name

OgnTutorialSimpleDataPyDatabase

Python Module

omni.graph.tutorials

See the accompanying tutorial and annotated code at Tutorial 10 - Simple Data Node in Python