omni.graph.scriptnode.ScriptNode i/o

Hey all,

Using the script node in issac sim, I have a questions about its functionality.

The snippet notes are as follows within the script box

"# Available variables:

db: og.Database The node interface, attributes are,

Use db.log_error, db.log_warning to report problems.

og: The OmniGraph module

Example code snippet:

input_value = db.inputs.my_input_attribute
db.outputs.my_output_attribute = -input_value

To see more examples, click on the Code Snippets button above."

I can also use “Issac read path file” to get the .py file I know this section works as it gives undeclared variable errors in console and add inputs and outputs on the node, setting attribute ie bool, float etc…

I’m trying to figure out how to pass variables in and out?

Does the “db.inputs.my_input_attribute” live inside my py file or is it in the script window once my variables are set in python. I sort of expected that if i named the output say its called “z” then the node would connect that variable to “db.outputs.z” or am I messing up the syntax. I get an error in the console informing me that variables are defined even though these functions run perfectly in VScode.

I’ve been over the docs and the learning curve is steep, I think being able to use the scriptnode would be seriously helpful to a lot of people. I just dont think I get the strategy with this node.

Any advice?


Hi @Sirens_uk. Here’s a bookmarked section in this tutorial that will hopefully clarify how to add inputs and outputs to the script node and how to use them in the code: Action Graph and USD Curves Extension Overview in Omniverse Create - YouTube

I will cover this question at the Developer Office Hour livestream tomorrow at 10am EDT if you want to ask follow-up questions live or you can catch the recording: Developer Office Hour - October 7, 2022 - NVIDIA Omniverse - YouTube

Thanks mati, got it working no idea why it didnt work before. Started a new file and renamed inputs and works fine now!

I’ll check out the live stream and see what else I can learn from the session ;)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.