// RecordPivotRotate+ @name "RecPivotRotate+" @version 2.5 @warnings @script generic generic { var CurScene = Scene(); var CurItems = CurScene.getSelect(); if(CurItems == nil) return; if(CurItems[1].isCamera() || CurItems[1].isLight()) return; var CurTime = CurScene.currenttime; var ItemNum = CurItems.size(); // AutoKeyフラグの保存 @if version != 2.5 var AutoFlag; AutoFlag = CurScene.generalopts[7]; if(!AutoFlag) AutoKey(); @end var CurRot, CurPvtRot; if(ItemNum == 1){ CurPvtRot = CurItems[1].param(PIVOTROT, CurTime); CurRot = CurItems[1].param(ROTATION, CurTime); if((CurRot != <0.0,0.0,0.0>) && (CurPvtRot == <0.0,0.0,0.0>)) RecordPivotRotation(); else info("
PivotRotate is not 0"); }else{ var flag = 0; for(i = 1; i <= ItemNum; i++){ CurPvtRot = CurItems[i].param(PIVOTROT, CurTime); CurRot = CurItems[i].param(ROTATION, CurTime); if((CurRot != <0.0,0.0,0.0>) && (CurPvtRot == <0.0,0.0,0.0>)){ SelectItem(CurItems[i].id); RecordPivotRotation(); }else{ flag++; } } if(ItemNum > 1){ SelectItem(CurItems[ItemNum].id); for(i = ItemNum - 1; i >= 1; i--) AddToSelection(CurItems[i].id); } if(flag) info("
Many Item's PivotRotate is not 0"); } // 保存してあるAutoKeyフラグに応じる @if version != 2.5 if(!AutoFlag) AutoKey(); @end }