I'm having a bit of trouble handling an optionVarList within the
optionVarDict

The new file dialog has a bookmark section and it's defined in the optionVar
CustomFileDialogSidebarUrls

for bookmark in pm.optionVar['CustomFileDialogSidebarUrls']:

print bookmark


The bookmarks I want to add are shot specific so I need to delete/modify
bookmarks based on my environment. Is this possible to do (The delete/modify
part)?


pm.optionVar['CustomFileDialogSidebarUrls'] is an OptionVarList which seems
to have very limited functionality. I can append, but I can't remove, or
modify?


Maybe I'm missing something?


for index in xrange(len(pm.optionVar['CustomFileDialogSidebarUrls'])):

print pm.optionVar['CustomFileDialogSidebarUrls'][index]

pm.optionVar['CustomFileDialogSidebarUrls'][index] = 'test'

# Error: TypeError: 'OptionVarList' object does not support item assignment
#


Thanks!

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to