Graphics

 View Only
  • 1.  Export Take Item List to... Keyboard Bind

    Posted 06-29-2025 16:47

    Hi, was wondering if it is possible to bind the Sequencer's File>Take Item List>Export To... to a keyboard shortcut? I can only see an option for a keyboard map on the Export Take Item To..., not the entire take item list. V12



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



  • 2.  RE: Export Take Item List to... Keyboard Bind

    Posted 07-02-2025 08:30

    Hi Jack,
    The default keyboard shortcut CTRL + SHIFT + X lets you quickly open the "export to" page. You can also customize it by choosing your preferred shortcut in the Keyboard / GPI Mapping page.





    ------------------------------
    Alan LAMY
    Intégrateur graphique
    Paris France
    ------------------------------
    -------------------------------------------
    Message d'origine:
    Envoyé: 06-29-2025 16:46
    Depuis: Jack Reynolds
    Sujet: Export Take Item List to... Keyboard Bind

    Hi, was wondering if it is possible to bind the Sequencer's File>Take Item List>Export To... to a keyboard shortcut? I can only see an option for a keyboard map on the Export Take Item To..., not the entire take item list. V12



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



  • 3.  RE: Export Take Item List to... Keyboard Bind

    Posted 07-02-2025 10:49

    Yeah see that only exports the selected take item though. I need to be able to export the entire take item list instead.



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



  • 4.  RE: Export Take Item List to... Keyboard Bind

    Posted 07-02-2025 18:21

    It would be a little more work, but you could probably do it by attaching a script to a key where the script does the export?

    xpSequencer.CreateExporter() ' create an exporter object

    xpSequencer.ItemCount ' get # of take items

    xpSequencer.GetTakeItemByIndex() 'get first item at index 0

    xpSequencer.GetNextItem() ' get each item in loop (or just keep using GetTakeItemByIndex() with increasing index)

    xpSequenceExporter.AddItem() ' add each item to exporter in loop

    xpSequenceExporter.SaveToXML() ' save it to disk



    ------------------------------
    - Ben
    ------------------------------



  • 5.  RE: Export Take Item List to... Keyboard Bind

    Posted 07-02-2025 18:25

    I've played with that, but from what I've seen, xpSequenceExporter can only export take items, groups are not included - unless I am wrong?



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



  • 6.  RE: Export Take Item List to... Keyboard Bind

    Posted 07-02-2025 19:28

    I don't know, maybe not. I can't even get a test script to work anyway, it compiles, but crashes when trying to get the first take item (v. 11.5).

    dim seq as xpSequencer = engine.sequencer()
    
    dim itemCount as integer = seq.itemCount
    
    if itemCount > 0 then
    	dim takeItem as xpTakeItem = nothing
    	dim exp as xpSequenceExporter = nothing
    	
    	if seq.createExporter(exp) = true then
    		for i as integer = 0 to itemCount - 1
    			if seq.getTakeItemByIndex(i, takeItem) = true then ' <-- crash here
    				exp.addItem(takeItem)
    			end if
    		next
    
    		exp.saveToXml("C:\\Users\Default\Downloads\take-item-list.xml")
    	end if
    end if


    ------------------------------
    - Ben
    ------------------------------



  • 7.  RE: Export Take Item List to... Keyboard Bind

    Posted 07-02-2025 19:34

    I could definitely be wrong, but I (think?) the sequencer starts at a 1 based index instead of a 0 based index for some reason. I appreciate the effort, but groups not being included breaks that for me. Thank you nonetheless!



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



  • 8.  RE: Export Take Item List to... Keyboard Bind

    Posted 07-02-2025 23:51

    I think if you reeaaallly had to do it you could, but it would be a PITA, in the absence of an exporter addGroup() function. In the export XML when you do it manually, the groups are each their own separate XML elements at the top of the file, then each take item references the group ID in its own parameters (these would already be included for the take items using the exporter, I think). A group item looks like this:

    <command type="creategroup" targetid="1" name="Group 1" mode="0" itemtiming="0" groupduration="0" repeatmode="0" repeatunit="0" repeatvalue="1" whenfinished="0" settingsmode="0" settingsdirection="0" settingsdurationmode="0" settingsloopcount="0" settingsspeed="2" settingsseconds="0" settingsframes="0" settingstopmargin="0" settingsbotmargin="0" settingsleftmargin="0" settingsrightmargin="0" settingsblankheader="1" settingsblankfooter="1" settingssoftstopframes="25" settingssoftstartframes="25" settingsperscenelighting="1" startatmode="0" desc="" targetfb="1" layerid="0" startwaitforkey="1" startattime="0"/>

    You could loop over the groups (xpTakeItemGroup) using sequencer.groupCount and sequencer.getGroup(). Then build up one of these strings for each group using a lot of annoying string substitution (not one of VBScript's strengths).

    Then, export the take items to the file using the exporter (assuming you can make it not crash when getting the take item). THEN, because there's no way I can see to output the exporter XML as a string, you'd have to read the file back in, insert your block of substituted group XMLs following the <commands> tag near the top, and re-save the file.

    Theoretically you could end up with something that works like a manual sequencer XML export, but it's probably not that easy.

    Much better would be if Ross adds an addGroup() function to the XML exporter, and (just in case) a function to get the exporter's XML as a string instead of writing it to a file. Maybe those are already there in version 12.X, I'm still on 11.5.



    ------------------------------
    - Ben
    ------------------------------