Skip to content
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

Add support for VALVe Source 1 + 2 files #373

Merged
merged 55 commits into from
Sep 1, 2024

Conversation

FavroiteGamers
Copy link
Contributor

This PR adds support for VMF (Valve Material File) thumbnails as well as changing the plaintext to include all of these plain text formats used by Source games.

    ".vmt",
    ".fgd",
    ".nut",
    ".cfg",
    ".conf",
    ".vdf",
    ".vcfg",
    ".gi",
    ".inf",
    ".vqlayout",
    ".qss",
    ".vsc",
    ".kv3",
    ".vsnd_template"

CyanVoxel added 30 commits July 19, 2024 07:39
- Fix RAW images not being loaded correctly in the preview panel
- Fix trying to read size data from null images
- Refactor `os.stat` to `<Path object>.stat()`
- Remove unnecessary upper/lower conversions
- Improve encoding compatibility beyond UTF-8 when reading text files
- Code cleanup
CyanVoxel and others added 4 commits August 21, 2024 13:15
All plaintext variants and VTF file conversions.
Added support for VTF files by using the vtf2img library for PIL
@CyanVoxel CyanVoxel added Type: Enhancement New feature or request Type: UI/UX User interface and/or user experience labels Aug 23, 2024
@CyanVoxel CyanVoxel self-assigned this Aug 23, 2024
@CyanVoxel CyanVoxel added this to the Alpha 9.5 milestone Aug 23, 2024
@CyanVoxel CyanVoxel added the Status: Mergeable The code is ready to be merged label Aug 23, 2024
@CyanVoxel
Copy link
Member

Marking this as mergeable and saving it to pull into the Alpha-v9.4 branch once the main thumbnails PR is made. This will require a quick base change on my end and shouldn't create any conflicts that I won't be able to resolve myself, if any.

Depending on the state of #368, the new dependency may need to be added under the [tool.poetry.dependencies] in that pyproject.toml. This is something I will also take care of.

Thank you so much for all your work on this! λ

@FavroiteGamers
Copy link
Contributor Author

Marking this as mergeable and saving it to pull into the Alpha-v9.4 branch once the main thumbnails PR is made. This will require a quick base change on my end and shouldn't create any conflicts that I won't be able to resolve myself, if any.

Depending on the state of #368, the new dependency may need to be added under the [tool.poetry.dependencies] in that pyproject.toml. This is something I will also take care of.

Thank you so much for all your work on this! λ

No problem! I'm happy to work on projects like these!

@CyanVoxel CyanVoxel changed the base branch from thumbnails to Alpha-v9.4 August 31, 2024 23:50
@CyanVoxel CyanVoxel merged commit 341aa92 into TagStudioDev:Alpha-v9.4 Sep 1, 2024
4 checks passed
CyanVoxel added a commit that referenced this pull request Sep 22, 2024
Ports the following thumbnail and related PRs from the `Alpha-v9.4` branch to `main` (v9.5+):
- (#273) Blender thumbnail support
- (#307) Add font thumbnail preview support
- (#331) refactor: move type constants to new media classes
- (#390) feat(ui): expanded thumbnail and preview features
- (#370) ui: "open in explorer" action follows os name
- (#373) feat(ui): preview support for source engine files
- (#274) Refactor video_player.py (Fix #270)
- (#430) feat(ui): show file creation/modified dates + restyle path label
- (#471) fix(ui): use default audio icon if ffmpeg is absent
- (#472) fix(ui): use birthtime for creation time on mac & win

Co-Authored-By: Ethnogeny <[email protected]>
Co-Authored-By: Theasacraft <[email protected]>
Co-Authored-By: SupKittyMeow <[email protected]>
Co-Authored-By: EJ Stinson <[email protected]>
Co-Authored-By: Sean Krueger <[email protected]>
CyanVoxel added a commit that referenced this pull request Oct 7, 2024
* feat: port v9.4 thumbnail + related feats to v9.5

Ports the following thumbnail and related PRs from the `Alpha-v9.4` branch to `main` (v9.5+):
- (#273) Blender thumbnail support
- (#307) Add font thumbnail preview support
- (#331) refactor: move type constants to new media classes
- (#390) feat(ui): expanded thumbnail and preview features
- (#370) ui: "open in explorer" action follows os name
- (#373) feat(ui): preview support for source engine files
- (#274) Refactor video_player.py (Fix #270)
- (#430) feat(ui): show file creation/modified dates + restyle path label
- (#471) fix(ui): use default audio icon if ffmpeg is absent
- (#472) fix(ui): use birthtime for creation time on mac & win

Co-Authored-By: Ethnogeny <[email protected]>
Co-Authored-By: Theasacraft <[email protected]>
Co-Authored-By: SupKittyMeow <[email protected]>
Co-Authored-By: EJ Stinson <[email protected]>
Co-Authored-By: Sean Krueger <[email protected]>

* remove vscode exceptions from `.gitignore`

* delete .vscode directory

* style: format for `ruff check`

* fix(tests): update `test_update_widgets_not_selected` test

* remove Send2Trash dependency

* refactor: use dataclass for MediaCateogry

* refactor: use enums for UI colors

* docs: add file docstring for silent_Popen

* refactor: replace logger with structlog

* use early return inside `ResourceManager.get()`

* add `is_ext_in_category()` method to `MediaCategory`

Add method to check if an extension is a member of a given MediaCategory.

* style: fix docstring style, missing type hints, rename `afm`

* fix: use structlog vars in logging

* refactor: move platform-dependent strings to PlatformStrings

* refactor: move `parents[2]` path to variable

* fix: undo logger regressions

---------

Co-authored-by: Ethnogeny <[email protected]>
Co-authored-by: Theasacraft <[email protected]>
Co-authored-by: SupKittyMeow <[email protected]>
Co-authored-by: EJ Stinson <[email protected]>
Co-authored-by: Sean Krueger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Mergeable The code is ready to be merged Type: Enhancement New feature or request Type: UI/UX User interface and/or user experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants