rfm2  22.0
A python-based rewrite of RenderMan for Maya
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__ (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
 

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

◆ __init__()

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

Member Function Documentation

◆ deregister()

def rfm2.ui.image_swatch.CtlTable.deregister (   self,
  obj 
)
Remove the object reference to allow the Qt object to be
garbage-collected.

◆ find_control()

def rfm2.ui.image_swatch.CtlTable.find_control (   self,
  fullname 
)
Return the cached ImageSwatch python object.

◆ find_pixmap()

def rfm2.ui.image_swatch.CtlTable.find_pixmap (   self,
  image,
  size 
)
Return the cached QPixmap object.

◆ memory_usage()

def rfm2.ui.image_swatch.CtlTable.memory_usage (   self)
Return memory usage for the pixmap cache in MB

◆ register()

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.

◆ register_pixmap()

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.

◆ unique_name()

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

◆ ctls

rfm2.ui.image_swatch.CtlTable.ctls

◆ qpixmaps

rfm2.ui.image_swatch.CtlTable.qpixmaps

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