Script Menu

Discussion forum for Celestia developers; topics may only be started by members of the developers group, but anyone can post replies.
Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #21by Cham » 30.05.2007, 17:11

As I already told to Dirkpitt by private email, this new scripts menu is really wonderfull. I love it as it is and, IMHO, don't need anything more for the scripts menu (I don't think I would use the scripts browser if there was any). 8)

Now, what is the utility to leave the Demo script in the "Celestia" menu ? I suggest that it is removed from there (and its "D" shortcut also removed), and the demo script placed in the new scripts folder.

My students were frequently hiting "D" by mistake (since it's close to the F and G shortcuts), and that was very confusing to them : they don't remember that they can cancel a script using the "ESCAPE" key. However, despite the students frequent mistake, the "D" shortcut could be used for something more important than the demo script.
"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!"

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

Post #22by ElChristou » 30.05.2007, 17:38

I agree with Cham, the run demo item should be removed, and now I also find the "run script" item is useless...
Image

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

Post #23by Cham » 30.05.2007, 17:43

ElChristou wrote:and now I also find the "run script" item is useless...


You mean "Open script ..." ?

I don't agree here (if it's what you were talking about). Sometimes, I have some experimental scripts on my desktop that I want to use (without going to the desktop and double-clicking on it). So the "Open script..." menu item is usefull.
"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!"

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

Post #24by ElChristou » 30.05.2007, 18:04

Cham wrote:
ElChristou wrote:and now I also find the "run script" item is useless...

You mean "Open script ..." ?

I don't agree here (if it's what you were talking about). Sometimes, I have some experimental scripts on my desktop that I want to use (without going to the desktop and double-clicking on it). So the "Open script..." menu item is usefull.


Right.
Image

Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #25by chris » 30.05.2007, 19:54

