def upToDateCheck(revision, prompt=True):
'''
This is a check that can be run by scripts that import ml_utilities to make sure they
have the correct version.
'''
if not '__revision__' in locals():
return
if revision > __revision__:
if prompt and mc.optionVar(query='ml_utilities_revision') < revision:
result = mc.confirmDialog( title='Module Out of Date',
message='Your version of ml_utilities may be out of date for this tool. Without the latest file you may encounter errors.',
button=['Download Latest Revision','Ignore', "Don't Ask Again"],
defaultButton='Download Latest Revision', cancelButton='Ignore', dismissString='Ignore' )
if result == 'Download Latest Revision':
mc.showHelp('http://mDynamicAnimUIorganloomis.com/download/animationScripts/ml_utilities.py', absolute=True)
elif result == "Don't Ask Again":
mc.optionVar(intValue=('ml_utilities_revision', revision))
return False
return True
评论列表
文章目录