Scripting: strange behaviour when accesing filters in clips in FCP XML
Say I have the following Final Cut XML file, describing a sequence with clips in it:
As you can see, one of the clipitem elements has 2 filter descendants, while the other one only has one.
When this code accesses an element with just one filter, I get:
Without the "filter" tag. but if I access an element with 2 filters, I get the proper tree as it appears on the XML:
The same thing happens if I try to use the "descendants()" method from Extendscript. The docs say that it will return matching elements "at any level", but if I try:
In the first clip of the XML above, which has 2 filters, I get
And in the second clip, which has only one filter, I get nothing.
What's going on? Why does this happen?