omni/connect/core/LightCompatibility.h
File members: omni/connect/core/LightCompatibility.h
// SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: LicenseRef-NvidiaProprietary
//
// NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
// property and proprietary rights in and to this material, related
// documentation and any modifications thereto. Any use, reproduction,
// disclosure or distribution of this material and related documentation
// without an express license agreement from NVIDIA CORPORATION or
// its affiliates is strictly prohibited.
#pragma once
#include "Api.h"
#include <pxr/base/tf/token.h>
#include <pxr/usd/usd/attribute.h>
#include <pxr/usd/usd/timeCode.h>
#include <pxr/usd/usdLux/distantLight.h>
#include <pxr/usd/usdLux/domeLight.h>
#include <pxr/usd/usdLux/rectLight.h>
#include <pxr/usd/usdLux/shapingAPI.h>
#include <pxr/usd/usdLux/sphereLight.h>
namespace omni::connect::core
{
OMNICONNECTCORE_API pxr::UsdAttribute getLightAttr(const pxr::UsdAttribute& defaultAttr, bool preferNewSchema = true);
OMNICONNECTCORE_API const pxr::TfTokenVector& getLightAPIAttrNames();
OMNICONNECTCORE_API const pxr::TfTokenVector& getDistantLightAttrNames();
OMNICONNECTCORE_API const pxr::TfTokenVector& getDomeLightAttrNames();
OMNICONNECTCORE_API const pxr::TfTokenVector& getRectLightAttrNames();
OMNICONNECTCORE_API const pxr::TfTokenVector& getShapingAPIAttrNames();
OMNICONNECTCORE_API const pxr::TfTokenVector& getSphereLightAttrNames();
OMNICONNECTCORE_API bool isLight(const pxr::UsdPrim& prim);
OMNICONNECTCORE_API void createDistantAngleAttr(pxr::UsdLuxDistantLight& prim, float value, pxr::UsdTimeCode time = pxr::UsdTimeCode::Default());
OMNICONNECTCORE_API void createDomeTextureFileAttr(
pxr::UsdLuxDomeLight& prim,
const pxr::SdfAssetPath& value,
pxr::UsdTimeCode time = pxr::UsdTimeCode::Default()
);
OMNICONNECTCORE_API void createDomeTextureFormatAttr(
pxr::UsdLuxDomeLight& prim,
const pxr::TfToken& value,
pxr::UsdTimeCode time = pxr::UsdTimeCode::Default()
);
OMNICONNECTCORE_API void createSphereRadiusAttr(pxr::UsdLuxSphereLight& prim, float value, pxr::UsdTimeCode time = pxr::UsdTimeCode::Default());
OMNICONNECTCORE_API void createShapingConeAngleAttr(pxr::UsdLuxShapingAPI& prim, float value, pxr::UsdTimeCode time = pxr::UsdTimeCode::Default());
OMNICONNECTCORE_API void createShapingConeSoftnessAttr(pxr::UsdLuxShapingAPI& prim, float value, pxr::UsdTimeCode time = pxr::UsdTimeCode::Default());
OMNICONNECTCORE_API void createRectWidthAttr(pxr::UsdLuxRectLight& prim, float value, pxr::UsdTimeCode time = pxr::UsdTimeCode::Default());
OMNICONNECTCORE_API void createRectHeightAttr(pxr::UsdLuxRectLight& prim, float value, pxr::UsdTimeCode time = pxr::UsdTimeCode::Default());
OMNICONNECTCORE_API void createRectTextureFileAttr(
pxr::UsdLuxRectLight& prim,
const pxr::SdfAssetPath& value,
pxr::UsdTimeCode time = pxr::UsdTimeCode::Default()
);
#if PXR_VERSION >= 2111
OMNICONNECTCORE_API void createEnableColorTemperatureAttr(pxr::UsdLuxLightAPI& prim, bool value, pxr::UsdTimeCode time = pxr::UsdTimeCode::Default());
#else
OMNICONNECTCORE_API void createEnableColorTemperatureAttr(pxr::UsdLuxLight& prim, bool value, pxr::UsdTimeCode time = pxr::UsdTimeCode::Default());
#endif // PXR_VERSION >= 2111
#if PXR_VERSION >= 2111
OMNICONNECTCORE_API void createColorTemperatureAttr(pxr::UsdLuxLightAPI& prim, float value, pxr::UsdTimeCode time = pxr::UsdTimeCode::Default());
#else
OMNICONNECTCORE_API void createColorTemperatureAttr(pxr::UsdLuxLight& prim, float value, pxr::UsdTimeCode time = pxr::UsdTimeCode::Default());
#endif // PXR_VERSION >= 2111
#if PXR_VERSION >= 2111
OMNICONNECTCORE_API void createColorAttr(pxr::UsdLuxLightAPI& prim, const pxr::GfVec3f& value, pxr::UsdTimeCode time = pxr::UsdTimeCode::Default());
#else
OMNICONNECTCORE_API void createColorAttr(pxr::UsdLuxLight& prim, const pxr::GfVec3f& value, pxr::UsdTimeCode time = pxr::UsdTimeCode::Default());
#endif // PXR_VERSION >= 2111
OMNICONNECTCORE_API void createLightExtentAttr(pxr::UsdPrim prim, pxr::UsdTimeCode time = pxr::UsdTimeCode::Default());
#if PXR_VERSION >= 2111
OMNICONNECTCORE_API void createIntensityAttr(pxr::UsdLuxLightAPI& prim, float value, pxr::UsdTimeCode time = pxr::UsdTimeCode::Default());
#else
OMNICONNECTCORE_API void createIntensityAttr(pxr::UsdLuxLight& prim, float value, pxr::UsdTimeCode time = pxr::UsdTimeCode::Default());
#endif // PXR_VERSION >= 2111
} // namespace omni::connect::core