Skip to main content
Inspiring
October 12, 2023
Answered

Selecting a specific layer property key

  • October 12, 2023
  • 1 reply
  • 386 views

Hi all!!!

 

 

The mask "Mask 1" in the Mask Path property has several keys. How to use a script to select the first key of a mask? Make it active...

var compMotion = f_findCompItemByName("Motion")

var layerMotionFrame = compMotion.layer("MotionFrame")
var carentMask = layerMotionFrame.mask(1)
carentMask.selected = true
var propMaskPath = carentMask.maskPath
propMaskPath.keySelected(1) ???

 

This topic has been closed for replies.
Correct answer Dan Ebberts

I think this is what you're looking for:

propMaskPath.setSelectedAtKey(1,true);

1 reply

Dan Ebberts
Community Expert
Dan EbbertsCommunity ExpertCorrect answer
Community Expert
October 12, 2023

I think this is what you're looking for:

propMaskPath.setSelectedAtKey(1,true);