Skip to content

Add dynamic PDK preset support - #43

Merged
dnltz merged 4 commits into
mainfrom
WIP/dnltz/dynamic-presets
Aug 21, 2026
Merged

dnltz merged 4 commits into
mainfrom
WIP/dnltz/dynamic-presets

Conversation

@dnltz

@dnltz dnltz commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Supersedes #41 by @Gerard-Taulats with the open review feedback addressed and a
cleaned up history. The commits keep his authorship.

The hardcoded PDK table is gone: every layer stack config in
import_gdsii/configs is offered as a preset, so users can add their own PDK by
dropping a config file next to the shipped ones together with a color schema
directory of the same name. The list is read once and refreshed whenever the
import dialog opens, so a new config shows up without restarting Blender.

A config file may describe itself in an optional pdk_config section (name,
description, def_color); everything falls back to the file name. The preset
order lives in configs/_config_order.yaml, so it no longer has to be
maintained across several files. Configs missing from that list are appended in
alphabetical order instead of being dropped.

Changes on top of #41:

  • Order entries are matched against the PDK keys again — the list was silently
    ignored before, and the _ placeholder is replaced by the fallback above
  • Two f"...{d["key"]}..." fallbacks that are a SyntaxError before Python
    3.12 are gone; the config and color paths now come straight from the loaded
    config, and an unknown PDK is reported instead of raising
  • pdk_config is dropped from the layer stack after loading instead of being
    skipped in every consumer
  • Malformed or empty YAML files in the config directory are ignored with a
    warning instead of breaking the add-on
  • _config_order.yaml entries without a config file now fail the config check
  • Debug print, stale IHP_SG13G2 fallbacks, the unused order schema field and
    the whitespace noise are removed

Note: the SiEPIC preset identifier changes from SIEPIC_EBEAM to SIEPIC,
since identifiers are derived from the config file name (siepic.yaml).

Tested with Blender 4.3.2: importing with a built-in PDK, with a custom config
and color schema, and with an unknown PDK stored in the scene, plus tox on
every commit.

@dnltz

dnltz commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

@Gerard-Taulats I addressed all the feedback from #41 and cleaned up the history. You're still the Author of this commits! Do you see any issue with those patches here?

Layer stack configs may carry an optional "pdk_config" section describing the
PDK itself and the config directory may hold a "_config_order.yaml" listing the
presets in the order they are shown. Extend the schemas and the config check
accordingly, and make sure every entry of the order file has a config file.

Signed-off-by: Gerard Taulats <gerardtaulats@gmail.com>
Signed-off-by: Daniel Schultz <dnltz@aesc-silicon.de>
Replace the hardcoded PDK table with the layer stack configs found in the
configs directory, so that users can add their own PDK by dropping a config
file next to the shipped ones. The list is read once and refreshed whenever
the import dialog opens.

Presets are named after their config file unless the file provides an optional
"pdk_config" section with a name, a description or a default color schema, and
they are listed in the order given by "configs/_config_order.yaml".

Signed-off-by: Gerard Taulats <gerardtaulats@gmail.com>
Signed-off-by: Daniel Schultz <dnltz@aesc-silicon.de>
Move the names and descriptions of the shipped PDKs from the add-on into their
config files and pre-select the realistic color schema for all of them. The
order of the presets is kept as it was with the hardcoded table.

Signed-off-by: Gerard Taulats <gerardtaulats@gmail.com>
Signed-off-by: Daniel Schultz <dnltz@aesc-silicon.de>
Signed-off-by: Gerard Taulats <gerardtaulats@gmail.com>
Signed-off-by: Daniel Schultz <dnltz@aesc-silicon.de>
@dnltz
dnltz force-pushed the WIP/dnltz/dynamic-presets branch from 10d96a1 to decbfde Compare August 20, 2026 11:56
@Gerard-Taulats

Gerard-Taulats commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

I'm so sorry it took me this long to get back to this. So long, you were about to take care of the rest yourself😅. I'll take a look now

@Gerard-Taulats

Copy link
Copy Markdown
Contributor

I reviewed the code and tested. Works like a charm👌

@dnltz

dnltz commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

I reviewed the code and tested. Works like a charm👌

thanks for testing. I also ran some and it fixed one bug on Metal1. Now worries with not reacting. You almost provided everything and I just had to clean it up :)

@dnltz
dnltz merged commit f6c1939 into main Aug 21, 2026
2 checks passed
@dnltz
dnltz deleted the WIP/dnltz/dynamic-presets branch August 21, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants