0
$\begingroup$

I am trying to figure out how to highlight a polygon or a vertex that could be under the mouse pointer in Python for 2.80. The highlighting is just a visual indication. I realize that I will be needing to scan for components and draw the shape, but just do not know how.

thanks

$\endgroup$
1
$\begingroup$

Look at these templates: 1) Operator Modal View3d Raycast: With this you will find the polygon of a mesh under the mouse cursor. 2) Operator Modal Draw: This contains an example of using BGL for drawing in 3d view. With this you will be able to draw the edges of the polygon you find from raycast.

$\endgroup$
  • $\begingroup$ Thanks that sounds useful, I guess it is a good head start. $\endgroup$ – yarun can Aug 31 '19 at 5:26
  • 1
    $\begingroup$ I would suggest mentioning that the templates can be found in blenders text editor and maybe add links to the git repo copies, here and here $\endgroup$ – sambler Sep 4 '19 at 3:00

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.