Commit Graph

4636 Commits

Author SHA1 Message Date
6eb47e98c3 Fix for item #3316 : make sure that BLI_make_file_string converts all
slashes in the filenames to the system preferred direction.
Leaving unix slashes caused the error in the Python module
blender.Get('filename')
2005-11-01 20:25:23 +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
0b739ab8e8 Fix: the 'draw name in camera view' now draws the view's active
camera's name rather than the scene's, so it's not misleading
when you have unlocked 3D views. (#3324)
2005-11-01 18:39: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
Alexander Ewering
ca85fc5c8a Found a potential crash where NULL could be passed to vfont_get_data(),
here's the fix. Maybe it fixes Andy's file :)
2005-10-31 16:46:22 +00:00
Alexander Ewering
4bf37a3ba5 Comment out debug printf 2005-10-31 16:27:47 +00:00
15707394d1 Adding Key.ipo as access to ipo data both get and set 2005-10-31 15:53:21 +00:00
Ken Hughes
54659d4a7d -- further clean-up of mesh error handling for update and PutRaw(); add
specific messages for different types of exception errors
2005-10-31 15:08:01 +00:00
b6b387b6b8 Yet another IK offset fix, pointed out by Ton. Offset should be passed
in local bone space.
2005-10-31 15:01:37 +00:00
Ken Hughes
7040e6c157 -- patch submitted by Johnny Matthews which lets a user get an Ipo curve by
its adrcode in addition to its string name (shape keys don't have fixed
   or unique string names, and they are stored in the key, not the Ipo).
   This will make it easier to later use constants from dictionaries to
   access a curve.
2005-10-31 14:05:47 +00:00
f2ff00b97f * Gave the Obdata to Center / Center New / Center Cursor
tools a nice little home in the 3D View header/toolbox
 transform menu. Death to button-only actions!
2005-10-31 13:39:05 +00:00
42e05d0977 Fix: Scaling in Action Window didn't correct for NLA mapped time 2005-10-31 10:53:47 +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
53052c9924 iNew: TimeSlide in Action Window
Usage: press Tkey, and you can proportionally squeeze or stretch the
selected keys, with current mouse position as reference. Only works with
more than 3 keys selected horizontally.

I've remapped the old Tkey (ipo type) to SHIFT+T... might be temporal, I
have an idea for a cool 2D manipulator system that makes it much friendlier
to grab/scale/slide keys all in once.

Also: fix for HOME key in action editor (didn't do Pin), and removed gcc
warnings from jiri's commit in editmesh_add.c
2005-10-31 09:41:24 +00:00
Ken Hughes
3150b5a7a7 -- one step closer to fixing booleans: one-line change to use new object
instead of original object when building new mesh and mesh material list
2005-10-31 04:17:29 +00:00
4181b6ec74 Removed key.getChannelIpo() doc. 2005-10-31 02:52:17 +00:00
43ec1ee71a Removed key.getChannelIpo() since it is not proper implementation anymore. 2005-10-31 02:52:14 +00:00
e964954679 Fix for HOME key in Action Window. Didn't check for mapped NLA time yet. 2005-10-30 21:48:25 +00:00
41c5328dd4 Two half working commits!
- Python Drivers
  In Ipo Window "transform properties" Panel, added the buttons, and the
  initial handling (now only printing text). Willian makes it work!

- Better Matrix to Eul, code submitted by Brecht. No time yet to do it
  really nice (like a Mat3ToEulCompat(mat, eul, eulc))
2005-10-30 20:56:19 +00:00
Ken Hughes
99753a423f -- fix (I think) for "normal booleans interface (for Wkey 123 entries)";
second selected object's mesh was being overwritten by new object's
   mesh, so new object had no empty mesh
2005-10-30 20:10:05 +00:00
0fda3609a6 - bug fix: normal of new added face is calculated without mistakes now
- direction of face normal doesn't depend on user's view to scene anymore,
   it is influenced only by direction of face normals in nieghborhood
2005-10-30 18:42:50 +00:00
1f51932259 Previous change to enable Shape Actions, didn't support Drivers yet. 2005-10-30 18:29:40 +00:00
Ken Hughes
227e6b08b2 -- testing a patch which lets Python initialize the site path for Blender
(old code is just "#ifdef"-ed out for now.)

Please give this a try on all platforms and give us feedback on what you
see for your sys.path setting in Blender (run these two lines in text window)

	import sys
	print sys.path
2005-10-30 18:27:24 +00:00
b483454bd3 Mirror clipping bug; Martin used abs() which is for int! should be fabs(). 2005-10-30 17:32:17 +00:00
Ken Hughes
4d2de0293e -- fix compiler warning about return "from incompatible pointer type" when
returning Python exceptions.  EXPP_ReturnPyObjError() always returns a
   NULL because Python expects error conditions to return a NULL pointer
   instead of an object.  Since the pointer is cast to a PyObject *, it's
   ugly to use for propagating the errors back in this case, so this fix just
   uses PyErr_SetString() to set the error and return NULL (see the body
   of EXPP_ReturnPyObjError() ).
2005-10-30 14:34:48 +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
b7a465b437 when recording physics keyframes, always run at a fixed framerate (not variable/real-time) 2005-10-30 07:25:36 +00:00
Ken Hughes
cb9988332a - fix issues in with Mesh_fromNMesh pointed out by Ton earlier; errors from
Python routines should properly be propagated back to give an error as
  intended.
2005-10-30 03:05:54 +00:00
4664db4872 SHIFT+S snap to frame for both Action and NLA window. 2005-10-29 21:27:07 +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
a0c1787957 Mirror cliping polishing:
- Better use of tolerance to check for elements already on seam
	- remove debug printfs
2005-10-29 15:24:24 +00:00
e766d8a781 Mirror cliping polishing:
- Work with multiple mirror modifiers
	- Take into accound elements already on the seam properly.
	- Use the proper mirror tolerance as limit
2005-10-29 15:05:23 +00:00
34da58921b Remainder todo from Shape Action recode; the drawipo.c Panel code still
was referencing Key pointers in spaceipo->from, this has to be Object *.
Thanks Johnny for the report!
2005-10-29 14:23:43 +00:00
607777d949 *silly whistling*
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.
2005-10-29 12:17:44 +00:00
bba0e61734 Bug in Ton's mirror clipping feature.
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.
2005-10-29 12:12:12 +00:00
750e801683 New: Mirror Modifier now has option "Do Clipping", which prevents vertices
during Transform to go through the mirror. Note that it is *only* during
transform, and ESC restores the non-clipped positions of vertices.
2005-10-29 11:36:21 +00:00
16bc298168 ColorBand editing suggestion from Andy; CTRL+click inserts a new 'key' in
the ColorBand, with color/alpha as defined by that position.
2005-10-29 10:37:14 +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
Alexander Ewering
8162961d31 My local tree has iblender's Game engine soundsystem
(which uses SDL_mixer), one thing in nan_definitions.mk slipped
through.

My apologies :)
2005-10-28 20:29:50 +00:00
Alexander Ewering
d3dd5c5b7a Somehow, most files are missing from this commit, and I have no idea why,
so there will be more files following.

