Age | Commit message (Collapse) | Author |
|
Some more compiler warning fixes. Some of these seem to be specific to GCC 4.1
|
|
little nicer for everyone.
Patch provied by gsrb3d
bug tracker #7061
Kent
|
|
- Removing evil InitTransModeFlags (I would always forget to update that when adding new stuff). It's properly done in the per transform init now.
- Add toggleable mode for Shear (with MMB) for horizontal or vertical shear. Toggle shear mode also changes the input mode from vertical to horizontal and vice versa (it's intuitiver that way). (This was suggested in a really old patch but never implemented because I disliked adding transform specific handling in the main event switch).
- Add custom event handlers per transform (currently only used for Shear)
- Add custom data pointer and freeing flag (only (a)bused by Shear).
NOTE to Levi Schooley: Some stuff in there might be useful for you.
|
|
bone scaling in pose mode
Bone matrix wasn't being applied properly.
There's still a bug left with the translation part of the resize but that is a less frequent situation, so I'll commit this while I figure out a fix.
|
|
* colour -> color
* centre -> center
* normalise -> normalize
* modelling -> modeling
|
|
Added sensible way in calculateTransformCenter to report an error (including empty selection).
|
|
Changed to Orbit around Selection, using transform code to calculate the selection center (using Median center method).
|
|
[ #5833 ] 2.43 RC2: Incorrect Bone rotation when 3D cursor set as Pivot
There's really ugly stuff going on with pose mode rotation in transform which I'll have to fix later, in the mean time, this commit fixes the problem (which happens when you rotate bones in post mode around an arbitrary point) and includes some juicy comments to further document the actual architectural problem.
|
|
Align mode (rotation that only translates the target) didn't work for elements using quats (Pose). Fixed.
|
|
Reverting Aligorith's fix for bug Bugfix #5833 (the fix was incorrect, see bug report for details).
That means the translation part when rotating "free" bones in pose mode is still broken.
|
|
When rotating bones around the 3d-cursor in posemode with a rotated
armature, rotation was around strange points other than the cursor.
This bug has been around for quite a few releases now. Somehow, the
maths used to convert the world/global space locations to local locations
only worked on things in editmode, but not bones.
|
|
Make manipulator compatible with snapping. At first, I thought this would have been a bad idea, but after talking to some people, it seem more confusing than not to have it act differently, so I'm bringing it in line.
|
|
[ #5458 ] Some transforms are not accurate while pressing shift key
Shrink/Fatten & Push/Pull: Shift slowed the transformation but didn't add precision. (integer division. fixed by applying the same solution used in Grab)
Warp: Shift was ignored. Fixed by changing warp to use the same input method has To Sphere. That is, the 3D view acts like a big horizontal slider: Left -> No effect, Right -> Full effect. This is somewhat of a "big" change from how warp used to work but this is more predictable and is not limited by the original position of the mouse pointer. (of course, this works with Shift correctly too).
|
|
Fix for bug [ #5522 ] inaccurate rotation
Entering very high/low values using numeric input in a rotation (+/- 360000 and more/less) resulted in incorrect rotations. Fixed by clamping the actual rotation between -180 and 180 before converting to radians (just to be clear, the clamping already happened and is inevitable, now, it just happens earlier).
|
|
==== Rotation Snap ====
Snap is no longer limited to Translation, it works in Rotation too.
There's some bugs left with rotation snap when using constraints, I'll be ironing that next.
==== Bug Fixes ====
* Fix manipulators to always use Grid.
* Fix initialization bug (took two transform call to do a correct snap init when changing between Grid and Snap)
|
|
(Implementing Matt's idea)
Grid and Snap are now exclusively controlled by the Control key (pun intented).
You can switch to Snap by selecting the snap option in the Transform menu (this option is only available in edit mode on a mesh. this option is per 3D view) (NOTE: There is currently no hotkey for that, anyone should feel free to add one).
When Snap is selected, holding down Ctrl during translations (grab) snaps to vertex.
All other situations which have no snapping code yet defaults to Grid.
|
|
Draw a circle around the snapping point for visual aid.
Different snapping target method, switchable in the 3d view header menu in the Transform menu.
* Closest: Snaps the closest vertex to the point
* Median: Snaps the median of the selection to the point
* Center: Snaps the transform center to the point (this is different from median because you can use Cursor/Boundbox as center)
Fix a bug with constraints/snap handling.
|
|
Modified version of patch #5281 by Joshua Leung.
It's a two part patch:
Add a Roll button in the transform properties floating panel with bones selected in edit mode
Add a Roll transform (Ctrl-R) that can be used to modify the roll of selected bones in edit mode
The transformation modifies the roll of all selected bones incrementally (like a rotation does to the bones' rotation) [that is the part that differs from the patch. The patch would set the same roll value to all bones]
Also, this commit includes some shuffling around of the functions, to keep the previously logical order. :)
|
|
|
|
After using Manipulator on poses, the undopush was called too early,
resulting in a LOCK flag to be saved in Armature.
Effect was that after undo, the pose didn't show actions.
|
|
Embryon functionnality for snapping.
- Only snaps to grid on translations (grab)
- Transform constraints are supported but header display is wrong.
- Can be turned on/off in the Object/Mesh header menu under Transform Properties (tentative spot, will have to integrate better and in other object type menus too)
- Can be turned on/off during transform with ` (Back Quote, also tentative)
This is, of course, very much Work in Progress.
This implements part of the structural ideas for the transform cleanup I've been juggling around with.
|
|
This is a new incarnation of compatible_eul(), a function called:
void Mat3ToCompatibleEul(float mat[][3], float *eul, float *oldrot)
It uses the two euler extraction methods as added by Brecht a while ago,
and checks for compatibility each, and then picks the best of the two
based on minimal difference with 'oldrot'.
Gives for rotation key inserting a much higher hitrate for OK eulers.
|
|
This is a much faster and easier way to give a bevelled curve a taper, without
using taper curves. Each point on a curve now has a 'radius' value that you can
shrink and fatten using Alt S, which will influence the taper when the curve is
bevelled (either with a bevob, or with front/back turned off and a bevel dept
set). Alt S shrinks and fattens the selected points in an interactive transform,
and you can set an absolute radius for selected points with 'Set Radius' in the
curve specials menu.
See demo: http://mke3.net/blender/etc/curve_shrinkfatten-h264.mov
This can be a quick way to create revolved surfaces (eg.
http://mke3.net/blender/etc/wineglass-h264.mov ) and it would be very
interesting to use this radius value in other tools, such as a 'freehand curve'
tool that would let you draw a curve freehand, with the radius affected by pen
pressure, or even using the radius at each point to control curve guides for
particles more precisely, rather than the continous maxdist.
|
|
- pending commit for OSX intel systems, with intel graphics. These now call
an extra swapbuffers after glFlush(). Code is ifdeffed, and doesnt affect
other systems.
- show-off commit: option to have transparent nodes over the composite
result. Only draws Image for active Viewer Node now, and image doesnt
translate nor zoom (which isnt bad though).
Set in themes the alpha color of "node backdrop" to make nodes
transparent.
|
|
destroying part of the transform matrix. Also remove a debigging printf.
|
|
|
|
sees a reference to size, as it pertains to a 3D object, please let
me know.
|
|
Nkey "Properties Panel" now has Dimension ("Dim") buttons too.
This reads from the actual bounding box value to see the size. Note that
dimensions for animated & deformed objects will change per frame.
(Cleaned up buttons layout for patch, and added support for Curve, Text and
Surface objects)
|
|
Old annoyance in Blender; zooming in very far makes scaling/rotate
around invisible pivot going bezerk. The easy fix was just enforcing
floats in integer math.
|
|
Bug #3657
Texture Space transform
* grab/size: did not support local constraints properly
* size: constraint support did not respect object orientation
|
|
Based on a patch by Matthias Derer, this adds the distance moved to a translation (grab) transform
(both 3D and 2D, although the 2D transform displays the normalised distance only).
|
|
only in Face-Select mode. It then uses for rotate and scaling the face
center itself as reference.
Code uses a loop-in-loop to find the face that belongs to the vertex...
means it will be slow with operations on 10k or more faces. Acceptable
for now, will make it nicer later. :)
|
|
- I changed the input method for shear quite a bit. It used to be constant
regardless of zooming, so it was quite limiting in the amount of shear you
could do. However, I'm not sure if the current method is quite well
adjusted, if you think it works too fast, please drop me a line.
It's basicly the same method as Shrink-Fatten / Push-Pull except on an
horizontal basis. (since shear is an horizontal motion and the two others
are more like pulling towards/pushing away from you in regards to the center)
- Factored out the input methods in preparation for later code <evil>.
|
|
It was showing "global axis" even when using MMB to access user defined orientation (with Ctrl).
|
|
Using the MMB constraint chooser in Transform, accidentally printed the
setting from the orientation menu (Local, View, Normal).
Martin: not sure if this a solid fix... the print now looks fine, but the
code isn't nicer this way. :) (just a one liner change though!).
|
|
When using 'protection flags' for XYZ rotations, inserting keys in
Poses resulted in wrong interpolations (doing -270 degrees instead of
+90 for example). This caused by converting quaternion to euler and
back...
Solved it by correcting the quaternion in the end for the rotation
sign of the original quaternion.
NOTE: Pose animators should be aware that inserting rotations keys of
180 degrees or larger will still make the key rotate along the shortest
path.
|
|
While using automatic IK, a pending redraw event could draw the buttons
window again, reveiling the temporal IK buttons. Using them, after grab,
caused a crash.
Also: noticed that the undo push for transform is called too early, so it
saves the state before 'special_after_trans' was called.
Also: in editmode armature, changed shift+A "Bones" in "Bone".
|
|
You now can set, in NKEY Transform Properties Panel, per XYZ rot/loc/size,
a protection for Transform tools to not change these values anymore.
This now works for Objects or for Bones in PoseMode.
Usage is especially for character animation, to give Bones in a Pose
defaults for rotation axes, so you don't have to worry about the correct
limitations (or setup complex IK limits).
Of course, this feature doesn't influence the animation system.
As an extra also the Transform Widgets then draw less handles. Note this
is based on the actual locked value, and depends still on Manipulator
orientation whether it can be used really.
Implementation warning: I had to remove the 'return' in the middle of the
editobject.c compatible_eul() call. It now makes nice compatible eulers
when they're simple (single axis rotations). Unfortunately there was no
note in the code why it was ever removed...
ALso: fix for crash in using Crease Transform and Mirror modifier.
|
|
MMB uses global axis, Ctrl-MMB uses user defined. (Alt-MMB cause conflict with the window manager on linux)
(for hotkeys, first press is global, second press is user defined)
|
|
http://projects.blender.org/tracker/?func=detail&atid=125&aid=3030&group_id=9
It didn't do initgrabz correctly.
|
|
- Trackball rotate was missing the NoConstraints flag
- Zooming didn't recalculate the 2D center correctly
- Zooming in transform was sending event to the 3D window even when working on UVs. (disabled when working on UVs for now, will need to send events to a 2D window handler eventually)
- In camera mode, when the selection was exactly on the camera, initgrabz was barfing, fallback to 1.0 now, which gives ok results.
|
|
PoseMode rotate now also supports "Around individual Centers" for rotating.
|
|
Using new transform code to handle UV window.
With the ground work done, Transform could more easily be extended to handle IPO window now.
Tracker item: http://projects.blender.org/tracker/?func=detail&atid=127&aid=2946&group_id=9
|
|
Press ALT+B in 3d window, draw a rect, and it becomes a clipping
volume of 4 planes. You then can rotate the view anyway you like.
Works for each 3d window individually.
Disable it with another ALT+B press.
Commit is huge because it had to change all selection code as well.
The user-clipping planes are in 'eye space', the other clipping
happens in projected 'viewport space'.
Nice to notice is that the 'x=3200' convention (to denote a coordinate
is clipped) now is a define. Define value is still a number though... but
we now can get up to screens of 12000 pixels without issues!
Known issue; here it refuses to draw the 'object centers' or Lamp icons
within the clipping region. Can't find any reason for it... however, we
might move to non-pixmaps for it anyway.
Testing might reveil numerous issues, will be standby for it.
Curious? Check this http://www.blender.org/bf/rt4.jpg
|
|
For defining the deformation distances of Bones, three values are being
used now. The bone tip and root radius define the bone-shape itself and the
"dist" defines the soft area around it. A full (user) doc is in CMS here;
http://www.blender3d.org/cms/Armature_Envelopes.647.0.html
Note: todo still is allowing both Vertex Deform Groups and these Envelopes
together (and or per Bone).
Also part of this commit is:
- New: Hiding bones in EditMode. This is a separate 'hide flag', so you can
keep the PoseMode hidden Bones separate from EditMode.
(In the future we should do some kind of bone-grouping or so)
- While transform(), the hotkeys G,R,S only switch mode when the previous
mode was compatible. Caused conflicts with Crease/BoneDist/etc.
- Deleting the last VertexGroup now also deletes the entire Mesh 'dvert'
data. Sounds logical, but remember that VertexGroups are partial on a
Mesh, partial on Object. Weird design decision though...
Anyhoo, at this moment the only way to have Bone Envelopes deform, is
by deleting all VertexGroups!
- In PoseMode, the hotkey ALT+S now does both B-Bone size or Envelope,
depending draw type.
- In EditMode, Extrude now also works when only Root points were selected.
- Weight editing is also symmetrical btw, with the "X-axis Mirror" option
set.
|
|
RMB click drag to select and transform (grab). Release to confirm. (Cancel with esc)
The difference with before is that it is a single motion, you don't have to click at the end of transform, you can just release the mouse button.
(Some float constant warning too)
|
|
- Scale goes from 0 (original) to 1 (full sphere) instead of the contrary
- Mouse control is done by moving pointer left / right on screen. Full right is 1, left is 0. There's a 10% width padding on each border.
- Works correctly with Shift modifier now.
|
|
options on the Bone (G, R, S). The manipulator doesn't show btw.
Is usful to get immediate feedback on how painted weights behave with Bones.
Martin; I had to change the T_POSE behaviour in code a bit... it now
stores in TransInfo the actual posed armature being transformed. Maybe,
some day, we'll get mixed posechannel/object transform? Not much required
at the moment though. :)
|
|
*NOTE*: Some UI decision done in this commit will most likely be revised, all flame shall go in /dev/null. Constructive discussions of course welcomed.
This commit merges manipulator orientation selection back in "traditional" transform.
That's how it works:
- The dropdown in the 3D view header is always visible
- The orientation chosen will be used when choosing an axis with MMB and for the *second* key press of X,Y,Z
However, Local orientation doesn't use the one calculated by the manipulator. This is to ensure that multiple object local and armatures in pose still works as before.
- Alt-Space (to change the orientation) works during transform
New Transform orientation: View, using the view axis.
Fixes for the following bugs:
- Constraint projection code "jammed" if input vector was <0,0,0>, reported a couple of times on IRC. Thanks to Basse for the example file.
- Transform on texspace crashed on objects without texspace data (camera, lamp, ...). This was reported in tracker.
- Numinput with lock constraints didn't work correctly. Reported on elysiun
Probably some others that I'm forgetting
I also moved a couple of functions around in an attempt to make things clearer.
|
|
- PoseMode now is a state Armature Objects can be in. So, while in PoseMode
for an Armature, you can just select another Object or Armature.
- The old PoseMode options (transform, insert keys etc) are accessible
with making the Armature Object 'active' (and have object in PoseMode).
- At this moment no multiple Poses can be transformed/edited at the same
time.
- The old hotkey CTRL+TAB, and view3d header menu, still work to set an
Object's PoseMode
It was quite a lot recode, so tests & reports are welcome.
Oh, as a bonus I added Lasso Select for Bones in PoseMode! It selects using
only the line between root and tip of the Bone.
|