예제 #1
0
def RunShapeFileImportTool():
    """
    <Script>
    <Author>admin</Author>
    <Description>Please enter script description here</Description>
    </Script>
    """
    # Get all the files in the directory
    directory = r"C:\temp\Del_Shape"  #directory with shape files
    FileList = Directory.GetFiles(directory)
    DB_folder = '/xx'  #folder to import shape files to

    for file in FileList:
        fullPath = Path.Combine(directory, file)
        if Path.GetExtension(fullPath) == '.shp':
            featureClassName = '/' + Path.GetFileNameWithoutExtension(
                fullPath)  #filenameWithoutExtension

            inputItems = gisMgr.FeatureClassGroupList.Get(DB_folder)
            if inputItems == None:
                inputItems = gisMgr.FeatureClassGroupList.CreateNew(DB_folder)

            coordinateSystem = gisMgr.DefaultCoordinateSystem
            ShapeFileImportTool(inputItems, coordinateSystem, featureClassName,
                                fullPath)
예제 #2
0
파일: sox.py 프로젝트: pedipanol/mml2vgm
    def run(self, Mml2vgmInfo, index):

        #設定値の読み込み
        Mml2vgmInfo.loadSetting()

        #初回のみ(設定値が無いときのみ)git.exeの場所をユーザーに問い合わせ、設定値として保存する
        gt = Mml2vgmInfo.getSettingValue("soxpath")
        if gt is None:
            gt = Mml2vgmInfo.fileSelect(
                "sox.exeを選択してください(この選択内容は設定値として保存され次回からの問い合わせはありません)")
            if not Mml2vgmInfo.confirm("sox.exeの場所は以下でよろしいですか\r\n" + gt):
                return None
            Mml2vgmInfo.setSettingValue("soxpath", gt)
            Mml2vgmInfo.saveSetting()

        #念のため
        if gt is None or gt == "":
            Mml2vgmInfo.msg("sox.exeを指定してください")
            return None

        #ファイル情報の整理
        for fnf in Mml2vgmInfo.fileNamesFull:
            ext = Path.GetExtension(fnf)
            bas = Path.GetFileNameWithoutExtension(fnf)
            wp = Path.GetDirectoryName(fnf)
            Directory.SetCurrentDirectory(wp)

            si = ScriptInfo()

            # 引数を組み立てる
            if index == 0:
                args = "--i \"" + bas + ext + "\""
            elif index == 1:
                # -b       8bit
                # -c 1     mono
                # -r 14k   rate 14KHz
                args = bas + ext + " -b 8 -r 8k -c 1 " + bas + "_8k" + ext
            elif index == 2:
                args = bas + ext + " -r 14k -e signed-integer -c 1 " + bas + "_14k" + ext
            elif index == 3:
                args = bas + ext + " -r 16k -e signed-integer -c 1 " + bas + "_16k" + ext
            elif index == 4:
                args = bas + ext + " -r 18500 -e signed-integer -c 1 " + bas + "_18500" + ext

            ret = Mml2vgmInfo.runCommand(gt, args, True)

            if ret != "":
                Mml2vgmInfo.msg(ret)
            else:
                if index != 0:
                    Mml2vgmInfo.msg("success")

        Mml2vgmInfo.refreshFolderTreeView()

        return si
예제 #3
0
    def run(self, Mml2vgmInfo, index):

        #設定値の読み込み
        Mml2vgmInfo.loadSetting()

        #初回のみ(設定値が無いときのみ)sox.exeの場所をユーザーに問い合わせ、設定値として保存する
        gt = Mml2vgmInfo.getSettingValue("soxpath")
        if gt is None:
            gt = Mml2vgmInfo.fileSelect(
                "sox.exeを選択してください(この選択内容は設定値として保存され次回からの問い合わせはありません)")
            if not Mml2vgmInfo.confirm("sox.exeの場所は以下でよろしいですか\r\n" + gt):
                return None
            Mml2vgmInfo.setSettingValue("soxpath", gt)
            Mml2vgmInfo.saveSetting()

        #念のため
        if gt is None or gt == "":
            Mml2vgmInfo.msg("sox.exeを指定してください")
            return None

        #ファイル情報の整理
        for fnf in Mml2vgmInfo.fileNamesFull:
            ext = Path.GetExtension(fnf)
            bas = Path.GetFileNameWithoutExtension(fnf)
            wp = Path.GetDirectoryName(fnf)
            Directory.SetCurrentDirectory(wp)

            si = ScriptInfo()

            argList = [
                "--i \"{0}{1}\"",
                "\"{0}{1}\" -r 8000  -b 8 -c 1 \"{0}_8k{1}\"",
                "\"{0}{1}\" -r 14000 -b 8 -c 1 \"{0}_14k{1}\"",
                "\"{0}{1}\" -r 16000 -b 8 -c 1 \"{0}_16k{1}\"",
                "\"{0}{1}\" -r 18500 -b 8 -c 1 \"{0}_18500{1}\"",
                "\"{0}{1}\" -b 16 -r 14000 -e signed-integer -c 1 \"{0}_16b_14k{1}\"",
                "\"{0}{1}\" -b 16 -r 16000 -e signed-integer -c 1 \"{0}_16b_16k{1}\"",
                "\"{0}{1}\" -b 16 -r 18500 -e signed-integer -c 1 \"{0}_16b_18500{1}\"",
                "\"{0}{1}\" -n trim 0 1.5 noiseprof \"{0}.noise-profile\"",
                "\"{0}{1}\" \"{0}_cleaned{1}\" noisered \"{0}.noise-profile\" 0.2 "
            ]
            args = argList[index].format(bas, ext)

            ret = Mml2vgmInfo.runCommand(gt, args, True)
            if ret != "":
                Mml2vgmInfo.msg(ret)
            else:
                if index != 0:
                    Mml2vgmInfo.msg("success")

        Mml2vgmInfo.refreshFolderTreeView()

        return si
예제 #4
0
def GetFileExtension(filePath):
    return Path.GetExtension(filePath)
예제 #5
0
        # show output window
        output.Show()
        output.WriteLine('Setting temperature to ' + str(temp) + '[*C]')
        output.WriteLine('Setting humidity to ' + str(hum) + '[%]')
        output.WriteLine('Setting pressure to ' + str(pres) + '[hPa]')
        
        # channel var
        ch = 0
      
        # iterate over all folders
        for file in files:
            ch = ch + 1
            # get file paths
            folder = Path.GetDirectoryName(file)
            name = Path.GetFileNameWithoutExtension(file)
            ext = Path.GetExtension(file)
            newname = folder + '\\' + 'edited_' + str(ch) + '_' + name + ext
            wave = waves.LoadWave(file)
            wave.AudioFile.Temperature = temp
            wave.AudioFile.Humidity = hum
            wave.AudioFile.Pressure = pres
            wave.AudioFile.ReceiverNo = ch
            wave.SaveAs(newname)
            output.WriteLine('Saving as: ' + newname + ' - ok')

            wave.Close()	# make sure to close the file, otherwise you'll run out of memory
        
        output.WriteLine('That\'s all')


예제 #6
0
    def run(self, Mml2vgmInfo, index):
        
        #設定値の読み込み
        Mml2vgmInfo.loadSetting()

        #ファイル選択
        xgmFn = Mml2vgmInfo.fileSelect("xgmファイルの選択")
        if xgmFn is None:
            return None

        if not File.Exists(xgmFn):
            Mml2vgmInfo.msg("ファイルが見つかりません")
            return None

        if Path.GetExtension(xgmFn).ToLower() != ".xgm":
            Mml2vgmInfo.msg("拡張子が.xgmではありません")
            return None

        #ファイル読み込み
        xgmDat = File.ReadAllBytes(xgmFn)

        #FCCチェック
        if xgmDat[0]!=88 or xgmDat[1]!=71 or xgmDat[2]!=77:
            Mml2vgmInfo.msg("FCCがXGMではありません")
            return None

        sampleDataBlockSize = xgmDat[0x100] + xgmDat[0x101] * 0x100
        #Mml2vgmInfo.msg(sampleDataBlockSize.ToString())
        
        versionInformation = xgmDat[0x102];
        #Mml2vgmInfo.msg(versionInformation.ToString())
        
        dataInformation = xgmDat[0x103];
        #Mml2vgmInfo.msg(dataInformation.ToString())
        
        isNTSC = (dataInformation & 0x1) == 0;
        #Mml2vgmInfo.msg(isNTSC.ToString())
        
        existGD3 = (dataInformation & 0x2) != 0;
        #Mml2vgmInfo.msg(existGD3.ToString())
        
        multiTrackFile = (dataInformation & 0x4) != 0;
        #Mml2vgmInfo.msg(multiTrackFile.ToString())

        sampleDataBlockAddr = 0x104;
        #Mml2vgmInfo.msg(sampleDataBlockAddr.ToString())

        adr = sampleDataBlockAddr + sampleDataBlockSize * 256
        musicDataBlockSize = xgmDat[adr] + xgmDat[adr+1]*0x100 + xgmDat[adr+2]*0x10000 + xgmDat[adr+3]*0x1000000
        #Mml2vgmInfo.msg(musicDataBlockSize.ToString())

        musicDataBlockAddr = sampleDataBlockAddr + sampleDataBlockSize * 256 + 4;
        #Mml2vgmInfo.msg(musicDataBlockAddr.ToString())

        gd3InfoStartAddr = musicDataBlockAddr + musicDataBlockSize;
        #Mml2vgmInfo.msg(gd3InfoStartAddr.ToString())

        #PCMテーブルを取得&出力
        lst = List[Byte]()
        n = 0
        while n < 63*4:
            ind=n+4
            if ind == xgmDat.Length:
                break
            lst.Add(xgmDat[ind])
            n+=1
        File.WriteAllBytes( xgmFn + ".pcmTable.bin" , lst.ToArray() )
        lst.Clear();

        #PCMデータを取得&出力
        if sampleDataBlockSize > 0:
            n=0
            while n < sampleDataBlockSize * 256:
                ind=n + sampleDataBlockAddr
                if ind == xgmDat.Length:
                    break
                lst.Add(xgmDat[ind])
                n+=1
            File.WriteAllBytes( xgmFn + ".pcmData.bin" , lst.ToArray() )
            lst.Clear();

        #SEQデータを取得&出力
        if musicDataBlockSize > 0:
            n=0
            while n<musicDataBlockSize:
                ind=n + musicDataBlockAddr
                if ind == xgmDat.Length:
                    break
                lst.Add(xgmDat[ind])
                n+=1
            File.WriteAllBytes( xgmFn + ".seqData.bin" , lst.ToArray() )
            lst.Clear();

        #GD3データを取得&出力
        if existGD3:
            n=0
            while n < xgmDat.Length - gd3InfoStartAddr:
                ind=n + gd3InfoStartAddr
                lst.Add(xgmDat[ind])
                n+=1
            File.WriteAllBytes( xgmFn + ".gd3.bin" , lst.ToArray() )
            lst.Clear();


        Mml2vgmInfo.msg("xgmファイルを分割しました")


        #戻り値を生成(何もしないけど念のため)
        si = ScriptInfo()
        si.responseMessage = ""
        
        return si
