Page 1 of 1

Cel commands for some new render features in 1.5.1

Posted: 25.08.2008, 00:46
by fsgregs
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

Re: Cel commands for some new render features in 1.5.1

Posted: 25.08.2008, 10:03
by Vincent
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"}

Re: Cel commands for some new render features in 1.5.1

Posted: 25.08.2008, 21:38
by Vincent
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!

Re: Cel commands for some new render features in 1.5.1

Posted: 25.08.2008, 22:57
by fsgregs
Vincent:

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

Frank