Fix primitive_lib_dir path resolution for sexp files in app root
This commit is contained in:
@@ -74,7 +74,13 @@ class StreamInterpreter:
|
||||
self.primitives: Dict[str, Any] = {}
|
||||
self.effects: Dict[str, dict] = {}
|
||||
self.macros: Dict[str, dict] = {}
|
||||
self.primitive_lib_dir = self.sexp_dir.parent / "sexp_effects" / "primitive_libs"
|
||||
# Try multiple locations for primitive_libs
|
||||
possible_paths = [
|
||||
self.sexp_dir.parent / "sexp_effects" / "primitive_libs", # recipes/ subdir
|
||||
self.sexp_dir / "sexp_effects" / "primitive_libs", # app root
|
||||
Path(__file__).parent.parent / "sexp_effects" / "primitive_libs", # relative to interpreter
|
||||
]
|
||||
self.primitive_lib_dir = next((p for p in possible_paths if p.exists()), possible_paths[0])
|
||||
|
||||
self.frame_pipeline = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user