Load Clip example

snippet that loads a clip into the clips list, basic process is to create a videoStill item then set it’s filename channel:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# python
import lxu.select

img_path = r'C:\Data\__Lux\_Content\Assets\Images\Fabric\Carpet\carpet3.png'
sel_svc = lxu.select.SceneSelection()
current_scene = sel_svc.current()
scn_svc = lx.service.Scene()

# get a channel object
chan = current_scene.Channels(lx.symbol.s_ACTIONLAYER_EDIT, 0.0)
# channel writ object
cout = lx.object.ChannelWrite(chan)
# add a videoStill item to the scene
vclip = current_scene.ItemAdd(scn_svc.ItemTypeLookup(lx.symbol.sITYPE_VIDEOSTILL))
# get the index of the videoStill item's filename channel
idx = vclip.ChannelLookup(lx.symbol.sICHAN_VIDEOSTILL_FILENAME)
# set the filename
cout.String(vclip, idx, img_path)