The FASTEST way to get your add-on on Blender's Extensions Platform

Поделиться
HTML-код
  • Опубликовано: 13 окт 2024

Комментарии • 30

  • @CGPython
    @CGPython  2 месяца назад +5

    Extension Docs
    docs.blender.org/manual/en/latest/advanced/extensions/index.html
    Converting a Legacy Add-on into an Extension
    docs.blender.org/manual/en/latest/advanced/extensions/addons.html#converting-a-legacy-add-on-into-an-extension
    Relative Imports change example:
    github.com/UuuNyaa/blender_mmd_tools/commit/cd39e74ccf114fe1df27c7fbcbd3c2cabf4bab58#diff-528e888190f6ac332f33fb87535bbdbfb27d361f91ab87049690661a980c62df
    User Preferences and __package__
    docs.blender.org/manual/en/latest/advanced/extensions/addons.html#user-preferences-and-package
    __package__ change example:
    github.com/johnnygizmo/BulkAsset/commit/ade985e6b170eb0e5b079301297f87ba7e6d5deb#diff-0efeed0c244faefa43cd4995ec9eb5df75eedbf5387e07b334530c2bcd6ae4a8
    Example Blender 4.2 Extension add-on that uses the vendorize
    github.com/CGArtPython/Example-Add-on-Extension-with-vendor
    Example Blender 4.2 Extension add-on that uses Python wheels
    github.com/CGArtPython/Example-Add-on-Extension-with-wheels
    Example Blender 4.2 Extension add-on that bundles another add-on
    github.com/CGArtPython/Example-Combined-Add-on-Extension
    Developer Forum Issue with Bundling Add-on Dependencies in extensions
    devtalk.blender.org/t/issue-with-bundling-add-on-dependencies-in-extensions/35845

  • @SpencerMagnusson
    @SpencerMagnusson 2 месяца назад +2

    Great overview! I had thought about doing a similar video, but it wouldn't have been nearly as thorough as this one. Good work.
    And I appreciate the shoutout, hopefully my thoughts on that thread are clear enough XD

    • @CGPython
      @CGPython  2 месяца назад +1

      Thanks Spencer!
      Yeah, your thoughts were clear and great! 💪

  • @studioromanrec
    @studioromanrec 2 месяца назад +2

    Here is a very simple add-on. The __init__.py file contains the following code:
    import bpy
    class OBJECT_OT_add_cube(bpy.types.Operator):
    bl_idname = "object.add_cube"
    bl_label = "Add Cube"
    bl_options = {'REGISTER', 'UNDO'}
    def execute(self, context):
    bpy.ops.mesh.primitive_cube_add()
    return {'FINISHED'}
    class VIEW3D_PT_simple_panel(bpy.types.Panel):
    bl_label = "Simple Cube Panel"
    bl_idname = "VIEW3D_PT_simple_panel"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = 'Simple Cube Addon'
    def draw(self, context):
    layout = self.layout
    layout.operator("object.add_cube")
    def register():
    bpy.utils.register_class(OBJECT_OT_add_cube)
    bpy.utils.register_class(VIEW3D_PT_simple_panel)
    def unregister():
    bpy.utils.unregister_class(OBJECT_OT_add_cube)
    bpy.utils.unregister_class(VIEW3D_PT_simple_panel)
    if __name__ == "__main__":
    register()
    And here is the manifest file:
    schema_version = "1.0.0"
    id = "simple_cube_addon"
    name = "Simple Cube Addon"
    version = "1.0.0"
    tagline = "Adds a panel that spawns a cube"
    maintainer = "Your Name "
    type = "add-on"
    tags = ["Object"]
    blender_version_min = "4.2.0"
    license = ["SPDX:GPL-2.0-or-later"]
    Why doesn't it launch in VS Code, but works fine when zipped and installed in Blender?

    • @CGPython
      @CGPython  Месяц назад

      I am able to run your code from VSCode
      looks like the issue is with `_name_ `
      here is the explanation
      ruclips.net/video/-qq64ReRZhU/видео.html

  • @studioromanrec
    @studioromanrec 2 месяца назад

    Everything is working now; I figured out what the issue was.

  • @binatheis
    @binatheis 2 месяца назад

    WOW thanks!! greetings from Colombia.

    • @CGPython
      @CGPython  2 месяца назад

      You're welcome!

  • @kvdam8826
    @kvdam8826 2 месяца назад

    Hi Victor, Thanks for this. 👍👍

  • @studioromanrec
    @studioromanrec 2 месяца назад

    I am eagerly awaiting your response. Could you please advise on how to handle this?

  • @CartoonTV-jt5li
    @CartoonTV-jt5li 2 месяца назад +6

    Hello Victor. How do you run these addons with VS Code if there is no bl_info = { in the addon? The addon won't run with VS Code without it. Can you advise what to do?

    • @CGPython
      @CGPython  2 месяца назад +1

      For a basic add-on you need to create a folder with a __init__.py with the add-on code without the bl_info dictionary and a blender_manifest.toml file with all the metadata that you would usually add into the bl_info dictionary.
      I'll be creating a video on this very topic soon.

    • @CartoonTV-jt5li
      @CartoonTV-jt5li 2 месяца назад

      @@CGPython I'm doing it that way, but it doesn't run with VS Code. However, when I compress it into a ZIP file and install it in Blender, everything works, it installs as an Extension just fine. I will be looking forward to your video. Thank you for responding.

    • @CGPython
      @CGPython  2 месяца назад

      What version of the Blender VSCode Extension are you using?
      Are you on macOS, Windows, or Linux?
      Updates were recently made to that VSCode Extension. The current version is v0.0.21

    • @CartoonTV-jt5li
      @CartoonTV-jt5li 2 месяца назад

      @@CGPython I have macOS, VS Code version 1.92.1 (Universal), OS: Darwin arm64 23.2.0. What do I need to do?

    • @CartoonTV-jt5li
      @CartoonTV-jt5li 2 месяца назад

      @@CGPython Blender Development
      v0.0.21

  • @KJYMOON
    @KJYMOON Месяц назад

    I Love your video. thanks !

  • @artistCDMJ
    @artistCDMJ 2 месяца назад

    Great overview, but I don't think I'm up to making my own addons into extensions with all that is involved to learn before I can do it. Legacy add-on support hopefully doesn't disappear before I learn how to do this or we get better automated tools to convert with. I'm not a really strong addon dev as I am just an artist scratching an itch here and there.

    • @CGPython
      @CGPython  2 месяца назад +1

      Thank you for sharing!
      If you do simple one file add-ons you only need to create the blender_manifest.toml for your extension add-on.

    • @artistCDMJ
      @artistCDMJ 2 месяца назад

      @@CGPython right before they announced they were going live with extensions, I had just split my addon into modules to try to be better organized and be like the big guys… but my addons are not the type a lot of people find useful so no feedback on them. I’ll keep watching and maybe at some point I’ll figure this out.

    • @CGPython
      @CGPython  2 месяца назад +1

      Do you have your add-ons on GitHub or another source code version control website?

  • @arturertel
    @arturertel Месяц назад

    that helped a lot!

  • @binatheis
    @binatheis Месяц назад

    I have a question: I am building an addon in which I will make use of some Python wheels, but one of these wheels needs OpenImageIO and numpy to work. I have done some research and found out that Blender has OpenImageIO and numpy installed as Python modules, if I decide to exclude OpenImageIO and numpy wheels from my addon, could the wheel that depends on them to work have problems to run? That is, would my addon detect and work fine with those modules that come by default in Blender?

    • @CGPython
      @CGPython  Месяц назад +1

      Great question!
      You should be fine using the OpenImageIO and numpy that come with Blender.
      You would only need to worry about this if your add-on needed a particular version of OpenImageIO or numpy.

  • @no-one3795
    @no-one3795 2 месяца назад

    I've uploaded my add-on into the website. But it's been a week and it hasn't gotten approved yet ☹️

    • @CGPython
      @CGPython  2 месяца назад +1

      hopefully they will get to it soon! 🤞