OpenPype
OpenPype copied to clipboard
Maya: Validate frame range repair action
Describe the bug repair action on validate frame range fails with error:
// pyblish.ValidateMayaUnits : Units (linear): cm //
// pyblish.ValidateMayaUnits : Units (angular): deg //
// pyblish.ValidateMayaUnits : Units (time): 25.0 FPS //
plugin is: <class 'D:\REPO\OpenPype\openpype\hosts\maya\plugins\publish\validate_frame_range.py.ValidateFrameRange'>
b"Preparing <class 'openpype.action.RepairAction'>.."
b'Action prepared.'
// pyblish.pyblish.plugin.Action : Finding failed instances.. //
// Error: pyblish.plugin : Traceback (most recent call last):
File "D:\REPO\OpenPype\.venv\lib\site-packages\pyblish\plugin.py", line 522, in __explicit_process
runner(*args)
File "D:\REPO\OpenPype\openpype\action.py", line 65, in process
plugin.repair(instance)
File "D:\REPO\OpenPype\openpype\hosts\maya\plugins\publish\validate_frame_range.py", line 90, in repair
RuntimeError: setAttr: No object matches name: Main.frameStart
Traceback (most recent call last):
File "D:\REPO\OpenPype\.venv\lib\site-packages\pyblish\plugin.py", line 522, in __explicit_process
runner(*args)
File "D:\REPO\OpenPype\openpype\action.py", line 65, in process
plugin.repair(instance)
File "<string>", line 90, in repair
RuntimeError: setAttr: No object matches name: Main.frameStart
//
Expected behavior A clear and concise description of what you expected to happen.
Screenshots
Desktop (please complete the following information):
- OS: windows
- Host: Maya 2022
[cuID:OP-3364]
just tested latest develop and this bug is still there . .
@BigRoy comment in another thread
Describe the bug
The Maya Validate Frame Range function has a repair method that updates the instance
frameStart
andframeEnd
. However, Renderlayers do not have that setting on the instance and thus will error.plugin is: <class 'S:\openpype\OpenPype\openpype\hosts\maya\plugins\publish\validate_frame_range.py.ValidateFrameRange'> Preparing <class 'openpype.action.RepairAction'>.. Action prepared. // pyblish.pyblish.plugin.Action : Finding failed instances.. // Error: pyblish.plugin : Traceback (most recent call last): File "S:\openpype\OpenPype\.venv\lib\site-packages\pyblish\plugin.py", line 522, in __explicit_process runner(*args) File "S:\openpype\OpenPype\openpype\action.py", line 65, in process plugin.repair(instance) File "S:\openpype\OpenPype\openpype\hosts\maya\plugins\publish\validate_frame_range.py", line 90, in repair RuntimeError: setAttr: No object matches name: Main.frameStart Traceback (most recent call last): File "S:\openpype\OpenPype\.venv\lib\site-packages\pyblish\plugin.py", line 522, in __explicit_process runner(*args) File "S:\openpype\OpenPype\openpype\action.py", line 65, in process plugin.repair(instance) File "<string>", line 90, in repair RuntimeError: setAttr: No object matches name: Main.frameStart //
[cuID:24ve6vj]
Just to confirm - what do we expect to happen. Should it set the render frame range for that layer instead?
Note: If there's no layer override on that layer - it'd be setting it for all renderlayers that don't have any overrides. If there's an override on that layer - we'd be updating that override to the frame range.
In my opinion, it should set the frame range to db record. It fails because it does not match, the fix should match it.
I would not go too deep in terms of automated "what if" scenarios in terms of overrides. There is a clear logic, that if I want to override the default behavior I will turn off the validator to let my overrides pass through.