Commit Graph

101 Commits

Author SHA1 Message Date
243d1a28c0 Casting fixes for 64 bits. Incomplete commit, discussion on proper casting
has to be finished.
2007-04-29 10:49:02 +00:00
3f07ca5954 == Auto-Keyframing - Needed ==
Now, the 'Only Needed' Auto-Keyframing tool only adds keyframes for the relevant transforms when working with bones in PoseMode. Previously, all transform channels were keyed in such cases, as Auto-IK used to make things difficult.
2007-04-06 10:24:14 +00:00
afdd54fa37 moved source and text to american spelling
* colour -> color
* centre -> center
* normalise -> normalize
* modelling -> modeling
2007-04-04 13:18:41 +00:00
021cd4aac3 python api
removed most custom add_*data* wrappers from Main.c
removed makeCurrent() from Text.c (was never in a release), use "bpy.texts.active = text" now
clamp new image sizes
made add_empty_action accept a string rather then a blocktype since the blocktype was only being used to choose one of 3 strings anyway.
2007-03-12 06:21:58 +00:00
80d1d88ef6 == Auto-Keying - Needed ==
Now bones in target-less ik chains get keyed correctly. Reversing
the part of yesterday's commit regarding bones.
2006-12-07 09:31:51 +00:00
943aeaa443 == Auto-Keyframing 'Needed' ==
A little tweak to the way this works. Now it only tries to insert keyframes
in the ipo curves related to the transform which triggered auto-keying.
2006-12-06 04:41:14 +00:00
4f8079d49c Modifier Stack: Limit calculation to required data.
This commit upgrades the modifier stack to only calculate the data which is
needed, either by modifiers further down the stack or by other functions at
the end of the stack (e.g. drawing functions).

This speeds up modifier stack recalculation, especially where vertex
groups and UV coordinates are concerned. For example, a mesh with an Armature
modifier followed by a Subsurf modifier would previously have required the
Subsurf modifier to interpolate all the vertex groups in the mesh, slowing
down modifier calculations considerably. With this update, vertex group data
is not propagated beyond the Armature modifier, so calculations are faster.

Note that this depends on the order of modifiers in the stack. If the Armature
and Subsurf modifiers were swapped in the above example, the Subsurf modifier
would have to interpolate vertex groups, as they are needed by the Armature
modifier.
2006-12-05 17:42:03 +00:00
6faf0ac816 * Auto-Keyframing Option: 'Needed'
Now, when auto-keyframing, there is the option to have 'cleaner'
ipo curves. This is a user-pref option, and is based on the same
code responsible for the 'Only Needed' keyframing mode.


* Bugfix for Nicholas Bishop's recent sculptmode hotkeys:
When entering text in a text object, hotkeys were not disabled,
eg. type n = floating panel appears press 2 = layer 2 becomes visable.
Was 'if' instead of 'else if'

Reported by mfoxdogg on cvs.
2006-12-04 23:16:55 +00:00
f72a56bdfc === Transform ===
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. :)
2006-12-03 19:54:27 +00:00
953cd28b67 Klocwork pointer sanity checks in transform. 2006-12-03 18:30:34 +00:00
b462c66d2e == Bug Fix ==
PET Connectivity calculation code had a bug that only occured on really large scale meshes which caused a hang (infinite loop).

Fixed by raising the threshold to prevent float errors.
2006-11-26 23:54:35 +00:00
7ca8967824 Bugfix #5282
UV edit option 'constrain to rectange' didn't restore correctly on ESC.
(note, on ESC it doesn't undo the constrainting, in case the edited face
 was not a quad).

Also:

- The UVs pulldown in Image window was far too large, moved the scripts to
  an own sublevel menu
- Previous commit in vpaint.c had warnings
2006-11-22 11:25:39 +00:00
e435fbc3c5 Added custom vertex/edge/face data for meshes:
All data layers, including MVert/MEdge/MFace, are now managed as custom
data layers. The pointers like Mesh.mvert, Mesh.dvert or Mesh.mcol are
still used of course, but allocating, copying or freeing these arrays
should be done through the CustomData API.

