Hi There,
I'm looking for a script command to mark or unmark some features like a user can do through the "Render" -> "Locations" -> "Label Features" menu.
What command allows to do that in a script ?
I tried with unmarkall() and set labels stuff, but it doesn't work the way I want.
Thanks for your suggestions.
About labels
-
Topic authorguillaume_2k3
- Posts: 8
- Joined: 02.05.2005
- With us: 19 years 6 months
-
- Posts: 164
- Joined: 18.03.2004
- Age: 63
- With us: 20 years 8 months
- Location: Victoria, BC Canada
If you are referring to .cel scripts, the command you want is mark.
For .celx scripts, you should use the object:mark() method.
Exactly what did you try? And how is it that you wanted it to work?
For .celx scripts, you should use the object:mark() method.
guillaume_2k3 wrote:I tried with unmarkall() and set labels stuff, but it doesn't work the way I want.
Exactly what did you try? And how is it that you wanted it to work?
Clive Pottinger
Victoria, BC Canada
Victoria, BC Canada
Hello Guillaume,
you can try this:
http://asolignac.free.fr/celestia/the_marker_beta.celx.txt
It's a first version, but it works.
bugs/suggestions from anyone else are welcome
Tu es fran?§ais au fait ?
Amaury
you can try this:
http://asolignac.free.fr/celestia/the_marker_beta.celx.txt
It's a first version, but it works.
bugs/suggestions from anyone else are welcome
Tu es fran?§ais au fait ?
Amaury
Just thought I'd mention that the MARK function will not work within
either CEL or CELX if the location you're trying to mark is not referenced
somewhere in an accessible locations .SSC file.
In other words, if you do not have a MarsMoonLocs.ssc file on your system
to describe where the locations on Phoebe and Deimos are actually
positioned on the moons, then neither a label display nor a mark will work.
FYI.
either CEL or CELX if the location you're trying to mark is not referenced
somewhere in an accessible locations .SSC file.
In other words, if you do not have a MarsMoonLocs.ssc file on your system
to describe where the locations on Phoebe and Deimos are actually
positioned on the moons, then neither a label display nor a mark will work.
FYI.
Brain-Dead Bob
Windows XP-SP2, 256Meg 1024x768 Resolution
Intel Celeron 1400 MHz CPU
Intel 82815 Graphics Controller
OpenGL Version: 1.1.2 - Build 4.13.01.3196
Celestia 1.4.1
Windows XP-SP2, 256Meg 1024x768 Resolution
Intel Celeron 1400 MHz CPU
Intel 82815 Graphics Controller
OpenGL Version: 1.1.2 - Build 4.13.01.3196
Celestia 1.4.1
-
- Posts: 691
- Joined: 13.11.2003
- With us: 21 years
Perhaps this is the best place to ask;
What I am looking for is a way of marking all the stars I am interested in.
I can easily find all these stars individually, but if I can make a script which marks them all at once it would be very useful.
If I modified amaury's script to include the stars I am interested in, how would I use it? What commands would work with such a script?
What I am looking for is a way of marking all the stars I am interested in.
I can easily find all these stars individually, but if I can make a script which marks them all at once it would be very useful.
If I modified amaury's script to include the stars I am interested in, how would I use it? What commands would work with such a script?
Hi eburacum,
thanks for your post. If you have any suggestion on the script, feel free to tell.
Regarding your question, you can try this (newer) version
it is ready for star support (a few code uncommenting is necessary, but it's all documented in the code).
The problem i ran into is that Celestia will crash (not enough memory ?) when trying to mark all stars, around 90,000 stars. So i disabled unconditional star marking in my script.
The other problem is that marking a big number of objects is very slow if a wait() is involved.
I tried removing the wait() command from my marking loop :
it works fine with a low number of objects (even 800 asteroids) and it draws all markings at once (looking cool )
Unfortunately, with stars, the script returns to Celestia after 5 seconds.
So, i tried to include a small increment function, looking at the elapsed script time, and inserting a wait() command only if 4 seconds have passed since the last one was issued.
I don't understand why, but it works three or four times, and then crashes...
If anyone has an idea...
Amaury
You should also have a look at toti's MarkMultiSpectralTypes.celx
It uses a specific function to scan stars to mark, while my script builds a table of all stars and runs through it (which is kind of dumb dumb, but was easier than rewriting most of my functions)
Another place to go is MostlyHarmless, a SQL client modified Celestia which allows you to issue SQL commands to select and mark stars. It looks like it is discontinued, but it is a great work...
thanks for your post. If you have any suggestion on the script, feel free to tell.
Regarding your question, you can try this (newer) version
it is ready for star support (a few code uncommenting is necessary, but it's all documented in the code).
The problem i ran into is that Celestia will crash (not enough memory ?) when trying to mark all stars, around 90,000 stars. So i disabled unconditional star marking in my script.
The other problem is that marking a big number of objects is very slow if a wait() is involved.
I tried removing the wait() command from my marking loop :
it works fine with a low number of objects (even 800 asteroids) and it draws all markings at once (looking cool )
Unfortunately, with stars, the script returns to Celestia after 5 seconds.
So, i tried to include a small increment function, looking at the elapsed script time, and inserting a wait() command only if 4 seconds have passed since the last one was issued.
Code: Select all
if (c:getscripttime() - last_wait > 4) then
wait()
last_wait = c:getscripttime()
end
I don't understand why, but it works three or four times, and then crashes...
If anyone has an idea...
Amaury
You should also have a look at toti's MarkMultiSpectralTypes.celx
It uses a specific function to scan stars to mark, while my script builds a table of all stars and runs through it (which is kind of dumb dumb, but was easier than rewriting most of my functions)
Another place to go is MostlyHarmless, a SQL client modified Celestia which allows you to issue SQL commands to select and mark stars. It looks like it is discontinued, but it is a great work...
-
Topic authorguillaume_2k3
- Posts: 8
- Joined: 02.05.2005
- With us: 19 years 6 months
amaury wrote:Hello Guillaume,
you can try this:
http://asolignac.free.fr/celestia/the_marker_beta.celx.txt
It's a first version, but it works.
bugs/suggestions from anyone else are welcome
Tu es fran?§ais au fait ?
Amaury
Oui, de Marseille, et toi ?
-
Topic authorguillaume_2k3
- Posts: 8
- Joined: 02.05.2005
- With us: 19 years 6 months
Thanks to everyone for your answers.
First of all, I'd like to apologize for this very late reply. I was very busy since the last months...anyway...
I don't make celx scripts, I just want to make a simple cel script that shows the "places names" onto a planet.
I tried to solve my problem with the mark{} method but I can't find further explanations to use this method as well...
I Just want to force Celestia to display the locations names onto a planet if the user didn't make it himself in the "parameters" menu.
I'm making a script about Apollo 11 mission and I don't want to show the sea of tranquility location using a small cross or something .. I'd like to show the place's name in green and the names of the closest areas appearing suddenly.
First of all, I'd like to apologize for this very late reply. I was very busy since the last months...anyway...
I don't make celx scripts, I just want to make a simple cel script that shows the "places names" onto a planet.
I tried to solve my problem with the mark{} method but I can't find further explanations to use this method as well...
I Just want to force Celestia to display the locations names onto a planet if the user didn't make it himself in the "parameters" menu.
I'm making a script about Apollo 11 mission and I don't want to show the sea of tranquility location using a small cross or something .. I'd like to show the place's name in green and the names of the closest areas appearing suddenly.
Hello Guillaume,
i found this document on DonG scripting pages. It is about marking objects, not labelling features of objects (cities, geological sites, etc).
I found nothing about labelling of planetary features in Cel scripts.
Will tell you if i find anything.
This is what you want to do, right ? Label moon features such as planitiae, crater names, landing sites, etc ?
Amaury
i found this document on DonG scripting pages. It is about marking objects, not labelling features of objects (cities, geological sites, etc).
I found nothing about labelling of planetary features in Cel scripts.
Will tell you if i find anything.
This is what you want to do, right ? Label moon features such as planitiae, crater names, landing sites, etc ?
Amaury
-
Topic authorguillaume_2k3
- Posts: 8
- Joined: 02.05.2005
- With us: 19 years 6 months
amaury wrote:Hello Guillaume,
i found this document on DonG scripting pages. It is about marking objects, not labelling features of objects (cities, geological sites, etc).
I found nothing about labelling of planetary features in Cel scripts.
Will tell you if i find anything.
This is what you want to do, right ? Label moon features such as planitiae, crater names, landing sites, etc ?
Amaury
Ok Thank you Amaury for the link, je verrai ca tout ? l'heure ? t??te repos?©e I'm just coming back from work and I have some stuff to do ...
And Yes, I wish I want to label features like cities, etc..
Thanks again.
There are two issues here. One issue is defining the locations, which is done in an ssc file. The other issue is turning the labels on and off, which I believe in CEL would be done with the "labels" command. But unfortunately, I don't think the "locations" keyword for that CEL command has been implemented yet.
- Hank
- Hank
-
Topic authorguillaume_2k3
- Posts: 8
- Joined: 02.05.2005
- With us: 19 years 6 months
hank wrote:There are two issues here. One issue is defining the locations, which is done in an ssc file. The other issue is turning the labels on and off, which I believe in CEL would be done with the "labels" command. But unfortunately, I don't think the "locations" keyword for that CEL command has been implemented yet.
- Hank
Ok so, Imagine I want to show "Budapest" on the earth map
I have the following lines in a ssc file :
Code: Select all
Location "Budapest" "Sol/Earth"
{
LongLat [ 19.0833 47.5 0 ]
Importance 354.31
Type "City"
}
Do you think it's possible to focus the camera above this city, with a bit of cel code ?
I agree, you may be true, there may be no implemention for city labels In Celestia scripting yet, but, I rather ask to be sure.
Again, Thanks
-
Topic authorguillaume_2k3
- Posts: 8
- Joined: 02.05.2005
- With us: 19 years 6 months