ID 365266 - Empty data attributes are wrongly shown with a value of 0 in the Attributes tab

Follow

Problem summary:

Data attributes can be created with no values, which means they're effectively empty. Such empty data attributes should be shown with no values in the Attributes tab, but instead, they're shown as if they contained a single value of 0. This is wrong and misleading.

Steps to reproduce:

  1. In the Node Graph tab, create a CameraCreate node, and an OpScript node downstream of it.
  2. Double-click the OpScript node to set its view and edit flags.
  3. In the Scene Graph tab, expand the entire scene graph, and select the /root/world/cam/camera location.
  4. In the Parameters tab, set the CEL parameter of the OpScript node to /root/world/cam/camera, for example by hovering over the CEL editor widget and pressing the A key (with the /root/world/cam/camera location selected in the Scene Graph tab).
  5. Set the script.lua parameter to the following Lua code snippet:
    • 
      Interface.SetAttr("emptyArray", DoubleAttribute({}))
  6. In the Attributes tab, inspect the appearance of the emptyArray attribute.

Expected behaviour:

The emptyArray attribute is shown with no value.

Actual behaviour:

The emptyArray attribute is shown with a single value of 0.

Workaround:

No known workaround.

Tested versions/platforms:

  • 2.0v1/Linux - Affected

Customer version/platform:

3.0v4/Linux

    We're sorry to hear that

    Please tell us why