Cortex  10.0.0-a4
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
IECoreMaya::FromMayaShapeConverter Class Referenceabstract

#include <FromMayaShapeConverter.h>

+ Inheritance diagram for IECoreMaya::FromMayaShapeConverter:

Classes

class  Description
 

Public Types

enum  Space { Object = 0, World = 1 }
 
- Public Types inherited from IECore::RunTimeTyped
typedef RefCounted BaseClass
 A typedef for the class this class derives from. All RunTimeTyped classes define this typedef.
 
- Public Types inherited from IECore::RefCounted
typedef size_t RefCount
 

Public Member Functions

 IE_CORE_DECLARERUNTIMETYPEDEXTENSION (FromMayaShapeConverter, FromMayaShapeConverterTypeId, FromMayaObjectConverter)
 
IECore::IntParameterPtr spaceParameter ()
 
IECore::ConstIntParameterPtr spaceParameter () const
 
IECore::StringParameterPtr primVarAttrPrefixParameter ()
 
IECore::ConstStringParameterPtr primVarAttrPrefixParameter () const
 
- Public Member Functions inherited from IECoreMaya::FromMayaObjectConverter
 IE_CORE_DECLARERUNTIMETYPEDEXTENSION (FromMayaObjectConverter, FromMayaObjectConverterTypeId, FromMayaConverter)
 
const MObject & object () const
 
bool objectIsAlive () const
 
IECore::StringParameterPtr blindDataAttrPrefixParameter ()
 
IECore::ConstStringParameterPtr blindDataAttrPrefixParameter () const
 
IECore::BoolParameterPtr blindDataRemoveNamespaceParameter ()
 
IECore::ConstBoolParameterPtr blindDataRemoveNamespaceParameter () const
 
- Public Member Functions inherited from IECoreMaya::FromMayaConverter
 IE_CORE_DECLARERUNTIMETYPEDEXTENSION (FromMayaConverter, FromMayaConverterTypeId, IECore::ToCoreConverter)
 
- Public Member Functions inherited from IECore::ToCoreConverter
 IE_CORE_DECLARERUNTIMETYPED (ToCoreConverter, Converter)
 
IECore::ObjectPtr convert () const
 
- Public Member Functions inherited from IECore::Converter
 IE_CORE_DECLARERUNTIMETYPED (Converter, Parameterised)
 
- Public Member Functions inherited from IECore::Parameterised
 IE_CORE_DECLARERUNTIMETYPED (Parameterised, RunTimeTyped)
 
 Parameterised (const std::string &description)
 
 Parameterised (const std::string &description, CompoundParameterPtr compoundParameter)
 Another constructor added later on that gives defines the CompoundParameter object to be hold in this Parameterised instance.
 
const std::string & description () const
 Returns a description for this parameterised object.
 
CompoundParameterparameters () override
 
const CompoundParameterparameters () const override
 Returns the parameters for query.
 
CompoundObjectuserData ()
 Returns an object that anyone can use for storing anything.
 
const CompoundObjectuserData () const
 Read only version of the above.
 
- Public Member Functions inherited from IECore::RunTimeTyped
 IE_CORE_DECLAREMEMBERPTR (RunTimeTyped)
 
virtual TypeId typeId () const
 
virtual const char * typeName () const
 
virtual bool isInstanceOf (TypeId typeId) const
 
virtual bool isInstanceOf (const char *typeName) const
 
- Public Member Functions inherited from IECore::RefCounted
 IE_CORE_DECLAREMEMBERPTR (RefCounted)
 
void addRef () const
 Add a reference to the current object.
 
void removeRef () const
 Remove a reference from the current object.
 
RefCount refCount () const
 Returns the current reference count.
 

Static Public Member Functions

Factory

These functions allow the creation of a specific converter subclass appropriate to a particular MDagPath instance.

static FromMayaShapeConverterPtr create (const MDagPath &dagPath, IECore::TypeId resultType=IECore::InvalidTypeId)
 
- Static Public Member Functions inherited from IECoreMaya::FromMayaObjectConverter
static FromMayaObjectConverterPtr create (const MObject &object, IECore::TypeId resultType=IECore::InvalidTypeId)
 
- Static Public Member Functions inherited from IECore::RunTimeTyped
static TypeId staticTypeId ()
 Returns the TypeId for this class, without needing an instance.
 
static const char * staticTypeName ()
 Returns the type name for this class, without needing an instance.
 
static TypeId baseTypeId ()
 
static const char * baseTypeName ()
 
static bool inheritsFrom (TypeId typeId)
 Returns true if this class inherits from the specified type.
 
static bool inheritsFrom (const char *typeName)
 Returns true if this class inherits from the specified type.
 
static bool inheritsFrom (TypeId type, TypeId baseType)
 Returns true if type inherits from baseType.
 
static bool inheritsFrom (const char *typeName, const char *baseTypeName)
 Returns true if typeName inherits from baseTypeName.
 
static TypeId baseTypeId (TypeId typeId)
 Returns the base type of the given type, or InvalidTypeId if no such base exists.
 
static const std::vector< TypeId > & baseTypeIds (TypeId typeId)
 
static const std::set< TypeId > & derivedTypeIds (TypeId typeId)
 
