Hi guys,
I have been creating the script for ctrl. Everything working well, except
if there is same name in hierarchy. Here is part of the script:
def createControl(suffix='ctrl',
groups=['Zro', 'offset],
gimbal=None,
gimbalSize=0.5,
shape=SQUARE,
connect=['parentCons']):
for obj in mc.ls(sl=1):
ctrl = controller(shape)
renCtrl = mc.rename(ctrl,'%s_%s' % (prefixName(obj), suffix))
grpPrnt = groupParent(groups, '%s' % prefixName(obj),
suffix.title())
parCtrl = mc.parent(renCtrl, grpPrnt[-1])
cnntCtrl = renCtrl
lockAttrObj(cnntCtrl, 'visibility')
....
and the result as is on the image attachment.
So, I have googling it and I found the answer that I need to query the long
name first. I have tried but unfortunately I'm stuck to solve that. Any
solution or insight?! Thanks in advance!
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/7fee08b7-d540-48fa-9b04-90527abe2253%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.