Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3658 from BigRoy/manager_add_subsetgroup_column
Browse files Browse the repository at this point in the history
Scene Inventory: Add subsetGroup column
  • Loading branch information
iLLiCiTiT authored Sep 8, 2022
2 parents 270cea6 + 694a075 commit a7a65aa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
11 changes: 9 additions & 2 deletions openpype/tools/sceneinventory/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
class InventoryModel(TreeModel):
"""The model for the inventory"""

Columns = ["Name", "version", "count", "family", "loader", "objectName"]
Columns = ["Name", "version", "count", "family",
"group", "loader", "objectName"]

OUTDATED_COLOR = QtGui.QColor(235, 30, 30)
CHILD_OUTDATED_COLOR = QtGui.QColor(200, 160, 30)
Expand Down Expand Up @@ -157,8 +158,13 @@ def data(self, index, role):
# Family icon
return item.get("familyIcon", None)

column_name = self.Columns[index.column()]

if column_name == "group" and item.get("group"):
return qtawesome.icon("fa.object-group",
color=get_default_entity_icon_color())

if item.get("isGroupNode"):
column_name = self.Columns[index.column()]
if column_name == "active_site":
provider = item.get("active_site_provider")
return self._site_icons.get(provider)
Expand Down Expand Up @@ -423,6 +429,7 @@ def add_items(self, items, parent=None):
group_node["familyIcon"] = family_icon
group_node["count"] = len(group_items)
group_node["isGroupNode"] = True
group_node["group"] = subset["data"].get("subsetGroup")

if self.sync_enabled:
progress = get_progress_for_repre(
Expand Down
3 changes: 2 additions & 1 deletion openpype/tools/sceneinventory/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ def __init__(self, parent=None):
view.setColumnWidth(1, 55) # version
view.setColumnWidth(2, 55) # count
view.setColumnWidth(3, 150) # family
view.setColumnWidth(4, 100) # namespace
view.setColumnWidth(4, 120) # group
view.setColumnWidth(5, 150) # loader

# apply delegates
version_delegate = VersionDelegate(legacy_io, self)
Expand Down

0 comments on commit a7a65aa

Please sign in to comment.