[Bf-python] About the python objects header files

Michel Selten michel.s at home.nl
Thu May 29 21:09:49 CEST 2003


On Thu, 2003-05-29 at 16:29, Jordi Rovira i Bonet wrote:
> What i want to discuss, is: in the header file it should be only what 
> should be exported from the code file. Many of these shouldn't be here, 
> for example the methods struct and the implementation function 
> declarations. But that part in the modules.h header should be in here. 
> Cleaning this would allow to include "Camera.h" in other modules like 
> "Scene.c" where it is required. Now there are problems because of the 
> static functions. These should also be applied to many other modules. An 
> example of how a header should look like in my opinion is Bone.h, which 
> exposes the necessary things and can be included in other files, like 
> Armature.c.

A little explanation is necessary here I think.
When I started with this exppython challenge, I had in mind to only
write one .c file for each module. Some of the functions needed to be
visible to other .c files and that's why I created the modules.h file.
In the beginning only 2 function prototypes were in that file per module
(at least that was the intention). Now there are 4 function prototypes
per module in there.

The reason for my above decision was to minimize the number of files in
the api2_2x directory and to keep the overview simple.
 
Due to the size of some of the modules, it was suggested to split each
.c file into 2 files and put the definitions of structures, doc strings
and some other function prototypes in the accompanying .h file.
Actually, this .h file is only included (or at least I think it should)
by the accompanying .c file.

I have no problem in reorganizing the sources. I made a choice at a
time, somebody suggested a change, and I kind of liked that change. If
there's a better suggestion then we can adapt to that change.

I'm glad that there are more persons working on this exppython part now.
It will result in making some good decisions!

> About the armatures modules. i've found out that i haven't used the 
> standard naming convention for "the three functions".

I made a stupid copy/paste mistake in my mail when I asked for these
functions. You all did a very fine job in creating those functions with
the suggested names. However, I'm probably the one who used the M_
convention. I checked in the sources before I sent out the mail :)

You are very correct to note that we should stay to one convention!

With regards,
	Michel





More information about the Bf-python mailing list