.cel scripts - unmark cmd modification?

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 4 months
Location: Colorado, USA (7000 ft)

.cel scripts - unmark cmd modification?

Post #1by don » 20.07.2003, 14:39

In .CEL scripting, when the user wants to "mark" certain objects, the first thing that needs to be done, aside from turning on Marking, is to clear ALL of the object-marks that are currently set.

But, there doesn't appear to be a way to do this, as the "unmark" command requires an object name.

The person writing the script does not know what specific objects are currently marked (by the user or by another script), so how can they be specified?

Possibilities:
* Add "all" as an "object" name to the existing unmark command.
* Add an "unmarkall" command.

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

Post #2by chris » 20.07.2003, 18:38

Don,

This is a very good suggestion . . . The celx scripting already has an unmarkall command. I just implemented unmarkall for .cel scripting as well; it will be in the next prerelease.

--Chris

Topic author
don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 4 months
Location: Colorado, USA (7000 ft)

Post #3by don » 20.07.2003, 21:54

Thank you Chris.

Would the following be a correct example?

Code: Select all

unmarkall {}

-Don

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

Post #4by chris » 20.07.2003, 22:04

Yes, that's all there is to it . . . no options at all for unmarkall.

--Chris

Topic author
don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 4 months
Location: Colorado, USA (7000 ft)

Post #5by don » 20.07.2003, 22:05

Thanks again Chris.


Return to “Development”