### Instancer Selection and Scene Prim Paths Source: https://openusd.org/release/api/instance_adapter_8h_source Helper structures and functions related to populating instance selections and getting scene prim paths. ```APIDOC ## Instancer Selection and Scene Prim Paths ### Description Internal helper structures used for managing instance selections and retrieving scene prim paths related to instancers. ### Structures #### `_PopulateInstanceSelectionFn` - **Description**: Function object for populating instance selections. #### `_GetScenePrimPathsFn` - **Description**: Function object for getting scene prim paths. #### `_GetInstanceCategoriesFn` - **Description**: Function object for getting instance categories. ### Example Scenario Consider the following USD structure: ```usd /Root Instance_A (prototype: /__Prototype_1) Instance_B (prototype: /__Prototype_1) /__Prototype_1 AnotherInstance_A (prototype: /__Prototype_2) /__Prototype_2 ``` In this scenario, `/__Prototype_2` has only one associated instance in the Usd scenegraph: `/__Prototype_1/AnotherInstance_A`. However, imaging might need to draw additional instances based on render-time logic. ``` -------------------------------- ### Get Start Layer from UsdResolveTarget Source: https://openusd.org/release/api/resolve_target_8h_source Retrieves the start layer from a UsdResolveTarget. This layer is the starting point for value resolution. ```cpp USD_API SdfLayerHandle GetStartLayer() const Returns the layer in the layer stack of the start node that value resolution with this resolve target will start at. ``` -------------------------------- ### UsdImagingInstancerContext Class Source: https://openusd.org/release/api/instancer_context_8h Provides context for instancer prim adapters, including information about the instancer and instance prim. ```APIDOC ## Class: UsdImagingInstancerContext ### Description Object used by instancer prim adapters to pass along context about the instancer and instance prim to prototype prim adapters. ### Definition File: instancerContext.h, Line: 27 ### Class Members #### Member Variables - **childName** (TfToken) - The name of the child prim, typically used for prototypes. - **instanceDrawMode** (TfToken) - The draw mode bound to the instance prim being processed. - **instanceInheritablePurpose** (TfToken) - Inheritable purpose of the instance prim. - **instancerAdapter** (UsdImagingPrimAdapterSharedPtr) - The instancer's prim Adapter. Useful when an adapter is needed, but the default adapter may be overridden for the sake of instancing. - **instancerCachePath** (SdfPath) - The cachePath of the instancer. - **instancerMaterialUsdPath** (SdfPath) - The USD path to the material bound to the instance prim being processed. ``` -------------------------------- ### Get Guide Visibility Attribute Source: https://openusd.org/release/api/class_usd_geom_visibility_a_p_i Retrieves the UsdAttribute that controls visibility for geometry with the 'guide' purpose. This is essential for managing how guide geometry is rendered or processed. ```cpp USDGEOM_API UsdAttribute GetGuideVisibilityAttr () const ``` -------------------------------- ### Get Guide Visibility Attribute Source: https://openusd.org/release/api/visibility_a_p_i_8h_source Retrieves the attribute responsible for visibility opinions for geometry with the 'guide' purpose. This is a method of the UsdGeomVisibilityAPI. ```cpp USDGEOM_API UsdAttribute GetGuideVisibilityAttr() const; ``` -------------------------------- ### UsdImagingInstanceablePrimAdapter Class Documentation Source: https://openusd.org/release/api/instanceable_prim_adapter_8h_source Provides details about the UsdImagingInstanceablePrimAdapter class, its inheritance, and key methods. ```APIDOC ## UsdImagingInstanceablePrimAdapter ### Description An abstract adapter class for prims that are instanceable. This class handles the logic for adapting instanceable prims for Hydra. ### Class Hierarchy - `UsdImagingPrimAdapter` - `UsdImagingInstanceablePrimAdapter` ### Methods #### `ResolveCachePath` ##### Description Given the USD path for a prim of this adapter's type, returns the prim's Hydra cache path. ##### Method `virtual SdfPath ResolveCachePath(const SdfPath& usdPath, const UsdImagingInstancerContext* instancerContext = nullptr) const override` ##### Parameters - **usdPath** (`SdfPath`) - The USD path of the prim. - **instancerContext** (`UsdImagingInstancerContext*`) - Optional context about the instancer. ##### Returns (`SdfPath`) - The Hydra cache path for the prim. #### `ResolveProxyPrimPath` ##### Description Given the cachePath and instancerContext, resolve the proxy prim path. ##### Method `SdfPath ResolveProxyPrimPath(const SdfPath& cachePath, const UsdImagingInstancerContext* instancerContext = nullptr) const` ##### Parameters - **cachePath** (`SdfPath`) - The Hydra cache path. - **instancerContext** (`UsdImagingInstancerContext*`) - Optional context about the instancer. ##### Returns (`SdfPath`) - The proxy prim path. ### Related Classes - **`UsdImagingPrimAdapter`**: Base class for all PrimAdapters. - **`UsdImagingInstanceAdapter`**: Delegate support for instanced prims. - **`UsdImagingPointInstancerAdapter`**: Delegate support for UsdGeomPointInstancer. - **`UsdImagingInstancerContext`**: Object used by instancer prim adapters to pass context. - **`SdfPath`**: A path value used to locate objects in layers or scenegraphs. ``` -------------------------------- ### Get Guide Visibility Attribute Source: https://openusd.org/release/api/class_usd_geom_visibility_a_p_i Retrieves the 'guideVisibility' attribute from a prim. This attribute controls visibility for geometry with the purpose 'guide'. ```APIDOC ## GET /websites/openusd_release_api/GetGuideVisibilityAttr ### Description Retrieves the 'guideVisibility' attribute. This attribute controls visibility for geometry with the purpose 'guide'. It is a uniform, tri-state attribute. ### Method GET ### Endpoint /websites/openusd_release_api/GetGuideVisibilityAttr ### Parameters (No parameters are required for this operation as it operates on the context of the current prim or schema object.) ### Request Body (Not applicable for this operation.) ### Response #### Success Response (200) - **UsdAttribute** (object) - An object representing the guideVisibility attribute. #### Response Example (The response would typically be a UsdAttribute object. Specific JSON structure depends on the implementation.) ``` -------------------------------- ### UsdImagingInstanceAdapter - Core Methods Source: https://openusd.org/release/api/instance_adapter_8h_source This section covers the primary methods of the UsdImagingInstanceAdapter for sampling primvars, retrieving instancer prototypes, checking visibility, and sampling transforms. ```APIDOC ## UsdImagingInstanceAdapter API ### SamplePrimvar Sample the primvar for the given prim. ### Method GET ### Endpoint /websites/openusd_release_api/UsdImagingInstanceAdapter ### Parameters #### Query Parameters - **usdPrim** (UsdPrim) - Required - The USD prim to sample. - **cachePath** (SdfPath) - Required - The cache path of the prim. - **key** (TfToken) - Required - The key of the primvar to sample. - **time** (UsdTimeCode) - Required - The timecode for sampling. - **maxNumSamples** (size_t) - Required - The maximum number of samples to retrieve. - **sampleTimes** (float*) - Required - Pointer to an array for sample times. - **sampleValues** (VtValue*) - Required - Pointer to an array for sample values. - **sampleIndices** (VtIntArray*) - Required - Pointer to an array for sample indices. ### Response #### Success Response (200) - **size_t** - The number of samples retrieved. ### SampleInstancerTransform Sample the instancer transform for the given prim. ### Method GET ### Endpoint /websites/openusd_release_api/UsdImagingInstanceAdapter ### Parameters #### Query Parameters - **instancerPrim** (UsdPrim) - Required - The instancer prim. - **instancerPath** (SdfPath) - Required - The path to the instancer. - **time** (UsdTimeCode) - Required - The timecode for sampling. - **maxSampleCount** (size_t) - Required - The maximum number of samples. - **sampleTimes** (float*) - Required - Pointer to an array for sample times. - **sampleValues** (GfMatrix4d*) - Required - Pointer to an array for sample values. ### Response #### Success Response (200) - **size_t** - The number of samples retrieved. ### GetInstancerPrototypes Return the list of known prototypes of this prim. ### Method GET ### Endpoint /websites/openusd_release_api/UsdImagingInstanceAdapter ### Parameters #### Query Parameters - **usdPrim** (UsdPrim) - Required - The USD prim. - **cachePath** (SdfPath) - Required - The cache path of the prim. ### Response #### Success Response (200) - **SdfPathVector** - A vector of SdfPaths representing the prototypes. ### GetVisible Returns true if the given prim is visible, taking into account inherited visibility values. ### Method GET ### Endpoint /websites/openusd_release_api/UsdImagingInstanceAdapter ### Parameters #### Query Parameters - **usdPrim** (UsdPrim) - Required - The USD prim. - **cachePath** (SdfPath) - Required - The cache path of the prim. - **time** (UsdTimeCode) - Required - The timecode to check visibility. ### Response #### Success Response (200) - **bool** - True if the prim is visible, false otherwise. ### GetDoubleSided Reads double-sided from the given prim. If not authored, returns false. ### Method GET ### Endpoint /websites/openusd_release_api/UsdImagingInstanceAdapter ### Parameters #### Query Parameters - **prim** (UsdPrim) - Required - The USD prim. - **cachePath** (SdfPath) - Required - The cache path of the prim. - **time** (UsdTimeCode) - Required - The timecode to check double-sidedness. ### Response #### Success Response (200) - **bool** - True if the prim is double-sided, false otherwise. ### GetInstanceCategories Return an array of the categories used by each instance. ### Method GET ### Endpoint /websites/openusd_release_api/UsdImagingInstanceAdapter ### Parameters #### Query Parameters - **prim** (UsdPrim) - Required - The USD prim. ### Response #### Success Response (200) - **std::vector< VtArray< TfToken > >** - An array of token arrays representing instance categories. ### GetScenePrimPath Retrieves the scene prim path for a given cache path and instance index. ### Method GET ### Endpoint /websites/openusd_release_api/UsdImagingInstanceAdapter ### Parameters #### Query Parameters - **cachePath** (SdfPath) - Required - The cache path. - **instanceIndex** (int) - Required - The index of the instance. - **instancerContext** (HdInstancerContext*) - Optional - The instancer context. ### Response #### Success Response (200) - **SdfPath** - The scene prim path. ### GetRelativeInstancerTransform Retrieves the relative instancer transform. ### Method GET ### Endpoint /websites/openusd_release_api/UsdImagingInstanceAdapter ### Parameters #### Query Parameters - None explicitly defined in the provided text, but implies a context-dependent retrieval. ### Response #### Success Response (200) - The specific return type is not detailed in the provided text but would typically be a transformation matrix (e.g., GfMatrix4d). ``` -------------------------------- ### Get Start Node from UsdResolveTarget Source: https://openusd.org/release/api/resolve_target_8h_source Retrieves the start node from a UsdResolveTarget. This node is the beginning of the value resolution process. ```cpp USD_API PcpNodeRef GetStartNode() const Returns the node that value resolution with this resolve target will start at. ``` -------------------------------- ### UsdRenderSettingsBase Class Overview Source: https://openusd.org/release/api/settings_base_8h_source Provides an overview of the UsdRenderSettingsBase class, its schema kind, and constructors. ```APIDOC ## UsdRenderSettingsBase Class ### Description Represents the base schema for render settings in OpenUSD. It is an abstract typed schema and cannot be instantiated directly. ### Schema Kind `UsdSchemaKind::AbstractTyped` ### Constructors - `UsdRenderSettingsBase(const UsdPrim& prim=UsdPrim())`: Constructor for creating an instance from a UsdPrim. - `UsdRenderSettingsBase(const UsdSchemaBase& schemaObj)`: Constructor for creating an instance from a UsdSchemaBase object. ``` -------------------------------- ### SamplePrimvar API Source: https://openusd.org/release/api/class_usd_imaging_sphere_light_adapter Sample the primvar for the given prim. ```APIDOC ## SamplePrimvar ### Description Sample the primvar for the given prim. ### Method Not applicable (this appears to be a C++ function signature). ### Endpoint Not applicable. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) Returns the number of samples. #### Response Example ```json { "numberOfSamples": 10 } ``` ``` -------------------------------- ### Get Skeleton Guide Data - UsdSkelImagingDataSourceResolvedSkeletonPrim Source: https://openusd.org/release/api/data_source_resolved_skeleton_prim_8h_source Returns UsdSkelImagingSkelGuideData, used for computing the skeleton guide as a mesh. This includes data for points and topology. ```cpp std::shared_ptr< UsdSkelImagingSkelGuideData > GetSkelGuideData() Some of the (non-animated) data to compute the points and topology for the mesh guide. **Definition:** dataSourceResolvedSkeletonPrim.h:71 ``` -------------------------------- ### Get Starts Asleep Attribute - C++ Source: https://openusd.org/release/api/rigid_body_a_p_i_8h_source Retrieves the UsdAttribute that determines if a rigid body starts in a sleeping state. This const method is part of the UsdPhysicsRigidBodyAPI. ```cpp USDPHYSICS_API UsdAttribute GetStartsAsleepAttr() const; ``` -------------------------------- ### Instancer Utilities Source: https://openusd.org/release/api/class_usd_imaging_plugin_light_adapter Utilities for handling instancer data. ```APIDOC ## GET /websites/openusd_release_api/instancer/perPrototypeIndices ### Description Computes the per-prototype instance indices for a UsdGeomPointInstancer. ### Method GET ### Endpoint /websites/openusd_release_api/instancer/perPrototypeIndices ### Parameters #### Query Parameters - **primPath** (UsdPrim) - Required - The UsdGeomPointInstancer prim. - **time** (UsdTimeCode) - Optional - The time at which to compute the indices. Defaults to current time. ### Request Example ```json { "primPath": "/World/Instancer", "time": 1.0 } ``` ### Response #### Success Response (200) - **perPrototypeIndices** (VtArray< VtIntArray >) - An array of integer arrays, where each inner array contains indices for a specific prototype. #### Response Example ```json { "perPrototypeIndices": [ [0, 3, 5], [1, 2, 4] ] } ``` ``` -------------------------------- ### Get a const reverse iterator to the start of a const array Source: https://openusd.org/release/api/group___s_t_l___a_p_i Returns a const reverse iterator pointing to the start of the array. Defined in array.h. ```cpp inline const_reverse_iterator rend() const ``` -------------------------------- ### Initialization and Support Functions Source: https://openusd.org/release/api/class_usd_imaging_tet_mesh_adapter Functions for populating the render index and checking adapter support. ```APIDOC ## Initialization and Support Functions ### Populate Called to populate the RenderIndex for a UsdPrim. ### Method POST (conceptual, as this is a C++ function) ### Endpoint N/A (C++ function) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body - **prim** (UsdPrim) - The UsdPrim to populate. - **index** (UsdImagingIndexProxy *) - The render index proxy. - **instancerContext** (const UsdImagingInstancerContext *) - Optional instancer context. ### Request Example N/A ### Response #### Success Response (200) - **SdfPath** - The path of the prim in the render index. #### Response Example ```json "/World/Set/Model/Geom" ``` --- ### IsSupported Returns true if the adapter can be populated into the target index. ### Method GET (conceptual, as this is a C++ function) ### Endpoint N/A (C++ function) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) - **bool** - True if the adapter is supported, false otherwise. #### Response Example ```json true ``` ``` -------------------------------- ### UsdImagingPluginLightAdapter Class Methods Source: https://openusd.org/release/api/plugin_light_adapter_8h_source This section details the public methods of the UsdImagingPluginLightAdapter class, including those for getting imaging subprims, populating the render index, and checking support. ```APIDOC ## UsdImagingPluginLightAdapter API Endpoints ### Description This section outlines the key methods of the `UsdImagingPluginLightAdapter` class used for imaging plugin lights. ### Methods #### `GetImagingSubprims` * **Description**: Returns the imaging subprims for a given prim. * **Method**: `virtual TfTokenVector GetImagingSubprims(UsdPrim const& prim) override` * **Endpoint**: Not Applicable (Class Method) #### `GetImagingSubprimType` * **Description**: Returns the imaging subprim type for a given prim and subprim. * **Method**: `virtual TfToken GetImagingSubprimType(UsdPrim const& prim, TfToken const& subprim) override` * **Endpoint**: Not Applicable (Class Method) #### `Populate` * **Description**: Populates the RenderIndex for the given prim. This is the primary method for integrating lights into the imaging pipeline. * **Method**: `virtual SdfPath Populate(UsdPrim const& prim, UsdImagingIndexProxy* index, UsdImagingInstancerContext const* instancerContext = NULL) override` * **Endpoint**: Not Applicable (Class Method) * **Parameters**: * `prim` (UsdPrim) - The UsdPrim to populate. * `index` (UsdImagingIndexProxy*) - The index proxy to populate. * `instancerContext` (UsdImagingInstancerContext*) - Optional context for instancers. #### `IsSupported` * **Description**: Checks if the adapter can be populated into the target index. * **Method**: `virtual bool IsSupported(UsdImagingIndexProxy const* index) const override` * **Endpoint**: Not Applicable (Class Method) * **Parameters**: * `index` (UsdImagingIndexProxy*) - The index proxy to check against. #### `_RemovePrim` * **Description**: Protected method to remove a prim from the cache. * **Method**: `void _RemovePrim(SdfPath const& cachePath, UsdImagingIndexProxy* index) final` * **Endpoint**: Not Applicable (Class Method) * **Parameters**: * `cachePath` (SdfPath) - The path of the prim to remove. * `index` (UsdImagingIndexProxy*) - The index proxy from which to remove. ### Request Example No direct request examples as these are class methods. ### Response * **Success Response (Populate)**: `SdfPath` - The path of the populated prim. * **Success Response (IsSupported)**: `bool` - True if supported, false otherwise. * **Success Response (GetImagingSubprims)**: `TfTokenVector` - A vector of subprim tokens. * **Success Response (GetImagingSubprimType)**: `TfToken` - The subprim type token. ### Response Example No direct response examples as these are class methods. ``` -------------------------------- ### UsdClipsAPI: Get Clip Template Start Time Source: https://openusd.org/release/api/clips_a_p_i_8h_source Retrieves the start time for the clip template. This is an overloaded member function for convenience and is declared in 'usdClipsAPI.h'. It returns a boolean indicating success and outputs the start time to a double. ```cpp USD_API bool GetClipTemplateStartTime(double *clipTemplateStartTime) const ``` -------------------------------- ### Scene Management Source: https://openusd.org/release/api/class_usd_imaging_plugin_light_adapter Utilities for managing scene prim paths and selection. ```APIDOC ## GET /websites/openusd_release_api/scene/primPaths ### Description Retrieves the scene prim paths for a given cache path and a list of instance indices. ### Method GET ### Endpoint /websites/openusd_release_api/scene/primPaths ### Parameters #### Query Parameters - **cachePath** (SdfPath) - Required - The cache path. - **instanceIndices** (std::vector) - Required - A vector of instance indices. - **instancerCtxs** (std::vector *) - Output vector for instancer contexts. ### Request Example ```json { "cachePath": "/World/Instancer", "instanceIndices": [0, 1, 2] } ``` ### Response #### Success Response (200) - **scenePrimPaths** (SdfPathVector) - A vector of scene prim paths. - **instancerCtxs** (std::vector) - The populated instancer contexts. #### Response Example ```json { "scenePrimPaths": [ "/World/Instancer/instance_0", "/World/Instancer/instance_1", "/World/Instancer/instance_2" ], "instancerCtxs": [...] } ``` ``` ```APIDOC ## POST /websites/openusd_release_api/selection/populate ### Description Populates the selection with highlighted prims based on the provided parameters. ### Method POST ### Endpoint /websites/openusd_release_api/selection/populate ### Parameters #### Request Body - **highlightMode** (HdSelection::HighlightMode) - Required - The highlight mode for selection. - **cachePath** (SdfPath) - Required - The cache path of the prim. - **usdPrim** (UsdPrim) - Required - The UsdPrim object. - **hydraInstanceIndex** (int) - Required - The Hydra instance index. - **parentInstanceIndices** (VtIntArray) - Required - Array of parent instance indices. - **result** (HdSelectionSharedPtr) - Shared pointer to the selection result. ### Request Example ```json { "highlightMode": "select", "cachePath": "/World/Geom/Mesh", "usdPrim": { ... }, "hydraInstanceIndex": 0, "parentInstanceIndices": [0, 1], "result": { ... } } ``` ### Response #### Success Response (200) - **success** (bool) - True if the selection was populated successfully, false otherwise. #### Response Example ```json { "success": true } ``` ``` -------------------------------- ### Get Start Tick Time for Interval Measurement Source: https://openusd.org/release/api/stopwatch_8h_source Retrieves a 'start' tick time value used for measuring time intervals. This should be paired with ArchGetStopTickTime() to determine the duration. ```C++ uint64_t ArchGetStartTickTime() ``` -------------------------------- ### UsdImagingInstanceAdapter Methods Source: https://openusd.org/release/api/instance_adapter_8h_source This section covers various methods of the UsdImagingInstanceAdapter class, including those for getting transforms, topology, cull styles, extents, subdiv tags, and more. ```APIDOC ## UsdImagingInstanceAdapter::GetRelativeInstancerTransform ### Description Returns the transform of protoInstancerPath relative to instancerPath. ### Method GET (Conceptual - this is a C++ method, not a direct HTTP endpoint) ### Endpoint N/A (C++ Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```cpp // C++ example GfMatrix4d relativeTransform = adapter.GetRelativeInstancerTransform(parentInstancerPath, instancerPath, time); ``` ### Response #### Success Response (200) - **relativeTransform** (GfMatrix4d) - The transform matrix of the instancer. #### Response Example ```cpp // C++ example return value GfMatrix4d ``` ## UsdImagingInstanceAdapter::GetTopology ### Description Gets the topology object of a specific Usd prim. ### Method GET (Conceptual - this is a C++ method, not a direct HTTP endpoint) ### Endpoint N/A (C++ Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```cpp // C++ example VtValue topology = adapter.GetTopology(prim, cachePath, time); ``` ### Response #### Success Response (200) - **topology** (VtValue) - The topology object. #### Response Example ```cpp // C++ example return value VtValue ``` ## UsdImagingInstanceAdapter::ProcessPrimResync ### Description When a PrimResync event occurs, the prim may have been deleted entirely; adapter plug-ins should over... ### Method POST (Conceptual - this is a C++ method, not a direct HTTP endpoint) ### Endpoint N/A (C++ Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```cpp // C++ example adapter.ProcessPrimResync(cachePath, index); ``` ### Response #### Success Response (200) None (void return type) #### Response Example ```cpp // C++ example return value void ``` ## UsdImagingInstanceAdapter::Populate ### Description Called to populate the RenderIndex for this UsdPrim. ### Method POST (Conceptual - this is a C++ method, not a direct HTTP endpoint) ### Endpoint N/A (C++ Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```cpp // C++ example SdfPath populatedPath = adapter.Populate(prim, index, instancerContext); ``` ### Response #### Success Response (200) - **populatedPath** (SdfPath) - The path of the populated prim. #### Response Example ```cpp // C++ example return value SdfPath ``` ## UsdImagingInstanceAdapter::GetCullStyle ### Description Gets the cullstyle of a specific path in the scene graph. ### Method GET (Conceptual - this is a C++ method, not a direct HTTP endpoint) ### Endpoint N/A (C++ Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```cpp // C++ example HdCullStyle cullStyle = adapter.GetCullStyle(prim, cachePath, time); ``` ### Response #### Success Response (200) - **cullStyle** (HdCullStyle) - The cull style of the prim. #### Response Example ```cpp // C++ example return value HdCullStyle ``` ## UsdImagingInstanceAdapter::UpdateForTime ### Description Populates the cache for the given prim, time and requestedBits. ### Method POST (Conceptual - this is a C++ method, not a direct HTTP endpoint) ### Endpoint N/A (C++ Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```cpp // C++ example adapter.UpdateForTime(prim, cachePath, time, requestedBits, instancerContext); ``` ### Response #### Success Response (200) None (void return type) #### Response Example ```cpp // C++ example return value void ``` ## UsdImagingInstanceAdapter::GetExtent ### Description Reads the extent from the given prim. ### Method GET (Conceptual - this is a C++ method, not a direct HTTP endpoint) ### Endpoint N/A (C++ Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```cpp // C++ example GfRange3d extent = adapter.GetExtent(usdPrim, cachePath, time); ``` ### Response #### Success Response (200) - **extent** (GfRange3d) - The extent of the prim. #### Response Example ```cpp // C++ example return value GfRange3d ``` ## UsdImagingInstanceAdapter::GetSubdivTags ### Description Get the subdiv tags for this prim. ### Method GET (Conceptual - this is a C++ method, not a direct HTTP endpoint) ### Endpoint N/A (C++ Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```cpp // C++ example PxOsdSubdivTags subdivTags = adapter.GetSubdivTags(usdPrim, cachePath, time); ``` ### Response #### Success Response (200) - **subdivTags** (PxOsdSubdivTags) - The subdiv tags for the prim. #### Response Example ```cpp // C++ example return value PxOsdSubdivTags ``` ## UsdImagingInstanceAdapter::ProcessPropertyChange ### Description Returns a bit mask of attributes to be updated, or HdChangeTracker::AllDirty if the entire prim must ... ### Method POST (Conceptual - this is a C++ method, not a direct HTTP endpoint) ### Endpoint N/A (C++ Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```cpp // C++ example short dirtyBits = adapter.ProcessPropertyChange(prim, cachePath, propertyName); ``` ### Response #### Success Response (200) - **dirtyBits** (short) - Bit mask indicating changed attributes. #### Response Example ```cpp // C++ example return value short ``` ## UsdImagingInstanceAdapter::TrackVariability ### Description For the given prim, variability is detected and stored in timeVaryingBits. ### Method POST (Conceptual - this is a C++ method, not a direct HTTP endpoint) ### Endpoint N/A (C++ Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```cpp // C++ example adapter.TrackVariability(prim, cachePath, &timeVaryingBits, instancerContext); ``` ### Response #### Success Response (200) None (void return type) #### Response Example ```cpp // C++ example return value void ``` ## UsdImagingInstanceAdapter::GetInstancerTransform ### Description Get the instancer transform for the given prim. ### Method GET (Conceptual - this is a C++ method, not a direct HTTP endpoint) ### Endpoint N/A (C++ Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```cpp // C++ example GfMatrix4d instancerTransform = adapter.GetInstancerTransform(instancerPrim, instancerPath, time); ``` ### Response #### Success Response (200) - **instancerTransform** (GfMatrix4d) - The transform matrix of the instancer. #### Response Example ```cpp // C++ example return value GfMatrix4d ``` ## UsdImagingInstanceAdapter::SampleTransform ### Description Samples the transform for the given prim. ### Method GET (Conceptual - this is a C++ method, not a direct HTTP endpoint) ### Endpoint N/A (C++ Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```cpp // C++ example size_t numSamples = adapter.SampleTransform(prim, cachePath, time, maxNumSamples, sampleTimes, sampleValues); ``` ### Response #### Success Response (200) - **numSamples** (size_t) - The number of samples taken. - **sampleTimes** (float*) - Array of sample times. - **sampleValues** (GfMatrix4d*) - Array of sample transform values. #### Response Example ```cpp // C++ example return value size_t ``` ## UsdImagingInstanceAdapter::Get ### Description Gets the value of the parameter named key for the given prim (which has the given cache path) and giv... ### Method GET (Conceptual - this is a C++ method, not a direct HTTP endpoint) ### Endpoint N/A (C++ Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```cpp // C++ example VtValue value = adapter.Get(prim, cachePath, key, time, &outIndices); ``` ### Response #### Success Response (200) - **value** (VtValue) - The value of the requested parameter. - **outIndices** (VtIntArray*) - Array of indices. #### Response Example ```cpp // C++ example return value VtValue ``` ## UsdImagingInstanceAdapter::ProcessPrimRemoval ### Description Removes all associated Rprims and dependencies from the render index without scheduling them for repo... ### Method DELETE (Conceptual - this is a C++ method, not a direct HTTP endpoint) ### Endpoint N/A (C++ Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```cpp // C++ example adapter.ProcessPrimRemoval(cachePath, index); ``` ### Response #### Success Response (200) None (void return type) #### Response Example ```cpp // C++ example return value void ``` ## UsdImagingInstanceAdapter::GetPurpose ### Description Returns the purpose token for prim. ### Method GET (Conceptual - this is a C++ method, not a direct HTTP endpoint) ### Endpoint N/A (C++ Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```cpp // C++ example TfToken purpose = adapter.GetPurpose(usdPrim, cachePath, instanceInheritablePurpose); ``` ### Response #### Success Response (200) - **purpose** (TfToken) - The purpose token of the prim. #### Response Example ```cpp // C++ example return value TfToken ``` ## UsdImagingInstanceAdapter::GetInstancerId ### Description Return the instancerId for this prim. ### Method GET (Conceptual - this is a C++ method, not a direct HTTP endpoint) ### Endpoint N/A (C++ Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```cpp // C++ example SdfPath instancerId = adapter.GetInstancerId(usdPrim, cachePath); ``` ### Response #### Success Response (200) - **instancerId** (SdfPath) - The instancer ID of the prim. #### Response Example ```cpp // C++ example return value SdfPath ``` ## UsdImagingInstanceAdapter::GetTransform ### Description Fetches the transform for the given prim at the given time from a pre-computed cache of prim transfor... ### Method GET (Conceptual - this is a C++ method, not a direct HTTP endpoint) ### Endpoint N/A (C++ Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```cpp // C++ example GfMatrix4d transform = adapter.GetTransform(prim, cachePath, time, ignoreRootTransform); ``` ### Response #### Success Response (200) - **transform** (GfMatrix4d) - The transform matrix of the prim. #### Response Example ```cpp // C++ example return value GfMatrix4d ``` ``` -------------------------------- ### UsdLuxDomeLight: Get Guide Radius Attribute Source: https://openusd.org/release/api/dome_light_8h_source Retrieves the UsdAttribute for 'guideRadius' from a UsdLuxDomeLight. This attribute specifies the radius of guide geometry used for visualizing the dome light. ```cpp USDLUX_API UsdAttribute GetGuideRadiusAttr() const; ``` -------------------------------- ### Sample ExtComputation Input Source: https://openusd.org/release/api/class_usd_imaging_sphere_light_adapter Samples an input value for an extended computation over time. ```APIDOC ## GET /websites/openusd_release_api/sampleExtComputationInput ### Description Samples an input value for an extended computation over time. ### Method GET ### Endpoint /websites/openusd_release_api/sampleExtComputationInput ### Parameters #### Query Parameters - **prim** (UsdPrim) - Required - The primitive to query. - **cachePath** (SdfPath) - Required - The cache path for the computation. - **name** (TfToken) - Required - The name of the input. - **time** (UsdTimeCode) - Required - The time to sample. - **instancerContext** (UsdImagingInstancerContext) - Optional - Context for instancer. - **maxSampleCount** (size_t) - Required - Maximum number of samples. ### Response #### Success Response (200) - **output** (size_t) - The number of samples taken. - **sampleTimes** (float *) - Pointer to sample times. - **sampleValues** (VtValue *) - Pointer to sample values. ``` -------------------------------- ### UsdSkelBlendShapeQuery Description Source: https://openusd.org/release/api/blend_shape_query_8h_source Get a string description of the blend shape setup. ```APIDOC ## UsdSkelBlendShapeQuery Description ### Description Returns a descriptive string of the blend shape configuration managed by this query. ### Method - `USDSKEL_API std::string GetDescription() const` ### Response Example ```cpp std::string description = query.GetDescription(); ``` ``` -------------------------------- ### Get a reverse iterator to the start of a non-const array Source: https://openusd.org/release/api/group___s_t_l___a_p_i Returns a reverse iterator pointing to the start of the array. The underlying data is copied if it's not uniquely owned. Defined in array.h. ```cpp inline reverse_iterator rend() ``` -------------------------------- ### UsdImagingPluginLightAdapter Constructor Source: https://openusd.org/release/api/class_usd_imaging_plugin_light_adapter Initializes a new instance of the UsdImagingPluginLightAdapter class. This is an inline constructor. ```cpp USDIMAGING_API UsdImagingPluginLightAdapter(); ``` -------------------------------- ### UsdClipsAPI: Get Clip Template Start Time Source: https://openusd.org/release/api/clips_a_p_i_8h_source Retrieves the template start time for a specified clip set. This function is overloaded and can be called with or without a clip set name. ```cpp USD_API bool GetClipTemplateStartTime(double* clipTemplateStartTime, const std::string& clipSet) const; USD_API bool GetClipTemplateStartTime(double* clipTemplateStartTime) const; ``` -------------------------------- ### UsdImagingDomeLight_1Adapter Methods Source: https://openusd.org/release/api/dome_light__1_adapter_8h_source This section details the core methods of the UsdImagingDomeLight_1Adapter class, including methods for populating the render index, checking support, invalidating imaging subprims, and retrieving light parameters. ```APIDOC ## UsdImagingDomeLight_1Adapter Class Methods ### GetImagingSubprims **Description**: Retrieves the imaging subprims for a given UsdPrim. **Method**: `GetImagingSubprims` **Parameters**: * **prim** (UsdPrim const&) - The UsdPrim to query. **Returns**: TfTokenVector - A vector of tokens representing the imaging subprims. ### GetImagingSubprimType **Description**: Gets the imaging subprim type for a specific subprim of a UsdPrim. **Method**: `GetImagingSubprimType` **Parameters**: * **prim** (UsdPrim const&) - The UsdPrim to query. * **subprim** (TfToken const&) - The subprim token. **Returns**: TfToken - The type of the imaging subprim. ### GetImagingSubprimData **Description**: Retrieves the data source handle for a specific imaging subprim. **Method**: `GetImagingSubprimData` **Parameters**: * **prim** (UsdPrim const&) - The UsdPrim to query. * **subprim** (TfToken const&) - The subprim token. * **stageGlobals** (UsdImagingDataSourceStageGlobals const&) - Global stage information. **Returns**: HdContainerDataSourceHandle - The data source handle for the subprim. ### InvalidateImagingSubprim **Description**: Invalidates imaging subprim data when properties change. **Method**: `InvalidateImagingSubprim` **Parameters**: * **prim** (UsdPrim const&) - The UsdPrim whose subprim needs invalidation. * **subprim** (TfToken const&) - The subprim token. * **properties** (TfTokenVector const&) - A vector of tokens representing the changed properties. * **invalidationType** (UsdImagingPropertyInvalidationType) - The type of invalidation. **Returns**: HdDataSourceLocatorSet - A set of data source locators that have been invalidated. ### GetLightParamValue **Description**: Retrieves the value of a light parameter for a given prim and time. **Method**: `GetLightParamValue` **Parameters**: * **prim** (UsdPrim const&) - The UsdPrim representing the light. * **cachePath** (SdfPath const&) - The cache path for the parameter. * **paramName** (TfToken const&) - The name of the parameter. * **time** (UsdTimeCode) - The time at which to retrieve the value. **Returns**: VtValue - The value of the light parameter. ### Populate **Description**: Populates the render index with data for the UsdPrim. **Method**: `Populate` **Parameters**: * **prim** (UsdPrim const&) - The UsdPrim to populate. * **index** (UsdImagingIndexProxy*) - The index proxy to populate. * **instancerContext** (UsdImagingInstancerContext const*, optional) - Context for instancers. **Returns**: SdfPath - The path of the populated prim in the index. ### IsSupported **Description**: Checks if the adapter supports the given UsdImagingIndexProxy. **Method**: `IsSupported` **Parameters**: * **index** (UsdImagingIndexProxy const*) - The index proxy to check. **Returns**: bool - True if the adapter is supported, false otherwise. ### _RemovePrim **Description**: Removes a prim from the index. **Method**: `_RemovePrim` **Parameters**: * **cachePath** (SdfPath const&) - The cache path of the prim to remove. * **index** (UsdImagingIndexProxy*) - The index proxy from which to remove the prim. ``` -------------------------------- ### USD PointInstancer Example 2 Source: https://openusd.org/release/api/class_usd_imaging_pi_prototype_propagating_scene_index A simpler USD PointInstancer example showing a direct prototype relationship. This configuration illustrates the basic setup for instancing prototypes within a USD scene. ```usd def PointInstancer "MyInstancer" { rel prototypes = [ ] } over "MyPrototypes" { def Xform "MyPrototype" { def Sphere "MySphere" { } } } ``` -------------------------------- ### UsdImagingPluginLightFilterAdapter Class Documentation Source: https://openusd.org/release/api/plugin_light_filter_adapter_8h_source Details the methods available for the UsdImagingPluginLightFilterAdapter class, including Populate and IsSupported. ```APIDOC ## UsdImagingPluginLightFilterAdapter API ### Description This class is an adapter for lights of type PluginLightFilter, responsible for integrating them into the USD imaging pipeline. It provides methods to populate the render index and check for support. ### Methods #### Populate ##### Description Called to populate the RenderIndex for a given UsdPrim. This method is used to add the light filter to the imaging index. ##### Method `SdfPath Populate(UsdPrim const& prim, UsdImagingIndexProxy* index, UsdImagingInstancerContext const* instancerContext = NULL)` ##### Parameters - **prim** (UsdPrim) - The prim representing the light filter. - **index** (UsdImagingIndexProxy*) - The index proxy to populate. - **instancerContext** (UsdImagingInstancerContext*) - Optional context for instancer prims. ##### Return Value `SdfPath` - The path of the populated prim in the index. #### IsSupported ##### Description Returns true if the adapter can be populated into the target index, indicating whether this adapter supports the given index. ##### Method `bool IsSupported(UsdImagingIndexProxy const* index) const` ##### Parameters - **index** (UsdImagingIndexProxy const*) - The imaging index to check for support. ##### Return Value `bool` - True if the adapter is supported by the index, false otherwise. #### _RemovePrim ##### Description Internal method to remove a prim from the render index when it's no longer needed. ##### Method `void _RemovePrim(SdfPath const& cachePath, UsdImagingIndexProxy* index) final` ##### Parameters - **cachePath** (SdfPath const&) - The path of the prim to remove. - **index** (UsdImagingIndexProxy*) - The imaging index from which to remove the prim. ### Related Classes - **UsdImagingLightFilterAdapter**: Base class for all light filters. - **UsdPrim**: Represents a primitive object in the scenegraph. - **UsdImagingIndexProxy**: Exposes a subset of the Delegate API to PrimAdapters. - **UsdImagingInstancerContext**: Context object for instancer prim adapters. ```