Title: Bonsai: add a preference for a new drawing's default Metadata · Issue #10097 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Bonsai: add a preference for a new drawing's default Metadata · Issue #10097 · IfcOpenShell/IfcOpenShell
X Title: Bonsai: add a preference for a new drawing's default Metadata · Issue #10097 · IfcOpenShell/IfcOpenShell
Description: EPset_Drawing.Metadata lists selector expressions that Bonsai evaluates for each drawing element, adding the results to the element's SVG class attribute. For example, Name, id adds classes such as Name-Wall and id-1220, which a styleshe...
Open Graph Description: EPset_Drawing.Metadata lists selector expressions that Bonsai evaluates for each drawing element, adding the results to the element's SVG class attribute. For example, Name, id adds classes such as...
X Description: EPset_Drawing.Metadata lists selector expressions that Bonsai evaluates for each drawing element, adding the results to the element's SVG class attribute. For example, Name, id adds classes suc...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/10097
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bonsai: add a preference for a new drawing's default Metadata","articleBody":"`EPset_Drawing.Metadata` lists selector expressions that Bonsai evaluates for each drawing element, adding the results to the element's SVG `class` attribute. For example, `Name, id` adds classes such as `Name-Wall` and `id-1220`, which a stylesheet can then target.\n\nNew drawings start with this property unset, so anyone whose stylesheet relies on these classes has to fill it in on every drawing. Other drawing defaults, such as the stylesheet paths and the default shading style, can already be set in the add-on preferences.\n\n### Proposal\n\nAdd a **Default Metadata** field under Preferences → Add-ons → Bonsai → Drawing, using the same comma-separated format as the property.\n\n- New drawings get the value in `EPset_Drawing.Metadata`.\n- If the preference is blank, which is the default, the property is not added. New drawings stay exactly as they are today.\n- Existing drawings are not changed.\n\n### Implementation notes\n\n- New preference `metadata_default` on the drawing preferences, next to `shadingstyle_default`.\n- New `tool.Drawing.get_default_metadata()`, which trims whitespace and returns `None` for a blank value, so `pset.edit_pset` skips the property.\n- `core.drawing.add_drawing` writes it with the other `EPset_Drawing` defaults.\n\nI have a working implementation, with core and tool tests passing headless in Blender 5.1, and will open a PR.\n\nGenerated with the assistance of an AI coding tool.\n","author":{"url":"https://github.com/theoryshaw","@type":"Person","name":"theoryshaw"},"datePublished":"2026-10-30T13:15:28Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/10097"}
| 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:5118b03a-0e5d-f9aa-55b7-710e65498732 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E4B0:2876DA:6CAC6:910B5:6B04AEB7 |
| html-safe-nonce | 5f542f2495b8f12bcaa50ff7a9ae172b6dc6df39fe3cde6b82e3874a6a3610a7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNEIwOjI4NzZEQTo2Q0FDNjo5MTBCNTo2QjA0QUVCNyIsInZpc2l0b3JfaWQiOiIyNTk0Nzg3OTc0MjA5MDAwMjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4a1ef1d055163a14fbff9c6132fd19a248a977a71c6108c25ec3483fe895a2ab |
| hovercard-subject-tag | issue:6119759393 |
| 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/10097/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e0420760f4b8e10df8f58000926b29e9fa9781593b9d64292d26431dce4358a3/IfcOpenShell/IfcOpenShell/issues/10097 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e0420760f4b8e10df8f58000926b29e9fa9781593b9d64292d26431dce4358a3/IfcOpenShell/IfcOpenShell/issues/10097 |
| og:image:alt | EPset_Drawing.Metadata lists selector expressions that Bonsai evaluates for each drawing element, adding the results to the element's SVG class attribute. For example, Name, id adds classes such as... |
| 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 | f1d110ea058a0915c1d8aa3fc2069fa15801e128f591e5762525abe77490ecb1 |
| 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 | ffa22a65e4c46d376940fe34b05e6a7e9c7fdb9b |
| 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