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 if elementNode.xmlObject == None:
22 if 'condition' in elementNode.attributes:
23 value = elementNode.attributes['condition']
24 elementNode.xmlObject = evaluate.getEvaluatorSplitWords(value)
26 elementNode.xmlObject = []
27 if len( elementNode.xmlObject ) < 1:
29 xmlProcessor = elementNode.getXMLProcessor()
30 if len( xmlProcessor.functions ) < 1:
32 function = xmlProcessor.functions[-1]
33 while evaluate.getEvaluatedExpressionValueBySplitLine(elementNode, elementNode.xmlObject) > 0:
34 function.processChildNodes(elementNode)