diff --git a/src/_impl/vertex_data.py b/src/_impl/vertex_data.py index c6ebfc9..426b41c 100644 --- a/src/_impl/vertex_data.py +++ b/src/_impl/vertex_data.py @@ -49,7 +49,7 @@ def __init__(self, primitive): self._optional_attributes.add(attr.sl_name) def get_id(self) -> str: - return '_'.join(self._optional_attributes) + return '_'.join(sorted(self._optional_attributes)) def _generate_vs_in(self, sh): with sh.vs_input('VsIn') as VsIn: diff --git a/src/generate.py b/src/generate.py index 34ad22b..f0f0412 100644 --- a/src/generate.py +++ b/src/generate.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import argparse, functools, io, json, os, sys +import argparse, functools, io, json, os, shutil, sys from pathlib import Path import multiprocessing as mp from typing import List, NamedTuple @@ -121,7 +121,10 @@ def generate( if not gltf_dir_path.is_dir(): raise NotADirectoryError(gltf_dir_path) - os.makedirs(out_dir_path, exist_ok = True) + # Delete the output directory in order to delete any stale files + if os.path.exists(out_dir_path): + shutil.rmtree(out_dir_path) + os.makedirs(out_dir_path) shader_dict = dict() diff --git a/tests/ref b/tests/ref index c2227ae..663c298 160000 --- a/tests/ref +++ b/tests/ref @@ -1 +1 @@ -Subproject commit c2227ae720c1e050feb787b38e3f76b12ff83eed +Subproject commit 663c298311e29a4dafad24f034dca8ede9152140