Set multiple properties from SET #596

Closed
opened 2026-02-20 10:19:01 -05:00 by deekerman · 3 comments
Owner

Originally created by @flackr on GitHub (Nov 12, 2022).

When you need to set multiple properties it can be quite verbose writing multiple calls to SET. It would be nice to have a convenient way to set multiple properties in a single SET call.

If we don't want to diverge from the existing syntax we could use index-paired lists, e.g.

{
  "func": "SET",
  "property": ["x", "y", "parent", "owner"],
  "value": [100, 200, "container", "player"]
  }
}

One convention when one list is shorter than another in CSS is to auto-extend the last value. This could be useful for different relations, e.g.

{
  "func": "SET",
  "property": ["x", "y", "parent", "owner"],
  "relation": ["+", "+", "="],
  "value": [100, 200, "container", "player"]
  }
}

Where the "=" would auto-extend for everything after the first two indices.

Originally created by @flackr on GitHub (Nov 12, 2022). When you need to set multiple properties it can be quite verbose writing multiple calls to [SET](https://github.com/ArnoldSmith86/virtualtabletop/wiki/Functions#set). It would be nice to have a convenient way to set multiple properties in a single [SET](https://github.com/ArnoldSmith86/virtualtabletop/wiki/Functions#set) call. If we don't want to diverge from the existing syntax we could use index-paired lists, e.g. ``` { "func": "SET", "property": ["x", "y", "parent", "owner"], "value": [100, 200, "container", "player"] } } ``` One convention when one list is shorter than another in CSS is to auto-extend the last value. This could be useful for different relations, e.g. ``` { "func": "SET", "property": ["x", "y", "parent", "owner"], "relation": ["+", "+", "="], "value": [100, 200, "container", "player"] } } ``` Where the "=" would auto-extend for everything after the first two indices.
Author
Owner

@96LawDawg commented on GitHub (Nov 12, 2022):

Duplicate of #1168

@96LawDawg commented on GitHub (Nov 12, 2022): Duplicate of #1168
Author
Owner

@flackr commented on GitHub (Nov 12, 2022):

We should close this right?

@flackr commented on GitHub (Nov 12, 2022): We should close this right?
Author
Owner

@96LawDawg commented on GitHub (Nov 12, 2022):

Yes, I just wanted to make sure your observations got added to the other one. You did that, I see. Thanks.

@96LawDawg commented on GitHub (Nov 12, 2022): Yes, I just wanted to make sure your observations got added to the other one. You did that, I see. Thanks.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/virtualtabletop#596
No description provided.