Esempio n. 1
0
def open_project(filepath, in_new_tab=False, make_current_project=True):
    """
    Open project and return it.

    Parameters
    ----------
    filepath : str
    in_new_tab : bool, optional
        Whether to open project in new tab (default=`False`).
    make_current_project : bool, optional
        Whether to make opened project current project (has no effect
        if `in_new_tab` is `False`).

    Returns
    -------
    project : Project
        Opened project.
    """
    if not make_current_project:
        current_project = reapy.Project()
    if in_new_tab:
        add_project_tab(make_current_project=True)
    RPR.Main_openProject(filepath)
    project = reapy.Project()
    if not make_current_project:
        current_project.make_current_project()
    return project
Esempio n. 2
0
def open_project(filepath):
    """
    Open project and return it.

    Returns
    -------
    project : Project
        Opened project.
    """
    RPR.Main_openProject(filepath)
    project = reapy.Project()
    return project