mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
removed repeated logic of any_outdata from after effects
This commit is contained in:
parent
91c461a1f7
commit
a2a2d5e193
1 changed files with 5 additions and 20 deletions
|
|
@ -38,29 +38,14 @@ def check_inventory():
|
||||||
if not lib.any_outdated():
|
if not lib.any_outdated():
|
||||||
return
|
return
|
||||||
|
|
||||||
host = registered_host()
|
|
||||||
outdated_containers = []
|
|
||||||
for container in host.ls():
|
|
||||||
representation = container['representation']
|
|
||||||
representation_doc = io.find_one(
|
|
||||||
{
|
|
||||||
"_id": ObjectId(representation),
|
|
||||||
"type": "representation"
|
|
||||||
},
|
|
||||||
projection={"parent": True}
|
|
||||||
)
|
|
||||||
if representation_doc and not lib.is_latest(representation_doc):
|
|
||||||
outdated_containers.append(container)
|
|
||||||
|
|
||||||
# Warn about outdated containers.
|
# Warn about outdated containers.
|
||||||
print("Starting new QApplication..")
|
print("Starting new QApplication..")
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
if outdated_containers:
|
message_box = QtWidgets.QMessageBox()
|
||||||
message_box = QtWidgets.QMessageBox()
|
message_box.setIcon(QtWidgets.QMessageBox.Warning)
|
||||||
message_box.setIcon(QtWidgets.QMessageBox.Warning)
|
msg = "There are outdated containers in the scene."
|
||||||
msg = "There are outdated containers in the scene."
|
message_box.setText(msg)
|
||||||
message_box.setText(msg)
|
message_box.exec_()
|
||||||
message_box.exec_()
|
|
||||||
|
|
||||||
|
|
||||||
def application_launch():
|
def application_launch():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue