Old 10-27-2016, 12:08 PM   #1
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default Why does this mcp.size code not work?

So I'm trying to set up a layout where folder tracks automatically get some blank space to their left, helping visually separate all my tracks.

Code:
set mcp.size        folderstate>0 [89 288 0 100] [69 288 0 100]
But I end up with this:



I've also tried a) setting the base size and modifying it afterward, or b) having a user variable calculate the size beforehand and then set mcp.size mcp_new_size, but they give the same result.

What sorcery is going on here? I know MCP separators have been a sticking point for a while, but I can't wrap my head around why this doesn't work.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 10-27-2016, 02:57 PM   #2
White Tie
Pixel Pusher
 
White Tie's Avatar
 
Join Date: Mar 2007
Location: Blighty
Posts: 4,950
Default

You can't get freaky with the first 2 values of a *.size, it just won't work. Reaper treats them as fixed values, and that's why we can't do, for example, recarm based panel enlargements or folder business like you are trying. I agree it would be very nice and would allow for some cool stuff, but 'fraid not...
__________________
The House of White Tie
White Tie is offline   Reply With Quote
Old 10-27-2016, 03:21 PM   #3
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

Yeah, that's what I figured, but the logic on Reaper's part is frustrating me.

I can have multiple set mcp.size commands in a row. Reaper picks up the last value, everything works fine.
I can perform math operations on mcp.size after setting it. Again, Reaper picks up the last value and everything is fine.
I can set a user variable first and then set mcp.size my_size. No sweat.

But that user variable can't involve a conditional. I've always assumed the WALTER code is just parsed in order, as needed, but this implies there's some looking-backward involved.

DAMN YOU JUSTIN FOR HAVING YOUR CODE CHECK ITSELF TO KEEP SHIT FROM BREAKING.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna 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 12:35 AM.


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