# Cursor in UV/Image Editor

**URL:** <https://blenderartists.org/t/cursor-in-uv-image-editor/574622>\
**Category:** Python Support\
**Created:** [May 13, 2013, 12:04pm UTC](https://blenderartists.org/t/cursor-in-uv-image-editor/574622 "2013-05-13T12:04:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pavell](https://blenderartists.org/letter_avatar_proxy/v4/letter/p/c2a13f/32.png) [@Pavell](https://blenderartists.org/u/Pavell)\
**Post date:** [May 13, 2013, 12:04pm UTC](https://blenderartists.org/t/cursor-in-uv-image-editor/574622/1 "2013-05-13T12:04:50Z")

</div>

Hi everybody!

I would like to have a coordinates of 2D cursor in UV/Image Editor. I tried to use \>[FONT=NimbusMonL-Regu][SIZE=2] bpy.types.SpaceUVEditor.cursor\_location but it not work…  
:([SIZE=2]  
\>\>\> bpy.types.SpaceUVEditor.cursor\_location  
Traceback (most recent call last):  
File “\<blender\_console\>”, line 1, in \<module\>  
AttributeError: type object ‘SpaceUVEditor’ has no attribute ‘cursor\_location’

Please, can you help me?:rolleyes:

Many thanks.  
Pavel[/SIZE][/SIZE][/FONT]

---

<div class="post-metadata">

**Author:** ![CoDEmanX](https://blenderartists.org/letter_avatar_proxy/v4/letter/c/77aa72/32.png) [@CoDEmanX](https://blenderartists.org/u/CoDEmanX)\
**Post date:** [May 13, 2013, 1:07pm UTC](https://blenderartists.org/t/cursor-in-uv-image-editor/574622/2 "2013-05-13T13:07:04Z")

</div>

if you are in UV editor context:

context.space\_data.cursor\_location

If you run from different context, but UV editor is visible:

```auto
for area in bpy.context.screen.areas:
    if area.type == 'IMAGE_EDITOR':
        print(area.spaces[0].cursor_location)
        # Note: there can be multiple uv editors with different cursor locations!
        #break # uncomment this to stop after first uv editor if that's enough for you

```

---

<div class="post-metadata">

**Author:** ![Pavell](https://blenderartists.org/letter_avatar_proxy/v4/letter/p/c2a13f/32.png) [@Pavell](https://blenderartists.org/u/Pavell)\
**Post date:** [May 13, 2013, 3:13pm UTC](https://blenderartists.org/t/cursor-in-uv-image-editor/574622/3 "2013-05-13T15:13:14Z")

</div>

Great !!! Thank you very much CoDEmanX!

---

<div class="post-metadata">

**Author:** ![Pavell](https://blenderartists.org/letter_avatar_proxy/v4/letter/p/c2a13f/32.png) [@Pavell](https://blenderartists.org/u/Pavell)\
**Post date:** [May 13, 2013, 3:14pm UTC](https://blenderartists.org/t/cursor-in-uv-image-editor/574622/4 "2013-05-13T15:14:41Z")

</div>

Thank you CoDEmanX !!! :D:D:D
