Pass-By-Reference local variable


I’ve noticed that when I use the pass by reference checkbox on a variable within a function, I cannot set a local variable in that function, that will correspond (point to the same value) to the input variable (the one that was sent as a reference).
This is how I have to work for now. It’s very cumbersome.

And this is what I suggest - there should be a way to define a local variable as a reference, so it should have an input by reference, where I can plug the value passed by reference from the function. Here is an image of what it should look like:


4.16 introduced Parameters as “Local” Variables.

In the Context Menu search for “Variable” and then the Parametername

Very nice! :slight_smile:
Thank you. Is there any other way to get this variable? The current method is a bit hidden.

Nope, I already made a request for that.

Great! Can you send me the link to your thread, so I can back you up.

Anyone knows if this is possible with version 4.25.1? I’ve been trying to find a way to do exactly what is being proposed in the first message of this thread for the same reasons: to store a pass by ref variable in a local variable so you can use that down the graph without having to drag long connections from the input nodes of the function. No luck so far, it seems that when you set a local variable with a pass by ref variable value, it just copies the variable value to the local variable instead of keeping the reference to the original variable…

I am also encountering the problem as described by OP. I cannot find Parameters in 4.25.3

Did they move that functionality to some obscure hiding place or am I blind?

In the function graph just right click and type “get yourinputname” and it’ll get a reference to the input. No need to make any additional local variables.