📋 Metadata
- Author: roaoao
- Date: 2016-07-31 00:17:01
- Type:
answer - Reply to: post_00250
- Replies (1): post_00254
💬 Content
servapunk:
How could I add a context sensitive when nothing is selected? Currently when I have nothing selected the menu of the last active object appears. I need a menu to appear when nothing is selected. I am trying to make this change but I am noob whith python.
Import examples_context_sensitive.json file, select “Object Context Sensitive Menu” and replace it’s command with this (Command tab):
name = C.selected_objects and C.active_object and C.active_object.type.title() or "Object (None)"; open_menu(name) or open_menu("Object")
Now “Object Context Sensitive Menu” will open “Object (None)” menu if there is no selected object in your scene.