Commit Graph

146 Commits

Author SHA1 Message Date
f743b583bf more lint includes
Only source/blender/editors/ dir, should not give errors on different platforms
Only removing:  UI_*.h, ED_*.h, WM_*.h, DNA_*.h, IMB_*.h, RNA_*.h, PIL_*.h
2010-03-23 14:09:09 +00:00
1e9bf0cfdb spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text) 2010-03-22 09:30:00 +00:00
5e7b1bde8d Hack to make people stop bugging me.
Working around a problem in a work around for holes in the operator API and event system.
2010-03-19 03:26:31 +00:00
ae6ee27d37 Fix #21619 and #21613: edge loop delete crashes, after recent transform
manipulator ctrl+click increment fix.
2010-03-15 20:22:05 +00:00
cbe776655a transform: Ctrl-Click on manipulators uses increments correctly. 2010-03-14 19:38:36 +00:00
9b660f3425 [#21523] Drag Immediately only working when "Select With" is set to LMB
Partial fix. Check lauch event if left or right mouse.

Also added a bug fix for manipulator (sometimes, type = 0)
2010-03-14 18:58:14 +00:00
70efb8d322 [#21433] Angular rotation snap issue, final value set is not snapped - SVN 27250 and 2.50A1
Proper fix for this. Moving special mouse input stuff to custom callbacks (this also makes the per transform main functions a bit cleaner).

It also fixes the operator property (value) for shear and warp.
2010-03-09 01:19:32 +00:00
1138214a8c commit from r27250 to fix bug #21433, broke local axis rotation for pose bones and objects.
commented fix and reopened report.
2010-03-08 11:47:43 +00:00
8a4f9ef831 [#21433] Angular rotation snap issue, final value set is not snapped - SVN 27250 and 2.50A1
Needed to reassign calculated rotation into the values vector.
2010-03-07 15:36:52 +00:00
9352c9f0c1 use negate_v3 rather then multiplying a vector by -1.0 (no functional changes) 2010-02-26 09:02:52 +00:00
a8d364ce4a Move increment value into numinput structure.
Easier for transform to have different values per transform then (also different from gears values).

(Based on a bug reported by Jonathan Smith)
2010-02-22 23:25:34 +00:00
438b93dccc [#21265] Rotate behaves wrong with constraints
With new axis var for rotate, it wasn't reset properly when constraints are turned off.
2010-02-21 14:13:20 +00:00
ddc0c68a5c Bugfix #21234: Autokey "insert only available" userpref inserts keys for all bones in an armature
-- 

Bugfix: When autokey is enabled, notifiers to refresh the animation editors *after* transforms finished for objects were missing.
While I understand the need to limit these to not doing this during transform, after transform, this lead to lag/inconsistent UI problems.

-- 

* Added 'Damped Track' Option to 'Make Track' Operator
* Improved the code of the 'Clear Track' operator to include other types of tracking constraint too
2010-02-21 11:42:32 +00:00
aa67aa9ecc Split numinput from transform (reusable in other operator).
Use in marker move operator.
2010-02-20 20:29:09 +00:00
1d914556f8 Missing flag to Curve Shrink Fatten transform 2010-02-16 01:42:34 +00:00
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
9916e0193c New Transform 3D view recalculate scheme.
Only recalculate changes when absolutely necessary (mouse move triggers a soft recalc that will only happen before the next redraw other events trigger hard recalcs). The problem was that mouse moves are reported as lots of events (with small dx,dy) between each redraw which would trigger often heavy recalculations every time while only the last one was really important (the one before the redraw).

This makes snap project (retopo) much more manageable but induces a very small lag equal to one refresh cycle. Confirming transform does a hard refresh, so the final result is always consistent with mouse position.
2010-02-03 21:01:41 +00:00
3937ed3050 Tweaks for Animation Editor Translations:
* 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
2010-01-27 09:42:17 +00:00
4907e8df20 Remove unneeded notifier data added in revision 26219.
Fix a lot of notifier calls to stop abusing ND_TRANSFORM and use more appropriate data flags.
2010-01-25 19:42:33 +00:00
c74440f198 Use modal keymap events for transform numinput increment and decrement 2010-01-25 17:48:02 +00:00
351d239ac7 View3d transform was sending a too-general notifier to redraw, causing several animation editors and the property editor to redraw too, which can really slow things down. added a more specific ND_VIEW3D_TRANSFORM notifier to solve this. 2010-01-24 04:26:01 +00:00
52858b7e66 [#20700] Transformation Increments
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).
2010-01-21 22:20:49 +00:00
b6421418e4 Fix input issue with Time Scale (center2d needs to be specially calculated for that transformation). 2010-01-18 22:21:32 +00:00
1e983a9318 DopeSheet Keyframe/NLA Strip Scaling Tool:
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?
2010-01-18 00:45:33 +00:00
0525829735 transform:
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).
2010-01-04 20:49:42 +00:00
d98811d414 mmb only cancels constraint if mouse isn't moved (was broken since early 2.5 code, selection code needed to be earlier in event handling). 2009-12-29 21:20:46 +00:00
c947fbe43d Bugfix for [#20511]
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.
2009-12-29 20:44:51 +00:00
280a1d09f6 Partial fix for [#20166] Snap to grid issues
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).
2009-12-27 18:09:17 +00:00
90e9aee9b8 Sequence Slide transformation (easier to do special sequence code there than 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).
2009-12-21 17:23:44 +00:00
4d32e002ed [#20441] 3D manipulator widget problem
calculateTransformCenter function passing event to transform init when it shouldn't have.
2009-12-21 15:37:19 +00:00
a1b8f16958 Bugfix: [#20406] reapeat duplication along axis+view transform orientation
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.
2009-12-17 17:34:56 +00:00
2c3eb59f0f A few KeyingSet + Transform Tweaks:
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.
2009-12-14 03:20:17 +00:00
9358af05d0 rename operators TFM_OT_* --> TRANSFORM_OT_* 2009-12-10 10:36:32 +00:00
1962afa2a6 Use custom cursor draw in transform to draw the new arrow cursors (to 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). 2009-12-07 18:10:11 +00:00
e4a97d67b6 Make toggle and hold snap method cohabit nicely.
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.
2009-12-03 19:18:00 +00:00
63fc267929 [#20213] Align to Transform Orientation crashes Blender
Align needs to be call with region context.

Also added checks to prevent this from crashing if not called properly.
2009-12-02 19:59:57 +00:00
9f251ce301 Additive snap for Transform. Easy snapping between two vertices, in the 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.
2009-12-01 18:26:18 +00:00
168fe0b4b5 Transform Modal Map:
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).
2009-11-30 20:20:00 +00:00
ae16f46573 Fix CLICK event for modal operators.
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.
2009-11-29 16:49:26 +00:00
74715d00cc First changes to implement the 2.5 snapping proposal (discussed back in May 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.
2009-11-26 19:47:55 +00:00
102f57ef26 fix for crash, Aligorith can you check if this is correct 2009-11-26 17:17:13 +00:00
7f151b0dc6 Custom Ratio mouse input didn't check for initialization properly, which could lead to NaN values with edge slide.
Also adding missing modal keymaps for some transform operators.
2009-11-18 17:14:56 +00:00
d0c1d182e9 Bug: [#19712] Manipulator widget missing functionality
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).
2009-11-12 19:49:26 +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
7fad20eff8 Fix #19533: Autoupdate check box not working for UV/Image Editor. 2009-11-04 09:22:16 +00:00
69feedf139 Object PET works with autokey.
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).
2009-11-01 02:52:38 +00:00
ea8c41bf54 Resizing didn't handle PET correctly for size attributes (position was ok, that's why it worked alright in edit mode). 2009-10-31 02:54:27 +00:00
1c1659eb28 - Right click menu can open links directly to API reference docs (rna and operators)
- 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)
2009-10-27 02:54:25 +00:00
6565193523 Revert multiplication order change from revision 23692
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).
2009-10-26 19:50:07 +00:00
359a3d1811 Two fixes:
* 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.
2009-10-22 03:12:44 +00:00