Post #622: ![](https://blenderartists.org/user_avatar/blenderartists.org/shogunato/48/38482

📋 Metadata

🏷️ Tags

pie-menu hotkeys intermediate solved

  • Stack Key Editor
  • Python Scripting
  • Custom property binding

💬 Content

shogunato:

I would love to put the sticky selection mode from uv editor into my pie menu. I tried to put a stack key menu with all 3 mode inside with the aim to toggle between those mode. Any idea what is wrong with the code ?

Blender generates wrong code in UV Editor for some reason.
You need to replace bpy.data.screens[“Default”].(null) with this (Command tab):

bpy.context.space_data.uv_editor.sticky_select_mode

There are some other buttons in UV Editor which generate wrong code.
To fix it use this code:

bpy.context.space_data.uv_editor.<PROPERTY_NAME>

You can find property’s name in tooltips. For example the name of Constraint to Image Bounds property is lock_bounds :

I’ll try to fix this issue in Blender 2.79.


🔗 View on Blender Artists