You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The setMin and setMax methods on pymel.core.general.Attribute no longer appear to work in PyMEL 1.4.0. When calling them they silently fail, and don't actually set a minimum or maximum. Example:
There are two extra overloads after the setRange implementation.
e.g.,
@overload
def setRange(self, range):
# type: (Tuple[Optional[float], Optional[float]]) -> None
pass
@overload
def setRange(self, newMin, newMax):
# type: (Optional[float], Optional[float]) -> None
pass
def setRange(self, *args):
# type: (*Union[Optional[float], Tuple[Optional[float], Optional[float]]]) -> None
"""provide a min and max value as a two-element tuple or list, or as two arguments to the
method. To remove a limit, provide a None value. for example:
>>> from pymel.core import *
>>> s = polyCube()[0]
>>> s.addAttr( 'new' )
>>> s.new.setRange( -2, None ) #sets just the min to -2 and removes the max limit
>>> s.new.setMax( 3 ) # sets just the max value and leaves the min at its previous default
>>> s.new.getRange()
[-2.0, 3.0]
"""
self._setRange('hard', *args)
@overload
def setRange(self, range):
# type: (Tuple[Optional[float], Optional[float]]) -> None
pass
@overload
def setRange(self, newMin, newMax):
# type: (Optional[float], Optional[float]) -> None
pass
The
setMin
andsetMax
methods onpymel.core.general.Attribute
no longer appear to work in PyMEL 1.4.0. When calling them they silently fail, and don't actually set a minimum or maximum. Example:In PyMEL 1.1.0 / Maya 2020, this correctly prints
(0.0, 1.0)
.In PyMEL 1.4.0, it incorrectly prints
None None
.I'm not sure at which point exactly this bug was introduced.
The text was updated successfully, but these errors were encountered: