A ProjectItem contains “name” & “type” property
It seems like type is set to 2 for Bin and set to 1 for anything else ( sequence and audio/video clips).
Questions / suggestion:
- Why no defined constant to map to this ? (so one could do something like
if (projItem.type == pproj.constant.PROJECT_ITEM_TYPE.FOLDER) - Why no different type value for Sequence ?
- The sequence should probably its own type (
SequenceProjectItem) / moved out of theClipProjectItemtype. As-is it theClipProjectItemseems like a “Franken-Type” (aka patch of unrelated things sewn together)- Name is misleading (a sequence is not a clip)
- Some Methods do not seem to apply to the a sequence (expl:
getMedia,isMergedClip,proxyPath, …) - Bonus: “
isSequence“ would then be useless
I’m querying for the element selected in the project Item panel and need to take action based on this.
I’m no confident that number (“2“ for Bin) will not change at one point (or that this is actually mapping to what I think it does), hence I have to do an extra cast to FolderItem (and verify for non-null/non-empty) to ensure this is indeed a folder.