Skip to content

Commit

Permalink
Merge pull request #682 from ynput/feature/support_opening_workfile_o…
Browse files Browse the repository at this point in the history
…n_launching_houdini

Houdini: support opening workfile on launch
  • Loading branch information
moonyuet authored Jun 22, 2024
2 parents ef495d0 + 583bc8f commit ec0c004
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server_addon/houdini/client/ayon_houdini/api/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import hou # noqa

from ayon_core.host import HostBase, IWorkfileHost, ILoadHost, IPublishHost

from ayon_core.tools.utils import host_tools
import pyblish.api

from ayon_core.pipeline import (
Expand All @@ -23,6 +23,7 @@
from ayon_core.lib import (
register_event_callback,
emit_event,
env_value_to_bool,
)


Expand Down Expand Up @@ -85,10 +86,9 @@ def install(self):
# initialization during start up delays Houdini UI by minutes
# making it extremely slow to launch.
hdefereval.executeDeferred(shelves.generate_shelves)

if not IS_HEADLESS:
import hdefereval # noqa, hdefereval is only available in ui mode
hdefereval.executeDeferred(creator_node_shelves.install)
if env_value_to_bool("AYON_WORKFILE_TOOL_ON_START"):
hdefereval.executeDeferred(lambda: host_tools.show_workfiles(parent=hou.qt.mainWindow()))

def workfile_has_unsaved_changes(self):
return hou.hipFile.hasUnsavedChanges()
Expand Down

0 comments on commit ec0c004

Please sign in to comment.