Hello,
I'd like to change a Node's location using UndoRedo.add_do_property()
. I tried the following:
undo_redo.add_do_property( my_node, "global_transform.origin", position );
But nothing happened.
Passing in the node's Transform as the first argument also didn't work, because the first argument has to be/inherit the Object class.
The obvious workarounds are to use add_do_method()
instead and call a function that will set the value, or copy the Transform, change the copy's origin, and pass it back.
Is this necessary, or is there a way to change a sub-property with add_do_property()
?
Thank you.