Jump to content

[QUESTION] Clamping parameter inside detail attribute?


neblina

Recommended Posts

Hello everyone, here's the issue I'm encountering:

From a set of points I'd like to delete all but one of them, and with a slider on the upper level be able to select which. I managed to to that, but if the slider has a value bigger than the total number of points I have a problem. So I thought about maybe clamping the slider value between 0 and the total number of points. I don't know if that is possible, but here's what I tried so far:

Attribute Create node (posAttr) with a detail attribute (posAttr) with the following value: clamp(ch("../posParm"), 0, $NPT)

After that a Delete node, Delete by Expression, Filter: $PT == detail("../posAttr", "posAttr", 0)

I expected this would evaluate the value coming from the ch in the upper level and always clamp it between 0 and the number of points, but instead it does nothing. If the value goes past the number of points it still 'crashes'. If this is a completely wrong approach, how else could I accomplish this? Thanks in advance!

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