By default, the script will trim to all layers in your comp (including locked layers), though there are options to change functionality.