0
$\begingroup$

I am trying to learn python for blender, following this and many other things online. https://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Advanced_Tutorials/Python_Scripting/Addon_Anatomy

I open the scripting editor, copy and paste the "complete script" And run the script. The script dont give me any error, but i cant find it in the search menu operator.

What am i missing? enter image description here

$\endgroup$
7
  • 1
    $\begingroup$ If you want working examples of python scripts, you can always dig into the templates (next to Format on the top of the text editor). For example the Simple operator presents a minimum working example of an operator. From there you can expand bit by bit until your own operator works. $\endgroup$
    – Gorgious
    Commented Sep 29, 2020 at 20:50
  • 1
    $\begingroup$ Can you run the operator from the console, like this? bpy.ops.mesh.make_tetrahedron('INVOKE_DEFAULT') $\endgroup$
    – unwave
    Commented Sep 29, 2020 at 21:47
  • $\begingroup$ Yes i cant find in the "Search menu" neither the template of simple operator. I close and restart blender for not overlap the two operator registration. No i cant run the operator with bpy.ops.mesh.... $\endgroup$
    – Est
    Commented Sep 30, 2020 at 9:29
  • $\begingroup$ And like this? gist.github.com/unwave/c65e1b59b5833251ee87805bcc6e9bc4 $\endgroup$
    – unwave
    Commented Sep 30, 2020 at 11:59
  • $\begingroup$ Yes this script make return the output true to the console, so the operator is in blender. Joonas resolved the problem, there is a checkbox to be able to find extra-script!!! $\endgroup$
    – Est
    Commented Sep 30, 2020 at 13:16

1 Answer 1

3
$\begingroup$

The code works just as it is supposed to work. You just need to enable Operator Search to use it. You need to select Edit -> Preferences. Under Interface check Developer Extras checkbox.

Developer Extras

Now you can find Operator Search from Edit drop down menu.

Operator Search

Search Add Tetrahedron

Add tetrahedron

Result

Errors

You can select Window -> Toggle System Console to see the errors your code gives.

Toggle System Console

$\endgroup$
4
  • $\begingroup$ hi, thanks , i got no error at all, no red flag , no console errors, i added a screenshot in my post $\endgroup$
    – Est
    Commented Sep 29, 2020 at 19:37
  • $\begingroup$ Hi, the line 26 already start with the # so its a comment and irrilevant , right? i removed the whole line , just in case, but i still cant find the operator in the search... Any suggestion on where learn this things for the new blender 2:90? its really hard find guides that works $\endgroup$
    – Est
    Commented Sep 30, 2020 at 9:34
  • $\begingroup$ @Est Silly me. I should have read the code info first before assuming too much. Sorry about that. I edited the answer and it should work as it's supposed to work. $\endgroup$
    – Joonas
    Commented Sep 30, 2020 at 10:40
  • $\begingroup$ oooooooooooooooooo thankyou that little check!,omg.. every time so much time wasted. thank you man, none of the guide ever said nothing about that little check. Now i can find it in the search. Thankyou very much $\endgroup$
    – Est
    Commented Sep 30, 2020 at 13:14

You must log in to answer this question.

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