-
Notifications
You must be signed in to change notification settings - Fork 129
Maya: Ability to set resolution for playblasts from asset, and override through review instance. #3360
Maya: Ability to set resolution for playblasts from asset, and override through review instance. #3360
Conversation
…playblast-and-review-resolution
Simplify settings capture statement. Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still the same error
// pyblish.ExtractReview : Overscan color: #000000
//
// pyblish.ExtractReview : pixel_aspect: 1
//
// pyblish.ExtractReview : input_width: 1920
//
// pyblish.ExtractReview : input_height: 1080
//
// pyblish.ExtractReview : Output resolution is 0x0 //
// Error: pyblish.plugin : Traceback (most recent call last):
File "D:\REPO\OpenPype\openpype\plugins\publish\extract_review.py", line 332, in _render_output_definitions
File "D:\REPO\OpenPype\openpype\plugins\publish\extract_review.py", line 612, in _ffmpeg_arguments
File "D:\REPO\OpenPype\openpype\plugins\publish\extract_review.py", line 1325, in rescaling_filters
ZeroDivisionError: float division by zero
During handling of the above exception, another exception occurred:
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\plugins\publish\extract_review.py", line 79, in process
File "D:\REPO\OpenPype\openpype\plugins\publish\extract_review.py", line 247, in main_process
File "D:\REPO\OpenPype\openpype\plugins\publish\extract_review.py", line 346, in _render_output_definitions
NotImplementedError
Traceback (most recent call last):
File "", line 332, in _render_output_definitions
File "", line 612, in _ffmpeg_arguments
File "", line 1325, in rescaling_filters
ZeroDivisionError: float division by zero
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\REPO\OpenPype.venv\lib\site-packages\pyblish\plugin.py", line 522, in __explicit_process
runner(*args)
File "", line 79, in process
File "", line 247, in main_process
File "", line 346, in _render_output_definitions
NotImplementedError //
This is happening because right now we're appending a resolution value through the review instance. I'll ping Ondrej and ask what he thinks |
Just adding here from internal communication: I believe these (resolution attributes on created instance) should be set to asset resolution by default. Zero is used down the process to indicate that resolution should be used from the asset. So it should be like:
So creator has ability to override resolution but the default should be set from the asset. And if Extract Playblast has non-zero value, that should be used instead |
fb08627
to
594707f
Compare
…playblast-and-review-resolution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ 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\hosts\maya\plugins\publish\extract_thumbnail.py", line 98, in process
File "D:\REPO\OpenPype\openpype\vendor\python\common\capture.py", line 207, in capture
_applied_viewport_options(viewport_options, panel)
File "C:\Program Files\Autodesk\Maya2022\Python37\lib\contextlib.py", line 427, in enter_context
result = _cm_type.__enter__(cm)
File "C:\Program Files\Autodesk\Maya2022\Python37\lib\contextlib.py", line 112, in __enter__
return next(self.gen)
File "D:\REPO\OpenPype\openpype\vendor\python\common\capture.py", line 731, in _applied_viewport_options
cmds.modelEditor(panel, edit=True, **options)
TypeError: Invalid flag 'lineAAEnable'
Traceback (most recent call last):
File "D:\REPO\OpenPype\.venv\lib\site-packages\pyblish\plugin.py", line 522, in __explicit_process
runner(*args)
File "<string>", line 98, in process
File "D:\REPO\OpenPype\openpype\vendor\python\common\capture.py", line 207, in capture
_applied_viewport_options(viewport_options, panel)
File "C:\Program Files\Autodesk\Maya2022\Python37\lib\contextlib.py", line 427, in enter_context
result = _cm_type.__enter__(cm)
File "C:\Program Files\Autodesk\Maya2022\Python37\lib\contextlib.py", line 112, in __enter__
return next(self.gen)
File "D:\REPO\OpenPype\openpype\vendor\python\common\capture.py", line 731, in _applied_viewport_options
cmds.modelEditor(panel, edit=True, **options)
TypeError: Invalid flag 'lineAAEnable' //
b'Processing Extract Review'
// 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\plugins\publish\extract_review.py", line 73, in process
KeyError: 'representations'
Traceback (most recent call last):
File "D:\REPO\OpenPype\.venv\lib\site-packages\pyblish\plugin.py", line 522, in __explicit_process
runner(*args)
File "<string>", line 73, in process
KeyError: 'representations' //
b'Processing Extract burnins'
// 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\plugins\publish\extract_burnin.py", line 79, in process
RuntimeError: Burnin needs already created mov to work on.
Traceback (most recent call last):
File "D:\REPO\OpenPype\.venv\lib\site-packages\pyblish\plugin.py", line 522, in __explicit_process
runner(*args)
File "<string>", line 79, in process
RuntimeError: Burnin needs already created mov to work on. //
Thank you @m-u-r-p-h-y please try to reset your project's settings and try again, it's propagating keys from the playblast options PR into this which breaks it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made sure I'm resetting the project settings first before testing this PR.
Now it does not behave properly. This is the output from script editor in maya which indicates we are not passing the correct values to playblast resolution:
'height': None, 'width': None,
// pyblish.ExtractPlayblast : Extracting capture.. //
// pyblish.ExtractPlayblast : start: 1090, end: 1100 //
// pyblish.ExtractPlayblast : Outputting images to C:\Users\murph\AppData\Local\Temp\pyblish_tmp_1gt397_1\reviewMain //
// pyblish.ExtractPlayblast : using viewport preset: {'compression': 'jpg', 'format': 'image', 'quality': 95, 'off_screen': True, 'height': None, 'width': None, 'display_options': {'background': [0.49019607843137253, 0.49019607843137253, 0.49019607843137253], 'backgroundBottom': [0.49019607843137253, 0.49019607843137253, 0.49019607843137253], 'backgroundTop': [0.49019607843137253, 0.49019607843137253, 0.49019607843137253], 'displayGradient': True}, 'viewport_options': {'rendererName': 'vp2Renderer', 'displayLights': 'default', 'shadows': True, 'textures': True, 'twoSidedLighting': True, 'cameras': False, 'clipGhosts': False, 'controlVertices': False, 'deformers': False, 'dimensions': False, 'dynamicConstraints': False, 'dynamics': False, 'fluids': False, 'follicles': False, 'greasePencils': False, 'grid': False, 'hairSystems': True, 'handles': False, 'hud': False, 'hulls': False, 'ikHandles': False, 'imagePlane': True, 'joints': False, 'lights': False, 'locators': False, 'manipulators': False, 'motionTrails': False, 'nCloths': False, 'nParticles': False, 'nRigids': False, 'nurbsCurves': False, 'nurbsSurfaces': False, 'particleInstancers': False, 'pivots': False, 'planes': False, 'pluginShapes': False, 'polymeshes': True, 'strokes': False, 'subdivSurfaces': False}, 'viewport2_options': {'textureMaxResolution': 1024, 'enableTextureMaxRes': True, 'textureMaxResMode': 1, 'multiSampleEnable': True, 'multiSampleCount': 4, 'ssaoEnable': True}, 'sound': None, 'camera': '|camera1|cameraShape1', 'start_frame': 1090, 'end_frame': 1100, 'filename': 'C:\\Users\\murph\\AppData\\Local\\Temp\\pyblish_tmp_1gt397_1\\reviewMain', 'overwrite': True, 'viewer': False} //
currentTime 1100 ;
// pyblish.ExtractPlayblast : playblast path C:\Users\murph\AppData\Local\Temp\pyblish_tmp_1gt397_1\reviewMain.####.jpg //
// pyblish.ExtractPlayblast : filename C:\Users\murph\AppData\Local\Temp\pyblish_tmp_1gt397_1\reviewMain //
// pyblish.ExtractPlayblast : collection head reviewMain //
// pyblish.ExtractPlayblast : we found collection of interest reviewMain.%d.jpg [1090-1100] //
b'Processing Thumbnail'
// pyblish.ExtractThumbnail : Extracting capture.. //
// pyblish.ExtractThumbnail : Using viewport preset: {'compression': 'jpg', 'format': 'image', 'quality': 95, 'isolate_view': True, 'off_screen': True, 'height': 0, 'width': 0, 'display_options': {'background': [0.49019607843137253, 0.49019607843137253, 0.49019607843137253], 'backgroundBottom': [0.49019607843137253, 0.49019607843137253, 0.49019607843137253], 'backgroundTop': [0.49019607843137253, 0.49019607843137253, 0.49019607843137253], 'displayGradient': True}, 'viewport_options': {'rendererName': 'vp2Renderer', 'displayLights': 'default', 'shadows': True, 'textures': True, 'twoSidedLighting': True, 'cameras': False, 'clipGhosts': False, 'controlVertices': False, 'deformers': False, 'dimensions': False, 'dynamicConstraints': False, 'dynamics': False, 'fluids': False, 'follicles': False, 'greasePencils': False, 'grid': False, 'hairSystems': True, 'handles': False, 'hud': False, 'hulls': False, 'ikHandles': False, 'imagePlane': True, 'joints': False, 'lights': False, 'locators': False, 'manipulators': False, 'motionTrails': False, 'nCloths': False, 'nParticles': False, 'nRigids': False, 'nurbsCurves': False, 'nurbsSurfaces': False, 'particleInstancers': False, 'pivots': False, 'planes': False, 'pluginShapes': False, 'polymeshes': True, 'strokes': False, 'subdivSurfaces': False}, 'viewport2_options': {'textureMaxResolution': 1024, 'enableTextureMaxRes': True, 'textureMaxResMode': 1, 'multiSampleEnable': True, 'multiSampleCount': 4, 'ssaoEnable': True}, 'sound': None} //
// pyblish.ExtractThumbnail : Outputting images to C:\Users\murph\AppData\Local\Temp\pyblish_tmp_1gt397_1\reviewMain //
currentTime 1090 ;
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
testing scenario:
project_anatomy/attributes/resolution
1920x1080project_settings/maya/publish/ExtractPlayblast/capture_preset/Resolution
0x0- review instance resolution 0x0
- shot resolution in mongoDB set to 1080x1920
resulting playblast and thumbnail resolution 1080x1920 - CORRECT
project_anatomy/attributes/resolution
1920x1080project_settings/maya/publish/ExtractPlayblast/capture_preset/Resolution
800x800- review instance resolution 0x0
- shot resolution in mongoDB set to 1080x1920
resulting playblast and thumbnail resolution 1080x1920 - INCORRECT
we should have 800x800
project_anatomy/attributes/resolution
1920x1080project_settings/maya/publish/ExtractPlayblast/capture_preset/Resolution
800x800- review instance resolution 1000x1000
- shot resolution in mongoDB set to 1080x1920
resulting playblast and thumbnail resolution 1000x1000 - CORRECT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After extensive testing resolution overrides work as expected.
1. Review Instance
resolution has the top priority
if set to 0
2. project_settings/maya/publish/ExtractPlayblast/capture_preset/
resolution is used
if set to 0
3. shot/asset
resolution is queried from database
Good job @Allan-I :)
This adds the functionality to add override attributes on review instances to generate Maya playblasts with custom resolutions, overriding asset settings resolutions.
To test this:
Model
instance.Review
instance.If the resolution is set a value other than
0
on theReview
instance custom attribute, the playblast generated and submitted to FTrack is going to have those values as its resolution. Otherwise, when it is set to0
, it will fallback and generate the playblast as per the asset's settings.