Title: Merge identical styles leaves duplicate Blender materials behind · Issue #10068 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Merge identical styles leaves duplicate Blender materials behind · Issue #10068 · IfcOpenShell/IfcOpenShell
X Title: Merge identical styles leaves duplicate Blender materials behind · Issue #10068 · IfcOpenShell/IfcOpenShell
Description: bpy.ops.bim.merge_identical_objects(object_type='STYLE', by_name_or_identification_only=True) merges the styles in the IFC file but leaves duplicates in the .blend. The material list still shows GS_Concrete, GS_Concrete.001, …, and objec...
Open Graph Description: bpy.ops.bim.merge_identical_objects(object_type='STYLE', by_name_or_identification_only=True) merges the styles in the IFC file but leaves duplicates in the .blend. The material list still shows GS...
X Description: bpy.ops.bim.merge_identical_objects(object_type='STYLE', by_name_or_identification_only=True) merges the styles in the IFC file but leaves duplicates in the .blend. The material list still ...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/10068
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Merge identical styles leaves duplicate Blender materials behind","articleBody":"`bpy.ops.bim.merge_identical_objects(object_type='STYLE', by_name_or_identification_only=True)` merges the styles in the IFC file but leaves duplicates in the .blend. The material list still shows `GS_Concrete`, `GS_Concrete.001`, …, and objects often keep using the duplicates.\n\n**Cause.** The merge only deletes a Blender material that is in `IfcStore.id_map` for one of the duplicate IFC styles. On a real project, most duplicates are on the Blender side only:\n\n- **Unlinked copies.** An unlinked material (`ifc_definition_id = 0`) holds the plain name next to the linked `Foo.001`. Objects often use the unlinked copy (e.g. `GS_Metal_Galvanized`: 104 users vs 8 on the linked material). Some names have up to 12 such copies.\n- **Two materials pointing at one style.** Only one of them is in `id_map`, so the other is never cleaned up.\n- **Name drift.** The linked material `ALUM.001` belongs to a style named `ALUM.003`.\n\n**Expected.** After a style merge, each surface style has one Blender material, objects use that material, and the material and the style both carry the name without the `.XXX` suffix.\n\n**Proposed fix.** After the IFC-side merge, the STYLE merge also:\n\n- folds each stale material (unlinked and matching a style name once `.XXX` suffixes are ignored, or pointing at a style already linked elsewhere) into the linked material with `user_remap`, then deletes it;\n- renames the kept material and its style to the name without the suffix when that name is free;\n- skips names that more than one surface style resolves to.\n\nRelated: #6946, #8928 (which covers materials only and leaves styles as a follow-up).\n","author":{"url":"https://github.com/theoryshaw","@type":"Person","name":"theoryshaw"},"datePublished":"2026-10-26T19:54:19Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/10068"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9cb729a9-e772-5591-186b-0ac9d7137403 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A9CE:248DA8:65DD1F:876F8D:6B04C59A |
| html-safe-nonce | 687f74374b5433718d79ebbcc5a7c8a93d4c9e3da3e9468fc546ecb73e9fc3a3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOUNFOjI0OERBODo2NUREMUY6ODc2RjhEOjZCMDRDNTlBIiwidmlzaXRvcl9pZCI6IjcwNjI5MjI1MzcyMTg2NTU2NDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9b7860abbf5e6906e1cc4e415d55270af6381ca1772296cd3c9bf8060ed7643c |
| hovercard-subject-tag | issue:6047087324 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/IfcOpenShell/IfcOpenShell/10068/issue_layout |
| twitter:image | https://opengraph.githubassets.com/74437b31d577a8c16fbeadff9b03ece97d5bd19b24aef78fe7dac20a06665073/IfcOpenShell/IfcOpenShell/issues/10068 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/74437b31d577a8c16fbeadff9b03ece97d5bd19b24aef78fe7dac20a06665073/IfcOpenShell/IfcOpenShell/issues/10068 |
| og:image:alt | bpy.ops.bim.merge_identical_objects(object_type='STYLE', by_name_or_identification_only=True) merges the styles in the IFC file but leaves duplicates in the .blend. The material list still shows GS... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | theoryshaw |
| hostname | github.com |
| expected-hostname | github.com |
| None | 85dd75377eb77313206b8fc108bcee6a3a029286d94bf32bf9b4426e4d92e0c4 |
| turbo-cache-control | no-preview |
| go-import | github.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git |
| octolytics-dimension-user_id | 13692563 |
| octolytics-dimension-user_login | IfcOpenShell |
| octolytics-dimension-repository_id | 40473201 |
| octolytics-dimension-repository_nwo | IfcOpenShell/IfcOpenShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 40473201 |
| octolytics-dimension-repository_network_root_nwo | IfcOpenShell/IfcOpenShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0d64fa748a2bab9a5b587a967ac4da1cfa8da6dd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width