← All ideas
  • Published 31 Jan 2020

autocomplete in the text editor

I did a search and was surprised to find this doesn't appear to have been suggested before, but it's so painful having no autocomplete in the text editor, particularly when you haven't yet fully learnt all of the API.

I know you can use the python console, but sometimes that's entails having to create for loops and variables and what not.

I'll bet there's be way more contributions if this was implemented. A debugger would also be nice, but that might be asking a bit much?

I use Jacques VS Code extension if i'm making proper scripts, but the fake bpy isn't always that reliable.

94.7%

Development Status: Open

Upvote 18 Downvote 1
3di
31 Jan 2020

13 Comments

mrdixioner1

Two years have passed, but this has not yet been implemented. Also, there is no such necessary function as automatic closing of brackets and quotes. I believe that if a program contains a scripting function, it must necessarily contain a code completion function and auto-closing quotes and brackets. If not, this program discourages any desire to write scripts for it.

1
tintwotin

There is an add-on for intellisense in the Blender Text Editor here: blenderartists.org/t/how-would-you-show-some-love-for-the-blender-text-editor/1163857/141 First post of that thread includes all existing add-ons for the Text Editor.

An unfinished attempt to port Jacques' Autocomplete to 2.8+ github.com/tin2tin/code_autocomplete - it would be great if someone could take it from here.

1
3di Author

* @ tintwotin * This looks to be the best upcoming solution:

youtu.be/o4BTL_tLzcs

tintwotin

* @3d illusions * Thank you. I'm really surprised that this add-on hasn't gained more attention. I found it here: github.com/BlenderCL/weed but it needs an update to 2.8+

3di Author

* @ tintwotin * Yep, I messaged him earlier to see if he's still working on it, but no response yet.

3di Author

* @ tintwotin * yes thanks, it's really good. How could we get that to autocomplete in this scenario:

import bpy

mats = bpy.data.materials

for mat in mats: mat. *** autocomplete options here ***

I tried enabling live edit but no joy.

It is now possible to build the real bpy with make bpy . In my experience I am able to write and run scripts against bpy with system python with no frills.. however i've still had absolute hell getting autocompletion to work in any context.. which seems like a pretty fundamental thing to get people more deeply involved.

wiki.blender.org/wiki/Building_Blender/Other/BlenderAsPyModule

IIIFGIII

Why not just ask google " blender python autocomplete addon "? github.com/JacquesLucke/code_autocomplete

3di Author

* @IIIFGIII * That was the first thing I checked, but found it doesnt work in 2.8. I spoke with Jacque who pointed me in the direction of his VS Code extension instead, it's great but fake bpy isnt always reliable. It's also overkill for quick scripts.

testure

* @3d illusions *

fake bpy isnt always reliable

You've said this twice now, care to elaborate? I use it every day and don't have any issues.

3di Author

* @testure * I can't remember the specific functions/parameters, but it quite frequently fails to autocomplete. I'll keep an eye out next time I use it.