[Bf-python] Re: tp_getset conversion update

Stephen Swaney sswaney at centurytel.net
Thu Sep 29 18:05:29 CEST 2005


On Thu, Sep 29, 2005 at 08:15:25AM -0700, Ken Hughes wrote:

> My intent was that if we're trying to make the BPy API resemble Blender 
> UI as much as possible, it should happen for all the buttons: where 
> possible, there should be an attribute matching each UI button.  I can't 
> tell you how much time I've spend trying to figure out which BPy 
> attribute corresponds to which UI button, even with our fine 
> documentation :-)

The general principle of making our API look like the
Blender UI is one we want to follow.  Believe me, I *do*
appreciate the difficulty of trying to sort thru our legacy
design and match it up with both the UI and the internal
structs.


> So "mistype" is a legacy attribute (in 2.37a) while "lin", "sqr", and 
> "qua" are new attributes which will someday replace it.

The principle of buttons corresponding to attributes is correct.
The problem in this instance comes from applying it blindly.

In World, mistype is an attribute.  Its values can be 'qua',
'lin', or 'sqr'.  In the UI, this is presented as a set of
radio buttons.  Only one can be selected at a time.


Note: Since the word 'mistype' does not appear in the UI,
maybe we should call our attribute 'misttype' so it does not
resemble the word for typing error.  Or perhaps 'falloff'
would be even better since that more closely describes its
use.


> If this is approach is something I've misinterpreted, that's fine.

No, in general, you are on the right track.  The problem
here comes from our simple statement of a general principle.
Like all rules of thumb, there are some exceptions or
specific situations that need a more careful description.

-- 
Stephen Swaney			
sswaney at centurytel.net




More information about the Bf-python mailing list