Page 1 of 1
Few CEL commands ?
Posted: 12.09.2009, 16:10
by Cham
I need some CEL commands. Anybody has an idea what they are ?
1. How to preload some models in a CEL script (not just the textures) ?
2. How to turn ON/OFF the HUD ?
3. How to set time and date to "now" ?
Thanks.
Re: Few CEL commands ?
Posted: 13.09.2009, 10:56
by Vincent
Cham wrote:I need some CEL commands. Anybody has an idea what they are ?
Martin,
You'll find an up-to-date list of the CEL commands, along with some examples, on the French Celestia wiki:
http://www.ikiru.ch/celestia/wiki/index.php/ScriptIt'd be great if someone was willing to add this list -- and keep it up-to-date -- to the English Celestia Wikibook...
1. How to preload some models in a CEL script (not just the textures) ?
http://www.ikiru.ch/celestia/wiki/index.php/Preloadtex2. How to turn ON/OFF the HUD ?
This is not possible in CEL scripting. You can use the
setoverlayelements CELX command, though:
Code: Select all
celestia:setoverlayelements{Time = false, Velocity = false, Selection = false, Frame = false}
3. How to set time and date to "now" ?
This is not possible in CEL either. You must use the following CELX lines:
Code: Select all
now = celestia:getsystemtime()
celestia:settime(now)
Re: Few CEL commands ?
Posted: 13.09.2009, 12:10
by Cham
Thanks Vincent.
But on this command (preloadtex), will it preload models too ?
Re: Few CEL commands ?
Posted: 13.09.2009, 15:34
by Vincent
Cham wrote:But on this command (preloadtex), will it preload models too ?
Martin,
Sorry, I misread your question. This command will only load the texture(s).
To preload a model, I usually display the object for a few seconds at the
beginning of the script, e.g., using a celURL...
Re: Few CEL commands ?
Posted: 13.09.2009, 15:40
by Cham
Vincent wrote:Sorry, I misread your question. This command will only load the texture(s).
To preload a model, I usually display the object for a few seconds at the
beginning of the script, e.g., using a celURL...
DARN !
Re: Few CEL commands ?
Posted: 13.09.2009, 15:47
by Vincent
Hmm, I'm not that sure anymore that models are not preloaded using the preloadtex command.
I just checked out in render.cpp and I discovered the following code in the loadTextures method:
Code: Select all
GetGeometryManager()->find(body->getGeometry());
Maybe Chris or some other devs can help here...
Re: Few CEL commands ?
Posted: 14.09.2009, 15:58
by chris
Vincent wrote:Hmm, I'm not that sure anymore that models are not preloaded using the preloadtex command.
I just checked out in render.cpp and I discovered the following code in the loadTextures method:
Code: Select all
GetGeometryManager()->find(body->getGeometry());
Maybe Chris or some other devs can help here...
Right--the model is loaded, but not any textures used by the models. I've got some code that does load model textures. I'll check that in today.
--Chris
Re: Few CEL commands ?
Posted: 14.09.2009, 18:04
by Cham
chris wrote:Right--the model is loaded, but not any textures used by the models. I've got some code that does load model textures. I'll check that in today.
So the
preloadtex command will load
both the model's geometry and all its textures into memory ? This is a must have feature.
Re: Few CEL commands ?
Posted: 15.09.2009, 03:53
by chris
Cham wrote:chris wrote:Right--the model is loaded, but not any textures used by the models. I've got some code that does load model textures. I'll check that in today.
So the
preloadtex command will load
both the model's geometry and all its textures into memory ? This is a must have feature.
Exactly. The change is in SVN now: revision 4865.
--Chris