Assign keys for Show DEM and Pause Topography

Home Forums AR Sandbox Forum Assign keys for Show DEM and Pause Topography

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2538
    Cormac
    Participant

    I use Show DEM tool as a way to take the color out of the AR sandbox projection and talk about black and white topographic maps. I’m wondering if there is a way to assign this to a hotkey. The issue with Show DEM is that once I assign it, it asks me to open a file – I literally just exit that prompt and then it works to switch to black and white. There may be a more efficient way to program this function.

    In addition, I’m wondering how to code “pause topography”

    Thanks all – this forum has been very helpful so far!

    #2539
    Sean Robinson
    Participant

    We switch between full-color and white maps for the same reason, using the control pipe. This Switch texture water to lava post describes how to change colors. For white, create a .cpt file with the following values.

    -25.00 255 255 255
    25.0 255 255 255

    AFAICT, “Pause Topography” is not available for assignment to a key via the configuration files, but I could be wrong. If you are comfortable patching C++ source, the following diff will add a “pauseUpdates” control pipe command. This will toggle screen updates using the same algortihm the assigned key uses.

    --- a/Config.h
    +++ b/Config.h
    @@ -1335,6 +1337,9 @@ void Sandbox::frame(void) {
                         } else {
                             std::cerr << "Wrong number of arguments for rainStrength control pipe command" << std::endl;
                         }
    +                } else if (isToken(tokens[0], "pauseUpdates")) {
    +                    pauseUpdates = !pauseUpdates;
    +                    pauseUpdatesToggle->setToggle(pauseUpdates);
                     } else {
                         std::cerr << "Unrecognized control pipe command " << tokens[0] << std::endl;
                     }
    • This reply was modified 1 year ago by Sean Robinson. Reason: fix link to colormap help
    #2543
    Sean Robinson
    Participant

    Sorry, the patch I posted has a mistake. (The dangers of hand-editing a patch.) The following should cleanly apply.

    
    --- a/Sandbox.cpp
    +++ b/Sandbox.cpp
    @@ -1335,6 +1335,9 @@ void Sandbox::frame(void) {
                         } else {
                             std::cerr << "Wrong number of arguments for rainStrength control pipe command" << std::endl;
                         }
    +                } else if (isToken(tokens[0], "pauseUpdates")) {
    +                    pauseUpdates = !pauseUpdates;
    +                    pauseUpdatesToggle->setToggle(pauseUpdates);
                     } else {
                         std::cerr << "Unrecognized control pipe command " << tokens[0] << std::endl;
                     }
    
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.