mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
added ability to return families of current subsets
This commit is contained in:
parent
2e871a7f13
commit
e6abb640d7
3 changed files with 8 additions and 0 deletions
|
|
@ -221,6 +221,8 @@ class LoaderWidow(QtWidgets.QDialog):
|
|||
familis_widget = self.data["widgets"]["families"]
|
||||
|
||||
subsets_widget.set_loading_state(loading=False, empty=not has_item)
|
||||
families = subsets_widget.get_subsets_families()
|
||||
familis_widget.set_enabled_families(families)
|
||||
|
||||
def _on_load_end(self):
|
||||
# Delay hiding as click events happened during loading should be
|
||||
|
|
|
|||
|
|
@ -190,6 +190,9 @@ class SubsetsModel(TreeModel, BaseRepresentationModel):
|
|||
self._grouping = state
|
||||
self.on_doc_fetched()
|
||||
|
||||
def get_subsets_families(self):
|
||||
return self._doc_payload.get("subset_families") or set()
|
||||
|
||||
def setData(self, index, value, role=QtCore.Qt.EditRole):
|
||||
# Trigger additional edit when `version` column changed
|
||||
# because it also updates the information in other columns
|
||||
|
|
|
|||
|
|
@ -247,6 +247,9 @@ class SubsetWidget(QtWidgets.QWidget):
|
|||
|
||||
self.model.refresh()
|
||||
|
||||
def get_subsets_families(self):
|
||||
return self.model.get_subsets_families()
|
||||
|
||||
def set_family_filters(self, families):
|
||||
self.family_proxy.setFamiliesFilter(families)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue