Page 1 of 1

Here's a NEW one for ya!

Posted: 08.02.2004, 01:39
by Bob Hegwood
Me again,

Let's see if I can explain this correctly the FIRST time. :roll:

I'm using the following to locate various features on each of the moons of Saturn within a script I'm writing.

unmark {object "Sol/Saturn/Object1"}
renderflags {set "markers"}
mark {object "Sol/Saturn/Object1" size 15 color [0 0 0] symbol "x"}
wait {duration 5.0}
unmark {object "Sol/Saturn/Object1"}
..
..
more code
..
..

This works fine until I GOTO another object, and I find that the object is already MARKED with a red diamond.

Doesn't matter of I use...

renderflags {clear "markers"}
unmark {object "Sol/Saturn/Object2"}

when I turn the markers back on with:

renderflags {set "markers"}

Object2 is marked with a red diamond. Now before you go jumping all over me about unmarking objects, prior to rendering the marks, believe me, I have TESTED this problem all day.

FYI though, I found a weird solution... In order to keep the next moon I display from having a red diamond on it, I simply use an unmarkall {} AFTER the next object has been selected. See the example below for the FIX to the problem.

select {object "Sol/Saturn/Tethys"}
unmarkall {} <-------------- Placing this here removes any mark from
center {time 5.0} ---------- Tethys. Anything else has NO effect.
wait {duration 5.0}
follow {}
goto {time 5.0 distance 5.0}

Just thought I'd let someone know about it. And, I already *know* that I'm a pain in the ass, so let's just leave it at that, okay? :lol:

Thanks for your kind attention, Bob

Posted: 08.02.2004, 05:02
by selden
Bob,

That's not a bug, it's an intentional feature.

When markers are enabled, the currently selected object is marked with a red diamond.

Posted: 08.02.2004, 14:02
by Bob Hegwood
selden wrote:Bob,

That's not a bug, it's an intentional feature.

When markers are enabled, the currently selected object is marked with a red diamond.


But if that's the case then Selden,

Why can't I simply unmark {object "Sol/Saturn/Tethys"} before I turn the markers back on? I have tried to do this, but it simply doesn't work.

This is the same approach I've BEEN using in my other scripts, and it worked before. Come to think of it, I've NEVER seen the red diamond show up in my other scripts. Is this a pre-existing intentional feature?, or is this new to 1.3.2 Pre1?

Sorry, just trying to understand.

Thanks, Bob

Posted: 08.02.2004, 14:26
by selden
Bob,

Markers always have worked that way for me, ever since they were added to Celestia.

Whenever "Render" "View Options" "Markers" is checked, a red diamond appears in the center of the currently selected object -- in the center of the object that's named in the upper left corner of Celestia's window.

There's never been a way to turn that off and have other markers visible, so far as I know. I think it'd be a reasonable feature request, though.

As best I can tell from a quick look at your JupiterTour script, you've usually selected an object or location, enabled markers, and then immediately provided your own "permanent" marker. That would have replaced the default "temporary" red diamond, so you wouldn't have had a chance to see it.

By "permanent", I mean a marker that would be visible whether or not an object is selected. The "temporary" marker is the one that's visible only while an object is selected and only if the selected object has no "permanent" marker associated with it.

Posted: 08.02.2004, 15:09
by Bob Hegwood
Selden,

Thanks again for the excellent advice. I *think* I understand what you're saying.

It's just that I never ran into this problem before. As shown in my original post, however, I *have* figured out how to get around it. :wink:

I think that the markers are being shown in THIS script because I'm using a different approach this time. I've used renderflags {set "markers"} only at the beginning of the script, rather than trying to clear and set them for each visit to an object.

Thanks once again for the education.

Honestly, one of these days I'll know what I'm doing here. Image

Take care, Bob

Posted: 08.02.2004, 15:50
by Harry
selden wrote:Whenever "Render" "View Options" "Markers" is checked, a red diamond appears in the center of the currently selected object -- in the center of the object that's named in the upper left corner of Celestia's window.

There's never been a way to turn that off and have other markers visible, so far as I know. I think it'd be a reasonable feature request, though.

You can remove a marker from the currently selected object, but the marker will reappear when you reselect the object (after having another object selected). Goto-commands implicitly select an object.

If the context menu doesn't offer the "Unmark" command, try adding another marker first and and then use Unmark. Of course you can directly remove it if you are using a script.

Harald

Posted: 08.02.2004, 19:17
by don
Hi Guys, Johnny come lately here, sorry.

Bob Hegwood wrote:I think that the markers are being shown in THIS script because I'm using a different approach this time. I've used renderflags {set "markers"} only at the beginning of the script, rather than trying to clear and set them for each visit to an object.

Bingo.

Since Celestia displays a red diamond marker for the currently selected object (when render markers is active), the only way to *not* show this marker is to not render markers, until your specific marker is defined and you are ready to display it.

Cheers,

-Don G.

Posted: 08.02.2004, 19:25
by Bob Hegwood
don wrote:Bingo.

