How to get AEGP_EffectRefH within the custom effect?

Hi,
    I want to get the AEGP_EffectRefH of the custom effect applied. This is what I'm trying to do:
In global setup of custom effect:
AEGP_GlobalRefcon globalRef    =    NULL;
const A_char*        pluginName    =    "ADBE Custom Effect";
AEGP_SuiteHandler    suites(in_data->pica_basicP);
suites.UtilitySuite5()->AEGP_RegisterWithAEGP(globalRef, pluginName, &S_Plugin_ID );
After getting the plugin ID, I do this in a function to get the AEGP_EffectRefH:
I call this function when the custom effect is added:
void function()
     AEGP_EffectRefH        effect_refH        =    NULL;
     AEGP_SuiteHandler    suites(in_data->pica_basicP);           
     ERR(suites.PFInterfaceSuite1()->AEGP_GetNewEffectForEffect(S_Plugin_ID, in_data->effect_ref, &effect_refH));
But the effect_refH returned is NULL. AE pops up a dialog saying
After Effects error: internal verification failure, sorry! {child not found in parent}
(29 :: 0)
What am I doing wrong?
Thanks,
Dheeraj

about the reliability of effectRefs:
they are reliable for the duration of one call.
i.e. for the beginning to the end of the render call or updtate_params_ui call.
after that cal has ended, the effectRef is likely to become invalidated.
do an experiment:
get an effect's effectRef, and check it's address in ram.
releast the effetcRef and get another effectRef for a DIFFERENT effect.
check it's adress and you'll be amazed that it has the same address as the first.
why is that?
because it doesn't point to the address of that effect in ram.
it's an internal id that allows AE to operate on the effect for you.
so that same effectRef you have, might point to a different effect or to nothing at all, once AE decides that the effectRef you acquired is no longer in use.
AE will decide that after you release the effetcRef, or that you effect returns from it's call.
so what does all that mean?
it means you should treat effectRefs and a temporary key for accessing an effect, and NOT as a long term means of identifying and effect.
there is no perfect solution for tracking an effect for long spans.
if you want to keep track of an effect outside the scope of one call you have to:
1. get the itemID for the comp it's in
2. get the layerID for the layer it's on
3. get the effect's index on the layer (this is the tricky bit)
the comp's itemID and layerID both last for the lifetime of the project.
they will keep across sessions, even if the project is loaded on a different machine and a different platform.
these only get invalidated if the project is imported into another project.
the index of the effect is the problem bit.
there is no API call for getting an effects index.
you can only tell the index by counting all effects on the layer, until you hit the desired effect.
even then it's hard to tell because you tell what effect you hit by reading it's matchName.
what if you have to copies of the same effect on one layer?
how do you tell them apart?
it's up to you to create a unique identifier.
either a hidden slider holding a random value that's unique to each instance, or change the effect name to something unique (the user might change that without you knowing)
the last problem with the index is that the user might change effects order on that layer, and your effect get no notification of that having happened.
so even if you stored the itemID, layerID and effect index, you still have to make sure it's the correct effect before you do something hasty like access it.
as i said,
there is no perfect long term solution for tracking effects.