Cham wrote:My students were frequently hiting "D" by mistake (since it's close to the F and G shortcuts), and that was very confusing to them : they don't remember that they can cancel a script using the "ESCAPE" key. However, despite the students frequent mistake, the "D" shortcut could be used for something more important than the demo script.


I agree that the scripts menu makes the demo obsolete. The demo should be moved to the scripts directory and the D shortcut removed. Anyone want to volunteer to write the new official demo scripts? I think that the current one is very dated.

--Chris

Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #26by chris » 30.05.2007, 19:55

dirkpitt wrote:I added a Scripts menu to the OS X version. Currently it is only in my unofficial builds.

I decided to make the behaviour of the menu basically the same as the Windows version for now (i.e., Title is displayed if available, and subfolders are not scanned). What do you guys think?


Thank you for implementing this in the OS X version. It's very easy to change the code to scan subfolders of the scripts directory if people want that.

--Chris

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

Post #27by Cham » 30.05.2007, 20:01

chris wrote:Thank you for implementing this in the OS X version. It's very easy to change the code to scan subfolders of the scripts directory if people want that.


That could be very usefull. I personally have a subfolder full of scripts I rarely use. Could be very handy to have that subfolder to be shown in the scripts menu as well.

Sub directories could also help organising the scripts menu with various subjects (planets scripts, galactic scripts, etc).

I'm still experimenting with the scripts menu right now. It's working very well.
"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
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 20 years 1 month

Post #28by dirkpitt » 30.05.2007, 23:43

Cham wrote:
chris wrote:It's very easy to change the code to scan subfolders of the scripts directory if people want that.

That could be very usefull. I personally have a subfolder full of scripts I rarely use. Could be very handy to have that subfolder to be shown in the scripts menu as well.


Ok, I'll try that in my next build. Subfolders would show up as submenus.

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

Post #29by ElChristou » 31.05.2007, 00:33

The tag -- Title: is really cool, but seems to not be supported by cel script; someone confirm? (the tag is recognized by the menu but breack the script)
Image

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

Post #30by Cham » 31.05.2007, 00:35

ElChristou wrote:The tag -- Title: is really cool, but seems to not be supported by cel script; someone confirm? (the tag is recognized by the menu but breack the script)


I confirm this. The tag info is appearing in the menu, but the cel isn't working anymore. Removing the tag info makes the script to work again.
"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!"

Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #31by chris » 31.05.2007, 02:13

Cham wrote:
ElChristou wrote:The tag -- Title: is really cool, but seems to not be supported by cel script; someone confirm? (the tag is recognized by the menu but breack the script)

I confirm this. The tag info is appearing in the menu, but the cel isn't working anymore. Removing the tag info makes the script to work again.


The problem is the --. You need to use .cel style comments, not Lua style comments. So instead of

Code: Select all

-- Title: My Script


use:

Code: Select all

# Title: My Script


--Chris

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

Post #32by Cham » 31.05.2007, 02:20

Haaa, yes. It works now. Thanks Chris.
:oops:
"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!"

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

Post #33by ElChristou » 31.05.2007, 02:21

Ok!
Image

starfleetengineer
Posts: 41
Joined: 18.01.2007
With us: 17 years 10 months

Post #34by starfleetengineer » 31.05.2007, 11:33

Cham wrote:...the "D" shortcut could be used for something more important than the demo script.
I have long since remapped the "D" key to invoke the Warpdrive... (because D stands for "Drive" of course!... not "Demo"!. :lol:

Another handy use of the "D" key is to quickly run a script to reset FOV to a default value (in my case 35 degrees), as it can often change with accidental keystrokes or window maximising or minimising.
"Once you're in Earth orbit you're half way to almost anywhere in the Universe" - Robert Heinlein

CLICK HERE TO DOWNLOAD THE WARPDRIVE

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

Post #35by ElChristou » 31.05.2007, 13:07

chris wrote:...The demo should be moved to the scripts directory and the D shortcut removed. Anyone want to volunteer to write the new official demo scripts? I think that the current one is very dated.


Unfortunatly I'm unable to do that, but what would be cool is to use Toti's B-spline to have some really smooth displacement around planets...

Also a little look before returning home on the large scale structure of the galaxies would be welcome...
Image

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

Post #36by Vincent » 31.05.2007, 18:46

I can give it a try, but first, we should come to an agreement about the synopsis. As suggested by Chris, the script shouldn't ignore a view of the galaxies at large scale. Any other suggestions ?
@+
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
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #37by t00fri » 31.05.2007, 19:05

starfleetengineer wrote:...
Another handy use of the "D" key is to quickly run a script to reset FOV to a default value (in my case 35 degrees), as it can often change with accidental keystrokes or window maximising or minimising.


A long long time ago I implemented the middle mouse key to toggle between the actual and the default FoV. Try it, it still works ;-)

It's much more handy than some D key...

Bye Fridger
Image

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #38by t00fri » 31.05.2007, 19:08

Is it really true that Linux is now 'behind' as to the script menue...Wow.


Bye Fridger
Image

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

Post #39by ElChristou » 31.05.2007, 19:11

Vincent wrote:I can give it a try, but first, we should come to an agreement about the synopsis. As suggested by Chris, the script shouldn't ignore a view of the galaxies at large scale. Any other suggestions ?



What about something simple, no text, just to show what Celestia is able to do?

The demo could star near earth on dark side (kind what's the hell is this? all is dark, nothing to see?), then when the Sun appears, a simple, long zoom out, passing near various bodies: sapcecraft (ISS), asteroid, planets, stars (with exo planets) then Milky Way, local group, ending on a general view of the deepsky catalog, a few seconds of rotation, then a quick come back to earth and stop...

This could be nice if the observer trajectory, speed, and PoV are carefully chossen...
Image

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #40by Christophe » 31.05.2007, 19:15

t00fri wrote:Is it really true that Linux is now 'behind' as to the script menue...Wow.


Gna gna gna...

But the Windows GUI uses the main script directory which is normaly not the one used by a Linux user, so the adaptation would require a bit of refinement, may be scanning all the extrasdirs for scripts? or adding a scriptdir config option?
Christophe


Return to “Ideas & News”