Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function call from shell to recover camera parameters for scripting #1511

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add function call from shell to recover camera parameters for use in …
…scripts
aymanhab committed May 22, 2024
commit 3c370666d5a3e89ca7a2b988ccbda3d5939597a1
5 changes: 5 additions & 0 deletions Gui/opensim/scriptingShell/src/org/opensim/console/gui.java
Original file line number Diff line number Diff line change
@@ -482,4 +482,9 @@ static public void setVisualizerOption(String key, String value){
msg.put("data", option);
sendVisulaizerMessage(msg);
}
static public void getCameraInfo() {
JSONObject msg = new JSONObject();
msg.put("Op", "getCameraParams");
sendVisulaizerMessage(msg);
}
}
1 change: 1 addition & 0 deletions Gui/opensim/view/src/org/opensim/view/pub/ViewDB.java
Original file line number Diff line number Diff line change
@@ -1367,6 +1367,7 @@ private void handleJson(JSONObject jsonObject) {
double rendertimeAverage = ((Double) jsonObject.get("totalTime")) / ((Long) jsonObject.get("numFrames"));
OpenSimLogger.logMessage(msg + "FPS: " + (int) 1000 / rendertimeAverage + "\n", OpenSimLogger.INFO);
}
OpenSimLogger.logMessage(jsonObject.toString(), OpenSimLogger.INFO);
return;
}
if (msgType.equalsIgnoreCase("transforms")) {