ObjectsByAttributes

ObjectsByAttributes(name=None, layerName=None, layout=None, filter=0, include_grips=False, include_lights=False, is_instances=False, include_reference=False, include_selected=True, state=0)

Returns identifiers of all objects based on attributes

that can be selected. Object types can be added together to filter several different kinds of geometry. use the filter class to get values
returns:List of identifiers.