Converting an add-on to an extension - am I doing this correctly?

I forked an abandoned add-on and updated it to work with blender 3.6.5 - see my post about it here

I’d like to convert it to an extension to make it available on the extensions.blender.org

I’ve read thru the docs here on how to convert an add-on and I’ve created the files needed.

Here’s my init.py file

bl_info = {
    "name": "Shapekey Driver Creator",
    "author": "revolt_randy, Andreas Esau",
    "version": (1, 2, 1),
    "blender": (3, 6, 5),
    "location": "View3D - Pose mode > Pose Menu",
    "description": "Creates a shape key driver using a bone as a controller.",
    "warning": "",
    "doc_url": "https://github.com/revolt-randy/Shapekey_Driver_Creator",
    "tracker_url": "https://github.com/revolt-randy/Shapekey_Driver_Creator",
    "category": "Rigging"
}


# Import From Files
if "bpy" in locals():
    import importlib
    importlib.reload(shapekey_driver_creator)
    print("reloaded")
else:
    from . import shapekey_driver_creator
    from .shapekey_driver_creator import ShapekeyDriverCreator
    print("imported")
    
import bpy


def add_to_specials(self,context):
    if len(bpy.context.selected_objects) > 1:
        if bpy.context.selected_objects[0].type == "MESH":
            self.layout.operator_context = "INVOKE_DEFAULT"
            self.layout.separator()
            op = self.layout.operator("object.shapekey_driver_creator",text="Shapekey Driver Creator",icon="DRIVER")


def add_pose_menu(self,context):
    if len(bpy.context.selected_objects) > 1:
        if bpy.context.selected_objects[0].type == "MESH":
            self.layout.operator_context = "INVOKE_DEFAULT"
            self.layout.separator()
            op = self.layout.operator("object.shapekey_driver_creator",text="Shapekey Driver Creator",icon="DRIVER")
    
    
def register():
    bpy.types.VIEW3D_MT_pose_context_menu.append(add_to_specials)
    bpy.types.VIEW3D_MT_pose.append(add_pose_menu)  
    bpy.utils.register_class(ShapekeyDriverCreator)


def unregister():
    bpy.types.VIEW3D_MT_pose_context_menu.remove(add_to_specials)
    bpy.types.VIEW3D_MT_pose.remove(add_pose_menu)            
    bpy.utils.unregister_class(ShapekeyDriverCreator)


if __name__ == "__main__":
    register()
    

and my blender_manifest.toml

schema_version = "1.0.0"


id = "shapekey_driver_creator"
version = "1.2.1"
name = "Shapekey Driver Creator"
tagline = "Create Shapekey Driver using Bones as Input"
maintainer = "revolt_randy"
type = "add-on"

website = "https://github.com/revolt-randy/Shapekey_Driver_Creator"

tags = ["Rigging"]

blender_version_min = "3.6.5"

license = [
  "SPDX:GPL-3.0-or-later",
]

It’s working fine for me, but I’m wondering is there anything else I need to do or add so this will get accepted on the extension platform?

I haven’t bundled the add-on using the command line tool and tried installing it that way yet. That is my next step.

Just looking for opinions from more experienced devs than me…

Thanks
Randy

1 Like

If you want to make it an Extension there are a couple of things you will need to do:

  • remove the bl_info - this is all contained in the toml file for Extensions
  • blender_version_min for Extensions should probably be 4.2.1
  • add [Fork] to the title - since this is an addon created by someone else and then modified by you adding [Fork] lets people know you are not the original author - like this Extension
  • you don’t need to bundle via the command line unless you need some of the extra features it offers, if you just need a zip file then you can just zip it up like you would for older addons
  • the command line offers options like ignoring directories (if you have a test or data folder that you don’t want to bundle with the Extension) or separating builds by OS (if you have a bunch of Python dependency wheels for Windows, Mac and Linux and you want to reduce install size by not bundling dependencies users don’t need)
1 Like

Thanks for the info!

I knew the bl_info should be removed and forgot to remove it before posting…

Everything else you mentioned is great! Gives me the direction I need!

Thanks a lot!
Randy

1 Like