omni::connect::core::getLightAttr

Defined in omni/connect/core/LightCompatibility.h

pxr::UsdAttribute omni::connect::core::getLightAttr(const pxr::UsdAttribute &defaultAttr, bool preferNewSchema = true)

Get the “correct” light attribute for a light that could have any combination of authored old and new UsdLux schema attributes.

The new attribute names have “inputs:” prepended to the names to make them connectable.

  • Light has only “intensity” authored — return “intensity” attribute

  • Light has only “inputs:intensity” authored — return “inputs:intensity” attribute

  • Light has both “inputs:intensity” and “intensity” authored — depends on the preferNewSchema argument

Parameters
  • defaultAttr – The attribute from the light schema for the attribute to be read: eg. UsdLuxRectLight::GetHeightAttr()

  • preferNewSchema – If true and both old and new UsdLux schema attributes are authored on a light prim, the new schema attribute is returned

Returns

The attribute from which the light value should be read