- Script Code -
import sys
sys.path.append(RPR_GetResourcePath() + r"/UserPlugins")
from RIGDOCKS_python import *
from AZSTOKE_BRONZE_python import *
from AZSTOKE_SILVER_python import *
def replaceFoot(originTrackID, sourceFolderPath):
# 1 GetOriginMediaPos
count = AZ_GetTrackMediaTypeCount(0, originTrackID, 'wav', 0, 0)[3]
mediaList = []
for i in range(count):
mediaList.append(
{
'Name' : AZ_GetTrackMediaName(0, originTrackID, i, "", 1024)[3],
'StartPos' : AZ_GetTrackMediaStartTimeSeconds(0, originTrackID, i, 0)[3]
}
)
# 2 CreateTrack
parentTrack = RPR_GetParentTrack(AZ_GetTrackItemSelect(0, originTrackID,0))
replaceTrack = AZ_InsertChildTrack(parentTrack, 0)[0]
replaceTrackName = AZ_GetPathInfo(sourceFolderPath)['FileName']
AZ_SetTrackItemName(replaceTrack, replaceTrackName)
# 3 InsertReplaceAudio
originTrackName = AZ_GetTrackIdName(0, originTrackID, "", 1024)[2]
for media in mediaList:
sourceName = AZ_ReplaceSearchString(media['Name'], originTrackName, replaceTrackName, "", 1024)[3]
path = sourceFolderPath + '\\' + sourceName + ".wav"
AZ_InsertMediaTrackItemSecond(replaceTrack, path, 0, media['StartPos'])
def main():
originTrack = AZ_GetTrackItemSelect(0,0,1)
originTrackName = AZ_GetTrackItemName(originTrack, "", 1024)[1]
originTrackId = AZ_GetTrackItemIndex(originTrack)
rootPath = ""
retval,inputList = AZ_GetUserInputList("SourceImportPath",1,"rootPath :",rootPath)
if not retval:
return
rootPath = inputList[0]
footList = ["armor", "barefoot", "boot", "boot_snow", "boot_water", "heel", "sneaker"]
for foot in footList:
if foot != originTrackName:
replaceFoot(originTrackId, rootPath + "\\" + foot)
main()
- Warm Up -
Line up the bass footsteps
Create different types of footsteps according to a naming convention
- Script Detail -
import sys
sys.path.append(RPR_GetResourcePath() + r"/UserPlugins")
from RIGDOCKS_python import *
from AZSTOKE_BRONZE_python import *
from AZSTOKE_SILVER_python import *
・Make BRONZE/SILVER API available
def replaceFoot(originTrackID, sourceFolderPath):
・Prepare a frame for the replaceFoot function
# 1 GetOriginMediaPos
count = AZ_GetTrackMediaTypeCount(0, originTrackID, 'wav', 0, 0)[3]
・Output the number of Wavs for the specified track ID and assign it to count.
mediaList = []
・Prepare the array
for i in range(count):
・Repeat the process with For for the number of times specified by count
mediaList.append(
{
'Name' : AZ_GetTrackMediaName(0, originTrackID, i, "", 1024)[3],
'StartPos' : AZ_GetTrackMediaStartTimeSeconds(0, originTrackID, i, 0)[3]
}
・Name and StartPos to be added to the array
)
# 2 CreateTrack
parentTrack = RPR_GetParentTrack(AZ_GetTrackItemSelect(0, originTrackID,0))
・Get the parent track of the specified track ID
replaceTrack = AZ_InsertChildTrack(parentTrack, 0)[0]
・Adding a Child Track to a Parent Track
replaceTrackName = AZ_GetPathInfo(sourceFolderPath)['FileName']
・Get the file name of Path and assign it to replaceTrackName
AZ_SetTrackItemName(replaceTrack, replaceTrackName)
・Naming Child Tracks
# 3 InsertReplaceAudio
originTrackName = AZ_GetTrackIdName(0, originTrackID, "", 1024)[2]
・Get the name of the given track ID
for media in mediaList:
・Repeat for the number of arrays in mediaList
sourceName = AZ_ReplaceSearchString(media['Name'], originTrackName, replaceTrackName, "", 1024)[3]
・The media name is renamed to match the track name and assigned to sourceName.
path = sourceFolderPath + '\\' + sourceName + ".wav"
・Create path information
AZ_InsertMediaTrackItemSecond(replaceTrack, path, 0, media['StartPos'])
・Insert waveform data according to path information
def main():
・Set the main function
originTrack = AZ_GetTrackItemSelect(0,0,1)
・Get the selected track and assign it to originTrack
originTrackName = AZ_GetTrackItemName(originTrack, "", 1024)[1]
・Get the name of the track and assign it to originTrackName
originTrackId = AZ_GetTrackItemIndex(originTrack, 0)[2]
・Get the ID from the track item and assign it to originTrackId
rootPath = ""
retval,inputList = AZ_GetUserInputList("SourceImportPath",1,"rootPath :",rootPath)
・Generate an input text box to allow you to enter path information
if not retval:
return
・If canceled, the function will be terminated.
rootPath = inputList[0]
・Substitute the input information into rootPath
footList = ["armor", "barefoot", "boot", "boot_snow", "boot_water", "heel", "sneaker"]
・Prepare Foot sequence
for foot in footList:
if foot != originTrackName:
replaceFoot(originTrackId, rootPath + "\\" + foot)
・ If it is not the original track name, execute the replaceFoot function.
main()
・Run the main function
- API LINK -
- Script Code -
comming soon
- Warm Up -
Line up the bass footsteps
Create different types of footsteps according to a naming convention
- Script Detail -
Add paragraph text. Click “Edit Text” to update the font, size and more. To change and reuse text themes, go to Site Styles.