Jump to content
evgen

Read attribute in AttribWrangle detail mode.

Recommended Posts

Hello. I need you advice about AttribWrangle

I have the simple code:

setpointattrib(geoself(),"P",0,{10,10,10},"set");

So now I would like to get the attribute value from the current modified geometry.

How to do that?  Note again: We are in "Run over: detail"

I couldn't find any methods to get current attribute value trough geoself() identifier.

Please, help

 

Share this post


Link to post
Share on other sites

magneto, thanks for reply.

Well, getattribute() uses only string path to geometry. Like file on a disk or OP: link to node. This is not what I find. It couldn't get modified attribute from current attribWrangle unfortunately.

point() function works with geoself() but it returns unmodified attribute value

Maybe there is some trick to get this function work with geoself()?

Edited by evgen

Share this post


Link to post
Share on other sites

You can use the @OpInput1 to get the string path of the current geometry.

Share this post


Link to post
Share on other sites

Oh thanks for @OpInput its very useful.

Well any way, it returns me attribute value which was in input source. I need to get modified value.

// Default value is {0,1,0} 
// Lets change it to {10,10,10} 

setpointattrib(geoself(),"P",0,{10,10,10},"set");
// lets read new value from geometry...

vector pos;
getattribute(@Opinput1,pos,"point","P",0,0);

// It Returns {0,1,0} 

Share this post


Link to post
Share on other sites

I haven't tried it but I think if you are just setting the value, there is no way to read the value other than to store it. For example if you are setting colors in detail mode, and want to use the same colors for velocity in the same code, then you should store the color values in an array.

 

Otherwise I don't think it's possible to read what you just wrote to attributes before the node returns.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×