[REQUEST] 3d View Navigation Buttons

The script I am requesting would be of great benefit to tablet pc users lacking convenient access to a keyboard.

Essentially, blender has three primary commands for 3d viewport navigation.

Ideally the script would have a button for each and function in the following manner:
(1) Mouse click on button activates corresponding navigation command.
(2) While the mouse button is still held down, moving the cursor affects navigation.
(3) Viewport navigation ends upon mouse button release.
This is the same behavior as zbrush’s move, rotate, and scale buttons located in the transform palette.

I don’t have enough familiarity with blender scripting to know if mouse button down/up events can be linked to blender operations as event handlers. Please, volunteer any input you have as to if this could work and/or advice on creating the script.

I would be most appreciative is someone with a better understanding of blender scripting would undertake this project.

Do you have already a ‘tablet-working Blender’? Then you suffer from not having 3 mousebuttons?
From hearsay one thinks about a Blender for Android so maybe wait how one solves problems there (if some tries to do that)?

the 3dview Navigation addon for ease of use with laptops is in Blender addons already.
it has been for several releases.
user prefs > addons > 3dview > 3d navigation
then find the panel in View3D > Tool Shelf > 3D Nav

@PKHG I am using an X201 Tablet PC, and it works quite well in Blender. Not having access to a three button mouse or modifier keys in tablet mode is indeed the issue.

@Meta-Androcto I am aware of that feature. However, it does not provide the functionality I described in the original post.

Thanks you guys. Fortunately, I have developed a python script that, although not ideal, works quite well.

Adding the view3d.move, view3d.rotate, and view3d.zoom operators to a UI panel provides easy one touch access. However, the only way by default to terminate execution of each operation is MMB or ESC. I resolved this by going into the ‘User Preferences>Input’ options for each operator and changing modal confirmation to LMB.

With this method, I need only tap the respective navigation button with my stylus, move the cursor, and tap again to confirm. It’s not quite as good as click, drag, and release, but its pretty darn close.

I’d try click button to activate tool, mouse down to go into modal mode and mouse release to finish – think some tools work that way so it’ll probably work without too much hassle.

@ Uncle Entity: That may be worth looking into. I guess this means I’ll need to learn about modal operators :slight_smile:

My experience tells me that it would not work. Operator buttons are activated by clicking the button then releasing within the button area. I’m unaware of any python way to change the behavior such that an operator button activates simply by clicking within the button area.

You click the button (which starts the tool), wait for the next mouse down event (starts tool operation) then on mouse up end the whole tool session.

Easy, peasy…

Okay. I think I understand. However, needing to click the button then click (and hold), drag, and release is no faster than my working method of click the button, move cursor, and click to terminate. Both require two mouse clicks.

I do see two advantages of your proposed method:

Currently, I have my buttons on the right side of my user interface. Lets say I click the move button with the intent of panning to the right. In this situation–remember, I’m using a stylus and can’t loop the cursor with the ‘Continuous Grab’ input option–I encounter the problem of only being able to pan so far to the right before my pen goes off screen.

(1) With your method, I can relocate the cursor to the center of the screen before initiating the next mouse down event, thereby allowing more room to operate.

I have the buttons on the right side of my UI because I am right-handed. With the buttons on the left, I must reach across the screen, obstructing my view. Since the navigation mode initiates after pressing the button, it would be difficult to see the changing view.

(2) With your method, I could have the buttons anywhere. I’d just make sure the subsequent mouse down event takes place in an area of the screen that wouldn’t block my vision.

Clearly, your method is superior. I’ll look into learning about modal operators and altering my script eventually. For now, I need to focus on a different project.

Thanks for you input Uncle Entity!