[HELP] Check if 1 object is selected, else self.report

I’m trying to make a script that checks if there is atleast one object selected, if not, self.report text " Need to selected multiple objects"

any idea how?

Look into bpy.context.selected_objects and bpy.context.selected_editable_objects.

also check if there is an active object
which happen to be the last selected object !

but you can have an active whit out being selected !

calculate the length of selected object
if = 1 then there is only one

happy bl

I tried this:

@classmethod
def poll(cls, context):
    
        
    
    return context.object.select ==1

It seems to work for only one selected object, I need it to be more than 2 selected, not one.

then change the if test

like > = 1

happy bl