Skip to content

Commit

Permalink
Fix for PySide Qt widget imports
Browse files Browse the repository at this point in the history
  • Loading branch information
dj-mcg committed Oct 21, 2023
1 parent b2b48b4 commit 600a62f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions plugin/pxr/maya/lib/usdMaya/userExportedAttributesUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
from PySide6.QtGui import QStringListModel

try:
from PySide2.QtGui import QAbstractItemView, QCheckBox, QComboBox, QLabel, QListView, QPushButton, QStyledItemDelegate, QTableView, QVBoxLayout, QWidget
from PySide2.QtWidgets import (QAbstractItemView, QCheckBox, QComboBox, QLabel, QListView, QPushButton, QStyledItemDelegate, QTableView, QVBoxLayout, QWidget)
except:
from PySide6.QtGui import QAbstractItemView, QCheckBox, QComboBox, QLabel, QListView, QPushButton, QStyledItemDelegate, QTableView, QVBoxLayout, QWidget
from PySide6.QtWidgets import (QAbstractItemView, QCheckBox, QComboBox, QLabel, QListView, QPushButton, QStyledItemDelegate, QTableView, QVBoxLayout, QWidget)

import json

Expand Down Expand Up @@ -214,6 +214,9 @@ def __eq__(self, other):
self._usdAttrType == other._usdAttrType and
self._usdAttrName == other._usdAttrName)

def __hash__(self):
return hash((self._mayaAttrName, self._usdAttrType, self._usdAttrName))

@property
def mayaAttrName(self):
return self._mayaAttrName
Expand Down Expand Up @@ -340,8 +343,7 @@ def RemoveExportedAttributesForNode(nodeName, mayaAttrNames):
exportedAttrs = ExportedAttribute.GetExportedAttributesFromNode(nodeName)

# Filter out the attrs whose names are in mayaAttrNames.
exportedAttrs = filter(
lambda x: x.mayaAttrName not in mayaAttrNames, exportedAttrs)
exportedAttrs = [x for x in exportedAttrs if x.mayaAttrName not in mayaAttrNames]

ExportedAttribute._WriteExportedAttributesToNode(nodeName, exportedAttrs)

Expand Down

0 comments on commit 600a62f

Please sign in to comment.