Closed tokejepsen closed 9 years ago
Some more info on this.
Running the included example of Pyblish Maya and publishing with ExtractModelAsObj
works well. Then renaming it to ExtractModelAsObj2
produces duplicate plug-ins; one by the original name, and one using the old.
This occurs in both logging and the Pyblish QML GUI.
Hunting this down now.
This looks to be due to a particularity in how the Python import mechanism works and was difficult to test and thus difficult to fix.
Marking this as a minor inconvenience for now.
Encountered a solution to this on the interwebs just now by chance.
Apparently, the Python import mechanism implicitly "merges" a module with another is another one of the same name is already in sys.modules
, which is the case here as the plug-in class changed, but the file did not, resulting in two classes.
The solution was simple (though hacky). Remove it from sys.modules
before importing it again.