top of page
- Script Code -

dofile(reaper.AZ_GetLuaInitPath()) 

require("reaper_AZSTOKE_BRONZE")

require("reaper_AZSTOKE_SILVER")

require("reaper_AZSTOKE_GOLD") 


url = "p4v URL"           

userName = "p4vユーザー名"

password = "p4vパスワード"


workspace = "p4vワークスペース名"

depotPath = "p4vフォルダパス"


setTime = 0


if reaper.AZ_P4_Connect(url, userName, password)  then

  

    fileList = reaper.AZ_P4_ExportAudioToProject(workspace, depotPath, "",  -1, "wav", true, {".*/unuse/.*", ".*_old\\..*"})

    

    for i, filePath in pairs(fileList) do

    

        parentDir = reaper.AZ_GetPathInfo(filePath)["ParentName"]

        

        track = reaper.AZ_InsertTrackSearchUniqueOnly(0, parentDir)

    

        item = reaper.AZ_InsertMediaTrackItemSecond(track, filePath, 0, setTime)

        

        endTime = reaper.AZ_GetMediaItemEndTime(item)

        

        setTime = endTime + 1

    end

    

    reaper.AZ_P4_Disconnect()

end

- Warm Up -

- Script Detail -

dofile(reaper.AZ_GetLuaInitPath()) 

require("reaper_AZSTOKE_BRONZE")

require("reaper_AZSTOKE_SILVER")

require("reaper_AZSTOKE_GOLD") 


・Import RIGDOCKS


url = "p4v URL"           

userName = "p4vユーザー名"

password = "p4vパスワード"


workspace = "p4vワークスペース名"

depotPath = "p4vフォルダパス"


・Enter the connection info for the Perforce server


setTime = 0


・Media insertion position


if reaper.AZ_P4_Connect(url, userName, password)  then


・Connect to the Perforce server

  

    fileList = reaper.AZ_P4_ExportAudioToProject(workspace, depotPath, "",  -1, "wav", true, {".*/unuse/.*", ".*_old\\..*"})


・Output the latest-state files that meet the following conditions to the project folder and get their paths

  ・wav file

  ・Not in the "unuse" folder

  ・Does not contain the string "_old."

   

    for i, filePath in pairs(fileList) do


・Process each path with a for loop


        parentDir = reaper.AZ_GetPathInfo(filePath)["ParentName"]


・Get the parent folder name of the file path


        track = reaper.AZ_InsertTrackSearchUniqueOnly(0, parentDir)


・Create the track only if there is no track in Reaper with the same name as the parent folder


        item = reaper.AZ_InsertMediaTrackItemSecond(track, filePath, 0, setTime)


・Insert the file into the track with the same name as the parent folder


        endTime = reaper.AZ_GetMediaItemEndTime(item)


        setTime = endTime + 1


・Get the end position of the inserted file and use 1 second after it as the next file's insertion position


    end

    

    reaper.AZ_P4_Disconnect()


・After processing each file, disconnect from the Perforce server


end

- API LINK -
- API LINK -

Perforce

AZSTOKE_Perforce_latest_Insert_2

Import Perforce-managed files into Reaper while filtering out unnecessary files

01_BRONZE_ss_edited.png
01_SILVER_edited_edited.png
03_GOLD_edited_edited.png
bottom of page