Skip to content

Instantly share code, notes, and snippets.

@teionn
Created March 10, 2019 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teionn/9f403f5f78a85bc40c98b5f64fabc605 to your computer and use it in GitHub Desktop.
Save teionn/9f403f5f78a85bc40c98b5f64fabc605 to your computer and use it in GitHub Desktop.
import os
import glob
import random
import shutil
def randomSplashScreen():
_tgtDir = "%s/prefs/icons" % os.environ.get("MAYA_APP_DIR")
_srcDir = "%s/startupImages" % _tgtDir
if not os.path.exists(_srcDir):
os.makedirs(_srcDir)
_list = glob.glob("%s/*.png" % _srcDir)
if _list:
_choice = random.choice(_list)
shutil.copy2(_choice,"%s/MayaStartupImage.png" % _tgtDir)
import randomSplash;randomSplash.randomSplashScreen()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment