Skip to content
Open
Show file tree
Hide file tree
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
21 changes: 13 additions & 8 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down
6 changes: 6 additions & 0 deletions info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down