+ if self.selected_only:
+ objs = context.selected_objects
+ else:
+ objs = context.scene.objects
+ if self.active_layers:
+ layers = context.scene.layers
+ 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]