Loading...
Searching...
No Matches
tokens.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 PXR_USD_IMAGING_USD_SKEL_IMAGING_TOKENS_H
8#define PXR_USD_IMAGING_USD_SKEL_IMAGING_TOKENS_H
9
10#include "pxr/pxr.h"
11#include "pxr/usdImaging/usdSkelImaging/api.h"
13
14PXR_NAMESPACE_OPEN_SCOPE
15
16#define USD_SKEL_IMAGING_EXT_COMPUTATION_TYPE_TOKENS \
17 (points) \
18 (normals)
19
21 UsdSkelImagingExtComputationTypeTokens, USDSKELIMAGING_API,
22 USD_SKEL_IMAGING_EXT_COMPUTATION_TYPE_TOKENS);
23
24#define USD_SKEL_IMAGING_PRIM_TYPE_TOKENS \
25 (skeleton) \
26 (skelAnimation) \
27 (skelBlendShape)
28
30 UsdSkelImagingPrimTypeTokens,
31 USDSKELIMAGING_API, USD_SKEL_IMAGING_PRIM_TYPE_TOKENS);
32
33#define USD_SKEL_IMAGING_EXT_COMPUTATION_NAME_TOKENS \
34 ((pointsAggregatorComputation, "skinningPointsInputAggregatorComputation")) \
35 ((pointsComputation, "skinningPointsComputation")) \
36 ((normalsAggregatorComputation, "skinningNormalsInputAggregatorComputation")) \
37 ((normalsComputation, "skinningNormalsComputation"))
38
40 UsdSkelImagingExtComputationNameTokens, USDSKELIMAGING_API,
41 USD_SKEL_IMAGING_EXT_COMPUTATION_NAME_TOKENS);
42
43#define USD_SKEL_IMAGING_EXT_AGGREGATOR_COMPUTATION_INPUT_NAME_TOKENS \
44 (restPoints) \
45 (geomBindXform) \
46 (influences) \
47 (numInfluencesPerComponent) \
48 (hasConstantInfluences) \
49 (blendShapeOffsets) \
50 (blendShapeOffsetRanges) \
51 (numBlendShapeOffsetRanges) \
52 (restNormals) \
53 (faceVertexIndices) \
54 (hasFaceVaryingNormals)
55
57 UsdSkelImagingExtAggregatorComputationInputNameTokens, USDSKELIMAGING_API,
58 USD_SKEL_IMAGING_EXT_AGGREGATOR_COMPUTATION_INPUT_NAME_TOKENS);
59
60#define USD_SKEL_IMAGING_EXT_COMPUTATION_INPUT_NAME_TOKENS \
61 (blendShapeWeights) \
62 (skinningXforms) \
63 (skinningScaleXforms) \
64 (skinningDualQuats) \
65 ((skelLocalToCommonSpace, "skelLocalToWorld")) \
66 ((commonSpaceToPrimLocal, "primWorldToLocal"))
67
68// Legacy tokens used in the ext computation that make stronger assumptions
69// about the transforms than necessary.
70//
71// That is, the ext computation consumes both
72// primWorldToLocal and skelLocalToWorld
73// but only ever uses their product
74// skelToPrimLocal = primWorldToLocal * skelLocalToWorld.
75//
76// In other words, the two matrices are only ever used to go from skel to prim
77// space and the intermediate space used to achieve this is irrelevant to the
78// ext computation.
79//
80// Let us rename
81// primWorldToLocal to commonSpaceToPrimLocal and
82// skelLocalToWorld to skelLocalToCommonSpace.
83// to reflect this.
84//
85// For the Hydra 1.0 implementation we use indeed world space as space common
86// to all prims under a skel root.
87// For the Hydra 2.0 implementation we use the space that is also common to all
88// prims under a skel root but that is defined by the
89// UsdSkelImagingXformResolver.
90//
92 UsdSkelImagingExtComputationInputNameTokens, USDSKELIMAGING_API,
93 USD_SKEL_IMAGING_EXT_COMPUTATION_INPUT_NAME_TOKENS);
94
95#define USD_SKEL_IMAGING_EXT_COMPUTATION_LEGACY_INPUT_NAME_TOKENS \
96 (skelLocalToWorld) \
97 (primWorldToLocal)
98
100 UsdSkelImagingExtComputationLegacyInputNameTokens, USDSKELIMAGING_API,
101 USD_SKEL_IMAGING_EXT_COMPUTATION_LEGACY_INPUT_NAME_TOKENS);
102
103
104#define USD_SKEL_IMAGING_EXT_COMPUTATION_OUTPUT_NAME_TOKENS \
105 (skinnedPoints) \
106 (skinnedNormals)
107
109 UsdSkelImagingExtComputationOutputNameTokens, USDSKELIMAGING_API,
110 USD_SKEL_IMAGING_EXT_COMPUTATION_OUTPUT_NAME_TOKENS);
111
112PXR_NAMESPACE_CLOSE_SCOPE
113
114#endif // PXR_USD_IMAGING_USD_SKEL_IMAGING_TOKENS_H
This file defines some macros that are useful for declaring and using static TfTokens.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:92