Skip to content

Commit 0c2fcda

Browse files
committed
Do not search OPENSIM_HOME to find simbody-visualizer.
In 3.3, the OpenSim installer set the OPENSIM_HOME environment variable and this was used on Windows to find the simbody-visualizer executable. In 4.0, OpenSim's installer no longer sets the OPENSIM_HOME environment variable, which means that this environment variable may point to a pre-existing OpenSim installation. If OpenSim searches OPENSIM_HOME for simbody-visualizer, then it's likely that OpenSim 4.0 will find an incompatible simbody-visualizer from 3.3.
1 parent f5b1a43 commit 0c2fcda

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

OpenSim/Simulation/Model/ModelVisualizer.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -227,19 +227,11 @@ void ModelVisualizer::addDirToGeometrySearchPaths(const std::string& dir) {
227227
void ModelVisualizer::createVisualizer() {
228228
_model.updMatterSubsystem().setShowDefaultGeometry(false);
229229

230-
// Allocate a Simbody Visualizer. If environment variable
231-
// OPENSIM_HOME is set, add its bin subdirectory to the search path
232-
// for the SimbodyVisualizer executable. The search will go as
230+
// Allocate a Simbody Visualizer. The search will go as
233231
// follows: first look in the same directory as the currently-
234-
// executing executable; then look in the $OPENSIM_HOME/bin
235-
// directory, then look at all the paths in the environment
232+
// executing executable; then look at all the paths in the environment
236233
// variable PATH, then look in various default Simbody places.
237234
Array_<String> searchPath;
238-
if (SimTK::Pathname::environmentVariableExists("OPENSIM_HOME")) {
239-
searchPath.push_back(
240-
SimTK::Pathname::getEnvironmentVariable("OPENSIM_HOME")
241-
+ "/bin");
242-
}
243235
if (SimTK::Pathname::environmentVariableExists("PATH")) {
244236
const auto& path = SimTK::Pathname::getEnvironmentVariable("PATH");
245237
std::string buffer{};

0 commit comments

Comments
 (0)