Hi there everyone, I know a lot of people around here ask about how to avoid having VVVV freeze when a file open dialog box is open. Well over the weekend I decided to finally do something to address the issue.
I made a little program seperate from VVVV that listens for and replies to requests for filenames over OSC. Then I made a little VVVV module that interfaces with it and launches it automagically when you create the first instance of it.
So if you download Selektor from e-mu.org and unzip it into the modules directory you can create selektor (file) instances and attach the output to nodes that need a filename.
Enjoy file browsing without freezing!
Note that this was a quick and dirty hack so I wouldn’t be surprised if there is a bug or two, if you find one please tell me and I’ll try to fix it.
[http://e-mu.org| http://e-mu.org]
Well what do you know. That’s why you get people to test your stuff! There I put the file in the zip and re-uploaded it, try downloading it again from e-mu.org kalle.
Now how can I update the file I just uploaded to the user modules here…?
Hey!
I’ve just tried it and this is very nice to finally have such a simple and interruption-free file selector!
But a help patch would be really great!
;)
Great! Thanks elektromeier. I just uploaded your new version to my site (slightly modified to give you credit of course).
Now if only asynchronous texture loading was so easy to fix ;)
It would be great if you could control the position of the file dialog - at the moment there is a risk that it opens in a position that obscures something important.
If the sources are available in Visual C++ I could probably do the edit myself!
def GetFiles(msg):
print “gettingfies”
replyPort = msg02
directory = msg03
filetypes = msg04
dlg = win32ui.CreateFileDialog(1,
None,
None,
(win32con.OFN_FILEMUSTEXIST|
win32con.OFN_EXPLORER|
win32con.OFN_ALLOWMULTISELECT),
‘User Files (’ + filetypes + ‘)|’+filetypes+'|All Files (.)|.*||')
if len(directory):
dlg.SetOFNInitialDir(directory)
dlg.SetOFNTitle(‘Select Files’)
testvalue = dlg.DoModal()
if testvalue == win32con.IDOK:
for path in dlg.GetPathNames():
print “Sending back “, path
osc.sendMsg(”/filedialog/reply”, dlg.GetPathNames(), “127.0.0.1”, int(replyPort)) # send normal msg
def myTest():
osc.init()
inSocket = osc.createListener(“127.0.0.1”, 10406) # in this case just using one socket
# bind addresses to functions -> printStuff() function will be triggered everytime a
# "/test" labeled message arrives
osc.bind(GetFiles, "/filedialog/request")
while 1:
osc.getOSC(inSocket)
time.sleep(0.1)
if name == ‘main’:
print “Welcome to Selektor, your silly little OSC file manager”
print “A quick and dirty hack by Rob King, 2006”
myTest()
^