Blender does not python API as python files, so only few APIs can be completed code automatically by IDE (PyCharm, Eclipse).
Therefore, I made a fake python modules for a code auto-completion on IDE.
I will show you an example in PyCharm.
PyPI package is also available.
Only you need to do is executing pip install fake-bpy-module-<blender_version>.
Yeah I’m not sure either. Besides it’s pretty obvious that stuff like context won’t work because there’s no Blender scene anyway. Still it would be interesting if you could “fake” objects too. But I guess I do things like this in the python console anyway (and then copy paste) so it doesn’t matter too much.
I will need to dive into this and see if this is helpfull.
I dont compelte understand what the benefit of this addon is. Does this addon autocomplete you code in PyCharm and also check for possible errors in the code and functions, classes etc etc?
I dont compelte understand what the benefit of this addon is
No, it is not add-on.
it is modules for only add-on developers.
we can auto-complete add-on codes in PyCharm or VSCode.
I was in trouble about that there is no module which can auto-complete bpy code.
so, i use this modules for auto-completion and make the development faster.
I got it working now using Pitiwazou method. Quite nice actually, no i need to get used to PyCharm, i used brackets always. So i need to check how i can get my colors the same to that theme. Im almost there but some parts wont color.
I use Script Watcher addon to update in blender on single file addons, don’t really work on multi files addons.
F8 works too but we have a lot of error messages from other addons.
3 solutions :
1 - Restart blender
2 - Use script watcher or F8
3 - Use F8 on clean blender with no addons
Yea i noticed the error with script watcher. I got a addon which consist of multiple script, this causes for errors about some script which cant load. So i guess im back at using F8, also causes errors sometimes for km stuff. So restart is only option. Was always working like that so i had hoped this would work.
I need to start learning about all them plint and pep8 warning, its looks messy due to that. Some of those warnings arent relevant i guess
Hi, I juste used the process discribed here : https://github.com/nutti/fake-bpy-module
but can you explain how to use these generated files in vs code for auto completion ?
I added the documents and tutorials about this module.
Please refer above page if you try to use this module.
And it is welcomed to give me other tutorials.
If you have any tutorial for other IDE, you can send me through Pull Request.