View Single Post
Old 11-14-2012, 01:34 AM   #39
Anton9
Human being with feelings
 
Anton9's Avatar
 
Join Date: Jun 2009
Location: Earth
Posts: 1,340
Default

Hey gwok,

Well thanks to a tip from Jeffos I am now posting the other script I mentioned. It basically does the same thing as the other one except it does'nt put a time sig marker in the new project and it also does'nt rely on the tab switch trick. If I get some time I'll have a try at your other request.

Code:
#Copies the time sig and BPM at the edit cursor's position and creates a new project with these settings

from sws_python import *

curProj = 0
CurPos = RPR_GetCursorPosition()
Tnum = 0	# Time sig. numerator
Tdnom = 0	# Time sig. denominator
BPM = 0
x = RPR_TimeMap_GetTimeSigAtTime(curProj, CurPos, Tnum, Tdnom, BPM)	# Gets the time sig. and BPM of current project at cursor position

RPR_Main_OnCommand(40859,0)	#Creates new project tab

SNM_SetIntConfigVar("projmeaslen", x[2])	#Sets the new projects time sig numerator 
SNM_SetIntConfigVar("projtsdenom", x[3])	#Sets the new projects time sig denominator
RPR_SetCurrentBPM(0, x[4], False)	#Sets the new projects BPM
Anton9 is offline   Reply With Quote