- Posts: 26
- Joined: Wed Sep 21, 2016 2:28 pm
- Code: Select all
comp.Lock()
dialog = {
1: {1: 'compw', 'Name': 'Width', 2: 'Slider', 'Default': 7600, 'Integer': 1, 'Min': 1, 'Max': 9000},
2: {1: 'comph', 'Name': 'Height', 2: 'Slider', 'Default': 4500, 'Integer': 1, 'Min': 1, 'Max': 9000}
}
ret = composition.AskUser('Frame format', dialog)
if ret:
keys = ['compw', 'comph']
dict2 = {x:ret[x] for x in keys}
compw = dict2.get('compw')
comph = dict2.get('comph')
comp.SetPrefs('Comp.FrameFormat.Width', compw)
comp.SetPrefs('Comp.FrameFormat.Height', comph)
else:
print("Cancelled by user")
comp.Unlock()