I'm working on some vex code in a point wrangler that is set for points and detail ( run over only once ).
I have created an array of ‘struct’ that each has the vertex informatation needed to create different size polyline boxes.
I wanted to to take advantage of the return value created by the addprim function when I create the box with my function that uses the addvertex function and the vectors of the struc that represent their ‘point’ positions for the different members of the array.
In that function at the moment I've wanted to include adding the ability to color the box so I've included an argument for an addprimattrib function that can set the initial color.
However, if I want to change the color I have to run the function again and that seems a bit ‘wasteful’( it would redraw the box with the addvertex functions ) when I could just use the setprimattrib function which can use the origianl value returned by addprim to do that.
But the docs say ( of the addprim function ):
The returned value is a primitive number that can be used with the setprimattrib to change the value of the primitive, but is not the final primitive number of the primitive.
So I am wondering what could possibly change the final primitive number?
Am I ok if all I want is that returned addprim value to stay the same as I refer to it in other functions of the same point wrangler that addprim was used to create the original returned value?
Does it only possibly change further down the “pipeline” which follows after that point wrangler node?
Comments on this are appreciated - Thank you.