Featured post

new redirect for blender.org bpy docs.

http://www.blender.org/api/blender_python_api_current/ As of 10/11 november 2015 we can now link to the current api docs and not be worr...

April 12, 2013

Sublime Text 2 plugins

Sublime Text

It's relatively easy to remember the structure of the BPY API with sufficient practice. After plenty of enthusiastic hours experimenting with BPY eventually it didn't matter what program I wrote python scripts in. Some I wrote in the blender Text Editor, others in notepad++ or IDLE, and lately I've come to appreciate SublimeText2.

SublimeText has a nice API for writing plugins, and over the last 24 hours i've written 3 small plugins in an attempt to keep the python fu from getting much weaker from lack of practice.
- selected text to gist
- stringify typed words (avoids manually placing string quotes)
- point default browser at selected word or url

Blender Text Editor

I wrote most of these as Blender plugins for the Text Editor (link old post) a while back. Recently the blender Text Editor got updated with a form of autocomplete (ctrl+space after a dot) - while not as magnificent as intellisense-auto-suggest it's still great if you know what you're doing.

A small roundup of current features of the editor:
- duplicate line
- shift lines up/down
- auto complete
- line ruler (for 80 char mark)
- syntax highlighted
with addons:
- search selected (bpy docs / blenderscripting / stack overflow / python docs )
- eval current selection
- download gist by id
- upload gist as anonymous user
- active text to syntax highlighted 2d (can be modified to 3d) Text Objects