AL_USDMaya  0.16.6
USD to Maya Bridge
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
MeshTranslator.h
1 #pragma once
2 #include "AL/usdmaya/fileio/translators/DagNodeTranslator.h"
3 
4 #include "maya/MObject.h"
5 
6 #include "pxr/usd/usd/stage.h"
7 
8 namespace AL {
9 namespace usdmaya {
10 namespace fileio {
11 namespace translators {
12 
13 //----------------------------------------------------------------------------------------------------------------------
16 //----------------------------------------------------------------------------------------------------------------------
18  : public DagNodeTranslator
19 {
20 public:
21 
24  static MStatus registerType();
25 
32  MObject createNode(const UsdPrim& from, MObject parent, const char* nodeType, const ImporterParams& params) override;
33 
39  static MStatus copyAttributes(const MObject& from, UsdPrim& to, const ExporterParams& params);
40 
47  static UsdPrim exportObject(UsdStageRefPtr stage, MDagPath mayaPath, const SdfPath& usdPath, const ExporterParams& params);
48 
53  bool attributeHandled(const UsdAttribute& usdAttr) override;
54 };
55 
56 void zipUVs(const float* u, const float* v, float* uv, const size_t count);
57 void unzipUVs(const float* const uv, float* const u, float* const v, const size_t count);
58 void convert3DArrayTo4DArray(const float* const input, float* const output, size_t count);
59 void convertFloatVec3ArrayToDoubleVec3Array(const float* const input, double* const output, size_t count);
60 void interleaveIndexedUvData(float* output, const float* u, const float* v, const int32_t* indices, const uint32_t numIndices);
61 bool isUvSetDataSparse(const int32_t* uvCounts, const uint32_t count);
62 void generateIncrementingIndices(MIntArray& indices, const size_t count);
63 
64 //----------------------------------------------------------------------------------------------------------------------
65 } // translators
66 } // fileio
67 } // usdmaya
68 } // AL
69 //----------------------------------------------------------------------------------------------------------------------
A class to transfer dag node data between Usd <–> Maya.
Definition: DagNodeTranslator.h:14
parameters for the exporter. These parameters are constructed by any command or file translator that ...
Definition: ExportParams.h:17
static UsdPrim exportObject(UsdStageRefPtr stage, MDagPath mayaPath, const SdfPath &usdPath, const ExporterParams &params)
exports a nurbs curve to the USD file and returns the created prim
static MStatus copyAttributes(const MObject &from, UsdPrim &to, const ExporterParams &params)
Copies data from the maya node onto the usd primitive.
parameters for the importer
Definition: ImportParams.h:18
bool attributeHandled(const UsdAttribute &usdAttr) override
import the dynamic attribute import that we are expected to see some extra subdiv animal logic only d...
static MStatus registerType()
static type registration
A class to transfer mesh data between Usd <–> Maya.
Definition: MeshTranslator.h:17
MObject createNode(const UsdPrim &from, MObject parent, const char *nodeType, const ImporterParams &params) override
Creates a new maya node of the given type and set attributes based on input prim. ...