subtype idKGScriptParserduration?ð framebaseencodingparms inputFormat inputCountpublicstartpostitlestart positionuitypetypedefaultvalueendpos end position lockaspectv follows h (constrain)minmax startscalex start h scaleF@BÈBÈrampBÆ startscaley start v scaleF@BÈBÈ BÆ endscalex end h scaleF@BÈBÈ BÆ endscaley end v scaleF@BÈBÈ BÆ scalecentre scale centre startcropl start L CropBÈendcropl end L CropBÈ startcropr start R CropBÈendcropr end R CropBÈ startcropt start T CropBÈendcropt end T CropBÈ startcropb start B CropBÈendcropb end B CropBÈ startangle start angle ÅaEaendangle start angle ÅaEa usescalecntreuse scale centre as pivotpivotpivot accelerationease inÀ@motionblurstepsmotion blur steps?€Bð@€@€ B¾motionblurlengthmotion blur lengthBÈ@ @  B¾draftdraft pvw (no blur)privatestaticsscriptq//-------------------------------------// // Look Mum No Keys // // for more visit www.fxscript.org // //-------------------------------------// //copyright 2005 stephen dixon //This software is free - you may use, modify and distribute it as you wish, with the following provisos: //*it may not be used by any military organisation, or to produce goods or services for any military organisation. //* this source code must remain open //* this message and the accompanying doccumentation files must remain with the source //additionally this software is released under the terms of the GNU general Public license //see http://www.gnu.org/licenses/gpl.html for the full text of this license or look at the readme that came with the plugins //this software comes with no warranty of fitness for any purpose whatsoever, ok. //if you like it or if you do something creative with it let me know, I'd love to hear from you. // fxscripts@fxscript.org is the address // this plugin came about because of someone requesting it. If there's something you need - ring the bell.. filter "look mum no keys!"; group "stib's motion tools"; producesAlpha; RenderEachFrameWhenStill input startpos, "start position", Point, 0, 0 input endpos, "end position", Point, 0, 0 input LockAspect, "v follows h (constrain)", CheckBox, true input startScaleX, "start h scale", Slider, 100, 0, 10000 ramp 99; input startScaleY, "start v scale", Slider, 100, 0, 10000 ramp 99; input endScaleX, "end h scale", Slider, 100, 0, 10000 ramp 99; input endScaleY, "end v scale", Slider, 100, 0, 10000 ramp 99; input ScaleCentre, "scale centre", Point, 0, 0 input startCropL, "start L Crop", Slider, 0, 0, 100; input endCropL, "end L Crop", Slider, 0, 0, 100; input startCropR, "start R Crop", Slider, 0, 0, 100; input endCropR, "end R Crop", Slider, 0, 0, 100; input startCropT, "start T Crop", Slider, 0, 0, 100; input endCropT, "end T Crop", Slider, 0, 0, 100; input startCropB, "start B Crop", Slider, 0, 0, 100; input endCropB, "end B Crop", Slider, 0, 0, 100; input startAngle, "start angle", Angle, 0, -3600, 3600; input endAngle, "start angle", Angle, 0, -3600, 3600; input useScaleCntre, "use scale centre as pivot", CheckBox, true input pivot, "pivot", Point, 0, 0 //--------------Ease In control --------------- input Acceleration, "ease in", Slider, 0, -2, 2 input motionBlurSteps, "motion blur steps", Slider, 4, 1, 120 ramp 95 input motionBlurlength, "motion blur length", Slider, 5, 0, 100 ramp 95 input draft, "draft pvw (no blur)", CheckBox, true code //-------------stib's ease in ease out------------------- float e, magicnumber, newRatio, newAcceleration ; magicnumber = 8; e = 2.71828; //just defining a basic constant newRatio = Acceleration*(1-2/(1+power(e,magicnumber*power(ratio,e))))+(1-Acceleration)*ratio newAcceleration = 16*Acceleration*power(ratio, e-1)*power(e, 8*power(ratio, e)+1)/power(power(e, 8*power(ratio, e))+1,2)-Acceleration + 1 //how fekkin clever am I! this actually works. //my superClever easeIn easeOut formula. //----------------------------------------------------- motionBlurlength *= newAcceleration; //scale the motion blur to match any ease out that we've got going. noice. if (draft && previewing) then motionBlurSteps = 1 end if channelfill(dest, 0, 0, 0, 0); exposedBackground = TRUE; float destAspexx, offsetX, offsetY, ScaleX, scaleY, rot8n, MBstep,stepratio, blurRatio, Clipduration, Clipoffset; float cropL, cropR, cropT, cropB; point poly[4], poly1[4], lwrRight; region rgn dimensionsof(dest, lwrRight.X, lwrRight.Y); image buf1[lwrRight.X][lwrRight.Y] destAspexx = aspectOf(dest) startpos *= lwrRight; endpos *= lwrRight; ScaleCentre *= lwrRight; pivot *= lwrRight; if useScaleCntre then pivot = ScaleCentre end if repeat with MBstep = 0 to motionBlurSteps; boundsof(dest, poly) stepratio = MBstep/motionBlurSteps; blurRatio = newRatio + motionBlurlength/100*MBstep/motionBlurSteps ///-----------do the cropping first----------- cropL = (1-blurRatio)* (startCropL / 100 - 0.5)*lwrRight.X + blurRatio * (endCropL / 100 - 0.5)*lwrRight.X cropR = (1-blurRatio)* (0.5 - startCropR / 100)*lwrRight.X + blurRatio * (0.5 - * endCropR / 100)*lwrRight.X cropT = (1-blurRatio)* (startCropT / 100 - 0.5)*lwrRight.Y + blurRatio * (endCropT / 100 - 0.5)*lwrRight.Y cropB = (1-blurRatio)* (0.5 - startCropB / 100)*lwrRight.Y + blurRatio * (0.5 - endCropB / 100)*lwrRight.Y if (cropL < cropR) and (cropT < cropB) //skip the whole hoo-hah if the image is completely cropped poly[0].X = cropL poly[0].Y = cropT poly[1].X = cropR poly[1].Y = cropT poly[2].X = cropR poly[2].Y = cropB poly[3].X = cropL poly[3].Y = cropB poly1 = poly; //------------------------- offsetX = (1-blurRatio)*startpos.X + blurRatio*endpos.X; offsetY = (1-blurRatio)*startpos.Y + blurRatio*endpos.Y; ScaleX = ((1-blurRatio)*startScaleX + blurRatio*endScaleX)/100; if LockAspect then ScaleY = ScaleX; else ScaleY = ((1-blurRatio)*startScaleY + blurRatio*endScaleY)/100; end if rot8n = (1-blurRatio)*startAngle + blurRatio*endAngle; Offset(poly1, offsetX, offsetY); Offset(ScaleCentre, offsetX, offsetY); Offset(pivot, offsetX, offsetY); Scale(poly1, ScaleCentre, ScaleX, ScaleY) Rotate(poly1, pivot, rot8n, destAspexx) if (rot8n == 0) then truncate(poly1, poly1); truncate(poly, poly); end if blitrect(src1, poly, buf1, poly1); Blend( buf1,dest, dest, stepRatio) end if end repeat namelook mum no keys!scriptiddgroupstib's motion tools producesalpharenderEachFrameWhenStillencoded