Using the template attribute encoding/decoding.
This commit is contained in:
@@ -208,6 +208,7 @@ class ObjectJob:
|
||||
if attrs.get(JobTemplate.Version) and 1 == int(attrs[JobTemplate.Version]):
|
||||
if attrs.get(JobTemplate.SetupSheet):
|
||||
self.setupSheet.setFromTemplate(attrs[JobTemplate.SetupSheet])
|
||||
attrs = self.setupSheet.decodeTemplateAttributes(attrs)
|
||||
|
||||
if attrs.get(JobTemplate.GeometryTolerance):
|
||||
obj.GeometryTolerance = float(attrs.get(JobTemplate.GeometryTolerance))
|
||||
|
||||
@@ -261,9 +261,10 @@ class CommandJobTemplateExport:
|
||||
if setupSheetAttrs:
|
||||
attrs[PathJob.JobTemplate.SetupSheet] = setupSheetAttrs
|
||||
|
||||
encoded = job.Proxy.setupSheet.encodeTemplateAttributes(attrs)
|
||||
# write template
|
||||
with open(unicode(path), 'wb') as fp:
|
||||
json.dump(attrs, fp, sort_keys=True, indent=2)
|
||||
json.dump(encoded, fp, sort_keys=True, indent=2)
|
||||
|
||||
if FreeCAD.GuiUp:
|
||||
# register the FreeCAD command
|
||||
|
||||
Reference in New Issue
Block a user