So here is an easy primitive python script to adjust locatorScale based on transform node scale.
selectedObject = cmds.ls(sl = 1)[0]
scaleVal = cmds.getAttr(selectedObject + ".s")[0][0]
cmds.setAttr(selectedObject + ".s", 1, 1, 1)
cmds.setAttr(cmds.listRelatives(selectedObject, shapes = 1)[0] + ".locatorScale", scaleVal)
Okay, it can produce tons of errors if you don't use it properly. I'm going to write a function (a real tool) to check errors. I guess it will be at least 40 lines instead of 4...so the post title was kind of a bluff.
Recently I have been thinking a lot about how to simplify error handling.
No comments:
Post a Comment