mirror of
https://github.com/rehan-remade/universal-modder.git
synced 2026-11-05 01:37:40 +00:00
[PR #10] [CLOSED] Find Blender 5.x installs, whose folder is versioned #55
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
rehan-remade/universal-modder#55
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/rehan-remade/universal-modder/pull/10
Author: @musicforgirls
Created: 10/2/2026
Status: ❌ Closed
Base:
main← Head:fix/blender-5x-versioned-install-path📝 Commits (1)
89b38f0Find Blender 5.x installs, whose folder is versioned📊 Changes
2 files changed (+63 additions, -3 deletions)
View changed files
📝
tests/test_um.py(+48 -2)📝
um/render3d.py(+15 -1)📄 Description
Problem
um render3dcould not find Blender 5.x on Windows.blender_bin()hardcoded a single install path:Blender 5.x installs to a versioned folder instead:
So the fallback missed,
blenderwas usually not onPATH, and the command died withBlender not found: install it...for anyone on Blender 5.x. The workaround is to exportBLENDER=/path/to/blenderyourself, but the error message never mentions that Blender moved.Fix
Glob
Blender*/blender.exeunderBlender Foundationand pick the highest version numerically:Two details worth calling out:
_blender_sort_keyexists soBlender 10.0correctly beatsBlender 9.0. A plain string sort would get that wrong.ProgramFilesis read from the environment instead of hardcodingC:\Program Files, so a non-default install location also works. This also makes the function testable on any platform.The
BLENDERenv var andPATHstill take priority, and the macOS.apppath is unchanged, so this is purely additive.Second fix, included because it blocked verification
tests/test_um.pyshelled out towhichat import time:whichdoes not exist on Windows, so this raisedFileNotFoundErrorduring collection and the entire test module failed to collect. That meant zero tests in the file could run on Windows, not just the ffmpeg-dependent one. Replaced withshutil.which("ffmpeg") is None, which is both portable and cheaper (no subprocess per run).I fixed this in the same PR because I could not otherwise verify the Blender fix above. Happy to split it into its own commit if you prefer.
Testing
New tests in
tests/test_um.pycover theBLENDERenv var winning, discovery of a versionedBlender 5.2folder, newest-version-wins (including the10.0vs9.0case), and the not-found path.15d6f9duv run --with pytest pytest -q testsum publish check .I confirmed the 3 remaining failures are pre-existing by running the suite in a throwaway worktree at
15d6f9d. They are unrelated to this change (test_publish_check,test_repo_knowledge_is_valid,test_kb_new_check_search).Note on CI
um kb check --indexcurrently fails onmainbecauseknowledge/INDEX.mdis out of date (run um kb index). CI runs that check on every PR, so this one will go red for a reason that has nothing to do with it. I deliberately left it alone rather than mixing an index regeneration into a bugfix, but a maintainer will need to runum kb indexseparately.Verified against Blender 5.2.2 LTS on Windows 11, found at the versioned path with no
BLENDERvariable set.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.