I am new to python and I am trying to do a simple script to find all the floatConstant nodes in the Hypershade named "rangeImput#" and update all the values at once.
However, it returns this error: 'NoneType' object is not iterable #
The funny thing is; if I create the script to change what is selected manually it works, but selecting the node by its name doesn't. Any help is much appreciated.
from maya import cmds
selection = cmds.select("*rangeImput*", allDagObjects=False, noExpand=True)
newRange= 30
for x in selection:
cmds.setAttr (x +".inFloat", newRange)