Hide objects during rendering

How can I hide an object when I render an image in Isaac? I am currently using this code:

import omni.kit.commands

omni.kit.commands.execute("ToggleVisibilitySelectedPrims", selected_paths=["path/to/prim"])

I found it in the menu → Window → Commands.
Is there a better way to do it? What function is it actually calling under the hood?

Hi @federico.domeniconi. Yes, that is acceptable for showing/hiding prims. Under the hood, it’s just changing the visibility attribute value for the prim: Universal Scene Description: UsdGeomImageable Class Reference

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