-
Notifications
You must be signed in to change notification settings - Fork 128
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: fix rounding of fps #4076
Conversation
Task linked: OP-2549 fps rounding issue in validate_maya_units.py |
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.
In my case, everything seems correct.
- project set to 29.97 in ftrack and synced to avalon
- created shot in ftrack and synced to avalon
- manually changed the shot fps to
23.9760246277
in mongoDB - started Maya (2022) and created animation instance with some content (Maya starts with 25fps by default)
- run publish and used automatic repair on Maya Unit validator. fps changed from 25fps to 23.967 in Maya
- run publish again
- everything is OK
so it seems it is fixing the issue of higher precision number in mongoDB (coming from hiero editorial for example)
but rounding not working in @LiborBatek case
btw, should we fix project manager to show full length number for fps for better diagnostics? |
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.
just created another shot to confirm Libor's case and it is not handled correctly definitely
did not touch mongoDB, just let the ftrack sync to avalon
during the workfile save there is a warning about fps mismatch (we should use floats to see the issue properly)
after fixing the scene, the Units validator fails, as there is double rounding happening apparently
I don't think it is because of double rounding - it all stems from ftrack handling of decimal places. In ftrack, it will be 29.97, but since maya stores it in much higher precision, it will correctly ceil the value to 29.98, because Since we are not able to tell during validation if that fps value in mongo is set by ftrack that is flooring the value, or it is set by any other means where the ceil is the rounding method, I am not really sure how to handle it except storing fps value as string on ftrack, or adding logic trying to guess if ftrack module is enabled... |
I hope I've fixed it by comparing only numbers with the same precision. |
My testing scenario is (M2022) sh001 set to opening sh001 workfile with fps set to 25fps
which brings the popup message to fix the fps on file open with sill not very precise message about project fps of 29 fps after pressing fix, OP is changing the scene fps:
but Maya Units validation is not passing (where is this `29.97002997002997` coming from?)Repair function on the validator is not helping either, even though it says
but the validation fails with the above message again |
To me it seems that Maya Fix FPS causes that weird FPS value... Did u tried to not trigger that maya fix FPS? It could be it also it doesnt mean user wants to fix keyframe by moving them on the timeline to match new FPS but keep them as they are... |
user has to toggle the switch to modyfi the keyframes. The fix is only changing the scene fps by default. |
solved by #4424 |
Bug
This is fixing problem when fps is defined in greater precision than Maya is expecting (for example when it is defined as
23.9760246277
in db and Maya logic is expecting23.98
)Close #2620