Loading...
Searching...
No Matches
pxrCameraProjectionAPIAdapter.h
1//
2// Copyright 2025 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef EXT_RMANPKG_PLUGIN_RENDERMAN_PLUGIN_USD_RI_PXR_IMAGING_PXR_CAMERA_PROJECTION_API_ADAPTER_H
8#define EXT_RMANPKG_PLUGIN_RENDERMAN_PLUGIN_USD_RI_PXR_IMAGING_PXR_CAMERA_PROJECTION_API_ADAPTER_H
9
10#include "usdRiPxrImaging/api.h"
11
12#include "pxr/imaging/hd/dataSource.h"
13#include "pxr/imaging/hd/dataSourceLocator.h"
14
16#include "pxr/usdImaging/usdImaging/dataSourceStageGlobals.h"
17#include "pxr/usdImaging/usdImaging/types.h"
18
19#include "pxr/usd/usd/prim.h"
20
22#include "pxr/base/tf/token.h"
23
24#include "pxr/pxr.h"
25
26PXR_NAMESPACE_OPEN_SCOPE
27
28class UsdRiPxrImagingCameraProjectionAPIAdapter
30{
31public:
32 using BaseAdapter = UsdImagingAPISchemaAdapter;
33
34 USDRIPXRIMAGING_API
35 HdContainerDataSourceHandle
37 const UsdPrim& prim,
38 const TfToken& subprim,
39 const TfToken& appliedInstanceName,
40 const UsdImagingDataSourceStageGlobals& stageGlobals) override;
41
42 USDRIPXRIMAGING_API
45 const UsdPrim& prim,
46 const TfToken& subprim,
47 const TfToken& appliedInstanceName,
48 const TfTokenVector& properties,
49 UsdImagingPropertyInvalidationType invalidationType) override;
50};
51
52// For PxrCameraProjectionAPI schema applied on UsdGeomCamera that
53// allow specification of projection, if the schema expects relationships,
54// perform the following actions for each value of the environment variable.
55// true : Produce a warning message if connections are used.
56// false : Disallow the use of attribute connections for the purposes of
57// connecting projection.
58USDRIPXRIMAGING_API
59extern TfEnvSetting<bool>
60 LEGACY_PXR_CAMERA_PROJECTION_TERMINAL_ALLOWED_AND_WARN;
61
62PXR_NAMESPACE_CLOSE_SCOPE
63
64#endif
Represents a set of data source locators closed under descendancy.
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
Base class for all API schema adapters.
virtual USDIMAGING_API HdContainerDataSourceHandle GetImagingSubprimData(UsdPrim const &prim, TfToken const &subprim, TfToken const &appliedInstanceName, const UsdImagingDataSourceStageGlobals &stageGlobals)
Returns an HdContainerDataSourceHandle representing the API schema's contributions to the primary pri...
virtual USDIMAGING_API HdDataSourceLocatorSet InvalidateImagingSubprim(UsdPrim const &prim, TfToken const &subprim, TfToken const &appliedInstanceName, TfTokenVector const &properties, UsdImagingPropertyInvalidationType invalidationType)
Given the names of USD properties which have changed, an adapter may provide a HdDataSourceLocatorSet...
This class is used as a context object with global stage information, that gets passed down to dataso...
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:117
Environment setting variable.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440