I
Not sure if I use the right words for what things are.
I have an object constructed that way:
myvar[i].h
myvar[i].v
myvar[i].fov
Then I want to save a temporary version of all myvar to be able to recall it later.
To save in temp:
set (myvarTEMP, get(myvar));
then myvar is modified but at some point I want to recall to original myvar so I do:
set (myvar, get(myvarTEMP));
The saving works.
The recall doesn't. In fact it looks like myvarTEMP is in fact a reference to myvar so all the modifications done to myvar were updated for myvarTEMP (bad way to say it as it is a reference I suppose). So when I call back the old values they were actually the mod ones.
I need the temp not to be a reference but a completely independent variable/object.
I tried search and find ways around this.
It feels like some basic thing I don't understand.
Thanks for help anyone.