我通常不使用MEL编写脚本,因为我对此的了解非常有限。
我做了一个表情,但是它一直在回头

// Error: Line 7.1: Syntax error //

这是表达式:
if (global_IkFk_Ctr.L_Arm == 0) {
    l_Bn_ShoulderJnt_01.scaleX == l_Ik_ShoulderJnt_01.scaleX;
    l_Bn_ElbowJnt_01.scaleX == l_Ik_ElbowJnt_01.scaleX;
}

else (global_IkFk_Ctr.L_Arm == 1) {
    l_Bn_ShoulderJnt_01.scaleX == l_Fk_ShoulderJnt_01.scaleX;
    l_Bn_ElbowJnt_01.scaleX = l_Fk_ElbowJnt_01.scaleX;
}

最佳答案

您的else有一个条件(global_IkFk_Ctr.L_Arm == 1),这意味着它必须是else if

另外,==用于比较,但是您尝试使用它进行赋值。分配应为=

if (global_IkFk_Ctr.L_Arm == 0){
    l_Bn_ShoulderJnt_01.scaleX = l_Ik_ShoulderJnt_01.scaleX;
    l_Bn_ElbowJnt_01.scaleX = l_Ik_ElbowJnt_01.scaleX;
}
else if (global_IkFk_Ctr.L_Arm == 1){
    l_Bn_ShoulderJnt_01.scaleX = l_Fk_ShoulderJnt_01.scaleX;
    l_Bn_ElbowJnt_01.scaleX = l_Fk_ElbowJnt_01.scaleX;
}

09-03 17:17