Skip to main content
Participant
December 29, 2025
Question

AEGP_LayerFlag_LAYER_IS_3D and AEGP_LayerFlag_COLLAPSE Hint Range Issue

  • December 29, 2025
  • 1 reply
  • 58 views

In the Smart Render phase, when using

ERR(extra->cb->checkout_layer_pixels(in_data->effect_ref, CHECK_OUT_INPUT_ID, &input));

checking out a layer that has the AEGP_LayerFlag_LAYER_IS_3D and AEGP_LayerFlag_COLLAPSE flags results in the checked-out layer’s extent_hint being set to the full composition size. Is there a way to obtain the precise extent_hint that only covers the non-zero alpha area? The performance overhead from unnecessary pixels is significant.

1 reply

James Whiffin
Legend
January 20, 2026

Off the top of my head I don't know if this is possible, but a few techniques to try:

  • Does AEGP_GetLayerMaskedBounds give a more efficient rect or is it still the comp dimensions?
  • In pre_render, can you get a more efficient rect by doing a checkout_layer with an empty request rect? If so, you can pass this information to smart_render
  • If the layer is text, you can calculate the most efficient bounds based on the vertices, but not suitable for other layer types.