6 from __future__ import absolute_import
7 #Init has to be imported first because it has code to workaround the python bug where relative imports don't work if the module is imported as a main module.
10 from fabmetheus_utilities.geometry.geometry_utilities import evaluate
13 __author__ = 'Enrique Perez (perez_enrique@yahoo.com)'
14 __credits__ = 'Art of Illusion <http://www.artofillusion.org/>'
15 __date__ = '$Date: 2008/02/05 $'
16 __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
19 def processElementNode(elementNode):
20 "Process the xml element."
21 functions = elementNode.getXMLProcessor().functions
22 if len(functions) < 1:
24 function = functions[-1]
25 function.shouldReturn = True
26 if elementNode.xmlObject == None:
27 if 'return' in elementNode.attributes:
28 value = elementNode.attributes['return']
29 elementNode.xmlObject = evaluate.getEvaluatorSplitWords(value)
31 elementNode.xmlObject = []
32 if len( elementNode.xmlObject ) > 0:
33 function.returnValue = evaluate.getEvaluatedExpressionValueBySplitLine(elementNode, elementNode.xmlObject)