Loading...
Searching...
No Matches
bakeSkinning.h
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
5// with the following modification; you may not use this file except in
6// compliance with the Apache License and the following modification to it:
7// Section 6. Trademarks. is deleted and replaced with:
8//
9// 6. Trademarks. This License does not grant permission to use the trade
10// names, trademarks, service marks, or product names of the Licensor
11// and its affiliates, except as required to comply with Section 4(c) of
12// the License and to reproduce the content of the NOTICE file.
13//
14// You may obtain a copy of the Apache License at
15//
16// http://www.apache.org/licenses/LICENSE-2.0
17//
18// Unless required by applicable law or agreed to in writing, software
19// distributed under the Apache License with the above modification is
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21// KIND, either express or implied. See the Apache License for the specific
22// language governing permissions and limitations under the Apache License.
23//
24#ifndef PXR_USD_USD_SKEL_BAKE_SKINNING_H
25#define PXR_USD_USD_SKEL_BAKE_SKINNING_H
26
27#include "pxr/pxr.h"
28#include "pxr/usd/usdSkel/api.h"
29
31#include "pxr/base/vt/array.h"
32#include "pxr/base/vt/types.h"
33
34#include "pxr/usd/sdf/layer.h"
36
37#include <vector>
38
39PXR_NAMESPACE_OPEN_SCOPE
40
41class UsdPrimRange;
42class UsdSkelCache;
43class UsdSkelRoot;
44
47{
50 DeformPointsWithSkinning = 1 << 0,
51 DeformNormalsWithSkinning = 1 << 1,
52 DeformXformWithSkinning = 1 << 2,
53 DeformPointsWithBlendShapes = 1 << 3,
54 DeformNormalsWithBlendShapes = 1 << 4,
55 DeformWithSkinning = (DeformPointsWithSkinning|
56 DeformNormalsWithSkinning|
57 DeformXformWithSkinning),
58 DeformWithBlendShapes = (DeformPointsWithBlendShapes|
59 DeformNormalsWithBlendShapes),
60 DeformAll = DeformWithSkinning|DeformWithBlendShapes,
63 ModifiesPoints = DeformPointsWithSkinning|DeformPointsWithBlendShapes,
64 ModifiesNormals = DeformNormalsWithSkinning|DeformNormalsWithBlendShapes,
65 ModifiesXform = DeformXformWithSkinning
66 };
67
69 int deformationFlags = DeformAll;
70
74 bool saveLayers = true;
75
84 size_t memoryLimit = 0;
85
90 bool updateExtents = true;
91
95 bool updateExtentHints = true;
96
98 std::vector<UsdSkelBinding> bindings;
99
109 std::vector<SdfLayerHandle> layers;
110
115 VtUIntArray layerIndices;
116};
117
118
136USDSKEL_API
137bool
138UsdSkelBakeSkinning(const UsdSkelCache& skelCache,
139 const UsdSkelBakeSkinningParms& parms,
140 const GfInterval& interval=GfInterval::GetFullInterval());
141
142
148USDSKEL_API
149bool
150UsdSkelBakeSkinning(const UsdSkelRoot& root,
151 const GfInterval& interval=GfInterval::GetFullInterval());
152
153
159USDSKEL_API
160bool
161UsdSkelBakeSkinning(const UsdPrimRange& range,
162 const GfInterval& interval=GfInterval::GetFullInterval());
163
164
165PXR_NAMESPACE_CLOSE_SCOPE
166
167
168#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:50
static GfInterval GetFullInterval()
Returns the full interval (-inf, inf).
Definition: interval.h:342
An forward-iterable range that traverses a subtree of prims rooted at a given prim in depth-first ord...
Definition: primRange.h:119
Thread-safe cache for accessing query objects for evaluating skeletal data.
Definition: cache.h:58
Boundable prim type used to identify a scope beneath which skeletally-posed primitives are defined.
Definition: root.h:64
Parameters for configuring UsdSkelBakeSkinning.
Definition: bakeSkinning.h:47
VtUIntArray layerIndices
Array providing an index per elem in bindings, indicating which layer the skinned result of the bindi...
Definition: bakeSkinning.h:115
bool updateExtents
If true, extents of UsdGeomPointBased-derived prims are updated as new skinned values are produced.
Definition: bakeSkinning.h:90
int deformationFlags
Flags determining which deformation paths are enabled.
Definition: bakeSkinning.h:69
bool updateExtentHints
If true, extents hints of models that already stored an extentsHint are updated to reflect skinning c...
Definition: bakeSkinning.h:95
std::vector< UsdSkelBinding > bindings
The set of bindings to bake.
Definition: bakeSkinning.h:98
std::vector< SdfLayerHandle > layers
Data layers being written to.
Definition: bakeSkinning.h:109
bool saveLayers
Determines whether or not layers are saved during skinning.
Definition: bakeSkinning.h:74
size_t memoryLimit
Memory limit for pending stage writes, given in bytes.
Definition: bakeSkinning.h:84
DeformationFlags
Flags for identifying different deformation paths.
Definition: bakeSkinning.h:49
@ ModifiesPoints
Flags indicating which components of skinned prims may be modified, based on the active deformations.
Definition: bakeSkinning.h:63