Lua Edu Tools v1.2 beta

All Lua-tools for Celestia in one forum.
Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 4 months
Location: Nancy, France

Re: Lua Edu Tools v1.2 beta

Post #21by Vincent » 13.12.2008, 09:48

Fenerit wrote:Ehi, Vincent, as "man of the requests" :wink: I wonder whether is possible to add a way to show the Hevelius' Uranographia without to switch in nebulae mode.
Massimo,

One alternative would be to define it using the 'diffuse' class in an ssc file.
This way, it could be toggled on/off via the object:visible() celx method,
or simply via the Lua Edu Tools addons Visibility option using the following
lua code:

Code: Select all

Hevelius_Uranographia =
{
      objects =
      {
         "Sol/Earth/constellations"
      }
}
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 4 months
Location: Nancy, France

Re: Lua Edu Tools v1.2 beta

Post #22by Vincent » 13.12.2008, 10:08

Hi Jo?l,

jogad wrote:- When I launch Celestia the “asteroid belt” addon is active while others are not. My wish is that ALL would be disabled at startup. How can I choose those witch are active and those witch are not?
The 'Addons Visibility' option simply acts as a toggle. If you want the addons to be invisible by default,
just add 'Visible false' in the ssc definition. I'm not sure whether it would be worth adding a visible option
to the lua definition too, since this is already doable in the ssc.


jogad wrote:- By default Celestia sets all types of locations as active and records if they must be displayed or not. I don’t know if it is a bug but the Lua Edu Tools begin to deactivate all kind of location and set the display flag to active. As a result, when I press the “&” key to see locations, nothing appears and I must set again locations in the Celestia dialog box. I prefer the Celestia’s fashion to proceed.
This is indeed intentional, so as to avoid an overcrowded screen. When using the 'Addons Visibility' option,
all location flags are set to false, except the ones that are activated via the checkboxes. You can disable
the 'Addons Visibility' option in the config.lua file if you prefer the default Celestia behaviour.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 4 months
Location: Nancy, France

Re: Lua Edu Tools v1.2 beta

Post #23by Vincent » 21.12.2008, 15:11

I've updated the Lua Edu Tools package to v1.2beta3:
http://vincent.giangiulio.perso.sfr.fr/ ... 2beta3.zip

Here are the changes from v1.2beta2 to v1.2beta3:
- Improved info image loading. Each image is now loaded only once a Celestia session;
- Enabled compass also when selected object is a location;
- Made Asteroid Belt less obtrusive;
- Added superscript notation to distance marker labels;
- Updated translations.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 4 months
Location: Nancy, France

Re: Lua Edu Tools v1.2 beta

Post #24by Vincent » 07.03.2009, 09:43

Lua Edu Tools v1.2beta4: (need SVN revision 4652 or later)
http://vincent.giangiulio.perso.sfr.fr/ ... 2beta4.zip

Changes from v1.2beta3 to v1.2beta4:
    - Fixed bugs with compass and pause status both reported by Jogad:
    viewtopic.php?f=3&t=13482
    - Added the possibility to associate a celx script to an addon.
    The script is launched whenever the checkbox is activated via the
    Addon Visibility option. The script path is relative to the addon's
    directory and can be specified in the addon's Lua definition file:

    Code: Select all

    Large_Scale_Universe =
    {
        objects = { "Large Scale Universe" },
        script = "Large_Scale_Universe.celx"
    }

    - Added a Large Scale Universe addon, which shows the filiaments structure
    at large scale. This is a modified version of Martin's Millennium Simulation addon:
    viewtopic.php?f=6&t=13487
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 3 months

Re: Lua Edu Tools v1.2 beta

Post #25by ElChristou » 07.03.2009, 10:10

Vincent wrote:- Added the possibility to associate a celx script to an addon.
The script is launched whenever the checkbox is activated via the
Addon Visibility option. The script path is relative to the addon's
directory and can be specified in the addon's Lua definition file:...

Vince, can you dev this a bit more? You are talking of a lua def for an addon; is this a new file or it goes in the ssc? You say the script is activated via the visibility option; how?

One of Chris' plan is to add the possibility to play scripts linked to addons; he was thinking in adding this option in the incoming addon manager UI (next to some info on the addon) when I was asking to have this option directly in the contextual menu of the addon itself. As the work on the unified UI is not for right now, do you think we can experiment with the second option at code level? ideally the script (or scripts) should be declared in the ssc and placed in a script folder next to data, textures and models in the addon directory...
Image

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 4 months
Location: Nancy, France