static TypeId typeIdFromTypeName (const char *typeName)
 
static const char * typeNameFromTypeId (TypeId typeId)
 
static void registerType (TypeId derivedTypeId, const char *derivedTypeName, TypeId baseTypeId)
 Allows external modules to register their own type ids.
 

Protected Member Functions

 FromMayaShapeConverter (const std::string &description, const MObject &object)
 
 FromMayaShapeConverter (const std::string &description, const MDagPath &dagPath)
 
virtual IECore::ObjectPtr doConversion (const MObject &object, IECore::ConstCompoundObjectPtr operands) const
 
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 object.
 
virtual IECore::PrimitivePtr doPrimitiveConversion (const MDagPath &dagPath, IECore::ConstCompoundObjectPtr operands) const =0
 Must be implemented by derived classes to return a Primitive created to represent the specified object.
 
MSpace::Space space () const
 The space in which derived classes should convert the object.
 
const MDagPath * dagPath (bool emitSpaceWarnings=false) const
 
- Protected Member Functions inherited from IECoreMaya::FromMayaObjectConverter
 FromMayaObjectConverter (const std::string &description, const MObject &object)
 
virtual IECore::ObjectPtr doConversion (IECore::ConstCompoundObjectPtr operands) const
 
- Protected Member Functions inherited from IECoreMaya::FromMayaConverter
 FromMayaConverter (const std::string &description)
 
- Protected Member Functions inherited from IECore::ToCoreConverter
 ToCoreConverter (const std::string &description)
 
- Protected Member Functions inherited from IECore::Converter
 Converter (const std::string &description)
 

Additional Inherited Members

- Protected Types inherited from IECoreMaya::FromMayaObjectConverter
typedef FromMayaObjectConverterPtr(* CreatorFn) (const MObject &object)
 
- Protected Types inherited from IECore::RunTimeTyped
typedef std::map< TypeId, TypeIdBaseTypeRegistryMap
 
typedef std::map< TypeId, std::vector< TypeId > > BaseTypesRegistryMap
 
typedef std::map< TypeId, std::set< TypeId > > DerivedTypesRegistryMap
 
typedef tbb::spin_rw_mutex Mutex
 
typedef std::map< TypeId, std::string > TypeIdsToTypeNamesMap
 
typedef std::map< std::string, TypeIdTypeNamesToTypeIdsMap
 
- Static Protected Member Functions inherited from IECoreMaya::FromMayaObjectConverter
static void registerConverter (const MFn::Type fromType, IECore::TypeId resultType, bool defaultConversion, CreatorFn creator)
 
- Static Protected Member Functions inherited from IECore::RunTimeTyped
static BaseTypeRegistryMap & baseTypeRegistry ()
 
static DerivedTypesRegistryMap & derivedTypesRegistry ()
 
static BaseTypesRegistryMap & completeBaseTypesRegistry ()
 
static DerivedTypesRegistryMap & completeDerivedTypesRegistry ()
 
static void derivedTypeIdsWalk (TypeId typeId, std::set< TypeId > &)
 
static TypeIdsToTypeNamesMap & typeIdsToTypeNames ()
 
static TypeNamesToTypeIdsMap & typeNamesToTypeIds ()
 
- Static Protected Attributes inherited from IECore::RunTimeTyped
static Mutex g_baseTypeIdsMutex
 
static Mutex g_derivedTypeIdsMutex
 

Detailed Description

The FromMayaShapeConverter class forms an abstract base class for converting maya shape objects into IECore::Primitive objects.

Constructor & Destructor Documentation

IECoreMaya::FromMayaShapeConverter::FromMayaShapeConverter ( const std::string &  description,
const MDagPath &  dagPath 
)
protected

This form is necessary if people want to get the shape in world space - world space queries only ever work with an MDagPath.

Member Function Documentation

static FromMayaShapeConverterPtr IECoreMaya::FromMayaShapeConverter::create ( const MDagPath &  dagPath,
IECore::TypeId  resultType = IECore::InvalidTypeId 
)
static

Creates a converter which will convert the given object to an IECore::Object of the type specified by resultType - the default value specifies that any result will do. Returns 0 if no suitable converter can be found. Where possible this should be used in preference to the FromMayaObjectConverter factory function, as constructing a converter from an MDagPath provides additional functionality (for instance correct world space queries).

const MDagPath* IECoreMaya::FromMayaShapeConverter::dagPath ( bool  emitSpaceWarnings = false) const
protected

Returns the dag path for the shape to be converted. This may return false, in which case object() should be converted instead. Generally derived classes shouldn't need this method as they can just implement the two doPrimitiveConversion() methods above, and this class will call the appropriate one. If emitSpaceWarnings is true, then a warning is emitted if there is no valid dag path available and the space parameter is set to world.

virtual IECore::ObjectPtr IECoreMaya::FromMayaShapeConverter::doConversion ( const MObject &  object,
IECore::ConstCompoundObjectPtr  operands 
) const
protectedvirtual

Implemented to call doPrimitiveConversion(), and then add on primitive variables specified as dynamic attributes on the object begin converted. Derived classes need not reimplement this function, but should instead implement doPrimitiveConversion().

Implements IECoreMaya::FromMayaObjectConverter.


The documentation for this class was generated from the following file: