New Star Map (21 nearer stars from Sol)

Post requests, images, descriptions and reports about work in progress here.
Avatar
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Re: New Star Map (21 nearer stars from Sol)

Post #21by Cham » 20.12.2009, 03:00

fsgregs wrote:I suggest you add a "render nebula" command to the nearest_stars.celx script so the lines are turned on automatically.

This would be a great addon for inclusion in Vincent's lua edu tools addons, if a keystroke could be mapped to the keyboard to toggle through the 3 script choices. Have you given thought to toggling the script via keystroke? :)

Yes, good suggestion about the nebula turned ON. I forgot this in the CELX script. Tx.

The 3 states of the script are toggled with a keystroke (command-R to replay the previous script). This is already a feature of Celestia on the Mac version. This is an absolute must have on any version.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Avatar
fsgregs
Posts: 1307
Joined: 07.10.2002
With us: 22 years 1 month
Location: Manassas, VA

Re: New Star Map (21 nearer stars from Sol)

Post #22by fsgregs » 20.12.2009, 05:03

Cham:

I have been able to set the addon up for use in Lua Edu tools. It works fine ... by toggling the addon box in the Lua addon menu on and off 3 times, I can cycle through the three script states. Looks really good! :)

here is the text of the Nearest_Stars.lua file:

Nearest_Stars =
{
labelcolor = {1.00, 1.00, 1.000, 0.8},
objects =
{
"?‰toiles Proches 1",
"?‰toiles Proches 2",
"Grille polaire 1",
"Grille polaire 2",
},
script = "Nearest_Stars.celx"
}

There is one problem, however. After the addon is turned off by toggling the script for the 3rd time, the grids and lines and cmod stars all go away as they should. When I check the Render menu in Celestia, nebulae has been turned off, as it should. However, even though the script is over, if I toggle nebulae back on through the Celestia Render menu, the polar grid and lines reappear. If looks like Celestia loads the grid/line textures once the script is activated, and will not unload them when the script is done, even if I press the [esc] key.

That is a problem if anyone wants to continue using Celestia after viewing your addon. The polar grid and blue lines should not reappear, once the script is over.

Is there any way to correct this?

Frank

Avatar
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Re: New Star Map (21 nearer stars from Sol)

Post #23by Cham » 20.12.2009, 15:22

Frank,

I don't understand your last problem. I don't have it at all. My script works perfectly as it should.

Since I don't use the LUA Tools, I can't help you there.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

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

Re: New Star Map (21 nearer stars from Sol)

Post #24by Vincent » 20.12.2009, 15:36

Frank,

Can you please provide your version of the script so that I can help.
@+
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

Avatar
fsgregs
Posts: 1307
Joined: 07.10.2002
With us: 22 years 1 month
Location: Manassas, VA

Re: New Star Map (21 nearer stars from Sol)

Post #25by fsgregs » 20.12.2009, 18:55

Vincent and Cham:

OK, I have determined that the addon works fine by itself and when not in use with Lua Edu Tools. Once the script has been clicked 3 times, the grids and lines and stars disappear and stay turned off, even if nebula is being rendered.

When the addon is running in Lua Edu Tools as an addon, and is activated via the "Set Addon Visability" menu, a minor problem appears. Here is what happens:

1st toggle in addon box - places a check in the addon checkbox and level 1 of the 3 part script is activated. If I turn on the rendering of Nebula before I run the addon, then the stars, grid and lines are visible and the addon looks great. However, if Celestia starts without nebula initially being rendered, then the grid and lines are not visible until I use the render menu to activate nebulae. (I fixed this with a simple addition to the script to add celestia:setrenderflags { nebulae = true } in level 1 of the script)

2nd toggle in addon box - check is removed from checkbox. Grid and lines disappear but addon cmod stars remain. Nebula is still being rendered. OK - no problem

3rd toggle in addon box - check reappears in checkbox. Level two of addon script is now active. Stars, gird and lines visible. So far, so good.

4th toggle in addon box - check is removed from checkbox. Grid and lines again disappear, but addon cmod stars remain. Still no problem. Nebula is still being rendered.

5th toggle in addon box - check reappears in checkbox. Level 3 of script activated. All stars, lines and grids turn off. Addon is now inactive. Everything looks fine, even through Nebula is still being rendered. This is what a user would encounter if running the script without Lua Tools. The problem is ... the addon checkbox in the Lua tools menu is still checked. By clicking the box that 5th time to activate level 3 of the script, the script turned off fine, but the box remains checked. It is confusing because it shows the addon active, when it is not.

6th toggle in addon box - check disappears now but the grid and lines reappear (without the stars). It looks like the addon is partially running again.

What we need in the script is a way to turn off that last check box when the addon is being used in Lua Tools, without reactivating the polar grid and lines.

I tried adding a line to the 3rd section of the script to turn off nebulae rendering after the 3rd layer of script has been run. That worked OK in that I was able to click the addon box a 6th time and turn off the checkbox and also keep the grid and lines from reappearing. Nebulae was no longer being rendered in the render menu. However, as soon as nebulae was rendered again, the grid and lines from this addon reappeared, even though the script was over. Obviously, my approach is not correct.

Vincent, any help you can provide would be helpful to turn off the checkbox in lua tools with a sixth click, without restarting part of the script up again.

I've attached Cham's original script with my single line item to render nebulae when the script first runs.

Frank

Hrv123
Posts: 1
Joined: 27.10.2009
With us: 15 years 1 month

Re: New Star Map (21 nearer stars from Sol)

Post #26by Hrv123 » 10.01.2010, 11:46

Is this map grid addon centered on Solar system only or if I move my standing point to some other this star grid will be redone for new surroundings?

Great addon!
and sorry for my bad English.


Return to “Add-on development”