Visibility of Solar System Objects. New tool - new opportunities !

All about writing scripts for Celestia in Lua and the .cel system
Avatar
Topic author
Croc M
Forum Admin
Posts: 437
Joined: 10.08.2016
With us: 7 years 8 months
Location: Udomlya, Tver region, Russia

Visibility of Solar System Objects. New tool - new opportunities !

Post #1by Croc » 27.08.2018, 19:34

A large number of asteroids and comets are created for Celestia.
To manage these multiple objects, use Lua Method - visible.
In the ssc file, for each asteroid or comet, there is a string that makes the object invisible.

Code: Select all

visible false

If an asteroid is found, it will be invisible on the screen:

Bennu_Hide.jpg


To make an asteroid or comet visible, you must press the [Vi. Di. Ba.] (See the upper right corner of the screen). The Virtual Discrete Base (Vi.Di.Ba) of asteroids and comets will turn on. The "Vi. Di. Ba. Visibility" panel appears on the screen. When you press [Asteroids31], the asteroids will be visible.
If you press [Comets All !!!] of the comet, you will see:

Bennu+Earth+Moon-ViDiBa.jpg


When a new asteroid or a new comet has appeared, these objects have not yet been added to Vi. Di. Ba. How to quickly see them? We need a new tool for on-line visibility on / off. Such a tool is created by Gironde! :clap: :clap: :clap:
When the [visible] button is pressed, the selected Solar System object is turned on / off !!! :eek:

Bennu+Earth+Moon-Hide.jpg


Bennu+Moon+Earth-Hide.jpg


It is amazing !!! :clap: :clap: :clap:

Continuation in next message ...
Creator of the GUI "Lua Universal Tools"
25/V/1947 - 30/III/2019

Avatar
Topic author
Croc M
Forum Admin
Posts: 437
Joined: 10.08.2016
With us: 7 years 8 months
Location: Udomlya, Tver region, Russia

Post #2by Croc » 28.08.2018, 06:49

With standard tools (View Options), you can not disable the planet without disabling objects of other classes. Why disconnect the planet?
On the screenshot, the Hubble and Earth telescope, which blocks the stars:

Hubble+Earth-View.jpg


With the help of a new tool (the "Visible" button), you can turn off the Earth:

Hubble+Earth-Hide.jpg


One more example. Earth close-up:

Earth_View.jpg


We do not see that the Moon is hiding behind the Earth ... Turn off the "Visible" button Earth and see the Moon:

Earth_Hide.jpg


Note. You can not find the "Visible" button? This button indicates the status of the selected object. In this case [Obj. HIDE]

Continuation in next message ...

Added after 4 hours 8 minutes:
The addon author Gironde named the new tool ObjectVisibilityBox.lua
This tool is integrated into the Graphic Tool Menu. See the button to the right of the [Vi. Di. Ba.]:

Obj.Text-green.jpg


A list of object classes that can be turned off / on is provided by the ObjectVisibilityBox.lua add-on
If there is no object class in the list, then the button's color is yellow:

Obj.Text- yellow.jpg


If the object is not selected (with the mouse cursor pointed to the emptiness), then on the button the color of the inscription is red:

Obj.Text-red.jpg


Continuation in next message ...

Added after 2 hours 15 minutes:
The new tool ObjectVisibilityBox.ua provides connection / disconnection of single objects, which belong to the 7 classes of objects of the Solar System. See the code snippet:

Code: Select all

................................
   if objclass == "asteroid" or objclass == "comet" -- clickable for asteroid and comet and spacecraft
               or objclass == "planet" -- by Croc
               or objclass == "dwarfplanet" -- by Croc                      
               or objclass == "moon" -- by Croc
               -- or objclass == "minormoon" -- by Croc
               or objclass == "spacecraft"
        then
        ..................................


From the above code it follows that the minorormon class blocked.
Users can unlock it themselves using a simple text editor, removing two dashes at the beginning of the line.
Users can lock rows:

Code: Select all

   if objclass == "asteroid" or objclass == "comet" -- clickable for asteroid and comet and spacecraft
               -- or objclass == "planet" -- by Croc
               -- or objclass == "dwarfplanet" -- by Croc                      
               -- or objclass == "moon" -- by Croc
               -- or objclass == "minormoon" -- by Croc
               -- or objclass == "spacecraft"
        then


The installation procedure for the addon is listed here: https://celestia.space/forum/viewtopic.php?p=139873#p139873
Creator of the GUI "Lua Universal Tools"
25/V/1947 - 30/III/2019

Avatar
Topic author
Croc M
Forum Admin
Posts: 437
Joined: 10.08.2016
With us: 7 years 8 months
Location: Udomlya, Tver region, Russia

Post #3by Croc » 29.08.2018, 18:52

compare the screenshots:

1. Eclipse-on_Earth-view

Eclipse-on_Earth-view.jpg


2. Eclipse-on_Earth-hide

Eclipse-on_Earth-hide.jpg
Creator of the GUI "Lua Universal Tools"
25/V/1947 - 30/III/2019


Return to “Scripting”