* Auto-snapping can now be toggled on/off using Ctrl-Key again. Defaults to turning Nearest-Frame on if no auto-snapping is enabled, since this offers the best snapping behaviour in general.
* Graph Editor's 'Draw Time' option can now be taken into account for increment snapping/stepping
Patch by Jonathan Smith
When using numerical input, up and down arrow keys increment and decrement the value by the transform increment amount (grid for grab and so on).
Scaling behaviour relative to mouse movement was inverted. Made the this transform tool now use the standard input mechanism for scaling inputs so that the behaviour is now correct.
Martin: In my tests, the responsiveness of the scale tool is now not sensitive enough though. If you have some time, could you look into whether this can be made to work a bit freer?
Rotation operator now saves axis of rotation (when not using a constraint). Better for operator redo and tweak (would use a Z axis because of matrix init)
Also fix crash in Translation operator redo and tweak (rv3d is not always available).
Shift-MMB for user orientation constraint selection didn't work for global orientation (the matrix wasn't initialized properly).
Also, MMB can be used to cancel a constraint again.
Move gridview (the actual drawn grid size, including adaptation to zoom) to RegionView3D from View3D.
This solves the transform increment bug but not the Snap Menu bug (context is not set to the correct rv3d when executing operator from menu).
Also make the transform operator creation a bit more automagic (I always forget either operator registration or modal keymap registration, this is all automatic now).
Saving back orientation in operator didn't take into account that constraint orientation can be different than user selected orientation.
Also simplify the switching logic a little.
Autokeying for transform functions now gets context-info, allowing for bone paths to be recalculated.
However, the main purpose of this is to allow KeyingSets to eventually have poll functions.
Shift-Tab toggles the global toolsetting snap settings (both in and out of transform).
Holding down Ctrl inverts the snap setting in transform (turns it on when global snap is off and vice versa).
Ctrl-Shift-Tab to select snap mode (only outside of transform for now).
For old (pre 2.5) behavior, just keep global snap off and use Ctrl.
NOTE: transform modal events for snap have change a bit, saved keymap might not work anymore.
A to add the current snapping point to the list
Alt-A to remove the last one
The resulting snapping point is the average of all snap points in the list (and the one under the mouse pointer, if valid).
Snapping between two verts is a matter of moving over the first, pressing A, moving over the other, confirming transform.
Adding events for X/Y/Z axis and planar constraints (always use the user orientation, not global first) and for turning constraints off.
Built-in keys (toggle between global, user and off) are not in the map but can be overridden (any events handled by the modal keymap will not enter the built-in map).
modal operators should return RUNNING_MODAL|PASSTHROUGH for unhandled events to be able to receive clicks correctly (this needs to be fixed for other modal operators).
Maybe it's time to have "handled" flag in event instead.
http://wiki.blender.org/index.php/User:Theeth/Snapping
The new widget isn't there yet, but the rest works, including:
Increment (gears) is now a snap mode
Ctrl click to toggle snap on or off (in transform and 3d view)
Shift+Ctrl click to select snap mode (3d view only)
Snap status (on/off) is persisted in tool settings, no need to always turn it back on when entering transform.
It's still possible to have something resembling the old system by editing the transform modal keymap to snap on on ctrl press and snap off on key release.
With help from Patch [#19757] by Michael Jefferies.
-------------
Also, following talks with Matt and Campbell, make pressing Ctrl in transform toggle snap/gears instead of having to hold it down.
Important note: holding it down will no longer work correctly because of key repeats (it will toggle it constantly). It's possible to edit the modal keymap to bring back the old behavior (perhaps it should even be default).
* 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
Reordering some function calls in transform cleanup to make it simpler (that means other fixes are possible too, sequencer probably don't need it's own freeing function anymore).
- Generated and uploaded api docs - http://www.blender.org/documentation/250PythonDoc
- Added Edit docs menu item & operators as discussed with Mindrones, Brecht, Stani & Letterip @ bconf, needs some web backend. python operator can aparently use xml/rpc to upload docstrings.
- Added operator invoke function - context.manager.invoke_props_popup(self.__operator__, event)
this calls a popup for invoke by default (which intern calls execute())
- Own recent commit to game framing applied to non-camera views too.
- v3d->persp is deprecated but still used in some places.
- Transforming strips could overlap 1 frame if moving them below frame 0
- Transforming overlapping strips could go into an eternal loop (though overlapping strips should not exist)
The previous order is correct, the new order forced all global scale on local axis (in object mode).
The "problem" with scaling (or mirroring) in object mode along an axis that is not aligned along one of the local axis is that the result has to be decomposed (as best it can by TransMat3ToSize) into scaling factors along local axis. The more axis aligned the object is, the more "correct" it will look, with the worse being a scale along two local axis when the scaling axis is right between them.
One "solution" could be to make all Mirror transform in object mode work on local axis only (but I don't think that would be correct, since it still works correctly on aligned axis).
* RNA Path fixing when renaming data now checks if a path in question cannot be resolved before trying to fix it. This should reduce the number of misindentified cases I hope.
* Silenced compiler warnings for EdgeSlide stuff that mingw was making about unused variables.
* Transform code was not properly fixed to work with the new way that axis-angle data was stored
* The order of the args for the conversion function when switching rotation representations was wrong, causing problems when switching from quaternion to axis angle (i.e. these occurred for newly created bones).
part. This fixes a bug where transform help line drawing would not
work with view clipping and mess up the z-buffer. This avoids the
transform code having to figure out what kind of opengl state is
enabled and disable it temporarily.
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
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
This is similar to the old retopo all option but uses the snapping code and not the openGL depth buffer (it's thus more precise).
Not sure if making it available as a snap option is sensible, this is up for discussion.
NOTE: it will get slow fast on large meshes, we need to plug in an acceleration structure into snapping.
This will need an icon too.
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.
* Compo node backdrop works again.
* Compo node previews and backdrop now get correct color management
float to byte conversion.
* Compo nodes got unecessarily recalculated while moving nodes.
* Fix compo node viewer nodes not getting activated correctly.
* Main compo node preview render computations are now outside of
mutex lock, so better for multithreading.
* Tex node outputs did not work in some files loaded from 2.4.
* Change RNA updates to take into account groups that may be shared
between multiple node trees.
* Make Ctrl+M key work for mirror in 3D view.
* Fix mirror along global axis, was mirroring around all axes when
the object was rotated, due to wrong matrix order, was also not
working in 2.4.
* Pressing e.g. X twice still doesn't go to local mode, would fix
but don't know how the code is intended to work.
This (biggish) commit generalises the rotation modes functionality added for Bones, allowing Objects to use the various Euler Rotation orders, Axis-Angle, and Quaternion rotation representations.
I've also cleaned up the nomenclature of the rotation-related settings so that the naming styles are more consistent with each other. Unfortunately, this will break all files involving object or bone rotation animation made in 2.5 versions (2.4x will still get correctly converted).
General Notes:
* By default, Objects still default to using Eulers, while Bones will use Quaternions by default still.
* I've fixed all areas that I'm currently aware of to work with these changes. However, there are probably a few places where I've missed a few changes (i.e. auto-keyframing will need attention later).
* Removed the old "IPO-Keys" stuff from Transform code. I'm unlikely to restore this in the near future, and trying to fix that to include support for this commit would have been too much work.