Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 09-03-2014, 01:06 PM   #1
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default 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
Argitoth is offline   Reply With Quote
Old 09-03-2014, 02:13 PM   #2
whiteaxxxe
Banned
 
Join Date: Jul 2014
Location: United States of Europe, Germany, Mönchengladbach
Posts: 2,047
Default

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. :-)))
whiteaxxxe is offline   Reply With Quote
Old 09-14-2014, 10:08 PM   #3
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

eel script

PHP Code:
Undo_BeginBlock(0);
items CountSelectedMediaItems(0);
loop(items,
    
item GetSelectedMediaItem(0i);
    
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
Argitoth is offline   Reply With Quote
Old 09-16-2014, 07:37 AM   #4
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Argitoth View Post
eel script

PHP Code:
Undo_BeginBlock(0);
items CountSelectedMediaItems(0);
loop(items,
    
item GetSelectedMediaItem(0i);
    
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");
spk77 is offline   Reply With Quote
Old 09-16-2014, 11:48 AM   #5
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

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
Argitoth is offline   Reply With Quote
Old 09-16-2014, 01:03 PM   #6
whiteaxxxe
Banned
 
Join Date: Jul 2014
Location: United States of Europe, Germany, Mönchengladbach
Posts: 2,047
Default

Quote:
Originally Posted by Argitoth View Post
... 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 ...
whiteaxxxe is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:24 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.