All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
bakeSkinning.h
1//
2// Copyright 2016 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_SKEL_BAKE_SKINNING_H
8#define PXR_USD_USD_SKEL_BAKE_SKINNING_H
9
10#include "pxr/pxr.h"
11#include "pxr/usd/usdSkel/api.h"
12
14#include "pxr/base/vt/array.h"
15#include "pxr/base/vt/types.h"
16
17#include "pxr/usd/sdf/layer.h"
19
20#include <vector>
21
22PXR_NAMESPACE_OPEN_SCOPE
23
24class UsdPrimRange;
25class UsdSkelCache;
26class UsdSkelRoot;
27
30{
33 DeformPointsWithSkinning = 1 << 0,
34 DeformNormalsWithSkinning = 1 << 1,
35 DeformXformWithSkinning = 1 << 2,
36 DeformPointsWithBlendShapes = 1 << 3,
37 DeformNormalsWithBlendShapes = 1 << 4,
38 DeformWithSkinning = (DeformPointsWithSkinning|
39 DeformNormalsWithSkinning|
40 DeformXformWithSkinning),
41 DeformWithBlendShapes = (DeformPointsWithBlendShapes|
42 DeformNormalsWithBlendShapes),
43 DeformAll = DeformWithSkinning|DeformWithBlendShapes,
46 ModifiesPoints = DeformPointsWithSkinning|DeformPointsWithBlendShapes,
47 ModifiesNormals = DeformNormalsWithSkinning|DeformNormalsWithBlendShapes,
48 ModifiesXform = DeformXformWithSkinning
49 };
50
52 int deformationFlags = DeformAll;
53
57 bool saveLayers = true;
58
67 size_t memoryLimit = 0;
68
73 bool updateExtents = true;
74
78 bool updateExtentHints = true;
79
81 std::vector<UsdSkelBinding> bindings;
82
92 std::vector<SdfLayerHandle> layers;
93
98 VtUIntArray layerIndices;
99};
100
101
119USDSKEL_API
120bool
121UsdSkelBakeSkinning(const UsdSkelCache& skelCache,
122 const UsdSkelBakeSkinningParms& parms,
123 const GfInterval& interval=GfInterval::GetFullInterval());
124
125
131USDSKEL_API
132bool
133UsdSkelBakeSkinning(const UsdSkelRoot& root,
134 const GfInterval& interval=GfInterval::GetFullInterval());
135
136
142USDSKEL_API
143bool
144UsdSkelBakeSkinning(const UsdPrimRange& range,
145 const GfInterval& interval=GfInterval::GetFullInterval());
146
147
148PXR_NAMESPACE_CLOSE_SCOPE
149
150
151#endif // PXR_USD_USD_SKEL_BAKE_SKINNING_H
Defines all the types "TYPED" for which Vt creates a VtTYPEDArray typedef.
A basic mathematical interval class.
Definition: interval.h:33
static GfInterval GetFullInterval()
Returns the full interval (-inf, inf).
Definition: interval.h:325
An forward-iterable range that traverses a subtree of prims rooted at a given prim in depth-first ord...
Definition: primRange.h:102
Thread-safe cache for accessing query objects for evaluating skeletal data.
Definition: cache.h:41
Boundable prim type used to identify a scope beneath which skeletally-posed primitives are defined.
Definition: root.h:47
Parameters for configuring UsdSkelBakeSkinning.
Definition: bakeSkinning.h:30
VtUIntArray layerIndices
Array providing an index per elem in bindings, indicating which layer the skinned result of the bindi...
Definition: bakeSkinning.h:98
bool updateExtents
If true, extents of UsdGeomPointBased-derived prims are updated as new skinned values are produced.
Definition: bakeSkinning.h:73
int deformationFlags
Flags determining which deformation paths are enabled.
Definition: bakeSkinning.h:52
bool updateExtentHints
If true, extents hints of models that already stored an extentsHint are updated to reflect skinning c...
Definition: bakeSkinning.h:78
std::vector< UsdSkelBinding > bindings
The set of bindings to bake.
Definition: bakeSkinning.h:81
std::vector< SdfLayerHandle > layers
Data layers being written to.
Definition: bakeSkinning.h:92
bool saveLayers
Determines whether or not layers are saved during skinning.
Definition: bakeSkinning.h:57
size_t memoryLimit
Memory limit for pending stage writes, given in bytes.
Definition: bakeSkinning.h:67
DeformationFlags
Flags for identifying different deformation paths.
Definition: bakeSkinning.h:32
@ ModifiesPoints
Flags indicating which components of skinned prims may be modified, based on the active deformations.
Definition: bakeSkinning.h:46