public new static FbxBlendShape Create(FbxObject pContainer, string pName) { global::System.IntPtr cPtr = FbxWrapperNativePINVOKE.FbxBlendShape_Create__SWIG_1(FbxObject.getCPtr(pContainer), pName); FbxBlendShape ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxBlendShape(cPtr, false); return(ret); }
public static FbxBlendShape Cast(FbxObject arg0) { global::System.IntPtr cPtr = FbxWrapperNativePINVOKE.FbxBlendShape_Cast(FbxObject.getCPtr(arg0)); FbxBlendShape ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxBlendShape(cPtr, false); return(ret); }
public FbxBlendShape GetBlendShapeDeformer() { global::System.IntPtr cPtr = FbxWrapperNativePINVOKE.FbxBlendShapeChannel_GetBlendShapeDeformer(swigCPtr); FbxBlendShape ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxBlendShape(cPtr, false); return(ret); }
public new static FbxBlendShape Create(FbxManager pManager, string pName) { global::System.IntPtr cPtr = fbx_wrapperPINVOKE.FbxBlendShape_Create__SWIG_0(FbxManager.getCPtr(pManager), pName); FbxBlendShape ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxBlendShape(cPtr, false); return(ret); }
public bool Equals(FbxBlendShape other) { if (object.ReferenceEquals(other, null)) { return(false); } return(this.swigCPtr.Handle.Equals(other.swigCPtr.Handle)); }
public bool SetBlendShapeDeformer(FbxBlendShape pBlendShape) { bool ret = NativeMethods.FbxBlendShapeChannel_SetBlendShapeDeformer(swigCPtr, FbxBlendShape.getCPtr(pBlendShape)); if (NativeMethods.SWIGPendingException.Pending) { throw NativeMethods.SWIGPendingException.Retrieve(); } return(ret); }
public FbxBlendShape GetBlendShapeDeformer(int pIndex) { global::System.IntPtr cPtr = NativeMethods.FbxGeometry_GetBlendShapeDeformer__SWIG_1(swigCPtr, pIndex); FbxBlendShape ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxBlendShape(cPtr, false); if (NativeMethods.SWIGPendingException.Pending) { throw NativeMethods.SWIGPendingException.Retrieve(); } return(ret); }
public new static FbxBlendShape Create(FbxObject pContainer, string pName) { global::System.IntPtr cPtr = NativeMethods.FbxBlendShape_Create__SWIG_1(FbxObject.getCPtr(pContainer), pName); FbxBlendShape ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxBlendShape(cPtr, false); if (NativeMethods.SWIGPendingException.Pending) { throw NativeMethods.SWIGPendingException.Retrieve(); } return(ret); }
public FbxBlendShape GetBlendShapeDeformer() { global::System.IntPtr cPtr = NativeMethods.FbxBlendShapeChannel_GetBlendShapeDeformer(swigCPtr); FbxBlendShape ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxBlendShape(cPtr, false); if (NativeMethods.SWIGPendingException.Pending) { throw NativeMethods.SWIGPendingException.Retrieve(); } return(ret); }
override public void TestBasics(T fbxGeometry, FbxNodeAttribute.EType typ) { base.TestBasics(fbxGeometry, typ); int origCount = fbxGeometry.GetDeformerCount(); // test get blendshape deformer FbxBlendShape blendShape = FbxBlendShape.Create(Manager, "blendShape"); int index = fbxGeometry.AddDeformer(blendShape); Assert.GreaterOrEqual(index, 0); origCount++; // TODO: (UNI-19581): If we add the blendShape after the skin, then the below // tests fail. Assert.AreEqual(blendShape, fbxGeometry.GetBlendShapeDeformer(index)); Assert.AreEqual(blendShape, fbxGeometry.GetBlendShapeDeformer(index, null)); Assert.AreEqual(blendShape, fbxGeometry.GetDeformer(index, FbxDeformer.EDeformerType.eBlendShape)); Assert.AreEqual(1, fbxGeometry.GetDeformerCount(FbxDeformer.EDeformerType.eBlendShape)); // test add deformer FbxSkin skin = FbxSkin.Create(Manager, "skin"); int skinIndex = fbxGeometry.AddDeformer(skin); Assert.GreaterOrEqual(skinIndex, 0); Assert.AreEqual(skin, fbxGeometry.GetDeformer(skinIndex)); // test get invalid deformer index doesn't crash fbxGeometry.GetDeformer(-1, new FbxStatus()); fbxGeometry.GetDeformer(int.MaxValue, new FbxStatus()); // test get deformer null FbxStatus fbxGeometry.GetDeformer(0, null); // check right index but wrong type Assert.IsNull(fbxGeometry.GetDeformer(skinIndex, FbxDeformer.EDeformerType.eVertexCache, null)); Assert.AreEqual(origCount + 1, fbxGeometry.GetDeformerCount()); // test add null deformer Assert.That(() => fbxGeometry.AddDeformer(null), Throws.Exception.TypeOf <System.ArgumentNullException>()); // test add invalid deformer skin.Destroy(); Assert.That(() => fbxGeometry.AddDeformer(skin), Throws.Exception.TypeOf <System.ArgumentNullException>()); }
public void TestBasics() { using (var blendShapeChannel = CreateObject()) { int origCount = blendShapeChannel.GetTargetShapeCount(); FbxShape shape = FbxShape.Create(Manager, "shape"); Assert.IsTrue(blendShapeChannel.AddTargetShape(shape)); Assert.AreEqual(origCount + 1, blendShapeChannel.GetTargetShapeCount()); Assert.AreEqual(shape, blendShapeChannel.GetTargetShape(origCount)); Assert.AreEqual(origCount, blendShapeChannel.GetTargetShapeIndex(shape)); // test RemoveTargetShape Assert.AreEqual(shape, blendShapeChannel.RemoveTargetShape(shape)); Assert.IsNull(blendShapeChannel.GetTargetShape(origCount)); // test AddTargetShape with double doesn't crash blendShapeChannel.AddTargetShape(shape, 45); // test null Assert.That(() => { blendShapeChannel.AddTargetShape(null); }, Throws.Exception.TypeOf <System.ArgumentNullException>()); Assert.That(() => { blendShapeChannel.RemoveTargetShape(null); }, Throws.Exception.TypeOf <System.ArgumentNullException>()); // test destroyed shape.Destroy(); Assert.That(() => { blendShapeChannel.AddTargetShape(shape); }, Throws.Exception.TypeOf <System.ArgumentNullException>()); Assert.That(() => { blendShapeChannel.RemoveTargetShape(shape); }, Throws.Exception.TypeOf <System.ArgumentNullException>()); // test GetDeformPercent TestGetter(blendShapeChannel.DeformPercent); // test SetBlendShapeDeformer() FbxBlendShape blendShape = FbxBlendShape.Create(Manager, "blendShape"); Assert.IsTrue(blendShapeChannel.SetBlendShapeDeformer(blendShape)); Assert.AreEqual(blendShape, blendShapeChannel.GetBlendShapeDeformer()); // test null Assert.That(() => { blendShapeChannel.SetBlendShapeDeformer(null); }, Throws.Exception.TypeOf <System.ArgumentNullException>()); // test destroyed blendShape = FbxBlendShape.Create(Manager, "blendShape2"); blendShape.Destroy(); Assert.That(() => { blendShapeChannel.SetBlendShapeDeformer(blendShape); }, Throws.Exception.TypeOf <System.ArgumentNullException>()); } }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FbxBlendShape obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
public bool SetBlendShapeDeformer(FbxBlendShape pBlendShape) { bool ret = FbxWrapperNativePINVOKE.FbxBlendShapeChannel_SetBlendShapeDeformer(swigCPtr, FbxBlendShape.getCPtr(pBlendShape)); return(ret); }