Page 1 of 1

Grids scripts

Posted: 24.06.2008, 03:25
by Cham
Here are four small CELX scripts, to toggle ON/OFF all the four grids in Celestia 1.6. Fridger made the original scripts, and I've edited them a bit for more functionality :

Code: Select all

-- Title: Equatorial grid

t = {} -- create table
t.grid =       not celestia:getrenderflags().grid
t.galacticgrid =    false
t.eclipticgrid =    false
t.horizontalgrid =    false

celestia:setrenderflags(t)

if celestia:getrenderflags().grid then

celestia:print("Equatorial grid activated", 5)
end


Code: Select all

-- Title: Galactic grid

t = {} -- create table
t.grid =       false
t.galacticgrid =    not celestia:getrenderflags().galacticgrid
t.eclipticgrid =    false
t.horizontalgrid =    false

celestia:setrenderflags(t)

if celestia:getrenderflags().galacticgrid then

celestia:print("Galactic grid activated", 5)
end


Code: Select all

-- Title: Ecliptic grid

t = {} -- create table
t.grid =       false
t.galacticgrid =    false
t.eclipticgrid =    not celestia:getrenderflags().eclipticgrid
t.horizontalgrid =    false

celestia:setrenderflags(t)

if celestia:getrenderflags().eclipticgrid then

celestia:print("Ecliptic grid activated", 5)
end


Code: Select all

-- Title: Horizontal grid

t = {} -- create table
t.grid =       false
t.galacticgrid =    false
t.eclipticgrid =    false
t.horizontalgrid =    not celestia:getrenderflags().horizontalgrid

celestia:setrenderflags(t)

if celestia:getrenderflags().horizontalgrid then

celestia:print("Horizontal grid activated", 5)
end