This ones a long shot. I’m having an Issue where my plugins are not executing in the correct order.
I’ve have two extraction plugins (in separate modules,) one of their orders is a bit higher than the other.
for a in plugins: print a.name, a.order #plugins.sort(key = lambda x: x.order) pyblish.util.extract(context=context, plugins=plugins)
the print out from the loop before extraction:
Collect Renders 0 Nuke Render Exists 1 Copy Renders 2.1 Publish Renders 3.15 Submit Deadline Job 3.2 Cleanup Renders 3.4 Collect Script 0 Write Node Exists 1 Nuke Script Exists 1 Non "Lemonade" Write Nodes 1 Save Script File 1.9 Publish Script File 3 Cleanup Script File 3.4
The problem is, that it is running the “Copy Renders” before the “Save Script File”. Interestingly if I sort the plugins list by order (see commented out code) it runs them in the correct order.
Its really odd, so I went and created just a simple bit of test code and couldn’t replicate it.
The test code excluding plugins (following code bellow), is similar in its approach to how I use it in my main code:
pyblish.api.register_plugin_path(pluginfolder) plugins = pyblish.api.discover() import pyblish.util context = pyblish.util.collect(plugins=plugins) context = pyblish.util.validate(context=context,plugins=plugins) context = pyblish.util.extract(context=context,plugins=plugins) context = pyblish.util.integrate(context=context,plugins=plugins)
As I said this is a long shot as I haven’t provided all the code, but if any one has even the slightest idea about what might potentially be going wrong it might be very helpful. In the mean time I shall just try and break down my code bit by bit.