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

checkout different layer

Guest
Aug 30, 2015 Aug 30, 2015

     hi,everyone!

     I'm now facing a problem about checkout different layer data. I have read the example project "checkout",and I can get frames of a video in different time using PF_CHECKOUT_PARAM. In this example, I also see a function PF_CheckoutLayerChannel which can get the data PF_ChannelChunk chunk, but I know little of PF_ChannelChunk from the After_Effects_SDK_Guide, so as the datatype PF_ChannelRef and PF_ChannelDesc. What I want to do is input two different videos in AE and get the correspondding frames of them seperately, How can I do it ?

     Any suggestions are welcome!

     Thank you!

TOPICS
SDK
1.8K
Translate
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

correct answers 1 Correct answer

Enthusiast , Sep 14, 2015 Sep 14, 2015

Hi again,

I think you can try to change the default value in your case PF_ADD_LAYER("Source", 2, SOURCE);

I've never tried, so you'll have to... But it should work, if and only if you have at least 2 layers in your comp. And there is no way that I know to check how many layers you have when you apply the effect...

But definitely, prefer PF_ADD_LAYER to PF_ADD_SLIDER. A layer parameter is automatically updated by AE when you change layer's index, add a layer, etc... Also, it only shows "selectable l

...
Translate
Guest
Aug 31, 2015 Aug 31, 2015

Well,maybe this question is too wide.So could anyone please tell me whether I'm on the right way? using  PF_CheckoutLayerChannel to get get the corresponding frames of two input videos seperately?

Any suggestions will be highly appreciate!

Thank you!

Translate
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
Guest
Sep 09, 2015 Sep 09, 2015

捕获.PNG

hi,everyone,The problem can be described like this, I have two videos in my timeline window, but when I use PF_CHECKOUT_PARAM, I can only get the data of first video which is shown in the composition window, How can I checkout the second layer,I was stuck several days,could anybody help me? any suggestion will be highly appreciate!!!

Translate
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
Enthusiast ,
Sep 09, 2015 Sep 09, 2015

Hi,

I might be wrong, but I think you need to use a Layer parameter, then checkout this parameter.

Or did I misunderstood the problem?

Cheers,

François

Translate
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
Guest
Sep 09, 2015 Sep 09, 2015

Hi,François

     Thanks for your reply!

     Yes, I do use a Layer parameter, but in the user guide, it devoted that maybe I can only checkout the current layer, that means that I can only checkout the layer which index is "1" in the timeline window? How to find a way to checkout the layer under the current layer? or can I choose a layer to be current layer?

 

Cheers,

Heng

捕获.PNG

Translate
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
Enthusiast ,
Sep 09, 2015 Sep 09, 2015

Hi Heng,

let me explain in details. You probably don't need that much info, but it'll help finding the error:

1_In ParamsSetup, you have something like this:

AEFX_CLR_STRUCT(def);

PF_ADD_LAYER("Source", 0, SOURCE);

It means that when your effect is applied to a layer, you can choose any layer (including yours) in the composition with this parameter.

2_In your render function you have:

PF_ParamDefcheck;
AEFX_CLR_STRUCT(check);

ERR(PF_CHECKOUT_PARAM(  in_data,
SOURCE,
in_data->current_time,
in_data->time_step,
in_data->time_scale,
&check));

now, you can access the layer's pixels using check.u.ld

When you're done with your pixels, don't forget to checkin:

ERR2(PF_CHECKIN_PARAM(in_data,

&check));

Hope it helps,

François

Translate
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
Guest
Sep 10, 2015 Sep 10, 2015

Hi,François

      It's so kind of you to answer my question! well, it dose work!

     And I still have another question.that can we change the default state of the layer added by PF_ADD_LAYER

     since we use PF_ADD_LAYER("Source", 0, SOURCE); to add a layer which id is SOURCE,and we set its default content as PF_LayerDefault_NONE,  another default state is PF_LayerDefault_MYSELF, can we set the default to a specific layer?  which means after we first apply the effect, in effect control window, it will not show like this

QQ截图20150910223839.png

but will show like this

QQ截图20150910225053.png

the "left1.avi" is a specific layer added by customer.

forgive my poor English, Thank you again!

Translate
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
Guest
Sep 10, 2015 Sep 10, 2015

And I think if I can get the value of this slide bar, that also works. There is a little introduction of PF_ADD_LAYER in user guide ,How can I find more information, I always feel so guilty to waste so much time of you to answer my question.

QQ截图20150910225053.png

Translate
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
Enthusiast ,
Sep 14, 2015 Sep 14, 2015

Hi again,

I think you can try to change the default value in your case PF_ADD_LAYER("Source", 2, SOURCE);

I've never tried, so you'll have to... But it should work, if and only if you have at least 2 layers in your comp. And there is no way that I know to check how many layers you have when you apply the effect...

But definitely, prefer PF_ADD_LAYER to PF_ADD_SLIDER. A layer parameter is automatically updated by AE when you change layer's index, add a layer, etc... Also, it only shows "selectable layers", it means for example you won't get cameras or lights as they don't have pixels associated.

Hope it helps,

François

Translate
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
Guest
Sep 16, 2015 Sep 16, 2015
LATEST

Thanks a lot, francois! your reply help me a lot! It dose work!

Translate
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