Skip to content

Variables

Description of the variables field

interface VariablesState {
    smartshape: SmartshapeVariables
}

smartshape

Updated by: Player/UI

Represent different state variables needed by the server when requests are sent.

Data model

interface SmartshapeVariables {
    activeConfigurationId: string
    activeLayers: string
    activeSceneTree: string
    activeSearchQuery: string
    activeAnnotationSearchQuery: string
    file: {
        privateUrl: string
    }
    behavior: {
        color: string
        hidden: string
        lock: {
            annotate: string
            lockedAction: string
            quote: string
            select: string
        }
        transparent: string
    }
    clippedByPlanes: string
    modifier: {
        hidden: string
        ignored: {
            hidden: string
            color: string
            transparent: string
            lock: string
        }
        lockedAction: string
        lockedActionValue: string
    }
    visibleNodes: string,
    selected: string
}

Examples

Initial state

{
  "smartshape": {
    "activeConfigurationId": "",
    "activeLayers": "true",
    "activeSceneTree": "",
    "activeSearchQuery": "true",
    "activeAnnotationSearchQuery": "true",
    "file": {
      "privateUrl": "string(\"\")"
    },
    "clippedByPlanes": "false",
    "behavior": {
      "hidden": "false",
      "color": "false",
      "lock": {
        "select": "false",
        "annotate": "false",
        "quote": "false",
        "lockedAction": "false"
      },
      "transparent": "false"
    },
    "modifier": {
      "hidden": "false",
      "lockedAction": "select",
      "lockedActionValue": "nth(array(\"select\"), 0)",
      "ignored": {
        "hidden": "false",
        "color": "false",
        "transparent": "false",
        "lock": "false"
      }
    },
    "visibleNodes": "",
    "selected": ""
  }
}

The file cubes.fbx opened, with the active search "*" and a node selected

{
  "activeConfigurationId": "622356c4d5ea22000c67d127",
  "activeLayers": "true",
  "activeSceneTree": "",
  "activeSearchQuery": "*",
  "activeAnnotationSearchQuery": "true",
  "file": {
    "privateUrl": "https://smartshape.io.test//app/622356c4d5ea22000c67d125/cubes.fbx"
  },
  "clippedByPlanes": "false",
  "behavior": {
    "color": "false",
    "hidden": "false",
    "lock": {
      "annotate": "false",
      "lockedAction": "false",
      "quote": "false",
      "select": "false"
    },
    "transparent": "false"
  },
  "modifier": {
    "hidden": "false",
    "lockedAction": "select",
    "lockedActionValue": "nth(array(\"select\"), 0)",
    "ignored": {
      "hidden": "false",
      "color": "false",
      "transparent": "false",
      "lock": "false"
    }
  },
  "visibleNodes": "",
  "selected": "id:622356c56714ca001042993a"
}

Operations done by the Player

When modifier types are ignored by the Player, the field modifier/ignored is updated:

[
  {
    "op": "replace",
    "path": "/variables/smartshape/modifier/ignored",
    "value": {
      "hidden": "true",
      "color": "true",
      "transparent": "false",
      "lock": "false"
    }
  }
]

November 24, 2022 March 8, 2022