Select everything inside the UV 0-1 I have a problem that I can't solve on my own. I want to select (or in my case deselect) everything that's inside the UV 0-1 space. I have a specific workflow that I follow and all my objects are placed in a number of UV quadrants. I want to select everything that's inside the first quadrant without selecting anything else.
The bpy.ops.uv.select lets you only select a single vertex located at the given coordinates, so that's the only workaround that I have at the moment, but this could be slow and, considering the following operations, is not really an option.
The other thing I looked at is the bpy.ops.uv.select_box. Unfortunately, this one works with mouse coordinates instead of 0-1 space coordinates which makes it totally useless.
I'm still looking but kind of running out of ideas.
Thank you in advance!
Have a look into the python templates that come along with Blender. There is an Operator Mesh UV template you can modify to your needs. Based on that, all you would have to figure out is how to set the select state of each UV vertex you're iterating on, by searching in the docs.
import bpy
import bmesh

def main(context):
    obj = context.active_object
    me = obj.data
    bm = bmesh.from_edit_mesh(me)

    uv_layer = bm.loops.layers.uv.verify()

    # adjust uv coordinates
    for face in bm.faces:
        for loop in face.loops:
            loop_uv = loop[uv_layer]
            # Select UV vertex if in certain range
            if 0 &lt;= loop_uv.uv.x &lt;= 1 and 0 &lt;= loop_uv.uv.y &lt;= 1:
                loop_uv.select = True
                
    bmesh.update_edit_mesh(me)


class UvOperator(bpy.types.Operator):
    &quot;&quot;&quot;UV Operator description&quot;&quot;&quot;
    bl_idname = &quot;uv.simple_operator&quot;
    bl_label = &quot;Simple UV Operator&quot;

    @classmethod
    def poll(cls, context):
        obj = context.active_object
        return obj and obj.type == 'MESH' and obj.mode == 'EDIT'

    def execute(self, context):
        main(context)
        return {'FINISHED'}


def register():
    bpy.utils.register_class(UvOperator)


def unregister():
    bpy.utils.unregister_class(UvOperator)


if __name__ == &quot;__main__&quot;:
    register()

    # test call
    bpy.ops.uv.simple_operator()



Performance: Using the bmesh method above takes 0.433614 seconds for a vertex count of 175,979 on my machine while iterating through the object data takes 1.514 seconds.

If you want to (de-)select the vertices of the actual mesh as well (keeping both in sync), you can set the selection state per vertex of the loop you are iterating on using BMVert.select_set() call:

Mesh vertices in Edit Mode (left), UV Vertices in the UV Editor (right)
class CUSTOM_OT_uvSelectBmesh(bpy.types.Operator):
    &quot;&quot;&quot;Select UV and Mesh Vertices if in given range&quot;&quot;&quot;
    bl_idname = &quot;uv.select_verts_bmesh&quot;
    bl_label = &quot;Select UV vertices (Bmesh)&quot;

    @classmethod
    def poll(cls, context):
        obj = context.active_object
        return obj and obj.type == 'MESH' and obj.mode == 'EDIT'

    def execute(self, context):
        min, max = (0.0, 1.0)
        
        obj = context.active_object
        me = obj.data
        bm = bmesh.from_edit_mesh(me)

        uv_layer = bm.loops.layers.uv.verify()
        for face in bm.faces:
            for loop in face.loops:
                loop_uv = loop[uv_layer]
                # Select UV vertex if in certain range
                if min &lt;= loop_uv.uv.x &lt;= max and min &lt;= loop_uv.uv.y &lt;= max:
                    loop_uv.select = True
                    loop.vert.select_set(True)
                else:
                    loop.vert.select_set(False)
                    
        bmesh.update_edit_mesh(me)
        return {'FINISHED'}

Performance: Selecting the UV vertices and the actual mesh vertices using the operator above takes 0.517211 seconds for a vertex count of 175,979 on my machine.