[Addon] Auto Completion in Blenders Text Editor

(Jacques Lucke) #141

Finally I managed to release version 2 of this addon!

Blender Market: https://cgcookiemarkets.com/all-products/code-autocomplete/

Documentation: http://code-autocomplete-manual.readthedocs.org/en/latest/

Please tell me if you find bugs or if you have suggestions :slight_smile:

(Pitiwazou) #142

Ok I will try this the weekend thx :wink:

(pink vertex) #143

Testing this now.

Bmesh still shows rst text. You might use the docutils/sphinx module to convert these.

Ok, bmesh autocompletion is not yet supported i guess. The rest seems to work fine. Just typed a few meaningless lines ;).

(Jacques Lucke) #144

Yeah I didn’t test the bmesh module to be honest. The completion you got is done by jedi… I don’t have much influence on this. I can try to improve it like I did with the bpy module but will see…

Good to hear that it works fine in general :slight_smile:
I did not have much feedback by others for this new version, so thank you.

(Jellybit) #145

I’ve been seeing videos of people using your auto-complete addon and I’m very impressed. I tried installing it, but your documentation isn’t quite clear on what your addon expects regarding Jedi. This is what it says:

When there is a error message Jedi library not found you have to use another .zip file in the beginning. Direct download from the github page is not supported, because the Jedi library is a submodule which isn’t included in these downloads. You can either use an official release or use git to download the repository and its submodules.

You mentioned that the jedi module is not included in your github download. I tried adding the jedi module to your download, copying the contents of the “jedi” subfolder into your own “jedi” subfolder, but it gives this error and refuses to run:

Traceback (most recent call last):  File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\modules\addon_utils.py", line 324, in enable
    mod = __import__(module_name)
  File "C:\Users\HiddenUsername\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\code_autocomplete-master\__init__.py", line 45, in <module>
    modules = developer_utils.setup_addon_modules(__path__, __name__, "bpy" in locals())
  File "C:\Users\HiddenUsername\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\code_autocomplete-master\developer_utils.py", line 39, in setup_addon_modules
    modules = import_submodules(names)
  File "C:\Users\HiddenUsername\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\code_autocomplete-master\developer_utils.py", line 30, in import_submodules
    modules.append(importlib.import_module("." + name, package_name))
  File "C:\Program Files\Blender Foundation\Blender\2.76\python\lib\importlib\__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "C:\Users\HiddenUsername\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\code_autocomplete-master\jedi\__init__.py", line 41, in <module>
    from jedi.api import Script, Interpreter, NotFoundError, set_debug_function
ImportError: No module named 'jedi'

I looked into my roaming appdata and it seems to be fine. Your jedi folder has the contents of the jedi library (api, library, parser, init.py, etc…). I still get errors if I include the other root files/folders in the jedi git repository. If I remove the jedi library, it installs fine but complains about the missing library.

So my question is, am I understanding your documentation properly? It didn’t spell out that I needed to add the jedi library to your jedi folder, but that seemed pretty clear to me by looking at your file structure. What exactly is the documentation asking me to do?


(Jacques Lucke) #146

please look here:

I hope it helps :slight_smile:

(Jellybit) #147

Yes, I quoted your documentation at the beginning of my post. My question is about the documentation.

But maybe I’m missing something in that link you gave me as an answer? I’ve read it several times but I can’t seem to find anything I didn’t already state in my post.

Thank you

(Jellybit) #148

I’d like to help re-write that part of the documentation if it’s unclear. I was a technical writer for years, and I’d like to help others who are running into a similar problem understanding it, as well as help you get more sales. It seems like a great tool. I was going to buy it immediately upon hearing about it, but wanted to make sure it’d work with my setup/situation first. It seems there would be many others like me in this regard. Anyway, let me know what you think.

Also, if anyone else has gotten the jedi portion of this auto-complete to work, I posted a question about the auto-complete documentation above. Maybe you have some insights?


(Spirou4D) #149

Hi [URL="/u/Jacques_Lucke

I have one question for you and your amazing addon: is it possible to have an option to isolate the general functions when you search:



and special others... 

with a simple color , not?
or a possibilty to remove them of the search resullt of auto-completion?

A special color would be better.
Do you see what i mean?
At soon.

(Vralsza) #150

This looks neat. No bge support though it seems.
Is there anyway to extend the api stuff it draws from (read: can I add bge and/or other stuff to its lexicon)?

(Jacques Lucke) #151

@Jellybit: PM

@Spirou4D: hm yes that may be possible (I have to see how it fits into the code…), why do you need this?

(Spirou4D) #152

Because in answer, we can’t make the difference between this kind of functions and really function of Blender.
This kind of functions are just to navigate in class by iteration, not really blender Operators, i mean.

(Dopstephen) #153


The following was animated with Animation Nodes. I’ll be happy to answer any questions. Thanks.

(Jacques Lucke) #154

@Spirou4D: ah okay, I’ll think about it for the next release…

@Dopstephen: looks nice but I think you accidently posted this into the wrong thread

(Viktor) #155

Nice add-on, thx!

It should be bundled with Blender.

(Overson) #156

is there any plans for this addon to work in 2.8?

(Jacques Lucke) #157

Currently, I don’t plan to update the addon due to time constraints and because I don’t use it myself anymore…

(Overson) #158

How grad and time consuming do you think it you be for someone that is some what ok with python to port it to 2.8 once the api is stable?

(Jacques Lucke) #159

I’m not sure. Might take a while to update the drawing part. Haven’t looked at the code for a while…