• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

getting velocity , help me please

New Here ,
Mar 06, 2008 Mar 06, 2008

Copy link to clipboard

Copied

Does anyone know how can I get velocity parameter?
I tried as follows. However, the error sometimes AEGP_GetLayerStreamValue ruturn "error 512".The problem occurs if the expression is used.

Code:
A_Err err = A_Err_NONE,err2 = A_Err_NONE;
A_Time timeT;
A_FpLong fps;
AEGP_CompH compH = NULL;
AEGP_LayerH layerH = NULL;
AEGP_LTimeMode LTimeMode = AEGP_LTimeMode_CompTime;

AEGP_SuiteHandler suites(in_data->pica_basicP);
ERR(suites.PFInterfaceSuite1()->AEGP_GetEffectLayer( in_data->effect_ref, &layerH));
ERR(suites.LayerSuite5()->AEGP_GetLayerCurrentTime(layerH, LTimeMode, &timeT));
ERR(suites.LayerSuite5()->AEGP_GetLayerParentComp(layerH, &compH));
ERR(suites.CompSuite6()->AEGP_GetCompFramerate(compH,&fps));

timeT.value = (timeT.value * A_u_long(fps) / timeT.scale) - 1;
if(timeT.value < 0) timeT.value = 0;
timeT.scale = A_u_long(fps);

AEGP_StreamVal val;
AEFX_CLR_STRUCT(val);

ERR(suites.StreamSuite2()->AEGP_GetLayerStreamValue(layerH,
AEGP_LayerStream_POSITION,
LTimeMode,
&timeT,
FALSE,
&val,
NULL));
TOPICS
SDK

Views

2.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 06, 2008 Mar 06, 2008

Copy link to clipboard

Copied

It tried to calculate the speed from the difference between present coordinates and the previous coordinates. The error occurs when the previous coordinates are acquired.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 12, 2008 Mar 12, 2008

Copy link to clipboard

Copied

Which velocity, where?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 12, 2008 Mar 12, 2008

Copy link to clipboard

Copied

I want to get the velocity of position.but I don't know how to get it.
so I tried to get present position and the previous position.then calculate the difference between the difference at two positions.
Though I don't understand whether this way is correct or not.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 15, 2008 Mar 15, 2008

Copy link to clipboard

Copied

LATEST
Keyframes intrinsically have velocity; you're right, you'll have to compute it otherwise.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines