Skip to content

GDTF import simplification: Intensity/ColorIntensity #4359

Open
@kengruven

Description

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.

Metadata

Assignees

No one assigned

    Labels

    component-pluginAffects one or more import or export plugins.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions