.. | .. |
---|
921 | 921 | // //GetFileRoot(); |
---|
922 | 922 | |
---|
923 | 923 | // sept 2014: // |
---|
924 | | - GrafreeD.RENDERME = 3; // patch for Merge objects |
---|
| 924 | + Grafreed.RENDERME = 3; // patch for Merge objects |
---|
925 | 925 | float[] thedata = bvh.animation.getBoneData(0); |
---|
926 | 926 | |
---|
927 | 927 | os.x = (float) (path.get(i).toParent[3][0]); // - thedata[frame*6]); |
---|
.. | .. |
---|
1519 | 1519 | // mywave = currentwave++; |
---|
1520 | 1520 | // } |
---|
1521 | 1521 | // sound |
---|
1522 | | - cVector eye = CameraPane.theRenderer.EyeCamera().location; |
---|
| 1522 | + cVector eye = Globals.theRenderer.EyeCamera().location; |
---|
1523 | 1523 | |
---|
1524 | 1524 | // if (sourcenode.parent.parent != null) |
---|
1525 | 1525 | // sourcenode.parent.parent.TransformToWorld(floor, tmp); |
---|
.. | .. |
---|
1566 | 1566 | |
---|
1567 | 1567 | lastsoundtime = Globals.framecount; |
---|
1568 | 1568 | |
---|
1569 | | - GrafreeD.hassound = true; |
---|
| 1569 | + Grafreed.hassound = true; |
---|
1570 | 1570 | } |
---|
1571 | 1571 | // else |
---|
1572 | 1572 | // System.out.println("skipped"); |
---|
.. | .. |
---|
2267 | 2267 | } |
---|
2268 | 2268 | |
---|
2269 | 2269 | if (!smoothed) |
---|
2270 | | - for (int i=0; --i>=0;) |
---|
| 2270 | + for (int i=10; --i>=0;) |
---|
2271 | 2271 | SmoothAnimData(); // much reduces shakiness |
---|
2272 | 2272 | |
---|
2273 | 2273 | smoothed = true; |
---|
.. | .. |
---|
3252 | 3252 | |
---|
3253 | 3253 | int step = 1; |
---|
3254 | 3254 | |
---|
| 3255 | + // patch for running hare |
---|
3255 | 3256 | if (speedup) // fev 2014 |
---|
3256 | 3257 | step *= 2; // 4; |
---|
3257 | 3258 | if (rewind) // mars 2014 |
---|
3258 | 3259 | step *= 4; |
---|
3259 | 3260 | |
---|
3260 | | - if (CameraPane.FAST) // && !CameraPane.HOLD) |
---|
| 3261 | + //if (CameraPane.FAST) // && !CameraPane.HOLD) |
---|
3261 | 3262 | step *= CameraPane.STEP; |
---|
3262 | 3263 | |
---|
3263 | 3264 | //System.err.println("Step Mocap frame # " + frame); |
---|
.. | .. |
---|
3298 | 3299 | // SetPositionDelta(false, true, false); // ?? false); |
---|
3299 | 3300 | { |
---|
3300 | 3301 | if (support == null) |
---|
3301 | | - ObjEditor.LoadBVHFile(fullname, this, false, beginframe, lastframetest); |
---|
| 3302 | + { |
---|
| 3303 | + if (new File(fullname).exists()) |
---|
| 3304 | + ObjEditor.LoadBVHFile(fullname, this, false, beginframe, lastframetest); |
---|
| 3305 | + else |
---|
| 3306 | + { |
---|
| 3307 | + SetGlobalTransform(); |
---|
| 3308 | + Rewind(); |
---|
| 3309 | + Fade(); |
---|
| 3310 | + } |
---|
| 3311 | + } |
---|
3302 | 3312 | else |
---|
3303 | 3313 | { |
---|
3304 | | - try |
---|
3305 | | - { |
---|
| 3314 | +// try |
---|
| 3315 | +// { |
---|
3306 | 3316 | bvh = ((Mocap)support.get(mocapsupport++ % support.Size())).bvh; |
---|
3307 | 3317 | |
---|
3308 | 3318 | // SetPositionDelta(false, true, true, true); |
---|
3309 | 3319 | LoadData(); |
---|
3310 | 3320 | Rewind(); |
---|
3311 | 3321 | Fade(); |
---|
3312 | | - } |
---|
3313 | | - catch (Exception e) |
---|
3314 | | - { |
---|
3315 | | - e.printStackTrace(); |
---|
3316 | | - ObjEditor.LoadBVHFile(fullname, this, false, beginframe, lastframetest); |
---|
3317 | | - } |
---|
| 3322 | +// } |
---|
| 3323 | +// catch (Exception e) |
---|
| 3324 | +// { |
---|
| 3325 | +// System.err.println("An error occured while loading data. Use fallback by loading the file."); |
---|
| 3326 | +// //e.printStackTrace(); |
---|
| 3327 | +// try |
---|
| 3328 | +// { |
---|
| 3329 | +// ObjEditor.LoadBVHFile(fullname, this, false, beginframe, lastframetest); |
---|
| 3330 | +// } |
---|
| 3331 | +// catch (Exception e2) |
---|
| 3332 | +// { |
---|
| 3333 | +// System.err.println("Motion file not found: " + fullname); |
---|
| 3334 | +// } |
---|
| 3335 | +// } |
---|
3318 | 3336 | } |
---|
3319 | 3337 | } |
---|
3320 | 3338 | |
---|
.. | .. |
---|
3496 | 3514 | // filters out bad input data |
---|
3497 | 3515 | void FilterAnimData() |
---|
3498 | 3516 | { |
---|
| 3517 | + new Exception().printStackTrace(); |
---|
3499 | 3518 | System.exit(0); |
---|
3500 | 3519 | |
---|
3501 | 3520 | float[] data; // = bvh.animation.getBoneData(0); |
---|