[Closed] Array items
So this is probably something very basic but again I cant locate useful info in help docs. I
m trying to assign vertex weights to a mesh using Vert_Bone_Indices_array and Vert_Blend_Weights_array.
Vert_Blend_Weights_array = #([0,0,0.494118,0.505882], [0,0,0.443137,0.556863]…)
Vert_Bone_Indices_array= #([0,3,1,2], [0,3,1,2],…)
for i = 1 to 1 do skinOps.replaceVertexWeights msh.modifiers[#skin] i (Vert_Bone_Indices_array[i]+1) (Vert_Blend_Weights_array[i])
the listener returns “OK” but the weights are not set. I can force it to work if I use “()” instead of “[]”
Vert_Bone_Indices_array=#(0,0,0.494118,0.505882)
Vert_Bone_Indices_array=#(0,3,1,2)
what am I missing here? :shrug:
thanks
the method requires two arrays: bone ids and corresponding weights. so the arrays have to look like:
bones = #(1,2,3)
weights = #(0.2, 0.5,0.3)
Yeah I figured as much, now I`m doing my head in how to figure this loop nesting :shrug:
Nvm I found a way to rearrange the arrays. All good now.