Scripting User Guide - Toon Boom Online Help

Transcription

Scripting User Guide

Legal NoticesPublished by Toon Boom Animation Inc.Corporate Headquarters7 Laurier Avenue EastMontreal, QuebecCanada H2T 1E4Tel: (514) 278-8666Fax: (514) 278-2666toonboom.comDisclaimerThe content of this manual is covered by a specific limited warranty and exclusions and limit of liability under theapplicable License Agreement as supplemented by the special terms and conditions for Adobe Flash File Format(SWF). Please refer to the License Agreement and to those special terms and conditions for details.The content of this manual is the property of Toon Boom Animation Inc. and is copyrighted. Any reproduction in wholeor in part is strictly prohibited.For additional copies of this manual, please contact Toon Boom Animation Inc. at the Corporate Headquartersaddress.Copyright 2010 by Toon Boom Animation Inc. All rights reserved.TrademarksToon Boom Animate is a trademark owned by Toon Boom Animation Inc. All other trademarks are the property oftheir respective owners.CreditsDocumentation Development: Peter CawthorneContent Development: Marie-Eve Chartrand, Anouk Whissell, Shabana AliArt Development: Marie-Eve Chartrand, Anouk Whissell, Shabana Ali, Tania Gray, Annie RodrigueProduct Manager: Sébastien MiglioPublication DateMarch 2010

ContentsChapter 1: Scripting Introduction. 9Scripting Overview . 9Scripting Template . 9Using Qt Script to Automate Toon Boom Animate Functions . 9Creating a Qt Script . 10Exporting and Importing Scripts . 10Linking a Script to a Toolbar Button . 11Animate Server Network Environment . 12Using Qt Script to Automate Toon Boom Animate Functions - server functions . 12Exporting and Importing Scripts . 14Linking a Script to a Toolbar Button . 15Scripting Reference . 15Chapter 2: Scripting Reference . 17Function Summary . 18About . 35animate . 37animatePro . 37applicationPath . 37controlCenterApp . 37demoVersion . 37educVersion . 38fullVersion . 38getApplicationPath . 38getFlavorString . 38getVersionInfoStr . 38harmony . 39interactiveApp . 39isAnimate . 39isAnimatePro . 39isControlCenterApp . 39isDemoVersion . 40isEducVersion . 40isFullVersion . 40isHarmony . 40isInteractiveApp . 40isLinuxArch . 41isMacArch . 41isMacIntelArch . 41isMacPpcArch . 41isMainApp . 41isPaintMode . 42isScanApp . 42isStage() . 42isWindowsArch . 42isXsheetMode . 42linuxArch . 43macArch . 43macIntelArch . 43macPpcArch . 43mainApp . 43paintMode . 44productName . 44scanApp . 44stage . 44windowsArch . 441

Animate 2 Scripting User GuidexsheetMode . 45Action . 46perform . 46Column . 47add . 48clearKeyFrame . 48getColorForXSheet . 48getColumnListOfType . 48getCurrentVersionFor Drawing . 49getDisplayName . 49getDrawingColumnList . 49getDrawingName . 49getDrawingTimings . 49getElementIdOfDrawing . 50getEntry . 50getName . 50getNextKeyDrawing . 50getTextOfExpr . 51importSound . 51isKeyFrame . 51numberOf . 51rename . 52setColorForXSheet . 52setElementIdOfDrawing . 52setEntry . 53setKeyFrame . 53setTextOfExpr . 53type . 54CopyPaste . 55createTemplateFromSelection . 55pasteTemplateIntoScene . 55usePasteSpecial . 56setPasteSpecialCreateNewColumn . 56setPasteSpecialElementTimingColumnMode . 57setPasteSpecialAddRemoveMotionKeyFrame . 57setPasteSpecialAddRemoveVelocityKeyFrame . 57setPasteSpecialAddRemoveAngleKeyFrame . 57setPasteSpecialAddRemoveSkewKeyFrame . 57setPasteSpecialAddRemoveScalingKeyFrame . 58setPasteSpecialForcesKeyFrameAtBegAndEnd . 58setPasteSpecialOffsetKeyFrames . 58setPasteSpecialReplaceExpressionColumns . 58setPasteSpecialDrawingAction . 58setPasteSpecialDrawingFileMode . 59setPasteSpecialDrawingAutomaticExtendExposure . 59setPasteSpecialColorPaletteOption . 59Element . 60add . 60fieldChart . 60Folder . 61getNameById . 61id . 61numberOf . 61pixmapFormat . 61remove . 62renameById . 62scanType . 62vectorType . 622

Exporter . 63cleanExportDir . 63getExportDir . 63Frame . 64current . 64insert . 65numberOf . 65remove . 65setCurrent . 65Function Curve . 66addCtrlPointAfter3DPath . 68addKeyFrame3DPath . 68angleEaseIn . 68angleEaseOut . 69holdStartFrame . 69holdStep . 69holdStopFrame . 69numberOfPoints . 70numberOfPoints3DPath . 70pointBias3DPath . 70pointConstSeg . 70pointContinuity . 71pointContinuity3DPath . 71pointEaseIn . 71pointEaseOut . 71pointHandleLeftX . 72pointHandleLeftY . 72pointHandleRightX . 72pointHandleRightY . 72pointLockedAtFrame . 73pointTension3DPath . 73pointX . 73pointX3DPath . 73pointY . 74pointY3DPath . 74pointZ3DPath . 74removePoint3DPath . 74setBezierPoint . 75setEasePoint . 75setHoldStartFrame . 76setHoldStep . 76setHoldStopFrame . 76setPoint3DPath . 76setVeloBasedPoint . 77MessageLog . 78debug . 78isDebug . 78setDebug . 78trace . 78Node . 79add . 81addCompositeToGroup . 81coordX . 81coordY . 81createGroup . 82deleteNode . 82dstNode . 82equals . 823

Animate 2 Scripting User GuideexplodeGroup . 83flatDstNode .

Animation\Toon Boom Animate\780-scripts To create a script: 1. Click on the Edit Script button in the Scripting Tools toolbar. The QSA Workbench dialog box opens. 2. Select File New Script . Chapter 1: Scripting Introduction. {} .