// =========================================================================== // 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. // =========================================================================== // // // Creation Date: Nov, 1999 // // Procedure Name: // doCutClipArgList // // Description: // Cut a clip // // Input Arguments: // $version: The version of this option box. Used to know how to // interpret the $args array. // // $args // Version 1 // [0] $name : name of the clip window // Version 2 // [1] $clip : specific clip to cut // global proc doCutClipArgList( string $version, string $args[] ) { int $versionNo = $version; string $clipWnd = $args[0]; string $selClips[]; if (($versionNo >= 2) && ($args[1] != "")) { $selClips[0] = $args[1]; } else { $selClips = getSelectedClips("noOptions"); } string $selBlends[] = getSelectedBlends(); if (size($selBlends) > 0) error( (uiRes("m_doCutClipArgList.kNoClipboardForBlendsErr")) ); if (size($selClips) == 0) error( (uiRes("m_doCutClipArgList.kSelectTheClipsErr")) ); string $sch = ""; for ($clip in $selClips) { if ($sch == "") { $sch = getClipScheduler($clip); } else if (getClipScheduler($clip) != $sch) { error( (uiRes("m_doCutClipArgList.kToPutClipsErr")) ); } } string $copyCmd; if (($version == "2") && ($args[1] != "")) { $copyCmd = "doCopyClipArgList 2 {\"" + $clipWnd + "\", \"" + $args[1] + "\"}"; } else { $copyCmd = "doCopyClipArgList 1 {\"" + $clipWnd + "\"}"; } if (!catch(eval($copyCmd))) { for ($clip in $selClips) { // If the clip being deleted is ghosted, remove the ghost shape // from the scene. string $ghost = getGhostShapeForClip($clip); if (size($ghost)) delete $ghost; int $clipIndex = getClipIndex($clip, $sch); string $cmdString = ("clipSchedule -rm -ci "+$clipIndex+" "+$sch); evalEcho $cmdString; } } }