|
|
|
09-03-2014, 01:06 PM
|
#1
|
Human being with feelings
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
|
adding prefix numbers to media item names breaks reaper project
Adding a prefix such as 00001_mediaItemName with a script causes all regions to transform into a marker at the beginning of the region and a tiny region at the end of the region. This breaks the reaper project. It is fixed by deleting all markers and regions, saving the project, re-opening the project and adding back the regions.
Will update with needed info to easily recreate the bug when I have time.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
|
|
|
09-03-2014, 02:13 PM
|
#2
|
Banned
Join Date: Jul 2014
Location: United States of Europe, Germany, Mönchengladbach
Posts: 2,047
|
I dont know exactly, but maybe this is Python thing. if the scripts are in Python, you get into trouble when a filename starts with an integer. Python assumes then that it should do some math-functions.
its a python thing. on our servers all filenames start with a letter. for exactly that reason. try to put an a_ in front of the numbers or soemthing like that. can be always the same letter, only to avoid startin a filename with a number.
I think this is a little bit odd behaviour, but Python is so genius ... you know, you take a grain of salt in that cases. :-)))
|
|
|
09-14-2014, 10:08 PM
|
#3
|
Human being with feelings
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
|
eel script
PHP Code:
Undo_BeginBlock(0);
items = CountSelectedMediaItems(0);
loop(items,
item = GetSelectedMediaItem(0, i);
take = GetActiveTake(item);
GetSetMediaItemTakeInfo_String(take, "P_NAME", #name, 0);
sprintf(#name,"%{i}05d_%{#name}s\n");
GetSetMediaItemTakeInfo_String(take, "P_NAME", #name, 1);
i+=1;
);
Undo_EndBlock("Enumerate media items", -1);
try to export "Selected media items" after running script, or export "regions" (add regions to every item). Save project, re-open, experience all the weirdness. I even edited the scrip to have "enum" at the beginning of each media item name to see if adding a bunch of numbers to the beginning of the item really was the problem. NOPE! Numbers or letters and numbers, doesn't seem ot make a difference.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
|
|
|
09-16-2014, 07:37 AM
|
#4
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by Argitoth
eel script
PHP Code:
Undo_BeginBlock(0);
items = CountSelectedMediaItems(0);
loop(items,
item = GetSelectedMediaItem(0, i);
take = GetActiveTake(item);
GetSetMediaItemTakeInfo_String(take, "P_NAME", #name, 0);
sprintf(#name,"%{i}05d_%{#name}s\n");
GetSetMediaItemTakeInfo_String(take, "P_NAME", #name, 1);
i+=1;
);
Undo_EndBlock("Enumerate media items", -1);
try to export "Selected media items" after running script, or export "regions" (add regions to every item). Save project, re-open, experience all the weirdness. I even edited the scrip to have "enum" at the beginning of each media item name to see if adding a bunch of numbers to the beginning of the item really was the problem. NOPE! Numbers or letters and numbers, doesn't seem ot make a difference.
|
Does it work if you remove the newline character ("\n")?
this line
Code:
sprintf(#name,"%{i}05d_%{#name}s\n");
to
Code:
sprintf(#name,"%{i}05d_%{#name}s");
|
|
|
09-16-2014, 11:48 AM
|
#5
|
Human being with feelings
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
|
omg................. damnit, can't believe I didn't catch that.. "WELL, THEIRRZ YER PRABLEM!!"
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
|
|
|
09-16-2014, 01:03 PM
|
#6
|
Banned
Join Date: Jul 2014
Location: United States of Europe, Germany, Mönchengladbach
Posts: 2,047
|
Quote:
Originally Posted by Argitoth
... I even edited the scrip to have "enum" at the beginning of each media item name to see if adding a bunch of numbers to the beginning of the item really was the problem. NOPE! Numbers or letters and numbers, doesn't seem ot make a difference.
|
ok, could have been if it would have been python ...
|
|
|
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:24 AM.
|