Leap Motion integration

Hi,

We are a group of students who plans to make a Leap Motion integration in blender.
We are planning to give the user the possibility to move the scene with his hands and to integrate configurable gestures to activate some functionalities. The final goal is to provide a fast and intuitive way to work on Blender.

Is there anyone who own a Leap who would like to make some tests in the future ?
We are waiting for your questions and reactions.

Thanks in advance.

You should search the forums around here, there have been at lest 2 different projects to integrate the Leap into Blender. In addition, if you plan on releasing or publishing this you should check into the license for the Leap libraries. It was my understanding that it was not compatible with the GPL that Blender uses.

Alright well understand for the Leap there isnt a lot of guides or people
that are familiar with it just yet.

C:\Users\MX\Desktop\BlenderBuilds\blender-2.66a-windows32\2.66\python\lib
has my Leap.py and _LeapPython.pyd files.

the leapPython PYD that was sent is a 32 bit version compiled under Windows.
So you may have to make a mac version using this guide.
I cannot do it because its a lot of work and I don’t understand the steps.

https://developer.leapmotion.com/questions/can-leap-python-works-with-python-3-3-0-for-blender

according to this you can make it on the mac. And its easier so if you make
a 64 bit _LeapPython.pyd send that file to me cause I hate 32 bit.

C:\Users\MX\Desktop\BlenderBuilds\blender-2.66a-windows32
has my Leap.dll file.

So for the mac I think you have to right click the application To edit to
contents. But you should be able to open my blend and press P and that’s it.
But if your hand doesn’t even show up in the Leap Visualizer then youre not
gonna get in Blender.

Hope that helps. The above mentioned method was a guide i wrote for another user so ignore any personal statements. But give that a shot.

I do not have SWIG installed on my Mac Mini Mountain Lion and do not understand how to do it. You must have SWIG installed in order to compile LeapPython.so for Mac Blender. Any advise on how to install SWIG? I have already downloaded the SWIG files.

If you have downloaded the SWIG installer then it should come with installation instructions.

Now, I am convinced that SWIG must be compiled first, so there you go, not a easy thing to do either. I’m not compiler savy in any way what so ever. I did compile a little demo using Xcode 5.0 and made a dynamic library without errors, however can not test to see if it does work. Created a libLeapPython.dylib only with demo files, not actually Leap files, nor using SWIG.

I have now compiled Homebrew and through that installed swig and compiled it also with the Terminal set up with Xcode 5.1 command Line Tools for MacOS 10.9 Mavericks. Then I made a folder and put in it the following Leap files:

Leap.h
Leap.i
LeapMath.h
libLeap.dylib

Then used this swig command line:

swig -c++ -python -o LeapPython.cpp -interface LeapPython /Users/Username/Library/Leap.i

It ran successfully, creating a file called LeapPython.cpp

Next:

clang++ -arch i386 -arch x86_64 /Applications/Blender/blender/blender.app/Contents/MacOS/LeapPython.cpp Applications/Blender/blender.app/Contents/MacOS/2.69/scripts/modules/Leap_Motion/libLeap.dylib /Applications/Blender/blender.app/Contents/MacOS/2.69/python/lib/python3.3/lib-dynload -shared -o _LeapPython.so

This I copied and pasted into the command line.

An error occurred saying a file python.h is missing, which I looked up and found out is a Windows file. So now I have to find out why a Windows file is required for a Mac OSX setup. Perhaps one of my Leap files was originally for Windows use and now I need to replace it with a Mac version. On with the debugging!