I edited an interface with UI editor, and want to make a button to save the current project file, how should I do it?
The projectClass has a “save()” function that you can call to save your project.
Do not forget to put the button in to momentary mode
Good practive would be the following approach:
So now are, when releasing the button, if we are still inside. If not, do nothing. But yeah, advanced stuff
def onOnToOff(panelValue): owner = panelValue.owner if not owner.panel.inside: return project.save() return