[Bf-committers] How to make debug build of 2.6x with minGW+scons

Brecht Van Lommel brechtvanlommel at pandora.be
Thu Jan 5 01:01:29 CET 2012


On Thu, Jan 5, 2012 at 12:03 AM,  <migius at gmx.net> wrote:
>> In case it's useful: after undo in Blender, you basically need to
>> assume that all references to Blender data are now invalid. Exceptions
>> are the window manager, screen and user preferences, but even then,
>> when python gives control back to Blender, nearly all data could be
>> removed by some tool.
>>
>
> Brecht, thanks for clarifying.
> Is there eventually an example of such script working well this way?

I can't think particular example scripts that address this, but I'm
also not sure what you're trying to do exactly.

The safest way to do things is to store persistent data that you need
again after the script runs in (id) properties on datablocks. If you
really need to keep references to data around yourself, you could
check if the data still exists by comparing if the data you're
referring to is still in bpy.data, maybe comparing with .as_pointer()
and/or storing the name and doing lookups that way.

Brecht.


More information about the Bf-committers mailing list