0
$\begingroup$

I have exactly the same issue as here: Can't find my addon inside blender 2.90 (first addon). But in my case adding the addon Category didn't work.

Following this tutorial https://docs.blender.org/manual/en/latest/advanced/scripting/addon_tutorial.html, after installing Blender 2.91.2 I put the following script in Text editor and run it:

bl_info = {
    "name": "Move X Axis",
    "version": (1, 0),
    "blender": (2, 91, 2),
    "category": "Object",
}

import bpy


class ObjectMoveX(bpy.types.Operator):
    """My Object Moving Script"""      # Use this as a tooltip for menu items and buttons.
    bl_idname = "object.move_x"        # Unique identifier for buttons and menu items to reference.
    bl_label = "Move X by One"         # Display name in the interface.
    bl_options = {'REGISTER', 'UNDO'}  # Enable undo for the operator.

    def execute(self, context):        # execute() is called when running the operator.

        # The original script
        scene = context.scene
        for obj in scene.objects:
            obj.location.x += 1.0

        return {'FINISHED'}            # Lets Blender know the operator finished successfully.

def register():
    bpy.utils.register_class(ObjectMoveX)


def unregister():
    bpy.utils.unregister_class(ObjectMoveX)


# This allows you to run the script directly from Blender's Text editor
# to test the add-on without having to install it.
if __name__ == "__main__":
    register()

Then, I look for it in the menu search with no success: enter image description here

I don't find it in Edit -> Preferences -> Add-ons neither.

I tried putting "blender": (2, 80, 0), like in the tutorial, removing "version": (1, 0), , with no result so far.

$\endgroup$
2
  • 1
    $\begingroup$ Running an addon script in text editor is not installing it. blender.stackexchange.com/questions/1688/installing-an-addon You are searching for the addon name in operator search. The operator is "Move X by One" The tutorial is matching operator on just "Move X" and explains later how to install it too. $\endgroup$
    – batFINGER
    Commented Jan 23, 2021 at 16:38
  • $\begingroup$ @batFINGER I installed the script through Edit -> Preferences -> Add-ons and now it appears there ("Object: Move X by Axis") and is enabled. However, still the operator doesn't appear in the operator search. I've searched for any combination "Move", "Move X" et. but it doesn't show up, it's odd... $\endgroup$
    – Pablo
    Commented Jan 23, 2021 at 19:31

2 Answers 2

1
$\begingroup$

Actually in the tutorial you have mentioned above, it's 'Operator Search' not 'Menu Search' which you opened but may not noticed. So to have a correct result, you need to enable 'Developer Extras' first.

where you can find 'Developer Extras'

Then you will get 'Operator Search' in Edit Menu.

where you can find 'Operator Search'

With 'Operator Search', you can find your first addon.

Operator Search result

$\endgroup$
1
  • $\begingroup$ Thank you, this solved the issue. It works at least for Blender 2.90.1. For some weird reason I tried installing Blender 2.91.2 back several times and it always crashes on startup, so I can't check there. But that's a matter for a different question. $\endgroup$
    – Pablo
    Commented Feb 2, 2021 at 17:44
0
$\begingroup$

I uninstalled Blender 2.91.2 and installed Blender 2.80 instead, and it works there! The add-on is properly registered and callable after being run in the Text editor or direct installation.

I tried 2.90 and it didn't work there, so at some point between 2.80 and 2.90 something has been broken in the Python Add-on functionality. For the moment it's fine as 2.80 has everything I need.

$\endgroup$

You must log in to answer this question.

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