Reading a Sprite Material Constant

I have a game object containing a sprite node, whose tint I change on creation (via a factory) like this:

sprite.set_constant(’#sprite’, ‘tint’, myVec4)

but for the life of me, I can’t figure out how to read this value at a later time.

Can someone assist me in that capacity?

Could you store the tint somewhere in self and then use it later? Or probably you already have it there if you passed the tint as a property at factory creation time?

But probably I am missing something…

My guess was that you could use:

-- recommended instead of sprite.set_constant() as it is a deprecated function
go.set("#sprite", "tint", vmath.vector4(1,1,0,1))

-- read it next frame
print(go.get("#sprite", "tint"))

But for some reason go.get() will give me the original value. I don’t recall why that is. @JCash probably knows!