Skip to main content
françois leroy
Inspiring
November 17, 2013
Question

AEGP_LayerFlag_LAYER_IS_3D

  • November 17, 2013
  • 1 reply
  • 2715 views

Hi!

I got a crazy problem with AEGP_LayerFlag_LAYER_IS_3D in a layer effect. I'm trying to make a layer automatically collapsed when 3D, and uncollapsed when 2D.

Here's my code:

ERR(suites.PFInterfaceSuite1()->AEGP_GetEffectLayer(in_data->effect_ref, &layerH));
ERR(suites.LayerSuite7()->AEGP_GetLayerFlags( layerH, &flags));

if (flags & AEGP_LayerFlag_LAYER_IS_3D) {
if (flags & ~AEGP_LayerFlag_COLLAPSE) {
ERR(suites.LayerSuite7()->AEGP_SetLayerFlag( layerH, AEGP_LayerFlag_COLLAPSE, TRUE));
}
} else {
if (flags & AEGP_LayerFlag_COLLAPSE) {
ERR(suites.LayerSuite7()->AEGP_SetLayerFlag( layerH, AEGP_LayerFlag_COLLAPSE, FALSE));
}
}

Using the same code with AEGP_LayerFlag_ADJUSTMENT_LAYER instead of AEGP_LayerFlag_LAYER_IS_3D works just fine...

Is there something I don't get about 3D layers?

Thanx,

François

PS: I tried with && instead of &, with LayerSuite1() instead of LayerSuite7()...

This topic has been closed for replies.

1 reply

Community Expert
November 17, 2013

errr...

experiment some.

without any other checks, just force some layer into 3D.

is that working? good.

now force some layer into 2D.

ect...

where does it fail?

françois leroy
Inspiring
November 18, 2013

Hi Shachar!

forcing layer into 2D or 3D works just fine.

Only reading fails...

The crazy thing is it's working just fine with other effects of mine (they're even inside the same solution...)

Cheers,

François

Community Expert
November 18, 2013

checked my code. same check works fine for me with LayerSuite5.

must be something else going wrong there.

is the code block you posted indeed the same as in your plug-in?

is there nothing in between these lines that might mess things up?