diff --git a/src/Tools/bindings/templates/templateClassPyExport.py b/src/Tools/bindings/templates/templateClassPyExport.py index 36c57d1a20..3bc17f382e 100644 --- a/src/Tools/bindings/templates/templateClassPyExport.py +++ b/src/Tools/bindings/templates/templateClassPyExport.py @@ -335,6 +335,7 @@ public: /// getter for the object handled by this class @self.export.TwinPointer@ *get@self.export.Twin@Ptr() const; + @self.export.TwinPointer@ *getTwinPtr() const; + if(self.export.ClassDeclarations != ""): /** @name additional declarations and methods for the wrapper class */ @@ -892,6 +893,11 @@ int @self.export.Name@::_setattr(const char *attr, PyObject *value) // __setattr return static_cast<@self.export.TwinPointer@ *>(_pcTwinPointer); } +@self.export.TwinPointer@ *@self.export.Name@::getTwinPtr() const +{ + return get@self.export.Twin@Ptr(); +} + #if defined(__clang__) # pragma clang diagnostic pop #endif