furtap Posted June 23, 2009 Share Posted June 23, 2009 Hi, I've been trying to create attributes inside a pop network but I can't seem to be able to access their values. In sop's I would create an attribute and access with the $MYVAL syntax, but inside pops it just doesn't recognise that I have created this attribute. Instead I've been referencing the channel which isn't a nice way of doing it. Cheers Quote Link to comment Share on other sites More sharing options...
SpencerL Posted June 23, 2009 Share Posted June 23, 2009 Hi, I've been trying to create attributes inside a pop network but I can't seem to be able to access their values. In sop's I would create an attribute and access with the $MYVAL syntax, but inside pops it just doesn't recognise that I have created this attribute. Instead I've been referencing the channel which isn't a nice way of doing it. Cheers If you create an attribute in POPs, it creates a local variable which can be only used in that context, ie POPs, but if you look at your particles in SOPs, you will notice the attribute does exist on the points/particles. You have to re-create the variable map in SOPs in order for it to work in the Geometry context. To do this, just lay down an attribCreate SOP and set the attribute name to the name of the attribute want to create the variable for...In your case it looks like you need it to be "myval". Turn the "Write Values" toggle off. Quote Link to comment Share on other sites More sharing options...
furtap Posted June 23, 2009 Author Share Posted June 23, 2009 If you create an attribute in POPs, it creates a local variable which can be only used in that context, ie POPs, but if you look at your particles in SOPs, you will notice the attribute does exist on the points/particles. You have to re-create the variable map in SOPs in order for it to work in the Geometry context. To do this, just lay down an attribCreate SOP and set the attribute name to the name of the attribute want to create the variable for...In your case it looks like you need it to be "myval". Turn the "Write Values" toggle off. Thanks SpencerL, I should be a little bit more clear, I want to create and access attribute within POPs. So to create the attribute in POPs then later in POPs be able to access them. I assumed the convention of accessing them by using the name of the attribute in capitals preceded with a '$' would exist inside POPs as it does in SOPs. But unless I'm doing something wrong its just not working for me. Sorry if you have already explained this. Thanks, Quote Link to comment Share on other sites More sharing options...
Guest Swann Posted June 23, 2009 Share Posted June 23, 2009 (edited) Thanks SpencerL,I should be a little bit more clear, I want to create and access attribute within POPs. So to create the attribute in POPs then later in POPs be able to access them. I assumed the convention of accessing them by using the name of the attribute in capitals preceded with a '$' would exist inside POPs as it does in SOPs. But unless I'm doing something wrong its just not working for me. Sorry if you have already explained this. Thanks, Better use to usinig expressions like point(), prim(), vertex(). If you create local variable with attribute it will be ONLY accesible with "$" down the road, so if you want to use it in other branch, that is not connected in any way with your attribute, you will have to use some of this expressions to get it to work. PS. Well, you can also go to Aliases and Variables in Edit menu and add it as global variable but it won't work to good when you will make HDA with Global Variable . Edited June 24, 2009 by SWANN Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.