diff --git a/src/Tools/generateTemplates/templateClassPyExport.py b/src/Tools/generateTemplates/templateClassPyExport.py index 81a575e661..bc845daf21 100644 --- a/src/Tools/generateTemplates/templateClassPyExport.py +++ b/src/Tools/generateTemplates/templateClassPyExport.py @@ -38,8 +38,8 @@ class TemplateClassPyExport (template.ModelTemplate): TemplateHeader = """ // This file is generated by src/Tools/generateTemaplates/templateClassPyExport.py out of the XML file // Every change you make here gets lost in the next full rebuild! -#ifndef @self.export.Namespace.upper()@_@self.export.Name.upper()@_H -#define @self.export.Namespace.upper()@_@self.export.Name.upper()@_H +#ifndef @self.export.Namespace.upper().replace("::", "_")@_@self.export.Name.upper()@_H +#define @self.export.Namespace.upper().replace("::", "_")@_@self.export.Name.upper()@_H #include <@self.export.FatherInclude@> #include <@self.export.Include@> @@ -50,7 +50,7 @@ class TemplateClassPyExport (template.ModelTemplate): @self.export.ForwardDeclarations@ - -namespace @self.export.Namespace@ +namespace @self.export.Namespace.replace("::"," { namespace ")@ { //=========================================================================== @@ -59,7 +59,7 @@ namespace @self.export.Namespace@ /** The python export class for @self.export.Twin@ */ -class @self.export.Namespace@Export @self.export.Name@ : public @self.export.FatherNamespace@::@self.export.Father@ +class @self.export.Namespace.replace("::","_")@Export @self.export.Name@ : public @self.export.FatherNamespace@::@self.export.Father@ { protected: ~@self.export.Name@(); @@ -248,9 +248,9 @@ public: - }; -} //namespace @self.export.Namespace@ +@"}"*len(self.export.Namespace.split("::"))@ //namespace @self.export.Namespace@ -#endif // @self.export.Namespace.upper()@_@self.export.Name.upper()@_H +#endif // @self.export.Namespace.upper().replace("::", "_")@_@self.export.Name.upper()@_H """