[Bf-python] Re: tp_getset conversion update

Gilbert, Joseph jgilbert at tigr.ORG
Fri Oct 14 17:02:20 CEST 2005


I'm not in favor of the name changes to the attributes. These methods
where originally designed to work like the getter/setter that Ken in
implementing, however, they did not use the tp_getset method. Ken's work
should replace these method but with the same names.

However, I also realize that we need to maintain the current methods for
sake of backwards compatibility. We cannot register the same name for a
method and a getset. I would either prefer a tag added to the attribute
name for name conflicts (something small possibly ._aspectRatioX), or
removal of the method from the method struct.

Enable_xxx methods are useful to be added as constants to the module
(even though I don't think this is something you're working on
currently). Same goes for toggles. This is the 'inclusive', 'exclusive'
fields mentioned earlier.

I'm flexible though and this isn't set in concrete but it is what I'd
rather see :)

-----Original Message-----
From: bf-python-bounces at projects.blender.org
[mailto:bf-python-bounces at projects.blender.org] On Behalf Of Ken Hughes
Sent: Thursday, October 13, 2005 8:13 PM
To: Blender Foundation Python list
Subject: Re: [Bf-python] Re: tp_getset conversion update

Stephen Swaney wrote:
>
> Rather that putting it off, it seems better to deal with the names as
> they come up.
> 
> As Willian points out, eventually we will move away from 
> methods for attribute access.
> 
> Since there are no attributes at this time, we essentially have
> a free hand here.
> 
> The toggle buttion itself is labeled MBLUR.  The tooltip
> on the Bf numbut says 'set motion blur factor'.
> 
> In keeping with our principle of making the API look (kinda sorta)
like
> the GUI, this suggests a root something like mblur or moblur.
> So maybe  mBlurFactor or moBlurFactor?

Ok, here's a quick breakdown of the problem names, with some suggestions

  for attributes (I think this covers 95-99% of the conflicting names):

  'aspectRatioX',            'aspRatioX'
  'aspectRatioY',            'aspRatioY'
  'currentFrame',            'currentFrm'
  'edgeAntiShift',           'antiShift'
  'edgeIntensity',           'egdeIntens'
  'enableBackbuf',           'backbuf'
  'endFrame',                'endFrm'
  'framesPerSec',            'frmPerSec'
  'gammaLevel',              'gammaLvl'
  'gaussFilterSize',         'gaussFiltersize'
  'imageSizeX',              'sizeX'
  'imageSizeY',              'sizeY'
  'motionBlurLevel',         'motionBlurLvl'
  'newMapValue',             'newMap'
  'oldMapValue',             'oldMap'
  'partsX',                  'xParts'
  'partsY',                  'yParts'
  'postProcessAdd',          'postprocessAdd'
  'postProcessGamma',        'postprocessGamma'
  'postProcessMultiply',     'postprocessMul'
  'quality',                 'qual'
  'startFrame'               'startFrm'

All the yafray methods start with "yafray"; we can start the attributes 
with either "Yafray" or "yafRay" or "yafray_"?

Then there are many "enable" methods, which get/set individual bits in 
bitfields; I can either reproduce them or make "flag"-type attributes 
for them.

Ken
_______________________________________________
Bf-python mailing list
Bf-python at projects.blender.org
http://projects.blender.org/mailman/listinfo/bf-python



More information about the Bf-python mailing list