pasteKey problem

Become a member of the CGSociety

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

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  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`;
$n="ctrl_*";
$a2=`textField -query -text $ani`+":ctrl_Maestro*";
$n2="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+", ");
return;
}

//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
 
  10 October 2012
You probably solved this by now, but anyway....

If you want to paste keys manually, it won't work unless a target node doesn't have at least on key, or animation curve.
Maybe that is the same problem with your script.
Try to add a single keyframe on a desired attribute, just before you paste.

Hope it helps,
cheers
Dejan
__________________
>> Deform CG Studio <<
 
  10 October 2012
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed 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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 12:53 PM.


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