Re: Lua Edu Tools v1.2 beta

Post #26by Vincent » 07.03.2009, 10:53

ElChristou wrote:Vince, can you dev this a bit more? You are talking of a lua def for an addon; is this a new file or it goes in the ssc? You say the script is activated via the visibility option; how?
The addon visibility setting option has been available for a while. Each addon is handled using
a .lua file which is placed in the 'lua_edu_tools\adds\addon_name' directory:
Image


As an example, here's the content of the Large_Scale_Universe.lua file:

Code: Select all

-- The table can include the following values:
--    >    objects = { string:object1path, string:object2path, ... }
--    Defines the list of objects whose visibility will be enabled/disabled.
--    >    labelcolor = {number:red, number:green, number:blue, number:alpha}
--    Defines the color of the addon labels. The name of the addon will be then displayed using
--    this same color in the 'Addon Visibility' window.
--    >    locationtype = string:locationtype
--    Defines the type of location that will be enabled/disabled simultaneously with the objects visibility.
--    List of all location types: http://en.wikibooks.org/wiki/Celestia/SSC_File#Type_.22string.22
--    >    script = string:scriptfilename
--    Defines the filename of the script that is run whenever the addon is enabled via the checkbox.
--    The script path is relative to the addon's directory.

Large_Scale_Universe =
{
    objects = { "Large Scale Universe" },
    script = "Large_Scale_Universe.celx"
}


Finally, the script is launched whenever the addon checkbox is activated in the Addons Visibility box:
Image


ElChristou wrote:One of Chris' plan is to add the possibility to play scripts linked to addons; he was thinking in adding this option in the incoming addon manager UI (next to some info on the addon) when I was asking to have this option directly in the contextual menu of the addon itself. As the work on the unified UI is not for right now, do you think we can experiment with the second option at code level? ideally the script (or scripts) should be declared in the ssc and placed in a script folder next to data, textures and models in the addon directory...
I'm quite sure that this could be done. But personnaly, I'd prefer your first option for which the script could be used to bring the observer to a specific object, whereas in your second option, the user must go to the object before launching the script via the contextual menu.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 3 months

Re: Lua Edu Tools v1.2 beta

Post #27by ElChristou » 07.03.2009, 11:55

Vincent wrote:Finally, the script is launched whenever the addon checkbox is activated in the Addons Visibility box:
Image

Ok, but your shot is what I was afraid of; if one have too much addons the checkboxex won't fit in the screen... (or you have a scrolling bar for this?)


Vincent wrote:
ElChristou wrote:One of Chris' plan is to add the possibility to play scripts linked to addons; he was thinking in adding this option in the incoming addon manager UI (next to some info on the addon) when I was asking to have this option directly in the contextual menu of the addon itself. As the work on the unified UI is not for right now, do you think we can experiment with the second option at code level? ideally the script (or scripts) should be declared in the ssc and placed in a script folder next to data, textures and models in the addon directory...
I'm quite sure that this could be done. But personnaly, I'd prefer your first option for which the script could be used to bring the observer to a specific object, whereas in your second option, the user must go to the object before launching the script via the contextual menu.

That is precisely Chris argument.
But to explain why I'm proposing the contextual solution we have to talk about how do we want Celestia to be. The topic is long but I guess important.
From what I've exchanged with Chris (quite a while ago) I could see that as a coder he want the one straight logical solution adapted to a professional use. That's mean that you would use Celestia first via it's numerous GUI panels to for example select a script, or select a body or an eclipse etc, then see the result of your query in the OGL window. That is clearly an efficient way to do.
What as an artist (-big word I know, but it's for the idea) I don't like much with this solution is the fact that the OGL windows comes in second rank; to me the actual OGL windows, free from any panels and mostly full screen is what makes Celestia different from any soft out there. If I was in charge my priority would be to preserve this aspect. Of course finding ways to marry both the free full OGL scene with a professional use is more complicated.
Anyway, let's see the reasoning to get a script played on let's say ISS (we consider the user decided to play with ISS before opening Celestia)

Chris' pro UI:

- Open Celestia
- Open an addon manager
- browse to select ISS
- browse a list of actions (scripts/urls, whatever)
- select a script and click on the "play button"
- Celestia will go to ISS and play the script

My non pro UI:

- Open Celestia
- Go to ISS (via enter or browser)
- right click ISS to browse a list of actions (scripts/urls, whatever)
- click on a script
- Celestia play the script

What is the real difference here? I don't see much apart that mine will probably show the desired result faster, but that is not the point.
Now, the real difference between solutions is that with Chris solution, Celestia will present to the user a list of addons available at the opening. The bad thing about that is that eventually the user instead of going to ISS will be tempted by another addon that is not related at all (...imagine a guys @ Nasa playing with Cham's last BH while his boss is waiting for orbital data... :mrgreen: ). Ok, eventually you will tell me that this way some more addons related to ISS could be easily triggered (visibility for instance) etc... But in reality, that is another aspect on how to link related addons and of course some contextual solutions also exist! :wink:

So as you can see, this is one aspect of the UI. Lot's must be developed and tested. As this stuff is a long topic, eventually if there is an interest we can open a thread in the dev forum...
Image

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 4 months
Location: Nancy, France

Re: Lua Edu Tools v1.2 beta

Post #28by Vincent » 07.03.2009, 18:14

ElChristou wrote:Ok, but your shot is what I was afraid of; if one have too much addons the checkboxex won't fit in the screen... (or you have a scrolling bar for this?)
Not yet, but I can indeed add a scrolling bar. That's not a big deal.


ElChristou wrote:...
So as you can see, this is one aspect of the UI. Lot's must be developed and tested. As this stuff is a long topic, eventually if there is an interest we can open a thread in the dev forum...
Yes, I think that this is an interesting issue which diserves its own thread.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 3 months

Re: Lua Edu Tools v1.2 beta

Post #29by ElChristou » 07.03.2009, 19:02

Vincent wrote:
ElChristou wrote:Ok, but your shot is what I was afraid of; if one have too much addons the checkboxex won't fit in the screen... (or you have a scrolling bar for this?)
Not yet, but I can indeed add a scrolling bar. That's not a big deal.

Forget! I was supposing this would work for any addons and not just these in the edu tool addon folder...
Image

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 4 months
Location: Nancy, France

Re: Lua Edu Tools v1.2 beta

Post #30by Vincent » 08.03.2009, 00:06

ElChristou wrote:
Vincent wrote:
ElChristou wrote:Ok, but your shot is what I was afraid of; if one have too much addons the checkboxex won't fit in the screen... (or you have a scrolling bar for this?)
Not yet, but I can indeed add a scrolling bar. That's not a big deal.

Forget! I was supposing this would work for any addons and not just these in the edu tool addon folder...
Christophe,

This does work for any addon. The only file that needs to be placed in the 'lua_edu_tools/adds/addon' directory
is the addon's lua definition file. All other files can be placed wherever in the 'extras' directories.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 3 months

Re: Lua Edu Tools v1.2 beta

Post #31by ElChristou » 08.03.2009, 11:16

Vincent wrote:This does work for any addon. The only file that needs to be placed in the 'lua_edu_tools/adds/addon' directory
is the addon's lua definition file. All other files can be placed wherever in the 'extras' directories.

Ah cool! Then yes, you will probably have to add a scroll bar in case people begin to add stuff...
Image

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 4 months
Location: Nancy, France

Re: Lua Edu Tools v1.2 beta

Post #32by Vincent » 08.03.2009, 12:38

ElChristou wrote:
Vincent wrote:This does work for any addon. The only file that needs to be placed in the 'lua_edu_tools/adds/addon' directory
is the addon's lua definition file. All other files can be placed wherever in the 'extras' directories.

Ah cool! Then yes, you will probably have to add a scroll bar in case people begin to add stuff...
Done. :)

I've updated the Lua Edu Tools v1.2beta4 package (you may want to download it again):
http://vincent.giangiulio.perso.sfr.fr/ ... 2beta4.zip

I've also removed non visible objects from the Solar System browser.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 3 months

Re: Lua Edu Tools v1.2 beta

Post #33by ElChristou » 08.03.2009, 13:10

This stuff is getting better and better! :o
Image

sblee
Posts: 20
Joined: 10.03.2009
With us: 15 years 2 months
Location: Dublin, Ireland

Re: Lua Edu Tools v1.2 beta

Post #34by sblee » 15.05.2009, 15:13

I just succeded to build SVN on Ubuntu 9.04 and applied Lua Edu Tools 1.2 Beta 5.

Almost everything looks ok but Dying Sun addon. The texture is not displayed properly. Any idea?

I also tried to change rendering path but they are same. Open GL vertex/nVidia Combiner shows black one instead of grey one.

Console messages said "textures/medres/dying_Earth.*: unrecognized or unsupported image file type". But, other default jpg texture such as Mercury are OK.
Seung-Bum Lee
Korean Windows XP Pro SP3 on Intel Core 2 6400, 2GB, with 256MB ATI Radeon X1300PRO and
Korean Ubuntu 9.04 (JauntyJackalope) on Intel Centrino Duo, 1GB with nVidia GeForce Go 7400

Avatar
jogad
Posts: 458
Joined: 17.09.2008
With us: 15 years 8 months
Location: Paris France

Re: Lua Edu Tools v1.2 beta

Post #35by jogad » 15.05.2009, 20:47

Hello

Maybe there is a typo in the addon.
Try to change the "Textures" directory by "textures"

Othewise the file dying_Earth.jp is missing or corrupted. Try reinstall the addon.

sblee
Posts: 20
Joined: 10.03.2009
With us: 15 years 2 months
Location: Dublin, Ireland

Re: Lua Edu Tools v1.2 beta

Post #36by sblee » 15.05.2009, 22:11

You are right. Currently, "Textures" is the name of the directory which is working fine in Windows.

However, that makes problem since it requires "textures" as Linux distinguishes upper and lower character.

I will contact Vincent related this issue.

Thank you, jogad
Seung-Bum Lee
Korean Windows XP Pro SP3 on Intel Core 2 6400, 2GB, with 256MB ATI Radeon X1300PRO and
Korean Ubuntu 9.04 (JauntyJackalope) on Intel Centrino Duo, 1GB with nVidia GeForce Go 7400

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 4 months
Location: Nancy, France

Re: Lua Edu Tools v1.2 beta

Post #37by Vincent » 16.05.2009, 07:16

jogad wrote:Maybe there is a typo in the addon.
Try to change the "Textures" directory by "textures"
Jo?l,
You're perfectly right. Linux is case sensitive, so lower case should be used for folder names. Thanks!

Seung-Bum,
Thanks for the report! This is fixed now. I'll post a link to v1.2 Beta5 quite soon.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 4 months
Location: Nancy, France

Re: Lua Edu Tools v1.2 beta

Post #38by Vincent » 14.07.2009, 14:21

As discussed in this thread, I've added some 'goto start/end date'
buttons for spacecraft into the Solar System Browser of the Lua Edu Tools.

You can download the v1.2beta5 package here :
http://vincent.giangiulio.perso.sfr.fr/ ... 2beta5.zip

This will shortly become v1.2 if no bug is found.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

sblee
Posts: 20
Joined: 10.03.2009
With us: 15 years 2 months
Location: Dublin, Ireland

Re: Lua Edu Tools v1.2 beta

Post #39by sblee » 15.07.2009, 07:54

This is a very nice feature!

Thanks Vincent.

I'm currently testing English version, and maybe late today I can check Korean version.

Cheers!
Seung-Bum Lee
Korean Windows XP Pro SP3 on Intel Core 2 6400, 2GB, with 256MB ATI Radeon X1300PRO and
Korean Ubuntu 9.04 (JauntyJackalope) on Intel Centrino Duo, 1GB with nVidia GeForce Go 7400

sblee
Posts: 20
Joined: 10.03.2009
With us: 15 years 2 months
Location: Dublin, Ireland

Re: Lua Edu Tools v1.2 beta

Post #40by sblee » 19.07.2009, 10:00

Actually, this is question not a bug.

How an add-on could be enabled and disabled initially?

I added a Nebula type addon. As you know, only asteriod belt is enabled and others are disabled.

So, the question is how to set up inital value of enable/disabl status of add-ons?
Seung-Bum Lee
Korean Windows XP Pro SP3 on Intel Core 2 6400, 2GB, with 256MB ATI Radeon X1300PRO and
Korean Ubuntu 9.04 (JauntyJackalope) on Intel Centrino Duo, 1GB with nVidia GeForce Go 7400


Return to “Lua-Tools”