[Bf-python] Metaball module

Willian Padovani Germano wgermano at ig.com.br
Thu May 29 06:02:10 CEST 2003


On Wed, 2003-05-28 at 10:07, Michel Selten wrote:
> On Wed, 2003-05-28 at 06:22, Willian Padovani Germano wrote:
> > One thing we may end up changing is this: calling functions like
> > add_camera(), add_material(name), etc. as we do, generates Blender
> > objects with id->users = 1.  The old implementation would set these
> > values back to zero until the data got linked.  Maybe we'll do that,
> > too.
> 
> Erm, this could be a fault in the new implementation then. I didn't know
> about it when looking at the code.
> Doesn't this result in wrong reference counting?

It's really minor.  If you want to check, it's easy to find places where
the old implementation sets it back to 0 and comments about it, just
grep for ">us" in bpython/intern/, there's one place for mesh in
b_interface.c and some macros in BPY_macros.h.  I'm waiting for the
final testing phase, when all basic modules will be done and so linking
them to Object will also be finished.  Then we can test this well and
consider this step.  But, of course, then we need to increase user count
upon linking.  And this doesn't apply to Object.Get or .New, since there
the data object really should have us = 1.

--
Willian, wgermano at ig.com.br




More information about the Bf-python mailing list