def _python_to_mod(value, plug, mod):
    'Convert `value` into a suitable equivalent for om.MDGModifier\n\n    Arguments:\n        value (object): Value of any type to write into modifier\n        plug (Plug): Plug within which to write value\n        mod (om.MDGModifier): Modifier to use for writing it\n\n    '
    mplug = plug._mplug
    if isinstance(value, (tuple, list)):
        for (index, value) in enumerate(value):
            if isinstance(value, (tuple, list)):
                raise TypeError(('Unsupported nested Python type: %s' % value.__class__))
            _python_to_mod(value, plug[index], mod)
    elif isinstance(value, om.MVector):
        for (index, value) in enumerate(value):
            _python_to_mod(value, plug[index], mod)
    elif isinstance(value, string_types):
        mod.newPlugValueString(mplug, value)
    elif isinstance(value, int):
        mod.newPlugValueInt(mplug, value)
    elif isinstance(value, float):
        mod.newPlugValueFloat(mplug, value)
    elif isinstance(value, bool):
        mod.newPlugValueBool(mplug, value)
    elif isinstance(value, om.MAngle):
        mod.newPlugValueMAngle(mplug, value)
    elif isinstance(value, om.MDistance):
        mod.newPlugValueMDistance(mplug, value)
    elif isinstance(value, om.MTime):
        mod.newPlugValueMTime(mplug, value)
    elif isinstance(value, om.MEulerRotation):
        for (index, value) in enumerate(value):
            value = om.MAngle(value, om.MAngle.kRadians)
            _python_to_mod(value, plug[index], mod)
    else:
        log.warning(('Unsupported plug type for modifier: %s' % type(value)))
        return False
    return True
Convert `value` into a suitable equivalent for om.MDGModifier

Arguments:
    value (object): Value of any type to write into modifier
    plug (Plug): Plug within which to write value
    mod (om.MDGModifier): Modifier to use for writing it
def _python_to_mod(value, plug, mod):
    'Convert `value` into a suitable equivalent for om.MDGModifier\n\n    Arguments:\n        value (object): Value of any type to write into modifier\n        plug (Plug): Plug within which to write value\n        mod (om.MDGModifier): Modifier to use for writing it\n\n    '
    mplug = plug._mplug
    if isinstance(value, (tuple, list)):
        for (index, value) in enumerate(value):
            if isinstance(value, (tuple, list)):
                raise TypeError(('Unsupported nested Python type: %s' % value.__class__))
            _python_to_mod(value, plug[index], mod)
    elif isinstance(value, om.MVector):
        for (index, value) in enumerate(value):
            _python_to_mod(value, plug[index], mod)
    elif isinstance(value, string_types):
        mod.newPlugValueString(mplug, value)
    elif isinstance(value, int):
        mod.newPlugValueInt(mplug, value)
    elif isinstance(value, float):
        mod.newPlugValueFloat(mplug, value)
    elif isinstance(value, bool):
        mod.newPlugValueBool(mplug, value)
    elif isinstance(value, om.MAngle):
        mod.newPlugValueMAngle(mplug, value)
    elif isinstance(value, om.MDistance):
        mod.newPlugValueMDistance(mplug, value)
    elif isinstance(value, om.MTime):
        mod.newPlugValueMTime(mplug, value)
    elif isinstance(value, om.MEulerRotation):
        for (index, value) in enumerate(value):
            value = om.MAngle(value, om.MAngle.kRadians)
            _python_to_mod(value, plug[index], mod)
    else:
        log.warning(('Unsupported plug type for modifier: %s' % type(value)))
        return False
    return True