.. | .. |
---|
2267 | 2267 | } |
---|
2268 | 2268 | |
---|
2269 | 2269 | if (!smoothed) |
---|
2270 | | - for (int i=1; --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 | |
---|