Skip to content
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

GDTF import simplification: Intensity/ColorIntensity #4359

Open
kengruven opened this issue Oct 28, 2024 · 0 comments
Open

GDTF import simplification: Intensity/ColorIntensity #4359

kengruven opened this issue Oct 28, 2024 · 0 comments
Labels
component-plugin Affects one or more import or export plugins.

Comments

@kengruven
Copy link
Contributor

For GDTF imports, it's extremely common to see capabilities that look like this:

    "Dim": {
      "highlightValue": 255,
      "capabilities": [
        {
          "dmxRange": [0, 0],
          "type": "Intensity",
          "brightnessStart": 0,
          "brightnessEnd": 1,
          "comment": "Closed"
        },
        {
          "dmxRange": [1, 254],
          "type": "Intensity",
          "brightnessStart": 0,
          "brightnessEnd": 1
        },
        {
          "dmxRange": [255, 255],
          "type": "Intensity",
          "brightnessStart": 0,
          "brightnessEnd": 1,
          "comment": "Open"
        }
      ]
    }

I suspect that this structure is idiomatic in GDTF, but coming from OFL it just looks like a really convoluted way to write:

    "Dim": {
      "capability": {
        "type": "Intensity"
      }
    }

(And similarly for ColorIntensity channels.)

It would be great if we could identify this pattern in the GDTF importer, and rewrite it in the simpler form automatically.

@FloEdelmann FloEdelmann added the component-plugin Affects one or more import or export plugins. label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-plugin Affects one or more import or export plugins.
Projects
None yet
Development

No branches or pull requests

2 participants