Repository navigation
bazel: enable Blender 3D-viewer targets on every supported-PDK design #4235
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
Merged
maliberty
merged 1 commit into
The-OpenROAD-Project:master
from
oharboe:blender-3d-viewer
May 18, 2026
+65
−160
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...hes/bazel-orfs/0001-render_gds-monkey-patch-PDK_CONFIGS-not-gdsii_use_custom_config.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| From 0010e181efa28210dbf7839e6e6131139cc705bd Mon Sep 17 00:00:00 2001 | ||
| From: =?UTF-8?q?=C3=98yvind=20Harboe?= <oyvind@ascenium.com> | ||
| Date: Mon, 18 May 2026 00:06:14 +0200 | ||
| Subject: [PATCH] render_gds: monkey-patch PDK_CONFIGS instead of | ||
| gdsii_use_custom_config | ||
|
|
||
| The addon's gdsii_use_custom_config=True branch in import_gdsii skips | ||
| initialising pdk_info and addon_dir, both of which are still used a | ||
| few lines later to resolve color_path -- so any non-default | ||
| layerstack YAML trips UnboundLocalError inside the addon. | ||
|
|
||
| Patch the addon's PDK_CONFIGS dict at runtime instead, pointing the | ||
| selected PDK's config_path entry at our trimmed YAML. The else | ||
| branch then fires normally, pdk_info is set, color_path resolves, | ||
| and Path's absolute-RHS semantic makes addon_dir / Path(abs_path) | ||
| evaluate to the absolute path. | ||
| --- | ||
| tools/blendergds/render_gds.py | 12 ++++++++++-- | ||
| 1 file changed, 10 insertions(+), 2 deletions(-) | ||
|
|
||
| diff --git a/tools/blendergds/render_gds.py b/tools/blendergds/render_gds.py | ||
| index cbe116c..b53da1e 100644 | ||
| --- a/tools/blendergds/render_gds.py | ||
| +++ b/tools/blendergds/render_gds.py | ||
| @@ -289,11 +289,19 @@ def main(): | ||
| # in seconds rather than 5-7 minutes + 16 GB RSS. No-op for | ||
| # PDKs without a preset and for designs whose full stack is | ||
| # already small enough. | ||
| + # We can't go through the addon's `gdsii_use_custom_config = True` | ||
| + # path: that branch in `import_gdsii` skips initialising | ||
| + # `pdk_info` and `addon_dir`, both of which are still used | ||
| + # afterwards to resolve `color_path` -- so a custom YAML trips | ||
| + # `UnboundLocalError: pdk_info` inside the addon. Instead, | ||
| + # monkey-patch PDK_CONFIGS[pdk]['config_path'] to point at the | ||
| + # trimmed YAML (absolute path -- `addon_dir / Path("/abs")` | ||
| + # evaluates to the absolute path in pathlib, so the else branch | ||
| + # in the addon picks it up correctly). | ||
| trimmed = _trim_layerstack(addon, addon_root, args.pdk, tmp) | ||
| if trimmed is not None: | ||
| yaml_path, kept_layers, missing = trimmed | ||
| - bpy.context.scene.gdsii_use_custom_config = True | ||
| - bpy.context.scene.gdsii_config_path = str(yaml_path) | ||
| + addon.PDK_CONFIGS.setdefault(args.pdk, {})["config_path"] = str(yaml_path) | ||
| _log_phase( | ||
| "layerstack-trimmed", | ||
| extra=( | ||
| -- | ||
| 2.51.0 | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| """Vendored patches applied on top of the bazel-orfs git_override pin. | ||
| These are small fixes we keep here to reduce churn while iterating; | ||
| when they land upstream, drop the entry from MODULE.bazel and bump | ||
| BAZEL_ORFS_COMMIT instead. | ||
| """ | ||
|
|
||
| exports_files(glob(["*.patch"])) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.