[Bf-python] armatures again
Michel Selten
michel.s at home.nl
Wed May 14 19:38:34 CEST 2003
On Wed, 2003-05-14 at 06:02, Willian Padovani Germano wrote:
> Sure, we can tell in the docs the "g"et will go away later.
>
> > The getName & setName functions can probably be applied to the other
> > modules as well, or am I mistaken? In that case, I think we should add
> > them (maybe after 2.28).
>
> They are already there, only thing is that setName is called rename.
Ah, now I noticed them :) I see you added the rename functions to all
the modules you created. Since it's an addition to the existing 2.25
api, I would like to propose to change the rename functions to setName
to keep it more consistent with the other functions.
(Ok, I think the rename function is an addition to the api because I
couldn't any rename function in the api documentation on blender.org. I
didn't check the 2.25 implementation for it...)
> > Maybe another decision that we need to make is: which attributes are
> > going to be implemented in the 'get_attr' and 'set_attr' functions?
> > Currently most of the attributes are implemented - because of history.
> > But now that we are adding those separate functions, do we need another
> > method for accessing those variables? Providing more options to the user
> > is nice, but remember that each additional line of code contains a
> > potential bug and needs maintenance.
>
> One thing the previous programmers kept in mind and we should, too, is
> that there are many ways to write an API: the OpenGL "state-machine"
> way, the OO way, etc. It's good to let things look as much as normal
> python code as possible, so I think we should keep the "direct" access
> way (though it actually calls the get/set functions). After all,
> getAttr and setAttr are useful pieces of code, very common in Python
> embedding/extending and, again, they look like the "python way".
Fine, I think that's a good argument to keep it :) It was just an idea.
With regards,
Michel
More information about the Bf-python
mailing list