New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BR_SetMediaTrackLayouts, graphical glitches #764

Closed
swiiscompos opened this Issue Aug 29, 2015 · 9 comments

Comments

Projects
None yet
2 participants
@swiiscompos

With some layouts the API function BR_SetMediaTrackLayouts creates glitches. For example in the default theme, if you change the TCP layout to "bd --- Small Full Meter" and then back to the default layout, it will break the later.

@Breeder

This comment has been minimized.

Show comment
Hide comment
@Breeder

Breeder Aug 29, 2015

Contributor

ReaScript documentation (Help->ReaScript documentation) clearly states:

Note that in case of setting MCP layout, due to API limitations, MCP panel width is not updated to match the new layout. However, you can manually refresh it by calling the action "Mixer: Toggle master track visible" (just make sure to call it twice so master track visibility stays the same).

Why is this expected from the user and not done directly when the API is called?
Because you may be changing layout of multiple tracks and that means that those actions would be called multiple times (for each call to BR_SetMediaTrackLayouts the action would be called twice). Instead, user can simply call the action only 2 times, after setting all the layouts and thus not wasting CPU cycles on unneeded actions.

Contributor

Breeder commented Aug 29, 2015

ReaScript documentation (Help->ReaScript documentation) clearly states:

Note that in case of setting MCP layout, due to API limitations, MCP panel width is not updated to match the new layout. However, you can manually refresh it by calling the action "Mixer: Toggle master track visible" (just make sure to call it twice so master track visibility stays the same).

Why is this expected from the user and not done directly when the API is called?
Because you may be changing layout of multiple tracks and that means that those actions would be called multiple times (for each call to BR_SetMediaTrackLayouts the action would be called twice). Instead, user can simply call the action only 2 times, after setting all the layouts and thus not wasting CPU cycles on unneeded actions.

@swiiscompos

This comment has been minimized.

Show comment
Hide comment
@swiiscompos

swiiscompos Aug 29, 2015

But the problem happens with the TCP.

But the problem happens with the TCP.

@Breeder

This comment has been minimized.

Show comment
Hide comment
@Breeder

Breeder Aug 29, 2015

Contributor

I see now that you wrote TCP and not MCP. Sorry about that, I missed it.
I guess you could employ the same trick but this time try and hide/show the track? I'll see if that works and I'll do it automatically in SWS for the next update.

Contributor

Breeder commented Aug 29, 2015

I see now that you wrote TCP and not MCP. Sorry about that, I missed it.
I guess you could employ the same trick but this time try and hide/show the track? I'll see if that works and I'll do it automatically in SWS for the next update.

@swiiscompos

This comment has been minimized.

Show comment
Hide comment
@swiiscompos

swiiscompos Aug 29, 2015

It does work, thanks!

It does work, thanks!

@Breeder

This comment has been minimized.

Show comment
Hide comment
@Breeder

Breeder Aug 29, 2015

Contributor

Ah, thanks for testing it for me then :) I'll push the fix now

Contributor

Breeder commented Aug 29, 2015

Ah, thanks for testing it for me then :) I'll push the fix now

@swiiscompos

This comment has been minimized.

Show comment
Hide comment
@swiiscompos

swiiscompos Aug 29, 2015

The MCP workaround is problematic for me because I'm using the function in a defer() script and it keeps changing the Master's visibility making the mixer useless. Any way to refresh the mcp panel width only when the layout is changed? Here is a post to Sexan's newest modification of my script: http://forum.cockos.com/showpost.php?p=1565504&postcount=5

The MCP workaround is problematic for me because I'm using the function in a defer() script and it keeps changing the Master's visibility making the mixer useless. Any way to refresh the mcp panel width only when the layout is changed? Here is a post to Sexan's newest modification of my script: http://forum.cockos.com/showpost.php?p=1565504&postcount=5

@Breeder

This comment has been minimized.

Show comment
Hide comment
@Breeder

Breeder Aug 29, 2015

Contributor

Function should return true if there were any changes so you can use that as the flag to refresh MCP with said actions

Contributor

Breeder commented Aug 29, 2015

Function should return true if there were any changes so you can use that as the flag to refresh MCP with said actions

@swiiscompos

This comment has been minimized.

Show comment
Hide comment
@swiiscompos

swiiscompos Aug 30, 2015

Me again. I was able to avoid successfully the glitches but the use of hide/unhide (they have to be toggle to keep visibility state) makes the tcp and arrange view blink in a visible and quite annoying way. Is it going to be transparent when integrated in the function?

Me again. I was able to avoid successfully the glitches but the use of hide/unhide (they have to be toggle to keep visibility state) makes the tcp and arrange view blink in a visible and quite annoying way. Is it going to be transparent when integrated in the function?

@Breeder

This comment has been minimized.

Show comment
Hide comment
@Breeder

Breeder Sep 1, 2015

Contributor

Latest pre introduces additional API for track layouts. You can use that now. I'll fix SWS api so it also uses this new native API calss

Contributor

Breeder commented Sep 1, 2015

Latest pre introduces additional API for track layouts. You can use that now. I'll fix SWS api so it also uses this new native API calss

@Breeder Breeder self-assigned this Sep 1, 2015

@Breeder Breeder closed this in 2350251 Sep 10, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment