alredha
04-01-2008, 02:28 PM
hello
as far as i know that any object can't get its worldMatrix plugged (read only!)... right?
in the doc, it's written that the output of an fourByFourMatrix can be connected only to an attribute of matrix type, fine...while when we use getAttr command it returns an array of floats...fine too
so, i said let's use an expression to get the output and feed it with an xform command to the object :
// the node already exist and called fbfmatrix
float $mat[16];
$mat = fbfmatrix.output;
// Error: Cannot cast data of type float to float[]. //
i tried to use float instead
float $mat;
$mat = fbfmatrix.output;
// Error: Attributes must be of float, integer, or boolean types: output //
so i tried getAttr, and it works fine...
it's only that the expression is not a part of a pipe of nodes, evaluated only when i hit the edit button,
here is the network :
pointOnCurve.nn --> fbfmatrix.00 fbfmatrix.01 fbfmatrix.02
pointOnCurve.nt --> fbfmatrix.04 fbfmatrix.05 fbfmatrix.06
the same normmalizedNormal and normalizedTangent get through a cross operation (vectorProduct node)
vectorProduct.output --> fbfmatrix.08 fbfmatrix.09 fbfmatrix.10
pointonCurve.p --> fbfmatrix.12 fbfmatrix.13 fbfmatrix.14
like that i have a complete transformation matrix based on a pointOnCurve node, so whatever i change the parameter, the whole network must update,....this is not the case with getAttr in the expression.
i hope i'm clear :) thank you
as far as i know that any object can't get its worldMatrix plugged (read only!)... right?
in the doc, it's written that the output of an fourByFourMatrix can be connected only to an attribute of matrix type, fine...while when we use getAttr command it returns an array of floats...fine too
so, i said let's use an expression to get the output and feed it with an xform command to the object :
// the node already exist and called fbfmatrix
float $mat[16];
$mat = fbfmatrix.output;
// Error: Cannot cast data of type float to float[]. //
i tried to use float instead
float $mat;
$mat = fbfmatrix.output;
// Error: Attributes must be of float, integer, or boolean types: output //
so i tried getAttr, and it works fine...
it's only that the expression is not a part of a pipe of nodes, evaluated only when i hit the edit button,
here is the network :
pointOnCurve.nn --> fbfmatrix.00 fbfmatrix.01 fbfmatrix.02
pointOnCurve.nt --> fbfmatrix.04 fbfmatrix.05 fbfmatrix.06
the same normmalizedNormal and normalizedTangent get through a cross operation (vectorProduct node)
vectorProduct.output --> fbfmatrix.08 fbfmatrix.09 fbfmatrix.10
pointonCurve.p --> fbfmatrix.12 fbfmatrix.13 fbfmatrix.14
like that i have a complete transformation matrix based on a pointOnCurve node, so whatever i change the parameter, the whole network must update,....this is not the case with getAttr in the expression.
i hope i'm clear :) thank you
