is there a way to control the separation of a polyobject so that when you chip it off the faces will become new polygons in an ordered list?
here is an image of what I mean.
note that the faces might not always be sequential in the loop. this is why I
pass a list, one that I have marched through getting the each face name in an
ordered list.
the problem is if I chipOff, then separate each face one by one, the face
numbers change. and If I chipOff all the faces and then do one separate then
sometimes it seems as though the new polyObjects are not ordered the same way
the face list was.
here is the code:
def chipFaces(chipFaceList=['polyPlane.f[0]','polyPlane.f[1]']):
'''
@summary:
converts a list of faces to extract into new objects
@arguments:
name of a face
@returns:
a list of all the names of all the new poly objects
'''
# get the parent node Name
objectName=chipFaceList[0].split('.')[0]
# for every face in the list chip off
for chipFace in chipFaceList:
#extract Face
mc.polyChipOff(chipFace, constructionHistory=True,
keepFacesTogether=True, duplicate=False, offset=0.0)
# separate object
separateObject = mc.polySeparate(objectName, constructionHistory=False)
# reverse the list
#separateObject.reverse()
return separateObject
--
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 post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
<<attachment: orderedChipOff.PNG>>
