ZBrushCentral

How to multiply a function

Hello all I think this might be very basic but I’m going to ask because I can’t figure it out. All I want to do is take this function: [ISet,Tool:Deformation:Inflate,100] an make it happen ten times in a row then stop. Instead of having the function in the script 10 times I would like to have a script to tell it to run this function x amount of times. And have x controlled by a slider that sets the amount in increments of 10.

Real easy to make it loop 10 times. Lots more work to create a slider and have that as an input…

Thanks for that working on the slider now I can’t believe that I did not see that the first time around.

All you need to do is set the loop to the slider value. If you had a slider called “Times” the code would be something like this:

[IButton, “Apply Inflate”, “Apply inflate number of times set in Times slider”,
[VarSet, loopValue, [IGet, zscript:Times]]
[Loop, loopValue,
[Set, Tool:Deformation:Inflate,100]
] //end of loop
]//end of button

@marcus_civis thank you when I get a chance I will test that out all post my results.