compute_visibility

omni.fabric.commands.scripts.utils.compute_visibility(prim)

Computes the visibility state of a given Fabric prim.

This function checks the visibility attribute of the given prim and its ancestors in the USD scene hierarchy. If any ancestor’s visibility is set to invisible, the function will return ‘invisible’. Otherwise, it will return ‘inherited’.

Parameters

prim (usdrt.Usd.Prim) – The prim to compute visibility for.

Returns

The visibility state of the prim, either ‘invisible’ or ‘inherited’.

Return type

str