View..origin table does not allow the isolated change of a single variable

I’m trying to understand how the origin {x,y} tables work. Apparently, if we want to change just one variable, either x or y, it’s not possible; it means recreating the entire table.

This isn’t important if it’s for a single element, but if we want to modify hundreds of objects, such as buttons or “points”, it could improve performance.

What I’m trying to do is be able to change just one of the two values without having to rewrite the entire table:

          btn.origin = {x = x_, y = y_}  --this work
          --btn.origin.x = x_  --this not work
          --btn.origin.y = y_  --this not work

These codes not work:

          btn.origin.x = x_
          --btn.origin.y retains the value of the original table
          btn.origin.y = y_
          --btn.origin.x retains the value of the original table

Could this be implemented to improve performance when moving multiple objects, for example in a large iteration?

Performance wise this doesn’t really make a difference, compared to what happens after the origin is applied under the hood.

But this is indeed a bit misleading. Same applies to other table/array setters such as:

local transport = renoise.song().transport
transport.loop_sequence_range = {1, 1} -- works
transport.loop_sequence_range[1] = 2 -- does not work