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

Public Member Functions

def __init__
 
def load_image
 
def set_node_attr
 
def __del__
 

Static Public Member Functions

def image_size
 

Public Attributes

 defaultImage
 
 image
 
 size
 
 qpixmap
 
 scriptJob
 
 nattr
 

Static Public Attributes

string kNoPreviewString = 'No Preview'
 
string kUnreadable = 'Un-readable image'
 

Detailed Description

Class inheriting from MayaQWidgetBaseMixin to make sure the widget is
registered by Maya and QLabel to display the image.

Constructor & Destructor Documentation

def rfm2.ui.image_swatch.ImageSwatch.__init__ (   self,
  name,
  kwargs 
)
def rfm2.ui.image_swatch.ImageSwatch.__del__ (   self)
Remove the object from the global table so it may be
garbage-collected.

Member Function Documentation

def rfm2.ui.image_swatch.ImageSwatch.image_size (   iceimg)
static
Return a width, height tuple.
def rfm2.ui.image_swatch.ImageSwatch.load_image (   self,
  image 
)
Load the image. We first try with Qt and fallback to Ice if need be.
Once the image has been loaded, it is cached in memory for later use by
calling __CTL_TABLE__.register_pixmap(self).

Args:
- image (str): name or path to the image. If a non-absolute path is provided,
       we prepend the path with the rfm icon path.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def rfm2.ui.image_swatch.ImageSwatch.set_node_attr (   self,
  nattr 
)
Associate the editor with a specific node attr and sets the editor
value to the attribute's current value. We use scriptJobs to handle
automate updates.

Args:
- nattr (str): string plug containing the image name/path.

+ Here is the call graph for this function:

Member Data Documentation

rfm2.ui.image_swatch.ImageSwatch.defaultImage
rfm2.ui.image_swatch.ImageSwatch.image
string rfm2.ui.image_swatch.ImageSwatch.kNoPreviewString = 'No Preview'
static
string rfm2.ui.image_swatch.ImageSwatch.kUnreadable = 'Un-readable image'
static
rfm2.ui.image_swatch.ImageSwatch.nattr
rfm2.ui.image_swatch.ImageSwatch.qpixmap
rfm2.ui.image_swatch.ImageSwatch.scriptJob
rfm2.ui.image_swatch.ImageSwatch.size

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