[Bf-python] shared properties?

Michel Selten michel.s at home.nl
Sun Jun 29 21:39:31 CEST 2003


On Tue, 2003-06-24 at 07:36, Willian Padovani Germano wrote:
> Hi,
> 
> > But can we implement the common ones as shared? It seems the blender
> > structs (quite intentionally) start with an ID struct.
> Yes, ID is a fundamental Blender struct.
> 
> > The difference is
> > we'd have a header file declaring these methods ([sg]etName to begin
> > with) and a macro to put in the method table adding the references.
> I'm not against restructuring, but I guess this is really not the moment.
> We have a lot to check, document, finish and test, all modules involved.
> Maybe you read on #blendercoders (Sunday meeting) that we'll try to have a
> working pre-release next Sunday or so, if not, two weeks from now.  The
> changes also involve moving parts of code around, use module headers for
> static declarations, renaming of functions and struct members, etc, so
> another change right now wouldn't help.  After we get out of this, that's
> another story.
> 
> On the other hand, the current way is very simple and uniform, though
> repetitive.  As I told you, one of the objectives was to have a brain-dead
> implementation very easy to pick up and learn from, maybe even a good
> teaching aid for Python/C use.  So I'd like to have Michel's opinion about
> it, too (are you reading, Michel ?).  get/setName is such a simple, basic
> part of the code that it may not be worthwhile to do them differently just
> because of the Blender internal way.

Maybe there is indeed a much nicer way of implementing the common
functions of each module. However, just as Willian said, the aim was to
make the new implementation understandable and easy to read. I think
we've reached that goal.

Any way of making the current implementation better is welcome and is
open to discussion. In my opinion, this is something that can (and
should?) be looked at after 2.28.

There's an enormous amount of work done and source code written. This
couldn't be done in an incremental way. That's the reason why no real
updates to the Python API have been made in the previous 2 releases. Now
that we've got a new foundation for the API, small extensions can be
added to each new Blender release. Also, rewriting some parts, if
needed, can be done in very small steps from now on I think.

There's an exciting future for script writers ahead.

With regards,
	Michel





More information about the Bf-python mailing list