Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not error on Load Warnings, but instead just log them. #166

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

BigRoy
Copy link
Contributor

@BigRoy BigRoy commented Nov 7, 2024

Changelog Description

Do not error on Load Warnings, but instead just log them.

  • This allows the workfiles tool to not show a red "Failed to open workfile" message if the scene just opened with warnings.
  • Also avoids errors in "open_workfile" from headless mode if the file did open, but just had warnings

Additional review information

Instead of showing an error pop-up scene warnings like:

Skipping unrecognized parameter "load_refresh".
Skipping unrecognized parameter "load_message".             

Will now just be logged instead of prompted to the user.

Testing notes:

  1. Open scene with HDA that has changed in the meantime (e.g. has parameters removed that were previously overridden in the existing file)

This allows the workfiles tool to not show a red "Failed to open workfile" message.
Also avoids errors in "open_workfile" from headless mode if the file did open, but just had warnings
@BigRoy BigRoy added the type: enhancement Improvement of existing functionality or minor addition label Nov 7, 2024
@BigRoy BigRoy requested a review from MustafaJafar November 7, 2024 16:13
@BigRoy BigRoy self-assigned this Nov 7, 2024
Copy link
Contributor

@MustafaJafar MustafaJafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works.
maybe the easy way to test is to open hip file with an older Houdini version.


about the log.warning(exc) what does it do?
in both develop and this branch I got the warning printed like

WARNING:ayon_houdini:Warnings were generated during load.
Error loading: //storage/work/ayon/RnD/features/flipbook_node/work/Generic/rnd_flipbook_node_Generic_v002.hip
Warning:     

/obj/cam1/xform1:

             Skipping unrecognized parameter "movepivot".
             Bad node type found: flipbook in /out.

which is much similar to this window. (for information, when opening the file directly from the launcher, I get this window. but when using the workfile tools in ayon, I never get it again.)
image

however in develop branch I can find more things in Houdini console like:

==============================
Traceback (most recent call last):
  File "E:\Ynput\ayon-core\client\ayon_core\tools\workfiles\control.py", line 535, in open_workfile
    self._open_workfile(folder_id, task_id, filepath)
  File "E:\Ynput\ayon-core\client\ayon_core\tools\workfiles\control.py", line 698, in _open_workfile
    self._host_open_workfile(filepath)
  File "E:\Ynput\ayon-core\client\ayon_core\tools\workfiles\control.py", line 631, in _host_open_workfile
    host.open_workfile(filepath)
  File "E:\Ynput\ayon-houdini\client\ayon_houdini\api\pipeline.py", line 115, in open_workfile
    hou.hipFile.load(filepath,
  File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.805/houdini/python3.9libs\houpythonportion\ui.py", line 1119, in decorator
    return func(*args, **kwargs)
  File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.805/houdini/python3.9libs\hou.py", line 52171, in load
    return _hou.hipFile_load(self, file_name, suppress_save_prompt, ignore_load_warnings)

@BigRoy BigRoy merged commit 11f5140 into ynput:develop Nov 13, 2024
1 check passed
@BigRoy BigRoy deleted the enhancement/load_warnings_more_silently branch November 13, 2024 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improvement of existing functionality or minor addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants