fixed getting source path

This commit is contained in:
Ondrej Samohel 2019-09-06 15:59:35 +02:00
parent dca53a183c
commit 04919acaeb
No known key found for this signature in database
GPG key ID: 8A29C663C672C2B7

View file

@ -476,16 +476,13 @@ def filter_pyblish_plugins(plugins):
if not presets:
continue
file = os.path.normpath(inspect.getfile(plugin.__class__))
file = os.path.normpath(inspect.getsourcefile(plugin))
file = os.path.normpath(file)
# host determined from path
host_from_file = file.split(os.path.sep)[-3:-2][0]
plugin_kind = file.split(os.path.sep)[-2:-1][0]
print(host_from_file)
print(plugin_kind)
try:
config_data = presets[host]["publish"][plugin.__name__]
except KeyError: