60        mevis.MLAB.log(message)
 
 
   66        mevis.MLAB.logError(message)
 
 
   80        field = self.
__ctx.field(fieldName)
 
   83                self.
_logError(
"Field (%s) not found in the used context!" % (fieldName))
 
   86            fieldType = field.type
 
   87            if (fieldType 
in (
"Trigger")) 
or fieldValue 
is None:
 
   89                    self.
_logInfo(
"Touched field %s" % (fieldName))
 
  100                    self.
_logInfo(
"Set field %s to value %s" % (fieldName, fieldValue))
 
 
  112        field = self.
__ctx.field(fieldName)
 
  115                self.
_logError(
"Field (%s) not found in the used context!" % (fieldName))
 
 
  136            field = self.
__ctx.field(fieldName)
 
 
 
  154    if "Vector6" in field.type:
 
  155        return field.stringValue()
 
  156    elif "MLBase" in field.type:
 
  157        return field.object()
 
 
  163    if "Vector6" in field.type:
 
  164        if isinstance(fieldValue, (str, bytes)):
 
  165            field.setStringValue(fieldValue)
 
  167            field.setVectorValue(fieldValue)
 
  168    elif "MLBase" in field.type:
 
  169        field.setObject(fieldValue)
 
  171        field.value = fieldValue
 
 
Class to handle field changes and make them revertable.
 
setFieldValue(self, fieldName, fieldValue, verbose=False)
Set the value of a field.
 
__del__(self)
The default destructor.
 
addField(self, fieldName, verbose=False)
Add a field and its value without setting it.
 
enableAutoRevert(self, enable)
 
revert(self)
Revert all changes made.
 
__init__(self, context)
The default constructor.
 
autoRevert(self)
Revert all changes made if auto-revert is enabled.
 
setFieldValue(field, fieldValue)