[Bf-python] data corruption

Gilbert, Joseph T. jgilbert at tigr.ORG
Thu Nov 17 20:22:57 CET 2005


Lol. It was my fault. Thx Ken for fixing this. :)

-----Original Message-----
From: bf-python-bounces at projects.blender.org
[mailto:bf-python-bounces at projects.blender.org] On Behalf Of Toni
Alatalo
Sent: Thursday, November 17, 2005 2:19 PM
To: cbarton at metavr.com; Blender Foundation Python list
Subject: Re: [Bf-python] data corruption

On Thursday 17 November 2005 20:12, Campbell Barton wrote:
> Has this been fixed in the CVS? I vcant get the logs right now, its a
> fairly major bug- can loose your work and olny find out on resave.

khughes just committed a fix .. or more like finished that unintentional

commit by another person so it now works as expected: py usage increases
user 
count and there is a getter for it even

> - Cam

~Toni

>
> Ken Hughes wrote:
> > Martin Poirier wrote:
> >> --- "Gilbert, Joseph T." <jgilbert at tigr.ORG> wrote:
> >>> I am not sure if objects behave the same way as
> >>> other data. If an
> >>> armature data block has an id.us of 0 it's not freed
> >>> (because we set it
> >>> to zero manually when the object is created). Maybe
> >>> what's happening is
> >>> that when a user manually deletes an object from a
> >>> scene somewhere the
> >>> free() code for that object is called?
> >>
> >> Ken mentionned that in his previous mail, Objects and
> >> Scenes are the only two blender types which are
> >> automaticly freed from memory when their user count
> >> reaches zero.
> >
> > Yeah, I assume it's free_libblock_us() which is being called,
because
> > it explicitly check for an object reading a use count of zero and
> > deleting it.
> >
> >> For all the others, BPY wouldn't *need* to increase
> >> the users on binding and decrease on destroy, but it
> >> would be safer nonetheless to do it, I think.
> >
> > Ken
> > _______________________________________________
> > Bf-python mailing list
> > Bf-python at projects.blender.org
> > http://projects.blender.org/mailman/listinfo/bf-python
_______________________________________________
Bf-python mailing list
Bf-python at projects.blender.org
http://projects.blender.org/mailman/listinfo/bf-python



More information about the Bf-python mailing list