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_PRIM_TYPE_TOKENS \
17 (skeleton) \
18 (skelAnimation) \
19 (skelBlendShape)
20
22 UsdSkelImagingPrimTypeTokens,
23 USDSKELIMAGING_API, USD_SKEL_IMAGING_PRIM_TYPE_TOKENS);
24
25#define USD_SKEL_IMAGING_EXT_COMPUTATION_NAME_TOKENS \
26 ((aggregatorComputation, "skinningInputAggregatorComputation")) \
27 ((computation, "skinningComputation"))
28
30 UsdSkelImagingExtComputationNameTokens, USDSKELIMAGING_API,
31 USD_SKEL_IMAGING_EXT_COMPUTATION_NAME_TOKENS);
32
33#define USD_SKEL_IMAGING_EXT_AGGREGATOR_COMPUTATION_INPUT_NAME_TOKENS \
34 (restPoints) \
35 (geomBindXform) \
36 (influences) \
37 (numInfluencesPerComponent) \
38 (hasConstantInfluences) \
39 (blendShapeOffsets) \
40 (blendShapeOffsetRanges) \
41 (numBlendShapeOffsetRanges)
42
44 UsdSkelImagingExtAggregatorComputationInputNameTokens, USDSKELIMAGING_API,
45 USD_SKEL_IMAGING_EXT_AGGREGATOR_COMPUTATION_INPUT_NAME_TOKENS);
46
47#define USD_SKEL_IMAGING_EXT_COMPUTATION_INPUT_NAME_TOKENS \
48 (blendShapeWeights) \
49 (skinningXforms) \
50 (skinningScaleXforms) \
51 (skinningDualQuats) \
52 ((skelLocalToCommonSpace, "skelLocalToWorld")) \
53 ((commonSpaceToPrimLocal, "primWorldToLocal"))
54
55// Legacy tokens used in the ext computation that make stronger assumptions
56// about the transforms than necessary.
57//
58// That is, the ext computation consumes both
59// primWorldToLocal and skelLocalToWorld
60// but only ever uses their product
61// skelToPrimLocal = primWorldToLocal * skelLocalToWorld.
62//
63// In other words, the two matrices are only ever used to go from skel to prim
64// space and the intermediate space used to achieve this is irrelevant to the
65// ext computation.
66//
67// Let us rename
68// primWorldToLocal to commonSpaceToPrimLocal and
69// skelLocalToWorld to skelLocalToCommonSpace.
70// to reflect this.
71//
72// For the Hydra 1.0 implementation we use indeed world space as space common
73// to all prims under a skel root.
74// For the Hydra 2.0 implementation we use the space that is also common to all
75// prims under a skel root but that is defined by the
76// UsdSkelImagingXformResolver.
77//
79 UsdSkelImagingExtComputationInputNameTokens, USDSKELIMAGING_API,
80 USD_SKEL_IMAGING_EXT_COMPUTATION_INPUT_NAME_TOKENS);
81
82#define USD_SKEL_IMAGING_EXT_COMPUTATION_LEGACY_INPUT_NAME_TOKENS \
83 (skelLocalToWorld) \
84 (primWorldToLocal)
85
87 UsdSkelImagingExtComputationLegacyInputNameTokens, USDSKELIMAGING_API,
88 USD_SKEL_IMAGING_EXT_COMPUTATION_LEGACY_INPUT_NAME_TOKENS);
89
90
91#define USD_SKEL_IMAGING_EXT_COMPUTATION_OUTPUT_NAME_TOKENS \
92 (skinnedPoints)
93
95 UsdSkelImagingExtComputationOutputNameTokens, USDSKELIMAGING_API,
96 USD_SKEL_IMAGING_EXT_COMPUTATION_OUTPUT_NAME_TOKENS);
97
98PXR_NAMESPACE_CLOSE_SCOPE
99
100#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