This keeps them in deterministic order and produces cleaner diffs.
if self.collection:
from .datafile import Statement
with open(os.path.join(path, base+".mdc"), "w") as out_file:
- for r in resources.values():
+ for n in sorted(resources.keys()):
+ r = resources[n]
st = Statement("animation", r.name)
st.sub = r.statements
st.write_to_file(out_file)
objs = [o for o in objs if any(a and b for a, b in zip(layers, o.layers))]
objs = [o for o in objs if o.type=="MESH" and not o.lod_for_parent]
objs = [o for o in objs if (not o.compound or o.parent not in objs)]
+ objs.sort(key=lambda x:x.name)
path, base = os.path.split(out_fn)
base, ext = os.path.splitext(base)