[MPlug] Set array doesn't work

18 views
Skip to first unread message

Rémi Deletrain

unread,
Nov 21, 2019, 6:39:06 AM11/21/19
to Python Programming for Autodesk Maya
Hi everyone,

I try to set a blendshape weight plug. I used this solution :

mfn_weights = OpenMaya.MFnFloatArrayData()
mo_weights = mfn_weights.create()
mfn_weights.set(OpenMaya.MFloatArray(i_target_count, 0.0))
mp_weights.setMObject(mo_weights)

but it doesn't work. I have a same problem for set a vertex weights of target.
This solution works with array of point (for target offset) but not with array of float or double...

Anyone have solution ?
Reply all
Reply to author
Forward
0 new messages