AL_USDMaya  0.29.4
USD to Maya Bridge
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StageData.h
1 //
2 // Copyright 2017 Animal Logic
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.//
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 #pragma once
17 
18 #include "./Api.h"
19 
20 #include "AL/maya/event/MayaEventManager.h"
21 #include "maya/MPxGeometryData.h"
22 
23 #include "pxr/pxr.h"
24 #include "pxr/usd/usd/stage.h"
25 #include "AL/usd/utils/ForwardDeclares.h"
26 
27 PXR_NAMESPACE_USING_DIRECTIVE
28 
29 namespace AL {
30 namespace usdmaya {
31 
32 //----------------------------------------------------------------------------------------------------------------------
35 //----------------------------------------------------------------------------------------------------------------------
36 class StageData
37  : public MPxGeometryData
38 {
39 public:
40 
42  StageData();
43 
45  ~StageData();
46 
48  AL_USDMAYA_PUBLIC
49  static void* creator();
50 
53  void copy(const MPxData& aDatum) override;
54 
56  AL_USDMAYA_PUBLIC
57  static const MTypeId kTypeId;
58 
60  AL_USDMAYA_PUBLIC
61  static const MString kName;
62 
64  UsdStageWeakPtr stage;
65 
67  SdfPath primPath;
68 
69 private:
70  MTypeId typeId() const override;
71  MString name() const override;
72  AL::event::CallbackId m_exitCallbackId;
73 };
74 
75 //----------------------------------------------------------------------------------------------------------------------
76 } // usdmaya
77 } // AL
78 //----------------------------------------------------------------------------------------------------------------------
static AL_USDMAYA_PUBLIC const MTypeId kTypeId
the type id of the stage data
Definition: StageData.h:57
static AL_USDMAYA_PUBLIC void * creator()
creates an instance of this data object
void copy(const MPxData &aDatum) override
copy the input stage data into this node
UsdStageWeakPtr stage
the stage passed through the DG
Definition: StageData.h:64
This code is effectively copied from the pixar plugin. It's just used to pass the usd stage through t...
Definition: StageData.h:36
SdfPath primPath
the prim path root
Definition: StageData.h:67
static AL_USDMAYA_PUBLIC const MString kName
the type name of the stage data
Definition: StageData.h:61