Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_spreadsheet.py
| Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | class SPREADSHEET_HT_header(bpy.types.Header): | ||||
| def selection_filter_available(self, space): | def selection_filter_available(self, space): | ||||
| root_context = space.context_path[0] | root_context = space.context_path[0] | ||||
| if root_context.type != 'OBJECT': | if root_context.type != 'OBJECT': | ||||
| return False | return False | ||||
| obj = root_context.object | obj = root_context.object | ||||
| if obj is None: | if obj is None: | ||||
| return False | return False | ||||
| if obj.type != 'MESH' or obj.mode != 'EDIT': | if obj.type == 'MESH': | ||||
| return False | return obj.mode == 'EDIT' | ||||
| if obj.type == 'CURVES': | |||||
| return obj.mode == 'SCULPT_CURVES' | |||||
| return True | return True | ||||
| classes = ( | classes = ( | ||||
| SPREADSHEET_HT_header, | SPREADSHEET_HT_header, | ||||
| ) | ) | ||||
| if __name__ == "__main__": # Only for live edit. | if __name__ == "__main__": # Only for live edit. | ||||
| from bpy.utils import register_class | from bpy.utils import register_class | ||||
| for cls in classes: | for cls in classes: | ||||
| register_class(cls) | register_class(cls) | ||||