1
$\begingroup$

enter image description here

The image says it. I want to know the name of that menu (when you press M to move a stroke to another layer) so I could append my own things to that.

I tried right-click to find "Edit source", but no luck, it doesn't appear.

So, I have 2 questions:

  1. How is that menu called?

  2. If you know its name, how did you? I'd like to know the process for being able to detect it without asking here?

Thank you so much for the help.

$\endgroup$
2
  • $\begingroup$ Does this answer your question? Where to find bpy name lists for scripting? $\endgroup$
    – Lauloque
    Commented Jun 28, 2023 at 19:04
  • 1
    $\begingroup$ @L0Lock thanks for the help mate. Sadly don't (I already have those options checked (they are very useful, but there are certain menus where the "Edit Source" is not listed (not sure why. I guess they are part of Blender core and not made into some kind of addon)) $\endgroup$
    – Ommadawn
    Commented Jun 28, 2023 at 19:25

1 Answer 1

0
$\begingroup$

In addition to python - Where to find bpy name lists for scripting? - Blender Stack Exchange:

When you are looking for a piece of UI spawned by an operator, what you are looking for to open that menu is the operator's method itself.

You can find it either in the Info Editor after you run it, or in any piece of UI that runs the operator, you can usually find that in Blender's global menus or the editor's menu if applicable, or at the very least in the operator search via F3:

enter image description here

If you ever encounter an operator you cannot find anywhere in the UI, but you can run with a keyboard shortcut, then you can try to look it up in Edit menu > Preferences > Keymap tab, and search either for the operator name or for the key-binding.

The operator method is showed, just add bpy.ops. beforehand:

keybind search

Edit Operator Source

To edit the source of an operator, there is an addon shipped with Blender that allows you to do exactly that:

Edit Operator Source — Blender Manual

Enable it in the preferences, open the text editor's sidebar, click the Edit Operator button, paste the operator method (without bpy.ops.) and click it in the search result. It will show the different elements available for that operator, chose the one that you need, and it will open in the text editor.

enter image description here

NOTE (2023-07-06):
This addon seems to have a bug (recursion errors) when other addons such as Animaide are enabled. If you encounter such an issue, try disabling Animaide, rebooting Blender and trying again.
Bug reports were made on both addons, with a proposed patch for Edit Operator Source. You can follow up the bug reports here:

$\endgroup$
8
  • $\begingroup$ Thank you so much for the help mate. Yeah, you are right. But what I meant is that I needed to know the menu name in order to append my own operators (I'm developing an addon), not the operator. In adition to what you say, is also possible to check the last executed operator in Sripting->Info panel. (I finally found it by lots of try and errors after intellisense in vscode suggested me a name that fits) $\endgroup$
    – Ommadawn
    Commented Jun 29, 2023 at 11:57
  • $\begingroup$ Oh I see... In that case, have you heard about the Edit Operator Source addon? I'll edit my answer. Also nice catch for the Info editor, totally forgot about it somehow 🤣 $\endgroup$
    – Lauloque
    Commented Jun 29, 2023 at 18:37
  • $\begingroup$ Yeah, I use it a lot :) But sadly not all operators seems to be available (is what I said in the post, that the Edit Source didn't appear (I guess it only shows when is a thing made in a addon (?)) $\endgroup$
    – Ommadawn
    Commented Jun 29, 2023 at 19:50
  • $\begingroup$ It shouldn't have any issue showing any operator it can list to begin with. Are you sure we are talking about the same thing? It isn't the "Edit Source" entry you get when right-clicking the UI, it's an addon to enable and use from the script editor, see my answer edit. $\endgroup$
    – Lauloque
    Commented Jun 29, 2023 at 20:49
  • $\begingroup$ Sorry mate, but knowing the operator is not the point of my question: I don't need to know the operator (I already knew it before asking the question). What I was asking is HOW to know the MENU name/bl_idname on the picture, not the operator. I talked about the edit source (not available in that menu) since is a thing that could give me a clue to know the menu if I'm able to see the source. Maybe the fact of being hovered the "new layer" operator caused confusion. Maybe I wasn't clear enough formuling my question. $\endgroup$
    – Ommadawn
    Commented Jun 30, 2023 at 11:13

You must log in to answer this question.

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