Page 1 of 1

Problem with scripts

Posted: 19.07.2008, 18:41
by MBV
I selected the "Mark Local Group Galaxies" and "Show redshifts of galaxies" cripts, to see how it worked, and now a red dot always appears in any object I select. And I don't have a dark side in the planets, its as if light was comming from everywhere.

Please, how do I solve this???

Re: Problem with scripts

Posted: 19.07.2008, 19:17
by BobHegwood
MBV wrote:I selected the "Mark Local Group Galaxies" and "Show redshifts of galaxies" cripts, to see how it worked, and now a red dot always appears in any object I select. And I don't have a dark side in the planets, its as if light was comming from everywhere.

Please, how do I solve this???
Have you tried pressing CTRL and the letter K at the same time?
This is the command to remove the marker from your display.

Don't know if this is what you mean or not, but that's what I'm thinking from your description.
Thanks, Brain-Dead Bob

Re: Problem with scripts

Posted: 19.07.2008, 19:43
by MBV
BobHegwood wrote:
MBV wrote:I selected the "Mark Local Group Galaxies" and "Show redshifts of galaxies" cripts, to see how it worked, and now a red dot always appears in any object I select. And I don't have a dark side in the planets, its as if light was comming from everywhere.

Please, how do I solve this???
Have you tried pressing CTRL and the letter K at the same time?
This is the command to remove the marker from your display.

Don't know if this is what you mean or not, but that's what I'm thinking from your description.
Thanks, Brain-Dead Bob

Thank you, that solved the problem with de markers. But what about the light, can you help me? The shadows are barely noticeble.

Re: Problem with scripts

Posted: 19.07.2008, 22:45
by BobHegwood
MBV wrote:Thank you, that solved the problem with de markers. But what about the light, can you help me? The shadows are barely noticeble.
First, do yourself a favor, and go to my web page HERE. Then, click on the "Files" link and download my latest version of the Modified Start CEL script. Simply place it in the main Celestia directory (after you have backed up your current start.cel file) and then run it to start Celestia.
With this installed, you can look at the file via notepad, and learn what controls what your Celestia program displays and how. Use it to start Celestia, and see if your problems don't all disappear. If not, you can play with the settings inside the script, and you'll see that they are ALL documented so that you can understand what they do.

Whenever a script or some other add-on changes any of the features as I like to have them set up, I simply restart Celestia using the Modified Start CEL script you'll find on my homepage. It sets ALL of the Celestia settings that can be changed so that I don't have to do it manually each time I start Celestia.

Take a look, and see if this fixes your lighting problem. If not, then you will have to read the descriptions of the "controls" which are available under the Celestia Help Menu.
Hope this helps, Bob

Re: Problem with scripts

Posted: 20.07.2008, 09:33
by Vincent
The following code can be added at the beginning of any celx script.
It will save user's initial settings, and restore them when the script is
terminated - end of the script or ESC key pressed.

This is quite a long piece of code, so we might consider adding the
celestia:savesettings() and celestia:restoresettings() methods to celx scripting...

Code: Select all

--------------------------------------------------
-- Get initial settings
--------------------------------------------------
   iSel = celestia:getselection()
   iObs = celestia:getobserver()
   iObsPos = iObs:getposition()
   iObsOrientation = iObs:getorientation()
   iTime = celestia:gettime()
   iTimescale = celestia:gettimescale()
   iAmbient = celestia:getambient()
   iLabelflags = celestia:getlabelflags()
   iRenderflags = celestia:getrenderflags()
   iOrbitflags = celestia:getorbitflags()
   iFov = iObs:getfov()
   iSpeed = iObs:getspeed()
   iVisibility = celestia:getfaintestvisible()
   iMinorbitsize = celestia:getminorbitsize()
   iStartdist = celestia:getstardistancelimit()
   iStarstyle = celestia:getstarstyle()
   iMinfeatures = celestia:getminfeaturesize()
   iOverlayelements = celestia:getoverlayelements()

--------------------------------------------------
-- Define function to restore initial settings.
--------------------------------------------------
function restore_settings()
   obs = celestia:getobserver()
   if iSel then
      celestia:select(iSel)
      obs:follow(iSel)
   end
   obs:setposition(iObsPos)
   obs:setorientation(iObsOrientation)
   obs:setfov(iFov)
   obs:setspeed(iSpeed)
   script_time = celestia:getscripttime()
   celestia:settime(iTime + (script_time/86400))
   celestia:settimescale(iTimescale)
   celestia:setambient(iAmbient)
   celestia:setlabelflags(iLabelflags)
   celestia:setrenderflags(iRenderflags)
   celestia:setorbitflags(iOrbitflags)
   celestia:setfaintestvisible(iVisibility)
   celestia:setminorbitsize(iMinorbitsize)
   celestia:setstardistancelimit(iStartdist)
   celestia:setstarstyle(iStarstyle)
   celestia:setminfeaturesize(iMinfeatures)
   celestia:setoverlayelements(iOverlayelements)
end

--------------------------------------------------
-- Restore initial settings when script is terminated
--------------------------------------------------
function celestia_cleanup_callback()
   restore_settings()
end