1
$\begingroup$

I am seeking for some examples to make a custom operator menu.

The operator menu that comes OOTB is

enter image description here

The more options you have the longer (higher) the menu will be.

I would like to make a menu that is wider (like vertices and radius next to each other instead of how it is in the screenshot. See 2nd screenshot enter image description here

I would also like to know if it is possible to make the menu interactive? Meaning that I would like to make a dropdown option that will let the user switch between multiple menu's for the same object.

Is all of this possible and are there any examples?

Thanks in advance

$\endgroup$

1 Answer 1

0
$\begingroup$

You would have to modify Blender's source code for any built-in operator to change the operator's adjustment menu; but you can create the details for your own operators using Custom Drawing. There's an example on that manual page. You need to do three things specifically:

  1. Add the invoke method's call to the window manager to pop up the menu.
  2. Write the draw routine that draws the popup the way you like
  3. Write the menu call function, but only if you want your operator to be included in a dynamic menu.
$\endgroup$
8
  • $\begingroup$ Thanks Marty. I dont want to change the built-in operator. Only the one specific for my own add-on. Will read the page you refer to and see how funky I can make my addon :-) $\endgroup$
    – cecevo
    Dec 27, 2021 at 21:17
  • $\begingroup$ As funky as the UI will allow. Basically the draw routine works like a panel draw routine so you have access to all of the layout options, including columns and rows. ;) $\endgroup$ Dec 27, 2021 at 21:20
  • $\begingroup$ Could we have a chat somewhere? I might want to ask you 1 or 2 specific questions related to this subject. And if I keep posting it here I probable would be panelized? $\endgroup$
    – cecevo
    Dec 27, 2021 at 21:34
  • $\begingroup$ You won't be penalized. If we continue here in the comments, eventually stack exchange will ask us to "take it to chat" but I don't know how to do that manually, so ask away. $\endgroup$ Dec 27, 2021 at 21:36
  • 1
    $\begingroup$ If I have a question I will reply here :-) But to learn good I need to try it myself first. <-- You will not learn by asking without trying it yourself first --> $\endgroup$
    – cecevo
    Dec 27, 2021 at 21:43

You must log in to answer this question.

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