@@ -199,6 +199,9 @@ def collectInfluenceWeights(skinCls, dagPath, components, dataDic):
199199 numInfluences = get_skin_cluster_fn (skinCls .name ()).influenceObjects (
200200 influencePaths
201201 )
202+ # cast to float to avoid rounding errors when dividing integers?
203+ dataDic ["vertexCount" ] = int (weights .length () / float (numInfluences ))
204+
202205 numComponentsPerInfluence = int (weights .length () / numInfluences )
203206 for ii in range (influencePaths .length ()):
204207 influenceName = influencePaths [ii ].partialPathName ()
@@ -209,8 +212,7 @@ def collectInfluenceWeights(skinCls, dagPath, components, dataDic):
209212 for jj in range (numComponentsPerInfluence )
210213 if weights [jj * numInfluences + ii ] != 0.0
211214 }
212- # cast to float to avoid rounding errors when dividing integers?
213- dataDic ["vertexCount" ] = int (weights .length () / float (numInfluences ))
215+
214216 # cast influenceWithoutNamespace as string otherwise it can end up
215217 # as DependNodeName(u'jointName') in the data.
216218 dataDic ["weights" ][str (influenceWithoutNamespace )] = inf_w
@@ -290,9 +292,9 @@ def exportSkin(filePath=None, objs=None, *args):
290292 # start by pruning by a tiny amount. Enough to not make noticeable
291293 # change to the skin, but it will remove infinitely small weights.
292294 # Otherwise, compressing will do almost nothing!
293- if isinstance (obj .getShape (), pm .nodetypes .Mesh ):
295+ # if isinstance(obj.getShape(), pm.nodetypes.Mesh):
294296 # TODO: Implement pruning on nurbs. Less straight-forward
295- pm .skinPercent (skinCls , obj , pruneWeights = 0.001 )
297+ # pm.skinPercent(skinCls, obj, pruneWeights=0.0001 )
296298
297299 dataDic = {
298300 "weights" : {},
0 commit comments