[Bf-python] No More Renaming or Alias Vol 101, Issue 3 (Squeaky Wheel)

Campbell Barton ideasman42 at gmail.com
Wed Jul 10 02:27:13 CEST 2013


On Wed, Jul 10, 2013 at 9:32 AM, Atomic Perception
<atomicperception at gmail.com> wrote:
> I am one of those squeaky wheels. Please don't rename anything and please
> don't spend valuable developer time implementing an alias system. What does
> it matter if I have to type 'birthtime' or birth_time' to reference my
> value? If it ain't broke don't fix it. Dang...nuf said.
>
> Now that scripts are up and running I can't believe you want to keep
> renaming things. Or better yet, let's rename things and delay the braking of
> those renames for how many releases?
>
> Having to repair scripts that used to work destroys the illusion of progress
> and demoralizes developers, me for one.
>
> Developer time should be spent making things that don't work
> ...work. Not making things that do work not work.

Between 2.67 and 2.68 Blenders python API broke again (it sounds
dramatic, some very small things changed...)
- an redundant BMesh operator that wasn't used anywhere was removed,
its possible a script used it though.
- weight paint operators arguments and behavior changed.
- recalculate normals had an argument removed (which wasn't needed).

Note that these breakages happen because of regular blender
development, nobody went in and renamed anything.

So - we cant pretend blender is some rock solid API that would be
totally stable as long as we stopped renaming properties.
its a moving target - features are added, removed, rewritten from time
to time, scripts depending on specific behavior of areas that are
rewritten will often break.

The frequency we rename variables is so low (as in - not at all for
2.68), that if mistakes, spelling-errors, very-inconsistent-names are
changed, I think its worth doing to maintain a consistent api.

If a GSOC student manages to spell "colour" for a property name, and
somehow this slips past review, would you propose to keep this?

In blender 2.4x we had both colour/color in our API names, it was one
of the many annoying inconstancies that happened over time because of
a `dont-change-anything` policy.



More information about the Bf-python mailing list