35 #ifndef IE_COREMAYA_PARAMETERHANDLER_H
36 #define IE_COREMAYA_PARAMETERHANDLER_H
40 #include "IECore/RefCounted.h"
41 #include "IECore/TypeIds.h"
42 #include "IECore/Object.h"
43 #include "IECore/Parameter.h"
45 #include "maya/MObject.h"
46 #include "maya/MString.h"
47 #include "maya/MPlug.h"
52 class ParameterHandler;
53 IE_CORE_DECLAREPTR( ParameterHandler );
66 static MPlug
create( IECore::ConstParameterPtr parameter,
const MString &plugName, MObject &node );
72 static MStatus
update( IECore::ConstParameterPtr parameter, MPlug &plug );
74 static MStatus
setValue( IECore::ConstParameterPtr parameter, MPlug &plug );
76 static MStatus
setValue(
const MPlug &plug, IECore::ParameterPtr parameter );
79 static MStatus
restore(
const MPlug &plug, IECore::ParameterPtr parameter );
94 friend class ObjectParameterHandler;
97 static ConstParameterHandlerPtr
create( IECore::ConstParameterPtr parameter );
99 static ConstParameterHandlerPtr
create( IECore::ConstObjectPtr
object );
106 MPlug
finishCreating( IECore::ConstParameterPtr parameter, MPlug &plug )
const;
108 MPlug
finishCreating( IECore::ConstParameterPtr parameter, MObject &attribute, MObject &node )
const;
115 MStatus
finishUpdating( IECore::ConstParameterPtr parameter, MPlug &plug )
const;
117 MStatus
finishUpdating( IECore::ConstParameterPtr parameter, MObject &attribute, MObject &node )
const;
119 virtual MPlug doCreate( IECore::ConstParameterPtr parameter,
const MString &plugName, MObject &node )
const = 0;
120 virtual MStatus doUpdate( IECore::ConstParameterPtr parameter, MPlug &plug )
const = 0;
121 virtual MStatus doSetValue( IECore::ConstParameterPtr parameter, MPlug &plug )
const = 0;
122 virtual MStatus doSetValue(
const MPlug &plug, IECore::ParameterPtr parameter )
const = 0;
123 virtual MStatus doRestore(
const MPlug &plug, IECore::ParameterPtr parameter )
const;
129 typedef std::map<IECore::TypeId, ConstParameterHandlerPtr> HandlerMap;
131 static HandlerMap &handlers();
136 #include "IECoreMaya/ParameterHandler.inl"
138 #endif // IE_COREMAYA_PARAMETERHANDLER_H
static MStatus restore(const MPlug &plug, IECore::ParameterPtr parameter)
static MStatus setValue(IECore::ConstParameterPtr parameter, MPlug &plug)
Sets the value of plug to reflect the value of parameter.
MStatus finishUpdating(IECore::ConstParameterPtr parameter, MPlug &plug) const
Definition: ParameterHandler.h:57
static MPlug create(IECore::ConstParameterPtr parameter, const MString &plugName, MObject &node)
TypeId
Definition: TypeIds.h:46
MPlug finishCreating(IECore::ConstParameterPtr parameter, MPlug &plug) const
The IECoreMaya namespace holds all the functionality of libIECoreMaya.
Definition: BoolParameterHandler.h:44
Definition: RefCounted.h:124
static MStatus update(IECore::ConstParameterPtr parameter, MPlug &plug)