AL_USDMaya  0.29.4
USD to Maya Bridge
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
DgNodeTranslator.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/usdmaya/ForwardDeclares.h>
21 #include "AL/usdmaya/utils/AttributeType.h"
22 #include "AL/usdmaya/utils/DgNodeHelper.h"
23 #include "AL/usdmaya/utils/ForwardDeclares.h"
24 #include "AL/maya/utils/MayaHelperMacros.h"
25 
26 #include "maya/MPlug.h"
27 #include "maya/MAngle.h"
28 #include "maya/MDistance.h"
29 #include "maya/MTime.h"
30 
31 #include "maya/MGlobal.h"
32 #include "maya/MStatus.h"
33 
34 #include "pxr/base/gf/half.h"
35 #include "pxr/usd/usd/attribute.h"
36 
37 #include <string>
38 #include <vector>
39 
40 namespace AL {
41 namespace usdmaya {
42 namespace fileio {
43 namespace translators {
44 //----------------------------------------------------------------------------------------------------------------------
47 //----------------------------------------------------------------------------------------------------------------------
49  : public usdmaya::utils::DgNodeHelper
50 {
51 public:
52 
53 
56  AL_USDMAYA_PUBLIC
57  static MStatus registerType();
58 
65  AL_USDMAYA_PUBLIC
66  virtual MObject createNode(const UsdPrim& from, MObject parent, const char* nodeType, const ImporterParams& params);
67 
73  AL_USDMAYA_PUBLIC
74  MStatus copyAttributes(const UsdPrim& from, MObject to, const ImporterParams& params);
75 
81  AL_USDMAYA_PUBLIC
82  static MStatus copyAttributes(const MObject& from, UsdPrim& to, const ExporterParams& params);
83 
89  AL_USDMAYA_PUBLIC
90  virtual bool attributeHandled(const UsdAttribute& usdAttr);
91 };
92 
93 //----------------------------------------------------------------------------------------------------------------------
94 } // translators
95 } // fileio
96 } // usdmaya
97 } // AL
98 //----------------------------------------------------------------------------------------------------------------------
static AL_USDMAYA_PUBLIC MStatus registerType()
static type registration
parameters for the exporter. These parameters are constructed by any command or file translator that ...
Definition: ExportParams.h:35
parameters for the importer
Definition: ImportParams.h:40
virtual AL_USDMAYA_PUBLIC MObject createNode(const UsdPrim &from, MObject parent, const char *nodeType, const ImporterParams &params)
Creates a new maya node of the given type and set attributes based on input prim. ...
AL_USDMAYA_PUBLIC MStatus copyAttributes(const UsdPrim &from, MObject to, const ImporterParams &params)
helper method to copy attributes from the UsdPrim to the Maya node
virtual AL_USDMAYA_PUBLIC bool attributeHandled(const UsdAttribute &usdAttr)
A temporary solution. Given a custom attribute, if a translator handles it somehow (i...
Utility class that transfers DgNodes between Maya and USD.
Definition: DgNodeTranslator.h:48