for each boolean operation with metadata

   1063   2   0
User Avatar
Member
52 posts
Joined: Feb. 2016
Offline
Hello,

I'm trying to loop over some intersecting packed primitives, the idea is that each iteration, I take one piece, and boolean it against all the other peices, minus that current piece, so anywhere it is overlapping with the rest of the parts, in that iteration, it is subtracted.

I set the loop up, For Each Primitive, I created a metadata node to fetch metadata.
inside the loop, i unpack the current piece, and also bring in the whole assemblage of pieces which I connect to a blast node, in the blast node I put this:
detail("../foreach_begin1_metadata1/" , "iteration" , 0)
So the idea is the piece from the current iteration is removed from all the pieces.
My issue is here, the script I entered doesnt go green, I dont get an error either, it seems to resolve to 0.
I think its possibly because it doesnt recoginze that syntax because it isnt in the loop somehow? I'm not sure, theres definitely something fundamental im not understanding.

I tried setting block begin to fetch the input per iteration instead, so now the blast node is definitely in the loop, but the code
detail("../foreach_begin1_metadata1/" , "iteration" , 0)
still doesnt work and its still resolving to a value of 0, so I think im just not using the metadata correctly, I dont know..
Edited by NNNenov - March 19, 2024 15:25:47
User Avatar
Member
9376 posts
Joined: July 2007
Offline
Its just because you are typing the expression to the string parameter

Which will assume its a string by default

You can wrap your expression in ticks `detail()` to make it evaluate as expression

Or press Alt+E to open string editor and choose Hscript Expression then apply
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
52 posts
Joined: Feb. 2016
Offline
tamte
Its just because you are typing the expression to the string parameter

Which will assume its a string by default

You can wrap your expression in ticks `detail()` to make it evaluate as expression

Or press Alt+E to open string editor and choose Hscript Expression then apply

Ahh, I remember now I had this issue in the past and completely forgot about it, thank you!
  • Quick Links