HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
types.h
Go to the documentation of this file.
1
//
2
// Copyright 2020 Pixar
3
//
4
// Licensed under the terms set forth in the LICENSE.txt file available at
5
// https://openusd.org/license.
6
//
7
#ifndef PXR_USD_USD_SHADE_TYPES_H
8
#define PXR_USD_USD_SHADE_TYPES_H
9
10
#include "
pxr/pxr.h
"
11
#include "
pxr/usd/usdShade/api.h
"
12
#include "
pxr/usd/usd/attribute.h
"
13
14
#include "
pxr/base/tf/smallVector.h
"
15
16
PXR_NAMESPACE_OPEN_SCOPE
17
18
/// \enum UsdShadeAttributeType
19
///
20
/// Specifies the type of a shading attribute.
21
///
22
enum class
UsdShadeAttributeType
{
23
Invalid
,
24
Input
,
25
Output
,
26
};
27
28
/// \enum UsdShadeConnectionModification
29
///
30
/// Choice when creating a single connection with the \p ConnectToSource method
31
/// for a shading attribute. The new connection can replace any existing
32
/// connections or be added to the list of existing connections. In which case
33
/// there is a choice between prepending and appending to said list, which will
34
/// be represented by Usd's list editing operations.
35
///
36
enum class
UsdShadeConnectionModification
{
37
Replace
,
38
Prepend
,
39
Append
40
};
41
42
/// \typedef UsdShadeAttributeVector
43
///
44
/// For performance reasons we want to be extra careful when reporting
45
/// attributes. It is possible to have multiple connections for a shading
46
/// attribute, but by far the more common cases are one or no connection. So we
47
/// use a small vector that can be stack allocated that holds space for a single
48
/// attributes, but that can "spill" to the heap in the case of multiple
49
/// upstream attributes.
50
using
UsdShadeAttributeVector
=
TfSmallVector<UsdAttribute, 1>
;
51
52
/// \typedef UsdShadeSourceInfoVector
53
///
54
/// For performance reasons we want to be extra careful when reporting
55
/// connections. It is possible to have multiple connections for a shading
56
/// attribute, but by far the more common cases are one or no connection.
57
/// So we use a small vector that can be stack allocated that holds space
58
/// for a single source, but that can "spill" to the heap in the case
59
/// of a multi-connection.
60
///
61
/// /sa UsdShadeConnectionSourceInfo in connectableAPI.h
62
struct
UsdShadeConnectionSourceInfo
;
63
using
UsdShadeSourceInfoVector
=
TfSmallVector<UsdShadeConnectionSourceInfo, 1>
;
64
65
PXR_NAMESPACE_CLOSE_SCOPE
66
67
#endif
UsdShadeAttributeType::Output
TfSmallVector
Definition:
smallVector.h:156
UsdShadeConnectionModification
UsdShadeConnectionModification
Definition:
types.h:36
attribute.h
UsdShadeAttributeType::Input
pxr.h
UsdShadeConnectionModification::Prepend
UsdShadeConnectionModification::Replace
UsdShadeAttributeType::Invalid
PXR_NAMESPACE_OPEN_SCOPE
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition:
path.h:1425
PXR_NAMESPACE_CLOSE_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition:
pxr.h:74
UsdShadeConnectionModification::Append
UsdShadeConnectionSourceInfo
Definition:
connectableAPI.h:737
api.h
smallVector.h
UsdShadeAttributeType
UsdShadeAttributeType
Definition:
types.h:22
pxr
usd
usdShade
types.h
Generated on Sat Sep 20 2025 02:35:46 for HDK by
1.8.6