Is it possible to toggle Label/Visibility for an Object?

All about writing scripts for Celestia in Lua and the .cel system
Topic author
Zarius
Posts: 9
Joined: 02.01.2005
With us: 19 years 10 months
Location: Brisbane, Australia

Is it possible to toggle Label/Visibility for an Object?

Post #1by Zarius » 26.01.2005, 17:37

Hi,

The subject line sums it up, just wondering if it is possible to show a label for one particular object (say m33) rather than all objects (eg. galaxies) as sometimes there are a lot of labels in that class you might not want to show (eg. you've got the extra galaxies files - 1800 or so of them). This can be handy for touring scripts and anywhere you want to point out one particular object - in additional to the option of marking it (and to reduce confusion when marking multiple objects)..

A work-around could be to use the print command at a particular location on the screen, but this has many disadvantages: namely not neccessarily knowing where the object is & only being able to have one string printed on the screen at once.


Similar in concept - can one show/hide a particular object rather than a whole class of them? Though I can't think of a particular use at the moment, I'm sure this could be handy in some circumstances.

Thanks,
Zarius.

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

Post #2by Vincent » 26.01.2005, 21:04

I've asked exactly the same question a week ago and i didn't get any answer... :cry:

@+
Vincent
@+
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

Bob Hegwood
Posts: 1048
Joined: 19.10.2003
With us: 21 years 1 month
Location: Germantown, Ohio - USA

Post #3by Bob Hegwood » 26.01.2005, 23:06

I don't believe that that capability yet exists in Celestia...

However, you can also get creative with your marking symbols. You can use
the number 1 for your first mark, the number 2 for your second, etc...

You can also use different letters of the alphabet to differentiate the
different objects you're trying to point out.

Maybe that helps?

Take care, Bob
Bob Hegwood
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.0 Pre6 FT1

Topic author
Zarius
Posts: 9
Joined: 02.01.2005
With us: 19 years 10 months
Location: Brisbane, Australia

Post #4by Zarius » 27.01.2005, 10:09

Thanks Bob,

Using numbers and letters could be a handy work-around at times (btw: according to documentation I thought the marking symbols could only be set to 'triangle', 'x', 'diamond', etc? I guess using just "b", etc works? I'll have to try it when I get home :)), but I'd really prefer to have the actual label :)

Since it doesn't seem that it's there, I'll dig around the source code and see if I can put it in there (and perhaps submit a patch for perusal) - I'm thinking of adding it in celx as object:mark(), object:unmark() ( or object:mark(true/false) ) and object:visible(true/false) ( or object:show(), object:hide() ).

Anyway, I'll have a play with this later on - don't hold your breath, I haven't got the source code to compile properly yet :)

--
Zarius.

Bob Hegwood
Posts: 1048
Joined: 19.10.2003
With us: 21 years 1 month
Location: Germantown, Ohio - USA

Post #5by Bob Hegwood » 27.01.2005, 15:41

Sorry Zarius...

I was completely wrong about that capability.

As the documentation states, you can only use the following in order to mark
objects:

* diamond (default)
* plus
* square
* triangle
* x

When I tried to do what I told you to do, all I got were diamonds.

Now I know I'm Brain-Dead... I could have sworn that I did use
letters and numbers in the past sometime though.

Again, sorry for the bad advice. Maybe we could add this to the feature
requests topic?

Take care, Bob
Bob Hegwood

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.0 Pre6 FT1


Return to “Scripting”