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 <zezebubulon...@gmail.com>
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 <zezebubulon...@gmail.com>:
>
>> 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 <are...@gmail.com>:
>>
>>> 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 python_inside_maya+unsubscr...@googlegroups.com.
>>> 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 python_inside_maya+unsubscr...@googlegroups.com.
> 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*
konstrukt...@gmail.com

-- 
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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBfZRv9Dyq7kLhghT3HKN4sv0XcsAnh3W7Q9ZDi-7gHvw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to