Commit 4a9daf3
committed
bazel: re-vendor render_gds PDK_CONFIGS fix (addon UnboundLocalError)
Bumping bazel-orfs to 3a5ddd7 picked up the upstream copy of our
layerstack-trim feature, but the upstream commit landed without the
PDK_CONFIGS monkey-patch fix that I added locally after upstream
sent the PR -- so the merged version still goes through the addon's
gdsii_use_custom_config=True path, which is broken:
File ".../blendergds/__init__.py", line 613, in import_gdsii
colorfile = addon_dir / pdk_info.get('color_path', ...) / ...
UnboundLocalError: cannot access local variable 'pdk_info'
The addon's import_gdsii skips initialising pdk_info / addon_dir in
the custom-config branch but uses them a few lines later for the
color_path lookup. Vendor a one-hunk patch on render_gds.py that
monkey-patches addon.PDK_CONFIGS[pdk]['config_path'] instead, so the
addon's else branch fires normally. Path's absolute-RHS semantic
makes `addon_dir / Path(abs_path)` evaluate to the absolute path,
so the trim YAML still resolves correctly.
Once a fix lands upstream (in bazel-orfs or in the BlenderGDS
addon's __init__.py), this can be dropped and bazel-orfs bumped
again -- the patches/ directory comes back if we need a vendored
fix in the meantime.
Signed-off-by: Øyvind Harboe <oyvind@ascenium.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>1 parent eafadcd commit 4a9daf3
3 files changed
Lines changed: 61 additions & 0 deletions
File tree
- patches/bazel-orfs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
| |||
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
0 commit comments