Uploaded image for project: 'Qt 3D Studio'
  1. Qt 3D Studio
  2. QT3DS-3510

Implement DataOutput in UIA and UIP files

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P2: Important
    • None
    • Qt 3D Studio 2.4 BETA1
    • None

    Description

      Due to how world update and rendering are done in Slayer runtime, a synchronous getAttribute(elementPath) call is not feasible to implement. The getAttribute() API also has the unfortunate elementPath problem in that changes to the presentation design can easily break the elementPath and thus any code that depends on using that elementPath.

      Due to this it's better to define a symmetrical API to DataInput where presentation project (UIA) defines known unique DataOutput names. Perhaps following DataInput format might work in the UIA file:
      <dataOutput name="tachoNeedleAngle" type="Ranged Number"/>

      In the presentation file (UIP) the observedproperty attribute can be attached to an element to create DataOutput model when loading and parsing the UIP. Exactly how DataInputs are parsed and created from controlledproperty attributes. But use observedproperty for attributes that can be observed via DataOutput. Note that a property can be also both, as an example of a property that is both observed and controlled:
      <Add ref="#speedNeedle" name="speedNeedle" controlledproperty="$speed @timeline" observedproperty="$speed @timeline" "endtime="1000" opacity="100" position="0 1 0" scale="1 1 1" >

      On QML (and C++) side the API will look very similar to the DataInput API:
      DataOutput {
      {{ name: "speed"}}
      {{ onValueChanged: {}}}
      }

      This method is most efficient as the runtime can detect when a value is updated and only notify listening DataOutputs (if one is registered for the name) upon value actually changing.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              pakerane Pasi Keränen
              pakerane Pasi Keränen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes