public CCurve GetCurve(CCURVE_ENUM type) { global::System.IntPtr cPtr = C4dApiPINVOKE.CTrack_GetCurve__SWIG_1(swigCPtr, (int)type); CCurve ret = (cPtr == global::System.IntPtr.Zero) ? null : new CCurve(cPtr, false); return(ret); }
public CCurve GetCurve() { global::System.IntPtr cPtr = C4dApiPINVOKE.CTrack_GetCurve__SWIG_2(swigCPtr); CCurve ret = (cPtr == global::System.IntPtr.Zero) ? null : new CCurve(cPtr, false); return(ret); }
public void SetAutomaticTangentMode(CCurve seq, SWIGTYPE_p_CAUTOMODE autoMode) { C4dApiPINVOKE.CKey_SetAutomaticTangentMode(swigCPtr, CCurve.getCPtr(seq), SWIGTYPE_p_CAUTOMODE.getCPtr(autoMode)); if (C4dApiPINVOKE.SWIGPendingException.Pending) { throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); } }
public void SetTimeRight(CCurve seq, BaseTime t) { C4dApiPINVOKE.CKey_SetTimeRight(swigCPtr, CCurve.getCPtr(seq), BaseTime.getCPtr(t)); if (C4dApiPINVOKE.SWIGPendingException.Pending) { throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); } }
public void SetGeData(CCurve seq, GeData d) { C4dApiPINVOKE.CKey_SetGeData(swigCPtr, CCurve.getCPtr(seq), GeData.getCPtr(d)); if (C4dApiPINVOKE.SWIGPendingException.Pending) { throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); } }
public int MoveKey(BaseTime time, int idx, CCurve dseq) { int ret = C4dApiPINVOKE.CCurve_MoveKey__SWIG_0(swigCPtr, BaseTime.getCPtr(time), idx, CCurve.getCPtr(dseq)); if (C4dApiPINVOKE.SWIGPendingException.Pending) { throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public bool SetTimeRightAdjustValue(CCurve seq, BaseTime t) { bool ret = C4dApiPINVOKE.CKey_SetTimeRightAdjustValue(swigCPtr, CCurve.getCPtr(seq), BaseTime.getCPtr(t)); if (C4dApiPINVOKE.SWIGPendingException.Pending) { throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
private bool SaveTracks(BaseObject ob, SceneNodeContainer snc, bool slerpRotation) { var builder = new TrackBuilder(); builder.LerpType = (slerpRotation) ? LerpType.Slerp : LerpType.Lerp; CTrack track = ob.GetFirstCTrack(); // First occurence of animation tracks? if (track == null) { return(false); } while (track != null) { DescID testID = track.GetDescriptionID(); DescLevel lv1 = testID.GetAt(0); DescLevel lv2 = testID.GetAt(1); CCurve curve = track.GetCurve(); if (curve != null) { int keyCount = curve.GetKeyCount(); CKey key = null; BaseTime time; for (int i = 0; i < keyCount; i++) { key = curve.GetKey(i); time = key.GetTime(); switch (lv1.id) { case 903: // should be replaced with "ID_BASEOBJECT_REL_POSITION" switch (lv2.id) { case 1000: builder.AddTranslationValue("x", (float)time.Get(), key.GetValue()); break; case 1001: builder.AddTranslationValue("y", (float)time.Get(), key.GetValue()); break; case 1002: builder.AddTranslationValue("z", (float)time.Get(), key.GetValue()); break; } break; case 904: // should be replaced with "ID_BASEOBJECT_REL_ROTATION" switch (lv2.id) { case 1000: builder.AddRotationValue("x", (float)time.Get(), key.GetValue()); break; case 1001: builder.AddRotationValue("y", (float)time.Get(), key.GetValue()); break; case 1002: builder.AddRotationValue("z", (float)time.Get(), key.GetValue()); break; } break; case 905: // should be replaced with "ID_BASEOBJECT_REL_SCALE" switch (lv2.id) { case 1000: builder.AddScaleValue("x", (float)time.Get(), key.GetValue()); break; case 1001: builder.AddScaleValue("y", (float)time.Get(), key.GetValue()); break; case 1002: builder.AddScaleValue("z", (float)time.Get(), key.GetValue()); break; } break; } } } track = track.GetNext(); } builder.BuildTracks(snc, _tracks); if (_animationsPresent) { return(false); } return(true); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CCurve obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
public bool CopyDataTo(CCurve destseq, CKey dest, AliasTrans trans) { bool ret = C4dApiPINVOKE.CKey_CopyDataTo(swigCPtr, CCurve.getCPtr(destseq), CKey.getCPtr(dest), AliasTrans.getCPtr(trans)); return(ret); }
public void SetInterpolation(CCurve seq, CINTERPOLATION inter) { C4dApiPINVOKE.CKey_SetInterpolation(swigCPtr, CCurve.getCPtr(seq), (int)inter); }
public void SetValueRight(CCurve seq, double v) { C4dApiPINVOKE.CKey_SetValueRight(swigCPtr, CCurve.getCPtr(seq), v); }