Functions

OMNI_LOG_DECLARE_CHANNEL(kClientLibraryChannel)

Declares (but does not enable) a secondary logging channel used by the Connect SDK to forward Omniverse Client Library logs.

OMNI_LOG_DECLARE_CHANNEL(kConnectCoreChannel)

Declares (but does not enable) the main logging channel used by the Connect SDK.

std::shared_ptr< carb::scripting::Object > omni::connect::core::acquirePythonObjectInstance(const std::string &function)

Execute a global python function which returns an instance of an object.

bool omni::connect::core::addDiffuseTextureToPbrMaterial(pxr::UsdShadeMaterial &material, const pxr::SdfAssetPath &texturePath)

Adds a diffuse texture to the PBR material.

bool omni::connect::core::addMetallicTextureToPbrMaterial(pxr::UsdShadeMaterial &material, const pxr::SdfAssetPath &texturePath)

Adds a metallic texture to the PBR material.

bool omni::connect::core::addNormalTextureToPbrMaterial(pxr::UsdShadeMaterial &material, const pxr::SdfAssetPath &texturePath)

Adds a normal texture to the PBR material.

bool omni::connect::core::addOpacityTextureToPbrMaterial(pxr::UsdShadeMaterial &material, const pxr::SdfAssetPath &texturePath)

Adds an opacity texture to the PBR material.

bool omni::connect::core::addOrmTextureToPbrMaterial(pxr::UsdShadeMaterial &material, const pxr::SdfAssetPath &texturePath)

Adds an ORM (occlusion, roughness, metallic) texture to the PBR material.

bool omni::connect::core::addRoughnessTextureToPbrMaterial(pxr::UsdShadeMaterial &material, const pxr::SdfAssetPath &texturePath)

Adds a roughness texture to the PBR material.

void omni::connect::core::bindMaterial(pxr::UsdPrim prim, const pxr::UsdShadeMaterial &material)

Binds a UsdShadeMaterial to a UsdPrim.

bool omni::connect::core::canRemovePrim(const pxr::UsdPrim &prim)

Determines if the given UsdPrim can be removed safely.

const char * omni::connect::core::carbAppPath()

Convenience to retrieve the Carbonite App Path.

const char * omni::connect::core::clientVersion()

Verify the expected Omniverse Client Library version is being loaded at runtime.

pxr::UsdShadeShader omni::connect::core::computeEffectiveMdlSurfaceShader(const pxr::UsdShadeMaterial &material)

Get the effective surface Shader of a Material for the MDL render context.

pxr::UsdShadeShader omni::connect::core::computeEffectivePreviewSurfaceShader(const pxr::UsdShadeMaterial &material)

Get the effective surface Shader of a Material for the universal render context.

bool omni::connect::core::copyPrim(const pxr::UsdPrim &prim, const pxr::SdfPath &destination)

Copy the given UsdPrim to a new location.

void omni::connect::core::createColorAttr(pxr::UsdLuxLight &prim, const pxr::GfVec3f &value, pxr::UsdTimeCode time=pxr::UsdTimeCode::Default())

Author the color attribute for a prim with UsdLuxLight[API] applied.

void omni::connect::core::createColorTemperatureAttr(pxr::UsdLuxLight &prim, float value, pxr::UsdTimeCode time=pxr::UsdTimeCode::Default())

Author the color temperature attribute for a prim with UsdLuxLight[API] applied.

void omni::connect::core::createDistantAngleAttr(pxr::UsdLuxDistantLight &prim, float value, pxr::UsdTimeCode time=pxr::UsdTimeCode::Default())

Author the distant angle attribute for a UsdLuxDistantLight prim.

void omni::connect::core::createDomeTextureFileAttr(pxr::UsdLuxDomeLight &prim, const pxr::SdfAssetPath &value, pxr::UsdTimeCode time=pxr::UsdTimeCode::Default())

Author the dome texture file attribute for a UsdLuxDomeLight prim.

void omni::connect::core::createDomeTextureFormatAttr(pxr::UsdLuxDomeLight &prim, const pxr::TfToken &value, pxr::UsdTimeCode time=pxr::UsdTimeCode::Default())

Author the dome texture format attribute for a UsdLuxDomeLight prim.

void omni::connect::core::createEnableColorTemperatureAttr(pxr::UsdLuxLight &prim, bool value, pxr::UsdTimeCode time=pxr::UsdTimeCode::Default())

Author the "enable color temperature" attribute for a prim with UsdLuxLight[API] applied.

void omni::connect::core::createIntensityAttr(pxr::UsdLuxLight &prim, float value, pxr::UsdTimeCode time=pxr::UsdTimeCode::Default())

Author the intensity attribute for a prim with UsdLuxLight[API] applied.

void omni::connect::core::createLightExtentAttr(pxr::UsdPrim prim, pxr::UsdTimeCode time=pxr::UsdTimeCode::Default())

Author the extent attribute for a UsdLuxCylinderLight, UsdLuxDiskLight, UsdLuxRectLight, UsdLuxSphereLight, or UsdLuxPortalLight.

bool omni::connect::core::createLiveSessionConfigFile(const std::string &uri, const LiveSessionConfigMap &config)

Create a Live Session configuration file.

pxr::UsdShadeMaterial omni::connect::core::createMaterial(pxr::UsdPrim parent, const std::string &name)

Create a UsdShadeMaterial as a child of the UsdPrim argument.

pxr::UsdShadeShader omni::connect::core::createMdlShader(pxr::UsdShadeMaterial &material, const std::string &name, const pxr::SdfAssetPath &mdlPath, const pxr::TfToken &module, bool connectMaterialOutputs=true)

Create a UsdShadeShader as a child of the UsdShadeMaterial argument with the specified MDL.

pxr::UsdShadeInput omni::connect::core::createMdlShaderInput(pxr::UsdShadeMaterial &material, const pxr::TfToken &name, const pxr::VtValue &value, const pxr::SdfValueTypeName &typeName, carb::cpp::optional< const ColorSpace > colorSpace=carb::cpp::nullopt)

Create an MDL shader input.

void omni::connect::core::createRectHeightAttr(pxr::UsdLuxRectLight &prim, float value, pxr::UsdTimeCode time=pxr::UsdTimeCode::Default())

Author the height attribute for a UsdLuxRectLight prim.

void omni::connect::core::createRectTextureFileAttr(pxr::UsdLuxRectLight &prim, const pxr::SdfAssetPath &value, pxr::UsdTimeCode time=pxr::UsdTimeCode::Default())

Author the texture file attribute for a UsdLuxRectLight prim.

void omni::connect::core::createRectWidthAttr(pxr::UsdLuxRectLight &prim, float value, pxr::UsdTimeCode time=pxr::UsdTimeCode::Default())

Author the width attribute for a UsdLuxRectLight prim.

void omni::connect::core::createShapingConeAngleAttr(pxr::UsdLuxShapingAPI &prim, float value, pxr::UsdTimeCode time=pxr::UsdTimeCode::Default())

Author the cone angle attribute for a prim with UsdLuxShapingAPI applied.

void omni::connect::core::createShapingConeSoftnessAttr(pxr::UsdLuxShapingAPI &prim, float value, pxr::UsdTimeCode time=pxr::UsdTimeCode::Default())

Author the cone softness attribute for a prim with UsdLuxShapingAPI applied.

void omni::connect::core::createSphereRadiusAttr(pxr::UsdLuxSphereLight &prim, float value, pxr::UsdTimeCode time=pxr::UsdTimeCode::Default())

Author the sphere radius attribute for a UsdLuxSphereLight prim.

bool omni::connect::core::createUriCheckpoint(const std::string &uri, const char *comment=nullptr)

Add a commented checkpoint for given uri in Nucleus server if the Nucleus server supports checkpoints.

pxr::UsdGeomCamera omni::connect::core::defineCamera(pxr::UsdPrim parent, const std::string &name, const pxr::GfCamera &cameraData)

Defines a basic 3d camera on the stage.

pxr::UsdGeomCamera omni::connect::core::defineCamera(pxr::UsdStagePtr stage, const pxr::SdfPath &path, const pxr::GfCamera &cameraData)

Defines a basic 3d camera on the stage.

pxr::UsdGeomBasisCurves omni::connect::core::defineCubicBasisCurves(pxr::UsdPrim parent, const std::string &name, const pxr::VtIntArray &curveVertexCounts, const pxr::VtVec3fArray &points, const pxr::TfToken &basis=pxr::UsdGeomTokens->bezier, const pxr::TfToken &wrap=pxr::UsdGeomTokens->nonperiodic, carb::cpp::optional< const FloatPrimvarData > widths=carb::cpp::nullopt, carb::cpp::optional< const Vec3fPrimvarData > normals=carb::cpp::nullopt, carb::cpp::optional< const Vec3fPrimvarData > displayColor=carb::cpp::nullopt, carb::cpp::optional< const FloatPrimvarData > displayOpacity=carb::cpp::nullopt)

Defines a batched Cubic UsdGeomBasisCurves prim on the stage.

pxr::UsdGeomBasisCurves omni::connect::core::defineCubicBasisCurves(pxr::UsdStagePtr stage, const pxr::SdfPath &path, const pxr::VtIntArray &curveVertexCounts, const pxr::VtVec3fArray &points, const pxr::TfToken &basis=pxr::UsdGeomTokens->bezier, const pxr::TfToken &wrap=pxr::UsdGeomTokens->nonperiodic, carb::cpp::optional< const FloatPrimvarData > widths=carb::cpp::nullopt, carb::cpp::optional< const Vec3fPrimvarData > normals=carb::cpp::nullopt, carb::cpp::optional< const Vec3fPrimvarData > displayColor=carb::cpp::nullopt, carb::cpp::optional< const FloatPrimvarData > displayOpacity=carb::cpp::nullopt)

Defines a batched Cubic UsdGeomBasisCurves prim on the stage.

pxr::UsdLuxDomeLight omni::connect::core::defineDomeLight(pxr::UsdStagePtr stage, const pxr::SdfPath &path, float intensity=1.0f, const char *texturePath=nullptr, const pxr::TfToken &textureFormat=pxr::UsdLuxTokens->automatic)

Creates a dome light with an optional texture.

pxr::UsdLuxDomeLight omni::connect::core::defineDomeLight(pxr::UsdPrim parent, const std::string &name, float intensity=1.0f, const char *texturePath=nullptr, const pxr::TfToken &textureFormat=pxr::UsdLuxTokens->automatic)

Creates a dome light with an optional texture.

pxr::UsdGeomBasisCurves omni::connect::core::defineLinearBasisCurves(pxr::UsdPrim parent, const std::string &name, const pxr::VtIntArray &curveVertexCounts, const pxr::VtVec3fArray &points, const pxr::TfToken &wrap=pxr::UsdGeomTokens->nonperiodic, carb::cpp::optional< const FloatPrimvarData > widths=carb::cpp::nullopt, carb::cpp::optional< const Vec3fPrimvarData > normals=carb::cpp::nullopt, carb::cpp::optional< const Vec3fPrimvarData > displayColor=carb::cpp::nullopt, carb::cpp::optional< const FloatPrimvarData > displayOpacity=carb::cpp::nullopt)

Defines a batched Linear UsdGeomBasisCurves prim on the stage.

pxr::UsdGeomBasisCurves omni::connect::core::defineLinearBasisCurves(pxr::UsdStagePtr stage, const pxr::SdfPath &path, const pxr::VtIntArray &curveVertexCounts, const pxr::VtVec3fArray &points, const pxr::TfToken &wrap=pxr::UsdGeomTokens->nonperiodic, carb::cpp::optional< const FloatPrimvarData > widths=carb::cpp::nullopt, carb::cpp::optional< const Vec3fPrimvarData > normals=carb::cpp::nullopt, carb::cpp::optional< const Vec3fPrimvarData > displayColor=carb::cpp::nullopt, carb::cpp::optional< const FloatPrimvarData > displayOpacity=carb::cpp::nullopt)

Defines a batched Linear UsdGeomBasisCurves prim on the stage.

pxr::UsdShadeMaterial omni::connect::core::defineOmniGlassMaterial(pxr::UsdPrim parent, const std::string &name, const pxr::GfVec3f &color, const float indexOfRefraction=1.491f)

Defines an OmniGlass UsdShadeMaterial interface that drives both an RTX render context and a UsdPreviewSurface context.

pxr::UsdShadeMaterial omni::connect::core::defineOmniGlassMaterial(pxr::UsdStagePtr stage, const pxr::SdfPath &path, const pxr::GfVec3f &color, const float indexOfRefraction=1.491f)

Defines an OmniGlass UsdShadeMaterial interface that drives both an RTX render context and a UsdPreviewSurface context.

pxr::UsdShadeMaterial omni::connect::core::defineOmniPbrMaterial(pxr::UsdStagePtr stage, const pxr::SdfPath &path, const pxr::GfVec3f &color, const float opacity=1.0f, const float roughness=0.5f, const float metallic=0.0f)

Defines an OmniPBR UsdShadeMaterial interface that drives both an RTX render context and a UsdPreviewSurface context.

pxr::UsdShadeMaterial omni::connect::core::defineOmniPbrMaterial(pxr::UsdPrim parent, const std::string &name, const pxr::GfVec3f &color, const float opacity=1.0f, const float roughness=0.5f, const float metallic=0.0f)

Defines an OmniPBR UsdShadeMaterial interface that drives both an RTX render context and a UsdPreviewSurface context.

pxr::UsdGeomPoints omni::connect::core::definePointCloud(pxr::UsdPrim parent, const std::string &name, const pxr::VtVec3fArray &points, carb::cpp::optional< const pxr::VtInt64Array > ids=carb::cpp::nullopt, carb::cpp::optional< const FloatPrimvarData > widths=carb::cpp::nullopt, carb::cpp::optional< const Vec3fPrimvarData > normals=carb::cpp::nullopt, carb::cpp::optional< const Vec3fPrimvarData > displayColor=carb::cpp::nullopt, carb::cpp::optional< const FloatPrimvarData > displayOpacity=carb::cpp::nullopt)

Defines a UsdGeomPoints prim on the stage.

pxr::UsdGeomPoints omni::connect::core::definePointCloud(pxr::UsdStagePtr stage, const pxr::SdfPath &path, const pxr::VtVec3fArray &points, carb::cpp::optional< const pxr::VtInt64Array > ids=carb::cpp::nullopt, carb::cpp::optional< const FloatPrimvarData > widths=carb::cpp::nullopt, carb::cpp::optional< const Vec3fPrimvarData > normals=carb::cpp::nullopt, carb::cpp::optional< const Vec3fPrimvarData > displayColor=carb::cpp::nullopt, carb::cpp::optional< const FloatPrimvarData > displayOpacity=carb::cpp::nullopt)

Defines a UsdGeomPoints prim on the stage.

pxr::UsdGeomMesh omni::connect::core::definePolyMesh(pxr::UsdStagePtr stage, const pxr::SdfPath &path, const pxr::VtIntArray &faceVertexCounts, const pxr::VtIntArray &faceVertexIndices, const pxr::VtVec3fArray &points, carb::cpp::optional< const Vec3fPrimvarData > normals=carb::cpp::nullopt, carb::cpp::optional< const Vec2fPrimvarData > uvs=carb::cpp::nullopt, carb::cpp::optional< const Vec3fPrimvarData > displayColor=carb::cpp::nullopt, carb::cpp::optional< const FloatPrimvarData > displayOpacity=carb::cpp::nullopt)

Defines a basic polygon mesh on the stage.

pxr::UsdGeomMesh omni::connect::core::definePolyMesh(pxr::UsdPrim parent, const std::string &name, const pxr::VtIntArray &faceVertexCounts, const pxr::VtIntArray &faceVertexIndices, const pxr::VtVec3fArray &points, carb::cpp::optional< const Vec3fPrimvarData > normals=carb::cpp::nullopt, carb::cpp::optional< const Vec2fPrimvarData > uvs=carb::cpp::nullopt, carb::cpp::optional< const Vec3fPrimvarData > displayColor=carb::cpp::nullopt, carb::cpp::optional< const FloatPrimvarData > displayOpacity=carb::cpp::nullopt)

Defines a basic polygon mesh on the stage.

pxr::UsdLuxRectLight omni::connect::core::defineRectLight(pxr::UsdPrim parent, const std::string &name, float width, float height, float intensity=1.0f, const char *texturePath=nullptr)

Creates a rectangular (rect) light with an optional texture.

pxr::UsdLuxRectLight omni::connect::core::defineRectLight(pxr::UsdStagePtr stage, const pxr::SdfPath &path, float width, float height, float intensity=1.0f, const char *texturePath=nullptr)

Creates a rectangular (rect) light with an optional texture.

pxr::UsdGeomXform omni::connect::core::defineXform(pxr::UsdStagePtr stage, const pxr::SdfPath &path, carb::cpp::optional< const pxr::GfTransform > transform=carb::cpp::nullopt)

Defines an xform on the stage.

pxr::UsdGeomXform omni::connect::core::defineXform(pxr::UsdPrim parent, const std::string &name, carb::cpp::optional< const pxr::GfTransform > transform=carb::cpp::nullopt)

Defines an xform on the stage.

