rfm2  22.0
A python-based rewrite of RenderMan for Maya
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__ (self, name, **kwargs)
 
def load_image (self, image)
 
def set_node_attr (self, nattr)
 
def __del__ (self)
 

Static Public Member Functions

def image_size (iceimg)
 

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

◆ __init__()

def rfm2.ui.image_swatch.ImageSwatch.__init__ (   self,
  name,
**  kwargs 
)

◆ __del__()

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

Member Function Documentation

◆ image_size()

def rfm2.ui.image_swatch.ImageSwatch.image_size (   iceimg)
static
Return a width, height tuple.

◆ load_image()

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:

◆ set_node_attr()

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

◆ defaultImage

rfm2.ui.image_swatch.ImageSwatch.defaultImage

◆ image

rfm2.ui.image_swatch.ImageSwatch.image

◆ kNoPreviewString

string rfm2.ui.image_swatch.ImageSwatch.kNoPreviewString = 'No Preview'
static

◆ kUnreadable

string rfm2.ui.image_swatch.ImageSwatch.kUnreadable = 'Un-readable image'
static

◆ nattr

rfm2.ui.image_swatch.ImageSwatch.nattr

◆ qpixmap

rfm2.ui.image_swatch.ImageSwatch.qpixmap

◆ scriptJob

rfm2.ui.image_swatch.ImageSwatch.scriptJob

◆ size

rfm2.ui.image_swatch.ImageSwatch.size

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