[Bf-committers] properties per datablock & python

Joe Eagar joeedh at gmail.com
Fri May 23 01:42:30 CEST 2008


Martin Poirier wrote:
>> One big warning: As always with our API, do NOT keep
>> references to id 
>> properties floating around.  This *will* cause crashes. 
>> Always re-get 
>> the reference whenever you need it.  This is true for most
>> things in the 
>> api as well, btw.
>>     
>
> That's fixed in 2.46, IIRC.
>
> BPy keeps a "database" of weakref to blender python data, when the datablocks are freed from Blender, BPy marks them as invalid and subsequent access to the data in python triggers exceptions (and not crashes).
>
> Martin
>
>
>    
This isn't true of the ID property code however.

Joe


More information about the Bf-committers mailing list