How Switch reads value from ForEachPoint?

   591   2   0
User Avatar
Member
24 posts
Joined: 8月 2023
オフライン
My question:
how can I read the value of "iteration" from ForEachPoint node?


for example,

I have 3 different objs connected by Switch node

I want each them to be copied using ForEachPoint node

By expression
detail("../block_begin1", "iteration", 0)
I get Wrong results,which all are 0:


It is supposed to be:



So coming to my question
how can I read the value of "iteration" from ForEachPoint node?

Thanks for help in advance!

Official Documents Ref:
https://www.sidefx.com/docs/houdini/model/looping.html [www.sidefx.com]

Attachments:
Snipaste_1.png (932.7 KB)
Snipaste_2_supposedResults.png (244.8 KB)
Switch with CopyToPoint.hip (87.4 KB)

User Avatar
Member
151 posts
Joined: 8月 2012
オフライン
The Block Begin node has a button to create another Begin node set to Fetch Metadata. Plug that as a spare input and pull the attribute value with
detail(-1, "iteration", 0)
Edited by Fenolis - 2025年6月7日 11:23:44
User Avatar
Member
24 posts
Joined: 8月 2023
オフライン
Fenolis
The Block Begin node has a button to create another Begin node set to Fetch Metadata....


Oh, thanks ,Fenolis~

You reminded me that

Only to create another Begin node brings in the attributes "iteration"

Thanks a lot!

Attachments:
Snipaste_2025-06-09_11-01-05.png (361.8 KB)

  • Quick Links