On this page |
Overview ¶
Copernicus Python states are designed to run seamlessly in both the Compositing and Scene Viewers. You need to develop only a single Python state, as Houdini utilizes the same code in both viewer contexts for instantiation. To facilitate 2D drawing in both the Compositing and Scene Viewers, leverage the hou.Drawable2D class.
Define Copernicus Python states with the hou.copNodeTypeCategory() category. This designation lets the state instantiate and run in the Compositing viewer as a COP Python state and in the Scene viewer as a SOP Python state.
Note
You should author and thoroughly test your COP Python states initially in the Composite Viewer to ensure they function correctly when used in the Scene Viewer.
For information about implementing custom viewer states in Copernicus, see Writing custom viewer states in Python.
Limitations in the Compositing Viewer ¶
Warning
Though these limitations don’t apply when the COP Python state is running in the Scene viewer, account for these discrepancies when writing code intended to function correctly in both viewer environments.
COP Python states have the following limitations in the Compositing Viewer:
-
No HUD Info Panel support.
-
For Viewport selection, functionality including selectors and group lists is unavailable.
-
No scene geometry support, which means most Python state geometry-related functionality is off. This includes features such as geometry selection, SOP geometry verbs, hou.GeometryDrawable objects, and geometry access.
-
No Viewport flipbooking and snapping support.
-
Scene Viewer undo callbacks such as
beginStateUndo
andendStateUndo
aren’t available. -
Can’t display Viewport message prompts.