Jump to content

For loop expression


philpappas

Recommended Posts

Hit the Create Meta Import Node on the Block Begin node and plug that in to the 2nd input of an Attribute Wrangle. 

Then loop over the geo inside the forloop according to the number of the iteration.

for(int i = 0; i < detail(1, "iteration", 0)+1; i++)
    {
        f@myAtt /= 2;
    }

Link to comment
Share on other sites

If you are inside the loop and accessing an attribute which is outside the loop, it won't be updated with the results of the processes inside the loop. 

Doing it inside an attribute vop like that is a lot more fiddly. I would just run that vex code above, to get your attribute values and then feed that in to the vop to do your various noise calculations. 

Sorry, but I can't upload any files at the moment. I'll try to put something together this evening. 

 

Link to comment
Share on other sites

just create 'null' object inside the loop (just after 'repeat_begin1') and reference it instead of referencing 'attribcreate1'.

you 'attribcreate1' has same value on each iteration because it is not within a loop.

Edited by tmdag
Link to comment
Share on other sites

10 hours ago, tmdag said:

just create 'null' object inside the loop (just after 'repeat_begin1') and reference it instead of referencing 'attribcreate1'.

you 'attribcreate1' has same value on each iteration because it is not within a loop.

thanks that fixed it!

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...