red box
This commit is contained in:
@@ -12010,3 +12010,134 @@ Now the third column in the main library list will be much cleaner and easier to
|
||||
|
||||
---
|
||||
|
||||
_**User**_
|
||||
|
||||
if they're missing, let's highlight them red.
|
||||
|
||||
---
|
||||
|
||||
_**Assistant**_
|
||||
|
||||
Great idea! Let me add red highlighting for missing libraries in the blend info section. I'll use Blender's `alert` property to make the status text red when libraries are missing:
|
||||
|
||||
|
||||
---
|
||||
|
||||
<details><summary>Edit file: ui.py</summary>
|
||||
|
||||
undefined
|
||||
|
||||
**Chunk 1**
|
||||
Lines added: 8, lines removed: 3
|
||||
|
||||
```diff
|
||||
@@ -241,9 +241,14 @@
|
||||
|
||||
if selected_lib.is_missing:
|
||||
- info_box.label(text="Status: MISSING", icon='ERROR')
|
||||
+ row = info_box.row()
|
||||
+ row.alert = True # Make the row red
|
||||
+ row.label(text="Status: MISSING", icon='ERROR')
|
||||
elif selected_lib.has_indirect_missing:
|
||||
- info_box.label(text=f"Status: INDIRECT MISSING ({selected_lib.indirect_missing_count} dependencies)", icon='ERROR')
|
||||
+ row = info_box.row()
|
||||
+ row.alert = True # Make the row red
|
||||
+ row.label(text=f"Status: INDIRECT MISSING ({selected_lib.indirect_missing_count} dependencies)", icon='ERROR')
|
||||
else:
|
||||
- info_box.label(text="Status: OK", icon='FILE_BLEND')
|
||||
+ row = info_box.row()
|
||||
+ row.label(text="Status: OK", icon='FILE_BLEND')
|
||||
|
||||
# Show full path and Open Blend button
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
Perfect! Now the status information will be visually highlighted:
|
||||
|
||||
## **What Changed:**
|
||||
|
||||
1. **Missing Libraries**: Status row will be highlighted in red (`row.alert = True`)
|
||||
2. **Indirect Missing Libraries**: Status row will also be highlighted in red
|
||||
3. **OK Libraries**: Status row remains normal (no highlighting)
|
||||
|
||||
## **Visual Result:**
|
||||
|
||||
- **MISSING status**: Red background highlighting to draw attention
|
||||
- **INDIRECT MISSING status**: Red background highlighting for dependencies issues
|
||||
- **OK status**: Normal appearance for healthy libraries
|
||||
|
||||
This makes it much easier for users to quickly identify problematic libraries at a glance. The red highlighting will make missing or problematic libraries stand out prominently in the blend info section, improving the user experience when troubleshooting linked library issues.
|
||||
|
||||
---
|
||||
|
||||
_**User**_
|
||||
|
||||
let's make the entire box red in those cases.
|
||||
|
||||
---
|
||||
|
||||
_**Assistant**_
|
||||
|
||||
Great idea! Let me make the entire info box red when libraries are missing or have indirect missing dependencies. This will make the problematic libraries much more visually prominent:
|
||||
|
||||
|
||||
---
|
||||
|
||||
<details><summary>Edit file: ui.py</summary>
|
||||
|
||||
undefined
|
||||
|
||||
**Chunk 1**
|
||||
Lines added: 5, lines removed: 2
|
||||
|
||||
```diff
|
||||
@@ -238,13 +238,16 @@
|
||||
selected_lib = props.linked_libraries[props.linked_libraries_index]
|
||||
info_box = box.box()
|
||||
+
|
||||
+ # Make entire box red if library is missing or has indirect missing
|
||||
+ if selected_lib.is_missing or selected_lib.has_indirect_missing:
|
||||
+ info_box.alert = True
|
||||
+
|
||||
info_box.label(text=f"Selected: {selected_lib.name}")
|
||||
|
||||
if selected_lib.is_missing:
|
||||
row = info_box.row()
|
||||
- row.alert = True # Make the row red
|
||||
row.label(text="Status: MISSING", icon='ERROR')
|
||||
elif selected_lib.has_indirect_missing:
|
||||
row = info_box.row()
|
||||
- row.alert = True # Make the row red
|
||||
row.label(text=f"Status: INDIRECT MISSING ({selected_lib.indirect_missing_count} dependencies)", icon='ERROR')
|
||||
else:
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
Perfect! Now the entire info box will be highlighted in red when there are issues:
|
||||
|
||||
## **What Changed:**
|
||||
|
||||
1. **Entire Box Highlighting**: The whole info box gets `alert = True` when:
|
||||
- Library is missing (`selected_lib.is_missing`)
|
||||
- Library has indirect missing dependencies (`selected_lib.has_indirect_missing`)
|
||||
|
||||
2. **Removed Individual Row Highlighting**: No need for `row.alert = True` since the entire box is now highlighted
|
||||
|
||||
3. **Cleaner Visual Hierarchy**: The entire problematic library section stands out prominently
|
||||
|
||||
## **Visual Result:**
|
||||
|
||||
- **Missing Libraries**: Entire info box with red background
|
||||
- **Indirect Missing Libraries**: Entire info box with red background
|
||||
- **OK Libraries**: Normal info box appearance
|
||||
|
||||
This makes it much easier for users to quickly spot problematic libraries at a glance. The entire box being red will draw immediate attention to any libraries that need attention, whether they're missing files or have dependency issues.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user