[Bf-python] Naming Conventions for Better Autocomplete

Nathan Letwory jesterking at letwory.net
Tue Sep 2 06:49:04 CEST 2008


Would it be an option to use the compiler module and get the AST tree
from a script instead? Maybe you can get enough info from that without
having to run a script. Note that I haven't checked fully how the
module works, but I'd prefer an automated solution to one that forces
the user into naming conventions of variables in their own scripts.
And lets not have a convention war on this, I just think that the user
shouldn't be restricted.

/Nathan

On Tue, Sep 2, 2008 at 4:42 AM, John R. Nyquist <john at nyquist.net> wrote:
> 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/
> =======================
>
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://lists.blender.org/mailman/listinfo/bf-python
>
>



More information about the Bf-python mailing list