pyblish / pyblish-qml

Pyblish QML frontend for Maya 2013+, Houdini 11+, Nuke 8+ and more
GNU Lesser General Public License v3.0
114 stars 44 forks source link

Supplying targets to show() does not refresh when window is already open #335

Closed BigRoy closed 5 years ago

BigRoy commented 5 years ago

Issue

The command pyblish_qml.show(targets=["render"]) will not update the targets of the running Pyblish QML session if it is already open. It does appear to refresh (it restarts the Collecting stage) however it makes no changes whatsoever to the targets as long as the interface is open.

Workaround: Close the Pyblish QML interface and then run it with the explicit targets set.

To reproduce:

  1. Run pyblish_qml.show(targets=["default"])
  2. Wait for Pyblish QML interface to start and initialize.
  3. Run pyblish_qml.show(targets=["render"])
  4. The interface appears to reinitialize, however it still used the default target.

Also note: pyblish.api.register_target does not propagate to an open Pyblish QML session.

The live QML session does not whatsoever update to any registered targets, so say:

pyblish.api.register_target("render")
# Now refresh the QML ui, no change...

However, I think this might be a deliberate design choice so the explicitly defined target on launch does not require the targets to be globally registered. As such, you can target the specific Pyblish QML session without changing the environment which is useful.