Work in progress documentation on this is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData


Replaced TFace by MTFace:

This is the same struct, except that it does not contain color, that now
always stays separated in MCol. This was not a good design decision to
begin with, and it is needed for adding multiple color layers later. Note
that this does mean older Blender versions will not be able to read UV
coordinates from the next release, due to an SDNA limitation.


Removed DispListMesh:

This now fully replaced by DerivedMesh. To provide access to arrays of
vertices, edges and faces, like DispListMesh does. The semantics of the
DerivedMesh.getVertArray() and similar functions were changed to return
a pointer to an array if one exists, or otherwise allocate a temporary
one. On releasing the DerivedMesh, this temporary array will be removed
automatically.


Removed ssDM and meshDM DerivedMesh backends:

The ssDM backend was for DispListMesh, so that became obsolete automatically.
The meshDM backend was replaced by the custom data backend, that now figures
out which layers need to be modified, and only duplicates those.


This changes code in many places, and overall removes 2514 lines of code.
So, there's a good chance this might break some stuff, although I've been
testing it for a few days now. The good news is, adding multiple color and
uv layers should now become easy.
2006-11-20 04:28:02 +00:00
e0fcfdb395 Bugfix #4997
Small tweak in depsgraph usage of transform: to make sure recalc tags get
set in invisible objects (in other layers) as well. That way switching
layers won't give errors with child-objects not being in the correct place.
2006-09-16 13:06:09 +00:00
6dd9c8f6d6 Two small fixes for armature editing:
- CTRL+Click bones in editmode gave too small envelope distances (was 0.1
  instead of 0.25*bone->length)
- PoseMode: ALT+S in Envelope drawmode only scaled the Parent Bone(s).
2006-08-21 10:27:17 +00:00
2ee42ac01e Huge commit: VERSE
- All code is in #ifdef ... #endif
 - Only make build system is supported and you have to add:
    export WITH_VERSE=true
   to user-def.mk file
 - Blender can share only mesh objects and bitmaps now
 - More informations can be found at wiki:
    http://mediawiki.blender.org/index.php/BlenderDev/VerseIntegrationToBlender
    http://mediawiki.blender.org/index.php/BlenderDev/VerseIntegrationToBlenderUserDoc

  I hope, that I didn't forget at anything
2006-08-20 15:22:56 +00:00
d3028ec70d * Shrink/Fatten for bevelled curves
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.
2006-08-13 07:37:51 +00:00
2c72f5d5d6 Fixes for bugs #4450, #4451 and #4452.
- Unwrapper setting got reset unnecessarily in do_versions.
- UV pixel snapping did floor rounding, nearest pixel is nicer.
- Draw Faces button didn't trigger UV editor redraw.
2006-06-24 14:16:36 +00:00
ee2baaf3e3 === Transform ===
Bug #3657

Texture Space transform
* grab/size: did not support local constraints properly
* size: constraint support did not respect object orientation
2006-05-14 17:02:56 +00:00
390380e97b Bugfixes for frame number boost:
- Found several places, where people explicitly casted the frame number
  to short.
- Fixed the crash in BPY_interface by adding an empty line (to make it
  recompile everywhere, make clean doesn't help...)

  For the build system maintainers:

  Problem was: The change in makesdna changed the position of the
  scriptlink structure. BPY_interface.c somehow didn't get recompiled
  (not even after a make clean!!!) which triggered crashes on adding
  scriptlinks.
2006-05-07 08:23:51 +00:00
2db9b8fe7f Quick feature: "Around Individual Centers" now works in editmode mesh, but
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. :)
2006-03-08 11:07:49 +00:00
e66b5e5cd5 UV Editor Tweaks:
- Set local sticky in the uv editor as default.
- Don't do live unwrap on fully selected charts or charts with no pins
  selected.
- Fixed bug with live unwrap not respecting transform cancel in some cases.
- "View Home" didn't work without an image.
- Move UV Calculation settings (cube size, cylinder radius, ..) into the scene
  toolsettings, instead of global variables
- Remove the name LSCM from the UI (and python docs on seams), and replace it
  with 'Unwrap', with upcoming ABF this didn't make sense anymore.
- Move the Old/New LSCM switch into the UV Calculation panel. New LSCM is the
  default now. Also renamed LSCM there to "Conformal".
- Made some room in the UV Calculation panel by removing the buttons to execute
  the UV calculation, only leaving the settings.

Fill Holes:

- LSCM now has an option to fill holes in the chart before unwrapping. This on
  by default, and enables two things:
  - Prevent internal overlaps (e.g. eyes, mouth) for LSCM unwrapping.
  - Allow the internal boundaries to move freely during stretch minimize.
- The possibility to switch it off is there because it is not always possible
  to define which the outer boundary is. For example with an open cylinder
  where there are two identical holes.
2006-02-05 14:12:45 +00:00
042d612df2 Giant commit!
A full detailed description of this will be done later... is several days
of work. Here's a summary:

Render:
- Full cleanup of render code, removing *all* globals and bad level calls
  all over blender. Render module is now not called abusive anymore
- API-fied calls to rendering
- Full recode of internal render pipeline. Is now rendering tiles by
  default, prepared for much smarter 'bucket' render later.
- Each thread now can render a full part
- Renders were tested with 4 threads, goes fine, apart from some lookup
  tables in softshadow and AO still
- Rendering is prepared to do multiple layers and passes
- No single 32 bits trick in render code anymore, all 100% floats now.

Writing images/movies
- moved writing images to blender kernel (bye bye 'schrijfplaatje'!)
- made a new Movie handle system, also in kernel. This will enable much
  easier use of movies in Blender

PreviewRender:
- Using new render API, previewrender (in buttons) now uses regular render
  code to generate images.
- new datafile 'preview.blend.c' has the preview scenes in it
- previews get rendered in exact displayed size (1 pixel = 1 pixel)

3D Preview render
- new; press Pkey in 3d window, for a panel that continuously renders
  (pkey is for games, i know... but we dont do that in orange now!)
- this render works nearly identical to buttons-preview render, so it stops
  rendering on any event (mouse, keyboard, etc)
- on moving/scaling the panel, the render code doesn't recreate all geometry
- same for shifting/panning view
- all other operations (now) regenerate the full render database still.
- this is WIP... but big fun, especially for simple scenes!

Compositor
- Using same node system as now in use for shaders, you can composit images
- works pretty straightforward... needs much more options/tools and integration
  with rendering still
- is not threaded yet, nor is so smart to only recalculate changes... will be
  done soon!
- the "Render Result" node will get all layers/passes as output sockets
- The "Output" node renders to a builtin image, which you can view in the Image
  window. (yes, output nodes to render-result, and to files, is on the list!)

The Bad News
- "Unified Render" is removed. It might come back in some stage, but this
  system should be built from scratch. I can't really understand this code...
  I expect it is not much needed, especially with advanced layer/passes
  control
- Panorama render, Field render, Motion blur, is not coded yet... (I had to
  recode every single feature in render, so...!)
- Lens Flare is also not back... needs total revision, might become composit
  effect though (using zbuffer for visibility)
- Part render is gone! (well, thats obvious, its default now).
- The render window is only restored with limited functionality... I am going
  to check first the option to render to a Image window, so Blender can become
  a true single-window application. :)
  For example, the 'Spare render buffer' (jkey) doesnt work.
- Render with border, now default creates a smaller image
- No zbuffers are written yet... on the todo!
- Scons files and MSVC will need work to get compiling again

OK... thats what I can quickly recall. Now go compiling!
2006-01-23 22:05:47 +00:00
091af5911c * fix: The timeline now redraws when auto-recorded keys are set in transform. 2006-01-20 14:38:09 +00:00
ed2b55585d Wednesday sync orange with bf-blender
Note: has the crazyspace fix!
2006-01-04 15:47:16 +00:00
4cb838d54f Fix for CrazySpace correction. (Special request of our Argentinan bird
movie friends :)

There were two issues with it, which both have been tackled as follows:

- the correction transformations (quaternions) were calculated per face,
  and then averaged over the vertices. This gave annoying inaccuracies,
  especially when the geometry is irregular.
  The new code first calculates two tangent vectors in a vertex, based on
  the associated edges it has in a face. These tangents then are used to
  define the transform. Tangents are 20% of the length of an edge now.

- When a SubSurf modifier was in the chain, the deformation caused by the
  subsurf was also included in CrazySpace correction, giving even larger
  errors.
  New code temporally disables Subsurf, recalculates vertices, and then
  does the crazy tricks. :)

All in all, quite well working!
2006-01-04 15:37:48 +00:00
Chris Want
b41a476401 As positively recieved on the mailing list and irc (and blessed by
guitargeek), this commit enhances the support for temporary storage
for the structs EditVert, EditEdge, and EditFace. The field
"EditVert *vn" has been removed and replaced by a union called
"tmp" that can hold:

 v,  an EditVert pointer;
 e,  an EditEdge pointer;
 f,  an EditFace pointer;
 fp, a float pointer;
 p,  a void pointer;
 l,  a long;

Please see the mailing list post here for more information about
this:

http://projects.blender.org/pipermail/bf-committers/2005-December/012877.html
2006-01-03 17:22:42 +00:00
72d805f17d Orange: monday merger with bf-blender (loadsa bugfixes).
ALso: a bit tidying up in editaction.c and python Object.c
2005-12-19 18:56:08 +00:00
2d6e7d58d0 #3628
Even while it's not supported, proportional mode was drawing a circle when
in EditMode armature.
2005-12-19 16:45:11 +00:00
fae20e494e orange: animation baking code. also a patch to autokey, to only key the keys made. 2005-12-18 20:14:22 +00:00
1123be1bcc Orange request; Bones in Armature now have own layer settings.
Works like for Object layers, but local within Armature itself. Each Bone
can be in (16 now) any layer, and the Armature layer defines what is
visible or not. Also note that hiding will still work too.

Since the Blender code is *stuffed* with Bone options now, this commit
requires a good test if all tools we got now comply to layers...
(I counted 130 cases for checking for selected Bones in code!)

In PoseMode; hotkey M will show 'movetolayer' menu. Not in editmode...
then its the mirror menu.

Todo: make action/nla drawing comply to Armature layer settings.
2005-12-07 12:36:26 +00:00
c2cff1cbcf More work on the new unwrapper code (orange branch):
- There is now a (temporary) dropdown box in the image window header for
  switching between the old an new unwrapper code. So to test the changes
  described below you need to enable the new unwrapper code.
- Pinning is now more predictable, if one uv is pinned, the others belonging
  to the same vertex are pinned also.
- Live LSCM is much faster, since the LU factorization, the most expensive
  part of the computation, is now stored and reused (was Jens' idea).
- Packing multiple uv charts is slightly improved, by doing a binary search
  over the texture width. This fixes the case where all the charts are
  packed at the bottom of the image.
- LSCM now uses an angle based formulation, and the results seem somewhat
  different (maybe slightly better?), didn't find out why yet.
2005-12-03 23:22:31 +00:00
c4a1d655ae True X-mirror mesh editing!
Set the option in EditMode, in 2nd mesh tools panel. It only works on
transform options now (grab/rot/scale), and of course assumes a near-
perfect symmetrical mesh. Mesh Object itself can be on any location
though (and rotated etc).
2005-12-01 19:04:57 +00:00
d34ab0755e Bugfix #3430
Using Proportional edit on a Lattice with option "Outside" crashed.
Was caused by not checking for the hide flag while counting amount
of transformed elements in Lattice.
2005-11-21 11:15:46 +00:00
cab2b3e3d0 Bug #3395
Target-less or Auto-IK didn't insert keys for all bones when using
the Auto-key option.
2005-11-17 22:07:06 +00:00
502fc2da31 One visit to studio orange, and voila a todo list!
- bug: posemode, bones were drawing names and axes even when hidden
- bug: using softbody guides actually worked on themselves, causing
  an infinite loop
- feature: when a pose/bone is completely locked for transform, a grab
  will change into rotate by default.
2005-11-17 18:01:07 +00:00
c3fc17f45c Grabbing a targetless IK bone, and ESC, accidentally didnt clear a flag,
causing targetless IK being executed on all bone moving (looked like as if
a bone couldn't be rotated/moved).
2005-11-15 15:54:57 +00:00
ffdde59cf1 Bugfix #3342
Target-less IK, with a hinge bone that has an offset to its parent, didn't
get applied correctly after transform.
2005-11-05 20:02:04 +00:00
48dbe3a5fc #3308
Autokey didn't work for Object actions yet.
2005-11-01 22:48:07 +00:00
0883f12a6b The "Pose unlock" flag accidentally could get saved in file, causing
grabbing bones not to work. Only happened sofar in 1 file... but still
annoying!
2005-11-01 20:58:37 +00:00
68ae6aa776 Bugfix to allow Grabbing of bones with a parent, but not connected
(was broken after targetless IK commit).
2005-11-01 19:32:54 +00:00
8906e4ec98 Three new features:
1) Stride Bone

For walkcycles, you could already set an NLA strip to cycle over a path
based on a preset distance value. This cycling happens based on a linear
interpolation, with constant speed.
Not all cycles have a constant speed however, like hopping or jumping.
To ensure a perfect slipping-less foot contact, you now can set a Bone
in an Armature to define the stride. This "Stride Bone" then becomes a
sort-of ruler, a conveyor belt, on which the character walks. When using
the NLA "Use Path" option, it then tries to keep the Stride Bone entirely
motionless on the path, by cancelling out its motion (for the entire
Armature). This means that the animation keys for a Stride Bone have to be
exactly negative of the desired path. Only, at choice, the X,Y or Z Ipo
curve is used for this stride.

Examples:

http://www.blender.org/bf/0001_0040.avi
The top armature shows the actual Action, the bottom armature has been
parented to a Path, using the Stride Bone feature.

http://www.blender.org/bf/0001_0080.avi
Here the Stride Bone has a number of children, creating a ruler to be
used as reference while animating.

Test .blend:
http://www.blender.org/bf/motionblender1.blend

Notes:
- Note that action keys for Bones work local, based on the Bone's
  orientation as set in EditMode. Therefore, an Y translation always
  goes in the Bone's direction.
- To be able to get a "solvable" stride, the animation curve has
  to be inverse evaluated, using a Newton Raphson root solver. That
  means you can only create stride curves that keep moving forward, and
  cannot return halfway.
- Set the Stride Bone in the Editing Buttons, Bone Panel. You can set
  change the name or set the axis in the NLA Window, Strip Properties Panel.
- Files in this commit will move to the blender.org release section.

2) Armature Ghosting

In EditButtons, Armature Panel, you can set an armature to draw ghosts.
The number value denotes the amount of frames that have to be drawn extra
(for the active action!) around the current frame.
Ghosts only evaluate its own Pose, executing it's Actions, Constraints and
IK. No external dependencies are re-evaluated for it.

3) NLA/Action time control

If you click in the NLA window on the action (linked to Object), it makes
sure the Timing as drawn in the Action editor is not corrected for NLA.
If you also set the Object to "Action", this timing will be executed on the
Object as well (not NLA time).
(It's a bit confusing... will make a good doc & maybe review UI!)
2005-11-01 12:44:30 +00:00
6455388885 Fix: Using Hinge Bones in a chain with "Target-less IK" didn't apply the
correct rotations.
2005-10-31 10:10:01 +00:00
ea8b08c2cc Two new IK features.
1) Target-less IK

If you add an IK constraint without a target set (no object or bone target),
it now can be grabbed and moved with IK, using its own Bone tip or root as
target itself. This way you can use IK for posing, without having the IK
executed while it animates or while a Pose is being solved for real IK.

After grabbing "Target-less IK", it applies the resulted motion in the
pose-channels, which then can be used to insert keypositions.

The Target-less IK bone can still be rotated without IK, also its chain
can be edited as usual.

UI: The CTRL+I menu gives this as an option too. In the 3D window it is
drawn with orangish color.

Note that IK is not resistant to non-uniform scaling yet.

2) Auto-IK

When the option "Automatic IK" is set, in Edit Buttons Armature Panel,
it creates automatic temporal Target-less IK for the Bone you grab or
translate.

The rules are:

- it only works when a single Bone is selected
- if the Bone is a root bone (no parent), it adds IK to the end of the
  chain(s)
- otherwise it adds the IK to the active Bone
- the temporal IK chain only consists of connected Bones.

This method is still a bit experimental. Maybe it should become a special
grabbing option (like SHIFT+G in Pose Mode). It also only works OK for rigs
that fit for it well... when a rig already is fully setup with IK it can't
do much good. :)
2005-10-30 13:50:42 +00:00
4ad59e30a0 New: Write Protection for transform values.
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.
2005-10-29 20:08:25 +00:00
3635bde6f4 Orange's buglist!
- Action Editor: hotkeys V and H for handles were invisible, added menus
- NLA strips: when current frame is exactly on the strip end, it didn't
  include that action... needs a rounding correction for it.
- Action/NLA: deleting keys in Action, which results in only 1 key left,
  resulted in zero sized strip length. Now the strips are defaulted to be
  1 frame in size minimal.
- NLA editor: ALT+C "Convert to strip" didn't increment Action user count
- 3D Window: CTRL+P make parent to Bone still gave the insane menu with all
  bone names. With unified PoseMode select it can just parent to the
  active Bone. Note; this now requires the Armature to be in PoseMode to
  work.
- Rotation Constraint; the new options to only map to X,Y,Z rotation, did
  set the not mapped rotation axes to zero. These should remain unchanged.
- AutoKey optionn for Actions; should not insert action keys on ESC

And added a fix myself:

- When SHIFT+selecting a Bone in PoseMode, and the Armature was not selected
  or active yet, it doesn't extend-select/deselect the Bone anymore.
  This case is only useful when you try to add IK or Constraint, so the
  shift+selection should only activate the clicked Bone.
2005-10-29 10:15:36 +00:00
5d291535c6 Disabled CrazySpace when 'proportional edit' is on... I discovered both use
the eve->vn pointer to store temporal data. Need a better solution, do it
later. This just prevents crashing!
2005-10-26 10:49:19 +00:00
c648e790be New: CrazySpace [tm] correction
When Modifiers are used in Edit Mode to show the deformed result for
editing, all actual coordinates Blender works with are still the ones from
the original Cage. You can notice that with the Transform Widget or
helper lines while transforming.

Even worse, the actual transformations still happened on the original Cage
as well, making it very hard to edit. That caused the feature to be named
"CrazySpace" (baptized by Andy, afaik?).

This commit calculates the deformation transformation per vertex, and
inverse corrects it, so it's more intuitive editing this way.

Unfortunately all the deformation features of Blender don't use matrices
for defining deform, so the existing code cannot be re-used to retrieve
the correct deformation matrix per vertex. The solution I found is based
on calculating per face the transformation based on its first 3 vertices,
and store this transformation averaged in the face's vertices.
The solution can also only work on entire faces, because the full deform
can only be retrieved using 3 vertices. (using 2 vertices will miss edge-
aligned rotation, using 1 vertex can only retrieve translation).

By deriving the deformations per face, small errors will still happen,
especially on very low-poly Meshes with extreme deformations.

The only alternative I know now, is providing each vertex in
a mesh with 2 extreme small tangent vectors, which get deformed using the
existing code as well. That will mess up the existing deformation code too
much though, this solution has the benefit it works with each deform we can
up with later too.

Last note about CrazySpace: it can only be used to tweak Meshes. Do not
even try to add vertices, extrude, or duplicate. Probably we should disable
this... but preventing user errors isn't always power-user-friendly, eh. :)
2005-10-26 09:56:52 +00:00
9e19739944 Various stuff in one commit;
- 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.
2005-10-22 18:47:38 +00:00
fc169264cd Autokey option crashed on Transform... was still using defines from before
the object-action-ipo-nla recode 2 weeks ago.
2005-10-22 15:03:29 +00:00