BlackStartx / PyCharm-Blender-Plugin

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

I got an error #3

Closed MoConWu closed 2 years ago

MoConWu commented 3 years ago
Read prefs: C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\3.0\config\userpref.blend
Exception in thread Thread-1:
Traceback (most recent call last):
  File "D:\Program Files\Blener\blender-3.0.0-alpha\3.0\python\lib\threading.py", line 954, in _bootstrap_inner
    self.run()
  File "D:\Program Files\Blener\blender-3.0.0-alpha\3.0\python\lib\threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Administrator\AppData\Local\Temp\BlendCharm\pycharm_connector.py", line 147, in start_client
    on_data(s, s.recv(struct.unpack('>i', s.recv(4))[0]))
  File "C:\Users\Administrator\AppData\Local\Temp\BlendCharm\pycharm_connector.py", line 104, in on_data
    script_folder = bpy.utils.user_resource('SCRIPTS', "addons")
TypeError: user_resource() takes 1 positional argument but 2 were given

blender 3.0 alpha

when i click run/debug in pycharm i got the error.

it look like error in blender threading.py

BlackStartx commented 3 years ago

Hi MoConWu~

In Blender 2.92 the official api to get a resource path is:

image (source)

In 3.0 Alpha has been changed to:

image (source)

It seems that Blender is forcing new scripts to use keyword arguments in the newer versions of Blender.

But... I do not really know if I shall release an official fixed release yet, cause Blender 3.0 is in Alpha state and a lot of things could change (so it could easily break itself again in a few Blender updates... and the same fate could hit developed add-on as well).

But if you really need to use this tool in the Alpha version of Blender 3.0 I could release a fixed package here~

P.S: Thanks for letting me know in advance of those changes in the newer version of Blender~ ^-^

MoConWu commented 2 years ago

ok. thanks. i used blender 2.9

i think blender3.0alpha is not final. we can waiting that.