Cortex  10.0.0-a4
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
IECoreMaya.ParameterUI Class Reference

Base class for objects which are able to create an Attribute Editor widget for a single IECore.Parameter held on an IECoreMaya.ParameterisedHolder node. More...

+ Inheritance diagram for IECoreMaya.ParameterUI:

Public Member Functions

def __init__ (self, parameterisedHolderNode, parameter, topLevelUI, kw)
 The parameterisedHolderNode is an MObject specifying the node holding the specified IECore.Parameter. More...
 
def replace (self, node, parameter)
 Derived classes should override this method. More...
 
def node (self)
 Returns the Maya node associated with this UI in the form of an OpenMaya.MObject.
 
def nodeName (self)
 Returns an umambiguous full path for the Maya node associated with this UI. More...
 
def plug (self)
 Returns the Maya plug associated with this UI in the form an OpenMaya.MPlug.
 
def plugName (self)
 Returns an unambiguous full path to the plug this ui represents. More...
 
def layout (self)
 
def label (self)
 Computes a nice label for the ui. More...
 
def description (self)
 Computes a wrapped annotation/tooltip for the ui.
 
def addDragCallback (self, ctrl, kw)
 
def registerPopupMenuCallback (cls, callback)
 Registers a callback which is able to modify the popup menus associated with ParameterUIs. More...
 
- Public Member Functions inherited from IECoreMaya.UIElement
def __init__ (self, topLevelUI)
 Derived classes must create a ui element which is the parent of the rest of their ui, and call this init function passing it as the topLevelUI parameter. More...
 
def parent (self)
 Returns the UIElement which forms the parent for this one. More...
 

Static Public Member Functions

def registerUI
 
def create (parameterisedHolderNode, parameter, kw)
 Returns a new ParameterUI instance suitable for representing the specified parameter on the specified parameterisedHolderNode. More...
 
- Static Public Member Functions inherited from IECoreMaya.UIElement
def instances
 Returns a list of all the active instances derived from the specified type. More...
 

Public Attributes

 parameter
 

Static Public Attributes

int textColumnWidthIndex = 145
 
int singleWidgetWidthIndex = 70
 
int sliderWidgetWidthIndex = 2
 
dictionary handlers = {}
 

Detailed Description

Base class for objects which are able to create an Attribute Editor widget for a single IECore.Parameter held on an IECoreMaya.ParameterisedHolder node.

Todo:
Separate control drawing from labelling and layout, so these classes just create the right hand side of what they're doing at the moment. Then we can use them in different layouts like spreadsheets and wotnot.

Constructor & Destructor Documentation

def IECoreMaya.ParameterUI.__init__ (   self,
  parameterisedHolderNode,
  parameter,
  topLevelUI,
  kw 
)

The parameterisedHolderNode is an MObject specifying the node holding the specified IECore.Parameter.

Derived class init implementations must create a layout to hold all their contents and pass this in the topLevelUI parameter (as for all UIElement derived classes).

Todo:
Document the meaning of the various keyword arguments - perhaps the names of these should be prefixed with the name of the class which implements each argument so as to make it easier to find the documentation too.

References IECoreMaya.UIElement.__init__(), IECoreMaya.ParameterUI.__labelWithNodeName, IECoreMaya.ParameterUI.__longParameterName, IECoreMaya.ParameterUI.__node, and IECoreMaya.ParameterUI.parameter.

Referenced by IECoreMaya.FnDagNode.defaultShapeName(), and IECoreMaya.ParameterUI.registerPopupMenuCallback().

Member Function Documentation

def IECoreMaya.ParameterUI.create (   parameterisedHolderNode,
  parameter,
  kw 
)
static

Returns a new ParameterUI instance suitable for representing the specified parameter on the specified parameterisedHolderNode.

The node may either be specified as an OpenMaya.MObject or as a string or unicode object representing the node name.

References IECore::RunTimeTyped.baseTypeId(), and IECore::RunTimeTyped.staticTypeId().

Referenced by IECoreMaya.FnDagNode.defaultShapeName().

def IECoreMaya.ParameterUI.label (   self)

Computes a nice label for the ui.

References IECoreMaya.ParameterUI.__labelWithNodeName, IECoreMaya.ParameterUI.__longParameterName, and IECoreMaya.ParameterUI.nodeName().

Referenced by IECoreMaya.FnDagNode.defaultShapeName(), and IECoreMaya.ParameterUI.registerPopupMenuCallback().

def IECoreMaya.ParameterUI.nodeName (   self)

Returns an umambiguous full path for the Maya node associated with this UI.

References IECore::BoundedKDTree< BoundIterator >.node(), IECore::KDTree< PointIterator >.node(), and IECoreMaya.ParameterUI.node().

Referenced by IECoreMaya.ParameterUI.description(), and IECoreMaya.ParameterUI.label().

def IECoreMaya.ParameterUI.plugName (   self)

Returns an unambiguous full path to the plug this ui represents.

References IECoreMaya.UIElement._topLevelUI(), IECore::BoundedKDTree< BoundIterator >.node(), IECore::KDTree< PointIterator >.node(), IECoreMaya.ParameterUI.node(), and IECoreMaya.ParameterUI.parameter.

Referenced by IECoreMaya.ParameterUI.description(), and IECoreMaya.ParameterUI.registerPopupMenuCallback().

def IECoreMaya.ParameterUI.registerPopupMenuCallback (   cls,
  callback 
)

Registers a callback which is able to modify the popup menus associated with ParameterUIs.

The callback should have the following signature :

callback( menuDefinition, parameter, holderNode ).

References IECoreMaya.BoolParameterUI.__checkBox, IECoreMaya.ParameterUI.__init__(), IECore::Parameterised.description(), IECore::ParameterisedProcedural.description(), IECore::Parameter.description(), IECoreMaya.ParameterUI.description(), IECore.MenuItemDefinition.description, IECoreMaya.ParameterUI.label(), IECore::BoundedKDTree< BoundIterator >.node(), IECore::KDTree< PointIterator >.node(), IECoreMaya.ParameterUI.node(), IECoreMaya.ParameterUI.parameter, IECoreMaya.ParameterUI.plugName(), and IECoreMaya.ParameterUI.replace().

Referenced by IECoreMaya.FileDialog.removePreset(), and IECoreMaya.PresetsUI.selectParameters().

def IECoreMaya.ParameterUI.replace (   self,
  node,
  parameter 
)

Derived classes should override this method.

The override should first call the base class method and then reconnect all created widgets to the new node/parameter. The node and parameter arguments are as for the init function.

References IECoreMaya.ParameterUI.__node, and IECoreMaya.ParameterUI.parameter.

Referenced by IECoreMaya.FnDagNode.defaultShapeName(), and IECoreMaya.ParameterUI.registerPopupMenuCallback().


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