Jump to content

action for the values outside the find attribute value array


amin.khormaei

Recommended Posts

as you can see the code below:

i[]@values = findattribval(0,"point","random_number",3);

for(int i = 0 ; i < len(@values) ; i++)
{
    if(@ptnum == @values[i])
    {
        @pscale = ch('specific_pscale');
    }
    else
    {
        if(@ptnum != @values[i])
        @pscale = ch('rest');
    }
}

the second if inside the else doesn't work properly.

 

Specific_pscale.hip

Link to comment
Share on other sites

thank you but your code doesn't work, I want to scale the point with random_number attribute that equal with 3 by specific_pscale slider and the rest of the points with the rest slider.

I'm tested the find, find returns the index of certain value in the array

Edited by amin.khormaei
Link to comment
Share on other sites

15 hours ago, amin.khormaei said:

thank you but your code doesn't work, I want to scale the point with random_number attribute that equal with 3 by specific_pscale slider and the rest of the points with the rest slider.

seems to work exactly that way, what exactly is not working for you? attached file with the same code

Specific_pscale_fix.hip

  • Like 1
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...