3
$\begingroup$

What is the index argument in the command:

bpy.ops.mesh.select_linked_pick(deselect=False, delimit={'SEAM'}, index=1729)

Is it possible to find it with python ?

$\endgroup$
  • $\begingroup$ it's the edge index,and yes you can find it but how exactly you want to find it in python $\endgroup$ – Chebhou Apr 30 '16 at 17:46
  • $\begingroup$ This command line was run on a basic UV Sphere and this sphere was not as many edges. Is that there are different index ? $\endgroup$ – pistiwique May 1 '16 at 18:57
  • $\begingroup$ sorry I didn't understand your comment, but if you could describe what you are trying to accomplish we may find the answer $\endgroup$ – Chebhou May 2 '16 at 17:02
  • $\begingroup$ Sorry for my late answer. I finally found a solution without using this operator but, i'd ever like to know where this index come from. $\endgroup$ – pistiwique May 7 '16 at 7:55
  • $\begingroup$ For exemple, if i display the edges index of an selected face, i have these four edge index : 552, 540, 511 and 555. The face index is 255. Now, if i use the select_lincked_pick operator, The index in the operator is 1729. So , where does this index come from if it is that of an edge ? $\endgroup$ – pistiwique May 7 '16 at 8:03
2
$\begingroup$

For the operator bpy.ops.mesh.select_linked_pick(deselect=False, delimit={'SEAM'}, index=1729) the index is taken from the closest element to the mouse cursor and it is calculated as follows :

  • For Vertices : index = vertex.index.
  • For Edges : index = len(vertices)+ edge.index.
  • for Faces : index = len(vertices)+ len(edges) + face.index
|improve this answer|||||
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.