mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 13:52:15 +01:00
dialog modal, fix toggles file modified
This commit is contained in:
parent
3b69876754
commit
e0a1d6e91e
1 changed files with 10 additions and 2 deletions
|
|
@ -16,7 +16,6 @@ from avalon import api, maya, io, pipeline
|
|||
from colorbleed import lib
|
||||
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
ATTRIBUTE_DICT = {"int": {"attributeType": "long"},
|
||||
|
|
@ -1339,13 +1338,16 @@ def set_project_fps():
|
|||
log.info("Updating FPS to '{}'".format(unit))
|
||||
cmds.currentUnit(time=unit)
|
||||
|
||||
# Force file stated to 'modified'
|
||||
cmds.file(modified=True)
|
||||
|
||||
|
||||
# Valid FPS
|
||||
def validate_fps():
|
||||
"""Validate current scene FPS and show pop-up when it is incorrect
|
||||
|
||||
Returns:
|
||||
None
|
||||
bool
|
||||
|
||||
"""
|
||||
|
||||
|
|
@ -1365,10 +1367,16 @@ def validate_fps():
|
|||
pass
|
||||
else:
|
||||
dialog = popup.Popup(parent=parent)
|
||||
dialog.setModal(True)
|
||||
dialog.setWindowTitle("Maya scene not in line with project")
|
||||
dialog.setMessage("The FPS is out of sync, please fix")
|
||||
|
||||
# Set new text for button (add optional argument for the popup?)
|
||||
dialog.widgets["show"].setText("Fix")
|
||||
dialog.on_show.connect(set_project_fps)
|
||||
|
||||
dialog.show()
|
||||
|
||||
return False
|
||||
|
||||
return True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue