New CEL and CELX commands available in Celestia

Description: All about writing scripts for Celestia in Lua and the .cel system

Guckytos
Topic author
Guckytos
Topic author
Posts: 550
With us: 13 years 2 months
Location: Germany

#1by Guckytos » 06.03.2011, 10:37

Since the last update to the commands was quite a while ago and there are now a lot more CEL/CELX commands available an update was long overdue.

Since Celestia version 1.6.0 the original listing of only 35 CEL commands has been expanded to 51 CEL commands and for some commands, new arguments have been added.

Marco Klunder was so kind to provide this new complied information.

The Document will be organized into subsections to be easily updated in case new functions are included:

New CEL commands
Version 1.6.0
Version 1.6.1
Version 1.7.0
New CELX commands:
Version 1.5.0
Version 1.6.0
Version 1.6.1
Version 1.7.0


Regards,

Guckytos
Last edited by Alexell on 28.03.2017, 21:41, edited 1 time in total.
Reason: Update links

Guckytos
Topic author
Guckytos
Topic author
Posts: 550
With us: 13 years 2 months
Location: Germany

CEL commands added in 1.6.0

#2by Guckytos » 06.03.2011, 10:41

The detailed explanation and examples of these commands and arguments can be accessed by clicking on the corresponding link.

  1. capture
    Take a screenshot and save it to disk.
  2. constellationcolor
    Set the colour of individual constellations.
  3. constellations
    Set the rendering of individual constellations.
  4. deleteview
    Delete a specific view in Multiview mode.
  5. exit
    Shutdown Celestia.
  6. labels
    Additional labelflag arguments:
    • i18nconstellations
    • openclusters
    • nebulae
    • dwarfplanets
    • minormoons
    • globulars
  7. orbitflags
    Set or clear the rendering of specific orbits.
  8. Renderflags
    Additional renderflag arguments:
    • cloudshadows
    • ecliptic
    • eclipticgrid
    • equatorialgrid
    • galacticgrid
    • horizontalgrid.
  9. renderpath
    Choose for specific Vertex Shading.
  10. setactiveview
    Make a specific view the active view in Multiview mode.
  11. setambientlight
    Set brightness level of Ambient Light.
  12. setgalaxylightgain
    Set the level of Galaxy light gain (brightness).
  13. setlabelcolor
    Set the colour of specific label types.
  14. setlinecolor
    Set the colour of specific line types.
  15. setradius
    Set the new radius of an object.
  16. settextureresolution
    Set the texture resolution.
  17. singleview
    Return to single view, when in Multiview mode.
  18. splitview
    Split the view horizontal or vertical.

Guckytos
Topic author
Guckytos
Topic author
Posts: 550
With us: 13 years 2 months
Location: Germany

CEL commands added in 1.6.1

#3by Guckytos » 06.03.2011, 10:42

The detailed explanation and examples of these commands and arguments can be accessed by clicking on the corresponding link.

  1. settextcolor
    Set the colour of text and messages.

Guckytos
Topic author
Guckytos
Topic author
Posts: 550
With us: 13 years 2 months
Location: Germany

CELX commands added with 1.5.0

#4by Guckytos » 06.03.2011, 10:43

Here are the new CELX scripting features that have been added to Celestia 1.5.0.

