Skip to content

Add more Lua functions for TAStudio markers #4335

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

YoshiRulz
Copy link
Member

@YoshiRulz YoshiRulz commented May 27, 2025

Based on #4272 by @c7fab (thank you, and please let us know if this is insufficient for your use case).

@YoshiRulz YoshiRulz added this to the 2.10.1 milestone May 27, 2025
@YoshiRulz YoshiRulz requested a review from vadosnaprimer May 27, 2025 14:37
@YoshiRulz YoshiRulz linked an issue May 27, 2025 that may be closed by this pull request
@c7fab
Copy link
Contributor

c7fab commented Jun 3, 2025

At first glance it looks those functions can do everything that was possible with my PR.

@SuuperW
Copy link
Contributor

SuuperW commented Jun 28, 2025

I think it would be good to handle the case where the specified branch doesn't exist. So that tastudio.getmarker(0, 500) doesn't throw an exception. Maybe print a message saying no such branch exists, or maybe just return nil like when there is no marker on the given frame.

@SuuperW
Copy link
Contributor

SuuperW commented Jun 28, 2025

Actually, branches have an Id that can be obtained with tastudio.getbranches and this is used instead of an index in tastudio.getbranchinput. This seems like it could be useful as branch indexes can change by deleting one. Should this new function use the Id too?

Existing function tastudio.setbranchtext uses an index, not an id. So it's already not consistent in the API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TAStudio branches/markers lua functions
4 participants