chiark / gitweb /
Add uppercase STL and HEX to file dialog filters for linux/MacOS
[cura.git] / Cura / cura_sf / fabmetheus_utilities / geometry / statements / return.py
1 """
2 Polygon path.
3
4 """
5
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.
8 import __init__
9
10 from fabmetheus_utilities.geometry.geometry_utilities import evaluate
11
12
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'
17
18
19 def processElementNode(elementNode):
20         "Process the xml element."
21         functions = elementNode.getXMLProcessor().functions
22         if len(functions) < 1:
23                 return
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)
30                 else:
31                         elementNode.xmlObject = []
32         if len( elementNode.xmlObject ) > 0:
33                 function.returnValue = evaluate.getEvaluatedExpressionValueBySplitLine(elementNode, elementNode.xmlObject)