Normand Briere
2019-06-09 79d0f9a45d36656051a77a7b0837aa0318f81ee5
Mocap.java
....@@ -484,6 +484,12 @@
484484 {
485485 Object3D hip = get(0);
486486
487
+ if (toParent == null)
488
+ {
489
+ toParent = LA.newMatrix();
490
+ fromParent = LA.newMatrix();
491
+ }
492
+
487493 LA.matConcat(toParent, hip.get(0).toParent, matrix);
488494
489495 mocaporigin.x = matrix[3][0];
....@@ -664,8 +670,8 @@
664670 double targetdirx;
665671 double targetdirz;
666672
667
- double goalposx = -20;
668
- double goalposz = -10;
673
+ double goalposx = 0; // -20;
674
+ double goalposz = 0; // -10;
669675
670676 boolean followpath;
671677
....@@ -921,7 +927,7 @@
921927 // //GetFileRoot();
922928
923929 // sept 2014: //
924
- GrafreeD.RENDERME = 3; // patch for Merge objects
930
+ Grafreed.RENDERME = 3; // patch for Merge objects
925931 float[] thedata = bvh.animation.getBoneData(0);
926932
927933 os.x = (float) (path.get(i).toParent[3][0]); // - thedata[frame*6]);
....@@ -1566,7 +1572,7 @@
15661572
15671573 lastsoundtime = Globals.framecount;
15681574
1569
- GrafreeD.hassound = true;
1575
+ Grafreed.hassound = true;
15701576 }
15711577 // else
15721578 // System.out.println("skipped");
....@@ -2797,7 +2803,8 @@
27972803 //if (bone._rotationEnabled)
27982804 if (//frame > 0 &&
27992805 !bone.skipmocap &&
2800
- !bone.name.contains("head") // &&
2806
+ !bone.name.contains("head") &&
2807
+ !bone.name.contains("Head") // &&
28012808 // !bone.name.contains("rFoot") &&
28022809 // !bone.name.contains("lFoot") &&
28032810 // !bone.name.contains("Pinky") &&
....@@ -3233,8 +3240,8 @@
32333240
32343241 // aout 2013 endframe = 0; // june 2013
32353242
3236
- //ResetZero();
3237
- setPose(frame);
3243
+ ResetZero();
3244
+ //setPose(frame);
32383245 }
32393246
32403247 static int mocapsupport = 0;
....@@ -3300,7 +3307,7 @@
33003307 {
33013308 if (support == null)
33023309 {
3303
- if (new File(fullname).exists())
3310
+ if (bvh == null && new File(fullname).exists())
33043311 ObjEditor.LoadBVHFile(fullname, this, false, beginframe, lastframetest);
33053312 else
33063313 {
....@@ -3889,17 +3896,22 @@
38893896 // if (firstframe)
38903897 // return;
38913898
3892
- if (!restarted && /*display.restartframe &&*/
3893
- Globals.isLIVE() && live && display.DrawMode() == display.SHADOW) // FUCK
3899
+ if (//!restarted && /*display.restartframe &&*/
3900
+ Globals.isLIVE() && live && (display.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW))
38943901 {
38953902 //display.restartframe = false;
38963903 restarted = true;
3904
+ //System.err.println("restarted = true");
38973905 Step();
38983906 }
38993907 else
39003908 {
3901
- if (Globals.isLIVE() && live && display.DrawMode() != display.SHADOW)
3909
+ //System.err.println("restarted");
3910
+ if (Globals.isLIVE() && live && display.DrawMode() != iCameraPane.SHADOW)
3911
+ {
39023912 restarted = false;
3913
+ //System.err.println("restarted = false");
3914
+ }
39033915 }
39043916
39053917 super.drawSelf(display, root, selected, blocked);