예제 #7
0
    def renderArgument(self):

        renderEngines = {
            "V-Ray": "0",
            "V-Ray RT": "1",
            u"V-Ray RT(OpenCL)": "3",
            u"V-Ray RT(CUDA)": "5"
        }
        sRGBOptions = ["On", "Off"]

        displayWindow = self.GetBooleanPluginInfoEntryWithDefault(
            "DisplayVFB", False)
        autoclose = self.GetBooleanPluginInfoEntryWithDefault(
            "AutocloseVFB", True)
        displaySRGB = self.GetPluginInfoEntryWithDefault("DisplaySRGB", "On")

        # Get the frame information.
        startFrame = self.GetStartFrame()
        endFrame = self.GetEndFrame()
        singleRegionJob = self.IsTileJob()
        singleRegionFrame = str(self.GetStartFrame())
        singleRegionIndex = self.GetCurrentTaskId()
        separateFilesPerFrame = self.GetBooleanPluginInfoEntryWithDefault(
            "SeparateFilesPerFrame", False)
        regionRendering = self.GetBooleanPluginInfoEntryWithDefault(
            "RegionRendering", False)
        rtEngine = self.GetPluginInfoEntryWithDefault("VRayEngine", "V-Ray")
        rtTimeout = self.GetFloatPluginInfoEntryWithDefault("RTTimeout", 0.00)
        rtNoise = self.GetFloatPluginInfoEntryWithDefault("RTNoise", 0.001)
        rtSampleLevel = self.GetIntegerPluginInfoEntryWithDefault(
            "RTSamples", 0)

        # Can't allow it to be interactive or display the image because that would hang the slave
        renderarguments = " -scenefile=\"" + self.tempSceneFilename + "\" -interactive=0"

        if not displayWindow:
            renderarguments += " -display=0"  # Default value is 1
        else:
            if autoclose:
                renderarguments += " -autoclose=1"  # Default value is 0

            renderarguments += " -displaySRGB=%s" % (
                sRGBOptions.index(displaySRGB) + 1)

        renderarguments += " -rtEngine=%s" % renderEngines[rtEngine.strip()]

        if not rtEngine == "V-Ray":
            renderarguments += " -rtTimeOut=%s -rtNoise=%s -rtSampleLevel=%s" % (
                rtTimeout, rtNoise, rtSampleLevel)

        renderarguments += " -frames=" + str(startFrame)
        if endFrame > startFrame:
            renderarguments += "-" + str(endFrame)

        # Set the output path.
        outputFile = self.GetPluginInfoEntryWithDefault("OutputFilename",
                                                        "").strip()
        if outputFile != "":
            outputFile = RepositoryUtils.CheckPathMapping(outputFile)
            outputFile = PathUtils.ToPlatformIndependentPath(outputFile)

            if regionRendering:
                outputPath = Path.GetDirectoryName(outputFile)
                outputFileName = Path.GetFileNameWithoutExtension(outputFile)
                outputExtension = Path.GetExtension(outputFile)

                if singleRegionJob:
                    outputFile = os.path.join(
                        outputPath, ("_tile%s_" % singleRegionIndex) +
                        outputFileName + outputExtension)

                else:
                    currTile = self.GetIntegerPluginInfoEntryWithDefault(
                        "CurrentTile", 1)
                    outputFile = os.path.join(outputPath,
                                              ("_tile%d_" % currTile) +
                                              outputFileName + outputExtension)

            renderarguments += " -imgFile=\"" + outputFile + "\""

        # Now set the rest of the options.
        renderarguments += " -numThreads=" + str(self.GetThreadCount())

        width = self.GetIntegerPluginInfoEntryWithDefault("Width", 0)
        if width > 0:
            renderarguments += " -imgWidth=" + str(width)

        height = self.GetIntegerPluginInfoEntryWithDefault("Height", 0)
        if height > 0:
            renderarguments += " -imgHeight=" + str(height)

        if regionRendering:
            regionNumString = ""
            if singleRegionJob:
                regionNumString = str(singleRegionIndex)

            #Coordinates In Pixels will always be true when using the common tilerendering code.
            if self.GetBooleanPluginInfoEntryWithDefault(
                    "CoordinatesInPixels", False):
                #With the coordinates already being in pixels we do not need to modify the coordinates.
                xStart = self.GetIntegerPluginInfoEntryWithDefault(
                    "RegionXStart" + regionNumString, 0)
                xEnd = self.GetIntegerPluginInfoEntryWithDefault(
                    "RegionXEnd" + regionNumString, 0)
                yStart = self.GetIntegerPluginInfoEntryWithDefault(
                    "RegionYStart" + regionNumString, 0)
                yEnd = self.GetIntegerPluginInfoEntryWithDefault(
                    "RegionYEnd" + regionNumString, 0)

            else:
                self.LogWarning(
                    "Using deprecated coordinate system.  Please submit new jobs to use the new coordinates system."
                )
                xStart = round(
                    self.GetFloatPluginInfoEntryWithDefault(
                        "RegionXStart" + regionNumString, 0) * width)
                xEnd = round(
                    self.GetFloatPluginInfoEntryWithDefault(
                        "RegionXEnd" + regionNumString, 0) * width)
                yStart = round(
                    self.GetFloatPluginInfoEntryWithDefault(
                        "RegionYStart" + regionNumString, 0) * height)
                yEnd = round(
                    self.GetFloatPluginInfoEntryWithDefault(
                        "RegionYEnd" + regionNumString, 0) * height)

            renderarguments += " -region=%d;%d;%d;%d" % (xStart, yStart, xEnd,
                                                         yEnd)

        disableProgressColor = self.GetBooleanConfigEntryWithDefault(
            "DisableProgressColor", False)
        if disableProgressColor:
            renderarguments += " -DisableProgressColor=0"

        renderarguments += " " + self.GetPluginInfoEntryWithDefault(
            "CommandLineOptions", "")

        yetiSearchPaths = []
        searchPathIndex = 0
        while True:
            searchPath = self.GetPluginInfoEntryWithDefault(
                "YetiSearchPath" + str(searchPathIndex),
                "").replace("\\", "/")
            if not searchPath:
                break

            yetiSearchPaths.append(
                RepositoryUtils.CheckPathMapping(searchPath))

            searchPathIndex += 1

        if len(yetiSearchPaths) > 0:
            oldSearchPath = os.environ.get("PG_IMAGE_PATH")
            if oldSearchPath:
                yetiSearchPaths.append(oldSearchPath)

            yetiSepChar = ":"
            if SystemUtils.IsRunningOnWindows():
                yetiSepChar = ";"

            self.SetProcessEnvironmentVariable(
                "PG_IMAGE_PATH", yetiSepChar.join(yetiSearchPaths))

        return renderarguments
예제 #8
0
print 'Confidence Threshold Value : ', conf_th
print 'Add Segmented Image to Original : ', addseg2orig
print 'Adapt PixelType of Segmented Image : ', adaptpx
print '-----------------------------------------------------------------------------'
print 'Segmenting ...'

# extract select channel from active image
substr = 'C(' + str(chdict[channelname]) + ')'
image = Zen.Processing.Utilities.CreateSubset(activeimage, substr, False)

# do the pixel classification for the current image
seg = classify(image,
               modelname,
               use_confidence=use_conf,
               confidence_threshold=conf_th,
               format=segmentationformat,
               extractclass=extract,
               addseg=False,
               classid=extract_id + 1,
               adapt_pixeltype=adaptpx)

if addseg2orig:
    # add segmentation result to the original image
    orig_seg = Zen.Processing.Utilities.AddChannels(activeimage, seg)
    Zen.Application.Documents.Add(orig_seg)
    seg_name = Path.GetFileNameWithoutExtension(
        activeimagefilename) + '_seg' + Path.GetExtension(activeimagefilename)
    orig_seg.Name = seg_name

print 'Done.'
예제 #9
0
    if Zen.Application.Documents.ActiveDocument.IsZenImage:
        image = Zen.Application.ActiveDocument
        imagefiles.append(image.FileName)

print(
    '-----------------------------------------------------------------------------'
)

# process all images inside the specified folder
for imagefile in imagefiles:

    print('Loading Image : ', imagefile)
    if not segactiveimg:
        image = Zen.Application.LoadImage(imagefile, False)
    seg_name = Path.GetFileNameWithoutExtension(
        image.FileName) + '_seg' + Path.GetExtension(image.FileName)
    seg_path = Path.GetDirectoryName(image.FileName)
    print('Segmenting ...')

    # check channel number
    if number_of_classes < extract_id:
        message = 'Not enough classes inside model to extract class : ', extract_id
        print(message)
        print('Number of classes in model : ', modelname, ' = ',
              number_of_classes)
        print('Exit.')
        raise SystemExit

    # do the pixel classification for the current image
    seg = classify(image,
                   modelname,
예제 #10
0
    config = ConfigurationManager.OpenExeConfiguration(
        ConfigurationUserLevel.None)
    directory = None

if config.AppSettings.Settings["Characters"] is not None:
    path = config.AppSettings.Settings[
        "Characters"].Value if directory is None else Path.Combine(
            directory, config.AppSettings.Settings["Characters"].Value)

    if not File.Exists(path):
        characterList = List[Character]()

        for fileName in Directory.EnumerateFiles(
                Path.GetDirectoryName(Assembly.GetEntryAssembly().Location),
                "*", SearchOption.AllDirectories):
            extension = Path.GetExtension(fileName)

            if extension.Equals(".xml", StringComparison.OrdinalIgnoreCase):
                fs = None

                try:
                    fs = FileStream(fileName, FileMode.Open, FileAccess.Read,
                                    FileShare.Read)
                    rootElement = XDocument.Load(fs).Root

                    if rootElement.Name.LocalName.Equals("script"):
                        for characterElement in rootElement.Elements(
                                "character"):
                            for sequenceElement in characterElement.Elements(
                                    "sequence"):
                                character = Character()
예제 #11
0
def SubmitButtonPressed(*args):
    global scriptDialog
    global integration_dialog
    
    submitScene = bool(scriptDialog.GetValue("SubmitSceneBox"))
    multiMachine = bool(scriptDialog.GetValue("MultiMachineBox"))
    
    # Check if scene file exists
    sceneFile = scriptDialog.GetValue( "SceneBox" )
    if( not File.Exists( sceneFile ) ):
        scriptDialog.ShowMessageBox("Project file %s does not exist." % sceneFile, "Error" )
        return
    elif(not submitScene and PathUtils.IsPathLocal(sceneFile)):
        result = scriptDialog.ShowMessageBox("The project file " + sceneFile + " is local, are you sure you want to continue?","Warning", ("Yes","No") )
        if( result == "No" ):
            return
    
    concurrentTasks = scriptDialog.GetValue( "ConcurrentTasksBox" )
    if concurrentTasks > 1:
        result = scriptDialog.ShowMessageBox("The concurrent tasks is set to a value greater than 1.  This can cause Jobs to hang when rendering, are you sure you want to continue?","Warning", ("Yes","No") )
        if( result == "No" ):
            return
    
    outputFile = ""
    frames = ""
    jobName = scriptDialog.GetValue( "NameBox" )
    
    # Get the comp
    comp = scriptDialog.GetValue("CompBox")
    if comp != "":
        # Check that the output is valid
        outputFile = scriptDialog.GetValue( "OutputBox" ).strip()
        if len(outputFile) > 0:
            if not Directory.Exists( Path.GetDirectoryName(outputFile) ):
                scriptDialog.ShowMessageBox( "The directory of the output file does not exist:\n" + Path.GetDirectoryName(outputFile), "Error" )
                return
            elif(PathUtils.IsPathLocal(outputFile)):
                result = scriptDialog.ShowMessageBox("The output file " + outputFile + " is local, are you sure you want to continue?","Warning", ("Yes","No") )
                if( result == "No" ):
                    return
            
            extension = Path.GetExtension( outputFile )
            if not IsMovieFormat( extension ):
                if outputFile.find( "[#" ) < 0 and outputFile.find( "#]" ) < 0:
                    directory = Path.GetDirectoryName( outputFile )
                    filename = Path.GetFileNameWithoutExtension( outputFile )
                    outputFile = Path.Combine( directory, filename + "[#####]" + extension )
        
        #Since we don't specify ranges for multi-machine rendering, don't check frame range when Multi-Machine Rendering = True
        if not multiMachine:
            # Check if a valid frame range has been specified.
            frames = scriptDialog.GetValue( "FramesBox" )
            if( not FrameUtils.FrameRangeValid( frames ) ):
                scriptDialog.ShowMessageBox( "Frame range %s is not valid" % frames, "Error" )
                return
    else:
        jobName = jobName + " - Entire Render Queue"
    
    if multiMachine:
        jobName = jobName + " (multi-machine rendering)"
    
    # Check if Integration options are valid
    if not integration_dialog.CheckIntegrationSanity( outputFile ):
        return
    
    # Create job info file.
    jobInfoFilename = Path.Combine( ClientUtils.GetDeadlineTempPath(), "ae_job_info.job" )
    writer = StreamWriter( jobInfoFilename, False, Encoding.Unicode )
    writer.WriteLine( "Plugin=AfterEffects" )
    writer.WriteLine( "Name=%s" % jobName )
    writer.WriteLine( "Comment=%s" % scriptDialog.GetValue( "CommentBox" ) )
    writer.WriteLine( "Department=%s" % scriptDialog.GetValue( "DepartmentBox" ) )
    writer.WriteLine( "Pool=%s" % scriptDialog.GetValue( "PoolBox" ) )
    writer.WriteLine( "SecondaryPool=%s" % scriptDialog.GetValue( "SecondaryPoolBox" ) )
    writer.WriteLine( "Group=%s" % scriptDialog.GetValue( "GroupBox" ) )
    writer.WriteLine( "Priority=%s" % scriptDialog.GetValue( "PriorityBox" ) )
    writer.WriteLine( "TaskTimeoutMinutes=%s" % scriptDialog.GetValue( "TaskTimeoutBox" ) )
    writer.WriteLine( "EnableAutoTimeout=%s" % scriptDialog.GetValue( "AutoTimeoutBox" ) )
    writer.WriteLine( "ConcurrentTasks=%s" % concurrentTasks )
    writer.WriteLine( "LimitConcurrentTasksToNumberOfCpus=%s" % scriptDialog.GetValue( "LimitConcurrentTasksBox" ) )
    
    if( bool(scriptDialog.GetValue( "IsBlacklistBox" )) ):
        writer.WriteLine( "Blacklist=%s" % scriptDialog.GetValue( "MachineListBox" ) )
    else:
        writer.WriteLine( "Whitelist=%s" % scriptDialog.GetValue( "MachineListBox" ) )
    
    writer.WriteLine( "LimitGroups=%s" % scriptDialog.GetValue( "LimitGroupBox" ) )
    writer.WriteLine( "JobDependencies=%s" % scriptDialog.GetValue( "DependencyBox" ) )
    writer.WriteLine( "OnJobComplete=%s" % scriptDialog.GetValue( "OnJobCompleteBox" ) )
    
    if( bool(scriptDialog.GetValue( "SubmitSuspendedBox" )) ):
        writer.WriteLine( "InitialStatus=Suspended" )
    
    if multiMachine:
        writer.WriteLine( "MachineLimit=0" )
        writer.WriteLine( "Frames=1-%s" % scriptDialog.GetValue( "MultiMachineTasksBox" ) )
        writer.WriteLine( "ChunkSize=1" )
    else:
        if comp != "":
            writer.WriteLine( "MachineLimit=%s" % scriptDialog.GetValue( "MachineLimitBox" ) )
            writer.WriteLine( "Frames=%s" % frames )
            writer.WriteLine( "ChunkSize=%s" % scriptDialog.GetValue( "ChunkSizeBox" ) )
        else:
            writer.WriteLine( "MachineLimit=1" )
            writer.WriteLine( "Frames=0" )
            writer.WriteLine( "ChunkSize=1" )
    
    if len(outputFile) > 0:
        writer.WriteLine( "OutputFilename0=%s" % outputFile.replace( "[#####]", "#####" ) )
    
    extraKVPIndex = 0
    groupBatch = False
    if integration_dialog.IntegrationProcessingRequested():
        extraKVPIndex = integration_dialog.WriteIntegrationInfo( writer, extraKVPIndex )
        groupBatch = groupBatch or integration_dialog.IntegrationGroupBatchRequested()
        
    if groupBatch:
        writer.WriteLine( "BatchName=%s\n" % ( jobName ) ) 
    writer.Close()
    # Create plugin info file.
    version = GetVersionNumber()
    
    pluginInfoFilename = Path.Combine( ClientUtils.GetDeadlineTempPath(), "ae_plugin_info.job" )
    writer = StreamWriter( pluginInfoFilename, False, Encoding.Unicode )
    
    if(not bool(scriptDialog.GetValue("SubmitSceneBox"))):
        writer.WriteLine("SceneFile=%s" % scriptDialog.GetValue("SceneBox").replace("\\","/").strip())
        
    writer.WriteLine("Comp=%s" % scriptDialog.GetValue("CompBox"))
    writer.WriteLine("Version=%s" % str(version) )
    writer.WriteLine("IgnoreMissingLayerDependenciesErrors=%s" % scriptDialog.GetValue("MissingLayers"))
    writer.WriteLine("IgnoreMissingEffectReferencesErrors=%s" % scriptDialog.GetValue("MissingEffects"))
    writer.WriteLine("FailOnWarnings=%s" % scriptDialog.GetValue("FailOnWarnings"))
    
    if multiMachine:
        writer.WriteLine("MultiMachineMode=True")
    else:
        writer.WriteLine("LocalRendering=%s" % scriptDialog.GetValue("LocalRendering"))
    
    writer.WriteLine("OverrideFailOnExistingAEProcess=%s" % scriptDialog.GetValue("OverrideFailOnExistingAEProcess"))
    writer.WriteLine("FailOnExistingAEProcess=%s" % scriptDialog.GetValue("OverrideFailOnExistingAEProcess"))

    writer.WriteLine("MemoryManagement=%s" % scriptDialog.GetValue("MemoryManagement"))
    writer.WriteLine("ImageCachePercentage=%s" % scriptDialog.GetValue("ImageCachePercentage"))
    writer.WriteLine("MaxMemoryPercentage=%s" % scriptDialog.GetValue("MaxMemoryPercentage"))
    
    writer.WriteLine("MultiProcess=%s" % scriptDialog.GetValue("MultiProcess"))
    if version > 8:
        writer.WriteLine("ContinueOnMissingFootage=%s" % scriptDialog.GetValue("MissingFootage"))
    
    if len(outputFile) > 0:
        writer.WriteLine("Output=%s" % outputFile)
    
    writer.Close()
    
    # Setup the command line arguments.
    arguments = [ jobInfoFilename, pluginInfoFilename ]
    if scriptDialog.GetValue( "SubmitSceneBox" ):
        arguments.append( sceneFile )
    
    # Now submit the job.
    results = ClientUtils.ExecuteCommandAndGetOutput( arguments )
    scriptDialog.ShowMessageBox( results, "Submission Results" )