You see @Anonymous , wonders happen.
With that great help from @mcw0 the script works.
// resamples animation from one rotation order to another
string $sel[] = `ls -sl` ;
// save current rot order for every object in selection
int $roos[] ;
$i = 0 ;
for ( $s in $sel ) {
$roos[$i] = `getAttr ($s+".rotateOrder")` ;
$i++ ;
}
// resample keyframes within the playback range
$start = `playbackOptions -q -min` ;
$end = `playbackOptions -q -max` ;
print("Resampling range: "+ $start +" - "+ $end +"\n") ;
$axis = { "x", "y", "z"} ;
for ( $i = $start; $i <= $end; $i++ ) {
currentTime -e $i ;
for ( $j = 0; $j < size($sel); $j++ ) {
select -r $sel[$j] ;
setAttr ($sel[$j]+".rotateOrder") $roos[$j] ;
xform -p true -roo zxy $sel[$j]; // HERE YOU SET DESIRED ROT ORDER
for ($a in $axis){
$val = `getAttr ($sel[$j] +".r"+ $a)` ;
setKeyframe -at (".r"+ $a) -v $val ;
}
}
}
See entire discussion here.
And support the idea here.
,,,_°(O__O)°_,,,
Maya2019.1 @ Windows10 & GeForce GTX1080Ti
If the post was helpful, click the ACCEPT SOLUTION button, so others might find it much more easily.