René's URL Explorer Experiment


Title: Bonsai: keep loaded classification libraries selectable without reloading by petruconduraru · Pull Request #8941 · IfcOpenShell/IfcOpenShell · GitHub

Open Graph Title: Bonsai: keep loaded classification libraries selectable without reloading by petruconduraru · Pull Request #8941 · IfcOpenShell/IfcOpenShell

X Title: Bonsai: keep loaded classification libraries selectable without reloading by petruconduraru · Pull Request #8941 · IfcOpenShell/IfcOpenShell

Description: Fixes #4612. Root cause IfcStore.classification_file (bonsai/bim/ifc.py) is a single global that gets overwritten by every bim.load_classification_library call. The FILE-mode "Available Classifications" dropdown (available_classifications in classification/prop.py and classification/data.py) is built entirely from that one global. So once a second classification library file is loaded, the first one's entities become unreachable, even though both classifications are already added to the project (visible in the Classifications list below the dropdown). The only way to browse the first library's hierarchy again (to add more references from it) is to re-select its file from disk, exactly as reported: "Active IfcClassification (the one I can use to add reference to objects) is the one I added most recently. Other ones can't be used unless I add them again." What changed IfcStore.classification_files: a new session cache, keyed by filepath, populated by bim.load_classification_library in addition to (not instead of) the existing classification_file global. Previously loaded libraries are no longer discarded. A new "Loaded Classification Library" dropdown (only shown once more than one library has been loaded, so the common single-library case is unchanged) lets you switch IfcStore.classification_file back to a previously loaded library without re-opening it from disk. Available Classifications and reference browsing update to match. IfcStore.purge() now also resets classification_path/classification_file/classification_files on project close, which it previously omitted. This is scoped to not touch how available_classifications and reference-hierarchy browsing (bim.change_classification_level, bim.add_classification_reference) already work, since both operate on whichever file is browsed at the source-library level, and there are 12 existing .feature scenarios asserting that behavior. Design question left open The reporter's literal ask ("all IfcClassifications in the file should be listed in the dropdown") also covers project classifications whose source library was never loaded in the current session (e.g. reopening a saved .ifc that already has classifications baked in from a previous session). That's not solved here: without the original library file, there is no reference hierarchy to browse from, only the classification's name/attributes are in the project. Solving that fully would mean either bundling common libraries by name (see #8920, which adds a built-in library picker and is a natural complement to this) or a broader change to how FILE-mode reference browsing is scoped. Opening as draft so a maintainer can weigh in on whether that's in scope for this issue or a separate one. Verification Reproduced and verified live in headless Blender 4.5.8 LTS, loading Bonsai from source (not the real profile, BLENDER_USER_RESOURCES isolated). Before the fix (confirmed by stashing the change and rerunning): === loading lib1 (Foobar) === project classifications after adding lib1's: ['Foobar'] === loading lib2 (Uniclass 2015) === project classifications after adding lib2's: ['Foobar', 'Uniclass 2015'] has classification_files attr: False current IfcStore.classification_file entities (should be lib2's only, this is the reported bug): ['Uniclass 2015'] Both classifications are in the project, but only the last-loaded library's entities are reachable, matching the two screenshots in the issue. After the fix: classification_files keys: ['.../classification.ifc', '.../lib2.ifc'] current IfcStore.classification_file entities (should be lib2's only, this is the reported bug): ['Uniclass 2015'] === FIX CHECK: switching loaded_classification_library back to lib1 WITHOUT reloading from disk === IfcStore.classification_file entities after switching dropdown to lib1: ['Foobar'] ClassificationsData.data['available_classifications']: [('2', 'Foobar', '')] Switching the new dropdown restores lib1's entities without touching disk again. Also ran a full FILE-mode workflow regression (load library, add classification, assign an IfcWallType, browse the reference hierarchy with bim.change_classification_level, add/remove a classification reference on an object, remove the classification) end to end in the same environment, all passing, confirming the existing single-library flow the .feature scenarios cover is unaffected. Linted with the project's black + ruff config, both clean. Merge order: this is independent of #8920, the built-in library picker for #4613. Both add a dropdown in the same panel and touch the same lines, so whichever merges second needs a small keep-both rebase. Generated with the assistance of an AI coding tool.

Open Graph Description: Fixes #4612. Root cause IfcStore.classification_file (bonsai/bim/ifc.py) is a single global that gets overwritten by every bim.load_classification_library call. The FILE-mode "Available Classi...

X Description: Fixes #4612. Root cause IfcStore.classification_file (bonsai/bim/ifc.py) is a single global that gets overwritten by every bim.load_classification_library call. The FILE-mode "Available Cl...

Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/pull/8941

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.3

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:41896fa9-5bf3-d15b-ebfc-d97232e1e8b8
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8F82:376887:4683CE:5E2C5F:6B04F48A
html-safe-nonce4a36d80b0e761958e8de0bbe8c940c72cb6b80ab0d2296c8e16c6badf0a87b61
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjgyOjM3Njg4Nzo0NjgzQ0U6NUUyQzVGOjZCMDRGNDhBIiwidmlzaXRvcl9pZCI6IjExMTQ5MzAzNjAzMDA2NjM5NDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac60d88bf6dc20c674322557c8b6201dcb671e9b98083b9b22e55449f6eae3fabb
hovercard-subject-tagpull_request:4130925094
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files
twitter:imagehttps://avatars.githubusercontent.com/u/139251053?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/139251053?s=400&v=4
og:image:altFixes #4612. Root cause IfcStore.classification_file (bonsai/bim/ifc.py) is a single global that gets overwritten by every bim.load_classification_library call. The FILE-mode "Available Classi...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None2c3971d6ab4be607cf9a26ac26ef0a7bfce380ec2ba14642e64028ad07a492b9
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git
octolytics-dimension-user_id13692563
octolytics-dimension-user_loginIfcOpenShell
octolytics-dimension-repository_id40473201
octolytics-dimension-repository_nwoIfcOpenShell/IfcOpenShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id40473201
octolytics-dimension-repository_network_root_nwoIfcOpenShell/IfcOpenShell
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseb3f1d45dee14b3f87c64e9017a9c08d011561786
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FIfcOpenShell%2FIfcOpenShell%2Fpull%2F8941%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FIfcOpenShell%2FIfcOpenShell%2Fpull%2F8941%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=IfcOpenShell%2FIfcOpenShell
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files
IfcOpenShellhttps://github.com/IfcOpenShell
IfcOpenShellhttps://github.com/IfcOpenShell/IfcOpenShell
Codehttps://github.com/IfcOpenShell/IfcOpenShell
Issues1.2k (1.2k)https://github.com/IfcOpenShell/IfcOpenShell/issues
Pull requests936 (936)https://github.com/IfcOpenShell/IfcOpenShell/pulls
Discussionshttps://github.com/IfcOpenShell/IfcOpenShell/discussions
Actionshttps://github.com/IfcOpenShell/IfcOpenShell/actions
Projectshttps://github.com/IfcOpenShell/IfcOpenShell/projects
Wikihttps://github.com/IfcOpenShell/IfcOpenShell/wiki
Security and qualityhttps://github.com/IfcOpenShell/IfcOpenShell/security
Insightshttps://github.com/IfcOpenShell/IfcOpenShell/insights
Sign up for GitHub https://github.com/signup?return_to=%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2Fnew%2Fchoose
petruconduraruhttps://github.com/petruconduraru
IfcOpenShell:v0.9.0https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.9.0
BIMvoice:fix/4612-classification-file-enumhttps://github.com/BIMvoice/IfcOpenShell/tree/fix/4612-classification-file-enum
Conversation 0 https://github.com/IfcOpenShell/IfcOpenShell/pull/8941
Commits 2 https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/commits
Checks 6 https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/checks
Files changed https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files
Please reload this pagehttps://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files
Bonsai: keep loaded classification libraries selectable without reloading https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#top
Show all changes 2 commits https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files
9057445 Bonsai: keep loaded classification libraries selectable without reloa… petruconduraru Jul 25, 2026 https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/commits/9057445dded7874c1eb755b350daefd3e4b03c3f
33d0b37 Merge v0.9.0 into PR 8941 branch petruconduraru Sep 29, 2026 https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/commits/33d0b372c55e807f9fabda3e2211f34ea3b911ce
Clear filters https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files
Please reload this pagehttps://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files
Please reload this pagehttps://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files
ifc.py https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-ad25813352b8653f11e4530a9c16aa9938ebaeb1bb4139ec939b568729db7c50
data.py https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-a975022a17ce9ac94248582d871ca9874c876e427724ad8cb628f1645ba64520
operator.py https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-e5a6aa8c526231f379de25d296891fe6fe8cf81de04769d2b228984dc4978319
prop.py https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-272ddace828f5aca08f6d8e1f502fba2c09928aef49336b3295da0297c943235
ui.py https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-e7ab4abc58575c337eb8fa76b85ca6f0589a9db784fb6637a48ce85ef4562665
src/bonsai/bonsai/bim/ifc.pyhttps://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-ad25813352b8653f11e4530a9c16aa9938ebaeb1bb4139ec939b568729db7c50
View file https://github.com/IfcOpenShell/IfcOpenShell/blob/33d0b372c55e807f9fabda3e2211f34ea3b911ce/src/bonsai/bonsai/bim/ifc.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/{{ revealButtonHref }}
https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-ad25813352b8653f11e4530a9c16aa9938ebaeb1bb4139ec939b568729db7c50
https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-ad25813352b8653f11e4530a9c16aa9938ebaeb1bb4139ec939b568729db7c50
https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-ad25813352b8653f11e4530a9c16aa9938ebaeb1bb4139ec939b568729db7c50
src/bonsai/bonsai/bim/module/classification/data.pyhttps://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-a975022a17ce9ac94248582d871ca9874c876e427724ad8cb628f1645ba64520
View file https://github.com/IfcOpenShell/IfcOpenShell/blob/33d0b372c55e807f9fabda3e2211f34ea3b911ce/src/bonsai/bonsai/bim/module/classification/data.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/{{ revealButtonHref }}
https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-a975022a17ce9ac94248582d871ca9874c876e427724ad8cb628f1645ba64520
https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-a975022a17ce9ac94248582d871ca9874c876e427724ad8cb628f1645ba64520
https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-a975022a17ce9ac94248582d871ca9874c876e427724ad8cb628f1645ba64520
https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-a975022a17ce9ac94248582d871ca9874c876e427724ad8cb628f1645ba64520
src/bonsai/bonsai/bim/module/classification/operator.pyhttps://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-e5a6aa8c526231f379de25d296891fe6fe8cf81de04769d2b228984dc4978319
View file https://github.com/IfcOpenShell/IfcOpenShell/blob/33d0b372c55e807f9fabda3e2211f34ea3b911ce/src/bonsai/bonsai/bim/module/classification/operator.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/{{ revealButtonHref }}
https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-e5a6aa8c526231f379de25d296891fe6fe8cf81de04769d2b228984dc4978319
https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-e5a6aa8c526231f379de25d296891fe6fe8cf81de04769d2b228984dc4978319
src/bonsai/bonsai/bim/module/classification/prop.pyhttps://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-272ddace828f5aca08f6d8e1f502fba2c09928aef49336b3295da0297c943235
View file https://github.com/IfcOpenShell/IfcOpenShell/blob/33d0b372c55e807f9fabda3e2211f34ea3b911ce/src/bonsai/bonsai/bim/module/classification/prop.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/{{ revealButtonHref }}
https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-272ddace828f5aca08f6d8e1f502fba2c09928aef49336b3295da0297c943235
https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-272ddace828f5aca08f6d8e1f502fba2c09928aef49336b3295da0297c943235
https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-272ddace828f5aca08f6d8e1f502fba2c09928aef49336b3295da0297c943235
https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-272ddace828f5aca08f6d8e1f502fba2c09928aef49336b3295da0297c943235
https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-272ddace828f5aca08f6d8e1f502fba2c09928aef49336b3295da0297c943235
https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-272ddace828f5aca08f6d8e1f502fba2c09928aef49336b3295da0297c943235
src/bonsai/bonsai/bim/module/classification/ui.pyhttps://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-e7ab4abc58575c337eb8fa76b85ca6f0589a9db784fb6637a48ce85ef4562665
View file https://github.com/IfcOpenShell/IfcOpenShell/blob/33d0b372c55e807f9fabda3e2211f34ea3b911ce/src/bonsai/bonsai/bim/module/classification/ui.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/{{ revealButtonHref }}
https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-e7ab4abc58575c337eb8fa76b85ca6f0589a9db784fb6637a48ce85ef4562665
https://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files#diff-e7ab4abc58575c337eb8fa76b85ca6f0589a9db784fb6637a48ce85ef4562665
Please reload this pagehttps://github.com/IfcOpenShell/IfcOpenShell/pull/8941/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.