// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== global proc int getClipAbsState(string $clipName) // // Description: // Determine whether a clip's channels are relative, absolute or a // mix of the two // // Input Arguments: // $clipName - the name of the clip we'd like information about // // Return Value: // 0 - All channels on the clip are relative // 1 - All channels on the clip are absolute // 2 - Some channels on the clip are relative // { // Determine the clip's scheduler and index string $sched = getClipScheduler($clipName); int $index = getClipIndex($clipName,$sched); // Check if all channels are relative int $rel = `clipSchedule -clipIndex $index -query -allRelative $sched`; if($rel == 1) return 0; // Check if all channels are absolute int $abs = `clipSchedule -clipIndex $index -query -allAbsolute $sched`; if($abs == 1) return 1; // if we go here, that means there is some channels that are absolutes or others that are relative return 2; }