I'm always getting NULL with GetDataAddressR() on a VertexMapTag when it's used on primitives with Field driven. I'm assuming the data is on the VertexMapTag over Cache object under the primitive. But I cannot think a safe way to reach to the tag else of iterating the tags on Cache. But it doesn't looks to me safe enough. We may have a few VertexMapTags and may not provide matching one. Is there a better way to read values?
How to read Field driven VertexMapTag's
From my python experience Primitives has no points/polys so vertex tags has no data count, so and GetDataAddressR() is None
The bad thing is that vertex tag is not evaluating but just cloned onto it's cache (with the Fields property!).
So if Vertex Tag has
Use Deformed Points is on, then all values would be zero at the time of execution Deformers for ex.
Considering that you need to retrieve tag of same type + same name from the cached object (in wide mean, so prefer to retrieve
deform cache over
just cache), and crossfinger everyone use unique tag names per object.
I believe that's why all new features uses string input fields rather than link field.
But that's actually great.
there is no better or safer way than checking the value on the tag that is on the cache of the object. If you have mutiple VertextMapTags on your object, you can use GetOrigin to check if the tag on the cache have been cloned from the tag you are trying to retrieve the values.
Another way is to evaluate values from the field inputs, you can find an example in our GitHub repository in python to do so. You must create a polygon object of the primitive and retrieve the points coordinates to know which point to sample. This will allow you to create the fieldInput.
MAXON SDK Specialist