diff --git a/app.py b/app.py index 5e1eb1e..7705599 100644 --- a/app.py +++ b/app.py @@ -287,13 +287,14 @@ def pre_export_asset(self, session_id, info): # check that the clip has a shot name - otherwise things won't work! if shot_name == "": from sgtk.platform.qt import QtGui - QtGui.QMessageBox.warning( - None, - "Missing shot name!", - ("The clip '%s' does not have a shot name and therefore cannot be exported. " - "Please ensure that all shots you wish to exports " - "have been named. " % asset_name) - ) + if not self.get_setting("allow_empty_shot_names"): + QtGui.QMessageBox.warning( + None, + "Missing shot name!", + ("The clip '%s' does not have a shot name and therefore cannot be exported. " + "Please ensure that all shots you wish to export " + "have been named. " % asset_name) + ) # TODO: send the clip to the trash for now. no way to abort at this point # but we don't have enough information to be able to proceed at this point either @@ -423,7 +424,11 @@ def post_export_asset(self, session_id, info): if asset_type not in ["video", 'movie', "batch"]: # ignore anything that isn't video or batch return - + + if shot_name == "" and self.get_setting("allow_empty_shot_names"): + # continue more gracefully + return + # resolve shot object shot = self._sequences[-1].get_shot(shot_name) diff --git a/info.yml b/info.yml index 7bf6a9f..7e87fcd 100644 --- a/info.yml +++ b/info.yml @@ -173,6 +173,12 @@ configuration: description: Large requests will be broken until smaller requests of given chunk size to avoid timeout. default_value: 20 + allow_empty_shot_names: + description: If a sequence has at least one segment with a Shot name, ignore any other segments without a shot + name more gracefully. + type: bool + default_value: false + # this app works in all engines - it does not contain # any host application specific commands