Can't add atrribute through addattribute vop

   2960   4   1
User Avatar
Member
20 posts
Joined: May 2016
Offline
Hi;

I have a piece of geometry which I've colored using a Point Position driven ramp. I'm trying to pass the resulting Cd.r channel as a new float attribute from within the point VOP using an addattribute VOP, but to no avail I can seen the freshly created attribute in the spreadsheet, but it keeps returning a value of 0.0 for every point despite the fact that the result of the visualizer node or the feedback I'm getting via the print node :-/

Any help would be wildly appreciated.

Cheers;

AJ
Edited by noc2 - May 29, 2017 21:19:11

Attachments:
Capture.PNG (250.7 KB)

User Avatar
Member
8551 posts
Joined: July 2007
Offline
as the note on Add Attribute UI states, it just sets the defaults
so either plug your data to Cd output in geometryvopoutput
or use Bind Export VOP
or use Set Attribute VOP
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
20 posts
Joined: May 2016
Offline
Hi Tomas, thanx for taking the time to help. I'm kinda confused with that phrase in the docs, “sets the defaults”, couldn't understand what it means. As far as I know bind export and Set attr are used to write to attributes that already exist coming from upstream, yes? My aim was to try and create a fresh new attribute through the point VOP.
User Avatar
Member
8551 posts
Joined: July 2007
Offline
both Bind Export and Set Attrib will create an attribute if it doesn't exist as well as write the values
Add Attrib just creates the attribute and set default value as well as qualifier and local variable

Add Attrib used to be more necessary in <16 as Set Attrib would not create an attribute if it didn't exist back then

you may as well see old tutorials using vopsop and add attribute, but that's quite old and deprecated stuff now
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
20 posts
Joined: May 2016
Offline
Thanx a mil Tomas. This was truly very informative.

Cheers;

AJ
  • Quick Links