Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 08-05-2021, 12:55 PM   #41
OLSHALOM
Human being with feelings
 
Join Date: Sep 2019
Location: Austria
Posts: 443
Default

Quote:
Originally Posted by X-Raym View Post
Code:
 * v0.6.7 (2021-08-05)
  # Fix MacOS export of modified colors
Hopefully, this will work as expected and not break anything
Thanks X-Raym,

it seems it works on OS 10.13.6.

Last edited by OLSHALOM; 08-05-2021 at 01:19 PM.
OLSHALOM is offline   Reply With Quote
Old 08-09-2021, 06:08 PM   #42
tonalstates
Human being with feelings
 
tonalstates's Avatar
 
Join Date: Jun 2020
Posts: 656
Default

Still having issues with exporting here, it still changes the values the same way
tonalstates is offline   Reply With Quote
Old 08-10-2021, 02:45 AM   #43
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@tonalstates
be sure to use the last version of the script,
and to open the right exported theme files


Anyonenelse can try on mac ?
X-Raym is offline   Reply With Quote
Old 10-25-2021, 02:30 PM   #44
MonkeyBars
Human being with feelings
 
MonkeyBars's Avatar
 
Join Date: Feb 2016
Location: Hollyweird
Posts: 2,630
Default

Hi there X-Raym

I can't open the "Color Tweaker" in macOS in 6.37. Is that this script?

Code:
X-Raym_Theme color tweaker.lua:192: bad argument #1 to 'match' (string expected, got nil)
MonkeyBars is offline   Reply With Quote
Old 10-25-2021, 03:23 PM   #45
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@MonkeyBars
The function is called at theme export or theme load,
if it happens at theme load, it seems that the theme path returned by the GetLastColorThemeFile function is nil for some reason


https://github.com/X-Raym/REAPER-Rea...eaker.lua#L200


Not sure what is wrong there. :S Someone else on MacOS have to test.
X-Raym is offline   Reply With Quote
Old 10-25-2021, 06:12 PM   #46
MonkeyBars
Human being with feelings
 
MonkeyBars's Avatar
 
Join Date: Feb 2016
Location: Hollyweird
Posts: 2,630
Default

Quote:
Originally Posted by X-Raym View Post
The function is called at theme export or theme load, if it happens at theme load
I was just calling it directly from the Actions window
MonkeyBars is offline   Reply With Quote
Old 10-25-2021, 11:12 PM   #47
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@MonkeyBars
Last time I checked on mac it was working. let see if other reports arise.
X-Raym is offline   Reply With Quote
Old 01-21-2022, 06:15 PM   #48
Glen-Reaper
Human being with feelings
 
Join Date: Aug 2021
Posts: 4
Default Me too.

Quote:
Originally Posted by X-Raym View Post
@MonkeyBars
Last time I checked on mac it was working. let see if other reports arise.
I also ran into this error as seen (hopefully) in the attached JPEG. First post from me so no sure if the attachment will work. I think it was running okay prior to the most recent update.
Attached Images
File Type: jpg X-Raym_Theme color tweaker.lua.jpg (41.4 KB, 76 views)

Last edited by Glen-Reaper; 01-21-2022 at 06:34 PM.
Glen-Reaper is offline   Reply With Quote
Old 01-21-2022, 06:18 PM   #49
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@Glen
No screenshot attached.

Last edited by X-Raym; 01-21-2022 at 07:35 PM.
X-Raym is offline   Reply With Quote
Old 01-21-2022, 06:35 PM   #50
Glen-Reaper
Human being with feelings
 
Join Date: Aug 2021
Posts: 4
Default

Quote:
Originally Posted by X-Raym View Post
@Glen
No screenshit attached.
Should be there now.
Glen-Reaper is offline   Reply With Quote
Old 01-21-2022, 07:32 PM   #51
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@Glen
Create new script from action list and run this code (CTRL/CMD + S from the IDE):
Code:
reaper.ShowConsoleMsg(reaper.GetLastColorThemeFile())

What do you see in the console?
(copy paste the console log, no need to screenshot text)
X-Raym is offline   Reply With Quote
Old 01-21-2022, 07:35 PM   #52
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@MonkeyBars
Do you still have this issue as well?
X-Raym is offline   Reply With Quote
Old 01-21-2022, 09:31 PM   #53
Glen-Reaper
Human being with feelings
 
Join Date: Aug 2021
Posts: 4
Default

Quote:
Originally Posted by X-Raym View Post
@Glen
Create new script from action list and run this code (CTRL/CMD + S from the IDE):
Code:
reaper.ShowConsoleMsg(reaper.GetLastColorThemeFile())

