Age | Commit message (Collapse) | Author |
|
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).
|
|
in a generic transform)
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).
|
|
Disable manipulator drawing during transform
|
|
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.
|
|
|
|
indicate direction of motion for a particular transformations). This insures that it's drawn under the cursor and not far away when cursor is warped (rubber band still points to event location, this helps visualize too).
|
|
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.
|
|
middle of three faces, ...
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.
|
|
is not using euler orientation (Normal is bone axis for pose and Local axis for object, so this is more useful than defaulting to Global).
|
|
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.
|
|
and recently on IRC).
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).
|
|
Fix bug in previous code: passing 3x3 matrix to a function expecting a 4x4 (warnings are for something)
|
|
- In 2.4x this was numpad *, however that would only align on the Z axis.
- New behavior for VIEW3D_OT_viewnumpad, holding Shift with Numpad 1/3/7 sets the left/top/front etc on the normal axis.
- Uses active bone, face, edge, vert, curve handel & object (just like the view manipulator with 'Normal' selected).
|
|
least its more clear whats going on.
- Made RotOrderInfo use a vector rather then i/j/k
- Added gimbal_axis to transform.h (was extern)
|
|
* 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.
|
|
Lock vertice near the middle (|x| < 0.0001) on the mirror's plane.
Don't propagate transformation across mirror plane (this could probably be smarter)
|
|
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.
|
|
* Added a new option for Auto-Keyframing which makes it only insert keyframes for the items included in the active Keying Set.
This only works for Transform Auto-Keyframing so far (other tools will get it added later). The option is disabled by default.
* Fixed bug where adding an 'entire' array to some KeyingSet would only start from the index of the button that the mouse was over at the time
* Made some UI tweaks for Keying Sets buttons (still heaps of missing options there).
|
|
was selected as user orientation (frankly, I don't like it much to have an exception for that, but backward compatibility is ok, unless someone else has a strong argument against).
|
|
Create new orientation is now Ctrl-Alt-Space (Alt-Space is select orientation and the old ctrl-shift-c is taken by add constraints).
New orientation panel in 3d view sidebar (nkey) has operator buttons for select, create and delete. Eventually, this should become a list.
Note that orientation operators are missing notifiers to properly redraw the 3d view and its header properly.
|
|
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.
|
|
Clean up a couple of things in transform (PET settings, custom data, ...)
|
|
|
|
Like Vertical or Horizontal ratio input, but along a line defined by two points on screen.
|
|
* All tools where rotation order matters for armature bones have now been adjusted to use the new code
* Transform now uses the new code for bones too. However, there are some jumping issues here that I'm not too sure how to solve yet. Help fixing this is welcome.
|
|
Modal keymaps.
I've tried to make it as simple as possible, yet still using sufficient facilities to enable self-documenting UIs, saving/reading in files, and proper Python support.
The simplicity is: the 'modal keymap' just checks an event, uses event matching similarly to other keymap matching, and if there's a match it changes the event type, and sets the event value to what the modal keymap has defined. The event values are being defined using EnumPropertyItem structs, so the UI will be able to show all options in self-documenting way.
This system also allows to still handle hardcoded own events.
Tech doc:
1) define keymap
- Create map with unique name, WM_modalkeymap_add()
- Give map property definitions (EnumPropertyItem *)
This only for UI, so user can get information on available options
2) items
- WM_modalkeymap_add_item(): give it an enum value for events
3) activate
- In keymap definition code, assign the modal keymap to operatortype
WM_modalkeymap_assign()
4) event manager
- The event handler will check for modal keymap, if so:
- If the modal map has a match:
- Sets event->type to EVT_MODAL_MAP
- Sets event->val to the enum value
5) modal handler
- If event type is EVT_MODAL_MAP:
- Check event->val, handle it
- Other events can just be handled still
Two examples added in the code:
editors/transform/transform.c: transform_modal_keymap()
editors/screen/screen_ops.c: keymap_modal_set()
Also: to support 'key release' the define KM_RELEASE now is officially
used in event manager, this is not '0', so don't check key events with
the old convention if(event->val) but use if(event->val==KM_PRESS)
|
|
now refreshes the 3d-view in realtime.
For now, this directly sets the update flags, though this really should be calling the Depsgraph API instead.
|
|
* Text window font size now supports full range 8-32, instead of
just 12 and 15. I added BLF_fixed_width to get the character
width of a fixed size font.
* Buttons do undo push on change again.
* Animated/Keyframe/Driver colors are now themable, with blend
value to blend with original color. Set this to 0.5 now to
give colors less constrast.
* Fix tooltip popping up with RMB menu open, and missing redraw.
* Autokeyframe now works for buttons.
* Driver expressions can be edited in place in a button now.
(still some refresh issues).
* Also made python driver default for the Add Driver function
in the RMB button. This way you don't have to open a Graph
editor if you just want to type an expression. Also, the
default expression then is the current value.
* Tooltips now show some extra info, not sure what is good to
have, but currently I added:
* Shortcut key for operator buttons.
* Python struct & property name for RNA buttons.
* Expression for driven values.
* Value for text/search/pointer buttons.
|
|
Made transform confirm or cancel on mouse up. More inline with button clicking and better for tablets.
Add operator params to make sure Rip and Extrude turn off PET and Mirror correctly.
Note: sorry for all the whitespace changes, I need to reconfigure this editor not to do autocleanup.
|
|
21330 to 21469
|
|
* Rename BIF_transform/retopo.h to ED_transform/retopo.h
for consistency.
* Move MESH_OT_duplicate_add to editmesh_add.c.
* Remove some code from BIF_gl.h which is not needed there
anymore.
|
|
Brought back the basics for transform manipulators. Martin will
hook it all up to new transform system.
Some notes:
- Still uses G.moving
- BIF_do_manipulator() is called as a View3D Operator
I've tested selecting handles, added a print to confirm
- BIF_GetTransInfo() returns a dummy struct now, just to get
it running.
- Marked some other issues with XXX
|
|
Recoded the Transform code for NLA-Strips so that they can now be moved between strips and will not get truncated when they get moved into other non-moving strips.
Todos:
* The current code for moving strips between tracks is buggy (only goes up, and has a tendency to move up without being told to)
* Auto-snapping doesn't work yet...
|
|
21073 to 21145
|
|
* Moved proportional edit, snap, autokey mode, and a few others
from Scene to ToolSettings.
* RNA wrapped properties in ToolSettings for the UV editor:
proportional edit, snap settings, selection modes.
|
|
This commit restores transform support for NLA. Grab, scale, 'extend', and tweak (i.e. grab by just click+dragging) are implemented.
Notes:
- As soon as one end of a strip touches another adjacent strip (within the same track), that end stops moving. This has been done to avoid the situation where overlapping strips within the same track (which is not allowed) might be caused by transforms.
- Made some changes to the RNA setters for the strip extents so that the validation above could take place (and other necessary changes on a per-strip basis could also occur).
TODO's ?
- Strips cannot be transferred from track to track using transforms. I've yet to decide whether this needs to be done, or whether a separate operator will suffice.
- What happens to the range of Actions used when the strips change sizes unexpectedly (i.e. the no-overlap condition above)? Currently range stays the same, but this doesn't always seem desirable?
|
|
Transform helpline and experimental drawing code to indicate direction of motion for specific transformations.
|
|
-r19323:HEAD
Notes:
* blenderbuttons and ICON_SNAP_PEEL_OBJECT were not merged.
|
|
Rotation, since those are the one ones that support it).
|
|
Don't access RegionView3D if region is of the wrong type.
Correctly draw extra transform stuff (like snap and pet circles) in multiple 3d regions.
|
|
stair-stepped using the sampling code.
|
|
extracting params in split transform operators.
work in progress still, but lots of fun with operator replay (F6)
|
|
Auto-Keyframing does not work anywhere else yet, and probably won't for a while.
|
|
Made 'select-tweak-grab' work in 3d window, fcurve and nodes.
For nodes it works with both left/right, the others follow
user preset for select.
Tweak is a WM event, which also follows user preset for
tablet-style tweaks (release = apply).
You enable tweak events with an operator WM_OT_tweak_gesture.
Keymap entries can assign to left/middle/right button or to
action/select button tweaks.
|
|
I've ported the transform tools for this editor as they existed in the AnimSys2 branch (minus some of the experimental pivot options which were not useful enough yet).
Hotkeys are:
* GKEY - transforms points as always
* RKEY - rotates points (only useful for a single 'knot')
* SKEY - scales points
* EKEY - like in the DopeSheet, the 'extend' translation tool only moves all the keyframes on the same side of the current frame indicator as the mouse
Useful tweaks ported from AnimSys2 include:
* Auto-snapping is on by default for time-values on the keyframes only. Handles are not snapped (or shouldn't be).
* Rotating/Scaling new keyframes using default handles (i.e. Auto-Handles) now works, as the handle is now converted to aligned so that changes can be seen.
|
|
too.
|