Hi all,
I have a custom node which holds a string attribute. Precisely:
CODE
"object3.translateX = object1.translateX + object2.translateX;"
I am simply trying to connect this string attribute to the expression attribute of an expression node by:
CODE
createNode ("expression");
connectAttr customNode.xformRule[0] expression1.expression;
This does not work! I don't understand why. When I use setAttr to set that exact string to the expression node, it works fine, but when it is coming from another attribute, it fails.
The connection is first made in the hypergraph, then it is immediately followed by an '"expression -edit ..." command, and a series of errors, and finally by the error: "Expression invalid after edit". The connection remains in the hypergraph, but the expression node does not contain the string. This is the exact error after using connectAttr as above. I have even tried setting the input[] connections to the expression node manually, but the expression attribute does not hold! Thanks in advance.
CODE
connectAttr customNode.xformRule[0] expression1.expression;
// Result: Connected customNode.xformRule to expression1.expression //
expression -e -ae 1 -o "" -a "" -s "object3.translateX = object1.translateX + object2.translateX;" expression1;
// Error: line 1: Connection not made: 'object1.translateX' -> 'expression1.input[0]'. Connections cannot be modified during evaluation. //
// Error: Connection failed from object1.translateX to expression1.input[0] //
// Error: line 1: Connection not made: 'object1.translateX' -> 'expression1.input[0]'. Connections cannot be modified during evaluation. //
// Error: Connection failed from object2.translateX to expression1.input[1] //
// Error: line 1: Connection not made: 'object1.translateX' -> 'expression1.input[0]'. Connections cannot be modified during evaluation. //
// Error: Connection failed from expression5.output[0] to object3.translateX //
// Error: line 1: Connection not made: 'object1.translateX' -> 'expression1.input[0]'. Connections cannot be modified during evaluation. //
// Error: Expression invalid after edit. //