mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Avoid on_new callback when opening a Houdini file
This commit is contained in:
parent
88a6aaee70
commit
823164e6c4
1 changed files with 8 additions and 0 deletions
|
|
@ -281,6 +281,14 @@ def on_open(*args):
|
|||
|
||||
def on_new(_):
|
||||
"""Set project resolution and fps when create a new file"""
|
||||
|
||||
if hou.hipFile.isLoadingHipFile():
|
||||
# This event also triggers when Houdini opens a file due to the
|
||||
# new event being registered to 'afterClear'. As such we can skip
|
||||
# 'new' logic if the user is opening a file anyway
|
||||
log.debug("Skipping on new callback due to scene being opened.")
|
||||
return
|
||||
|
||||
log.info("Running callback on new..")
|
||||
_set_context_settings()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue