Age | Commit message (Collapse) | Author |
|
|
|
- Better use of tolerance to check for elements already on seam
- remove debug printfs
|
|
- Work with multiple mirror modifiers
- Take into accound elements already on the seam properly.
- Use the proper mirror tolerance as limit
|
|
See, in theory, I didn't make typos when coding.
Explanation:
iloc*loc will be negative when the sign changes between them, so we can snap if an element cross the limit.
|
|
It was assuming the real half is always on the positive, which is not true all the time (the mirror modifier doesn't make that assumption).
It incorrecly snapped everything to 0 if the half is in the negative quadrant.
Fix was to do "if (td->loc[0] * td->loc[0] < 0" instead, only snapping if the sign changed.
NOTE: this is all "in theory", as scons is broken, but I'm pretty sure the bug was real and the fix is.
|
|
during Transform to go through the mirror. Note that it is *only* during
transform, and ESC restores the non-clipped positions of vertices.
|
|
- Added (BKE_utildefines.h) POINTER_TO_INT(poin) and INT_TO_POINTER(int)
defines, to help fixing issues with switch to 64 bits systems. This
assumes that a) not more than 16GB mem is used and b) that address
space is below the 1<<35 value. The latter has to be confirmed, but it
seems to conform the current 64 bits generation of OSs (for mallocs).
Needless to say; use long if you want to store pointers! This is for
temporal fixing.
- Added editmesh version for mesh-octree lookups, not used yet.
- Fix: ESC on armature posemode restored the actions, should not happen
- Fix: If in NLA an action was 0 frame long, it caused draw error
- Fix: Click on name in Action Window now activates Bones
- Fix: "Snap to" options in Armature editmode now use X-axis mirror edit.
|
|
- 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.
|
|
Envelope correction for moving bone-points in edit mode didn't reset on ESC
|
|
Best is to forget yesterday's commit and old docs. New docs are underway...
Here's how IK works now;
- IK chains can go all the way to the furthest parent Bone. Disregarding
the old option "IK to Parent" and disgregarding whether a Bone has an
offset to its parent (offsets now work for IK, so you can also make
T-bones).
- The old "IK to Parent" option now only does what it should do: it denotes
whether a Bone is directly connected to a Parent Bone, or not.
In the UI and in code this option is now called "Connected".
- You can also define yourself which Bone will become the "Root" for an IK
chain. This can be any Parent of the IK tip (where the IK constraint is).
By default it goes all the way, unless you set a value for the new IK
Constraint Panel option "Chain Lenght".
- "Tree IK" now is detected automatic, when multiple IK Roots are on the
same Bone, and when there's a branched structure.
Multiple IK's on a single chain (no branches) is still executed as usual,
doing the IK's sequentially.
- Note: Branched structures, with _partial_ overlapping IK chains, that don't
share the same Root will possibly disconnect branches.
- When you select a Bone with IK, it now draws a yellow dashed line to its
Root.
- The IK options "Location Weight" and "Rotation Weight" are relative,
in case there's a Tree IK structure. These weights cannot be set to
zero. To animate or disable IK Targets, use the "Influence" slider.
- This new IK is backwards and upwards compatible for Blender files.
Of course, the new features won't show in older Blender binaries! :)
Other changes & notes;
- In PoseMode, the Constraint Panel now also draws in Editing Buttons, next
to the Bones Panel.
- IK Constraint Panel was redesigned... it's still a bit squished
- Buttons "No X DoF" is now called "Lock X". This to follow convention to
name options positive.
- Added Undo push for Make/Clear Parent in Editmode Armature
- Use CTRL+P "Make Parent" on a single selected Bone to make it become
connected (ALT+P had already "Disconnect").
On todo next; Visualizing & review of Bone DoF limits and stiffness
|
|
- Softbody Mesh didnt update when it was child of armature-posing
- Bone Stick drawing didn't draw selected in Solid + Object mode.
- WeightPaint + Subsurf (nice that it works!) didn't update on Bone
selection
|
|
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
|
|
- Vpaint and Wpaint now use our own custom cursor, this was a very old
plan anyway. It uses the 'knife' now, we need a good brush icon for it!
- On scaling bones in editmode, the deform distance info gets scaled now
too when no "Envelope" draw mode was set.
- Disabled front buffer drawing of objects with CTRL+select in Edit Mode.
Uses a regular redraw now (like for select in Object Mode btw)
|
|
- Modifier Panel, name label for "Virtual" modifiers was too short
- On extrude Bones, "soft distance" now is always set based on length
of the bone (also on CTRL+click, also when Envelope drawmode is not set)
- Added undo-push for "Apply Bone Envelopees to VertexGroup" in WeightPaint.
- Menu-buttons in floating panels sometimes gave drawing error
- InfoWindow buttons were always allocated & drawn, even when window was
zero sized... waste of cpu, tsk!
|
|
- The "Skinnable" option for Bones now is taken into account for the
Envelope drawmode. If not Skinnable, it also doesn't draw the soft
deform area. Maybe bone should be hidden... dunno yet.
- Use CTRL+LMB in weightpaint mode to sample the weight in a mesh.
Note; it returns the weight of the closest visible vertex, not of a
Blended result.
- NKey Panel for Mesh edit now shows a menu with the VertexGroup name(s)
of a selected Vertex, plus the Weight.
Fix:
- while scaling Bone points in editmode (Envelope drawtype), the Bone
root scale was not copied from (or to) the parent tip. This was not
visible (is not drawn) but deform did use it... causing weird errors.
For those who saw this error today: just go into editmode, select all
Bones, press Skey, enter. That fixes it :)
|
|
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.
|
|
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. :)
|
|
- Option is in EditButtons, Armature panel.
- Currently only local X-axis mirror (seems to be default anyway)
- Transform then applies changes to the mirrored-name bone as well.
- Extrude: also does the counterpart Bone
- New: SHIFT+E extrude: extrudes 2 mirrored Bones out of a normal Bone.
(creating names by appening _L and _R)
Or in short: you can now model a full rig without any manual naming!
Of course the names are not too nice... a couple of ideas to explore;
- rename a mirrored bone renames counterpart too
- allow in weightpaint mode to select Bones
- and of course mirrored edit in PoseMode (if that's useful...)
Important note: I tweaked the naming convention a bit; names like
Bone_L.005 and Bone_R.005 are considered counterparts. However, if
you use the "Flip names" option, the number extension is still
truncated.
BTW: Commits in Zr's code are fixes for gcc warnings. :)
|
|
*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.
|
|
children during transform... to make it work, had to trick the nice
depgraph code... <sob> :)
|
|
Meaning, it didn't do polygonizing while moving elements in edit mode.
|
|
|
|
With new system, very easy to do in the end (figuring it out was less so).
No need to go down parent chains or anything of the sort, just apply parent pose and we're all set.
Ton's commit reverted back before my include files cleanup in transform, recleaning.
Also, as mentionned by bjornmose, declaration after instruction choked MSVC. Fixed.
|
|
Aim was to get a total refresh of the animation system. This
is needed because;
- we need to upgrade it with 21st century features
- current code is spaghetti/hack combo, and hides good design
- it should become lag-free with using dependency graphs
A full log, with complete code API/structure/design explanation
will follow, that's a load of work... so here below the list with
hot changes;
- The entire object update system (matrices, geometry) is now
centralized. Calls to where_is_object and makeDispList are
forbidden, instead we tag objects 'changed' and let the
depgraph code sort it out
- Removed all old "Ika" code
- Depgraph is aware of all relationships, including meta balls,
constraints, bevelcurve, and so on.
- Made depgraph aware of relation types and layers, to do smart
flushing of 'changed' events. Nothing gets calculated too often!
- Transform uses depgraph to detect changes
- On frame-advance, depgraph flushes animated changes
Armatures;
Almost all armature related code has been fully built from scratch.
It now reveils the original design much better, with a very clean
implementation, lag free without even calculating each Bone more than
once. Result is quite a speedup yes!
Important to note is;
1) Armature is data containing the 'rest position'
2) Pose is the changes of rest position, and always on object level.
That way more Objects can use same Pose. Also constraints are in Pose
3) Actions only contain the Ipos to change values in Poses.
- Bones draw unrotated now
- Drawing bones speedup enormously (10-20 times)
- Bone selecting in EditMode, selection state is saved for PoseMode,
and vice-versa
- Undo in editmode
- Bone renaming does vertexgroups, constraints, posechannels, actions,
for all users of Armature in entire file
- Added Bone renaming in NKey panel
- Nkey PoseMode shows eulers now
- EditMode and PoseMode now have 'active' bone too (last clicked)
- Parenting in EditMode' CTRL+P, ALT+P, with nice options!
- Pose is added in Outliner now, with showing that constraints are in
the Pose, not Armature
- Disconnected IK solving from constraints. It's a separate phase now,
on top of the full Pose calculations
- Pose itself has a dependency graph too, so evaluation order is lag free.
TODO NOW;
- Rotating in Posemode has incorrect inverse transform (Martin will fix)
- Python Bone/Armature/Pose API disabled... needs full recode too
(wait for my doc!)
- Game engine will need upgrade too
- Depgraph code needs revision, cleanup, can be much faster!
(But, compliments for Jean-Luc, it works like a charm!)
- IK changed, it now doesnt use previous position to advance to next
position anymore. That system looks nice (no flips) but is not well
suited for NLA and background render.
TODO LATER;
We now can do loadsa new nifty features as well; like:
- Kill PoseMode (can be option for armatures itself)
- Make B-Bones (Bezier, Bspline, like for spines)
- Move all silly button level edit to 3d window (like CTRL+I = add
IK)
- Much better & informative drawing
- Fix action/nla editors
- Put all ipos in Actions (object, mesh key, lamp color)
- Add hooks
- Null bones
- Much more advanced constraints...
Bugfixes;
- OGL render (view3d header) had wrong first frame on anim render
- Ipo 'recording' mode had wrong playback speed
- Vertex-key mode now sticks to show 'active key', until frame change
-Ton-
|
|
screen. Switched to ints, that fixed the bug in the tracker.
Switching to floats would probably be safer in the long term, but too many things to test to do that now.
|
|
alone with the following flags :
-Wall -Wno-char-subscripts -Wno-missing-braces.
the only one still worrying me is in rand.c line 57 :
rand.c:57: integer constant is too large for "long" type
but i have no clue about how correct cross-compiler and 32/64 bits friendly
see also my mail to commiter list for signed/unsigned issues
|
|
Works nice quick to rotate a group of Objects around a defined center,
without hassle with the 3d cursor. Especially for the 3D Manipulator.
In EditMode/PoseMode this option falls back to "Centroid", as does the
"Individual centers" option already.
|
|
because Martin recoded the Mirror().
- removed old globals like 'tottrans' or 'centre' or 'centroid' as used
by old transform
- removed a lot of code from editobject.c
- moved all transform related code to transform_conversions.c
(Note for Martin; sorry that's a mess... it now has all the weird
functions for finding posemode dependencies... thats for the depgraph
phase to remove)
|
|
Proportional edit:
- Proportional mode added to header as button/menu. Including new option
to have only connected geometry influenced.
- Added icons for proportional & proportional modes
- Make proportional edit data part of Scene, so all gets saved.
The Global flag G_PROPORTIONAL was removed
- Made sure #defines get used properly, also tweaked order for proportional
so it starts with regular 'smooth' by default.
- Use ALT+O in editmode to switch to new proportional 'connected' mode
Other UI stuff:
- in EditMode, the layer buttons get hidden... the amount of icons in
3d header grows to fast. :)
- made less ugly icons for the Manipulators. Still can be better.
- Added alpha-filter for pre-processing Icon-image, giving nicer display
of icon-antialising on dark or bright backdrops
- disabled Manipulators when in editmode, and current layers don't show
the edited data.
- Added the value used to define Normal size (editmode draw) in Scene too,
so it gets saved.
|
|
|
|
Camera rotation fix (was off centered because it used persinv instead of viewinv. Now rotation center is always center screen in camera mode. (Still need to fix the helpline not showing)
Numinput constraint function was no good, didn't check if a constraint was even on... Fixed.
Rotation was missing constraint text in header print. Fixed.
|
|
preleminary work for Individual Center in edit mode.
While I was there, I cleaned up individual center a bit, it was messing with helpline.
For fun, set the center mode to Individual Center, create a bezier circle, change handle to free (H) and Resize or Rotate. Fun isn't it! :)
|
|
/src to /include.
Split the conversion fonctions and sorting functions from transform.c into transform_conversions.c
Update MSVC 6.0 projectiles and SConscript accordingly.
Editview still included transform.h, replaced that for BIF_transform.h, the external include.
|
|
Alt-C during transform (hotkey subject to change)
No visual clue right now other than what is transformed and it gets resetted everytime (not kept as a global flag).
So, still a lot to do regarding that.
|
|
Behavior is a bit different. Instead of showing the weird two value thing like the old transform did, it always show the weight variation in +/- that is applied to every edge. Works a bit like scale. Move away from center to increase, move closer to decrease (between -1.0 and 1.0).
Works with PET (not using connection yet).
Also removed some missed global Trans variable abuse.
|
|
already set by the extrude code, recalculating breaks them.
Cosmetic changes, renamed CTX_NOPET to CTX_NO_PET
CKey during transform now clears the constraint.
|
|
Added a NULL check on TransInfo->data before sorting. At that point, the conversion could have been cancel if there's no selected elements (caused segfaults with PET).
Another NULL check on TransInfo->data in postTrans fonction, since that is called on cancel on no selection too.
Was missing a matrix multiplication when setting TransData->dist on meshes which caused PET on scaled meshes to be bad. (bug report 2395: http://projects.blender.org/tracker/?func=detail&atid=125&aid=2395&group_id=9 )
|
|
Was dividing running sum of vectors by the total number of elements, not by the number of selected elements, as it should have.
|
|
PET is now checked as a transform flag during transform. Much cleaner that way for NOPET context (extrude, duplicate)
Added Sphere as a new PET falloff mode (icon and all) and reordered them around in a more logical fashion (IMHO).
Also brought back Subsurf toggle with Shift-O (was supposed to be for PET object mode but that was canned).
|
|
Mesh Connected PET was acting weird on geometry that curved on itself (reported by Desoto). Turned out the part of the floodfill working on verts already connected was just doing one case out of the two useful ones (little drawings helped :P).
|
|
Connected PET for mesh had an infinite loop in some case. Fixed an made a bit faster.
Renamed the numinput flag.
Corrected a conflict in TransInfo flags. This was a crash waiting to happen.
NO_CONSTRAINT flag now correctly used to disable MMB and constraint hotkeys when needed.
Added check for the manipulator flag when drawing them before applying transformation matrix. Was really weird when doing MMB with rotation.
|
|
needs two temporary scratch arrays to keep vectors and nearest element pointers.
Will comment the code more later tonight, I'm a bit pissed at the moment (stupid errors right in your face. grrrr)
|
|
- Made proportional edit in Mesh editmode use connectivity to clip the
area where proportional editing is allowed.
Uses some kind of manhattan distance for clip area still, so is slightly
too large for diagonals. Will be worked on!
- Fix; in constraint code, using (0 0 0) delta caused NaN.
|
|
Caused some warnings and possibly errors since some calls were missing the context.
The rest is proof of concept goody for a CONNECTED limiter for PET.
That is, PET affecting only elements which are connected together.
Only affects Curves right now since that was easier to test connectivity with. Still some polishing to do (falloff is based on distance of effect, not real distance), but it's a proof of concept, so...
|
|
- center of rotation for camera in cameraview rotate has to remain the
camera center itself, drawing the dashed helpline then doesn't work,
since it's behind the camera clipplane. Just disabled that line.
- made MMB switch for cameraview grab to become quadratic, for a dolly
this feels OK, and makes it possible to move in small and large scenes.
- restored SHIFT modifier for translation and scaling. This based on old
convention that allowed precision editing on top of the transform you
already applied before pressing SHIFT.
Solved it with a new flag (T_SHIFT_MOD), since the G.qual cannot be
used. Transform() innerloop has to detect the SHIFT event itself.
Also coded it with storing the mouseposition while SHIFT event happened.
Hope Martin can approve! :)
- Martin's last commit made Manipulator Translate not work, it passed on
a zero translation to the constrainter, causing NaN's. Nicely catched the
exception.
- Fixed 'Trackball' to accept number input too
|
|
- Camera translate in camera view, with MMB, works again. Code needs
verification by Martin... it does it different now too.
- Camera rotate in camera view works again. MMB switches to 'trackball',
as formerly. Isn't consistant with other rotate+MMB though...
- rotate camera in cameraview around cursor doesn't 'feedack' anymore
Martin; I only use the TransInfo->persinv[4][4] now, but I think it's
safe to use viewmat and viewinv too?
|
|
is fixed.
Helpline for warp was wrong in edit mode if the object wasn't centered on global space.
Boundbox calculation for warp is done in view space now, so it is always maximised since aligned with the view.
Switch the negative/positive switch for Shrink/Fatten from horizontal motion to vertical motion. Pull down to shrink, pull up to fatten. This could still use some work.
BugFix: Constraint center was wrong with MMB (was bypassing the fix I commited the other day).
BugFix: Changing modes while in transform and switching to local constraints in edit mode crashed. This was due to resetting the TransInfo flag in initTransModeFlags. Now done correctly in initTrans.
|
|
versus perspective.
Note for Martin; still an issue with defining what positive/negative
rotation is in perspective... needs more math here!
- Added Transform Widgets for PoseMode
- made adding bones in EditMode setting G.moving, so it doesn't draw other
selected objects nor Widgets
Warning in commit of Martin yesterday: Trackball and initTrackball were
declared static, whilst also in transform.h. Quez; why are these functions
exported in the .h file?
|
|
mode and local axis constraints on objects.
Bringing that back and enabling PET in trackball rotate.
Changed the rotation manipulator drawing code to really align the Trackball rotate ball with the view (using getViewVector) so that it always looks centered on the selection.
This was particularly ugly in perspective mode with a selection far from the center of the screen: http://www.clubinfo.bdeb.qc.ca/~theeth/screenie.jpg
Moved getViewVector from transform_constraints.c to transform_generics.c since it is not really a constraint related function. Also made it independant on the TransInfo structure so it might be useful elsewhere too.
|