Skip to content

Commit

Permalink
Merge pull request #64 from opensim-org/use_state_trajectory
Browse files Browse the repository at this point in the history
Enable motion loading/playback
  • Loading branch information
aymanhab authored Feb 21, 2017
2 parents 1db6113 + 8823768 commit e5c5cc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ private int classifyColumn(Model model, int columnIndex, String columnName)
Coordinate co = coords.get(i);
// GenCoord
String cName = co.getName();
if (cName.equals(columnName)){
if (cName.equals(columnName)||cName.equals(co.getAbsolutePathName())){
mapIndicesToObjectTypes.put(columnIndex, ObjectTypesInMotionFiles.GenCoord);
mapIndicesToObjects.put(columnIndex, co); //co.setValue();
return 1;
Expand Down
5 changes: 3 additions & 2 deletions Gui/opensim/view/src/org/opensim/view/motions/MotionsDB.java
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ public void loadMotionStorage(Storage newMotion, boolean primary, String filePat
* At least one genccord or marker (_tx?) in motion file/Storage
*/
boolean motionAssociationPossible(Model modelForMotion, Storage newMotion) {
/*
ArrayStr coordinateNames = new ArrayStr();
modelForMotion.getCoordinateSet().getNames(coordinateNames);
int numCoordinates = coordinateNames.getSize();
Expand All @@ -203,8 +204,8 @@ boolean motionAssociationPossible(Model modelForMotion, Storage newMotion) {
(newMotion.getStateIndex(markerNames.getitem(i)+"_TX")!=-1))
numUsedColumns++;
}

return (numUsedColumns>=1); // At least one column makes sense
*/
return (true); // At least one column makes sense
}

public void addMotion(Model model, Storage motion, Storage parentMotion) {
Expand Down

0 comments on commit e5c5cc6

Please sign in to comment.