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

Reply
 
Thread Tools Display Modes
Old 12-08-2021, 05:53 PM   #1
MonkeyBars
Human being with feelings
 
MonkeyBars's Avatar
 
Join Date: Feb 2016
Location: Hollyweird
Posts: 2,630
Default [SOLVED] ReaScript API: Marker/region color not updated

macOS Mojave
Reaper 6.42

The following API functions do not alter marker/region color for me.

AddProjectMarker2()
SetProjectMarker3()
SetProjectMarker4()


Using EnumProjectMarkers3() returns the correct value, just the UI does not update. UpdateTimeline() and UpdateArrange() do not trigger color change after setting.

Last edited by MonkeyBars; 12-09-2021 at 08:01 AM.
MonkeyBars is offline   Reply With Quote
Old 12-08-2021, 06:27 PM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Please put sample code so we can test by extra quickly by simple copy pasting.


IMHO, you just forgot the |0x1000000


This works as expected

Code:
reaper.SetProjectMarker3(0,1,false,0,0,"test", reaper.ColorToNative( 255, 0, 0 )|0x1000000 )
or

Code:
reaper.SetProjectMarker3(0,1,false,0,0,"test", reaper.ColorToNative( 255, 0, 0 )| 1<<24 )
https://github.com/ReaTeam/Doc/blob/...ions.md#colors
X-Raym is offline   Reply With Quote
Old 12-08-2021, 07:20 PM   #3
MonkeyBars
Human being with feelings
 
MonkeyBars's Avatar
 
Join Date: Feb 2016
Location: Hollyweird
Posts: 2,630
Default

Thanks X-Raym! You're absolutely correct. I misunderstood the notation in the API.

You rock!! I hope you like my project when I'm done.
MonkeyBars is offline   Reply With Quote
Old 12-09-2021, 03:11 AM   #4
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Well, it is easy to miss, and a bit surprising that it is not handled out of the box :P


And you can edit thread title and add (SOLVED) as prefix !


Good luck for your project !
X-Raym 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 09:04 AM.


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