Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_spreadsheet.py
| Show All 25 Lines | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| space = context.space_data | space = context.space_data | ||||
| layout.template_header() | layout.template_header() | ||||
| 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 | ||||
| layout.prop(space, "geometry_component_type", text="") | |||||
| layout.prop(space, "attribute_domain", text="") | |||||
| 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.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': | ||||
| Show All 11 Lines | |||||