Merge pull request #4739 from BigRoy/houdini_fix_collect_current_file

This commit is contained in:
Ondřej Samohel 2023-03-30 11:46:35 +02:00 committed by GitHub
commit 468b994247
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,6 @@
import os
import hou
from openpype.pipeline import legacy_io
import pyblish.api
@ -11,7 +10,7 @@ class CollectHoudiniCurrentFile(pyblish.api.InstancePlugin):
order = pyblish.api.CollectorOrder - 0.01
label = "Houdini Current File"
hosts = ["houdini"]
family = ["workfile"]
families = ["workfile"]
def process(self, instance):
"""Inject the current working file"""
@ -21,7 +20,7 @@ class CollectHoudiniCurrentFile(pyblish.api.InstancePlugin):
# By default, Houdini will even point a new scene to a path.
# However if the file is not saved at all and does not exist,
# we assume the user never set it.
filepath = ""
current_file = ""
elif os.path.basename(current_file) == "untitled.hip":
# Due to even a new file being called 'untitled.hip' we are unable