Old 04-03-2019, 03:02 AM   #1
MaXyM
Human being with feelings
 
Join Date: Aug 2018
Posts: 454
Default sub-layout resources

hello

Lets consider following layout:
Code:
Layout "Extended Mixer" "ex"

    ; some commands requiring images
    set mcp.volume [31 95 21 182 0 0 0 1]

    Layout "Extended Mixer Red" "exred"
    set mcp.volume [31 95 21 182 0 0 0 1]
    EndLayout

EndLayout
As you can see there is:
1. "Extended Mixer" layout loading resources from "ex", and from root if not found
2. "Extended Mixer Red" layout, being sub-layout to "Extended Mixer", inheriting elements definitions except of mcp.volume, loading its texture from "exred".

I was expecting, that all images for "Extented Mixer Red" except for mcp.volume will be loaded from "ex" location.
But it's not.
In this particular case, walter is commanded to change appearance of mcp.volume only, loading specific bitmap from "exred" directory. But in fact "exred" must contain copy of all resources from "ex" (otherwise resources from root directory are being loaded).

It seems to me very inefficient. IMO in case of nesting layouts, resources should be inherited from parent layout(s), until overwritten by current one.

Am I missing something?

Last edited by MaXyM; 04-03-2019 at 03:08 AM.
MaXyM is online now   Reply With Quote
Old 04-03-2019, 03:24 AM   #2
cubic13
Human being with feelings
 
cubic13's Avatar
 
Join Date: Dec 2013
Location: Near Serre-Ponçon lake, french Alps
Posts: 855
Default

No, you're not missing anything. In this case, if you want only the mcp.volume control to appear differently, you should :

1) put the exred folder as a subfolder of the ex one.

2) State this :

Code:
Layout "Extended Mixer" "ex"

    set mcp.volume [31 95 21 182 0 0 0 1]

    Layout "Extended Mixer Red" "ex\exred"
    set mcp.volume [31 95 21 182 0 0 0 1]
    EndLayout

EndLayout
Be careful, though as a third degree folders nesting won't work with the .ReaperThemeZip format. It should, though, if you keep both the image folder and the ReaperTheme file unzipped (See this post from lucas_LCS for more details, as I haven't tested it, yet).

It's indeed an irritating limitation, that could be easily solved if only we were allowed to use more than two folder nesting degrees.
__________________
DAW: Ryzen 3700X|Asus X-470Pro|32Gb|2 SSD512(M2)+1024|W10Pro(64)|RME Fireface UCX+ADA8200
Soft: Reaper|Cubase 10|Emulator X3 & several other VSTis (2 bridged)...
Gear: VMK-188+|MPD32|ME30P|Korg 05R/W|Roland D110|Yamaha TX802|Pre-MIDI stuff...
cubic13 is offline   Reply With Quote
Old 04-03-2019, 03:42 AM   #3
MaXyM
Human being with feelings
 
Join Date: Aug 2018
Posts: 454
Default

Thank you.
Yes. this is info I was missing. I didn't know about possibility of nesting directories. Pity, it cannot be nested deeper, but probably currently I can leave with it.

Just to make sure: does backslash will work for MacOS too?

Btw can we arrange layouts to be presented as tree? Or in menu it's always shown as single list (for particular layout type)

with regards

Last edited by MaXyM; 04-03-2019 at 04:03 AM.
MaXyM is online now   Reply With Quote
Old 04-03-2019, 02:29 PM   #4
lucas_LCS
Human being with feelings
 
Join Date: Dec 2015
Posts: 2,099
Default

you can go 2 folders deep inside the main image folder and still be able to use the ".ReaperThemeZip" single compressed file format for theme distribution.

I use a forward slash for nested folders:
Code:
Layout "Extended Mixer" "ex"

    set mcp.volume [31 95 21 182 0 0 0 1]

    Layout "Extended Mixer Red" "ex/exred"
    set mcp.volume [31 95 21 182 0 0 0 1]
    EndLayout

EndLayout
Layouts are only presented as a single menu, no sub-menus.
It's unfortunate, since sub-menus would help organize the layouts in a clearer manner when many layouts are on the list.
__________________
LCS Themes
lucas_LCS is online now   Reply With Quote
Old 04-04-2019, 01:28 AM   #5
MaXyM
Human being with feelings
 
Join Date: Aug 2018
Posts: 454
Default

Thank you guys for answers.
Really helpful.

I have a few more questions. It seems the answer for all of them is "no", but worth to ask

1. Is it possible to create layout conditionally. Let's say "create a layout only if particular variable has specific value assigned"
2. Is it possible to control several lines of WALTER code by single condition? Something which can be prototyped this way: IF condition THEN command1, command2, commandX ENDIF. All examples I can see are about conditional value assignment
2. Is it possible to use rtconfig constants, like global_scale or use_overlays in conditions?

with regards
MaXyM is online now   Reply With Quote
Old 04-05-2019, 09:22 AM   #6
lucas_LCS
Human being with feelings
 
Join Date: Dec 2015
Posts: 2,099
Default

Quote:
Originally Posted by MaXyM
1. Is it possible to create layout conditionally. Let's say "create a layout only if particular variable has specific value assigned"
2. Is it possible to control several lines of WALTER code by single condition? Something which can be prototyped this way: IF condition THEN command1, command2, commandX ENDIF. All examples I can see are about conditional value assignment
2. Is it possible to use rtconfig constants, like global_scale or use_overlays in conditions?
1. yes. you can use the FOLDERSTATE and RECARM statements to define a different state for the element. size & location for buttons. size, margins & color for text, etc.
You can also use the height and width statements to change element states.
There are likely more in-depth examples, but someone with more knowledge will have to provide that info.

2. really can't answer this, unfortunately.
Best bet is to look over the code for White Tie's Imperial v5 or maybe jrengmusic's Metric theme for examples of how to compose or use variables and macros.

3. All statements at the top of the RTCONFIG are pre-WALTER and should have no affect if used in layout.
they are overall or 'global' settings for the theme.
__________________
LCS Themes
lucas_LCS is online now   Reply With Quote
Old 04-05-2019, 10:42 AM   #7
MaXyM
Human being with feelings
 
Join Date: Aug 2018
Posts: 454
Default

IN the first question I meant ability to conditionally create layout itself, let say to skip particular Layout .... EndLayout section

Thank you
MaXyM is online now   Reply With Quote
Old 04-06-2019, 10:13 AM   #8
lucas_LCS
Human being with feelings
 
Join Date: Dec 2015
Posts: 2,099
Default

Quote:
Originally Posted by MaXyM View Post
IN the first question I meant ability to conditionally create layout itself, let say to skip particular Layout .... EndLayout section

Thank you
you cannot tell it to skip a layout.
you can use those statements I mentioned to reposition or expand buttons and item background images (ex: Vol label, Pan & Width labels) to create what appears to be a new layout depending on whether the track is armed, is a folder parent/end or when a track is at a specified height (also width in the TCP).

you are basically writing 2 layouts under one layout.
Unfortunately, there are several ways to change a layouts appearance that will not be available unless you use pink and yellow lines.
.
__________________
LCS Themes
lucas_LCS is online now   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 07:38 AM.


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