"Read only expression" error when trying to change @P

   2875   2   0
User Avatar
Member
4 posts
Joined: Aug. 2016
Offline
I am trying to change the Position of points using VEX code within Attribute VOP node.
When trying to set @P, I am getting the error "read only expression on left side of assignment, even though @P is not a read only attribute??

I have attached the hip file. Any help is greatly appreciated!!

Attachments:
question(w1).hipnc (124.5 KB)

User Avatar
Member
4 posts
Joined: Aug. 2016
Offline
I found out what was wrong for anyone curious, will leave here

I had to put * (or P) in Bindings to Export in the Snippet node.
User Avatar
Member
8597 posts
Joined: July 2007
Offline
what makes it Read only is that it's not specified for export, so it will not be added to export arguments of the shader

inside of VOP delete geometryvopoutput1 and geometryvopglobal1 as they are already defining P as read only since nothing tries to write to P
and then on snippet1 in Bindings To Export specify P or some pattern that includes all attribs you want to write to like *

Attachments:
question(w1)_fix.hipnc (115.4 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links