forked from 1b-agent/opencadstudio-upstream
- plugin-architecture.md: new "Entity class display labels (API v10)" section documenting the split (stable identity keys in XDATA, display labels in the plugin declaration), the live-loaded-plugin gating (missing, disabled, cap-excluded, failed, removed, or dead → bare native type), the "<Label> (<Native>)" display rule, that raw schema fields (`type`, `dxf_name`, `record_type`) and LIST are unchanged, and that the label is display-only. `plugin.toml` deliberately does not carry the table: it is the pre-load discovery file and labels must activate on live manifests. - Template v2 demonstrates the whole convention: declares `SURVEY-CLASS:POINT -> "Survey Point"` and stamps the identity key in MARK_FIRST_SURVEY_POINT, so marked points show as "Survey Point (Point)" while the plugin is loaded. plugin.toml's api_version is bumped to 10 (keep in sync with ApiVersion::CURRENT) with a NOTE on where the class table lives. DESIGN.md documents the flow. - Template v2's stale `acadrust` pin (8a28c21, predating the host's codec bump to 278c49a) is realigned with the host's pin: without it the template no longer compiles on main — its `acadrust::EntityType` and the host re-exports are distinct types when the revisions disagree (verified the same four type errors occur before and after this feature's template edit). - changelogs/unreleased.md entry (Plugins section).
30 lines
1.1 KiB
TOML
30 lines
1.1 KiB
TOML
[plugin]
|
|
id = "com.example.plugin-template-v2"
|
|
name = "Plugin Template v2"
|
|
version = "0.1.0"
|
|
description = "Demonstrates read/write object round-trips with the host."
|
|
author = "Your Name"
|
|
license = "GPL-3.0-only"
|
|
repository = "your-account/your-plugin-repo"
|
|
|
|
[opencad]
|
|
# Keep in sync with the Rust manifest's `ApiVersion::CURRENT` — this is the
|
|
# pre-load gate; the runner also checks the compiled-in symbol.
|
|
api_version = 10
|
|
# Replace both placeholders in the packaging step. The v1 template's
|
|
# release workflow contains a working example.
|
|
rustc_version = "__RUSTC_VERSION__"
|
|
acadrust_source = "__ACADRUST_SOURCE__"
|
|
ribbon_order = 100
|
|
command_prefixes = [
|
|
"COUNT_SURVEY_POINTS",
|
|
"ADD_SURVEY_POINT",
|
|
"MARK_FIRST_SURVEY_POINT",
|
|
"COUNT_MARKED_SURVEY_POINTS",
|
|
]
|
|
xdata_apps = ["SURVEYMARK"]
|
|
# NOTE: the plugin's entity-class display labels (see `ENTITY_CLASSES` in
|
|
# src/lib.rs) travel on the registered manifest over IPC, not in this file —
|
|
# they only apply while the plugin is loaded, so plugin.toml (the pre-load
|
|
# discovery file) deliberately does not carry them.
|