Skip navigation
PetterB1
Currently Being Moderated

AEGP - How to get comp of active timeline, even if other comp is view-locked?

Aug 8, 2012 4:52 PM

Hello!

 

I'm creating an AEGP that needs to check flags and in/out of all layers in the active comp continuously. I loop through my layers in my IdleHook, and since there's no heavy processing (almost none if nothing has changed) it seems to work well without affecting performance much. It would be great if I could track whenever the timeline has been manipulated, if user is done dragging a layer or manipulates layer flags, but as far as I understand, this is not possible with the SDK?

 

Anyway my real problem is that I need to check the layers in the active Timeline. Right now I use AEGP_GetActiveItem to get the comp and it works perfectly, until I click the lock for the view of one comp and switch to another timeline. Now AEGP_GetActiveItem will still get the locked comp seen in the Viewer, even though active Timeline has changed. Is there any way to know what comps are currently open in timeline tabs, or even better get the comp of the active timeline?

 

Any help would be very appreciated!

 

Thanks in advance

Petter Bergmar

 
Replies
  • Currently Being Moderated
    Aug 10, 2012 7:46 AM   in reply to PetterB1

    err...

    sorry, but no great news...

     

    regarding time change command notifications,

    i don't know if there's such an event, because the commands are not listed anywhere. (you have to contact adobe and ask)

    but you can experiment and see!

    use AEGP_RegisterCommandHook with AEGP_Command_ALL, and see if you get calls during time changes.

    (it's might take some time to filter out other calls...)

     

    as for telling what timeline is active...

    i don't know of a direct way.

    what about javascript? if a script gets the active timeline and not the viewed comp, then you can use EXECUTE_SCRIPT(), to retrieve the result.

    otherwise... i honestly don't know.

    :-(

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 10, 2012 8:09 AM   in reply to PetterB1

    command numbers start from 1, and end... i don't know where.

    i saw commands with a number as high as 5000. so we're probably talking thousands and not millions.

    as for the sub menu, if it's not listed as an AEGP_MenuID, then i'm guessing that you can't put it there.

    you can with a lot (really a lot) of effort get hold of the main window handle for AE, and add items directly to it (a friend of mine did that a while ago), but i'm not sure how you could track down the "new" menu, or how you can then link that entry to your AEGP...

    so...

    yeah.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 10, 2012 8:21 AM   in reply to PetterB1

    slowly breaking your spirit...

    good... good...

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 24, 2012 8:04 AM   in reply to PetterB1

    nice!!!!

    can you keep the old selection and re-apply it?

    would that reconstruct the previous window state?

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 24, 2012 8:19 AM   in reply to PetterB1

    i think there's a way to set the selection of multiple object

    simultaniously.

    you create a new collection using AEGP_NewCollection,

    add objects to it using AEGP_CollectionPushBack,

    and set it using AEGP_SetSelection.

     

    no?

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 24, 2012 8:27 AM   in reply to PetterB1

    i think you're right.

    i think it applies only to comp elements.

    we'll it was fun anyways.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points