Normand Briere
2019-05-05 623dc0fa8cbd9473830a1786f6d49fa808a09439
Mocap.java
....@@ -921,7 +921,7 @@
921921 // //GetFileRoot();
922922
923923 // sept 2014: //
924
- GrafreeD.RENDERME = 3; // patch for Merge objects
924
+ Grafreed.RENDERME = 3; // patch for Merge objects
925925 float[] thedata = bvh.animation.getBoneData(0);
926926
927927 os.x = (float) (path.get(i).toParent[3][0]); // - thedata[frame*6]);
....@@ -1519,7 +1519,7 @@
15191519 // mywave = currentwave++;
15201520 // }
15211521 // sound
1522
- cVector eye = CameraPane.theRenderer.eyeCamera.location;
1522
+ cVector eye = Globals.theRenderer.EyeCamera().location;
15231523
15241524 // if (sourcenode.parent.parent != null)
15251525 // sourcenode.parent.parent.TransformToWorld(floor, tmp);
....@@ -1566,7 +1566,7 @@
15661566
15671567 lastsoundtime = Globals.framecount;
15681568
1569
- GrafreeD.hassound = true;
1569
+ Grafreed.hassound = true;
15701570 }
15711571 // else
15721572 // System.out.println("skipped");
....@@ -2267,7 +2267,7 @@
22672267 }
22682268
22692269 if (!smoothed)
2270
- for (int i=0; --i>=0;)
2270
+ for (int i=10; --i>=0;)
22712271 SmoothAnimData(); // much reduces shakiness
22722272
22732273 smoothed = true;
....@@ -3252,12 +3252,13 @@
32523252
32533253 int step = 1;
32543254
3255
+ // patch for running hare
32553256 if (speedup) // fev 2014
32563257 step *= 2; // 4;
32573258 if (rewind) // mars 2014
32583259 step *= 4;
32593260
3260
- if (CameraPane.FAST) // && !CameraPane.HOLD)
3261
+ //if (CameraPane.FAST) // && !CameraPane.HOLD)
32613262 step *= CameraPane.STEP;
32623263
32633264 //System.err.println("Step Mocap frame # " + frame);
....@@ -3298,23 +3299,40 @@
32983299 // SetPositionDelta(false, true, false); // ?? false);
32993300 {
33003301 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
+ }
33023312 else
33033313 {
3304
- try
3305
- {
3314
+// try
3315
+// {
33063316 bvh = ((Mocap)support.get(mocapsupport++ % support.Size())).bvh;
33073317
33083318 // SetPositionDelta(false, true, true, true);
33093319 LoadData();
33103320 Rewind();
33113321 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
+// }
33183336 }
33193337 }
33203338
....@@ -3496,6 +3514,7 @@
34963514 // filters out bad input data
34973515 void FilterAnimData()
34983516 {
3517
+ new Exception().printStackTrace();
34993518 System.exit(0);
35003519
35013520 float[] data; // = bvh.animation.getBoneData(0);