[Bf-python] module consts / dictionary consts

Ken Hughes khughes at pacific.edu
Sat Aug 13 21:17:56 CEST 2005


Joseph Gilbert wrote:
> Ken Hughes wrote:
> 
>> Asking for a clarification in my mind, so I know exactly what I should 
>> be watching for while I'm reviewing the BPython code for API 
>> inconsistencies:
>>
>> We've been discussing inplementing dictionary constants to replace 
>> strings in the API refactoring.  There is also discussion of module 
>> constants, which are implemented in some BPython modules 
>> (http://wiki.blender.org/bin/view.pl/Blenderdev/UseOfConstantsInTheAPI).
>>
>> So are dictionary constants and module constants the same thing?  Are 
>> dictionary constants more like Blender.Lamp.Type?  Or a combination of 
>> both (i.e., making dictionaries of module constants)?
>
> ...
>
> By dictionary constant i assume you mean the PyContantObject in 
> constant.c. This is basically a psuedo-dictionary that was originally 
> meant to be loaded with key:value pairs. Then you would be able to call 
> x = myconst['key'].

I'm not sure what "dictionary constant" means, or I should say I'm not 
sure what stivs has in mind:

http://projects.blender.org/pipermail/bf-python/2005-July/002893.html

   "there's a mix of constants (ex: Window.Types, etc.) and strings
   (ex: camera.type) being passed and returned as arguments.  Rather
   than a mish-mash of types, we should settle on one form, probably
   module constants and dictionaries"

I'm hoping he'll elaborate more and clarify here or on the wiki.

Ken


"



More information about the Bf-python mailing list