The "vrts" attribute doesn't seem to pass the correct values when connected

The "vrts" attribute doesn't seem to pass the correct values when connected

mcw0
Advisor Advisor
425 Views
2 Replies
Message 1 of 3

The "vrts" attribute doesn't seem to pass the correct values when connected

mcw0
Advisor
Advisor

If I query a pCubeShape.vrts[0], I can see values other than 0 0 0.  But when I connect this to "point1" of a distanceBetween node, I get 0 0 0.  I've tried connecting the individual x, y and z channels and I still get 0 0 0.  But getAttr returns float values.  Is this a bug?  Or is this connection just not allowed?  I know I can drive the vrts with locators.  So it's fine as a destination plug.  Why not as a source plug?

0 Likes
Accepted solutions (1)
426 Views
2 Replies
Replies (2)
Message 2 of 3

Kahylan
Advisor
Advisor
Accepted solution

Hi!

 

You also shouldn't be able to use .vrts as a destination plug either. That's what the .pnts attr is for.

 

According to the mesh documentation (https://help.autodesk.com/cloudhelp/2016/ENU/Maya-Tech-Docs/Nodes/mesh.html)

vrts:

"This is an internal attribute representing local space vertex position, used for file I/O. It should never be directly manipulated by the user. If it is modified, the results will be unpredictable."

 

.vrts is an attribute that is only used for mesh creation when loading  a file. Addidtional tweaks on the vertices are stored on .pnts.

The .vrts value stays the same at all time, unless a vertex gets a new ID (for example if two objects get merged).

 

If you want to get the local position from the object center of a vertex. You can use a plusMinusAverage Node to add the static values you query from .vrts using getAttr with the live values from the according .pnts attr.

 

I hope this helps!

 

 

 

0 Likes
Message 3 of 3

mcw0
Advisor
Advisor

Thank you