From 623dc0fa8cbd9473830a1786f6d49fa808a09439 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Sun, 05 May 2019 14:06:12 -0400
Subject: [PATCH] Rename Grafreed

---
 Mocap.java |   39 ++++++++++++++++++++++++++++-----------
 1 files changed, 28 insertions(+), 11 deletions(-)

diff --git a/Mocap.java b/Mocap.java
index 0bbe7d9..54415a3 100644
--- a/Mocap.java
+++ b/Mocap.java
@@ -921,7 +921,7 @@
 //                    //GetFileRoot();
                   
                     // sept 2014: //
-                    GrafreeD.RENDERME = 3; // patch for Merge objects
+                    Grafreed.RENDERME = 3; // patch for Merge objects
                     float[] thedata = bvh.animation.getBoneData(0);
                     
                     os.x = (float) (path.get(i).toParent[3][0]); // - thedata[frame*6]);
@@ -1566,7 +1566,7 @@
 
                         lastsoundtime = Globals.framecount;
                         
-                        GrafreeD.hassound = true;
+                        Grafreed.hassound = true;
                     }
 //                    else
 //                        System.out.println("skipped");
@@ -3299,23 +3299,40 @@
 //            SetPositionDelta(false, true, false); // ?? false);
             {
                 if (support == null)
-                    ObjEditor.LoadBVHFile(fullname, this, false, beginframe, lastframetest);
+                {
+                    if (new File(fullname).exists())
+                            ObjEditor.LoadBVHFile(fullname, this, false, beginframe, lastframetest);
+                    else
+                    {
+                            SetGlobalTransform();
+                            Rewind();
+                            Fade();
+                    }
+                }
                 else
                 {
-                    try
-                    {
+//                    try
+//                    {
                         bvh = ((Mocap)support.get(mocapsupport++ % support.Size())).bvh;
 
                         // SetPositionDelta(false, true, true, true);
                         LoadData();
                         Rewind();
                         Fade();
-                    }
-                    catch (Exception e)
-                    {
-                        e.printStackTrace();
-                        ObjEditor.LoadBVHFile(fullname, this, false, beginframe, lastframetest);
-                    }
+//                    }
+//                    catch (Exception e)
+//                    {
+//                            System.err.println("An error occured while loading data. Use fallback by loading the file.");
+//                        //e.printStackTrace();
+//                            try
+//                            {
+//                                    ObjEditor.LoadBVHFile(fullname, this, false, beginframe, lastframetest);
+//                            }
+//                            catch (Exception e2)
+//                            {
+//                                    System.err.println("Motion file not found: " + fullname);
+//                            }
+//                    }
                 }
             }
             

--
Gitblit v1.6.2