Python Behavior Scripting#
Overview#
Python Behavior Scripting lets you add custom Behavior scripts to any prim. Right-click a prim in the Stage view or viewport and select Add > Python Scripting.
When a USD stage has a Python Scripting component on a prim, the application prompts you to approve script execution when you open the file.
This extension also adds features to the Content browser and the Property window for creating and editing Behavior scripts in your default text editor. The User Manual (sections below) covers these workflows.
Note
The set of Python Behavior Scripting extensions omni.behavior.scripting.bundle, omni.behavior.scripting.core, and omni.behavior.scripting.ui
are replacing the previous Python Scripting Component extension omni.kit.scripting. They should not be enabled at the same time.
Any omni.kit.scripting.BehaviorScript modules that were imported and used in previous scripts must be updated to the new module omni.behavior.scripting.core.BehaviorScript.
Warning
There is currently no limitation on what code can be executed by USD files that have Python Scripting components with assigned scripts. Open USD stages that contain scripts only when you trust the content author. Arbitrary code in script assets can run with your system credentials when you open the file in Kit.
Documentation#
To use the Omniverse Kit Scripting SDK in your Python Behavior Scripting scripts, refer to Kit Documentation.
You have an overview of Python Behavior Scripting and where to find setup and workflow details. To enable the extension and install an editor, refer to Python Behavior Scripting - Getting Started. For creating scripts, assigning components, and editing, refer to Python Behavior Scripting - User Manual.