void* CEfxTrackCtrlImp::GetTrackKey(int32 idx) { int32 pos = GetKeyPos(idx); if (pos != -1) return (void*)(m_pEditTrack->GetEditKeyPtr(pos)); else return NULL; }
void CEfxTrackCtrlImp::GetKeyPosXAndWidth(int& posX, int& iwidth, int idx, int iLength, float scale) { posX = 0; iwidth = 0; if (!m_pEditEfxProp) return; int32 pos = GetKeyPos(idx); EDITEFFECTKEY* editKey = (EDITEFFECTKEY*)GetTrackKey(idx); if (!editKey) return; CEditUnitPropHelp* pUnit = editKey->GetEffectUnitProp(); // X POS posX = (int)(pos * scale / m_pEditEfxProp->GetTimeRange() * iLength ); // width iwidth = (int)(pUnit->GetUnitProp()->GetTimeRang() * iLength / m_pEditEfxProp->GetTimeRange() * scale); }
STARTDECL(gl_locallastpos) (Value &name, Value &on) // need a local version of this too? { auto p = localpos(GetKeyPos(name.sval->str(), on.ival)); name.DEC(); return ToValue(p); }