OLD | NEW |
1 //-***************************************************************************** | 1 //-***************************************************************************** |
2 // | 2 // |
3 // Copyright (c) 2009-2011, | 3 // Copyright (c) 2009-2011, |
4 // Sony Pictures Imageworks, Inc. and | 4 // Sony Pictures Imageworks, Inc. and |
5 // Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. | 5 // Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. |
6 // | 6 // |
7 // All rights reserved. | 7 // All rights reserved. |
8 // | 8 // |
9 // Redistribution and use in source and binary forms, with or without | 9 // Redistribution and use in source and binary forms, with or without |
10 // modification, are permitted provided that the following conditions are | 10 // modification, are permitted provided that the following conditions are |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 #include <vector> | 45 #include <vector> |
46 #include <string> | 46 #include <string> |
47 | 47 |
48 #include <Alembic/Abc/IArrayProperty.h> | 48 #include <Alembic/Abc/IArrayProperty.h> |
49 #include <Alembic/Abc/IScalarProperty.h> | 49 #include <Alembic/Abc/IScalarProperty.h> |
50 #include <Alembic/Abc/IObject.h> | 50 #include <Alembic/Abc/IObject.h> |
51 | 51 |
52 #include <Alembic/AbcGeom/ICamera.h> | 52 #include <Alembic/AbcGeom/ICamera.h> |
53 #include <Alembic/AbcGeom/ICurves.h> | 53 #include <Alembic/AbcGeom/ICurves.h> |
| 54 #include <Alembic/AbcGeom/INuPatch.h> |
54 #include <Alembic/AbcGeom/IPoints.h> | 55 #include <Alembic/AbcGeom/IPoints.h> |
55 #include <Alembic/AbcGeom/IPolyMesh.h> | 56 #include <Alembic/AbcGeom/IPolyMesh.h> |
56 #include <Alembic/AbcGeom/ISubD.h> | 57 #include <Alembic/AbcGeom/ISubD.h> |
57 #include <Alembic/AbcGeom/IXform.h> | 58 #include <Alembic/AbcGeom/IXform.h> |
58 | 59 |
| 60 // one or the other will be valid (it's too complex for a union) |
| 61 struct Prop |
| 62 { |
| 63 Alembic::Abc::IArrayProperty mArray; |
| 64 Alembic::Abc::IScalarProperty mScalar; |
| 65 }; |
| 66 |
59 bool addProp(Alembic::Abc::IArrayProperty & iProp, MObject & iParent); | 67 bool addProp(Alembic::Abc::IArrayProperty & iProp, MObject & iParent); |
60 | 68 |
61 void addProps(Alembic::Abc::ICompoundProperty & iParent, MObject & iObject); | 69 void addProps(Alembic::Abc::ICompoundProperty & iParent, MObject & iObject); |
62 | 70 |
63 void readProp(double iFrame, Alembic::Abc::IArrayProperty & iProp, | 71 void readProp(double iFrame, Alembic::Abc::IArrayProperty & iProp, |
64 MDataHandle & iHandle); | 72 MDataHandle & iHandle); |
65 | 73 |
66 void getAnimatedProps(Alembic::Abc::ICompoundProperty & iParent, | 74 void getAnimatedProps(Alembic::Abc::ICompoundProperty & iParent, |
67 std::vector<Alembic::Abc::IArrayProperty> & oPropList); | 75 std::vector<Prop> & oPropList); |
68 | |
69 | 76 |
70 // This class is used for connecting to sampled transform operations and | 77 // This class is used for connecting to sampled transform operations and |
71 // properties in order to keep the list of names of sampled channels | 78 // properties in order to keep the list of names of sampled channels |
72 // associated with a particular MObject (mObject) | 79 // associated with a particular MObject (mObject) |
73 class SampledPair | 80 class SampledPair |
74 { | 81 { |
75 public: | 82 public: |
76 SampledPair(MObject & iObject, std::vector<std::string> & sN): | 83 SampledPair(MObject & iObject, std::vector<std::string> & sN): |
77 mObject(iObject), sampleNameList(sN) | 84 mObject(iObject), sampleNameList(sN) |
78 { | 85 { |
(...skipping 25 matching lines...) Expand all Loading... |
104 // A data class for cleaner code when copying a group of info between functions | 111 // A data class for cleaner code when copying a group of info between functions |
105 class WriterData | 112 class WriterData |
106 { | 113 { |
107 public: | 114 public: |
108 WriterData(); | 115 WriterData(); |
109 WriterData(const WriterData & rhs); | 116 WriterData(const WriterData & rhs); |
110 WriterData & operator=(const WriterData & rhs); | 117 WriterData & operator=(const WriterData & rhs); |
111 void getFrameRange(double & oMin, double & oMax); | 118 void getFrameRange(double & oMin, double & oMax); |
112 | 119 |
113 std::vector<MObject> mCameraObjList; | 120 std::vector<MObject> mCameraObjList; |
| 121 std::vector<MObject> mLocObjList; |
| 122 std::vector<MObject> mNurbsObjList; |
114 std::vector<MObject> mNurbsCurveObjList; | 123 std::vector<MObject> mNurbsCurveObjList; |
115 std::vector<MObject> mPointsObjList; | 124 std::vector<MObject> mPointsObjList; |
116 std::vector<MObject> mPolyMeshObjList; | 125 std::vector<MObject> mPolyMeshObjList; |
117 std::vector<MObject> mSubDObjList; | 126 std::vector<MObject> mSubDObjList; |
118 | 127 |
119 // will be used once we have more schemas implemented | 128 std::vector<Prop> mPropList; |
120 /* | |
121 std::vector<MObject> mNurbsSurfaceObjList; | |
122 */ | |
123 | |
124 std::vector<Alembic::Abc::IArrayProperty> mPropList; | |
125 std::vector<Alembic::AbcGeom::ICamera> mCameraList; | 129 std::vector<Alembic::AbcGeom::ICamera> mCameraList; |
126 std::vector<Alembic::AbcGeom::ICurves> mCurvesList; | 130 std::vector<Alembic::AbcGeom::ICurves> mCurvesList; |
| 131 std::vector<Alembic::AbcGeom::IXform> mLocList; |
| 132 std::vector<Alembic::AbcGeom::INuPatch> mNurbsList; |
127 std::vector<Alembic::AbcGeom::IPolyMesh> mPolyMeshList; | 133 std::vector<Alembic::AbcGeom::IPolyMesh> mPolyMeshList; |
128 std::vector<Alembic::AbcGeom::IPoints> mPointsList; | 134 std::vector<Alembic::AbcGeom::IPoints> mPointsList; |
129 std::vector<Alembic::AbcGeom::ISubD> mSubDList; | 135 std::vector<Alembic::AbcGeom::ISubD> mSubDList; |
130 std::vector<Alembic::AbcGeom::IXform> mXformList; | 136 std::vector<Alembic::AbcGeom::IXform> mXformList; |
131 | 137 |
132 // number of curves for each animated curve group | 138 // number of curves for each animated curve group |
133 std::vector<std::size_t> mNumCurves; | 139 std::vector<std::size_t> mNumCurves; |
134 std::vector<bool> mIsComplexXform; | 140 std::vector<bool> mIsComplexXform; |
135 | 141 |
136 // only needed when doing connections | 142 // only needed when doing connections |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 }; // ArgData | 175 }; // ArgData |
170 | 176 |
171 // traverse and create the corresponding maya hierarchy | 177 // traverse and create the corresponding maya hierarchy |
172 MString createScene(ArgData & iArgData); | 178 MString createScene(ArgData & iArgData); |
173 | 179 |
174 // Called in createScene only if there are sampled data in the scene. | 180 // Called in createScene only if there are sampled data in the scene. |
175 // This function sets up the connections to AlembicNode | 181 // This function sets up the connections to AlembicNode |
176 MString connectAttr(ArgData & iArgData); | 182 MString connectAttr(ArgData & iArgData); |
177 | 183 |
178 #endif // ABCIMPORT_NODE_ITERATOR_HELPER_H_ | 184 #endif // ABCIMPORT_NODE_ITERATOR_HELPER_H_ |
OLD | NEW |