Beispiel #1
0
        static void PopulateSkelCache(ref HierInfo skelRootInfo, UsdSkelCache skelCache)
        {
            //
            // Populate the UsdSkelCache.
            //
            var skelRoot = new UsdSkelRoot(skelRootInfo.prim);

            if (!skelRoot)
            {
                return;
            }

            if (!skelCache.Populate(skelRoot))
            {
                Debug.LogWarning("Failed to populate skel cache: " + skelRootInfo.prim.GetPath());
                return;
            }

            try {
                var binding = new UsdSkelBindingVector();
                if (!skelCache.ComputeSkelBindings(skelRoot, binding))
                {
                    Debug.LogWarning("ComputeSkelBindings failed: " + skelRootInfo.prim.GetPath());
                    return;
                }
                skelRootInfo.skelBindings = binding;
            } catch {
                Debug.LogError("Failed to compute binding for SkelRoot: " + skelRootInfo.prim.GetPath());
            }
        }
Beispiel #2
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(UsdSkelCache obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }