hey, I’m attempting to build a basic auto rigger in pyhton in maya, following this tutorial https://www.youtube.com/watch?v=4rcDrbgD1zI
I’ll probably run into more problems ahead and I’ll probably also post them here haha, but so far…
here’s the first problem I can’t seem to figure out myself.
there’s the code I’ve got right now:
import maya.cmds as cmds
###window###
cmds.window(“Auto Rigger”)
cmds.rowColumnLayout(nc = 2)
cmds.button(l = “Create Locators”, w = 200, c = “createLocators()”)
cmds.button(l = “Delete Locators”, w = 200, c = “deleteLocators()”)
cmds.text(“Spine Count”, l = “Spine Count”)
spineCount = cmds.intField(minValue = 1, maxValue = 10, value = 4)
cmds.showWindow()
###functions###
#pelvis
def createLocators():
if cmds.objExists(“Loc_Master”):
cmds.error(“Loc_Master already exists”)
else:
cmds.group(em = 1, name = “Loc_Master”)
root = cmds.spaceLocator(n = "Loc_Root")
cmds.scale(0.5, 0.5, 0.5, root)
cmds.move(0, 1, 0, root)
cmds.parent(root, "Loc_Master")
def createSpine():
for i in range(0, cmds.intField(spineCount, query = True, value = True)):
spine = cmds.spaceLocator(n = “Loc_Spine_” + str(i))
def deleteLocators():
nodes = cmds.ls(“Loc_*”)
cmds.delete(nodes)
so… it gives me an error saying
"# Warning: Step must be less than range (maximum - minimum). # "
and nothing happens with the createSpine function
any help?