Post #609: ![](https://blenderartists.org/user_avatar/blenderartists.org/frankieh/48/670768

πŸ“‹ Metadata

  • Author: roaoao
  • Date: 2017-03-22 23:10:40
  • Type: answer
  • Quality Score: 7/10
  • Reply to: post_00608

🏷️ Tags

python-scripting beginner solved

  • Python Scripting
  • Macro Editor

πŸ’¬ Content

FrankieH:

I recently updated to latest blender and pme (I don’t like updating in the middle of a project ) I found this command no longer works;

context.space_data.dopesheet.show_only_selected = not context.space_data.dopesheet.show_only_selected

I used to toggle dope sheet visibility icons, the arrow and the ghost at the bottom next to summary. I was hoping you had some suggestions to make it work again. Thanks!

My bad. Forgot about context variable.
You can use C or bpy.context instead:

C.space_data.dopesheet.show_only_selected = not C.space_data.dopesheet.show_only_selected

πŸ”— View on Blender Artists