objs = [o for o in objs if any(a and b for a, b in zip(layers, o.layers))]
objs = [o for o in objs if o.type=="MESH" and not o.lod_for_parent]
objs = [o for o in objs if (not o.compound or o.parent not in objs)]
objs = [o for o in objs if any(a and b for a, b in zip(layers, o.layers))]
objs = [o for o in objs if o.type=="MESH" and not o.lod_for_parent]
objs = [o for o in objs if (not o.compound or o.parent not in objs)]