[Bf-committers] Removing properties with Python API?

Campbell Barton ideasman42 at gmail.com
Sun May 9 01:36:18 CEST 2010


On Sat, May 8, 2010 at 11:10 PM, whiterabbit at dreamscapearts.com
<whiterabbit at dreamscapearts.com> wrote:
> Hi everyone,
>
> Hopefully this isn't too far out of context for this mailing list.
> My render engine script dynamically creates Blender panels and button
> properties from XML data (assembles classes as text and exec() them).
> I'm providing an interface to load and unload these XML files which in
> turn register and unregister panel classes, however I can't seem to
> figure out a way to remove the properties created for the panels. I
> considered using dynamic and ID properties but static is the only way to
> do what I need. My concern is if the user loads and unloads lots of
> XML's during a single session that this will act like a memory leak (as
> more unused properties are added).
> Is there a way to do this or should I just not worry about it?
>
> Cheers,
> Eric Back (WHiTeRaBBiT)
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers

just committed a function to remove a property, this should eventually
be done automatically with class bpy.types.unregister()

info on how to use in the commit log.

-- 
- Campbell


More information about the Bf-committers mailing list