Gradient Presets Scripting?

General discussion about Apophysis

Gradient Presets Scripting?

Postby agsandrew » Fri Mar 18, 2011 1:30 am

Looking through scripting reference I see that it is possible to cycle through gradients RGB values but is it possible to access gradient presets via script?
Particularly how would you select a random gradient preset out of the list using a script?
Additionally how would you cycle through the selected gradient?
When Apophysis creates random flame it does select random gradient, so there must be a way to do so via script or so I hope.
Any help with this will be appreciated.
agsandrew
 
Posts: 3
Joined: Tue Mar 15, 2011 6:54 am

Re: Gradient Presets Scripting?

Postby ulliroyal » Tue Mar 29, 2011 7:41 pm

Hi Andrew,

hope you meant that:

Gradient Tab
Controls random gradient settings.
0 - Random Preset ; 1 - Use Default ; 2 - Use Current ; 3 - Randomize ;
Options.GradientOnRandom := 0 ;
Options.MinNodes := 2 ;
Options.MaxNodes := 6 ;
Options.MinHue := 0 ;
Options.MaxHue := 600 ;
Options.MinSaturation := 0 ;
Options.MaxSaturation := 100 ;
Options.MinLuminance := 0 ;
Options.MaxLuminance := 100 ;

there is also a Rotate Gradient Script by Mark:
{ *********************************** }
{ Apophysis example script. }
{ Mark Townsend, September 2003. }
{ *********************************** }

{ Rotates the gradient }
{ Hit any key to stop }
Flame.SampleDensity := 1;
while not Stopped do
begin
for i := 0 to 255 do
begin
Flame.Gradient[i][0] := Flame.Gradient[(i + 1) mod 256][0];
Flame.Gradient[i][1] := Flame.Gradient[(i + 1) mod 256][1];
Flame.Gradient[i][2] := Flame.Gradient[(i + 1) mod 256][2];
end;
Preview;
end;


cheers
ulli
User avatar
ulliroyal
 
Posts: 4
Joined: Tue Mar 15, 2011 8:42 am

Re: Gradient Presets Scripting?

Postby agsandrew » Sat Jan 26, 2013 1:08 am

Came back to your answer years later. Thank you.
I am still learning Apo...
agsandrew
 
Posts: 3
Joined: Tue Mar 15, 2011 6:54 am


Return to General Discussion

Who is online

Users browsing this forum: prarijotoff, quzkwgid and 2 guests

cron