[Bf-python] Naming Conventions for Better Autocomplete

Ian Thompson quornian at googlemail.com
Mon Sep 1 22:20:08 CEST 2008


Hey,

Since it is difficult to guess the type of variables in Python without
running the script itself, the autocompletion system is currently
limited. It has been suggested that I honour naming conventions for
Blender types so that a variable's members may be suggested as well as
the modules and data types already supported.

After a bit of experimenting I found this quite easy to add. I just
thought I should get some opinions before I make my guesswork the
standard! I have currently got the basic Blender type prefixes working
(ME for Mesh, OB for Object, etc.). These can be used pre- or
postfixed and in upper or lower case. For example,

ob_somename = Object.Get('Suzanne')
somename_me = ob_somename.data
somename_me.<<mesh suggestions appear here>>

I aim to support all entries in Blender.Types, of which my wiki page
has a complete list:

http://wiki.blender.org/index.php/User:Quorn/NamingConventions

If you use prefixes (or suffixes) a lot when scripting in Blender,
please let me know what you use.

Thanks a lot,
Ian / quorn



More information about the Bf-python mailing list