mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge pull request #2987 from BigRoy/houdini_batch_no_hdefereval
Houdini: Avoid ImportError on `hdefereval` when Houdini runs without UI
This commit is contained in:
commit
1aab632005
1 changed files with 7 additions and 2 deletions
|
|
@ -4,7 +4,6 @@ import logging
|
||||||
import contextlib
|
import contextlib
|
||||||
|
|
||||||
import hou
|
import hou
|
||||||
import hdefereval
|
|
||||||
|
|
||||||
import pyblish.api
|
import pyblish.api
|
||||||
import avalon.api
|
import avalon.api
|
||||||
|
|
@ -305,7 +304,13 @@ def on_new():
|
||||||
start = hou.playbar.playbackRange()[0]
|
start = hou.playbar.playbackRange()[0]
|
||||||
hou.setFrame(start)
|
hou.setFrame(start)
|
||||||
|
|
||||||
hdefereval.executeDeferred(_enforce_start_frame)
|
if hou.isUIAvailable():
|
||||||
|
import hdefereval
|
||||||
|
hdefereval.executeDeferred(_enforce_start_frame)
|
||||||
|
else:
|
||||||
|
# Run without execute deferred when no UI is available because
|
||||||
|
# without UI `hdefereval` is not available to import
|
||||||
|
_enforce_start_frame()
|
||||||
|
|
||||||
|
|
||||||
def _set_context_settings():
|
def _set_context_settings():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue