diff --git a/meshroom/core/graphIO.py b/meshroom/core/graphIO.py index 3834c9dd74..70d6919216 100644 --- a/meshroom/core/graphIO.py +++ b/meshroom/core/graphIO.py @@ -1,3 +1,4 @@ +import getpass from enum import Enum from typing import Any, TYPE_CHECKING, Union @@ -23,6 +24,7 @@ class Keys: NodesVersions = "nodesVersions" ReleaseVersion = "releaseVersion" FileVersion = "fileVersion" + Username = "username" CacheDir = "cacheDir" Graph = "graph" Template = "template" @@ -94,6 +96,10 @@ def serializeHeader(self) -> dict: header: dict[str, Any] = {} header[GraphIO.Keys.ReleaseVersion] = meshroom.__version__ header[GraphIO.Keys.FileVersion] = GraphIO.__version__ + try: + header[GraphIO.Keys.Username] = getpass.getuser() + except Exception: + header[GraphIO.Keys.Username] = "" header[GraphIO.Keys.NodesVersions] = self._getNodeTypesVersions() if self._graph._hasExplicitCacheDir: # We store the absolute but also the relative cacheDir path (to the scene file)