Hey Chad, Thanks, as I am doing exactly what you mentioned so its all good.
D. On Friday, March 13, 2015 at 4:37:17 PM UTC+1, Chad Vernon wrote: > > If you are writing your own deformer you should use the MItGeometry > iterator, get the indices out of there and call the > MPxDeformerNode::weightValue method with the indices. If you are querying > an existing deformer like a cluster, you'll need to query the set > membership and then only iterate over those weight values using getattr or > the MPlug if you are using the API. > > On Fri, Mar 13, 2015 at 1:39 AM, Dilen Shah <[email protected] > <javascript:>> wrote: > >> Hey Chad, >> >> Thanks for the reply, just for example lets say I am getting the weights >> of a cluster on my mesh, at the moment I am using the weightList attribute >> to get the weights but it has all the weights even the ones that are not in >> the deformer set so what woul dbe the best way to approach this? >> >> Thanks. >> >> D. >> >> On Thursday, March 12, 2015 at 11:18:04 PM UTC+1, Chad Vernon wrote: >>> >>> The weights will still exist. You should use the MItGeometry iterator >>> that's passed into deform. It will only iterate of members in the deformer >>> set. >>> >>> On Thursday, March 12, 2015 at 10:06:22 AM UTC-7, Dilen Shah wrote: >>>> >>>> Hey guys, >>>> >>>> I am writing a node in maya API in which I am getting the weights of >>>> any deformer on it and getting its weights. But when I remove few vertices >>>> from the membership or deformer set and do the same, the weights of those >>>> vertices are still existing instead of giving me 0. >>>> >>>> Anyone know a way in API or even other way to get weights properly and >>>> only for the vertices that exist in membership or set. >>>> >>>> Thank you. >>>> >>>> D. >>>> >>> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "Python Programming for Autodesk Maya" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/python_inside_maya/VQyTsx4ZOz8/unsubscribe >> . >> To unsubscribe from this group and all its topics, send an email to >> [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/python_inside_maya/e413b840-02d6-4467-8d3e-b5f4b28f54f0%40googlegroups.com >> >> <https://groups.google.com/d/msgid/python_inside_maya/e413b840-02d6-4467-8d3e-b5f4b28f54f0%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/f056740f-9525-4190-909e-8e21deb0fe7b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