bool omni::connect::core::doesUriExist(const std::string &uri)

Determine if the URI exists and is accessible via the Omniverse Client Library.

bool omni::connect::core::executePythonCommand(const std::string &command)

Execute a single python command.

int omni::connect::core::executePythonIntFunction(const std::string &function)

Execute a global python function which returns an int.

int omni::connect::core::executePythonIntMethod(carb::scripting::Object *instance, const std::string &method)

Given an instance of a python object, execute a method which returns an int.

std::string omni::connect::core::executePythonStringFunction(const std::string &function)

Execute a global python function which returns a string.

std::string omni::connect::core::executePythonStringMethod(carb::scripting::Object *instance, const std::string &method)

Given an instance of a python object, execute a method which returns a string.

const pxr::TfTokenVector & omni::connect::core::getDistantLightAttrNames()

Get a list of both current version and forward/reverse compatible UsdLuxDistantLight attribute names.

const pxr::TfTokenVector & omni::connect::core::getDomeLightAttrNames()

Get a list of both current version and forward/reverse compatible UsdLuxDomeLight attribute names.

const pxr::TfTokenVector & omni::connect::core::getLightAPIAttrNames()

Get a list of both current version and forward/reverse compatible UsdLuxLight[API] attribute names.

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.

LiveSessionConfigMap omni::connect::core::getLiveSessionConfig(const std::string &uri)

Get configuration values from an existing Live Session configuration file.

const pxr::TfTokenVector & omni::connect::core::getRectLightAttrNames()

Get a list of both current version and forward/reverse compatible UsdLuxRectLight attribute names.

const pxr::TfTokenVector & omni::connect::core::getShapingAPIAttrNames()

Get a list of both current version and forward/reverse compatible UsdLuxShapingAPI attribute names.

const pxr::TfTokenVector & omni::connect::core::getSphereLightAttrNames()

Get a list of both current version and forward/reverse compatible UsdLuxSphereLight attribute names.

std::string omni::connect::core::getUser(const std::string &uri)

Determine the current username on a given Omniverse server.

std::string omni::connect::core::getValidPropertyName(const std::string &name)

Produce a valid property name using the Bootstring algorithm.

pxr::TfTokenVector omni::connect::core::getValidPropertyNames(const std::vector< std::string > &names, const pxr::TfTokenVector &reservedNames={})

Take a vector of the preferred names and return a matching vector of valid and unique names.

bool omni::connect::core::isLight(const pxr::UsdPrim &prim)

Determines if a UsdPrim is a UsdLuxLight[API].

bool omni::connect::core::isLiveSessionVersionCompatible(const std::string &uri)

Check that the session config version is compatible.

bool omni::connect::core::isLocalUri(const std::string &uri)

Determine the URI refers to a local file rather than on an Omniverse server.

bool omni::connect::core::isOmniUri(const std::string &uri)

Determine the URI points to an Omniverse server.

bool omni::connect::core::isUriWritable(const std::string &uri)

Determine if the user has write access to the file or directory identified by the URI.

pxr::GfVec3f omni::connect::core::linearToSrgb(const pxr::GfVec3f &color)

Translate a linear color value to sRGB color space.

bool omni::connect::core::loadCarbPlugin(const std::string &name, const std::vector< std::string > &extraSearchPaths={})

Load a single Carbonite plugin.

bool omni::connect::core::registerOmniUsdResolverPlugin()

Register the Omniverse USD Resolver plugin from the configured directory path.

bool omni::connect::core::removeOrDeactivatePrim(pxr::UsdPrim prim)

Removes the given UsdPrim if it can be removed safely, otherwise deactivates it.

bool omni::connect::core::renamePrim(pxr::UsdPrim prim, const pxr::TfToken &name)

Rename the given UsdPrim if it can be renamed safely.

pxr::GfVec3f omni::connect::core::sRgbToLinear(const pxr::GfVec3f &color)

Translate an sRGB color value to linear color space.

bool omni::connect::core::setLiveSessionConfigValues(const std::string &uri, const LiveSessionConfigMap &config)

Set configuration values in an existing Live Session configuration file.

bool omni::connect::core::startupPython()

Load Carbonite's scripting-python plugin and initialize the python interpreter.

const char * omni::connect::core::version()

Verify the expected Omniverse Connect SDK is being loaded at runtime.

bool omni::connect::core::withNucleus()

Verify whether Nucleus support is available via the Omniverse Client Library.