[Bf-python] Problem with memory...

Manuel manuelbastioni at tin.it
Sat Jul 16 23:05:04 CEST 2005



I'w writing a tool to make hairs in Blender:

http://www.dedalo-3d.com/public/forum/index.php?a=topic&topic=1121030552_19&page=1


During the usage, maybe the user want delete the hairs created
(a sort of undo).

To do this, I've written a simple function:

def deleteHairs():
     global objHairs
     sc = Scene.getCurrent()
     for ob in objHairs:
         ob.getData().verts=[]
         ob.getData().faces=[]
    sc.unlink(ob)
    sc.update(0)
    objHairs = []

where objHairs is a list of objs.

The problem is: after this function the memory is not free...
it remain exactly as when all objs exist.

Suggestions? Maybe Blender undo?

thx,
           Manuel




More information about the Bf-python mailing list