Help with old Script
Hi
Im following a old maya 2013 tutorial. Atm i try to build write a FK /IK snap script. $r_upperArm = `xform -query -worldSpace -rotation leftUpperArm_FK_snap_JNT`; xform -worldSpace -rotation $r_upperArm[0] $r_upperArm[1] $r_upperArm[2] leftUpperArm_FK_CTRL; This is the old script. xform -query -worldSpace -rotation leftUpperArm_FK_snap_JNT this part was working fine. But when i wanna store the xform into $r_upperArm its not working anymore. Im using maya 2018 and tryed this version: $r_upperArm = xform ("-query -worldSpace -rotation L_upperArm_FK_snap_JNT"); xform -worldSpace -rotation $r_upperArm[0] $r_upperArm[1] $r_upperArm[2] L_upperArm_FK_CTRL; But im getting the error: // Error: xform -worldSpace -rotation $r_upperArm[0] $r_upperArm[1] $r_upperArm[2] L_upperArm_FK_CTRL; // // Error: Line 2.54: "$r_upperArm" is not an array. // // Error: xform -worldSpace -rotation $r_upperArm[0] $r_upperArm[1] $r_upperArm[2] L_upperArm_FK_CTRL; // // Error: Line 2.69: "$r_upperArm" is not an array. // // Error: xform -worldSpace -rotation $r_upperArm[0] $r_upperArm[1] $r_upperArm[2] L_upperArm_FK_CTRL; // // Error: Line 2.91: "$r_upperArm" is not an array. // I new to mel scripting and rly hope somebody can help me ;D best regards |
Hi, I don't script in MEL, but the double quotes in this statement might be an issue $r_upperArm = xform ("-query -worldSpace -rotation L_upperArm_FK_snap_JNT"); In C# the double quotes would mean you are trying to store text into an array. I hope this helps ( I haven't done any programming for a long time and I am rusty).
|
All times are GMT. The time now is 07:30 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018