How to simulate a Transition Logic take out from command or script?

ruimac

Member
Imagine the following:

I have two templates that use Transition Logic. One shows a name, and the other shows some info.
I can start just the one with the name, just the one with the info. If the one with the name is already there, the one with the info pushes it up, and I can take out each one individually.
When I take out the one with the info, I also need to take out the one with the name, automatically.
I used the following command from within an Actions channel keyframe that is at the beginning of the OUT sequence of the info animation:

RENDERER*STAGE*DIRECTOR*$Nome GOTO_TRIO $NOMIN $O

And it seems to work perfectly, making the engine play the take-out animation that runs from the frame named NOMIN to frame named O of the name director.
The problem is that when I want to start a new name animation, it doesn't start from the beginning. It starts from the NOMIN position, making the name pop-up instantly.
So, this command doesn't accuratelly emulates the take-out command.
Is there any way to make sure that after a forced take-out from a command, the next time the sequence is played, it starts from the beginning, emulating the standart Transition Logic behaviour?

If you still need more information about my setup and what is happening, feel free to ask.
 
Hi
The issue is not with the animation itself, but with MSE and the Toggle state going out of sync. By forcing OUT with GOTO_TRIO, you skip MSE’s bookkeeping, so the next Take resumes from NOMIN. To emulate a proper Transition Logic OUT, you must either:
  • Use Execution Logic to trigger a real OUT (so MSE resets state), or
  • After your GOTO_TRIO, also send a reset command to the Toggle plugin (e.g. FUNCTION*Toggle*reset_current INVOKE).

That way, the next time you start a name animation, it will play IN correctly from the beginning.

drop into the Out command of the info template.
It does two things:
  1. Plays the name element’s OUT sequence (GOTO_TRIO $NOMIN $O).
  2. Resets the Transition Logic toggle so that the next Take starts cleanly from the IN point.

Code:
<forked_exec>
<entry name="execution_group"><var>channel</var></entry>
   <viz>
        RENDERER*MAIN_LAYER*STAGE*DIRECTOR*$Nome GOTO_TRIO $NOMIN $O<br/>
        RENDERER*MAIN_LAYER*TREE*$Nome*FUNCTION*Toggle*reset_current INVOKE
   </viz>
</forked_exec>

Notes

  • Replace MAIN_LAYER with your actual engine layer name if different.
  • Replace $Nome with the name of the Transition Logic layer or director group that holds your name element.
  • The <forked_exec> ensures it runs on the correct Viz Engine(s) in the active channel.
  • The reset_current call is what brings Viz Engine’s toggle state back in line with MSE, so the next Take doesn’t “pop in” at NOMIN.
check out this thread about Execution Logic
 
What Adi said but alternatively make a combo page that makes sure when you run the INFO page it also triggers a separate scene that triggers the Name Out.
Its just a scene with a controlobject set to Transition Logic that triggers the Nome layer, the O state in the Master scene. this is what tells the MSE that you need it to go out. Make this scene and the Nome scene into a Combo template in either Trio or VCP and it will work correctly.
 
It still didn't work effectively.
Is it possible to open up a Call Scene from an Action keyframe that is inside a Director in the main BG scene?
 
You can do all sorts of fun stuff from an action keyframe but as Adi mentioned, you will bypass the MSE and that will leave you in a bad state. Best bet for doing this sort of thing would be what Adi suggests with Execution Logic. We have done something similar for our old news program but we did it with Shared Memory combined with Execution Logic. The leafscene sets a SHM variable to notify the Masterscene about which element has been triggered. Then in the template we listen for this variable and if it has been set, it will trigger a saved dataelement to force the MSE to do the out animation. That way MSE is the one handing out messages about what to do.
 
It still didn't work effectively.
Is it possible to open up a Call Scene from an Action keyframe that is inside a Director in the main BG scene?
try Lars's solution or stick with Execution Logic.
it can be a bit tricky to set up but works well once you got it.
 
The thing is, I must really trigger a Take Out from within a Viz timeline.
I mean, it really must be triggered from a specific keyframe at a specific timeline.
And the result should be the same as opening the leafscene template and pressing Take Out.
 
Hello @ruimac,

I like the fun and challange of this so I did a Viz Script for you. This is how it looks like :

1759237697324.png

FIRST create a playlist or show and add a data element to this.

SECOND search the element reference inside the element collection Rest API
Code:
http://vizmse:8580/element_collection/storage/playlists/

it should look something like this :
Code:
/element_collection/storage/playlists/{9E31130E-117B-4549-B8AE-E63F16CC6E0F}/elements/ref

THIRD
in any scene add this script and complete the MSE, Profile, Channel and in the Body add the element reference.
then, in your animation, you can press take or out and it will be similar of you pressing it on trio/pilot/mosart/etc.

Rich (BB code):
Dim host, profile, action, channel, renderer_layer, cmd, body As String

Sub OnInitParameters()
    RegisterParameterString("host", "REST MSE Host: ","vizmse", 14, 20, "")
    RegisterParameterString("profile", "Profile: ","Default", 14, 20, "")
    RegisterParameterString("channel", "Channel: ","Engine01", 14, 20, "")
    RegisterParameterString("renderer_layer", "Renderer Layer: ","MAIN", 14, 20, "")
    RegisterParameterString("body", "Body: ","/element_collection/storage/playlists/{9E31130E-117B-4549-B8AE-E63F16CC6E0F}/elements/ref", 14, 100, "")
    RegisterPushButton("take", "Take", 1)
    RegisterPushButton("out", "Out", 2)
End Sub

Sub OnExecAction(buttonId As Integer)
    Dim response As String
    Dim data As Array[string]
  
    host = GetParameterString("host")
    profile = GetParameterString("profile")
    channel = GetParameterString("channel")
    renderer_layer = GetParameterString("renderer_layer")
    body = GetParameterString("body")
  
    ' Determine action based on which button was pressed
    If buttonId = 1 Then
        action = "take"
    Else
        action = "out"
    End If
  
    ' Build the HTTP POST request with query parameters
    cmd = "POST /profiles/" & profile & "/" & action & "?channel=" & channel & "&renderer_layer=" & renderer_layer & " HTTP/1.0" & "\r\n"
    cmd = cmd & "Host: " & host & "\r\n"
    cmd = cmd & "Content-Type: text/plain" & "\r\n"
    cmd = cmd & "Content-Length: " & Len(body) & "\r\n"
    cmd = cmd & "\r\n"
    cmd = cmd & body
  
    ' Send the request
    response = System.TcpSend(host, 8580, cmd, 900)
    response.Substitute("\r\n\r\n", "|", true)
    response.Split("|", data)
    If data.Size >= 2 Then
       println data[1]
    End If
End Sub
 
Back
Top