public FbxTime ValidateTime(FbxTime pTime) { FbxTime ret = new FbxTime(FbxWrapperNativePINVOKE.FbxAnimEvaluator_ValidateTime(swigCPtr, FbxTime.getCPtr(pTime)), true); if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending) { throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public virtual int KeyInsert(FbxTime pTime) { int ret = FbxWrapperNativePINVOKE.FbxAnimCurve_KeyInsert__SWIG_1(swigCPtr, FbxTime.getCPtr(pTime)); if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending) { throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public virtual void KeySetTCB(int pKeyIndex, FbxTime pTime, float pValue) { FbxWrapperNativePINVOKE.FbxAnimCurve_KeySetTCB__SWIG_3(swigCPtr, pKeyIndex, FbxTime.getCPtr(pTime), pValue); if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending) { throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve(); } }
public virtual FbxTime KeyGetTime(int arg0) { FbxTime ret = new FbxTime(FbxWrapperNativePINVOKE.FbxAnimCurveBase_KeyGetTime(swigCPtr, arg0), true); return(ret); }
public virtual int KeyAdd(FbxTime pTime, FbxAnimCurveKeyBase pKey) { int ret = FbxWrapperNativePINVOKE.FbxAnimCurveBase_KeyAdd__SWIG_1(swigCPtr, FbxTime.getCPtr(pTime), FbxAnimCurveKeyBase.getCPtr(pKey)); if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending) { throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public FbxTime GetTimeProp(string pName, FbxTime pDefValue) { FbxTime ret = new FbxTime(fbx_wrapperPINVOKE.FbxIOSettings_GetTimeProp(swigCPtr, pName, FbxTime.getCPtr(pDefValue)), true); if (fbx_wrapperPINVOKE.SWIGPendingException.Pending) { throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public FbxTime GetFramePeriod() { FbxTime ret = new FbxTime(fbx_wrapperPINVOKE.FbxIOInfo_GetFramePeriod(swigCPtr), true); return(ret); }
public FbxTexture.EBlendMode EvaluateValue(FbxTime pTime) { FbxTexture.EBlendMode ret = (FbxTexture.EBlendMode)NativeMethods.FbxPropertyEBlendMode_EvaluateValue__SWIG_1(swigCPtr, FbxTime.getCPtr(pTime)); if (NativeMethods.SWIGPendingException.Pending) { throw NativeMethods.SWIGPendingException.Retrieve(); } return(ret); }
public FbxPropertyValue EvaluateValue(FbxTime pTime) { FbxPropertyValue ret = new FbxPropertyValue(FbxWrapperNativePINVOKE.FbxProperty_EvaluateValue__SWIG_4(swigCPtr, FbxTime.getCPtr(pTime)), false); if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending) { throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public FbxLight.EAreaLightShape EvaluateValue(FbxTime pTime) { FbxLight.EAreaLightShape ret = (FbxLight.EAreaLightShape)NativeMethods.FbxPropertyEAreaLightShape_EvaluateValue__SWIG_1(swigCPtr, FbxTime.getCPtr(pTime)); if (NativeMethods.SWIGPendingException.Pending) { throw NativeMethods.SWIGPendingException.Retrieve(); } return(ret); }
public void TestBasics() { // create a curve we can unroll. var fbxScene = FbxScene.Create(Manager, "scene"); var fbxNode = FbxNode.Create(fbxScene, "node"); var fbxAnimNode = FbxAnimCurveNode.CreateTypedCurveNode(fbxNode.LclRotation, fbxScene); FbxAnimCurve[] fbxAnimCurves = { fbxAnimNode.CreateCurve(fbxAnimNode.GetName(), Globals.FBXSDK_CURVENODE_COMPONENT_X), fbxAnimNode.CreateCurve(fbxAnimNode.GetName(), Globals.FBXSDK_CURVENODE_COMPONENT_Y), fbxAnimNode.CreateCurve(fbxAnimNode.GetName(), Globals.FBXSDK_CURVENODE_COMPONENT_Z) }; FbxAnimCurveFilterUnroll filter = new FbxAnimCurveFilterUnroll(); Assert.That(filter.NeedApply(fbxAnimNode), Is.False, "expected not to need to unroll curves"); Assert.That(filter.Apply(fbxAnimNode), Is.False, "expected to have nothing to do"); // ensure coverage for function that takes an FbxStatus Assert.That(filter.NeedApply(fbxAnimNode, new FbxStatus()), Is.False); Assert.That(filter.Apply(fbxAnimNode, new FbxStatus()), Is.False); // configure the unroll condition foreach (float[] keydata in KeyTimeValues) { double seconds = keydata[0]; foreach (var fbxAnimCurve in fbxAnimCurves) { fbxAnimCurve.KeyModifyBegin(); } using (var fbxTime = FbxTime.FromSecondDouble(seconds)) { for (int ci = 0; ci < fbxAnimCurves.Length; ci++) { int ki = fbxAnimCurves[ci].KeyAdd(fbxTime); fbxAnimCurves[ci].KeySet(ki, fbxTime, keydata[ci + 1]); } } foreach (var fbxAnimCurve in fbxAnimCurves) { fbxAnimCurve.KeyModifyEnd(); } } Assert.That(filter.NeedApply(fbxAnimNode), Is.True, "expected to need to unroll curves"); Assert.That(filter.Apply(fbxAnimNode), Is.True, "expected to have unroll"); IEnumerator origKeydata = KeyTimeValues.GetEnumerator(); for (int ki = 0; ki < fbxAnimCurves[0].KeyGetCount(); ki++) { List <float> result = new List <float>() { (float)fbxAnimCurves[0].KeyGetTime(ki).GetSecondDouble() }; result = result.Concat((from ac in fbxAnimCurves select ac.KeyGetValue(ki))).ToList(); origKeydata.MoveNext(); if (ki == 0 || ki == 3 || ki == 4) { Assert.That(result, Is.EqualTo(origKeydata.Current)); } else { Assert.That(result, Is.Not.EqualTo(origKeydata.Current)); } } filter.Reset(); filter.Dispose(); }
public FbxAMatrix GetNodeGlobalTransform(FbxNode pNode, FbxTime pTime, FbxNode.EPivotSet pPivotSet) { FbxAMatrix ret = new FbxAMatrix(FbxWrapperNativePINVOKE.FbxAnimEvaluator_GetNodeGlobalTransform__SWIG_2(swigCPtr, FbxNode.getCPtr(pNode), FbxTime.getCPtr(pTime), (int)pPivotSet), false); if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending) { throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public void ComputeLocalTRSFromGlobal(FbxVector4 pRetLT, FbxVector4 pRetLR, FbxVector4 pRetLS, FbxNode pNode, FbxAMatrix pGX, FbxTime pTime) { FbxWrapperNativePINVOKE.FbxAnimEvaluator_ComputeLocalTRSFromGlobal__SWIG_3(swigCPtr, FbxVector4.getCPtr(pRetLT), FbxVector4.getCPtr(pRetLR), FbxVector4.getCPtr(pRetLS), FbxNode.getCPtr(pNode), FbxAMatrix.getCPtr(pGX), FbxTime.getCPtr(pTime)); if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending) { throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve(); } }
public void ComputeLocalTRSFromGlobal(FbxVector4 pRetLT, FbxVector4 pRetLR, FbxVector4 pRetLS, FbxNode pNode, FbxAMatrix pGX, FbxTime pTime, FbxNode.EPivotSet pPivotSet, bool pApplyTarget, bool pForceEval) { FbxWrapperNativePINVOKE.FbxAnimEvaluator_ComputeLocalTRSFromGlobal__SWIG_0(swigCPtr, FbxVector4.getCPtr(pRetLT), FbxVector4.getCPtr(pRetLR), FbxVector4.getCPtr(pRetLS), FbxNode.getCPtr(pNode), FbxAMatrix.getCPtr(pGX), FbxTime.getCPtr(pTime), (int)pPivotSet, pApplyTarget, pForceEval); if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending) { throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve(); } }
public FbxAMatrix EvaluateLocalTransform(FbxTime pTime) { FbxAMatrix ret = new FbxAMatrix(NativeMethods.FbxNode_EvaluateLocalTransform__SWIG_3(swigCPtr, FbxTime.getCPtr(pTime)), false); if (NativeMethods.SWIGPendingException.Pending) { throw NativeMethods.SWIGPendingException.Retrieve(); } return(ret); }
void Run() { FbxManager manager = FbxManager.Create(); FbxIOSettings setting = FbxIOSettings.Create(manager, "IOSRoot"); //fbxiosettingspath.h //PostProcessSteps.CalculateTangentSpace = #define EXP_TANGENTSPACE EXP_GEOMETRY "|" IOSN_TANGENTS_BINORMALS //PostProcessSteps.JoinIdenticalVertices = #define IOSN_DXF_WELD_VERTICES "WeldVertices" //PostProcessSteps.Triangulate = #define IOSN_TRIANGULATE "Triangulate" //PostProcessSteps.RemoveComponent = //PostProcessSteps.GenerateSmoothNormals = //setting.AddProperty() setting.SetBoolProp("Import|AdvOptGrp|Dxf|WeldVertices", true); setting.SetBoolProp("Triangulate", true); manager.SetIOSettings(setting); FbxImporter impoter = FbxImporter.Create(manager, ""); bool status = impoter.Initialize(@"1.fbx", -1, setting); Log.Info(status); if (!status) { return; } FbxScene scene = FbxScene.Create(manager, "scene1"); status = impoter.Import(scene); Log.Info(status); int numTrack = scene.GetSrcObjectCount(FbxCriteria.ObjectType(FbxAnimStack.ClassId)); Log.Info("num stack " + numTrack); FbxObject obj = scene.GetSrcObject(FbxCriteria.ObjectType(FbxAnimStack.ClassId), 0); FbxAnimStack stack = FbxAnimStack.Cast(obj); if (stack == null) { Log.Error("can not get anim stack!"); return; } FbxCriteria cri = FbxCriteria.ObjectTypeStrict(FbxAnimLayer.ClassId); int numLayer = stack.GetMemberCount(cri); Log.Info("anim layer count : " + numLayer); FbxAnimLayer layer = null; if (numLayer > 0) { FbxObject layerobj = stack.GetMember(cri, 0); layer = FbxAnimLayer.Cast(layerobj); if (layer == null) { Log.Error("anim layer is null!"); return; } Log.Info("anim layer name " + layer.GetName()); } Log.Info("node count " + scene.GetNodeCount()); for (int i = 0; i < scene.GetNodeCount(); i++) { FbxNode node = scene.GetNode(i); Log.Info("node " + i + " " + node.GetName() + " ChildCount:" + node.GetChildCount()); //---------------- //node.LclTranslation.IsAnimated //---------------- //ToDo : if (node.LclTranslation.IsAnimated(layer)) { FbxAnimCurveNode curveNode = node.LclTranslation.GetCurveNode(layer); if (curveNode == null) { Log.Error("curve node is null"); } else { for (int c = 0; c < curveNode.GetCurveCount(0); c++) { FbxAnimCurve curve = curveNode.GetCurve(0, (uint)c); if (curve != null) { Log.Info("curve " + curve.GetName()); Log.Info("key count " + curve.KeyGetCount()); FbxAnimCurveKey key = curve.KeyGet(0); FbxTime t = key.GetTime(); Log.Info("key " + t.GetTimeString() + " value " + key.GetValue()); } } } } if (node.GetNodeAttribute() != null) { Log.Info("got attribu"); FbxNodeAttribute att = node.GetNodeAttribute(); PrintAttribute(manager, att); } else { Log.Info("att count " + node.GetNodeAttributeCount()); for (int j = 0; j < node.GetNodeAttributeCount(); j++) { FbxNodeAttribute att = node.GetNodeAttributeByIndex(j); PrintAttribute(manager, att); } } FbxVector4 rot = node.GetPostRotation(FbxNode.EPivotSet.eSourcePivot); FbxQuaternion q; } }
public FbxLight.EDecayType EvaluateValue(FbxTime pTime, bool pForceEval) { FbxLight.EDecayType ret = (FbxLight.EDecayType)NativeMethods.FbxPropertyEDecayType_EvaluateValue__SWIG_0(swigCPtr, FbxTime.getCPtr(pTime), pForceEval); if (NativeMethods.SWIGPendingException.Pending) { throw NativeMethods.SWIGPendingException.Retrieve(); } return(ret); }
public FbxNull.ELook EvaluateValue(FbxTime pTime) { FbxNull.ELook ret = (FbxNull.ELook)NativeMethods.FbxPropertyNullELook_EvaluateValue__SWIG_1(swigCPtr, FbxTime.getCPtr(pTime)); if (NativeMethods.SWIGPendingException.Pending) { throw NativeMethods.SWIGPendingException.Retrieve(); } return(ret); }
public FbxCamera.EProjectionType EvaluateValue(FbxTime pTime) { FbxCamera.EProjectionType ret = (FbxCamera.EProjectionType)NativeMethods.FbxPropertyEProjectionType_EvaluateValue__SWIG_1(swigCPtr, FbxTime.getCPtr(pTime)); if (NativeMethods.SWIGPendingException.Pending) { throw NativeMethods.SWIGPendingException.Retrieve(); } return(ret); }
public FbxTime GetPeriodTime() { FbxTime ret = new FbxTime(fbx_wrapperPINVOKE.FbxAnimCurveFilterResample_GetPeriodTime(swigCPtr), true); return(ret); }
public FbxDouble3 EvaluateValue(FbxTime pTime) { var ret = NativeMethods.FbxPropertyDouble3_EvaluateValue__SWIG_1(swigCPtr, FbxTime.getCPtr(pTime)); if (NativeMethods.SWIGPendingException.Pending) { throw NativeMethods.SWIGPendingException.Retrieve(); } return(ret); }
public FbxTime GetSignedDuration() { FbxTime ret = new FbxTime(fbx_wrapperPINVOKE.FbxTimeSpan_GetSignedDuration(swigCPtr), true); return(ret); }
public virtual float Evaluate(FbxTime pTime) { float ret = FbxWrapperNativePINVOKE.FbxAnimCurveBase_Evaluate__SWIG_1(swigCPtr, FbxTime.getCPtr(pTime)); if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending) { throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public FbxTimeSpan(FbxTime pStart, FbxTime pStop) : this(fbx_wrapperPINVOKE.new_FbxTimeSpan__SWIG_1(FbxTime.getCPtr(pStart), FbxTime.getCPtr(pStop)), true) { if (fbx_wrapperPINVOKE.SWIGPendingException.Pending) { throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve(); } }
public FbxEuler.EOrder EvaluateValue(FbxTime pTime) { FbxEuler.EOrder ret = (FbxEuler.EOrder)fbx_wrapperPINVOKE.FbxPropertyTERotationOrder_EvaluateValue__SWIG_1(swigCPtr, FbxTime.getCPtr(pTime)); if (fbx_wrapperPINVOKE.SWIGPendingException.Pending) { throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public FbxTime GetStop() { FbxTime ret = new FbxTime(fbx_wrapperPINVOKE.FbxTimeSpan_GetStop(swigCPtr), true); return(ret); }
public virtual double KeyFind(FbxTime pTime) { double ret = FbxWrapperNativePINVOKE.FbxAnimCurve_KeyFind__SWIG_1(swigCPtr, FbxTime.getCPtr(pTime)); if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending) { throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public FbxAMatrix EvaluateLocalTransform(FbxTime pTime, FbxNode.EPivotSet pPivotSet, bool pApplyTarget) { FbxAMatrix ret = new FbxAMatrix(NativeMethods.FbxNode_EvaluateLocalTransform__SWIG_1(swigCPtr, FbxTime.getCPtr(pTime), (int)pPivotSet, pApplyTarget), false); if (NativeMethods.SWIGPendingException.Pending) { throw NativeMethods.SWIGPendingException.Retrieve(); } return(ret); }
public override FbxTime KeyGetTime(int pKeyIndex) { FbxTime ret = new FbxTime(FbxWrapperNativePINVOKE.FbxAnimCurve_KeyGetTime(swigCPtr, pKeyIndex), true); return(ret); }
public FbxPropertyValue GetPropertyValue(FbxProperty pProperty, FbxTime pTime) { FbxPropertyValue ret = new FbxPropertyValue(FbxWrapperNativePINVOKE.FbxAnimEvaluator_GetPropertyValue__SWIG_3(swigCPtr, FbxProperty.getCPtr(pProperty), FbxTime.getCPtr(pTime)), false); if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending) { throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve(); } return(ret); }