Awesome! Thanks for all the info, I'll start digging more. Pablo
On Sat, Apr 5, 2014 at 2:37 PM, Toni Alatalo <[email protected]> wrote: > btw there is an existing protocol for these things, TUIO which is for > user input over OSC (which the UDP/IP based MIDI-replacement): > http://www.tuio.org > > i wrote a simple asynchronous TUIO server to feed input to whatever > system (or do mouse emulation) from TUIO input a bit over a year ago, > is py 2 with the PyOSC lib: https://github.com/antont/tuioinput . the > network receiving part is here, a function that you are supposed to > call in your apps (in this case Blender) main / update loop: > tuio_rcv.each_frame() in > https://github.com/antont/tuioinput/blob/master/tuio_rcv.py#L80 > > have used it for a display wall setup with 6 hd display tiles which > are own independent touch displays that send the inputs for the single > control & display compu over the net: > https://twitter.com/an_toni/status/277165790149627905 :) > > i don't know if this discussion is really fit for this list as is not > blender-core, perhaps to bf-python or some forum - i'm happy to > discuss this anywhere and try out things too. > > Cheers, > ~Toni > > On Sat, Apr 5, 2014 at 8:26 PM, Jacob Merrill > <[email protected]> wrote: > > If this allowed accelerometer data and dead reckoning it would allow for > > old phones to become 3d mice.... > > On Apr 5, 2014 10:23 AM, "Toni Alatalo" <[email protected]> wrote: > > > >> i did this kind of thing a hundred years ago with py in the 2.25 game > >> engine or so. i think it will work in current normal blender ui > >> because i think there is now a way to hook a python function to be > >> called periodically. > >> > >> in a periodically updated py func you can poll your socket for > >> incoming data in an async/non-blocking way. that way you can handle > >> input from external sources but still not block the main ui. > >> > >> python 3 seems to have a nice looking revised lib for that, > >> https://docs.python.org/3.4/library/asyncio.html#module-asyncio . back > >> in the ancient bge experiment i think i used just the basic socket > >> api's select(). otherwise when doing this recently in a different app > >> i used the Circuits Python library but I bet that asyncio is simple > >> and nice with py 3 now. > >> > >> so given that you can hook blender to call your network-reader > >> periodically it should be straightforward - i can try to help if there > >> are trouble with the async socket reading. i wouldn't go via any DB > >> system for things similar to mouse dragging & button clicks. > >> > >> ~Toni > >> > >> On Sat, Apr 5, 2014 at 2:57 AM, <pablo /> <[email protected]> > >> wrote: > >> > My original idea (crazy as it might be) was to develop an app in > Android > >> > that could be used to control Blender. > >> > Imaging like dragging two fingers on the screen to rotate the screen, > 3 > >> > fingers to rotate the element, buttons to do specific functions and > the > >> > like. > >> > Mainly the screen and objects rotation would require high bandwidth > which > >> > I'm not sure using SQLite would cover, that's why I was asking if it > >> could > >> > be done using with a python add-on. > >> > I really don't know if that's possible but wanted to know about it and > >> > think it's a very interesting project. > >> > If a blender add-on could start socket with python then I will start > >> > digging into add-on development and find out the way. > >> > Another advantage is that if Blender can expose a socket then users > will > >> > not need to install anything else on their computers to make the > >> connection > >> > with the devices. > >> > This will allow a tablet/phone or whatever connect to the > computer:socket > >> > directly. > >> > > >> > Well that's my ideal, from there all I have to know what's possible > (or > >> > could be developed to make it possible) and what isn't. > >> > > >> > Cheers, > >> > Pablo > >> > > >> > > >> > > >> > On Fri, Apr 4, 2014 at 6:00 PM, W. Nelson <[email protected]> > >> wrote: > >> > > >> >> In #blenderpython on freenode.net a couple other coders and I have > >> talked > >> >> about similar ideas a few times recently. When I get a chance to > post > >> my > >> >> notes I will share them. > >> >> > >> >> We recently talked about PyQT as module and SQLite. Using SQLite > for a > >> >> messaging system instead of using sockets. Sockets are probably the > >> best > >> >> way to go though. > >> >> > >> >> The hardest part we decided was the messaging system and the timing > of > >> >> it. Also keeping any C code additions to Blender to a minimum. > >> Hopefully > >> >> it can all be done it Python. That was the hope using SQLite > >> transactions > >> >> as a messaging system. > >> >> > >> >> I will add more when I have more time. This is an interesting topic > to > >> me > >> >> also. > >> >> > >> >> JTa > >> >> > >> >> > >> >> > >> >> > >> >> ________________________________ > >> >> From: "<pablo />" <[email protected]> > >> >> To: bf-blender developers <[email protected]> > >> >> Sent: Friday, April 4, 2014 10:16 AM > >> >> Subject: Re: [Bf-committers] Question about external Blender > interface > >> >> > >> >> > >> >> Thanks for answering! > >> >> I don´t know anything (yet) about python dev inside Blender, could > it be > >> >> possible to implement it as a plugin? > >> >> I´m interested and could dedicate some time in this topic and think > >> doing > >> >> it would help the project. > >> >> > >> >> Regards, > >> >> Pablo > >> >> > >> >> > >> >> On Fri, Apr 4, 2014 at 1:16 PM, Dalai Felinto <[email protected]> > >> wrote: > >> >> > >> >> > Hi Pablo, > >> >> > > >> >> > This can be implemented via Python, but you will need to handle all > >> >> > the socket connectivity part. > >> >> > > >> >> > It would be nice to have this built-in in Blender (maybe as new > >> >> > bpy.app.handlers). But I don't think anyone is working on this it > at > >> >> > the moment. > >> >> > > >> >> > Dalai > >> >> > -- > >> >> > blendernetwork.org/dalai-felinto > >> >> > www.dalaifelinto.com > >> >> > > >> >> > > >> >> > 2014-04-04 13:05 GMT-03:00 <pablo /> <[email protected]>: > >> >> > > Hi, > >> >> > > > >> >> > > * My background: > >> >> > > > >> >> > > I started using Blender a couple of months ago, I´ve been always > a > >> fan > >> >> of > >> >> > > 3D and Blender in general since I think it´s an excellent > product. > >> >> > > I work as a Web and Android developer > >> >> > > > >> >> > > * The object of the email: > >> >> > > > >> >> > > Ultimately when using Blender, I thought about using all 5 mouse > >> >> buttons > >> >> > > then it came to me that I have a Joystick with 3d movement and > lots > >> of > >> >> > > buttons would be interesting using it with blender. > >> >> > > Finally I came to the idea of developing an Android application > to > >> >> > replace > >> >> > > the main use of the keyboard. > >> >> > > > >> >> > > What I don´t know is if Blender allows any kind of connectivity > out > >> of > >> >> > the > >> >> > > app. > >> >> > > For example, it could use a port or something to which apps could > >> >> connect > >> >> > > and send in commands, or something else you guys might think of. > >> >> > > The possibilities are really big since virtually anything could > be > >> used > >> >> > to > >> >> > > control blender. > >> >> > > > >> >> > > I would like to know if this is possible and if there are already > >> >> efforts > >> >> > > towards it, I couldn´t find any info on the Web. > >> >> > > > >> >> > > If this is not the right place to post please let me know. > >> >> > > > >> >> > > Thanks! > >> >> > > Pablo > >> >> > > _______________________________________________ > >> >> > > Bf-committers mailing list > >> >> > > [email protected] > >> >> > > http://lists.blender.org/mailman/listinfo/bf-committers > >> >> > >> >> > _______________________________________________ > >> >> > Bf-committers mailing list > >> >> > [email protected] > >> >> > http://lists.blender.org/mailman/listinfo/bf-committers > >> >> > > >> >> _______________________________________________ > >> >> Bf-committers mailing list > >> >> [email protected] > >> >> http://lists.blender.org/mailman/listinfo/bf-committers > >> >> _______________________________________________ > >> >> Bf-committers mailing list > >> >> [email protected] > >> >> http://lists.blender.org/mailman/listinfo/bf-committers > >> >> > >> > _______________________________________________ > >> > Bf-committers mailing list > >> > [email protected] > >> > http://lists.blender.org/mailman/listinfo/bf-committers > >> _______________________________________________ > >> Bf-committers mailing list > >> [email protected] > >> http://lists.blender.org/mailman/listinfo/bf-committers > >> > > _______________________________________________ > > Bf-committers mailing list > > [email protected] > > http://lists.blender.org/mailman/listinfo/bf-committers > _______________________________________________ > Bf-committers mailing list > [email protected] > http://lists.blender.org/mailman/listinfo/bf-committers > _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
