Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for PySide Qt widget imports #3405

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
seando-adsk marked this conversation as resolved.
Show resolved Hide resolved

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
Loading