All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
translatorSkel.h
Go to the documentation of this file.
1 //
2 // Copyright 2018 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 
26 
27 #ifndef PXRUSDMAYA_TRANSLATOR_SKEL_H
28 #define PXRUSDMAYA_TRANSLATOR_SKEL_H
29 
30 #include "pxr/pxr.h"
31 #include "usdMaya/api.h"
32 #include "usdMaya/primReaderArgs.h"
34 
35 #include "pxr/base/vt/array.h"
36 
37 
38 PXR_NAMESPACE_OPEN_SCOPE
39 
40 
41 class UsdSkelSkeleton;
44 
45 
46 struct UsdMayaTranslatorSkel
47 {
50  PXRUSDMAYA_API
51  static bool IsUsdSkeleton(const MDagPath& joint);
52 
58  PXRUSDMAYA_API
59  static bool IsSkelMayaGenerated(const UsdSkelSkeleton& skel);
60 
62  PXRUSDMAYA_API
63  static void MarkSkelAsMayaGenerated(const UsdSkelSkeleton& skel);
64 
67  PXRUSDMAYA_API
68  static bool CreateJointHierarchy(const UsdSkelSkeletonQuery& skelQuery,
69  MObject& parentNode,
70  const UsdMayaPrimReaderArgs& args,
71  UsdMayaPrimReaderContext* context,
72  VtArray<MObject>* joints);
73 
75  PXRUSDMAYA_API
76  static bool GetJoints(const UsdSkelSkeletonQuery& skelQuery,
77  UsdMayaPrimReaderContext* context,
78  VtArray<MObject>* joints);
79 
81  PXRUSDMAYA_API
82  static bool CreateBindPose(const UsdSkelSkeletonQuery& skelQuery,
83  const VtArray<MObject>& joints,
84  UsdMayaPrimReaderContext* context,
85  MObject* bindPoseNode);
86 
88  PXRUSDMAYA_API
89  static MObject GetBindPose(const UsdSkelSkeletonQuery& skelQuery,
90  UsdMayaPrimReaderContext* context);
91 
96  PXRUSDMAYA_API
97  static bool CreateSkinCluster(const UsdSkelSkeletonQuery& skelQuery,
98  const UsdSkelSkinningQuery& skinningQuery,
99  const VtArray<MObject>& joints,
100  const UsdPrim& primToSkin,
101  const UsdMayaPrimReaderArgs& args,
102  UsdMayaPrimReaderContext* context,
103  const MObject& bindPose=MObject());
104 };
105 
106 
107 PXR_NAMESPACE_CLOSE_SCOPE
108 
109 #endif
Object used for querying resolved bindings for skinning.
Definition: skinningQuery.h:50
This class holds read-only arguments that are passed into reader plugins for the usdMaya library...
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a &quot;Prim&quot; as ...
Definition: prim.h:131
Represents an arbitrary dimensional rectangular container class.
Definition: array.h:193
Describes a skeleton.
Definition: skeleton.h:63
Primary interface to reading bound skeleton data.
Definition: skeletonQuery.h:70
This class provides an interface for reader plugins to communicate state back to the core usd maya lo...