rfm2
22.0
A python-based rewrite of RenderMan for Maya
|
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' |
Class inheriting from MayaQWidgetBaseMixin to make sure the widget is registered by Maya and QLabel to display the image.
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.
|
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.
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.
rfm2.ui.image_swatch.ImageSwatch.defaultImage |
rfm2.ui.image_swatch.ImageSwatch.image |
|
static |
|
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 |