removed repeated logic of any_outdata from after effects

This commit is contained in:
Jakub Trllo 2022-04-06 15:41:30 +02:00
parent 91c461a1f7
commit a2a2d5e193

View file

@ -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():