Example #1
0
def createOfflineMelFile(offlineFolder, scriptsDir):
    filePath            = "%s%saTools_offline_install.mel"%(offlineFolder, os.sep)
    offlineInstallPy    = "%s%saTools%sgeneralTools%sofflineInstall.py"%(scriptsDir, os.sep, os.sep, os.sep)
    pyContents          = "\\n\\".join(utilMod.readFile(offlineInstallPy))
    contents            = "python(\"\\n\\\naToolsZipPath = '%s%saTools.zip'\\n\\\n"%(offlineFolder, os.sep)
    contents            += "\\n\\\n".join("".join(utilMod.readFile(offlineInstallPy)).split("\n"))
    contents            += "\");"
    
    utilMod.writeFile(filePath, contents)
Example #2
0
def createOfflineMelFile(offlineFolder, scriptsDir):
    filePath = "%s%saTools_offline_install.mel" % (offlineFolder, os.sep)
    offlineInstallPy = "%s%saTools%sgeneralTools%sofflineInstall.py" % (
        scriptsDir, os.sep, os.sep, os.sep)
    pyContents = "\\n\\".join(utilMod.readFile(offlineInstallPy))
    contents = "python(\"\\n\\\naToolsZipPath = '%s%saTools.zip'\\n\\\n" % (
        offlineFolder, os.sep)
    contents += "\\n\\\n".join("".join(
        utilMod.readFile(offlineInstallPy)).split("\n"))
    contents += "\");"

    utilMod.writeFile(filePath, contents)
Example #3
0
def saveInfoWithUser(file, attr, value, delete=False):
    filePath = getSaveFilePath(file)
    newFileContents = []
    writeNew = True

    if isinstance(value, str): value = "\"%s\"" % value

    readFileContents = utilMod.readFile(filePath)

    if readFileContents != None:

        for loopLine in readFileContents:
            if loopLine.find(attr) == 0:
                if not delete:
                    newFileContents.append("%s = %s\n" % (attr, value))

                writeNew = None
            else:
                if len(loopLine) > 1:
                    newFileContents.append(loopLine)

    if writeNew:
        if not delete: newFileContents.append("%s = %s\n" % (attr, value))

    utilMod.writeFile(filePath, newFileContents)
Example #4
0
def saveInfoWithUser(file, attr, value, delete=False):
    filePath        = getSaveFilePath(file)
    newFileContents = []
    writeNew        = True
    
    if isinstance(value, str): value = "\"%s\""%value
    
    readFileContents = utilMod.readFile(filePath)
    
    if readFileContents != None:
        
        for loopLine in readFileContents:
            if loopLine.find(attr) == 0:
                if not delete: 
                    newFileContents.append("%s = %s\n"%(attr, value))

                writeNew = None
            else:
                if len(loopLine) > 1:
                    newFileContents.append(loopLine)
        
    if writeNew:
        if not delete: newFileContents.append("%s = %s\n"%(attr, value)) 

    
    utilMod.writeFile(filePath, newFileContents)
Example #5
0
def loadFileWithUser(folder, file, ext="aTools"):
    filePath = getSaveFilePath("%s%s%s" % (folder, os.sep, file), ext)

    readFileContents = utilMod.readFile(filePath)

    if readFileContents != None:
        return eval(readFileContents[0])

    return None
Example #6
0
def loadFileWithUser(folder, file, ext="aTools"):    
    filePath    = getSaveFilePath("%s%s%s"%(folder, os.sep, file), ext)
    
    
    readFileContents = utilMod.readFile(filePath)
    
    if readFileContents != None:
        return eval(readFileContents[0])
    
    return None
Example #7
0
def loadInfoWithUser(file, attr):
    filePath = getSaveFilePath(file)

    readFileContents = utilMod.readFile(filePath)

    if readFileContents != None:

        for loopLine in readFileContents:
            if loopLine.find(attr) == 0:
                value = loopLine[(loopLine.find("=") + 2):]
                return eval(value)

    return None
Example #8
0
def loadInfoWithUser(file, attr):    
    filePath    = getSaveFilePath(file)
    
    readFileContents = utilMod.readFile(filePath)
    
    if readFileContents != None:
        
        for loopLine in readFileContents:
            if loopLine.find(attr) == 0:
                value = loopLine[(loopLine.find("=")+2):]
                return eval(value)
    
    return None
Example #9
0
from aTools.animTools       import animationCrashRecovery;      reload(animationCrashRecovery)
from aTools.animTools       import framePlaybackRange;          reload(framePlaybackRange)
from aTools.animTools       import jumpToSelectedKey;           reload(jumpToSelectedKey)
    
import sys
import urllib2
import shutil
import zipfile
import os
import webbrowser

animationCrashRecovery  = animationCrashRecovery.AnimationCrashRecovery()
tumbleOnObjects         = tumbleOnObjects.TumbleOnObjects()

versionInfoPath     = "%sversion_info.txt"%aToolsMod.getaToolsPath(inScriptsFolder=False)
versionInfoContents = utilMod.readFile(versionInfoPath)
VERSION             = versionInfoContents[0].split(" ")[-1].replace("\n", "")
WHATISNEW           = "".join(versionInfoContents[1:])
KEYSLIST            = ["Up", "Down", "Left", "Right", "", "Page_Up", "Page_Down", "Home", "End", "Insert", "", "Return", "Space", "", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12"]
SITE_URL            = "http://camiloalan.wix.com/atoolswebsite"
ATOOLS_FOLDER       = "https://dl.dropboxusercontent.com/u/7614713/aTools/"
UPDATE_URL          = "%slatest_version.txt"%ATOOLS_FOLDER
DOWNLOAD_URL        = "%saTools.zip"%ATOOLS_FOLDER
lastUsedVersion     = aToolsMod.loadInfoWithUser("userPrefs", "lastUsedVersion")
HELP_URL            = "http://camiloalan.wix.com/atoolswebsite#!help/cjg9"
DONATE_URL          = "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5RQLT89A239K6"




PREFS = [{  "name":"tumbleOnObjects",
Example #10
0
from aTools.animTools       import animationCrashRecovery;      reload(animationCrashRecovery)
from aTools.animTools       import framePlaybackRange;          reload(framePlaybackRange)
from aTools.animTools       import jumpToSelectedKey;           reload(jumpToSelectedKey)
    
import sys
import urllib2
import shutil
import zipfile
import os
import webbrowser

animationCrashRecovery  = animationCrashRecovery.AnimationCrashRecovery()
tumbleOnObjects         = tumbleOnObjects.TumbleOnObjects()

versionInfoPath     = "%sversion_info.txt"%aToolsMod.getaToolsPath(inScriptsFolder=False)
versionInfoContents = utilMod.readFile(versionInfoPath)
VERSION             = versionInfoContents[0].split(" ")[-1].replace("\n", "")
WHATISNEW           = "".join(versionInfoContents[1:])
KEYSLIST            = ["Up", "Down", "Left", "Right", "", "Page_Up", "Page_Down", "Home", "End", "Insert", "", "Return", "Space", "", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12"]
SITE_URL            = "http://camiloalan.wix.com/atoolswebsite"
ATOOLS_FOLDER       = "https://dl.dropboxusercontent.com/u/7614713/aTools/"
UPDATE_URL          = "%slatest_version.txt"%ATOOLS_FOLDER
DOWNLOAD_URL        = "%saTools.zip"%ATOOLS_FOLDER
lastUsedVersion     = aToolsMod.loadInfoWithUser("userPrefs", "lastUsedVersion")
HELP_URL            = "http://camiloalan.wix.com/atoolswebsite#!help/cjg9"
DONATE_URL          = "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5RQLT89A239K6"




PREFS = [{  "name":"tumbleOnObjects",