Announcement

Collapse
No announcement yet.

Access a WINDOW_MASK plugin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally Posted by ruimac View Post
    Well, it works like that in version 4.x
    But in version 3.x, when we click the tracking object button, it does nothing.
    And, until we upgrade to version 4.x, I was trying to get a way to emulate that 4.x behaviour, since we have lots of files that use WINDOW_MASK with tracking objects and they are not all named differently.

    So, it would be great to be able to select the actual container of the tracking object.
    Hi, try to put this script in a container with the add-on "WINDOW_MASK", it should select the container "Tracking Object"
    Code:
    Sub OnInitParameters()
        RegisterPushButton("cmd", " SELECT TRACKING OBJECT ", 0)
    End Sub
    
    Sub OnExecAction(buttonId as Integer)
        Dim obj As String = System.SendCommand("#" & this.VizId & "*WINDOW_MASK*TRACK*OBJECT GET")
        Dim inf As Array[String]
        obj.Split(chr(32),inf)
        If inf.Ubound > -1  Then
           System.SendCommand("SEND_GUI_COMMAND EDITOR*5 EDIT_CONTAINER {" & inf[0] & "}")
        End If
    End Sub
    Example: https://mega.nz/file/ov4gmQJY#jX5pUD...Wfc74KQZ6Wp4Xw
    Last edited by mlynarik.jozef; 11-11-2021, 12:32 PM.

    Comment


    • #17
      Originally Posted by mlynarik.jozef View Post

      Hi, try to put this script in a container with the add-on "WINDOW_MASK", it should select the container "Tracking Object"
      Code:
      Sub OnInitParameters()
      RegisterPushButton("cmd", " SELECT TRACKING OBJECT ", 0)
      End Sub
      
      Sub OnExecAction(buttonId as Integer)
      Dim obj As String = System.SendCommand("#" & this.VizId & "*WINDOW_MASK*TRACK*OBJECT GET")
      Dim inf As Array[String]
      obj.Split(chr(32),inf)
      If inf.Ubound > -1 Then
      System.SendCommand("SEND_GUI_COMMAND EDITOR*5 EDIT_CONTAINER {" & inf[0] & "}")
      End If
      End Sub
      I get, in the Console, the error "failed to process command SEND_GUI_COMMAND"

      Comment


      • #18
        Originally Posted by ruimac View Post

        I get, in the Console, the error "failed to process command SEND_GUI_COMMAND"
        Tested on versions: Viz Artist 3.8.3.68251, 3.13.0.84651, 3.14.4.97861
        Example: https://mega.nz/file/ov4gmQJY#jX5pUD...Wfc74KQZ6Wp4Xw
        Last edited by mlynarik.jozef; 11-11-2021, 12:55 PM.

        Comment


        • #19
          Originally Posted by mlynarik.jozef View Post

          Tested on versions: Viz Artist 3.8.3.68251, 3.13.0.84651, 3.14.4.97861
          Example: https://mega.nz/file/ov4gmQJY#jX5pUD...Wfc74KQZ6Wp4Xw
          It tells me that I have no key to download it.
          Last edited by ruimac; 11-11-2021, 01:07 PM.

          Comment


          • #20
            I managed to see it now. However, I still get the error message I reported above.

            Comment

            Working...
            X