"""Critique 2: run one read-only stage of build/dra_build.py (rig_check) without writing .pyc files into build/. Usage (headless, nothing is saved): blender -b --factory-startup --python previews/critique2/crit2_run_stage.py -- --stage rig_check --prevdir """ import os import sys sys.dont_write_bytecode = True HERE = os.path.dirname(os.path.abspath(__file__)) BUILD = os.path.join(os.path.dirname(os.path.dirname(HERE)), "build") sys.path.insert(0, BUILD) a = sys.argv[sys.argv.index("--") + 1:] if "--" in sys.argv else [] if "rig_check" not in a: raise SystemExit("critique wrapper: only the read-only rig_check stage is allowed here") import dra_build # noqa: E402 dra_build.main()