zturtleman / mm3d

Maverick Model 3D is a 3D model editor and animator for games.
https://clover.moe/mm3d
GNU General Public License v2.0
115 stars 23 forks source link

Some key bindings I want to recommend #94

Open m-7761 opened 4 years ago

m-7761 commented 4 years ago

MM3D doesn't have a lot of default key bindings, and I'm not sure its help files explain how to edit the config file. I'm going to set up a preference screen, but that's not a substitute for having more out of the box settings. Unfortunately without a prefs screen, new defaults probably won't take effect since they are already defined in the config file.

Below is an excerpt from my file. I've also put these in my code for fresh installs. The ones that are different is the UV editor uses T, which is assigned Select Point. Select Point uses O. Which is beside P, and looks like a point. Select Projection uses P.

Strikeout: I later assigned T to the Move function, T for translate, because it's beside R for Rotate on the keyboard, and M is a right-hand, hard to reach key. And assigned M to the UV editor, for Material or UV Map, take your pick. Ctrl+M is the materials window, so it make sense to associate them. M used to be Move's key, so this wasn't possible before.

EDITED: I've updated this with a full list, including changes that don't jibe with this post's. EDITED: I've scaled it back to just additions and changes; now marked with ; comments.

snap_grid=Shift+G
snap_vert=Shift+V
rops_show_lines=Shift+W
rops_show_backs=Shift+F
;frame_all=Home
frame_all=Shift+E
;frame_selection=Shift+Home
frame_selection=E
frame_lock=Ctrl+E
model_wireframe=W
view_1=Shift+1
view_2=Shift+2
view_1x2=Shift+3
view_2x1=Shift+4
view_2x2=Q
view_3x2=Ctrl+Shift+3
view_swap=Shift+Tab
view_flip=Shift+Q
;tool_select_points=T
tool_select_points=O
;tool_move=M
tool_move=T
tool_drag_vertex_on_edge=Shift+T
tool_scale=S
tool_shear=Shift+S
tool_extrude_faces=X
tool_create_polygon=Z
tool_create_vertex=Shift+Z
tool_create_rectangle=F5
tool_create_cube=F6
tool_create_ellipsoid=F7
tool_create_cylinder=F8
tool_create_torus=F9
tool_create_bone_joint=F10
tool_create_point=F12
tool_create_projection=Shift+F12
cmd_weld_vertices=Ctrl+W
cmd_unweld_vertices=Shift+Ctrl+W
cmd_invert_normals=N
cmd_edge_turn=Ctrl+Shift+F
cmd_edge_divide=Shift+D
cmd_subdivide_faces=D
;uv_editor=Ctrl+E
uv_editor=M
animate_settings=Shift+Esc
animate_window=A
tool_none=Esc
tool_toggle=Tab
tool_recall=Space
animate_play=K

A is what Misfit calls the animation mode, but in my system it's a pop-up window that appears to the bottom-right of the cursor. It still implements most of animation, but there is a persistent animation panel in the sidebar, that is limited to setting the animation and working frame number. By implements, I mean its code is animwin.cc.

I've made the Animation Sets table multi-column, with checkboxes for the loop settings. So it can set all of the settings. It uses Shift+Esc because A) I want to reserve Ctrl+A for "Select All", and B) I think I'm going to bind Esc to a new animation tool, that is like the default tool.

W and Q toggle in interesting ways. Shift+W toggles too, in a less interesting way. By which I mean that pressing W when already in wireframe mode pulls up the last used mode, so it bounces back and forth, defaulting to texture mode. Q is for "quad" and toggles the view-panels likewise. It defaults to single view, in case you start in quad view. Shift+W is just the render option to draw wireframe over the perspective view. It toggles it, so the result is pretty much the same a W is for ortho.

The rest are straightforward. Not everything needs binding, but as is MM3D is inadequate for real work. It needs as many defaults as possible. This is just a start.

EDITED: My config variables are not necessarily the same as Misfit/Maverick's. These values can't be copy-pasted IOW.

EDITED: Added Shift+F for back-faces.

m-7761 commented 4 years ago

I've added Shift+F to render back-faces (not to hide) with the standard toggle feature for checkboxes.

m-7761 commented 4 years ago

Update: I've posted my full keycfg file, since I've wrapped up work, and yesterday spent a lot of time assigning functions to keys.

There are notes in the original post, with more details, but the major differences is I've changed Move to use T for translate, and so assigned M (for Move) to the UV editor. Ctrl+M is the materials editor, both deal with textures mainly. I found M too out of the way. But I think eventually there needs to be a 3D widget like most modeling software have. I think the functions will remain separate.

The vertex drag function became Shift+T. I had assigned it to D for drag. That is a very useful tool when it corrects the UV components. MM3D's doesn't do that yet.

I've assigned these in my code. It's not just my personal keycfg settings. How MM3D is designed it needs shortcuts, because it's not ergonomic. I've tried to make it more ergonomic by adding functions for swapping the viewports and I have my tool parameters to be left, right, or center aligned, depending on where the mouse is when the tool is selected. I started out with letting Shift+Space change the alignment (Ctrl to center) but later realized it's easy to automatically go by the mouse. I've adopted a mouse+keyboard stance, so things open/happen generally on the mouse.

F2 (unlisted) navigates to the tool parameters. F3 to the sidebar position field, and F4 opens the view drop-down menu, after which a letter can select by name. F5 and up are assigned to shape creation tools, etc. Z and X are exceptions. F11 (unlisted) toggles fullscreen. Not much better than maximize.

I've added a 2 Views mode that uses the last selected 2 View layout. Those are selected with Shift+1, 2, 3, 4. 1 is single view. Q is 2x2. I've removed the rest, except 3x2, that uses Ctrl+Shift+3. All of these technically toggle the previous view, but that's mainly for Q. Nearby Shift+Tab and Shift+Q swap viewports. That's the most of it. Tab toggles a new non-tool, that is a little like Blender's editor toggle. Space toggles between the last two tools. The "non-tool" isn't considered a tool for this purpose.

I reordered the menus somewhat. I tried to match the default shortcuts layout when possible. For example, Rotate before Move, since R is to the left of T on the keyboard. I plan to implement multiple shortcuts per function when I get around to a preferences screen.

m-7761 commented 4 years ago

EDITED: I've once again updated (and cleaned up) this list, removing some junk duplicates and unassigned functions. The impetus is I made a big change to remap the Home key function to E. I thought it worth it since after doing tests with the Home key even though Blender uses these keys, I found it too cumbersome to take my right hand off the mouse to frame the selection. The alternative is to zoom in (with a wheel) but MM3D's zoom needs work to center on the cursor.

Blender's function recalibrates its sense of scale when it does this. So it's often useful even when not required to zoom. I called it E for "Enhance" instead of Frame. E is in a cluster of keys that are convenient for editing. E might be reserved for Edge selection, but actually all of the selection shortcuts are clustered around the middle of the keyboard: CFVGB ... except OP is out of the way, but those are points/projection, so that's fine. As such I think if Edge were added it would be better to be something like Shift+C.

I added a lock function with Ctrl+E for keeping the view grids lined up, and had to change an earlier assignment to E (Edge Turn?) to something else. As a result I made the following additions:

cmd_invert_normals=N
cmd_edge_turn=Ctrl+Shift+F
cmd_edge_divide=Shift+D
cmd_subdivide_faces=D

Ctrl+F is not taken, but I felt it too close to Ctrl+D (duplicate) for comfort.