0
$\begingroup$

Would like to find some tutorial and documents for blender 290 about python vectors, raycast and modal.

i am doing my best trying to create this tool, right now i can only create new object, add them some vertex and edges but i am really far from using a modal and snap the coordinates on the surface..

i would like to change quite often the "Target plane shape", So i plan to have the event of the keyboard change from mode A to mode B But i also worried about the existing shortcut , they fight with the modal?

Surface_target A ( we can change this with every drawing A)

Sequence_Edges B ( the edge you drawn remain there)

enter image description here

Thank you for your time

EDIT: To "Draw" using the mouse, require the use of a modal to get the events of the mouse, and read the position and the clicks. Making a modal and a tool is harder than i thought.

I posted a working basis to use a UITool and a modal to get and update the mouse events . https://blenderartists.org/t/event-leftmouse-pressed-disturbed-by-tool-selection/1270882 Once understand the behaviour you can add some of the function of the template like, Ray cast modal, to get the 3D location of the mouse .

$\endgroup$
5
  • 1
    $\begingroup$ Text Editor > Templates > Python > Operator View3D Modal Raycast is a good starting point. $\endgroup$
    – batFINGER
    Oct 13, 2020 at 12:50
  • $\begingroup$ Hi, yes i know that blender have preset but learning at reverse is pretty hard. I have to search almost every line and try understanding from answer and api. And i start reading and studyng the pages that refer to the line ... sometimes ending in a loop of pages XD. its like darksoul . $\endgroup$
    – Est
    Oct 13, 2020 at 18:23
  • $\begingroup$ To "Draw" using the mouse, require the use of a modal to get the events of the mouse, and read the position and the clicks. Making a modal and a tool is harder than i thought. I posted a working basis to use a UITool and a modal to get and update the mouse events . blenderartists.org/t/… Once understand the behaviour you can add some of the function of the template like, Ray cast modal, to get the 3D location of the mouse . $\endgroup$
    – Est
    Dec 22, 2020 at 7:55
  • $\begingroup$ See blender.stackexchange.com/a/150314/19156 $\endgroup$
    – lemon
    Dec 22, 2020 at 8:07
  • $\begingroup$ Thanks, this is quite a journey... Property panels operators tool..... somehow i made something, thanks for links $\endgroup$
    – Est
    Jan 15, 2021 at 18:13

1 Answer 1

0
$\begingroup$

enter image description here

This was really complex for me, its a bit messy but i share it anyway. Hope will help someonelse XD Its just a script, you paste it in you script and run. A tool and a panel will appear in your 3Dview, follow instruction for play .

https://mega.nz/file/wz4VCaaJ#7TxFvZqyeQZOFy7syu56As5RionvmfhYuTs0JvhZ8h8

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .