diff --git a/client/ayon_resolve/plugins/create/create_editorial_package.py b/client/ayon_resolve/plugins/create/create_editorial_package.py index 407081a2bf..19f10fc170 100644 --- a/client/ayon_resolve/plugins/create/create_editorial_package.py +++ b/client/ayon_resolve/plugins/create/create_editorial_package.py @@ -33,3 +33,5 @@ def process(self): timeline_media_pool_item.SetMetadata( lib.pype_tag_name, json.dumps(publish_data) ) + else: + NameError("Timeline not found in media pool.") diff --git a/client/ayon_resolve/plugins/load/load_editorial_package.py b/client/ayon_resolve/plugins/load/load_editorial_package.py index 000b78d667..ed6b7efa4a 100644 --- a/client/ayon_resolve/plugins/load/load_editorial_package.py +++ b/client/ayon_resolve/plugins/load/load_editorial_package.py @@ -61,18 +61,17 @@ def load(self, context, name, namespace, data): break # Update the metadata - if timeline_media_pool_item: - clip_data = self._get_container_data( - context, data) + clip_data = self._get_container_data( + context, data) - timeline_media_pool_item.SetMetadata( - lib.pype_tag_name, json.dumps(clip_data) - ) + timeline_media_pool_item.SetMetadata( + lib.pype_tag_name, json.dumps(clip_data) + ) + + # set clip color based on random choice + clip_color = self.get_clip_color() + timeline_media_pool_item.SetClipColor(clip_color) - # set clip color based on random choice - clip_color = self.get_clip_color() - print("Clip color: ", clip_color) - timeline_media_pool_item.SetClipColor(clip_color) # TODO: there are two ways to import timeline resources (representation # and resources folder) but Resolve seems to ignore any of this @@ -135,7 +134,7 @@ def _get_container_data( return data def get_clip_color(self): - """Return clip color based on version data.""" + """Return clip color.""" # list of all available davinci resolve clip colors colors = [