loopier / animatron-godot3

Yet another implementation of Animatron, but in Godot
GNU General Public License v3.0
17 stars 1 forks source link

Actions on selected items #4

Closed loopier closed 3 years ago

loopier commented 3 years ago

I think we might need to decide on the approach to handle commands on nodes and node groups. On my previous attempts, I ended up removing the node name from the osc messages. I used selections and applied commands on selected nodes.

So, instead of

I used

  1. /select NODE_NAME
  2. /acommand

which looped over the selected nodes. This is tedious when you just want to command something to one single node, but on the other hand you have the groups actions already implemented. It can be used on any node or group of nodes (array of node names). Another advantage is that the arguments are always command arguments, we don't need to filter the node name (or names if we want to do bulk actions). Do you think it's a good approach?

totalgee commented 3 years ago

Another possibility might be to use actual (Godot) groups. Commands to create/set nodes in different groups, and the option to run commands on groups (or on individual named nodes, as now). Just thinking "out loud" for now...

totalgee commented 3 years ago

This (as well as named groups) has been resolved by 6daa8b28. Further issues can be logged if needed.

The current commands all allow an optional first "target" argument. If it is not specified, then the command will be applied to the current selection. When the target is specified, it is a wildcard that matches '*' and '?' characters, but also supports group names (if no nodes match otherwise). So there are lots of ways to have commands applied now, using selection or not, as you prefer.