Beispiel #1
0
def browseForDirectory():
    dirName = MLABFileDialog.getExistingDirectory(
        ctx.localPath(), "Select CLI Modules Directory")
    if dirName:
        importPaths = _importPathsAsList()
        importPaths.append(ctx.unexpandFilename(dirName))
        ctx.field('importPaths').value = PATH_SEP.join(importPaths)
def fileDialog(field=None):
  filename = ctx.expandFilename(ctx.field("filename").stringValue())
  filename = MLABFileDialog.getOpenFileName(filename,"Hdr/Img Files (*.hdr)","Open file")
  if not filename == "":
    ctx.field("filename").setStringValue(ctx.unexpandFilename(filename))
    
  parseFile(filename)
def fileDialog():
    #exp = ctx.expandFilename(ctx.field("AtlasPath").stringValue())
    filename = MLABFileDialog.getExistingDirectory(
        ctx.expandFilename(ctx.field("AtlasPath").stringValue()),
        "Select the Atlas directory", MLABFileDialog.ShowDirsOnly)
    if filename:
        ctx.field("AtlasPath").value = ctx.unexpandFilename(filename)
        ctx.field("name").value = filename
Beispiel #4
0
def fileDialog(field=None):
    filename = ctx.expandFilename(ctx.field("filename").stringValue())
    filename = MLABFileDialog.getOpenFileName(filename,
                                              "Hdr/Img Files (*.hdr)",
                                              "Open file")
    if not filename == "":
        ctx.field("filename").setStringValue(ctx.unexpandFilename(filename))

    parseFile(filename)