|
|
|
12-12-2012, 07:21 PM
|
#1
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
ReaScript : SetEditCurPos broken
As the function is listed in the ReaScript documentation that is generated by Reaper, could you kindly please make the function work or remove it from the documentation? The error I get trying to use the function : NameError : name "RPR_SetEditCurPos" is not defined. The same happens with the RPR_SetEditCurPos2 variant.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
12-13-2012, 02:29 AM
|
#2
|
-blänk-
Join Date: Jun 2008
Posts: 11,359
|
Works here (Python3.2 on an XP 32bit system).
This mind boggling script
Code:
RPR_SetEditCurPos(2.00,0,0)
happily sets the edit cursor to 2 seconds in. SetEditCurPos2 also still works, I use it in several scripts without problem.
|
|
|
12-13-2012, 02:57 AM
|
#3
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by gofer
Works here (Python3.2 on an XP 32bit system).
This mind boggling script
Code:
RPR_SetEditCurPos(2.00,0,0)
happily sets the edit cursor to 2 seconds in. SetEditCurPos2 also still works, I use it in several scripts without problem.
|
The functions are missing completely from my reaper_python.py, so it's no wonder they don't work...(Do you actually have them defined in that file?)
Sigh...Anyway, this function gone missing is just one of many things that is broken or wrong about ReaScript...
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
12-13-2012, 03:07 AM
|
#4
|
Human being with feelings
Join Date: Oct 2008
Location: Germany
Posts: 1,772
|
There seem to be two reaper_python.py.
At least that's the case in my system.
1) C:\Programme\REAPER4\REAPER\plugins 47 KB
2) C:\Python32\Lib 146 KB
Whereas the second one contains the missing functions.
Michael
|
|
|
12-13-2012, 03:08 AM
|
#5
|
-blänk-
Join Date: Jun 2008
Posts: 11,359
|
A (very quick) search of reaper_python.py doesn't find them, yet they work.
I have no idea how this stuff actually works, but quite a lot of functions don't seem to be defined in reaper_python.py and still do their job. Maybe they are imported into python.py with the line
from ctypes import *
?
Ah, Micha seems to be onto something much more likely.
|
|
|
12-13-2012, 03:27 AM
|
#6
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by MichaJo
There seem to be two reaper_python.py.
At least that's the case in my system.
1) C:\Programme\REAPER4\REAPER\plugins 47 KB
2) C:\Python32\Lib 146 KB
Whereas the second one contains the missing functions.
Michael
|
I seem to only have the file in the Reaper/Plugins folder. Which is 46.7 KB.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
12-13-2012, 04:01 AM
|
#7
|
Human being with feelings
Join Date: Oct 2008
Location: Germany
Posts: 1,772
|
Yes. But it's strange it doesn't work here anymore too.
I'm pretty sure it has worked with 4.31.
Now i have 4.32pre5...
I've deleted all reaper_python.py and also did this with reaper_python.cpython-32.pyc (which is the compiled one in C:\Python32\Lib\__pycache__, build by PyScripter).
Then i've put back the reaper_python.py in C:\Python32\Lib, started PyScripter (which then has built a new reaper_python.cpython-32.pyc).
But it doesn't work.
The only ones i get are:
rpr_getfp
rpr_initft
rpr_packp
rpr_packs
rpr_packsc
rpr_unpackp
rpr_unpacks
|
|
|
12-13-2012, 06:19 AM
|
#8
|
Human being with feelings
Join Date: Oct 2008
Location: Germany
Posts: 1,772
|
Embarassing as far as i'm concerned....oooh
I just haven't used capitals !!!
rpr_ just get me the few functions listed in my previous post
RPR_ gives me all the desired functions.
The solution for all the others not being such a dumbass is probably to just follow the instructions,
copy the reaper_python_commented.py to C:\Python32\Lib and rename it there to reaper_python.py.
2nd step: Make sure the Python Path is set to this directory in a right order.
You can do this (in PyScripter) with Tools -> Python Path...
(meanwhile i'm going to hide somewhere...)
Michael
Last edited by MichaJo; 12-13-2012 at 06:43 AM.
|
|
|
12-13-2012, 07:44 AM
|
#9
|
Human being with feelings
Join Date: Jun 2008
Posts: 4,923
|
Not working in the latest pre on mac 10.6.8
|
|
|
12-13-2012, 11:01 AM
|
#10
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Yeah, I forgot to mention, Reaper 4.3.2.pre5. Perhaps it is a pre-release problem, but I don't remember the changelog mentioning changes to ReaScript...
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
12-13-2012, 11:12 AM
|
#11
|
Human being with feelings
Join Date: Jun 2008
Posts: 4,923
|
its a pre problem for sure. There are some other actions not working as well. I posted in the pre5 thread a ways back but its pretty busy over there...
|
|
|
12-13-2012, 12:14 PM
|
#12
|
-blänk-
Join Date: Jun 2008
Posts: 11,359
|
Aha! reaper_python.py in pre4 is 80KB, pre5 is 46.7KB. All definitions after RPR_IsMediaExtension() are cropped away in pre5.
(moving this thread over to pre release)
Probably ReaScript is working fine for me in pre5 because I also have spk's commented file in the Lib directory...
[edit:]Yep. Confirmed. SetEditCursor throws the error in pre5 without spk's file. And I guess all other functions after IsMediaExtension will.
(dang, I assumed Reaper would still use the python.py in its plugin directory )
Last edited by gofer; 12-13-2012 at 12:23 PM.
|
|
|
12-13-2012, 08:28 PM
|
#13
|
Human being with feelings
Join Date: Dec 2007
Location: Los Angeles, CA
Posts: 390
|
ReaScript has been acting screwy since Pre5 here...
|
|
|
12-13-2012, 09:03 PM
|
#14
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,745
|
Yeah it is broken in pre5, we need to update that. :/
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 02:03 PM.
|