Thank you very much, I used aliasAttr command to solve this problem On Tuesday, July 25, 2017 at 6:20:43 PM UTC+8, combi wrote: > > When you add a target to a blendShape node, maya also adds an alias to the > node.weight[x], so that interaction is easier... > Maybe you should try to cleanup the alias also? > > > 2017-07-25 10:43 GMT+02:00 cgpengda <[email protected] <javascript:>>: > >> Hello everyone: >> >> I am writing a blendShape tool. >> I have a tough problem that bothers me for a long time. >> >> >> - First, I add a new target, called D, to the blendShape node. >> >> #add target >> cmds.blendShape('blendShape1',e=1,t=('baseMesh',3,'D',1)) >> >> >> - Then, using the maya's removeMultiInstance command, remove the >> target D. >> >> #remove target >> cmds.removeMultiInstance("%s.weight[%s]" % ('blendShape1','3'), b=True) >> cmds.removeMultiInstance("%s.inputTarget[0].inputTargetGroup[%s]" % >> ('blendShape1','3'), b=True) >> >> >> - Finally, when I add target D again to the blendShape node, the >> blendShape's weight attribute name, sometimes right, sometimes wrong. >> >> #add target >> cmds.blendShape('blendShape1',e=1,t=('baseMesh',3,'D',1)) >> >> >> *right:* >> >> >> >> >> *wrong:* >> >> >> <https://lh3.googleusercontent.com/-rW9uVGRoq_0/WXcCRPU3HhI/AAAAAAAAAF0/_8jyVyt0HTUnqaxs-WNYgEEsyxaYQ_j8ACLcBGAs/s1600/TIM%25E5%259B%25BE%25E7%2589%258720170725161516.png> >> >> >> >> >> How can I operate to avoid the wrong results? >> >> Thank you!!!! >> >> -- >> 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] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/python_inside_maya/e83f45d2-71fb-48b0-b737-9f9812f20ba4%40googlegroups.com >> >> <https://groups.google.com/d/msgid/python_inside_maya/e83f45d2-71fb-48b0-b737-9f9812f20ba4%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > >
-- 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/037c20b8-3339-4f92-b348-8ea612e5e613%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
