Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_workspace.py
| Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| continue | continue | ||||
| info = addon_utils.module_bl_info(module) | info = addon_utils.module_bl_info(module) | ||||
| is_enabled = module_name in owner_ids | is_enabled = module_name in owner_ids | ||||
| row = col.row() | row = col.row() | ||||
| row.alignment = 'LEFT' | row.alignment = 'LEFT' | ||||
| row.operator( | row.operator( | ||||
| "wm.owner_disable" if is_enabled else "wm.owner_enable", | "wm.owner_disable" if is_enabled else "wm.owner_enable", | ||||
| icon='CHECKBOX_HLT' if is_enabled else 'CHECKBOX_DEHLT', | icon='CHECKBOX_HLT' if is_enabled else 'CHECKBOX_DEHLT', | ||||
| text=iface_("%s: %s" ) % (iface_(info["category"]), iface_(info["name"])), | text=iface_("%s: %s") % (iface_(info["category"]), iface_(info["name"])), | ||||
| translate=False, | translate=False, | ||||
| emboss=False, | emboss=False, | ||||
| ).owner_id = module_name | ).owner_id = module_name | ||||
| if is_enabled: | if is_enabled: | ||||
| owner_ids.remove(module_name) | owner_ids.remove(module_name) | ||||
| # Detect unused | # Detect unused | ||||
| if owner_ids: | if owner_ids: | ||||
| Show All 30 Lines | |||||