Exemplo n.º 1
0
def saveResponse(control, event):
    # Save the file using a dialog box.
    saveDialog = FBFilePopup()
    saveDialog.Style = FBFilePopupStyle.kFBFilePopupSave
    saveDialog.Filter = '*'
    saveDialog.Caption = 'Save the Current FBX'
    # Set the path to the current user's My Documents.
    saveDialog.Path = os.path.expanduser('~') + '\Documents'
    saveDialog.FileName = 'Characterized.fbx'

    #Save the file
    if saveDialog.Execute():
        app.FileSave(saveDialog.FullFilename)
Exemplo n.º 2
0
def saveResponse(control, event):
    # Save the file using a dialog box.
    saveDialog = FBFilePopup()
    saveDialog.Style = FBFilePopupStyle.kFBFilePopupSave
    saveDialog.Filter = "*"

    saveDialog.Caption = "Save the Current FBX"
    # Set the path to the current user's My Documents.
    saveDialog.Path = os.path.expanduser("~") + "\Documents"
    saveDialog.FileName = "Retarget.fbx"

    if saveDialog.Execute():
        app.FileSave(saveDialog.FullFilename)
Exemplo n.º 3
0
def _save_as_session():
    """
    Save the current session to the supplied path.
    """

    # Save the file using a dialog box.
    saveDialog = FBFilePopup()
    saveDialog.Style = FBFilePopupStyle.kFBFilePopupSave
    saveDialog.Filter = '*'

    saveDialog.Caption = 'Save As'
    saveDialog.FileName = _session_path()

    if saveDialog.Execute():
        mb_app.FileSave(saveDialog.FullFilename)
def _save_as_session():
    """
    Save the current session to the supplied path.
    """

    # Save the file using a dialog box.
    saveDialog = FBFilePopup()
    saveDialog.Style = FBFilePopupStyle.kFBFilePopupSave
    saveDialog.Filter = '*'

    saveDialog.Caption = 'Save As'
    saveDialog.FileName = _session_path()

    if saveDialog.Execute():
        mb_app.FileSave(saveDialog.FullFilename)
    def export_callback(control, event):
        takes = []
        for button in TAKE_BUTTONS:
            if button.State:
                for t in SCENE.Takes:
                    if t.Name == button.Caption:
                        takes.append(t)

        config = takes[0].Name
        path = get_config_value(config + "\\export_path")

        popup = FBFilePopup()
        popup.Caption = "Export takes to"
        popup.Filter = "*.bsi"
        popup.FileName = config + ".bsi"
        if path:
            popup.Path = os.path.dirname(path)
        popup.Style = FBFilePopupStyle.kFBFilePopupSave
        if popup.Execute():
            for t in takes:
                set_config_value(t.Name + "\\export_path", popup.FullFilename)
            dir = os.path.dirname(popup.FullFilename)
            export_takes(dir, takes)