35 #ifndef IECOREMAYA_FROMMAYASHAPECONVERTER_H
36 #define IECOREMAYA_FROMMAYASHAPECONVERTER_H
38 #include "IECoreMaya/FromMayaObjectConverter.h"
40 #include "IECore/NumericParameter.h"
42 #include "maya/MDagPath.h"
47 IE_CORE_FORWARDDECLARE( Primitive );
54 IE_CORE_FORWARDDECLARE( FromMayaShapeConverter );
71 IECore::IntParameterPtr spaceParameter();
72 IECore::ConstIntParameterPtr spaceParameter()
const;
74 IECore::StringParameterPtr primVarAttrPrefixParameter();
75 IECore::ConstStringParameterPtr primVarAttrPrefixParameter()
const;
101 virtual IECore::ObjectPtr
doConversion(
const MObject &
object, IECore::ConstCompoundObjectPtr operands )
const;
103 virtual IECore::PrimitivePtr
doPrimitiveConversion(
const MObject &
object, IECore::ConstCompoundObjectPtr operands )
const = 0;
105 virtual IECore::PrimitivePtr
doPrimitiveConversion(
const MDagPath &dagPath, IECore::ConstCompoundObjectPtr operands )
const = 0;
108 MSpace::Space
space()
const;
113 const MDagPath *
dagPath(
bool emitSpaceWarnings=
false )
const;
128 static FromMayaShapeConverterPtr creator(
const MDagPath &dagPath );
133 void constructCommon();
134 void addPrimVars(
const MObject &
object, IECore::PrimitivePtr primitive )
const;
138 IECore::IntParameterPtr m_spaceParameter;
139 IECore::StringParameterPtr m_primVarAttrPrefixParameter;
141 typedef FromMayaShapeConverterPtr (*ShapeCreatorFn)(
const MDagPath &
dagPath );
142 typedef std::pair<MFn::Type, IECore::TypeId> ShapeTypes;
143 typedef std::map<ShapeTypes, ShapeCreatorFn> ShapeTypesToFnsMap;
144 typedef std::map<MFn::Type, ShapeTypesToFnsMap::const_iterator> DefaultConvertersMap;
146 static ShapeTypesToFnsMap &shapeTypesToFns();
147 static DefaultConvertersMap &defaultConverters();
148 static void registerShapeConverter(
const MFn::Type fromType,
IECore::TypeId resultType,
bool defaultConverter, ShapeCreatorFn creator );
154 #include "IECoreMaya/FromMayaShapeConverter.inl"
156 #endif // IECOREMAYA_FROMMAYASHAPECONVERTER_H
Definition: FromMayaObjectConverter.h:53
virtual IECore::PrimitivePtr doPrimitiveConversion(const MObject &object, IECore::ConstCompoundObjectPtr operands) const =0
Must be implemented by derived classes to return a Primitive created to represent the specified objec...
virtual IECore::ObjectPtr doConversion(const MObject &object, IECore::ConstCompoundObjectPtr operands) const
MSpace::Space space() const
The space in which derived classes should convert the object.
const std::string & description() const
Returns a description for this parameterised object.
TypeId
Definition: TypeIds.h:46
Definition: FromMayaShapeConverter.h:58
The IECoreMaya namespace holds all the functionality of libIECoreMaya.
Definition: BoolParameterHandler.h:44
static FromMayaShapeConverterPtr create(const MDagPath &dagPath, IECore::TypeId resultType=IECore::InvalidTypeId)
Definition: FromMayaShapeConverter.h:118
const MDagPath * dagPath(bool emitSpaceWarnings=false) const
This namespace contains all components of the core library.
Definition: AddSmoothSkinningInfluencesOp.h:43
Description(MFn::Type fromType, IECore::TypeId resultType, bool defaultConversion)