rfm2
22.0
A python-based rewrite of RenderMan for Maya
|
Public Member Functions | |
def | __init__ (self) |
def | register (self, obj) |
def | register_pixmap (self, obj) |
def | deregister (self, obj) |
def | find_control (self, fullname) |
def | find_pixmap (self, image, size) |
def | memory_usage (self) |
Static Public Member Functions | |
def | unique_name (name, func) |
Public Attributes | |
ctls | |
qpixmaps | |
A class to cache maya control objects for later use. It also provides pixmap caching to memory to avoid constant reloads. Attributes: ctls (dict): the object cache qpixmaps (dict): the QPixmap cache.
def rfm2.ui.image_swatch.CtlTable.__init__ | ( | self | ) |
def rfm2.ui.image_swatch.CtlTable.deregister | ( | self, | |
obj | |||
) |
Remove the object reference to allow the Qt object to be garbage-collected.
def rfm2.ui.image_swatch.CtlTable.find_control | ( | self, | |
fullname | |||
) |
Return the cached ImageSwatch python object.
def rfm2.ui.image_swatch.CtlTable.find_pixmap | ( | self, | |
image, | |||
size | |||
) |
Return the cached QPixmap object.
def rfm2.ui.image_swatch.CtlTable.memory_usage | ( | self | ) |
Return memory usage for the pixmap cache in MB
def rfm2.ui.image_swatch.CtlTable.register | ( | self, | |
obj | |||
) |
Register an ImageSwatch object in our cache. We need to maintain a reference to our objects to avoid garbage-collection. The objects are cached in a dict where the key is maya's full path name to the control. Args: - obj (ImageSwatch): The object to be cached.
def rfm2.ui.image_swatch.CtlTable.register_pixmap | ( | self, | |
obj | |||
) |
cache the texture if possible. We cache the object's QPixmap. Args: - obj (ImageSwatch): The object containing the pixmap to be cached.
|
static |
return a globally unique name. Args: - name (str): the name passed by the user. - func (str): the maya.cmds func use to test for a control/layout's exitence. Returns: - a globally unique control name.
rfm2.ui.image_swatch.CtlTable.ctls |
rfm2.ui.image_swatch.CtlTable.qpixmaps |