Start a new topic


Original Post by: elange Mon May 16 17:58:00 2011

Is there any way to get a result other than boolean out of the Node Expressions?

What I am trying to do is something like:

mgnodeexpression poly = mgNewNodeExpressionOperator(MEOP_ADD);

mgNodeExpressionSetLeft(poly, mgNewNodeExpressionGetAtt(fltLayerTexture1));

mgNodeExpressionSetRight(poly, mgNewNodeExpressionInteger(4));

short newvalue = mgNodeExpressionEvaluateAsInt(poly);

mgSetAttList(rec, fltLayerTexture2, newvalue, MG_NULL);

I can't find anything like mgNodeExpressionEvaluateAsInt or mgNewNodeExpressionSetAtt. I know in this case I could just code the mgGetAttList to get the Layer 1 texture, but I am planning on using the more general mgNodeExpressionLoadFromString to construct the expression.

1 Comment

Original Post by: SteveThompson Mon May 16 19:42:11 2011

Node expressions are designed to be used to build node lists using mgFind and mgFindEx. As such they are meant to yield boolean expressions to know which nodes should be included in the node lists returned by these functions. I am not sure what they would do with Non-boolean results.

It is not quite clear what you are really trying to do here. Can you clarify?


Login to post a comment