This was requested by Ny over at Penumbra discord. In short this is a request for an ability to cleanup all imported PCP data at once.
Quick architectural rundown of the implementation:
UI-wise this should be a "Cleanup PCP templates and profiles" button over at Settings -> Integrations as well as integration with Penumbra's SettingsSection API. The button should be accompanied by warning control that templates and profiles modified by user will not be deleted.
On backend side it will likely require adding a Source enum to Templates and Profiles (with version bump) with following entries:
User - anything created by the user themselves, default value
ClipboardImport - anything imported from clipboard
PoseImport - anything imported from pose file
PCPImport - anything imported from PCP integration.
Modifying (and maybe copying?) template/profile always resets this field to User. Deletion of those templates and profiles should trigger all appropriate events so the rest of the plugin can act accordingly to the change of data. All of this needs to be handled inside of respective managers.
As a part of this it's a good idea to validate that PCP templates/profiles are locked from edits by default.
This was requested by Ny over at Penumbra discord. In short this is a request for an ability to cleanup all imported PCP data at once.
Quick architectural rundown of the implementation:
UI-wise this should be a "Cleanup PCP templates and profiles" button over at Settings -> Integrations as well as integration with Penumbra's SettingsSection API. The button should be accompanied by warning control that templates and profiles modified by user will not be deleted.
On backend side it will likely require adding a
Sourceenum to Templates and Profiles (with version bump) with following entries:User- anything created by the user themselves, default valueClipboardImport- anything imported from clipboardPoseImport- anything imported from pose filePCPImport- anything imported from PCP integration.Modifying (and maybe copying?) template/profile always resets this field to
User. Deletion of those templates and profiles should trigger all appropriate events so the rest of the plugin can act accordingly to the change of data. All of this needs to be handled inside of respective managers.As a part of this it's a good idea to validate that PCP templates/profiles are locked from edits by default.