hello everybody!
i'm confronted with a really strange problem (well - i think it's strange, but perhaps it's normal
)
I use a mel procedure to create an expression. And when I compare a print out of my string which i will use for my expression and the final expression created in Maya, there's a big difference between them. But it works! Only when I try to save my scene and reopen it the expression won't work anymore.
But when I make a copy paste manually of my print out into the expression Editor everything works fine and I can save and reopen my scene. ( but it's a little bit anoying to make a manual copy-paste at each time)
When I take a look at the expression automatically created by my mel procedure every line who makes a connection to an existing node in the scene I finally find the problem. For example my print out of the string used to create the expression:
...
strokeShape1.pressureScale[31].pscfv = $paintScaleValue[30];
strokeShape1.pressureScale[32].pscfv = $paintScaleValue[31];
...
but in my expression i see the following stuff:
...
strokstrokeShape1.pressureScale[31].pressureScale_FloatValueaintScaleValue[30];
strokstrokeShape1.pressureScale[32].pressureScale_FloatValueaintScaleValue[31];
...
or another one:
the print out of my string:
int $j;
$scaleValue[0] = CTR_scale_curve1_paintEffect_curve.scale_1;
$scaleValue[1] = CTR_scale_curve1_paintEffect_curve.scale_2;
$scaleValue[2] = CTR_scale_curve1_paintEffect_curve.scale_3;
$scaleValue[3] = CTR_scale_curve1_paintEffect_curve.scale_4;
$scaleValue[4] = CTR_scale_curve1_paintEffect_curve.scale_5;
$scaleValue[5] = CTR_scale_curve1_paintEffect_curve.scale_6;
$scaleValue[6] = CTR_scale_curve1_paintEffect_curve.scale_7;
$scaleValue[7] = CTR_scale_curve1_paintEffect_curve.scale_8;
$scaleValuePos[0] = 0;
and in my expression i find:
int $j;
$scaleValue[0] = CTR_sCTR_scale_curve1_paintEffect_curve.scale_1aleValue[1] = CTR_sCTR_scale_curve1_paintEffect_curve.scale_2aleValue[2] = CTR_sCTR_scale_curve1_paintEffect_curve.scale_3aleValue[3] = CTR_sCTR_scale_curve1_paintEffect_curve.scale_4aleValue[4] = CTR_sCTR_scale_curve1_paintEffect_curve.scale_5aleValue[5] = CTR_sCTR_scale_curve1_paintEffect_curve.scale_6aleValue[6] = CTR_sCTR_scale_curve1_paintEffect_curve.scale_7aleValue[7] = CTR_sCTR_scale_curve1_paintEffect_curve.scale_8aleValuePos[0] = 0;
Well, you see there's a strange difference between them. And it's clear that it won't work when I save and reopen the scene. Only after applying my script it works - also very strange!
And this happens every time when there's a connection to do between the expression and a node in the scene.
Do you have any ideas???
Thanks,
Carlo