Skip to content

Commit 6fafb28

Browse files
authored
Merge pull request #2203 from opensim-org/visualizer_no_opensim_home
Do not search OPENSIM_HOME to find simbody-visualizer.
2 parents 398545a + d8312df commit 6fafb28

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ programmatically in MATLAB or python.
215215
its properties are updated during scaling. (PR #1994)
216216
- The source code for the "From the Ground Up: Building a Passive Dynamic
217217
Walker Example" was added to this repository.
218+
- OpenSim no longer looks for the simbody-visualizer using the environment
219+
variable `OPENSIM_HOME`.
218220

219221
Documentation
220222
--------------

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)