-
.duration not working
Hello,
I’m trying to obtain the duration of a layer, but AE refuses to co-operate. It just gives me the error “Class: ‘Layer’ has no property or method named ‘duration’. It bloody does have “duration”!
I’ve created a text layer and put into the source text the expression:
thing=thisComp.layer(“95253_00_02_MM30_Killed_Key_test.mov 2”);
thing.durationI’ve also tried:
thisComp.layer(“95253_00_02_MM30_Killed_Key_test.mov 2”).duration
What is After Effects’ major malfunction?!
If I modify the expression to:
thing=thisComp.layer(“95253_00_02_MM30_Killed_Key_test.mov 2”);
thing.source.duration…then it works…but gives me the duration of the source footage, ignoring the in/out points I’ve set on that layer. I’ve made a temporary workaround, subtracting the inpoint from the outpoint:
thisComp.layer(“95253_00_02_MM30_Killed_Key_test.mov 2”).outPoint-thisComp.layer(“95253_00_02_MM30_Killed_Key_test.mov 2”).inPoint
But why won’t “duration” just work?!
– Paul