Commit Graph

376 Commits

Author SHA1 Message Date
9633d198fb solidify from 2.4x (ported from python to C)
- shell_angle_to_dist() was using degrees
2009-12-14 23:35:13 +00:00
9358af05d0 rename operators TFM_OT_* --> TRANSFORM_OT_* 2009-12-10 10:36:32 +00:00
4b2163c1cc Text change: Loopcut -> Loop Cut 2009-12-06 17:36:27 +00:00
cd154da973 1. Extend option for 3d view border select now does something (default True to keep same behavior)
2. Add action parameter to Select_All_Toggle operators, rename to Select_All.
Options are Toggle (default), Select, Deselect, Invert (same as select swap). This makes it possible to map separate hotkeys for select all and deselect all.

NOTE for Aligorith: I didn't change animation operators for select_all which already had an Invert operator. These should be fixed eventually.
2009-11-29 22:16:29 +00:00
d1f314a217 New CLICK event value. If RELEASE is not handled and last event was PRESS of same type, redo handlers with CLICK value (this means you can "click" key events too).
Leftmouse+Ctrl to extrude now mapped to Click instead of Release. Release was used to avoid conflict with lasso, but it isn't safe with modal operators that use Press to confirm (subsequent Release then extruded). Click is semantically closer to what we want here.
2009-11-23 16:24:28 +00:00
0e165c55bb did math lib conversion, equivilent to merge with trunk/2.5 at r24464 2009-11-23 14:41:22 +00:00
8e76e2d09c * Re-implemented/refactored 3D View hooks menu.
Now shares the same operators as the modifier buttons, works context-sensitive, and uses Python menu too.

* Cleanups/tweaks in 3D View vertex group menu
2009-11-22 06:20:56 +00:00
605e6850c2 Vertex Groups Operators:
* Added Ctrl-G hotkey back for displaying a menu showing the available Vertex Group operators

