Python Script not working in maya 17

Python Script not working in maya 17

Anonymous
Not applicable
417 Views
0 Replies
Message 1 of 1

Python Script not working in maya 17

Anonymous
Not applicable

Hi, guys, I have one issue I have a python script that is working in Maya 2012 but not working in Maya 2017 and maya2018 Please help.
here is the script

import maya.cmds as cmds

sl = cmds.ls(sl=1)

for s in sl:
    locName = s.replace("_anim", "_ctrl")
    loc = cmds.spaceLocator(n=locName)[0]
    group = cmds.group(loc, n=loc + "_grp")
    cmds.delete(cmds.pointConstraint(s, group))
    cmds.delete(cmds.orientConstraint(s, group))
    cmds.makeIdentity(group, a=1, t=1, r=1)
    
    cmds.parentConstraint(loc, s, mo=1)
    cmds.scaleConstraint(loc, s)

 

0 Likes
418 Views
0 Replies
Replies (0)