Anyway: NEW BOOLEANS from Google Summer of Code (Courtesy of Marc Freixas)

Known problems:

 - Random freezes while using them as a modifier. This may not be directly
   related to modifiers though - it's maybe just the huge number of
   operations that leads to a higher probability of triggering a bug

 - Static booleans (the first 3 entries in the WKEY menu) are borked
   anyway, this is not due to this commit.

 - Errors when exiting Blender (dupli_alloc stuff), is not related to this
   commit, either.

Please test if everything works, and check the other build systems, I only
know that make works.

Also, compare the results of, say, cube-cylinder, in old and new booleans
:)
2005-10-28 19:54:16 +00:00
b8d81d093a Autocomplete for buttons that need Blender data names (ID's and Bones).
Just press TAB and it completes up to the level a match is found. If
more matches exist a menu could pop up, thats for later. Now an evening
off! :)
2005-10-28 16:49:48 +00:00
3957b3428e Hm, last method was not so good across various colour
themes. Now the line uses a blend of the outliner theme
colours instead of being hard coded.
2005-10-28 15:45:32 +00:00
Mika Saari
7ddf38a8b9 Fixing Bug: 3273, Removing my goto calls from font.c. 2005-10-28 15:36:09 +00:00
7cfa2ac608 Tiny cosmetic tweak to the outliner, making the
connecting line not so strong to see the other icons easier
2005-10-28 15:25:29 +00:00
146fea2668 Irc reported bug by Sapir: Shape Key factor slider in Edit Buttons crashed
when no ipo window was opened. Was using an old global pointer. fixed!
2005-10-28 14:24:07 +00:00
1bfc5181f0 Tweaks to the camera visualisation:
We decided that the dashed lines were too much,
making the view very busy with dashed parent lines,
lamps, etc. So now the camera lines are drawn solid,
but the arrow (now triangle by andy's demand!) is drawn
outlined for inactive cameras, filled for the active
camera.
2005-10-28 14:19:40 +00:00
f57481861c New: use ALT+ScrollWheel to step through frames. Like for Arrow keys, it
does not cycle (not jump back to start frame on the end).

Mac users can also use Apple+ScrollWheel btw!
2005-10-28 14:19:22 +00:00
926d5ebdab Error in creating Python dict for new Mesh API.
It was calling PyModule_AddObject() with unassigned pointer. Crashed on
exit here (python 2.3.2). Weird thing was that python 2.3.5 didnt complain

CVSr ----------------------------------------------------------------------
2005-10-28 13:51:08 +00:00
4069604736 Fixed gcc warnings for unused var and unitialiazed vars.
NOTE: I had to fix NMesh.c, Mesh_fromNMesh(), that is a real bad
function... it was returning a Py object as a Mesh (on error).
This is still not really solved (NULL return is not handled).
2005-10-28 10:09:46 +00:00
595447a85e Here's another milestone: Shape Keys now can be inserted in Actions and NLA
It works like for moving Object Ipos to the Action, press the Action icon
in the header of the IpoWindow, to the left of the mode selection menu.
It then creates an Action (if not existed) and moves the Shape Ipo to the
Action, using custom channel "Shape".

Main code change was that evaluating Ipo Curves for Relative Shapes had to
be recoded, but that's pretty minor and even much cleaner. (added "curval"
in the KeyBlock struct).
That this feature can work is thanks to the full modifier/derivedmesh
recode Daniel did, can't give him enough credits! :)

Also; small fixes in Outliner, for clicking on the Ipo icon (sets the Ipo
window to show that Ipo).
2005-10-28 08:11:15 +00:00