How to use python script to set bundle type value to some omnigraph node?

When I use:
import omni.graph.core as og

keys = og.Controller.Keys ,keys.CREATE_NODES:

keys.SET_VALUES: [
(“publishTransformTree.inputs:parentPrim”, self.stage.GetPrimAtPath(“/World”)),
(“publishTransformTree.inputs:targetPrims”, self.imulinkPrim,“bundle”),

or any other way, I just fail to set the value by Type (bundle),anyone help?

Hi @wuxu12. I’m looking into this for you.

Hi @wuxu12. The dev team says that we don’t really support setting a bundle as a value directly. You should use EXPOSE_PRIMS and then connect to the exposed bundle on the resulting ReadPrimBundle node.
Here’s an example:

import omni.graph.core as og

keys = og.Controller.Keys
        keys.CREATE_NODES: ("Inspector", "omni.graph.nodes.BundleInspector"),
        keys.CREATE_PRIMS: ("TestPrim", prim_definition),
        keys.EXPOSE_PRIMS: (og.Controller.PrimExposureType.AS_BUNDLE, "TestPrim", "TestBundle"),
        keys.CONNECT: ("TestBundle.outputs_primBundle", "Inspector.inputs:bundle"),
1 Like

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