-
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: fps rounding - OP-2549 #4424
Maya: fps rounding - OP-2549 #4424
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.
I have a project with fps set to 29.98
shot has fps set to 23.9760246277 (number coming from Hiero editorial publish)
a scene in Maya set to 25fps
during save, the popup informs about the wrong fps, but the numbers are not matching
after pressing fix, everything seems ok, saving works, no complaints anymore
but when you use OpenPype -> Reset frame range, the scene is set to 25fps with no error in the script editor
# Conflicts: # openpype/hosts/maya/api/lib.py
@m-u-r-p-h-y should be fixed now. |
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 does work for me - the only question is the allowed error. I've tested it with frame rate 23.5
that doesn't make sense but since the difference is just 0.4760...
and rounded 0
it is still accepted as 23.976023976023978
. And maybe it's good thing? But I feel that the tolerance should be less, maybe in order of 0.1
Sure, I dont mind having a lower tolerance. We can maybe loosen it later if productions have issues with it. No point in having it a setting, right? |
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.
Following testing steps and setting custom framerate
in ftrack/mongoDB to 23.976023976023978
OP correctly sets the framerate according to DB
Did run the full test with creating / publishing /loading assets and all works as expected. When changing the shot to other framerate than in DB OP correctly fixes it back when re-opened.
Brief description
When FPS is registered in for example Ftrack and round either down or up (floor/ceil), comparing to Maya FPS can fail. Example:
23.97 (Ftrack/Mongo) != 23.976023976023978 (Maya)
Description
Since Maya only has a select number of supported framerates, I've taken the approach of converting any fps to supported framerates in Maya. We validate the input fps to make sure they are supported in Maya in two ways:
Whole Numbers - are validated straight against the supported framerates in Maya.
Demical Numbers - we find the closest supported framerate in Maya. If the difference to the closest supported framerate, is more than 0.5 we'll throw an error.
If Maya ever supports arbitrary framerates, then we might have a problem but I'm not holding my breath...
Testing notes:
There are other testing notes on #4076