Jump to content

Read attribute in AttribWrangle detail mode.


evgen

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

 

Link to comment
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
Link to comment
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} 
Link to comment
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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...