Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_spreadsheet.py
| Show All 29 Lines | def draw(self, context): | ||||
| pinned_id = space.pinned_id | pinned_id = space.pinned_id | ||||
| used_id = pinned_id if pinned_id else context.active_object | used_id = pinned_id if pinned_id else context.active_object | ||||
| if used_id: | if used_id: | ||||
| layout.label(text=used_id.name, icon="OBJECT_DATA") | layout.label(text=used_id.name, icon="OBJECT_DATA") | ||||
| layout.operator("spreadsheet.toggle_pin", text="", icon='PINNED' if pinned_id else 'UNPINNED', emboss=False) | layout.operator("spreadsheet.toggle_pin", text="", icon='PINNED' if pinned_id else 'UNPINNED', emboss=False) | ||||
| layout.prop(space, "geometry_component_type", text="") | |||||
| layout.prop(space, "attribute_domain", text="") | |||||
| layout.separator_spacer() | layout.separator_spacer() | ||||
| if isinstance(used_id, bpy.types.Object) and used_id.mode == 'EDIT': | if isinstance(used_id, bpy.types.Object) and used_id.mode == 'EDIT': | ||||
| layout.prop(space, "show_only_selected", text="Selected Only") | layout.prop(space, "show_only_selected", text="Selected Only") | ||||
| 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) | ||||