pasteKey problem

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
Prev Previous Post   Next Post Next
  10 October 2012
pasteKey problem

Hello everyone,

I hope you can help with this because I'm getting mental here hehe.. So this is the problem: I'm trying to copy some keyframes for an animation to another one, the copy part it's perfect, but when I use the comand "pasteKey -t $p;" it's not pasting it in frame $p, it's doing it in the first frame. I checked if the value of $p was correct and it is. So I don't know what the problem can be.

global proc copiarAni(string $ani, string $b1, string $e1, string $b2) {

//Extraer los campos
$a=`textField -query -text $ani`+":ctrl_*";
$x=`textField -query -text $b1`;
$y=`textField -query -text $e1`;
$p=`textField -query -text $b2`;
$a2=`textField -query -text $ani`+":ctrl_Maestro*";
$frame1= ""+$x+":"+$y+"";

select -r `ls -tr "nurbsCurve" $a`;
select -d $a2;
copyKey -time $frame1;
select -r `ls -tr "nurbsCurve" $n`;
select -d $n2;
pasteKey -t $p;

// print ($p+", ");

//Crear una ventana

if (`window -ex ventana`) deleteUI ventana;
window -sizeable false -width 80 -height 60 ventana;
columnLayout -adjustableColumn true -rowSpacing 12;
frameLayout -label "Animacion a Copiar" -collapsable true;
//Campo texto
columnLayout -adjustableColumn true -rowSpacing 2;
//Campo texto
$ani=`textField -w 80 -tx "Nombre_golpe" frame0`;
setParent ..;
columnLayout -adjustableColumn false -rowSpacing 2;
$b1=`textField -w 80 -tx "Frame_Begin" frame1`;
$e1=`textField -w 80 -tx "Frame_End" frame2`;
setParent ..;
setParent ..;
frameLayout -label "Intervalo a donde copiar" -collapsable true -collapse false;
columnLayout -adjustableColumn false -rowSpacing 2;
$b2=`textField -w 80 -tx "Frame_Begin" frame1_1`;
//$e2=`textField -w 80 -tx "Frame_End" frame2_2`;
setParent ..;
setParent ..;
button -label "Copiar Animacion" -command "copiarAni($ani,$b1,$e1,$b2);";
setParent ..;

showWindow ventana;

Please if you can help me would be lovely.
Thank you
  share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 11:20 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.