Mouselook Navigation addon (+ZBrush mode)

Sure, here is the picture of the “fast navigate” option, in sculpt mode.
It is in the left panel, in options tab, in the option sub panel.



thank you for your interest.

Hello.
Dairin0d thank you very much without zbuffer working much better.

I make 2 function for find view.
But I can not understand in what line they should be added so that they work.

def getView(self, context, event):    region = context.region
    rv3d = context.region_data
    coord = event.mouse_region_x, event.mouse_region_y
    view_vector = view3d_utils.region_2d_to_vector_3d(region, rv3d, coord)
    return rv3d.view_rotation * Vector((0.0, 0.0, -1.0))


def findView(self, context, event):
    vector = getView(self, context, event)
    if vector == Vector((0.0, -1.0, 0.0)):
        bpy.ops.view3d.viewnumpad(type='FRONT', align_active=False)
    elif vector == Vector((0.0, 1.0, 0.0)):
        bpy.ops.view3d.viewnumpad(type='BACK', align_active=False)
    elif vector == Vector((1.0, 0.0, 0.0)):
        bpy.ops.view3d.viewnumpad(type='RIGHT', align_active=False)
    elif vector == Vector((-1.0, 0.0, 0.0)):
        bpy.ops.view3d.viewnumpad(type='LEFT', align_active=False)
    elif vector == Vector((0.0, 0.0, 1.0)):
        bpy.ops.view3d.viewnumpad(type='TOP', align_active=False)
    elif vector == Vector((0.0, 0.0, -1.0)):
        bpy.ops.view3d.viewnumpad(type='BOTTOM', align_active=False)

Love the addon, I’m a big fan of ZBrush style navigation.

I’m having a problem though, when in Edit Mode it seems incredibly finicky about grabbing the 3D manipulator axes, half the time it doesn’t work and goes into orbiting instead. Any advice?

@amars, you can try to make lower the zbrush radius (I chose around 4), in the preferences of the addon.
But, to be honest, i desactivated the object/edit modes in the addon, and made it only availabe in paint/sculpt.

How did you deactivite the addon in edit/object mode?
I think it should be a feature in preferences as I’d too only use it in sculpt mode.

You can choose the available modes in the addon preferences.
Click on keymaps (you have to select them in the two keymaps). update and save user settings.


Thanks!
Very useful addon, I just hope sculpting performance will improve in blender, I’d use it more in that case.

I’ve added a user preference “Record Z-buffer”, so you can disable it now from the user interface.
Also there’s now support for the “Fast Navigate” option :slight_smile:

Super good addon if you use mainly pen tablet for modelling with blender like i do. Couple of things I would like to point out.
There is somewhat odd viewport slowdown when using this addon and navigating around also using shift to snap to ortho views doesnt update the name of the view upper corner of blender ui.

Other than those it seems to work like intended and stable :slight_smile:

fiendish55, try disabling the “Record Z-buffer” option in the user preferences (I added it today) and/or close the User Preferences window. On my computer, without an open User Preferences window, the addon’s navigation is almost as fast as the built-in one.

Regarding the name of the ortho view in the upper corner: Blender does not provide a way to explicitly change it, so this is outside of the addon’s control.

Great !!!
It works seamlessly with the "fast navigate " option , thank you very much dairin0d !!!

About the "text of view to snap to ortho view " pointed by fiendish55 , maybe a workaround would be to check the “90/-90 degrees” on each axis. then if snapped, launch a view operator like ( bpy.ops.view3d.viewnumpad(type=‘FRONT’) ) according to the returned value .
this way, the good ortho view is set, and the text updated by blender itself.
hope i made it clear enough :slight_smile:

Ethan Aeris, this might actually work. Thanks for the suggestion!

I found that increasing the radius worked better but still didn’t help enough to be reliable even at the max setting of 64.

Rather disappointing, wish I could get it to work in edit mode but at least it’s nice in sculpt/paint.

aMars, what screen resolution do you have?
Also, just in case: do you have some custom setup of keymaps/shortcuts?

1920x1200

I have tons of custom hotkeys, between my native Blender keymap and all my custom keys in Pie Menu Editor, I’m not even sure I could list them all easily.

I actually sort of remedied the issue I was having though (not being able to select the gizmo in edit mode) by changing the zbrush detection method to Selection rather than Z-Buffer. Selection method seems a LOT more reliable and doesn’t have the same problems that Z-Buffer has (such as not being able to orbit if you accidentally click on the grid)

Is there some drawback to using Selection over Z-Buffer as the ZBrush method?

Edit: Went ahead and backed up my config and ran the default blender setup + mouselook nav, works fine with Z-Buffer. seems you’re right. Something in my keymap or other addons appears to be screwing it up though I’m not sure why it works fine with selection method.

Edit 2: Just an idea regarding the lack of orbiting around the last sculpted stroke and, this is a pretty hacky work around but you may be able to place the 3D cursor at the start (or maybe end?) location of a stroke and then set the camera to lock to cursor. Maybe disable lock to cursor when the user attempts to pan the camera…

Not sure how feasible it is from a scripting standpoint or if it would even feel good to work with. Just something I was thinking about because I have to use lock to cursor constantly for weight painting since orbit last stroke doesn’t seem to work in weight paint mode.

Selection is slow if there is huge number of selectable elements (e.g. when editing a mesh with high polycount). On my computer, when in mesh edit mode with > 10k vertices, there’s a noticeable lag between clicking the mouse and the actual start of the navigation.
Z-Buffer performance cost does not depend on the complexity of the scene – but aside from that, Selection indeed seems to be superior in all other regards. Maybe I should make it the default ZBrush method?

The main problem here is that there’s no reliable way to figure out the start/end location of a stroke. I can know mouse position before the sculpt/paint or after it – but if it’s not over the sculpted/painted object, I’ll have no idea where the start/end stroke location actually was.

Ok, I implemented the “numpad” view detection to update the view name in the corner. But since it’s a very small feature and I’m lazy, the addon’s version number remains the same :stuck_out_tongue: (I simply re-uploaded a new zip under the same url).

Nice improvement!
many softwares add version numbers for less features :smiley:

There is something shady going on with the new ortho view snap it starts to flicker which didn’t happen with older version and it sometimes doesn’t know which view you actually are showing false information on the top of the screen O.o

Hmm, this feature seems to cause more inconvenience than it solves. The bpy.ops.view3d.viewnumpad() operator, which I use for “displaying” the view name, does not work instantaneously, so the flickering problem is quite hard to avoid. The “false information” (retaining the wrong view name) can be fixed, but maybe I should just revert to the old ways (i.e. remove any attempts to set the view name)?