Loading...
Searching...
No Matches
blendShapeData.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_BLEND_SHAPE_DATA_H
8#define PXR_USD_IMAGING_USD_SKEL_IMAGING_BLEND_SHAPE_DATA_H
9
10#include "pxr/usdImaging/usdSkelImaging/api.h"
11
12#include "pxr/usd/sdf/path.h"
13
14#include "pxr/base/vt/array.h"
15
17
18#include <map>
19
20PXR_NAMESPACE_OPEN_SCOPE
21
23
40{
47 float weight;
48
51};
52
53using UsdSkelImagingWeightsAndSubShapeIndices =
54 std::vector<UsdSkelImagingWeightAndSubShapeIndex>;
55
60{
63
68
69 size_t numSubShapes;
70
81 std::map<TfToken, UsdSkelImagingWeightsAndSubShapeIndices>
83};
84
86USDSKELIMAGING_API
88UsdSkelImagingComputeBlendShapeData(
89 HdSceneIndexBaseRefPtr const &sceneIndex,
90 const SdfPath &primPath);
91
96USDSKELIMAGING_API
98UsdSkelImagingComputeBlendShapeWeights(
100 // from skel animation
101 const VtArray<TfToken> &blendShapeNames,
102 // from skel animation
103 const VtArray<float> &blendShapeWeights);
104
105PXR_NAMESPACE_CLOSE_SCOPE
106
107#endif
Abstract interface to scene data.
Definition: sceneIndex.h:54
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
Represents an arbitrary dimensional rectangular container class.
Definition: array.h:213
Standard pointer typedefs.
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
Definition: declarePtrs.h:58
Data for skinned prim to compute the skel ext computation inputs related to blend shapes.
SdfPath primPath
Path of deformable prim. Used only for warnings/error messages.
VtArray< GfVec4f > blendShapeOffsets
List of (offset, subShapeIndex)
std::map< TfToken, UsdSkelImagingWeightsAndSubShapeIndices > blendShapeNameToWeightsAndSubShapeIndices
For each blend shape name in SkelBindingAPI.skel:blendShapes, a list of (weight, subShapeIndex).
VtArray< GfVec2i > blendShapeOffsetRanges
For each point, pair of indices into blendShapeOffsets.
Data to determine sub shape contributions.
int subShapeIndex
Index to sub shape. -1 if this pair does not correspond to a sub shape.
float weight
Weight authored for BlendShape.inbetweens:BETWEEN_NAME.