What do you see in the console?
(copy paste the console log, no need to screenshot text)
Looks like I'm doing something wrong I get the error message below and as per attached. I've never worked with code or scripts so way out of my depth.

Test 1.lua:1: bad argument #1 to 'ShowConsoleMsg' (string expected, got no value)
Attached Images
File Type: jpg Screen Shot 2022-01-22 at 3.19.12 pm.jpg (49.9 KB, 70 views)
Glen-Reaper is offline   Reply With Quote
Old 01-22-2022, 01:21 AM   #54
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@Glen
you are doing right. this is precisely the source of the error. This should display theme path. But it has no value. This is in an issue on Cockos side IMHO cause I see no reason why Get Last Theme function would either return no value. Seems to be related to Mac implementation of this function.
We need more feedbacks to see if this is reproductible for all mac users to make a precise report to cockos.
But I'm sure I have run this script on Mac once... Try various things like zip/unzipped theme, defaut/non default... ?
X-Raym is offline   Reply With Quote
Old 01-25-2022, 10:13 PM   #55
Glen-Reaper
Human being with feelings
 
Join Date: Aug 2021
Posts: 4
Default

Quote:
Originally Posted by X-Raym View Post
@Glen
you are doing right. this is precisely the source of the error. This should display theme path. But it has no value. This is in an issue on Cockos side IMHO cause I see no reason why Get Last Theme function would either return no value. Seems to be related to Mac implementation of this function.
We need more feedbacks to see if this is reproductible for all mac users to make a precise report to cockos.
But I'm sure I have run this script on Mac once... Try various things like zip/unzipped theme, defaut/non default... ?
Hey @X-Raym
No idea why but the script is running fine again. I have changed nothing that would make it apparent what the root cause might be. I am using the same theme/s and set up so not sure what's going on. Anyway thanks for getting back to me on this.
Glen
Glen-Reaper is offline   Reply With Quote
Old 01-26-2022, 02:28 AM   #56
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@Glen-Reaper
Thanks for the update !


I didnt get answers from monkey_bars yet.
So, glad it works for you now!
Remember that it will need unpacked theme to be able to export the new config, but there should be messages about that.
Best,
X-Raym is offline   Reply With Quote
Old 07-05-2022, 03:58 AM   #57
odedd
Human being with feelings
 
Join Date: Dec 2019
Posts: 193
Default

I recently updated ReaImgui to 0.7 and now when I launch the theme tweaker I get the following message:

X-Raym_Theme color tweaker.lua:279: ImGui_Combo: items must be null-terminated.

Changing this:
Code:
local retval, color_descriptions_num_temp = r.ImGui_Combo(ctx, 'Labels', color_descriptions_num, "Text\31Variables\31")
to this:
Code:
local retval, color_descriptions_num_temp = r.ImGui_Combo(ctx, 'Labels', color_descriptions_num, "Text\0Variables\0")
seems to have solved it.
Probably should push an update?

Last edited by odedd; 07-05-2022 at 02:42 PM.
odedd is offline   Reply With Quote
Old 07-05-2022, 05:47 AM   #58
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default v0.6.8

@odedd
Thx, updated !



So you are using this script ? How successful has it been ?
X-Raym is offline   Reply With Quote
Old 07-05-2022, 02:41 PM   #59
odedd
Human being with feelings
 
Join Date: Dec 2019
Posts: 193
Default

I find it very useful!
I use it every now and then to tweak a detail that's bugging me

It's way more convenient and eye pleasing than Reaper's own tweaker.
Gotta love ImGui!
odedd is offline   Reply With Quote
Old 07-08-2022, 01:38 AM   #60
Faberman
Human being with feelings
 
Join Date: Jul 2018
Posts: 16
Default Theme color tweaker not working here...?

@X-Raym Before getting to the problem and asking for help, first - thank you so much for the scripts you wrote and shared for free, I really appreciate that!
I fail in getting the script working. On the ReaPack repository, there is still version 0.6.7. When I try 0.6.7 I get:

ReaScript Error:
X-Raym_Theme color tweaker.lua:279: ImGui_Combo: items must be null-terminated
And ReaScript console output:
ImGui assertion failed: (g.CurrentWindowStack.Size == 1) && "Mismatched Begin/BeginChild vs End/EndChild calls: did you forget to call End/EndChild?"

I found version 0.6.8 on your Github page and manually installed it. I got the script executed and the initial screen opened. As soon as I click to change some color, the color changes and immediately the script terminates with:

ReaScript error:
...m Scripts\Theme\X-Raym_Theme color tweaker.lua:373: bad argument #3 to 'ImGui_PushStyleColor' (number has no integer representation)
And ReaScript console output:
ImGui assertion failed: (g.CurrentWindowStack.Size == 1) && "Mismatched Begin/BeginChild vs End/EndChild calls: did you forget to call End/EndChild?"
Faberman is offline   Reply With Quote
Old 07-08-2022, 02:04 AM   #61
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@Faberman
Not sure what is wrong in your reapack sync but the 0.6.8 update is public and indexed, as you can see in this reapack index.xml sample

Code:
  <version name="0.6.8" author="X-Raym" time="2022-07-05T12:42:05Z">
        <changelog><![CDATA[# ReaImGUI v0.7 compatibility]]></changelog>
        <source main="main">https://github.com/X-Raym/REAPER-ReaScripts/raw/f73d79476c2ebba49906d6936fab51721f5548e6/Theme/X-Raym_Theme%20color%20tweaker.lua</source>
      </version>
For color error it indeed seems somethign has changed on ReaImGui side.

O just reupaded the script v0.6.9 to take that into account. Not sure why this has changed on ReaImGUI side but it broke backward compatibility. :S
X-Raym is offline   Reply With Quote
Old 07-08-2022, 03:49 AM   #62
Faberman
Human being with feelings
 
Join Date: Jul 2018
Posts: 16
Default

@X-Raym
I forgot to synchronize packages. It's working now (v.0.6.9). Thank you for your reply and for this great script!
Faberman is offline   Reply With Quote
Old 07-08-2022, 06:31 PM   #63
Rockum
Human being with feelings
 
Join Date: Apr 2009
Location: Nashville
Posts: 177
Default

Love the interface. Thank you.

Using the current version on PC. Loading exported themes the colors are hue shifted. For example, teal becomes a mustard yellow.
Rockum is offline   Reply With Quote
Old 07-08-2022, 06:46 PM   #64
Rockum
Human being with feelings
 
Join Date: Apr 2009
Location: Nashville
Posts: 177
Default

Here's a visual. Could another setting in the theme be shifting the hues?
Attached Images
File Type: png bloop.png (30.3 KB, 57 views)
Rockum is offline   Reply With Quote
Old 07-09-2022, 12:48 AM   #65
Faberman
Human being with feelings
 
Join Date: Jul 2018
Posts: 16
Default

Quote:
Originally Posted by Rockum View Post
Loading exported themes the colors are hue shifted. For example, teal becomes a mustard yellow.
You are right, the same here.
@X-Raym
I noticed that color-shifting comes from reversed color representation, RGB --> BGR, eg. #00AABB becomes #BBAA00
Faberman is offline   Reply With Quote
Old 07-09-2022, 02:06 AM   #66
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@all
Export on Win are color channel inverted ?
Can someone test on MacOS before I made change on the related part of the code ?
X-Raym is offline   Reply With Quote
Old 07-10-2022, 04:07 AM   #67
OLSHALOM
Human being with feelings
 
Join Date: Sep 2019
Location: Austria
Posts: 443
Default

Quote:
Originally Posted by X-Raym View Post
@all
Export on Win are color channel inverted ?
Can someone test on MacOS before I made change on the related part of the code ?

Here on Mac OS 10.14 exporting via your script is channel inverted too!

As an addition, would it be possible, exporting is saving the image resource path?
OLSHALOM is offline   Reply With Quote
Old 07-10-2022, 10:16 AM   #68
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

v0.6.10 should fix color inversion on all OS, thx for trying !
X-Raym is offline   Reply With Quote
Old 07-10-2022, 11:22 AM   #69
tonalstates
Human being with feelings
 
tonalstates's Avatar
 
Join Date: Jun 2020
Posts: 656
Default

The color swap is still there (0.6.10) with me on Mac, it's the same bug I reported like a year ago, blues turn to yellows and such, with the values being moved around. When using it real time it seems to be working well but this happens after exporting the theme
tonalstates is offline   Reply With Quote
Old 07-10-2022, 11:27 AM   #70
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@tonalstates
Quote:
it's the same bug I reported like a year ago,
Same result but not same source, as far as I know, as it wasn't reversed before ReaImGUI v0.7.0 on Win.



But I don't get what it hasn't been fixed in v0.6.10



See my update: https://github.com/X-Raym/REAPER-Rea...a6c7213a2aL150


I littelly just flip the color change for both OS by changing this rule.


I need MacOS to be really sure of what I'm doing. Without MacOS it can only be trials and errors.
X-Raym is offline   Reply With Quote
Old 07-10-2022, 06:55 PM   #71
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

@X-Raym

Code:
rgb_or_bgr_from_reaper = reaper.GetSomeColor()
rgb = reaper.ImGui_ColorConvertNative(rgb_or_bgr_from_reaper)
-- gui code using rgb here
rgb_or_bgr_to_reaper = reaper.ImGui_ColorConvertNative(rgb)
reaper.SetSomeColor(rgb_or_bgr_to_reaper)
cfillion is offline   Reply With Quote
Old 07-10-2022, 10:26 PM   #72
tonalstates
Human being with feelings
 
tonalstates's Avatar
 
Join Date: Jun 2020
Posts: 656
Default

Quote:
Originally Posted by X-Raym View Post
@tonalstates
Same result but not same source
Yeah, Im sorry, same output I meant. Didn't want to sound harsh or anything, it's just weird haha If I knew where to put Cfillions code I'd try it too, I could try some stuff for you if you'd like since I'm on Mac
tonalstates is offline   Reply With Quote
Old 07-11-2022, 03:29 AM   #73
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@all
Can you guys tets this beta release on Mac and Windows ? thx !


https://drive.google.com/file/d/1Cil...ew?usp=sharing



@cfillion
Ok !
X-Raym is offline   Reply With Quote
Old 07-11-2022, 05:16 AM   #74
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Quote:
Originally Posted by OLSHALOM View Post
As an addition, would it be possible, exporting is saving the image resource path?

It should already do that ? what field it is in the theme file ? ui_image is already in it
https://github.com/X-Raym/REAPER-Rea...eaker.lua#L224
X-Raym is offline   Reply With Quote
Old 07-11-2022, 09:33 AM   #75
Faberman
Human being with feelings
 
Join Date: Jul 2018
Posts: 16
Default

Quote:
Originally Posted by X-Raym View Post
@all
Can you guys tets this beta release on Mac and Windows ? thx !
Beta 0.6.11 working ok here, Windows 10.
Faberman is offline   Reply With Quote
Old 07-11-2022, 03:27 PM   #76
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@Faberman
OK well, no mac OS user feedback, too bad,


but I release the new version public anyway. Hope it works !


Best,
X-Raym is offline   Reply With Quote
Old 07-11-2022, 04:06 PM   #77
OLSHALOM
Human being with feelings
 
Join Date: Sep 2019
Location: Austria
Posts: 443
Default

Quote:
Originally Posted by X-Raym View Post
@Faberman
OK well, no mac OS user feedback, too bad,


but I release the new version public anyway. Hope it works !


Best,
@X-Raym

Sadly 0.6.11 makes no difference on MacOsX(10.13.6).

Still reversed color export.

(I downloaded 0.6.11 from the link, imported it correctly, checked the script for version 0.6.11)
OLSHALOM is offline   Reply With Quote
Old 07-11-2022, 04:15 PM   #78
OLSHALOM
Human being with feelings
 
Join Date: Sep 2019
Location: Austria
Posts: 443
Default

Quote:
Originally Posted by X-Raym View Post
It should already do that ? what field it is in the theme file ? ui_image is already in it
https://github.com/X-Raym/REAPER-Rea...eaker.lua#L224


Thanks for your work, X-Raym.

"ui_img_path=" is missing in the exported theme file of the theme tweaker.
Only "ui_img=" is presented in the theme file.

user_font 8to15 is missing as well.
OLSHALOM is offline   Reply With Quote
Old 07-11-2022, 04:15 PM   #79
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@OLSHALOM
can you add


Code:
if os_sep == "/" and colors[v] ~= colors_backup[v] then
local r, g, b = reaper.ColorFromNative( colors[v] )
colors[v] = reaper.ColorToNative(b, g, r)
end

below this line ?



and if this doesn't work



Code:
if os_sep == "/" and colors[v] ~= colors_backup[v] then
local r, g, b = reaper.ColorFromNative( colors[v] )
colors[v] = reaper.ColorToNative(r, g, b)
end
X-Raym is offline   Reply With Quote
Old 07-11-2022, 04:35 PM   #80
MonkeyBars
Human being with feelings
 
MonkeyBars's Avatar
 
Join Date: Feb 2016
Location: Hollyweird
Posts: 2,630
Default

Quote:
Originally Posted by X-Raym View Post
@MonkeyBars
Do you still have this issue as well?
I can now use the script in macOS! Thanks.
MonkeyBars 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 06:58 AM.


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