Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
Bishka

Member
Registered:
Posts: 47
Reply with quote  #1 
Up to now,if I have wanted to repeat  part of a script filter, I have duplicated it X number of times. But, is it possible to loop a section of a script filter?


Instead of writing, for example:-
     paint_filter ("Box Blur",0,sliderVal1*1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
     paint_filter ("Normalize",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
     paint_filter ("Box Blur",0,sliderVal1*1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
     paint_filter ("Normalize",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
     paint_filter ("Box Blur",0,sliderVal1*1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
     paint_filter ("Normalize",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
     paint_filter ("Box Blur",0,sliderVal1*1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
     paint_filter ("Normalize",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
     paint_filter ("Box Blur",0,sliderVal1*1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
     paint_filter ("Normalize",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)


I could:-
specify what I wanted looped and how many times I want it looped:-

Loop this X number of times
     paint_filter ("Box Blur",0,sliderVal1*1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
     paint_filter ("Normalize",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
End loop

 And then carry on through the rest of the script filter as normal.


Regards Bishka
0
kcarlino

Avatar / Picture

Administrator
Registered:
Posts: 543
Reply with quote  #2 
Hi Bishka,

This execution is in a Lua script so you can use Lua commands to loop. If you can't work how to do it, please attach your script and I can provide an example for you to try. 

Ken
0
Bishka

Member
Registered:
Posts: 47
Reply with quote  #3 
Thanks for the reply.
I had tried using loops but they didn't work (Turns out I woz bein' stooopid, who would have guest !!)
Have just tried again and got it to work.

Thanks again.
Bishka
0
kcarlino

Avatar / Picture

Administrator
Registered:
Posts: 543
Reply with quote  #4 
Great that you have it working now!

Thanks for the update,
Ken
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.