Hi guys,
I'm new and starting learning python. I'm trying my self to create anim
control using the curve and here I'm stuck to get item of function :
def groupParent(groups, prefix, suffix):
>
> grps = []
>
> for i in range(len(groups)):
>
> grps.append(mc.createNode('transform', n="%s%s%s_%s" % (prefix,
>> suffix, groups[i], GROUP)))
>
> if i > 0:
>
> mc.parent(grps[i], grps[i - 1])
>
>
> def matchPosition(objectOri, object):
>
> mc.delete(mc.parentConstraint(objectOri, object, mo=False))
>
>
> def createControl(suffix='ctrl',
>
> groups=['zro'],
>
> gimbal=None,
>
> gimbalSize=0.5,
>
> shape=SQUARE,
>
> connect=[]):
>
> for obj in mc.ls(sl=1):
>
> ctrl = controller(shape)
>
> renCtrl = mc.rename(ctrl, prefixName(obj))
>
> grpPrnt = groupParent(groups, renCtrl, suffix.title())
>
> mc.parent(renCtrl, grpPrnt)
>
> finName = mc.rename(renCtrl, '%s_%s' % (prefixName(obj), suffix))
>
>
>> doMatch = matchPosition(obj, grpPrnt)
>
>
I run it and have the error "Target list was empty or contained no valid
targets." So, how do I do to get item the list on grps[0] in function
groupParent and then assigned to grpPrnt variable?! 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/4129465e-02e4-4ef6-94fe-8abf14c225c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.