BlackStartx / PyCharm-Blender-Plugin

A PyCharm Plugin that simplify the development of Blender Add-On inside the PyCharm IDE.
MIT License
151 stars 12 forks source link

No option to mark folder as Blender Add-On, bpy module not found #15

Closed phillipsconsulting closed 1 year ago

phillipsconsulting commented 1 year ago

When right clicking and navigating to New -> Blend-Charm only see 'Create New Blender Addon', there is no option to mark a folder as a Blender add on.

Also, after creating a Blender add on folder, the code generated cannot find the bpy module

Am I missing something?

Environment...

PyCharm 2023.1.1 (Professional Edition) Build #PY-231.8770.66, built on April 27, 2023 Runtime version: 17.0.6+10-b829.9 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 2038M Cores: 12 Non-Bundled Plugins: mobi.hsz.idea.gitignore (4.5.0) org.blackstartx.blend-charm (2023.1)

phillipsconsulting commented 1 year ago

It did seem to download a package called bpy, but the syntax error in the code remains.

BlackStartx commented 1 year ago

Hi Philip~

First of all, are you sure you're trying to mark as an add-on folder a directory who's parent is the project root?

You can only mark directory who are child of your project root.

Project Root

A Child Folder ✅

Too Deep Here 🚫

Secondly, yeah, it's completely normal that pycharm can't find the references of the bpy module since that namespace exist in Blender but it's not a python lib.

You may need some cloned modules that may help you with auto-completition and so on~ In any case launching blender with those errors is fine since the namespace will be found, thus I recommend having a fake module~