I have a plugin that I’ve written that copies data from a folder into a shot/step.
Each item is collected in a collector and the context is identified by parsing the file name.
However sometimes the artist needs to change the context in order to copy data to a different shot (using the context widget on the item). The plugin uses settings to display to the user the output path and other items. These are currently built at accept time and added to the settings (as that’s the only place I can find that has both the item and settings).
I have two main issues:
The settings need to be updated when the context is changed (different fields for templates, affects versioning, etc), is there a hook method that runs when the context changes?
I need to update the UI to show the new settings.
My current solution is as follows (but has a few issues):
Keep track of what context was used for generating the settings (in a setting). At validation time if current context doesn’t match the one in the settings, I rebuild them and fail the validation (to alert the user that there has been changes to the settings).
- It would be great to be able to update these values before hitting validation
- We’ve had some inconsistencies with settings UI not updating when the settings update during validation time (the artist would need to open another settings window and go back, forcing the update from settings).