35 #ifndef IECOREMAYA_FROMMAYADAGNODECONVERTER_H
36 #define IECOREMAYA_FROMMAYADAGNODECONVERTER_H
38 #include "IECoreMaya/FromMayaObjectConverter.h"
40 #include "maya/MDagPath.h"
41 #include "maya/MTypeId.h"
46 IE_CORE_FORWARDDECLARE( FromMayaDagNodeConverter );
60 static FromMayaDagNodeConverterPtr
create(
const MDagPath &dagPath,
IECore::TypeId resultType=IECore::InvalidTypeId );
71 virtual IECore::ObjectPtr
doConversion(
const MObject &
object, IECore::ConstCompoundObjectPtr operands )
const;
73 virtual IECore::ObjectPtr
doConversion(
const MDagPath &dagPath, IECore::ConstCompoundObjectPtr operands )
const = 0;
89 static FromMayaDagNodeConverterPtr creator(
const MDagPath &dagPath );
96 typedef FromMayaDagNodeConverterPtr (*CreatorFn)(
const MDagPath &dagPath );
97 typedef std::pair<MFn::Type, unsigned > MayaType;
98 typedef std::pair< MayaType, IECore::TypeId > Types;
99 typedef std::map< Types, CreatorFn > TypesToFnsMap;
100 typedef std::map< MayaType, TypesToFnsMap::const_iterator> DefaultConvertersMap;
102 static TypesToFnsMap &typesToFns();
103 static DefaultConvertersMap &defaultConverters();
104 static void registerConverter(
const MayaType fromType,
IECore::TypeId resultType,
bool defaultConverter, CreatorFn creator );
110 #include "IECoreMaya/FromMayaDagNodeConverter.inl"
112 #endif // IECOREMAYA_FROMMAYADAGNODECONVERTER_H
Definition: FromMayaObjectConverter.h:53
virtual IECore::ObjectPtr doConversion(const MObject &object, IECore::ConstCompoundObjectPtr operands) const
No need to override this in derived classes - override the function below instead.
const std::string & description() const
Returns a description for this parameterised object.
static FromMayaDagNodeConverterPtr create(const MDagPath &dagPath, IECore::TypeId resultType=IECore::InvalidTypeId)
Description(MFn::Type fromType, IECore::TypeId resultType, bool defaultConversion)
use this constructor to register a converter for a native maya node:
Definition: FromMayaDagNodeConverter.h:78
TypeId
Definition: TypeIds.h:46
Definition: FromMayaDagNodeConverter.h:50
The IECoreMaya namespace holds all the functionality of libIECoreMaya.
Definition: BoolParameterHandler.h:44