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.
13 Comments
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.
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.
* @ tintwotin * This looks to be the best upcoming solution:
youtu.be/o4BTL_tLzcs
* @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+
* @ tintwotin * Yep, I messaged him earlier to see if he's still working on it, but no response yet.
* @3d illusions * You did see this gif from the above link, right? blenderartists.org/uploads/default/original/4X/8/d/5/8d5f9520b1fbc525cbd50f7ce145858749de8fd9.gif Download: github.com/tin2tin/Intellisense_for_Blender_Text_Editor
* @ 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.
There is github.com/nutti/fake-bpy-module module.
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
Why not just ask google " blender python autocomplete addon "? github.com/JacquesLucke/code_autocomplete
* @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.
* @3d illusions *
You've said this twice now, care to elaborate? I use it every day and don't have any issues.
* @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.