BadG3r
07-09-2007, 12:16 PM
Hey! Right now Im working my way through "MEL scripting for animators". But I've got to a point I don't know what to do.
I wiped out every error the script editor gave me, but now he tells me this:
// Error: "(" + $curveSelected + "particlesShape.scaleOffset * $normvec * //
// Error: Unterminated string. //
the piece of code it is mentioning is this (its down in the last column):
string $exprString = "float $curve_param = "+ $curveSelected + "particlesShape.age *"
+ $curveSelected + "particlesShape.speed;\n" +
"setAttr " +$mainCurveInfoNode +".parameter $curve_param;\n" +
"setAttr " +$guideCurveInfoNode+".parameter $curve_param;\n" +
"float $pos[] = `getAttr " +$mainCurveInfoNode + ".position`;\n" +
"float $tan[] = `getAttr " +$mainCurveInfoNode + ".normalizedTangent`;\n" +
"float $normEnd[] = `getAttr " +$guideCurveInfoNode + ".position`;\n" +
"float $norm[];\n"+
"$norm[0] = $normEnd[0] - $pos[0];\n" +
"$norm[1] = $normEnd[1] - $pos[1];\n" +
"$norm[2] = $normEnd[2] - $pos[2];\n" +
"vector $posvec = <<$pos[0], $pos[1], $pos[2]>>;\n" +
"vector $tanvec = <<$tan[0], $tan[1], $tan[2]>>;\n" +
"vector $normvec = unit(<<$norm[0], $norm[1], $norm[2]>>);\n" +
"vector $norm2vec = cross($tanvec, $normvec);\n" +
$curveSelected + "particlesShape.position = $posvec + \n" +
"(" + $curveSelected + "particlesShape.scaleOffset * $normvec *
cos (" +$curveSelected + "particlesShape.age*20))+\n" +
"(" + $curveSelected + "particlesShape.scaleOffset * $norm2vec *
sin (" +$curveSelected + "particlesShape.age*20))+\n";
any guess anybody????
thx in advance,
badger
I wiped out every error the script editor gave me, but now he tells me this:
// Error: "(" + $curveSelected + "particlesShape.scaleOffset * $normvec * //
// Error: Unterminated string. //
the piece of code it is mentioning is this (its down in the last column):
string $exprString = "float $curve_param = "+ $curveSelected + "particlesShape.age *"
+ $curveSelected + "particlesShape.speed;\n" +
"setAttr " +$mainCurveInfoNode +".parameter $curve_param;\n" +
"setAttr " +$guideCurveInfoNode+".parameter $curve_param;\n" +
"float $pos[] = `getAttr " +$mainCurveInfoNode + ".position`;\n" +
"float $tan[] = `getAttr " +$mainCurveInfoNode + ".normalizedTangent`;\n" +
"float $normEnd[] = `getAttr " +$guideCurveInfoNode + ".position`;\n" +
"float $norm[];\n"+
"$norm[0] = $normEnd[0] - $pos[0];\n" +
"$norm[1] = $normEnd[1] - $pos[1];\n" +
"$norm[2] = $normEnd[2] - $pos[2];\n" +
"vector $posvec = <<$pos[0], $pos[1], $pos[2]>>;\n" +
"vector $tanvec = <<$tan[0], $tan[1], $tan[2]>>;\n" +
"vector $normvec = unit(<<$norm[0], $norm[1], $norm[2]>>);\n" +
"vector $norm2vec = cross($tanvec, $normvec);\n" +
$curveSelected + "particlesShape.position = $posvec + \n" +
"(" + $curveSelected + "particlesShape.scaleOffset * $normvec *
cos (" +$curveSelected + "particlesShape.age*20))+\n" +
"(" + $curveSelected + "particlesShape.scaleOffset * $norm2vec *
sin (" +$curveSelected + "particlesShape.age*20))+\n";
any guess anybody????
thx in advance,
badger
