1
$\begingroup$

I made a script to create cable-like curves between two different 3D points. The logic behind the script is that it's using mathematical functions to find the exact coordinates of the vertices in 3D space. Then, it places vertices to those coordinates.

I managed to create a custom operator to play with the input values. After I run the operator, I can see the operator window and change the values as I wish as you can see in the GIF:

enter image description here

However, instead of playing these values in the operator window, I want to do it with my mouse movement. I want to be able to adjust the value by moving the mouse in Y direction. I tried to do it by using modal function. It look like I'm somehow close the result. But since my script create vertices from scratch, it just keeps creating new curves between two points while the modal is active. Here is the GIF to visualize better:

enter image description here

Just like in the first gif, I want to see the status of the curve visually, but I do not want it to create a new mesh every time. The code is really complicated, so I don't want to confuse anyone. I think just an idea of how I could achieve this would be helpful.

Thank you in advance. I can share the code if needed. But as I said, I didn't work so clean, so it's a bit crowded :)

$\endgroup$

1 Answer 1

0
$\begingroup$

I fixed the issue by creating an "update" function for the mesh. Now if there is a mesh, it calls "update" function instead of "create" function.

$\endgroup$
1
  • $\begingroup$ Hello, thanks for adding an answer to your question. :) A snippet of your code would do wonders if someone stumbles upon the same problem later. Cheers $\endgroup$
    – Gorgious
    Commented Feb 24 at 7:56

You must log in to answer this question.

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