Since Celestia displays a red diamond marker for the currently selected object (when render markers is active), the only way to *not* show this marker is to not render markers, until your specific marker is defined and you are ready to display it.


Or, you can use the fix I've already defined... :wink:

Thanks, Don.

Posted: 08.02.2004, 19:49
by don
Yes, of course, and using

unmark {object "Sol/Saturn/Tethys"}

directly after the select command should work also. Watch out Bob, you're gettin' pretty smart! 8)

Selden's idea for an enhancement is a good one. To have an "Automatically show marker on selected object" flag. with the default being Yes, so it doesn't "break" any existing scripts.

-Don G.

Posted: 08.02.2004, 20:05
by Bob Hegwood
don wrote: Yes, of course, and using

unmark {object "Sol/Saturn/Tethys"}

directly after the select command should work also.


Ah... But *that* was my point.

Using unmark {object "Sol/Saturn/Tethys"} did NOT work, and that's why I thought it was a bug. Of course, this was prior to placing my OWN mark on the moon, and I ended up seeing both the red diamond AND the green "X" at the same time. When the script told the green "X" to go away, the red diamond was still there.

That's okay, I'm happy that it works the way it should now.

Have I explained okay now? Sheesh! My head hurts.

Thanks, Bob

Posted: 08.02.2004, 20:43
by don
Hi Bob,

:oops: Sorry I'm so dense today. Woke up with a headache and should have just played backgammon or something. :(

I'm glad YOU know what you're doing! :D ... Obviously, the unmarkall command is doing the one extra step of unmarking the automatically marked object.

I'll go back to bed now ... :lol:

-Don G.

Posted: 08.02.2004, 23:01
by Harry
Bob Hegwood wrote:Of course, this was prior to placing my OWN mark on the moon, and I ended up seeing both the red diamond AND the green "X" at the same time. When the script told the green "X" to go away, the red diamond was still there.

Hm, do I understand you right (obviously I didn't until now ;): There were TWO markers on the same body? If so, this is a bug, at least there is code to specifically avoid adding a second label to a body.

Any chance you have a second definition for that body somewhere (i.e. the body actually exists twice in celestia)?

Harald

Posted: 09.02.2004, 00:42
by don
Hi Bob,

I just tried the following code, and all I see is a black "X". I never see a red diamond.

Code: Select all

{
renderflags {set "markers"}
select { object "Earth" }
center {}
goto {}
mark {object "Earth" size 15 color [0 0 0] symbol "x"}
wait {duration 15.0}
unmark {object "Earth"}

}


Do you have a working snippet of code that shows the problem you reported, so we can try and duplicate it.

-Don G.

Posted: 09.02.2004, 03:59
by Bob Hegwood
Harry wrote: Any chance you have a second definition for that body somewhere (i.e. the body actually exists twice in celestia)?


I looked, Harry, and as far as I can tell there is but a SINGLE definition of Tethys within the solarsys.ssc file. No other definitions in any extras file.

Thanks, Bob

Posted: 09.02.2004, 04:06
by Bob Hegwood
don wrote: Do you have a working snippet of code that shows the problem you reported, so we can try and duplicate it.


Aw Hell, Don...

I've changed the code so many times now that I don't have a clue as to how to reproduce it at this point.

Let me get some sleep, and I'll see if I can set it up the way it was again tomorrow. Yawn!

I can *assure* you though, that I was seeing BOTH my mark, and the red triangle at the same time. When I'm awake again, I'll try to remove the unmarkall command I used to fix the problem, and I'll see if that will get you what you want.

See ya tomorrow.

Thanks, Bob

Posted: 09.02.2004, 04:27
by don
Thanks Bob. It always helps to have a "working" (full code) example when running into scripting problems. I wasn't sure how to try and duplicate it on my end.

Nighty night. :P

-Don G.

Posted: 09.02.2004, 17:40
by Bob Hegwood
Well, you know what?

Now I can't reproduce the effect either. Sheesh!

The next time I see this problem, I'll save the code and print a picture of the screen for you.

Sorry, but I've changed the script so many times that I just can't figure out where the error went to. :cry:

Thanks, Bob

Posted: 09.02.2004, 18:35
by Bob Hegwood
Just for your further edification, Don...

I was using the following convention to mark/unmark objects on the moons:

renderflags {clear "markers"}
- goto code here -
unmark {object "Sol/Saturn/Tethys"}
unmark {object "Sol/Saturn/Tethys/Ajax"}
unmark {object "Sol/Saturn/Tethys/Penelope"}
renderflags {set "markers"}
mark {object "Sol/Saturn/Tethys/Ajax"}
wait {duration 5.0}
unmark {object "Sol/Saturn/Tethys/Ajax"}
- more code here -

That it as best as I can remember. Again, I'm sorry. The next time I'll gather all the data before I start whining. :wink:

By the way, all of the above becomes unnecessary when you use the unmarkall {} command. Much nicer.

Take care, Bob

Posted: 09.02.2004, 19:20
by don
Thanks for trying Bob.

Yes, the unmarkall command is very useful. It was added just a few months ago.

-Don G.