* Added descriptions for a few Vertex Group operators. The difference between "normalize" and "clean" isn't that obvious from just reading the code, so perhaps some attention to this is needed.
2009-11-19 23:39:19 +00:00
7f42b10d0f Support for grab cursor in macro system (and vice versa).
This may result in cursor being grabbed twice (though we don't have any macro that can do this at the moment). If this is a problem, a check can be added.
2009-11-19 19:27:10 +00:00
7b05c9ca30 Fun stuff with macro
Make macros work with more than one modal operator and mix of modal and invoke/exec

As a proof, brought back loopcut + edge slide in a single macro operator called Loopcut and Slide, replacing Loopcut as assigned to Ctrl-R.
2009-11-17 22:19:48 +00:00
c07dde45a2 Macro for extrude along normals with a poll function to restrict it to face select.
Added before "free" extrude in the keymap means it's picked up first when applicable.
2009-11-17 20:40:39 +00:00
4076572874 [#19760] Extrude + Continuous Grab doesn't work
Flag macro as blocking

Make macro copy operator flags when one of them returns MODAL (these flags are needed by the event system)
2009-11-17 16:48:43 +00:00
df0f1d53b8 new function WM_keymap_add_menu(), similar to WM_keymap_add_item() except it takes a registered menu. the key will then trigger this menu. 2009-11-17 15:29:55 +00:00
20043a0fc0 add hook in vertex and control point menu's, Ctrl+H
TODO's
- add for lattice
- break up add_hook
- add other hook operators
2009-11-16 13:59:27 +00:00
b17964af11 temp disable fix from r24541, constrains extruding verts 2009-11-13 10:53:58 +00:00
206563241c Bugfix #19871: Extrude does not extrude on normal anymore
Just moving some old commented-out code over from the invoke() callback for extrude to the macro operator.
2009-11-13 01:26:13 +00:00
37e4a311b0 Math Lib
* Convert all code to use new functions.
* Branch maintainers may want to skip this commit, and run this
  conversion script instead, if they use a lot of math functions
  in new code:
  http://www.pasteall.org/9052/python
2009-11-10 20:43:45 +00:00
2ead17843c merge with trunk/2.5 at r24378 2009-11-07 23:10:18 +00:00
cfa4f3222a ctrl-alt-leftclick for adding new geometry works, but blocks zoom. we have got to fix this in 2.5. also made dissolving a 2-valence vert leave an edge behind. and fixed a bug or two. 2009-11-06 12:59:58 +00:00
aec92ddc51 operator to select pos/neg verts on any axis relative to the active vertex
- useful to select the center verts of a model without having to attempt to border select
- useful for selecting one half or a model
2009-11-05 18:29:48 +00:00
593b5b8852 disable experimental pinning feature 2009-11-04 10:49:42 +00:00
65f92c893e - remove UV mapping operator, call a header menu directly (so python can add items there)
- forgot to move bpy_sys.py last commit
2009-11-03 18:20:03 +00:00
072a39004e - "selected_pchans" is now at screen level context (not just view3d) so can use for adding bones to a group.
- separate assign to Y key rather then Ctrl+4
2009-11-02 17:24:06 +00:00
2d0d4e7de4 commit before doing some hefty shapekey change, will break compilation 2009-11-01 00:06:53 +00:00
d160891c36 Shape Propagate to all back in vertex menu 2009-10-27 15:40:56 +00:00
8f788c64db merge with trunk/2.5 at r23876
[[Split portion of a mixed commit.]]
2009-10-22 23:22:05 +00:00
9a00cc55c1 - editmesh select mirror (in editmode select menu)
- weight blending (Vertex specials menu), currently blends from surrounding unselected verts (nice for blending edge loops), but will eventually support face mask mode.
2009-10-20 16:31:03 +00:00
631fbf88e8 Consolidate tube and cylinder primitives.
Removing old add tube operator and replacing it with add cylinder. The resulting operator is called add tube, since that's the name in the menu. Other people can debate about the name and change it later if they feel like it.
2009-10-19 19:16:15 +00:00
55e6aa77c4 Removing MESH_OT_vertices_transform_to_sphere.
This operator was a port of the old ToSphere button that worked only around the cursor.

To Sphere transform (Alt-Shift-S) can already do it around cursor if pivot is set to that, can be used interactively and work on more data types, so this is unneeded.
2009-10-18 02:55:30 +00:00
adba1c302d Reverting revision 23913.
Actions on press is used everywhere in Blender, lets not make an exception here because there's something missing in the event system.

Bug report and potential solution is here, if anyone wants to have a go at it: http://projects.blender.org/tracker/index.php?func=detail&aid=19510
2009-10-18 02:45:05 +00:00
babf9b2d88 Another attempt to fix the problems with confirming transforms while snapping (LMB confirm, CTRL-key still held for snapping) and "ctrl-click" extrusion.
Made the confirm keymap for transforms use KM_RELEASE instead of KM_ANY (I didn't see any case where this failed yet?), and restored the "ctrl-click" as it was before r23903
2009-10-18 02:15:55 +00:00
9d98b48925 Temporary remap extrude to Ctrl+Alt+Click, to avoid conflict with transform. 2009-10-17 14:45:49 +00:00
59f330cce0 Add back Blend From Shape in mesh edit mode. 2009-10-16 10:05:58 +00:00
3b805af8af Various warning fixes 2009-10-13 19:02:30 +00:00
edfe78aec9 Context operators for adjusting context values directly to avoid adding operators for adjusting single values which also need duplicate notifiers.
wm.context_set(path="scene.tool_settings.someattr", somevalue)
wm.context_toggle(path="scene.tool_settings.somebool")
wm.context_toggle_values(path="scene.tool_settings.some_enum", value_1="somevalue", value_2="othervalue") # switch between 2 values
wm.context_cycle_enum(path="scene.tool_settings.some_enum", reverse=False)

the path value is taken from the context so the full path is 
context.scene.tool_settings...

This means in keymaps you can cycle draw modes, change PET- anything with rna access.
If its not so nice to map keys to operators like wm.context_set we could use macro's to wrap it and have its own name

Use this for PET and setting pivot options

- Made userpref key shortcut Ctrl+Alt+U since its not used in 2.4x
- added pivot_point_align (Alt+Comma)
- added PET wasnt rna wrapped correctly.
2009-10-13 15:30:19 +00:00
8f25c0a799 moving textures up and down didnt move the material flag, made editmesh skin Ctrl+Alt+F 2009-10-13 08:55:11 +00:00
d2e1e0d2a9 remove C specials menus, reuse python ones from the header menu instead. 2009-10-12 21:06:03 +00:00
e36003e8e7 macro's can set options for the operators they execute
changed extrude, rip and duplicate to disable proportional editing however this gives a different problem now.
Commented in transform.c
 // XXX If modal, save settings back in scene

this changes disables the option whenever the macro used used.
2009-10-12 12:54:08 +00:00
a3f6b0ed00 - add torus back from 2.4x as an operator
bpy.ops.mesh.primitive_torus_add(major_radius=1, minor_radius=0.25, major_segments=48, minor_segments=16)

- experemental dynamic menus, used for INFO_MT_file, INFO_MT_file_import, INFO_MT_file_export and INFO_MT_mesh_add. these can have items added from python.
eg.

- removed OBJECT_OT_mesh_add, use the python add menu instead.

- made mesh primitive ops -  MESH_OT_primitive_plane_add, ...cube_add, etc. work in object mode.

- RNA scene.active_object wrapped

- bugfix [#19466] 2.5: Tweak menu only available for mesh objects added within Edit Mode
  ED_object_exit_editmode was always doing an undo push, made this optional using the existing flag - EM_DO_UNDO, called everywhere except when adding primitives.
2009-10-10 21:23:20 +00:00
3ebd58673f Key Configuration
Keymaps are now saveable and configurable from the user preferences, note
that editing one item in a keymap means the whole keymap is now defined by
the user and will not be updated by Blender, an option for syncing might be
added later. The outliner interface is still there, but I will probably
remove it.

There's actually 3 levels now:

* Default builtin key configuration.
* Key configuration loaded from .py file, for configs like Blender 2.4x
  or other 3D applications.
* Keymaps edited by the user and saved in .B.blend. These can be saved
  to .py files as well to make creating distributable configurations
  easier.

Also, user preferences sections were reorganized a bit, now there is:
Interface, Editing, Input, Files and System.


Implementation notes:
* wmKeyConfig was added which represents a key configuration containing
  keymaps.
* wmKeymapItem was renamed to wmKeyMapItem for consistency with wmKeyMap.
* Modal maps are not wrapped yet.
* User preferences DNA file reading did not support newdataadr() yet,
  added this now for reading keymaps.
* Key configuration related settings are now RNA wrapped.
* is_property_set and is_property_hidden python methods were added.
2009-10-08 18:40:03 +00:00
d4a9660b99 part 1 of vkey rip tool. still needs more work. ugh, doing this tool correctly is a nightmare. 2009-10-07 21:19:58 +00:00
18e54b1ee8 missing Del key in the keymaps where Xkey was used 2009-09-28 12:33:52 +00:00
83c3780d8c Quick tweaks to commonly debated mesh-editing hotkeys:
* Loopcut is now just Ctrl-R. 
The preview will be activated when you do this, and you can just click to confirm as in 2.4x and also like when this was activated from the toolshelf. This is less error prone than having to click at the same time as picking the loop as with the previous hotkey.

* Knife is now just: hold k-key and lmb click+drag to draw a cut line and cut the mesh.
This is more direct than the (rather arcane) Ctrl-X-LMB-drag, and is quite similar to what's done for Grease Pencil now.
2009-09-25 01:43:34 +00:00
e2a7168e96 fly mode back as a modal operator view3d.fly
- access with the F key, Ctrl+Alt+F in editmode, View->Navigation menu
- camera, perspective & 4split (perspective view only)
- uses modal keymap, (same as 2.4x).
- bugfix since 2.4x, when flying upside down, turning left/right was inverted.
- bugfix for "Align Camera To View", was using deprecated v3d->ofs rather then rv3d->ofs, fixed for NDof fly too. checked v3d->ofs is only used in readfile.c

Todo
- Warping the cursor removed in 2.5, no way to place the cursor in the middle of the view.
- Adding keyframes while in flymode to record the path is missing.
- Not getting MMB mouse release events (used for pan). need to look into why.
2009-09-23 11:26:16 +00:00
930542540a Make edge slide a proper operator
Clean up a couple of things in transform (PET settings, custom data, ...)
2009-09-22 20:16:56 +00:00
b1d4d75aab brought back edge slide. 2009-09-22 08:41:03 +00:00
c75e1598dd vertex color rotation and reversing/shortest vertex path 2009-09-20 18:18:40 +00:00
69e919530e Keymaps now have a poll() function, rather than adding/removing
their handlers based on notifiers, which is simpler and more
reliable.

This fixes for example editmode or uv edit keymaps not working
when creating a new 3dview or image space.
2009-09-17 21:36:02 +00:00
deebf4f8f0 merge with 2.5/trunk at r23271 2009-09-16 17:43:09 +00:00
e03b8b7be7 loopcut tool. hold down ctrl-r, then leftclick. due to current limitations on operator design, there isn't any built-in edge sliding to this tool. 2009-09-16 09:55:06 +00:00