Stash Software API  2.0.0
Public Member Functions | Static Public Member Functions | List of all members
sMayaCore.optionVarLib.OptionVar Class Reference

[ CLASS ] - Class provides functionalities to operate on optionVar in Maya. More...

Inheritance diagram for sMayaCore.optionVarLib.OptionVar:

Public Member Functions

def __init__ (self, name)
 Constructor. More...
 
def name (self)
 Name of the option variable. More...
 
def exists (self)
 Check whether the option variable exists. More...
 
def remove (self)
 Remove the option variable. More...
 
def setValue (self, value)
 Set value of the option variable. More...
 
def value (self)
 Get the value of the option variable. More...
 

Static Public Member Functions

def list ()
 List all option variables. More...
 

Detailed Description

[ CLASS ] - Class provides functionalities to operate on optionVar in Maya.

import sys
optionVar = sMayaCore.optionVarLib.OptionVar('lastSelectedObject')
sys.stdout.write(optionVar.exists())
# False
optionVar.setValue('cube1')
sys.stdout.write(optionVar.exists())
# True
sys.stdout.write(optionVar.value())
# cube1
sys.stdout.write(optionVar.name())
# lastSelectedObject

Constructor & Destructor Documentation

◆ __init__()

def sMayaCore.optionVarLib.OptionVar.__init__ (   self,
  name 
)

Constructor.

Parameters
name[ str | None | in ] - Name of the variable.
Exceptions
N/A
Returns
None

Member Function Documentation

◆ name()

def sMayaCore.optionVarLib.OptionVar.name (   self)

Name of the option variable.

Exceptions
N/A
Returns
str - Name of the option variable.
None - If name is not set.

◆ exists()

def sMayaCore.optionVarLib.OptionVar.exists (   self)

Check whether the option variable exists.

Exceptions
N/A
Returns
bool - Result.

◆ remove()

def sMayaCore.optionVarLib.OptionVar.remove (   self)

Remove the option variable.

Exceptions
N/A
Returns
None

◆ setValue()

def sMayaCore.optionVarLib.OptionVar.setValue (   self,
  value 
)

Set value of the option variable.

Parameters
value[ int, float, str | None | in ] - Value to be set.
Exceptions
N/A
Returns
None

◆ value()

def sMayaCore.optionVarLib.OptionVar.value (   self)

Get the value of the option variable.

Exceptions
N/A
Returns
int, float, str - Value of the option variable.
None - If option variable doesn't exist.

◆ list()

def sMayaCore.optionVarLib.OptionVar.list ( )
static

List all option variables.

Exceptions
N/A
Returns
str list - Option variables

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