Closed shunjiAdsk closed 1 year ago
pymel uses maybeConvert() to convert some of the return values.
res = _factories.maybeConvert(res, _general.PyNode)
maybeConvert()
def maybeConvert(val, castFunc): if isinstance(val, list): try: return [castFunc(x) for x in val] except: return val elif val: try: return castFunc(val) except Exception: return val
If val is int(0),
val
int(0)
elif 0:
maybeConvert() does nothing and returns None.
else:
might be better here.
fixed
pymel uses maybeConvert() to convert some of the return values.
maybeConvert()
If
val
isint(0)
,maybeConvert() does nothing and returns None.
might be better here.