Publish2 UI settings transfer from one item to another

Hi,
To quickly describe the issue.

I came across an issue where publishing plugins in tk-multi-publish2 UI inherit data from one plugin to another. This happens every time plugin types are the same and a newly selected item is selected for the first time.

For a better explanation and possible solution, please watch the video.
google drive mp4 file

if the video is not yet trans coded correctly:
tk-multi-publish2[some_version]\python\tk_multi_publish2\dialog.py
l.n.: 442
change :
self._current_tasks.is_same_task_type(new_task_selection)
to:
self._current_tasks == new_task_selection

because the publishing plugins have the same type, publish will reuse a custom UI widget, and that in turn copies data from one item to another.
I think that this approach is not optimal.

I have sort of a question if my approach is OK, or is there something else that can be done.

3 Likes

Hey, it happens because the first time you open the UI in a new item you don’t have values to load from settings. I assume your settings default values are None. And when your set_ui_settings() function runs most probably it doesn’t apply any default settings to your interface skipping None values, so it just remains with the previous values.