Sorry, i didnt see your post immediately.
if (selectedLayers[i].property(“motionTracker”)){/**/}
==> this tells you if the layer has a motion tracker group, that is, can accept trackers.
I think (not sure) that only layers with matchName “AVLayer” can be tracked (Solids, precomps, footage, etc) but not cameras, lights, texts and shapes. So, it should be equivalent to (not sure..)
if (selectedLayers[i].matchName === “AVLayer”){/**/}
Nevermind. Then, if the first test is true, to check that the layer actually has tracker(s): if (myLayer.motionTracker.numProperties>0). Overall :
if (myLayer.motionTracker && myLayer.motionTracker.numProperties>0){/**/}
This tells if the motion tracker group exists and has trackers (hence is visible in the timeline).
It can still be that there are no tracker point in it, for instance the user deleted all tracker points…
One last thing, the notation “myLayer.motionTracker…” is the one that appears if you activate an expression somewhere on a tracker property. It’s compact and handy, but you can also use matchNames:
whole tracker group : “ADBE MTrackers”
tracker 1: “ADBE MTracker”
tracker point 1: “ADBE MTracker Pt”
if (myLayer.property(“ADBE MTrackers”) && myLayer.property(“ADBE MTrackers”).numProperties>0){/**/}, etc
Xavier