rfm2  22.0
A python-based rewrite of RenderMan for Maya
 All Classes Namespaces Files Functions Variables Pages
rfm2.ui.image_swatch.CtlTable Class Reference
+ Inheritance diagram for rfm2.ui.image_swatch.CtlTable:
+ Collaboration diagram for rfm2.ui.image_swatch.CtlTable:

Public Member Functions

def __init__
 
def register
 
def register_pixmap
 
def deregister
 
def find_control
 
def find_pixmap
 
def memory_usage
 

Static Public Member Functions

def unique_name
 

Public Attributes

 ctls
 
 qpixmaps
 

Detailed Description

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.

Constructor & Destructor Documentation

def rfm2.ui.image_swatch.CtlTable.__init__ (   self)

Member Function Documentation

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.
def rfm2.ui.image_swatch.CtlTable.unique_name (   name,
  func 
)
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.

Member Data Documentation

rfm2.ui.image_swatch.CtlTable.ctls
rfm2.ui.image_swatch.CtlTable.qpixmaps

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