Pancho Posted November 16, 2015 Share Posted November 16, 2015 Since the Loop in 15 seems to be new, how can I use the iteration number (the x in For x...) within the loop? What's the name of this attribute? Cheers Tom Quote Link to comment Share on other sites More sharing options...
anim Posted November 16, 2015 Share Posted November 16, 2015 (edited) you can use various metadata detail attributes from Block Begin when in Fetch Metadata mode have a look here at 34m10s Edited November 16, 2015 by anim Quote Link to comment Share on other sites More sharing options...
Pancho Posted November 16, 2015 Author Share Posted November 16, 2015 Thanks! I'm able to display the Iteration number like in the video as a font. But how do I use it in a transform node? I tried $ITERATION and the detail(.... approach. The node always turns red. I also tried it with a custom attribute. It doesn't work either, though $CLASS works. I ensured that the attribute is in the same context (point or primitve). Nothing. $CLASS works, but $AVGDST (avgDst is my custom attribute) doesn't. Couldn't find any tips or tricks so far. What I need to do is make transformations on a per primitive basis. Cheers Tom P.S.: Thanks for the video link! Quote Link to comment Share on other sites More sharing options...
Pancho Posted November 16, 2015 Author Share Posted November 16, 2015 O.k., I managed to solve my transform problem. At least with my custom attribute, since it is a primitive. Found one of Peter Quint's videos. To use my attribute I need to type in prim("../nameOfTheNodeBeforeTheTransform", $PR, "avgDst", 0). While this might be verrrrrrry logical for a programer, it feels more than complicated, especially in the small transform entry field. So, how do I get the iteration into the transform? Guess the formular will be similar, but what kind of object is Iteration? Definitely not a point nor prim. Quote Link to comment Share on other sites More sharing options...
jonp Posted November 16, 2015 Share Posted November 16, 2015 (edited) If you really need the variable name, copy the iteration attribute to your main SOP tree using an attribcopy SOP and then set the local variable in an attribwrangle node, set to "Detail" mode. Use this code below: // Probably set it to be "ITERATION" instead, but if you // want to replicate the old behavior you could do this... addvariablename(geoself(), "iteration", "FORVALUE"); Edited November 16, 2015 by jonp Quote Link to comment Share on other sites More sharing options...
anim Posted November 17, 2015 Share Posted November 17, 2015 getting the metadata using detail() should work can you post your file? 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.