Jump to content
FrankFirsching

Hou Navigator 0.1

Recommended Posts

Hi all!

Finally I've found some time again to play with Houdini. And the result is something, I'd lilke to share with the community. I've called it "Hou Navigator" and it's a plugin to control the viewport using a 3dconnexion spacemouse. Currently, this is just an alpha release and some paths must be adjusted in the source for it to work, but basic sensor movement is already functional. So, if there's someone who likes to play with it, I'm always happy about feedback.

@Jason: What do you think about adding this to the odforce plugins project on sourceforge?

Cheers and happy Easter!

Frank

spacemouse_0.1.zip

Share this post


Link to post
Share on other sites

Hay, welcome back Frank. :)

I don't have a spacemouse but I'm sure this is good news for a bunch of people.

Share this post


Link to post
Share on other sites
Hay, welcome back Frank. :)

I don't have a spacemouse but I'm sure this is good news for a bunch of people.

This is great, yeah! Well done:) I'll try to get it uploaded to sourceforge.. if I remember how :o

Share this post


Link to post
Share on other sites

Nice! Waiting for this by SESI. I hope that getting obsolete now, while I help on this with testing.

OK, first prob on installation. Import sysnavigatorPath = "path" leads to an invalid syntax.

I had installed Python 2.5.4 and the SDK 6.0 update for Windows Vista, all 64bit.

Have a nice day

Edited by LFX

Share this post


Link to post
Share on other sites

First, thanks for testing :-)

Seems you're copy-and-pasting the small python snippet to the python shell, aren't you? It looks like the newline got lost and python is interpreting the two statements as one. In the meantime someone told me, that executing the startup code directly from the python shell results in a crash of houdini. I've added a shelf tool with the startup code and there it's running without problems. I'll have a deeper look into that problem soon. Hope that helps :)

Share this post


Link to post
Share on other sites

Nope, I just entered this:

>>> import sysnavigatorPath = "C:\Program Files\Side Effects Software\Houdini 9.5.379\spacemouse"

File "<console>", line 1

import sysnavigatorPath = "C:\Program Files\Side Effects Software\Houdini 9.5.379\space

mouse"

^

SyntaxError: invalid syntax

But I think, me is missing some basic knowledge of programming. So I'm pretty sure that I miss sth. out in the whole installation process.

Edited by LFX

Share this post


Link to post
Share on other sites

Ok, the line

import sysnavigatorPath = "C:\Program Files\Side Effects Software\Houdini 9.5.379\spacemouse"

is really a syntax error. It should be 2 lines:

import sys
navigatorPath = "C:\Program Files\Side Effects Software\Houdini 9.5.379\spacemouse"

Python is a language, that is very sensitive to line breaks and whitespace characters. As I mentioned in my previous post, unfortunately starting from the interactive python shell doesn't work. Could you please create a new shelf tool and copy the code snippet into the edit field of the "script"-tab in the window that will open? It should look exactly like the example in the readme file concerning the line breaks and indentation.

Share this post


Link to post
Share on other sites

Done, and no error yet. But nothing happened.

Share this post


Link to post
Share on other sites

Is the 3dconnexion driver started? Do you have your mouse pointer placed over a 3D view? The script is moving the camera of the viewer that is placed directly under the mouse. If the mouse is positioned over a different area (e.g. shelf, network pane, etc.) nothing happens.

Share this post


Link to post
Share on other sites

Yes driver is started. I added a camera and tried to look around.

Only now I added the full code, what I think is right. Like I said before, no clue what's necessary.

import sys
navigatorPath = "[i]Path[/i]"
if not navigatorPath in sys.path:
   sys.path.append(navigatorPath)
import hou_navigator
hou_navigator.start()

And there is coming: No module named spacemouse

Traceback (most recent call last):
  File "tool_2", line 5, in &lt;module&gt;
  File "C:\Program Files\Side Effects Software\Houdini 9.5.379\spacemouse\hou_navigator.py", line 173, in &lt;module&gt;
	import spacemouse
ImportError: No module named spacemouse

Edited by LFX

Share this post


Link to post
Share on other sites

Did you adapt line 170 (assignment of nativePath) in hou_navigator.py to your installation directory? As far as I can guess it should be

nativePath = "C:/Program Files/Side Effects Software/Houdini 9.5.379/spacemouse/native/build/lib.win32-2.5"

Be sure to use forward slashes (or double backslashes), because certain backslash sequences have a special meaning to python (e.g. \n represents a newline character).

Share this post


Link to post
Share on other sites

Yeah, that's it! Forward slashes, what a tedious job. You should show the whole path with lib.win32-2.5 in the readme.

Anyway, I'm super happy using the 3D-controller in my favorite app. I stay tuned for any update. Maybe getting full potential of the space pilot someday. :)

Testing it in Houdini 10, too.

Dankesch

Edited by LFX

Share this post


Link to post
Share on other sites

That's great to hear.

Frank, is there any possibility of a linux-compatible driver in the future?

Share this post


Link to post
Share on other sites

Sure! I just need to install that Ubuntu that's lying already besides my new computer ;-). Then the fun can begin.

Edited by FrankFirsching

Share this post


Link to post
Share on other sites
Sure! I just need to install that Ubuntu that's lying already besides my new computer ;-). Then the fun can begin.

Oooh. I just might have to pick up one of these little things.

Share this post


Link to post
Share on other sites

That's great. I have an IBM-branded SpaceBall (RS-232) and a SpaceNavigator (USB). I've been asking for ages if 3Dconnexion could perhaps get support for Houdini, but each time I got very dissatisfying answers. I wanted to try to write my own support, via the HDK, but I never found the time to do so. I see this was done with Python, it's quite amazing what you can do with it.

I'll try it out as soon as possible!

Edited by MG

Share this post


Link to post
Share on other sites

Only want to mention that even key input is just working fine. Almost overlooked the macro function of the 3Dx-firmware. Sure, a control panel to assign houdini functions would be nice. But the only thing I really miss is a auto switch between modeling-, animating-, etc. profiles.

Edited by LFX

Share this post


Link to post
Share on other sites

It works! Thanks Frank :D One step closer to freedom from Autodesk. Next step, making the centre of selection the pivot of viewport rotation ... and learning Houdini, but that's my problem ;)

Share this post


Link to post
Share on other sites
Next step, making the centre of selection the pivot of viewport rotation ... and learning Houdini, but that's my problem ;)

You can't rotate about a selection but you can set & center the pivot to it. In the viewport, put your cursor above your selection & type spacebar + z. Now, your selection should be centered in the viewport.

Yeah, I can't help you with learning Houdini. ;)

Cheers!

steven

Share this post


Link to post
Share on other sites

I just found this after much searching and now here it is in odforce. Only i am running a mac at home and a Linux box at work, that i don't have the privileges to mess with, that much. so i am not that much ahead. My home mac is a dual boot into windows but i am only using that os for puter games.

but nice to see someone making this. maybe now someone at sidefx can have a play with it and then integrate it into Houdini permanently.

Edited by meshsmooth

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×