The detailed explanation and examples of these commands and arguments can be accessed by clicking on the corresponding link.

  1. celestia:setrenderflags()
    Additional renderflag arguments:
    • cloudshadows
    • nebulae
    • openclusters
    Also valid for celestia:getrenderflags(), celestia:show(), celestia:hide() methods.
  2. celestia:setlabelflags()
    Additional labelflag arguments:
    • i18nconstellations
    • openclusters
    • nebulae.
    Also valid for celestia:getlabelflags(), celestia:showlabel(), celestia:hidelabel() methods.
  3. celestia:getdsocount()
    Return the total number of Deep Space Objects in the DSO catalogue.
  4. celestia:getdso()
    Return a specific DSO Object.
  5. celestia:utctotdb()
    Convert a UTC calendar date/time to a TDB Julian date.
    Starting with version 1.5.0, although Celestia still displays UTC on the screen, it uses the TDB time scale internally for everything else.
  6. celestia:tdbtoutc()
    Convert a TDB Julian date to a UTC calendar date/time.
    Starting with version 1.5.0, although Celestia still displays UTC on the screen, it uses the TDB time scale internally for everything else.
  7. celestia:stars()
    Return an iterator to enumerate all stars in the Celestia Catalogue.
  8. celestia:dsos()
    Return an iterator to enumerate all DSOs in the Celestia Catalogue.
  9. celestia:gettextwidth()
    Return the width in pixels of a text string.
  10. celestia:getaltazimuthmode()
    Return indication if alt-azimuth mode is enabled or disabled.
  11. celestia:setaltazimuthmode()
    Enable or disable alt-azimuth mode.
  12. celestia:getoverlayelements()
    • Return an indication whether specific overlay elements in the corners of your screen are rendered or not.
    • Overlay elements is a table which contains Time, Velocity, Selection, Frame.
  13. celestia:setoverlayelements()
    • Enable or disable the rendering of overlay elements in the corners of your screen.
    • Overlay elements is a table which contains Time, Velocity, Selection, Frame.
  14. celestia:getgalaxylightgain()
    Return the current level of Galaxy light gain (brightness).
  15. celestia:setgalaxylightgain()
    Set the level of Galaxy light gain (brightness).
  16. celestia:log()
    Write text to the Celestia log file.
  17. celestia:registereventhandler()
    Replace Celestia's default event handling with behavior, defined in a function.
  18. celestia:geteventhandler()
    Return an indicator whether or not Celestia's default event handling for a specified event type is replaced.
  19. celetia:setlabelcolor()
    Set the colour of specific label types.
  20. celestia:setlinecolor()
    Set the colour of specific line types.
  21. observer:gettrackedobject()
    Return the current tracked object for this observer.
  22. object:type()
    Return type of the object: galaxy, nebula or opencluster, instead of the generic deepsky previously returned.
  23. object:getinfo()
    Return Type of DSO among galaxy, nebula or opencluster, instead of the generic deepsky previously returned.
    Also return hubbleType of galaxies, catalogNumber of DSO and absoluteMagnitude of DSO.
  24. object:mark()
    • New symbols to use as markers:
      • circle
      • disk
      • filledsquare
      • uparrow
      • downarrow
      • leftarrow
      • rightarrow
    • New alpha argument to set transparency and new label argument to add labels to markers.
  25. object:setradius()
    Return the radius of the object.
  26. object:localname()
    Return the localized name for the object.

Guckytos
Topic author
Guckytos
Topic author
Posts: 550
With us: 13 years 2 months
Location: Germany

CELX commands added with 1.6.0

#5by Guckytos » 06.03.2011, 10:45

And here are the new CELX scripting features that have been added to Celestia 1.6.0.

The detailed explanation and examples of these commands and arguments can be accessed by clicking on the corresponding link

  1. celestia:setrenderflags()
    Additional renderflag arguments:
    • globulars
    • ecliptic
    • equatorialgrid
    • galacticgrid
    • eclipticgrid
    • horizontalgrid.
    Also valid for celestia:getrenderflags(), celestia:show(), celestia:hide() methods.
  2. celestia:setlabelflags()
    Additional labelflag arguments:
    • dwarfplanets
    • minormoons
    • globulars.
    Also valid for celestia:getlabelflags(), celestia:showlabel(), celestia:hidelabel() methods.
  3. celestia:setorbitflags()
    Additional orbitflag arguments:
    • DwarfPlanet
    • MinorMoon
    • Star
    Also valid for celestia:getorbitflags() method.
  4. celestia:newframe()
    Additional frame argument: bodyfixed.
  5. celestia:getlabelcolor()
    Return the colour of specific label types.
  6. celestia:getlinecolor()
    Return the colour of specific line types.
  7. celestia:getsystemtime()
    Return the current system time.
  8. celestia:showconstellations()
    Enable the rendering of one or many constellations.
  9. celestia:hideconstellations()
    Disable the rendering of one or many constellations.
  10. celestia:setconstellationcolor()
    Set the colour of specific constellations.
  11. celestia:ispaused()
    Return an indicator whether time is paused or not.
  12. celestia:gettextureresolution()
    Return the current texture resolution.
  13. celestia:settextureresolution()
    Set the texture resolution.
  14. celestia:windowbordersvisible()
    Return an indicator whether or not the window borders are visible around each view in case of a Multiview scene.
  15. celestia:setwindowbordersvisible()
    Set the visibility of window borders are visible around each view in case of a Multiview scene.
  16. observer:makeactiveview()
    Make the view of this observer the current active view.
  17. object:type()
    Return additional type of the object: surfacefeature, component, dwarfplanet, minormoon.
  18. object:mark()
    New occludable argument indicating whether the marker will be hidden by objects in front of it.
  19. object:visible()
    Return an indicator whether or not the object is visible.
  20. object:setvisible()
    Set the object visibility on or off.
  21. object:setorbitcolor()
    Set a specific orbit color for this object.
  22. object:orbitcoloroverridden()
    Return an indicator whether or not the object orbit color may be overridden.
  23. object:setorbitcoloroverridden()
    Determine whether or not the default orbit colour of the object may be replaced with another colour.
  24. object:orbitvisibility()
    Return the object's orbit visibility setting.
  25. object:setorbitvisibility()
    Set the orbit visibility policy for this object.
  26. object:addreferencemark()
    Display a variety of informational graphics for the object.
  27. object:removereferencemark()
    Remove the informational graphics for the object.
  28. object:catalognumber()
    Return the catalog number for a star in the specified catalog.
  29. object:locations()
    Return an iterator over all the locations associated with the object.
  30. object:bodyfixedframe()
    Return the body-fixed frame for the object.
  31. object:equatorialframe()
    Return the equatorial frame for the object.
  32. object:orbitframe()
    Return the frame in which the orbit for the object is defined at a particular time.
  33. object:bodyframe()
    Return the frame in which the orientation for the object is defined at a particular time.
  34. object:getphase()
    Get the active timeline phase for the object at the specified time.
  35. object:phases()
    Return an iterator over all the phases in the object's timeline.
  36. frame:getcoordinatesystem()
    Additional type bodyfixed may be returned as coordinate system of the frame, which replaces planetographic.
  37. phase:timespan()
    Return the start and end times for this timeline phase.
  38. phase:orbitframe()
    Return the orbit frame for this timeline phase.
  39. phase:bodyframe()
    Return the body frame for this timeline phase.
  40. phase:getposition()
    Return the position in frame coordinates at the specified time.
  41. phase:getorientation()
    Return the orientation in frame coordinates at the specified time.

Guckytos
Topic author
Guckytos
Topic author
Posts: 550
With us: 13 years 2 months
Location: Germany

CELX commands added with 1.6.1

#6by Guckytos » 06.03.2011, 10:46

Here are the new CELX scripting features that have been added to Celestia 1.6.1.

The detailed explanation and examples of these commands and arguments can be accessed by clicking on the corresponding link.

  1. celestia:synchronizetime()
    Set whether time is synchronized or not between all views, in case of a Multiview scene.
  2. celestia:istimesynchronized()
    Return an indicator whether time is synchronized or not between all views, in case of a Multiview scene.
  3. celestia:seturl()
    Make an observer goto the a specified celURL.
  4. celestia:geturl()
    Return the position, orientation, time, render options and field of view of the specified observer as a celURL.
  5. celestia:settextcolor()
    Set the colour of text and messages.
  6. celestia:gettextcolor()
    Return the current colour of text and messages.
  7. celestia:runscript()
    Launch another CEL or CELX script.
  8. Observer:orbit()
    Orbit the observer around the current reference object.

Alexell M
Site Admin
Avatar
Alexell M
Site Admin
Age: 23
Posts: 228
With us: 6 years 10 months
Location: Moscow, Russia
ICQ Facebook Skype Twitter

CELX commands will be added with 1.7.0

#7by Alexell » 04.03.2017, 15:05

Here are the new CELX scripting features that will be added to Celestia 1.7.0.

  1. celestia:getstarcolor()
    Return the current star color (blackbody_d65 or enhanced).
  2. celestia:setstarcolor()
    Set the star color (blackbody_d65 or enhanced).
  3. celestia:play()
    Audio file playback
  4. celestia:overlay()
    Display external image on screen.
  5. celestia:verbosity()
    Controlling the mode of displaying information about selected object on screen.
Admin of celestiaproject.net.
PC: Lenovo IdeaPad Z570. Intel Core i5-2450M CPU @ 2.50GHz, 8 ГБ ОЗУ, NVIDIA GeForce GT 540M, Windows 7 Ultimate x64.
Phone: iPhone 7 Plus 128 Gb. iOS 10.
Image

Alexell M
Site Admin
Avatar
Alexell M
Site Admin
Age: 23
Posts: 228
With us: 6 years 10 months
Location: Moscow, Russia
ICQ Facebook Skype Twitter

CEL commands will be added with 1.7.0

#8by Alexell » 20.03.2017, 15:03

Here are the new CEL scripting features that will be added to Celestia 1.7.0.

  1. play
    Audio file playback.
  2. overlay
    Display external image on screen.
  3. verbosity
    Controlling the mode of displaying information about selected object on screen.
Admin of celestiaproject.net.
PC: Lenovo IdeaPad Z570. Intel Core i5-2450M CPU @ 2.50GHz, 8 ГБ ОЗУ, NVIDIA GeForce GT 540M, Windows 7 Ultimate x64.
Phone: iPhone 7 Plus 128 Gb. iOS 10.
Image


Return to “Scripting”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest