我通常不会在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;
}
答案 0 :(得分:1)
您的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;
}