Commit Graph

5151 Commits

Author SHA1 Message Date
Ton Roosendaal
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
Ton Roosendaal
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
Erwin Coumans
b7a465b437 when recording physics keyframes, always run at a fixed framerate (not variable/real-time) 2005-10-30 07:25:36 +00:00
Erwin Coumans
281f236e6e Minor changes in Bullet:
- on Ton's request use double versions of cos,sin,tan, sqrt etc.
just like Solid in MT_Scalar #if defined (__sun) || defined (__sun__) || defined (__sparc) || defined (__APPLE__)
- updated an url in the header of files
2005-10-30 06:44:42 +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
Ton Roosendaal
4664db4872 SHIFT+S snap to frame for both Action and NLA window. 2005-10-29 21:27:07 +00:00
Ton Roosendaal
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
Erwin Coumans
872b2a03e3 attempt to fix a link problem by changing the link-order or ketsji/bullet 2005-10-29 17:54:04 +00:00
Martin Poirier
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
Martin Poirier
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
Ton Roosendaal
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
Johnny Matthews
e6f5f9bf85 fixing case issue for blender_BOP.lib to blender_bop.lib 2005-10-29 13:47:41 +00:00
Johnny Matthews
1d366b3fe9 Scons files for Boolop
also a fix in BOP_Material so that MSVC won't complain about template issues
2005-10-29 13:26:31 +00:00
Martin Poirier
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
Martin Poirier
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
Ton Roosendaal
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
Ton Roosendaal
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
Ton Roosendaal
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
767bae35f2 (Hopefully) last part of Booleans commit.
Please update, compile (make) and test.
2005-10-28 20:18:56 +00:00
Alexander Ewering
d243bfb61e New files from new booleans 2005-10-28 20:17:27 +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
Ton Roosendaal
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
Matt Ebb
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
Matt Ebb
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
Ton Roosendaal
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
Matt Ebb
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
Ton Roosendaal
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
Ton Roosendaal
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
Ton Roosendaal
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
Ton Roosendaal
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
Erwin Coumans
0dde486eea applied patch [ #3260 ] Enable compile bullet and sumo with scons 2005-10-28 04:48:01 +00:00
Ken Hughes
b729020276 - change description of AssignModes from "blah blah" to something meaningful. 2005-10-27 22:07:43 +00:00
Ton Roosendaal
e61aa11ade Nice one: Transform in NLA with the "Lock" feature, not only draws other
windows, but also evaluates (depgraphed) all Objects involved.
Try select all in NLA and drag around!
2005-10-27 20:53:47 +00:00
Matt Ebb
f0c1040ab7 A few tweaks to the old->new camera conversion code
after chatting with Ton. I've commented out the old file
title safe conversion for now, so we can actually use it in
files worked on now. Have noted to remember to
uncomment it before the new version number bump.
2005-10-27 19:47:01 +00:00
Ken Hughes
a9a545d784 Lots of BPy Mesh additions:
- added faces.uvSel attribute: can get/set selection status of UV vertices in
  UV Editor window
- make mesh.faceUV, mesh.vertexUV and mesh.vertexColor writable: users
  can now enable/disable UV faces, vertex colors, "sticky" vertices
- fixed bug with mesh tool methods: before it would only work if an object
  linked to the mesh was selected
- added mesh.quadToTriangle() and mesh.triangleToQuad() methods
- added selected() method to verts, edges, faces; returns list of indices
  of selected items
- mesh.getFromObject() now gets derived mesh data
- ported vertex group methods from NMesh (required change to Object.c)
- ported module dictionaries from NMesh
2005-10-27 19:37:37 +00:00
Ton Roosendaal
637895d29d Bugfix: Using the "Influence" slider for Constraints popped back to the
keyed positions when an Ipo was assigned to the Constraint.
2005-10-27 17:37:27 +00:00
Ton Roosendaal
bab1603861 Copy scene did not copy the markers... causing in memory errors on quit.
No real baddie, but still very good to fix!
2005-10-27 17:09:58 +00:00
Ken Hughes
3dbe0f0074 - Bugfix #3271: saveRenderedImage() was corrupting memory while trying to
build the filename (thanks for good bug report, Pablo)
2005-10-27 17:09:20 +00:00
Ton Roosendaal
d7be29b376 The new icon file, with the key markers for NLA and Action 2005-10-27 16:57:02 +00:00
Jiri Hnidek
0cf61613d9 - bug fix: clicking at button "Flip Normals" in button window didn't
display changes in 3dview and data wasn't added to undo stack too
2005-10-27 16:54:33 +00:00
Ton Roosendaal
2d960cea74 NLA & Action goodies;
-> Locked Strip length
When changing time of the animation curves in an Action, the strips in NLA
just remained the same length, causing very confusing situations.
By setting the strips to Locked (Nkey NLA window), it always updates the
strip length to make sure all keys are included, and not more. From now on
(not on old files) this is the default strip method.

-> ALT+C clear size
This menu has 2 options, the first clears the size, the 2nd remaps the
action (only when you didnt use the new Lock feature).
Both options are in the Pulldown menu too

-> Key drawing
The weird beveled button in Action/NLA didn't accurately show what time it
was actually on. I've replaced it with an Icon now, diamond shaped, in a
design derived from the TimeLine markers.
2005-10-27 16:25:35 +00:00
Jiri Hnidek
8fc7950455 When you add new face with F key, then blender set up smoothness due to
smoothness of faces in neighbourhood. It tries to set up normal of new
 face due to normals of faces in neigbourhood too.

 btw: this coding was inspired by andy's tutorial at conf in Amsterdam.
2005-10-27 15:19:57 +00:00
Ton Roosendaal
e1047fe69a Another missing .h file for fix for screen handlers 2005-10-27 14:12:16 +00:00
Ton Roosendaal
3c27069c86 Missing include for screen handlers (had to move to kernel level) 2005-10-27 14:11:25 +00:00
Ton Roosendaal
44a9e0538e This is a bit a patch... unforseen issue with the new Screen Handlers.
(Screen handler is used now to trigger animated screen).

When files get saved with Verse_Blender, it has the verse handler set,
which causes the handler system to run without a means to disable it with
release versions of Blender. This patch disables the Verse Handler to be
set on reading files.

Jiri; you will have to uncomment this code when you sync it with your tree!
2005-10-27 13:56:41 +00:00
Ton Roosendaal
00d643091c CTRL+I, pose mode, added accidentally a location constraint, when having 2
Bones selected.
2005-10-27 13:02:34 +00:00
Matt Ebb
dd409399ec Camera visualisation changes and features (from tuho)
* Made the in-camera view dashed border lines less jarring
and disturbing. We will give it some testing here, feedback
is welcome.
* Showing the title safe zone is now an option in the
camera edit buttons. It's not very useful if you're not
making stuff for video/broadcast so you can turn it off.
* Passepartout is now a flag per camera, rather than per
scene. It never really belonged in the render buttons or as
Scene data, though it could be up for debate whether it's
better as camera data or view data (i.e. in the view
properties panel). Old files get converted over nicely with
this so if you had passepartout on before, it stays on the
cameras.
* Added an option to show the current camera's name at
the bottom of the in-camera view, to help keep track of
which one you're seeing when using multiple cameras.
* In the 3D View (non-camera view) the active camera is
drawn with a solid line as before, while non-active
cameras are drawn with a dashed line, to help visualise
which one is active.
2005-10-27 11:28:43 +00:00