pyblish / pyblish-base

Pyblish base library - see https://github.com/pyblish/pyblish for details.
Other
127 stars 59 forks source link

PYBLISHGUI #281

Closed mottosso closed 8 years ago

mottosso commented 8 years ago

Goal

Enable GUIs to be registered via the command-line, before Python.

Motivation

Registering via pyblish.api.register_gui works well, but considering that all other Pyblish configuration has an equivalent environment variable, this should exist for completeness and consistency.

Implementation

# Windows
$ set PYBLISH_REGISTERED_GUIS=pyblish_qml;pyblish_lite

# Linux
$ export PYBLISH_REGISTERED_GUIS=pyblish_qml:pyblish_lite

Use native separator, from os.pathsep.

Discussion

Should the variable instead be PYBLISHGUIPATH to align with PYBLISHPLUGINPATH? Even though they are plural, and not paths?

tokejepsen commented 8 years ago

How about defining the GUI showing method here? Instead of just registering the GUI names, you register the command for showing the GUI.

set PYBLISH_REGISTERED_GUIS=pyblish_qml.show();pyblish_lite.show()
mottosso commented 8 years ago

I'd rather try this approach first, until we run into problems.

mottosso commented 8 years ago

Implemented in https://github.com/pyblish/pyblish-base/pull/297