Graphics

 View Only
  • 1.  Script Create Take Item

    Posted 11-27-2022 15:16
    Hello,

    I am trying to write a script to insert a scene by ID from a particular project into the sequencer and give it a take ID. So far, I can retrieve the project, get the scene, create a TakeItem and place it into a specific group, but I am unable to actually set the take ID number of the newly created item. Can anyone give some scripting guidance on how to create a take item to a specific ID? Thanks!

    ------------------------------
    Jack Reynolds
    ------------------------------


  • 2.  RE: Script Create Take Item

    Ross Staff
    Posted 11-28-2022 04:20

    xpTakeItem.ID 

    Its a read and write property. 




    So this example would renumber the take ID. 

    dim take2 as xpTakeItem

    engine.sequencer.getTakeItemByID(1000,take2)

    take2.ID = 2000



    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------



  • 3.  RE: Script Create Take Item

    Posted 11-28-2022 07:00
    That function does nothing, nor has it ever worked for me in any script. Even if I try to do an engine.sequencer.GetTakeItem.ID after it creates the TakeItem, it still does not renumber. I clearly am missing something here.
    'Get the TakeID of the retrieval sequencer item and return it for DataLinq Key setup.
    if engine.Sequencer.GetTakeItemByID(999997, ref) then
    jerseyKeyer = CType(ref, xpTakeItem)
    else
    MsgBox("Error: The Player Builder scene is not found at 999997. Load the Player Builder project and place the scene for your sport at 999997.",16,"Player Builder")
    
    dim createGroup as xpTakeItemGroup
    dim createProject as xpProject
    dim createScene as xpScene
    
    engine.Sequencer.GetGroupByName("TX - DO NOT DELETE", createGroup)
    engine.GetProjectByName("Player Builder", createProject)
    createProject.GetSceneByID(8675309, createScene)
    
    engine.Sequencer.CreateTakeItem(createScene, createGroup, ref)
    engine.Sequencer.GetTakeItemByID(8675309, ref)
    ref.ID = 999997
    jerseyKeyer = CType(ref, xpTakeItem)
    
    
    end if
    ​


    ------------------------------
    Jack Reynolds
    ------------------------------



  • 4.  RE: Script Create Take Item

    Ross Staff
    Posted 11-28-2022 07:03
    I literally tested that as I wrote it and it worked  perfectly for me so I would say there's an error somewhere else in your script.

    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------



  • 5.  RE: Script Create Take Item

    Posted 11-28-2022 07:10
    Just checked and the problem was the ref item was an xpBaseTakeItem instead of a xpTakeItem.

    ------------------------------
    Jack Reynolds
    ------------------------------



  • 6.  RE: Script Create Take Item

    Ross Staff
    Posted 11-28-2022 07:11
    Pleased you found the issue.

    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------