evgen Posted January 4, 2014 Share Posted January 4, 2014 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 Quote Link to comment Share on other sites More sharing options...
magneto Posted January 4, 2014 Share Posted January 4, 2014 Hi, You can use the getattribute function. Quote Link to comment Share on other sites More sharing options...
evgen Posted January 4, 2014 Author Share Posted January 4, 2014 (edited) 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 January 4, 2014 by evgen Quote Link to comment Share on other sites More sharing options...
magneto Posted January 4, 2014 Share Posted January 4, 2014 You can use the @OpInput1 to get the string path of the current geometry. Quote Link to comment Share on other sites More sharing options...
evgen Posted January 4, 2014 Author Share Posted January 4, 2014 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} Quote Link to comment Share on other sites More sharing options...
magneto Posted January 4, 2014 Share Posted January 4, 2014 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. 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.