[Bf-python] Naming Conventions for Better Autocomplete

John R. Nyquist john at nyquist.net
Tue Sep 2 03:42:32 CEST 2008


This sounds great. In earlier versions of ActionScript, you could get code
completion in the Flash IDE by using postfixes such as "_mc" MovieClip and
"_txt" for Text. It worked out well and was nice to have a convention
everyone would follow. Once you get through all the common two letter
Blender conventions, maybe for the ones were there is no convention you
could move to three letter.

Regards,
John


On Mon, Sep 1, 2008 at 2:20 PM, Ian Thompson <quornian at googlemail.com>wrote:

> 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
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://lists.blender.org/mailman/listinfo/bf-python
>



-- 
=======================
John R. Nyquist
Nyquist Art + Logic
http://nyquist.net/
http://bitsofblender.com/
=======================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20080901/b4d20d7e/attachment.html>


More information about the Bf-python mailing list