You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's two heuristics that the main CLI solves: "Where the scenes are located?" and "What makes a .py a Scene file?"
For the first one, the rules on the main file are quite simple:
If the first argument after shaderflow is a valid path:
Sending shaderflow ./file.py directly scans it
Sending shaderflow ./directory recursively*1 scans it
Else scan for the ShaderFlow/Resources/Scenes and Community/*
Mayybe it's a good idea to limit maximum depth of the search :)
Your custom file was for certain scanned for, but does its content consists of a Scene? (heuristic 2:)
Must not be a "hidden" file __ (prob need to also add starts with .)
"ShaderScene" must be present on its contents (we always want to inherit from the base class)
Also, any syntax errors on the file are kind of ignored..? Like, what should we if a bad file we don't want to run blocks everything and spams errors on any shaderflow (working scene) --help usage?
These two optimizations are for potential future binary releases where we scan the current working directory entirely, and want to avoid stuff like a .venv path and files that most certainly scenes won't be defined there
Thinking about it a bit, could we just regex search any of class*[name]*(*ShaderScene*) for name and keep track of the scene's name and file, then execute later and blockingly showing errors?
Seems like a safer method instead of trusting exec files for scenes, that's also why I avoided scanning the current directory at all unless explicit
Edit: I remember now why this "failed", how do we get its docstrings for the CLI :)
Regexing a docstring seems a bit painful isn't it, I'll try see how it oges
When exploring the repository, there are some key issues that prevent me from successfully registering a custom scene that @Tremeschin have prepared.
After setting up https://github.com/BrokenSource/BrokenSource from scratch with rye, the updated version of the repository mentions:
Yet upon entering the posted commit SHA:
It points towards
Scenes
directory:Unfortunately when placing the scene files either in
Community
orScenes
, the scene files do not register upon runningshaderflow
The text was updated successfully, but these errors were encountered: