-
Notifications
You must be signed in to change notification settings - Fork 127
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
Maya: Camera focal length visible in review - OP-3278 #4531
Maya: Camera focal length visible in review - OP-3278 #4531
Conversation
Task linked: OP-3278 Maya: Camera focal length visible in review |
How does this code actually work to retrieve the dynamic focal length? :) Where does it end up collecting the values per frame? |
It doesn't🙂 This is still a draft PR so should be disregarded for reviewing. |
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
…com/tokejepsen/pype into feature/OP-3278_camera-focal-length
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
…com/tokejepsen/pype into feature/OP-3278_camera-focal-length
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.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.
@LiborBatek guessing you are happy with this PR? If so could you approve? |
So this PR works perfectly for me in ✅ Maya 2023 but I'm having the issues in I animated focal length in sync with my frame range to ensure it was exactly sync per frame in the resulting burnin - all was good on that front! 👍 Regarding debugging the Maya 2020 issue: This is what is shown in the Pyblish UI as error message: These are options being passed to Using preset:
{
"camera": "|camera1|cameraShape1",
"camera_options": {
"depthOfField": false,
"displayFieldChart": false,
"displayFilmGate": false,
"displayFilmOrigin": false,
"displayFilmPivot": false,
"displayGateMask": false,
"displayResolution": false,
"displaySafeAction": false,
"displaySafeTitle": false,
"overscan": 1.0
},
"compression": "jpg",
"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
},
"end_frame": 1011.0,
"filename": "c:\\users\\roy\\appdata\\local\\temp\\pyblish_tmp_xpx6s9\\reviewMain",
"format": "image",
"height": 1080,
"off_screen": true,
"overwrite": true,
"quality": 95,
"sound": null,
"start_frame": 991.0,
"viewer": false,
"viewport2_options": {
"enableTextureMaxRes": true,
"hwFogAlpha": 0,
"hwFogColorB": 1.0,
"hwFogColorG": 1.0,
"hwFogColorR": 1.0,
"hwFogDensity": 0.0,
"hwFogEnd": 100,
"hwFogFalloff": 0,
"hwFogStart": 0,
"lineAAEnable": true,
"motionBlurEnable": false,
"motionBlurSampleCount": 8,
"motionBlurShutterOpenFraction": 0.2,
"multiSampleCount": 8,
"multiSampleEnable": true,
"renderDepthOfField": true,
"ssaoAmount": 1,
"ssaoEnable": false,
"ssaoFilterRadius": 16,
"ssaoRadius": 16,
"ssaoSamples": 16,
"textureMaxResMode": 1,
"textureMaxResolution": 1024
},
"viewport_options": {
"backfaceCulling": false,
"cameras": false,
"clipGhosts": false,
"controlVertices": false,
"deformers": false,
"dimensions": false,
"displayLights": "default",
"displayTextures": true,
"dynamicConstraints": false,
"dynamics": false,
"fluids": false,
"fogging": false,
"follicles": false,
"gpuCacheDisplayFilter": false,
"greasePencils": false,
"grid": false,
"hairSystems": true,
"handles": false,
"headsUpDisplay": false,
"hulls": false,
"ikHandles": false,
"imagePlane": true,
"jointXray": false,
"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,
"rendererName": "vp2Renderer",
"shadows": true,
"strokes": false,
"subdivSurfaces": false,
"textures": false,
"twoSidedLighting": true,
"useDefaultMaterial": false,
"wireframeOnShaded": false,
"xray": false
},
"width": 1920
} And it appears to error on the viewport options with the import capture
viewport_options = {
"backfaceCulling": False,
"cameras": False,
"clipGhosts": False,
"controlVertices": False,
"deformers": False,
"dimensions": False,
"displayLights": "default",
"displayTextures": True,
"dynamicConstraints": False,
"dynamics": False,
"fluids": False,
"fogging": False,
"follicles": False,
"gpuCacheDisplayFilter": False,
"greasePencils": False,
"grid": False,
"hairSystems": True,
"handles": False,
"headsUpDisplay": False,
"hulls": False,
"ikHandles": False,
"imagePlane": True,
"jointXray": False,
"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,
"rendererName": "vp2Renderer",
"shadows": True,
"strokes": False,
"subdivSurfaces": False,
"textures": False,
"twoSidedLighting": True,
"useDefaultMaterial": False,
"wireframeOnShaded": False,
"xray": False
}
with capture._applied_viewport_options(viewport_options, "modelPanel1"):
pass I get no errors. Which seems weird since it should trigger the same logic. This does trigger the error however: import capture
import json
data = r"""
{
"camera": "|camera1|cameraShape1",
"camera_options": {
"depthOfField": false,
"displayFieldChart": false,
"displayFilmGate": false,
"displayFilmOrigin": false,
"displayFilmPivot": false,
"displayGateMask": false,
"displayResolution": false,
"displaySafeAction": false,
"displaySafeTitle": false,
"overscan": 1.0
},
"compression": "jpg",
"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
},
"end_frame": 1011.0,
"filename": "c:\\users\\roy\\appdata\\local\\temp\\pyblish_tmp_xpx6s9\\reviewMain",
"format": "image",
"height": 1080,
"off_screen": true,
"overwrite": true,
"quality": 95,
"sound": null,
"start_frame": 991.0,
"viewer": false,
"viewport2_options": {
"enableTextureMaxRes": true,
"hwFogAlpha": 0,
"hwFogColorB": 1.0,
"hwFogColorG": 1.0,
"hwFogColorR": 1.0,
"hwFogDensity": 0.0,
"hwFogEnd": 100,
"hwFogFalloff": 0,
"hwFogStart": 0,
"lineAAEnable": true,
"motionBlurEnable": false,
"motionBlurSampleCount": 8,
"motionBlurShutterOpenFraction": 0.2,
"multiSampleCount": 8,
"multiSampleEnable": true,
"renderDepthOfField": true,
"ssaoAmount": 1,
"ssaoEnable": false,
"ssaoFilterRadius": 16,
"ssaoRadius": 16,
"ssaoSamples": 16,
"textureMaxResMode": 1,
"textureMaxResolution": 1024
},
"viewport_options": {
"backfaceCulling": false,
"cameras": false,
"clipGhosts": false,
"controlVertices": false,
"deformers": false,
"dimensions": false,
"displayLights": "default",
"displayTextures": true,
"dynamicConstraints": false,
"dynamics": false,
"fluids": false,
"fogging": false,
"follicles": false,
"gpuCacheDisplayFilter": false,
"greasePencils": false,
"grid": false,
"hairSystems": true,
"handles": false,
"headsUpDisplay": false,
"hulls": false,
"ikHandles": false,
"imagePlane": true,
"jointXray": false,
"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,
"rendererName": "vp2Renderer",
"shadows": true,
"strokes": false,
"subdivSurfaces": false,
"textures": false,
"twoSidedLighting": true,
"useDefaultMaterial": false,
"wireframeOnShaded": false,
"xray": false
},
"width": 1920
}
"""
preset = json.loads(data)
capture.capture(**preset) Which errors with:
This also shows a different bug, with |
@BigRoy we'll need to tackle this in a separate PR or issue. |
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.
It works in my side too. can you please merge the latest develop to this branch?
Brief description
Camera focal length visible in review.
Description
Support camera focal length in review; static and dynamic.
Resolves #3220
Testing Notes
project_settings/global/publish/ExtractBurnin/profiles/0/burnins
fields to use{focalLength:.2f}
or{focalLength:.0f}
or{focalLength}
.