Hi guys,
I'm new here and also to learn python. I'm loving everything I have
found here and would first like to thank the generosity of
professionals who share their knowledge by the community.
Ok, let's get down to business ... I wrote a little script to create a
node cMuscleSurfAttach starting at vertices. This is working very well
for me, but I'd like to hear from you guys if you have any solution
thats use a more robust code. (: D) Because I saw a script
(hyperRealMeshParent I think) that used a more complex solution to do
something similar to find the "best edges" ... I do not know if my
solution is the best solution for doing an automatic rig system for
exemple.
<code>
#Selecione um ou mais vértices e rode o código abaixo.
#Select one or more vertices end run de code below.
import maya.cmds as cmds
import maya.mel as mel
import maya.cmds as mc
selVs = mc.ls(selection=True)
for vertcs in selVs:
cmds.select(vertcs)
lv=cmds.pickWalk(direction='left')
mv=cmds.pickWalk(direction='right')
rv=cmds.pickWalk(direction='right')
cmds.select(lv,mv,rv)
bestEdges=cmds.polyListComponentConversion(te=True, internal=True)
cmds.select(bestEdges)
mel.eval('cMuscleSurfAttachSetup()')
surfAtk=mc.listRelatives(shapes=True)
mc.setAttr(surfAtk[0]+".fixPolyFlip",1)
cmds.select(clear=True)
#
</code>
I'm in the beggining of learning python, so sorry if my question is
not apropriate for this group.
Thanks
--
http://groups.google.com/group/python_inside_maya