From 1dd18cc970ba4e34cb5cabd2b8a3d42c1111697d Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Tue, 12 Sep 2017 22:03:15 -0700 Subject: [PATCH] Added restore from dictionary to Tool and templateAttrs for their retreival. --- src/Mod/Path/App/ToolPy.xml | 7 +- src/Mod/Path/App/Tooltable.cpp | 103 ++++++++++++++----------- src/Mod/Path/App/Tooltable.h | 2 + src/Mod/Path/App/TooltablePyImp.cpp | 79 +++++++++---------- src/Mod/Path/CMakeLists.txt | 1 + src/Mod/Path/PathTests/TestPathTool.py | 85 ++++++++++++++++++++ src/Mod/Path/TestPathApp.py | 1 + 7 files changed, 188 insertions(+), 90 deletions(-) create mode 100644 src/Mod/Path/PathTests/TestPathTool.py diff --git a/src/Mod/Path/App/ToolPy.xml b/src/Mod/Path/App/ToolPy.xml index 58b0b99cf4..af60f46527 100644 --- a/src/Mod/Path/App/ToolPy.xml +++ b/src/Mod/Path/App/ToolPy.xml @@ -88,7 +88,12 @@ HighCarbonToolSteel CastAlloy, Ceramics, Diamond, Sialon or Undefined - fromTemplate(xmlString) ... fills receiver with values from the template string + fromTemplate(xmlString|dictionary) ... fills receiver with values from the template string or dictionary + + + + + templateAttrs() ... returns a dictionary with all attributes