Remove objects from a scene but keep them in a list

by Jesper   Last Updated December 05, 2017 10:15 AM

Okay, so I basically have this snippit:

while (len(houses) < 3 and count < 8):
    if True:
        print ("Yass")
        clean_up_but_keep('MESH', ['Plane', 'Plane.001'])
        print ("Damn")
        clean_up_but_keep('MESH', ['Plane', 'Plane.001'])
    count +=1

print ("Amount of houses")
print (len(houses))

However, when I print len(houses), it shows [], which indicates that the list is empty?

Is it because the cleanup I do also deletes the cubes from the list, and if so, does anyone know how I can remove the cubes from the scene without deleting them?

Best regards

A shit programmer

Related Questions

Switch into edit mode during for-loop

Updated February 28, 2017 12:15 PM

Update Edge Info when using script in Edit Mode

Updated January 18, 2018 21:15 PM

How to create macro/record actions while modeling

Updated June 16, 2016 08:06 AM