Blender connector not visible in Addons

Blender v 2.2.0 is not enlisted in addons. Probably a wrong declaration ?

If you find the bug can you please tell me where is it ? I know python, perhaps I could help also in Blender.

Best,
Dimitrios

Probably somewhere in init file ? Given below for convenience.

# MIT License

# Copyright (c) 2018-2021 Tom Svilans

# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:

# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.


bl_info = {
    "name": "SpeckleBlender 2.0",
    "author": "Speckle Systems",
    "version": (2, 2, 0),
    "blender": (2, 92, 0),
    "location": "3d viewport toolbar (N), under the Speckle tab.",
    "description": "The Speckle Connector using specklepy 2.0!",
    "warning": "This add-on is WIP and should be used with caution",
    "wiki_url": "https://github.com/specklesystems/speckle-blender",
    "category": "Scene",
}

import bpy

"""
Import PySpeckle and attempt install if not found
"""

try:
    import specklepy
except ModuleNotFoundError as error:
    print("Speckle not found.")
    # TODO: Implement automatic installation of speckle and dependencies
    # to the local Blender module folder

    # from .install_dependencies import install_dependencies
    # install_dependencies()

"""
Import SpeckleBlender classes
"""

from specklepy.api.client import SpeckleClient  # , SpeckleCache
from specklepy.logging import metrics

from bpy_speckle.ui import *
from bpy_speckle.properties import *
from bpy_speckle.operators import *
from bpy_speckle.callbacks import *
from bpy.app.handlers import persistent

"""
Add load handler to initialize Speckle when 
loading a Blender file
"""


@persistent
def load_handler(dummy):
    bpy.ops.speckle.users_load()


"""
Permanent handle on callbacks
"""

callbacks = {}

"""
Add Speckle classes for registering
"""

speckle_classes = []
speckle_classes.extend(operator_classes)
speckle_classes.extend(property_classes)
speckle_classes.extend(ui_classes)


def register():
    from bpy.utils import register_class

    for cls in speckle_classes:
        register_class(cls)

    metrics.set_host_app("Blender")

    """
    Register all new properties
    """

    bpy.types.Scene.speckle = bpy.props.PointerProperty(type=SpeckleSceneSettings)
    bpy.types.Collection.speckle = bpy.props.PointerProperty(
        type=SpeckleCollectionSettings
    )
    bpy.types.Object.speckle = bpy.props.PointerProperty(type=SpeckleObjectSettings)

    """
    Add callbacks
    """

    # Callback for displaying the current user account on top of the 3d view
    # callbacks['view3d_status'] = ((
    #     bpy.types.SpaceView3D.draw_handler_remove, # Function pointer for removal
    #     bpy.types.SpaceView3D.draw_handler_add(draw_speckle_info, (None, None), 'WINDOW', 'POST_PIXEL'), # Add handler
    #     'WINDOW' # Callback space for removal
    #     ))

    bpy.app.handlers.load_post.append(load_handler)


def unregister():

    bpy.app.handlers.load_post.remove(load_handler)

    """
    Remove callbacks
    """

    for cb in callbacks.values():
        cb[0](cb[1], cb[2])

    from bpy.utils import unregister_class

    for cls in reversed(speckle_classes):
        unregister_class(cls)


if __name__ == "__main__":
    register()

Hey Dimitrios,

I’ve just had a look at this an we can’t replicate this. Just to confirm, did you try unchecking the “Enabled Add-ons Only” and see if the connector is there but just not enabled yet?
image

You may need to restart blender once you’ve enabled it to allow it to load in.

If this doesn’t resolve it, could you open up you console and see if anything is being spit out there?
image

There are some errors, the plugin went disabled by default



Read prefs: C:\Users\jimve\AppData\Roaming\Blender Foundation\Blender\2.93\config\userpref.blend
Info: Deleted 1 object(s)

Traceback (most recent call last):
File “C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\modules\addon_utils.py”, line 351, in enable
mod = import(module_name)
File “C:\Users\jimve\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\bpy_speckle_init_.py”, line 56, in
from specklepy.api.client import SpeckleClient # , SpeckleCache
ModuleNotFoundError: No module named ‘specklepy.api.client’

Traceback (most recent call last):
File “C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\modules\addon_utils.py”, line 351, in enable
mod = import(module_name)
File “C:\Users\jimve\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\bpy_speckle_init_.py”, line 56, in
from specklepy.api.client import SpeckleClient # , SpeckleCache
ModuleNotFoundError: No module named ‘specklepy.api.client’

Traceback (most recent call last):
File “C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\modules\addon_utils.py”, line 351, in enable
mod = import(module_name)
File “C:\Users\jimve\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\bpy_speckle_init_.py”, line 56, in
from specklepy.api.client import SpeckleClient # , SpeckleCache
ModuleNotFoundError: No module named ‘specklepy.api.client’

Hmm that’s very strange…I still can’t reproduce but it might be worth trying to fully clean your modules. Could you please follow these steps:

  1. go to Manager and uninstall the connector
  2. go to C:\Users\jimve\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\ and delete the bpy_speckle folder and the modules folder
  3. go to Manager and reinstall the connector
  4. try enabling the connector in Blender again. if it works, you’ll need to relaunch blender for it to load up your accounts correctly

I did the steps and didn’t work
It is in the list of disabled addons


I am using 2.93.5

I will remove blender and try to install it again tomorrow morning.

Best,
dimitrios

Hey Dimitrios,

This is very strange. Let me know how you get on with the reinstall tomorrow. If it doesn’t work, we can maybe hop on a quick debug call to see if we can get to the bottom of this.

It was tough but I found it

I have three Blender versions in

AppData\Roaming\Blender Foundation\Blender\

  • 2.92
  • 2.93
  • 3.0 (by installing Omniverse I had this folder generated. If you google search it Omniverse has been replacing Blender material graphs with omniverse material graphs which is an interesting approach)

I deleted 2.93 above and totally removed Blender 2.93 from pc.

I compressed 3.0 to uncompress it later.

Finally I installed Blender 2.92 and installed Speckle Blender 2.2.2.

Strange bug: By installing it in 2.92, I have also a 2.93 folder generated : 2.93\scripts\addons\bpy_speckle ??? I think I shouldn’t.

You should provide the option during installation to select to which Blender version, or to multiple version with a checkbox.

Best,
Dimitrios

1 Like