Conversation
This comment was marked as resolved.
This comment was marked as resolved.
f667900 to
58e3a96
Compare
SuuperW
left a comment
There was a problem hiding this comment.
(and there might be stuff to update regarding the recent addition of LuaCATS documentation, but I haven't looked at that)
|
|
||
| [LuaMethodExample(""" | ||
| tastudio.set_branch_text_by_id("97021544-2454-4483-824f-47f75e7fcb6a", "success"); | ||
| """)] |
There was a problem hiding this comment.
I think "success" is a strange branch text to use as the example here. Something more obviously a branch's text (even "branch text" or "branch name") would be more appropriate.
| { | ||
| if (!Guid.TryParseExact(id, format: "D", out var parsed)) | ||
| { | ||
| Log($"not a valid UUID: {id}"); |
There was a problem hiding this comment.
Something indicating that this message is about a branch operation would be good. Seeing this pop up in the output when running a Lua script, the user (even if they are the script author) might have no idea what this is about or what a UUID is. "not a valid branch id: {id}" would be better, I think.
| """)] | ||
| [LuaMethod( | ||
| name: "create_branch", | ||
| description: "Creates a new branch at the end of the list, and returns its UUID.")] |
There was a problem hiding this comment.
Similarly here I think UUID should just be ID. (and the description for delete)
| var index = Tastudio.CurrentTasMovie.Branches.Count - 1; | ||
| var branch = Tastudio.CurrentTasMovie.Branches[index]; | ||
| branch.UserText = text; | ||
| Tastudio.BranchSavedCallback?.Invoke(index); |
There was a problem hiding this comment.
I'd prefer changing the Branch method to return the instance, instead of grabbing it by index here.
Also, I think the Branch method should handle calling BranchSavedCallback. It looks like from reading related code that the callback isn't called if you branch with the context menu item, so you'd be fixing that too.
resolves #4073