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

Effect depends on Position, Rotation, Scale of the Layer

New Here ,
Aug 24, 2008 Aug 24, 2008

Copy link to clipboard

Copied

Hi,

I'm creating an effect that depends on the Transformation values (Pos, Rot, scale) of the Layer which the effect is applied. So whenever the user moves the Layer around, the effect needs to be updated.

I've set the flag PF_OutFlag_NON_PARAM_VARY during global setup.
But the PF_Cmd_RENDER is only called when I drag the timeline, not when I move the Layer around.

Any solution?

Thanks
TOPICS
SDK

Views

2.7K

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 ,
Sep 23, 2008 Sep 23, 2008

Copy link to clipboard

Copied

AE doesn't have a method for effects to identify such dependencies. Your best bet is to use parameter supervision (see the Supervisor sample), and check the xform values during PF_Cmd_FRAME_SETUP. If the values your plug-in was using are now stale, save the fresh values, and cancel out of the render. You'll be called to render again, with your fresh values.

Setting a bunch of breakpoints in a debugger will teach you more about param supervision than reading ever will. :)

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 ,
Oct 03, 2008 Oct 03, 2008

Copy link to clipboard

Copied

Hi brooce, Thanks for the tips. I'll try it and hopefully it'll work.

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 ,
Oct 14, 2008 Oct 14, 2008

Copy link to clipboard

Copied

Hello Brooce,

If the effect params do not change, would it be possible to redraw when only the layer properties change?

Your solution above mentions that we can use parameter supervision to get a callback into the effect plugin.
But I only know how to set supervision for effect params, how can we do this for the layer that the effect is applied to?

Thanks!
Chia

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 ,
Oct 28, 2008 Oct 28, 2008

Copy link to clipboard

Copied

You can't; there's no method for effects to identify such dependencies.

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
Community Expert ,
Oct 28, 2008 Oct 28, 2008

Copy link to clipboard

Copied

this solution is a bit shady, but it will do the job.
add another parameter, say, a slider.
using AEGP_setExpression apply to that slider an expression like this:
"position[0] + scale[0] + rotation + anchorPoint[0]"
then, using AEGP_dynamicStreaSuite, make that slider invisible.

so what to you get?
you get a parameter that the user is unaware of, that calls for your plug-in to render automatically whenever the user changes the position, rotation, scale or anchor point.

I hope it helps you,
it worked for me.
:-)

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
Contributor ,
Oct 23, 2021 Oct 23, 2021

Copy link to clipboard

Copied

LATEST

13 years later, your posts are still useful. Thanks shachar

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