BlackStartx / PyCharm-Blender-Plugin

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

Marking projects or folders as addons does not exist in the menu #22

Open stylerhall opened 9 months ago

stylerhall commented 9 months ago

Hello! I am trying to use the plugin for some Blender development. Is there a setting somewhere or something I need to do to get the mark folder as ... menu options?

PyCharm Version: 2023.3.2 BlendCharm Version: 2023.3

image

I used the plugin to create a new Blender Addon. The folder contains an __init__.py module.

import bpy

bl_info = {
    "name": "Exporter",
    "author": "shall",
    "description": "Exporter",
    "blender": (4, 0, 2),
    "location": "View3D",
    "warning": "",
    "category": "Generic"
}

classes = (
)

register, unregister = bpy.utils.register_classes_factory(classes)

Cheers!

Seth

BlackStartx commented 9 months ago

Hi Seth~ Sorry for the slow reply~

It may be due to a not-so-clever intentional feature which allow you only to mark the "Root" or a "Child Directory" of the root as an Addon Folder.

Project Root :white_check_mark:

A Child Folder :white_check_mark:

Too Deep Here :no_entry_sign:

Or Even Deeper :no_entry_sign:

It seems you're tring to mark a sub-directory of your project who's not child of the root directory, is it right? If that's the case it's probably not allowing you to do due to that rule.

I can understand that re-arranging the project structure is not easy or viable, so I'll probably have to fix this "feature" instead~ :P

P.S: I've made it that way to prevent possible recursion of Addon inside Addons, but that's a dumb rule, not gonna lie~
stylerhall commented 9 months ago

Ah, yes, that would be the issue!

This is unrelated, but I'm curious: is it possible to control the addon load order during the Blender launch?

stylerhall commented 9 months ago

Hi Seth~ Sorry for the slow reply~

It may be due to a not-so-clever intentional feature which allow you only to mark the "Root" or a "Child Directory" of the root as an Addon Folder.

Project Root ✅

A Child Folder ✅

Too Deep Here 🚫

Or Even Deeper 🚫

It seems you're tring to mark a sub-directory of your project who's not child of the root directory, is it right? If that's the case it's probably not allowing you to do due to that rule.

I can understand that re-arranging the project structure is not easy or viable, so I'll probably have to fix this "feature" instead~ :P

P.S: I've made it that way to prevent possible recursion of Addon inside Addons, but that's a dumb rule, not gonna lie~

It would be nice if you could manually mark a folder as a Blender Addon root, instead of using the project root. So, I could pick a folder from anywhere in my repository that it always puts my addons in.

BlackStartx commented 9 months ago

Yeah, I should definitely also add that as a feature~

Another reason of why I used this setup was also to ensure that all add-ons were on the same directory (to help IntelliSense and to mimic the real blender add-on folder)

I will try to update the repo asap, but I'm currently busy with some other project, I'll update you on this once it's implemented~ ✨

Thanks and sorry for the issue~ :c