Making templateAttrs a const method - so exporting doesn't diry the tool
This commit is contained in:
@@ -91,7 +91,7 @@ HighCarbonToolSteel CastAlloy, Ceramics, Diamond, Sialon or Undefined</UserDocu>
|
||||
<UserDocu>setFromTemplate(xmlString|dictionary) ... fills receiver with values from the template string or dictionary</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="templateAttrs">
|
||||
<Methode Name="templateAttrs" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>templateAttrs() ... returns a dictionary with all attributes</UserDocu>
|
||||
</Documentation>
|
||||
|
||||
@@ -57,7 +57,7 @@ deletes the tool found at the given position</UserDocu>
|
||||
<UserDocu>setFromTemplate(dict) ... restores receiver from given template attribute dictionary</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="templateAttrs">
|
||||
<Methode Name="templateAttrs" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>templateAttrs() ... returns a dictionary representing the receivers attributes for a template</UserDocu>
|
||||
</Documentation>
|
||||
|
||||
@@ -126,10 +126,9 @@ class ToolController:
|
||||
attrs[ToolControllerTemplate.Tool] = obj.Tool.templateAttrs()
|
||||
expressions = []
|
||||
for expr in obj.ExpressionEngine:
|
||||
PathLog.info('%s: %s' % (expr[0], expr[1]))
|
||||
PathLog.debug('%s: %s' % (expr[0], expr[1]))
|
||||
expressions.append({ToolControllerTemplate.ExprProp: expr[0], ToolControllerTemplate.ExprExpr: expr[1]})
|
||||
if expressions:
|
||||
PathLog.info('add expressions')
|
||||
attrs[ToolControllerTemplate.Expressions] = expressions
|
||||
return attrs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user