Similar Messages

  • How to get rank within the row in SQL

    I have an a key orderid and 4 other columns with orderdate&time in (16/12/2011 16:15:24 format) within a table.
    the orderid has an average of 1million rows every week hence could not do this in excel for a 15 day period .
    ORderid.........: mail........................................ : telephone ............................:online ........................................ store.......................... Agency
    A3456...........15/12/2011 16:15:24 ............... 16/12/2011 14:12:01.............16/12/2011 16:14:00..........17/12/2011 11:22:55 ............12/12/2011 22:20:30
    B678
    C555
    i want to create a new table which ranks each row according to the max orderdate and time say in another table
    i want to capture the rank
    KEY.......Mail............Tel............online.........store..........Agency
    A3456.....4 ...............3...............2...............1............... 5
    Is there any way either within the same table or in other table i wiould be able to get the rank based on the rows in SQL.
    thnks
    Edited by: UOOLK on 29-Dec-2011 06:46

    Something like this I think:
    create new_order_table as
      select order_id
            ,rank() over (order by mail desc) mail
            ,rank() over (order by telephone desc) telephone
            ,rank() over (order by online desc) online
            ,rank() over (order by store desc) store
            ,rank() over (order by agency desc) agency
        from old_order_table;Assuming you want the most recent date to be ranked number 1. If you want number 1 to be the oldest then remove all the 'desc's from the order by clauses.

  • How do I get rid of the 3d effect when opening home screen? It gives me a headache.

    How do I get rid of the 3d effect when opening home screen? It gives me a headache.

    jimginakouri wrote:
    It's more of a "zoom-in/zoom-out" every time you turn on home screen or open/close an app.
    THAT you can't change. Silly of Apple not to provide a setting to back out the animation effects either as a whole or individually.

  • I had to manually download the new version of itunes.. via tools, it gave me 4 items to download and i did not download all 4 compenants.  Does anyone know how to get back to the pop up that contains tools so i can redownlaod all of them.

    I lost my old iphone and have a new 5s.. i need to sync to itunes.  i had to donwload manually via tools but i didnt download all four files.  now when i plug my phone into itunes it says there is an error bc i didnt download all the files.  so when i go into itunes now and check for updates it says its up to date.  the problem is with the phone support file i didnt download. 
    Does anyone know how to get back to the pop up that has the music player update and itunes update bc this is the only place i have seen "tools" to be able to manually update all four files....
    ***IF i completely uninstall itunes and reinstall will it still have all my songs, photos, apps etc... bc i need to sync my new phone to get all my stuff back

    this is a follow up from the profane post earlier....
    i have done this twice in two other posts..
    here is my problem.. i started off trying to update itunes, it failed twice and said i needed to install manually via tools.
    the only place to get to tools is the pop up box that appears when you click check for updates.. if there is an available update then the pop up shows up with the quick time and itunes files to download. so i finally figured that out. i clicked on tools and manual update, four files were saved to a file. Apple mobile device support, another one similar, itunes, and another one i cant remember. I only downloaded the itunes file seeing as though thats all i needed to accomplish in the first place.
    so then i restarted my computer bc you need to reboot and then reopen itunes for update to take effect. once i have itunes back open i plugged in my new 5s which i am trying to sync to my computer to get all my stuff back bc i lost my previous phone over the weekend.. once i plugged the phone in an error stating i needed to unistall the apple mobile device support and itunes and then reinstall. well i dont know where those files were originally stored on my computer AND since my itunes was updated, just not the other 3 associated files, when i click check for updates it says its up to date and then pop up containing the quick time and itunes does not pop up thus i cant get back to the tools tab to manually save the 4 files again.
    so i was just going to uninstall itunes all together and then i thought well what happens if it erases all my photos apps songs etc... which would defeat the whole purpose in the first place of me trying to sync my new phone to get all my stuff back.
    so i literally have no idea what to do at this point.. if you have read this you are probably just as confused as me...

  • How do I do use the custom code and format for a percentage with 2 decimals in Report Builder 3.0?

    In Report Builder 3.0, I have the following custom code entered:
      Public Function SafeDivide(Numerator as String, Denominator as String) as String
    Try
    If Numerator = “” or Denominator = “” then
    Return “-“
    End if
    If Numerator = “-“ or Denominator = “-“ then
    Return “-“
    End If
    If CDbl(Numerator) =0 or CDbl(Denominator) = 0 then
    Return “-“
    End if
    If IsNothing(Numerator) or IsNothing(Denominator) then
    Return "-"
    End if
    Return Val( ( (CDbl(Numerator) / CDbl(Denominator) )*100 ) )
    Catch
    Return "-"
    End Try
    End Function
    I call the custom code in the cell with the following equation:
      =Code.SafeDivide(sum(Fields!TY_UNITS.Value)-sum(Fields!LY_UNITS.Value),sum(Fields!LY_UNITS.Value))
    I have the format for the cell set to 0.00%, but it’s not being followed.
    I want the result to be formatted as a Percentage, but instead I get values like: 
    -78.9473684210
    80
    300
    -100
    I have the format for the cell set to 0.00%, but it’s not being followed.
    How do I do use the custom code and format for a percentage with 2 decimals?

    Hi AngP,
    After testing the issue in my local environment, I can reproduce it. Based on my research, I find this issue is caused by the type of Units_VAR_Percentage cell is string, while the type of CDbl(Parameters!Var_Threshold.Value) is double, so they cannot be
    compared.
    To fix this issue, we can add a hidden column (Textbox91) next to the Units_VAR_Percentage column, and type =(sum(Fields!TY_UNITS.Value)-sum(Fields!LY_UNITS.Value)) /sum(Fields!LY_UNITS.Value) as the expression. Then use the expression below to control the
    BackgroundColor:
    =iif(iif(reportitems!Units_VAR_Percentage.Value=CStr(format(reportitems!Textbox91.Value,"0.00%")),reportitems!Textbox91.Value,0)>CDbl(Parameters!Var_Threshold.Value),"Yellow","PaleTurquoise")
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to get jsp PageContext in custom component renderer

    Hi,
    How to find PageContext(javax.servlet.jsp.PageContext) form within the custom component renderer class?
    Please help?
    Thanx & Regards
    Milind

    Strictly you're looking which URL has invoked the new request? With other words, you want the referrer?
    If so, doString referrer = request.getHeader("referer"); // Yes, with the legendaric misspelling.Be careful with this, the client has full control over what he/she sends with the headers, so also the referrer. It might be null or changed while you didn't expect that. If you want to be safe, you may consider to send the current URL as a hidden parameter along with the request.

  • How to get access to the OCM toolkit  ?

    how to get access to the OCM toolkit  ?
    the full version not the demo !

    I need to know how to do a complex query my task is to find out the names of people allergic to paracetomol and penicilllin from a list of names??? I REALLY NEED HELP ITS DUE IN TODAY!
    TASK: show the Pupils: forename, Pupil surname, Year group, teacher in charge to all children allergic to penicillin and paracetmol from the table of names (not everyones allergic) How do I query it!?????????
    <a href="http://www.ornsoft.com/">Custom software development</a>
    <a href="http://www.aconsultancy.co.uk">Acquisition Search Warwickshire</a>

  • How to get REQNR in the UR (Startroutine)

    How to get REQNR in the UR (Startroutine) ?
    There is no g_s_minfo passed to this form (not like in TR). FM GET_JOB_RUNTIME_INFO does not work.
    Any ideas how to get request number in the start routine of update rule ?
    BR
    Wojciech

    Sorry,
    The field in question is i_requnr.
    You get at it, and other interesting fields like g_s_minfo like this:
    FIELD-SYMBOLS: <l_requnr>.DATA: l_requnr_fieldnm TYPE string VALUE 'I_REQUNR'.ASSIGN (l_requnr_fieldnm) TO <l_requnr>.
    Now you can use <l_requnr> anywhere within the start routine.
    Regards

  • How to get in touch with customer service?

    How to get in touch with customer service? Twice I had a chat and I would get an answer in a few days. Never heard a thing! I need an invoice for my book-keeping but I can't download it. It says: get in touch with the customer service. But I chatted for 2 times, tried to phone, They won't answer the phone. Where is the customer service!!!!!!!!!

    Hi Regine43b,
    Please refer to the following link for help with your monthly invoice: http://helpx.adobe.com/x-productkb/policy-pricing/print-creative-cloud-receipt.html
    If in case you still face issues, please contact support @ https://helpx.adobe.com/contact
    Regards,
    Sheena.

  • Does anyone know how to get ahold of Adobe customer service?

    does anyone know how to get ahold of Adobe customer service?

    i guess i really want to get ahold of someone in charge of our area because after the last hole month of being treated like a dog by them and being told they don't care I'm just willing to go to any lengths to see a company like that is not successful I'm a business owner to actually several businesses and your customers are the only reason your there but you can never forget about the little people verizon

  • HOw to get rid of the borderline in the  render list item of the news brows

    HI,
    HOw to get rid of the renderlist
    border line,
    Give Feedback  link   
    Send To  link in the news browser.
    After removing thiese things, it should look like a normal html page .
    how to  achive this ,
    if coding required then which is the par file I need to modify
    thanks
    pkiran

    Hi PKG,
    the "GiveFeedback" and "SendTo" links are called "FlexUI" commands. Most of that stuff is highly configurable and naturally you can remove them in the KM Configuration at
    SystemAdmin->SystemConfig->KM->CM->UserInterface
    -> ... -> ResourceRnderer
    Your ResourceRenderer uses a CommandGroup. In this CommandGroup you can add/remove commands.
    For example un your case its the CommandGroup "NewsDisplayGroup"
    Kind Regards
    --Matthias

  • How do i find out the tables effected in a schema after a particular time stamp

    how do i find out the tables effected in a schema after a particular time stamp?
    pls email in [email protected]

    If you are doing a reload every time then you can issue following commands to clear data from cube.
    lmt name to all
    allstat
    clear all from <cubename>prttopvar
    You can wrap above commands in pl sql procedure using dbms_aw.execute package and execute it before cube load starts. Instead of clearing it from whole cube you can clear only from one partition also. Just take a look at clear command in olap DML 10.2 reference.
    Thanks,
    Brijesh
    Edited by: Brijesh Gaur on Aug 10, 2010 6:47 AM

  • How to get rid of the Login page in Portal?

    Hi Guys,
    I have a newly developed intranet portal project for my company which does not need login no more. I hope you can help me how to get rid of the login page in portal which is I know in every application you create, there should be a login. Is this possible that I can just simply type in to the URL address bar my application then it will no longer ask for any logins? Please help! Many thanks!
    Russel

    Hi Russel,
    You can give public access to pages, applications etc. Users won't need to supply a username/password then, while you still can hide some of the pages to authorized people.
    Check the access tab for pages and the manage tab for applications.

  • How to get client IP in custom UCM Service

    how to get client IP in custom UCM Service ?

    have you tried
    binder.getLocal("REMOTE_ADDR");
    Let us know how you get on
    Tim

  • In Lightroom mobile how can move photos within the collection????

    In Lightroom mobile how can move photos within the collection????

    What you can do is to move (or copy) a photo form one collection to another. This can be triggered via the top right app menu item from grid view. Same menu is available when you open up an image for editing. Hope that helps. -Guido

Maybe you are looking for