Cel commands for some new render features in 1.5.1

General discussion about Celestia that doesn't fit into other forums.
Avatar
Topic author
fsgregs
Posts: 1307
Joined: 07.10.2002
With us: 22 years 1 month
Location: Manassas, VA

Cel commands for some new render features in 1.5.1

Post #1by fsgregs » 25.08.2008, 00:46

Hi everyone.

I am writing some cel scripts and have discovered that some of the boxes in the render menu are new to 1.5.1. For example, all of the boxes that allow you to choose which orbits to turn on (planets, moons, dwarf planets, etc.) are a newer feature.

I want to run a script that turns on just dwarf planet orbits, then turns them off again. However, when Celestia 1.5.1 is installed, dwarf planet orbits are not selected. I don't want to give instructions in the script for people to pull down the render menu and check or uncheck boxes. I just want to turn them on or off from within the script, if possible.

Is there something like a renderflags {set "orbits/dwarf planets"} command we can use in a cel script? Similarly, how do I turn on "Cloud shadows" from within a cel script?

Thanks in advance. :)

Frank

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Re: Cel commands for some new render features in 1.5.1

Post #2by Vincent » 25.08.2008, 10:03

fsgregs wrote:I want to run a script that turns on just dwarf planet orbits, then turns them off again.
Hi Frank,

Orbitflags can be set in CEL scripts using, e.g.:

Code: Select all

orbitflags {set "planet"|"moon"}
orbitflags {clear "asteroid"|"comet"|"spacecraft"}

However, support for new classes like minor moons and dwarf planets was added in Celestia 1.5 for CELX, but not for CEL. So I would recommend, as usual, inserting your CEL lines in a CELX script. Or better, I can help you write your entire script in CELX... Documentation for CELX scripting is available and regurlarly updated on wikibook: http://en.wikibooks.org/wiki/Celestia/C ... ua_Methods . On the other hand, and as you surely noticed, documentation for CEL scripting is quite out of date...

fsgregs wrote:Similarly, how do I turn on "Cloud shadows" from within a cel script?
Just use:

Code: Select all

renderflags {set "cloudshadows"}
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Re: Cel commands for some new render features in 1.5.1

Post #3by Vincent » 25.08.2008, 21:38

vincent wrote:
fsgregs wrote:Similarly, how do I turn on "Cloud shadows" from within a cel script?
Just use:

Code: Select all

renderflags {set "cloudmaps"}
Oops, I wanted to write

Code: Select all

renderflags {set "cloudshadows"}

of course!
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Avatar
Topic author
fsgregs
Posts: 1307
Joined: 07.10.2002
With us: 22 years 1 month
Location: Manassas, VA

Re: Cel commands for some new render features in 1.5.1

Post #4by fsgregs » 25.08.2008, 22:57

Vincent:

Thank you for your most helpful advice. I'll implement at once. :)

Frank


Return to “Celestia Users”