# Total beginner: can't find a way to toggle overlay options in 3D View

**URL:** <https://blenderartists.org/t/total-beginner-cant-find-a-way-to-toggle-overlay-options-in-3d-view/1225681>\
**Category:** Python Support\
**Created:** [May 5, 2020, 8:24am UTC](https://blenderartists.org/t/total-beginner-cant-find-a-way-to-toggle-overlay-options-in-3d-view/1225681 "2020-05-05T08:24:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheFlow](https://blenderartists.org/user_avatar/blenderartists.org/theflow/32/443587_2.png) [@TheFlow](https://blenderartists.org/u/TheFlow)\
**Post date:** [May 5, 2020, 8:24am UTC](https://blenderartists.org/t/total-beginner-cant-find-a-way-to-toggle-overlay-options-in-3d-view/1225681/1 "2020-05-05T08:24:22Z")

</div>

Hi guys. I have started to learn e little bit how to automate my stuff in Blender that I do often. So far object creation and changing parameters goes very well. But I’m stuck for two hours trying to automatically toggle off normals and handles for my curves.

Can you help me figure this one out?

I’m in a curve object, already in edit mode. How would I be able to toggle the overlay to hide the normals or handles off?

This obviously didn’t work. That is what pops up in the info log once I click it in the menu.

> bpy.context.space\_data.overlay.show\_curve\_normals = False

I’ve come to the conclusion it should have anything to do with ‘VIEW\_3D’ and I am willing to dive deeper into coding, but I am a total noob. Thanks in advance!

---

<div class="post-metadata">

**Author:** ![TheFlow](https://blenderartists.org/user_avatar/blenderartists.org/theflow/32/443587_2.png) [@TheFlow](https://blenderartists.org/u/TheFlow)\
**Post date:** [May 5, 2020, 10:06am UTC](https://blenderartists.org/t/total-beginner-cant-find-a-way-to-toggle-overlay-options-in-3d-view/1225681/2 "2020-05-05T10:06:14Z")

</div>

Ok, been looking for an answer. This is it. Maybe someone else is looking for it. [https://blender.stackexchange.com/questions/162459/access-viewport-overlay-options-using-python-api](https://blender.stackexchange.com/questions/162459/access-viewport-overlay-options-using-python-api)

---

<div class="post-metadata">

**Author:** ![Luigi](https://blenderartists.org/user_avatar/blenderartists.org/luigi/32/692342_2.png) [@Luigi](https://blenderartists.org/u/Luigi)\
**Post date:** [June 4, 2020, 6:27am UTC](https://blenderartists.org/t/total-beginner-cant-find-a-way-to-toggle-overlay-options-in-3d-view/1225681/3 "2020-06-04T06:27:57Z")

</div>

great great and thanks very much.  
so the code for turning off the viewport layout is:

```auto
import bpy
for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        for space in area.spaces:
            if space.type == 'VIEW_3D':
                space.overlay.show_overlays=False
                break

```

---

<div class="post-metadata">

**Author:** ![testure](https://blenderartists.org/user_avatar/blenderartists.org/testure/32/1118727_2.png) [@testure](https://blenderartists.org/u/testure)\
**Post date:** [June 4, 2020, 3:31pm UTC](https://blenderartists.org/t/total-beginner-cant-find-a-way-to-toggle-overlay-options-in-3d-view/1225681/4 "2020-06-04T15:31:28Z")

</div>

as a shortcut- a VIEW\_3D area only has one space, so you could simplify this to just call `area.spaces[0].overlay.show_overlays` directly.
