Skip to main content
Participating Frequently
February 24, 2010
Question

get Current Time

  • February 24, 2010
  • 1 reply
  • 889 views

How everybody,

i am now studying the examples. I tried to use the "current_time" identifier in my sekeleton example, but its not defind. So i read through the sdk it says, that its just available in PF_CMD_Render. I don't know what it exactly means, but i think i found the solution in the Artie example under AEGP.

so first there are two variables defined:

A_Time comp_time, comp_time_step,

suites.CanvasSuite5()->AEGP_GetCompRenderTime(render_contextH, &comp_time, &comp_time_step);

by the way what are the differences between CavasSuite5 ..CanvasSuite7

thank you very much for your help.

This topic has been closed for replies.

1 reply

yafes7Author
Participating Frequently
February 24, 2010

by the way,

other plugins worked for me well, but when i try to load an aegp plugin it doesnt appear under effects. (I've tried artis, easy cheese). I've created than two folders, than i got a warning message, that there are two plug-ins with the same name, so i think its recognized, but its not appearing.

meanwhile i am reading the chapter "aegp" in the sdk guide

thank you all

Inspiring
February 24, 2010

Hey,

AEGP's are not effects. They don't appear under effects menu. AEGP's are used to create Menu Commands or Panels. When you compile Easy Cheese ,Mangler you see them in the Animation  Menu. When you compile Panelator, by default you see it in the Window Menu.You can choose where you want to insert the menu command.

You can get the current time from the in_data that is passed to the effect. In other words, current time is "in_data->current_time". But you can't use this to calculate anything yet.

According to the SDK The current frame number is current_time divided by time_step. The current time in seconds is current_time divided by time_scale. Keep in mind, that these are related to the layer but not the Comp.

To convert this into  Comp TIme, which you'll need in a lot of suite functions , like accessing streams etc etc.,

PFInterfaceSuite1()->AEGP_ConvertEffectToCompTime(in_data->effect_ref,
                                                                    in_data->current_time,
                                                                    in_data->time_scale,
                                                                A_Time    &comp_timeT)

You cannot use AEGP_GetCompRenderTime, the function you mentioned in the previous post, as PR_RenderContexH is passed only to Artisans. Artisans are extremely complex, and even the SDK discourages you from creating one. So I wouldn't think about it when you are starting out.

Hope this helps. I am not the perfect guy here, but this should give you some idea.