[core] sort nodes by name in file export

Avoid randomness in the ordering during file export to facilitate
comparison of scene files.
This commit is contained in:
Fabien Castan 2024-06-16 21:31:54 +02:00
parent 3c4ebd9b25
commit 620ba0c2cf

View file

@ -1278,7 +1278,9 @@ class Graph(BaseObject):
node._applyExpr()
def toDict(self):
return {k: node.toDict() for k, node in self._nodes.objects.items()}
nodes = {k: node.toDict() for k, node in self._nodes.objects.items()}
nodes = dict(sorted(nodes.items()))
return nodes
@Slot(result=str)
def asString(self):