-
Notifications
You must be signed in to change notification settings - Fork 2.2k
constants.py cleanup and improvement #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@XorUnison is this issue really about constants.py, as the title suggest? |
Yes, just to clarify, this issue is all about the constants.py, except maybe for the single line of code to add a 4K argument. |
We should make a separate configuration file for stuff like media_dir and whatnot; .cfg seems like a nice option |
The directories really shouldn't be stored as global variables at all. They should be stored as part of the config and passed to scene_file_writer (or anything else that needs them) that way. |
I agree @PgBiel there should be a .cfg file. We seem to be converging on this. Any PR takers? |
I'd be willing to help on this one |
Thanks! @XorUnison is also assigned to maybe confer with them too! |
Right, but I've been mostly for now focused on fixing what's there, and I don't have any particular plans for how to restructure it to ditch the global variables. If we make a whole separate .cfg file that's probably gonna be a bigger thing, won't it? |
Oh right, we might also want to get the review and merge on #26 done first if we do the whole .cfg business here. |
Agreed #26 should come first |
manimlib/media_dir.txt is deprecated and should be removed, and the constants.py file should be brushed up as well.
Most notably the constant MEDIA_DIR currently gets completely ignored due to always being overwritten by this part of the code:
This causes manim to always create a media folder in the location of the executed py file containing the rendered scenes.
Just removing the else statement is enough.
The original DIR lines might also be changed to immediately imply raw text input for obvious reasons (you know, with \ being used for win folders, but also escape characters).
↓
Adding a 4K rendering constant might be prudent, although linking it to an argument would happen in some other file I don't know out of my head.
I've also spotted at least two text issues:
And the file could use some serious commenting to make it easier for others to get into what's going on. I'm willing to work on that and submit a PR for that.
The text was updated successfully, but these errors were encountered: