You can of course use the skinCluster -e -g “anotherGeom”, and it will “deform” this geometry, but it is not supported by the node. Documentation is unclear about it:
http://help.autodesk.com/cloudhelp/2016/ENU/Maya-Tech-Docs/CommandsPython/skinCluster.html The skinCluster binds only a single geometry at a time. Thus, to bind multiple geometries, multiple skinCluster commands must be issued. http://help.autodesk.com/view/MAYAUL/2016/ENU/?guid=__cpp_ref_class_m_fn_skin_cluster_html Note that unlike most deformers, a skinCluster node can deform only a single geometry. Therefore, if additional geometries are added to the skinCluster set, they will be ignored. This last documentation excerpt is somehow misleading because if you add another geometry to the skinCluster via the deformer or the skinCluster command with the -e -geometry flags combination, the object will be deformed, but the skinCluster internal weights structure does not allow multiple geometries to be accessed by the node. Anyway if anyone found a way to allow one skinCluster to deform multiple geometries, with the ability to paint weights on them, I’d be interested… 2015-11-04 18:04 GMT+01:00 Marcus Ottosson <[email protected]>: > keep in mind that skinClusters can only deform one geometry > > How do you mean? I think skinClusters can take on any number of meshes, > like any other deformer. > > @*Aren Voorhees* What is this for? Are you looking to transfer the > animation of a transform onto the mesh, and zero out the transform? > > > On 4 November 2015 at 16:51, Nicolas Combecave <[email protected]> > wrote: > >> Sorry about the formating, here a cleaner version: >> >> I’m not in front of maya right now but a couple thoughts: >> >> Did you try the polyUnite without retaining history? >> >> cmds.polyUniteSkinned(self.frags, ch=False) >> >> If you go the route of rebuilding a skinCluster from scratch on the final >> merged geometry, keep in mind that skinClusters can only deform one >> geometry, unlike many other deformers. >> >> >> 2015-11-04 17:50 GMT+01:00 Nicolas Combecave <[email protected]>: >> >>> I'm not in front of maya right now but a couple thoughts: >>> >>> Did you try the polyUnite without retaining history? >>> ``` python >>> cmds.polyUniteSkinned(self.frags, ch=False) >>> ``` >>> >>> If you go the route of rebuilding a skinCluster from scratch on the >>> final merged geometry, keep in mind that skinClusters can only deform one >>> geometry, unlike many other deformers. >>> >>> 2015-11-04 17:13 GMT+01:00 Aren Voorhees <[email protected]>: >>> >>>> Hey everyone, >>>> >>>> I'm working on a tool that loops through a bunch of meshes, creates a >>>> joint for each and bakes the mesh's keyframes to the respective joint. I >>>> have it working, but they way I'm doing it now is kind of slow because I am >>>> merging all the meshes at the end in order to collapse all the skinClusters >>>> down to one (so I don't have like, a million skinClusters in my export). >>>> Does anyone have any ideas on how I can avoid that last merge step that is >>>> taking so long? This tool will be used on files with 1000+ meshes which is >>>> why I am concerned about speed. >>>> >>>> def skin_frags(self): >>>> >>>> cmds.cutKey(self.frags) >>>> >>>> count = 0 >>>> for i in self.frags: >>>> cmds.makeIdentity(i, apply=True) >>>> skinCluster = cmds.skinCluster(i, self.fragJnts[count]) >>>> cmds.parent(self.fragJnts[count], self.scaleJnt) >>>> count += 1 >>>> >>>> cmb = cmds.polyUniteSkinned(self.frags) #This is what makes it >>>> so slow! >>>> cmds.rename(cmb[0], "Frags_Merged") >>>> >>>> I was trying out a separate idea too, where I create one skinCluster >>>> node, then add each joint and mesh to that skinCluster, something like >>>> this: >>>> >>>> frags = cmds.ls(sl=True) >>>> >>>> fragJnts = [] >>>> count = 0 >>>> for i in frags: >>>> fragPos = cmds.xform(i, query=True, t=True) >>>> cmds.select(clear=True) >>>> jnt = cmds.joint(position=fragPos, name='Frag_' + str(count) + >>>> '_JNT') >>>> cmds.parent(i, jnt) >>>> fragJnts.append(jnt) >>>> count += 1 >>>> >>>> sc = cmds.skinCluster(frags[0], fragJnts[0]) >>>> >>>> count = 1 >>>> for i in range(1, len(frags)): >>>> cmds.skinCluster(sc, edit=True, addInfluence=fragJnts[count], >>>> geometry=frags[count], useGeometry=True) #Here I am trying to one-by-one >>>> add the joint and respective mesh, but haven't got that >>>> >>>> working yet either >>>> count += 1 >>>> >>>> >>>> If anyone has any tips with either method I'm trying to use, I'd really >>>> appreciate it! >>>> >>>> Thanks, >>>> Aren >>>> >>>> -- >>>> 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/a89820b9-764a-4738-8246-9f099ec5712d%40googlegroups.com >>>> <https://groups.google.com/d/msgid/python_inside_maya/a89820b9-764a-4738-8246-9f099ec5712d%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/CAD65uqnTQ9vDXfOXDUXuB%2B%2BNFukdnL00n76iA8zVB-6%3DLgw9Zw%40mail.gmail.com >> <https://groups.google.com/d/msgid/python_inside_maya/CAD65uqnTQ9vDXfOXDUXuB%2B%2BNFukdnL00n76iA8zVB-6%3DLgw9Zw%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > *Marcus Ottosson* > [email protected] > > -- > 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/CAFRtmOBfZRv9Dyq7kLhghT3HKN4sv0XcsAnh3W7Q9ZDi-7gHvw%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBfZRv9Dyq7kLhghT3HKN4sv0XcsAnh3W7Q9ZDi-7gHvw%40mail.gmail.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/CAD65uqnapXac6ycVKOZk74aTCp_%3DyE1kHaCXRQup66%2BB_bMBqQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
