diff --git a/src/mercury_engine_data_structures/file_tree_editor.py b/src/mercury_engine_data_structures/file_tree_editor.py index c7cc358b..ef13e716 100644 --- a/src/mercury_engine_data_structures/file_tree_editor.py +++ b/src/mercury_engine_data_structures/file_tree_editor.py @@ -314,6 +314,12 @@ def save_modifications(self, output_path: Path, output_format: OutputFormat, *, for asset_id in self._modified_resources.keys(): modified_pkgs.update(self._files_for_asset_id[asset_id]) + # Ensure pkgs are written which only have new ensured assets without + # completly new assets + for key, asset_ids in self._ensured_asset_ids.items(): + if len(asset_ids) != 0: + modified_pkgs.add(key) + if None in modified_pkgs: modified_pkgs.remove(None)