Commit Graph

9105 Commits

Author SHA1 Message Date
Joshua Leung
89317afbdf Patch #7767: Constraint Subtargets can now target anywhere on a bone, not just the head or tail
Patch by: Roland Hess (harkyman)

For example, a constraint can be sub-targeted at the 50% (or 31.2% or 85% etc.) point of its target bone, giving you enormous rigging flexibility and removing the need for complex contraptions to do such things as:

- A bone whose base slides only between to points on a rig (CopyLoc with a variable, animated subtarget point)
- Bones that attach to multiple points along another bone (CopyLocs, each with a different head/tail percentage)
- Bones that need to stretch to a point midway between specific spots on two other bones (old way: too crazy to mention; new way: stretch bone between points on end bones, then another stretch to the midpoint of the first stretch)

It is only used for the constraint types for which it is relevant: CopyLoc, TrackTo, StretchTo and MinMax, TrackTo, and Floor.

Notes:
- This is accessed by the Head/Tail number-slider. 
- This value can be animated per constraint
- The old "Copy Bone Tail" option for the CopyLoc constraint has been automatically converted to 1.0 Head/Bone values for the affected constraints
- In the code, this value is in the bConstraint struct, so it is available for all constraints, even though only a few implement it.
2007-11-12 04:17:03 +00:00
Brecht Van Lommel
7f2e43968a Mesh Deform Modifier
====================

Dynamic binding support. This means that the mesh can move _within_
the cage and still deform correct. If the mesh goes out of the cage,
don't expect correct result. Must be enabled with the 'Dynamic'
option, because it is slower and consumes more memory.

This is useful to use e.g. the cage mesh for main deformations and
still have shape keys for facial deformation working.
2007-11-11 22:54:14 +00:00
Joilnen Leite
8f684083cf dropped some unused lines, if that was some new feature witch I no found mentions in svn logs please to commit
for trunk when ready
2007-11-11 16:56:22 +00:00
Ton Roosendaal
3d250856fb Proper code for bugfix revision 12365 (which was uncommitted today).
Old log Message:
-----------
bug fix, when opening blender with a file (by double clicking or from the 
command line) - the initial undo state would be set to the default scene.
So holding Ctrl+Z would go back to the default .B.blend rather then the 
file that the user opened.
2007-11-11 16:13:27 +00:00
Campbell Barton
3a90b35db8 Undoing 'undo' fix 12365, it didn't work the same on mac's, Ton would like to fix the bug himself.
Tree From Curve,
- report error when nurbs or poly curves are used.
- don't throw errors when >4 branch's per segment are used. also try deal with this better. though no nice solution exists.
- default speed is 10x slower then before.
2007-11-11 15:18:53 +00:00
Campbell Barton
2abb50d1ea Exclude generated images when checking if an image is already loaded, it can be very confusing when you don't appear to have the image loaded anywhere. 2007-11-10 19:56:06 +00:00
Campbell Barton
90b4ed9543 added buttons in the Transform Properties for changing curve handle types, (Similar to how Metaballs can be selected) for easier access then H,Shift H, V keys 2007-11-10 15:31:41 +00:00
Andrea Weikert
38d12b3c8d Bugfix #6797: Relative paths load problem on new file (fix included)
- brought back the check for a valid relative base when selecting.
- kept the check for when file is saved too and warning message is printed to console instead of popping up.
Also fixed BLI_split_filedir overwriting parameter passed as const char*
2007-11-10 11:45:25 +00:00
Campbell Barton
f02a746f56 ==Python API==
added .smooth setting to CurNurb's

so you can do....
for curNurb in Curve.Get('foo'): curNurb.smooth = True
2007-11-10 11:05:44 +00:00
Andrea Weikert
f9e35056af == imagebrowser ==
* bugfix: calling imagebrowser with relative path results in non-existing dir
* cleanup: removed unneeded BIF_filelist_appenddir function
* added check for valid relative base when activating imagebrowser (like in filebrowser)
2007-11-10 09:11:42 +00:00
Joshua Leung
234bb41906 CopyRot Constraint and Transforms:
Now, when rotating along local axes of an object/bone with a copy-rot constraint that has offset on, the results are more predicatable. However, doing so with global axes is still in CrazySpace (TM).
2007-11-10 02:53:19 +00:00
Campbell Barton
6b1158c146 mistake in last commit 2007-11-09 16:05:04 +00:00
Ton Roosendaal
072cb52a79 Feature: transform manipulator (align normal option) aligns with bezier
handles now. Needed & useful for modeling trees here...
2007-11-09 16:02:31 +00:00
Campbell Barton
d1dbf41f6c PyTuple_Pack dosnt work with python 2.3 - removed 2007-11-09 15:56:41 +00:00
Ton Roosendaal
62f8e6fc23 Quick added feature: the "do not get scaling from parent bone" option.
It's next to the 'hinge' button, a small 'S'. No more space here... will
make it nicer inferface later. :)
Let's first see if this works as expected.
2007-11-09 14:58:55 +00:00
Campbell Barton
ddf2336084 curve2tree - animation settings - speed and magnitude
Python api - texture.evaluate can now accept tuples of numbers as well as vectors
2007-11-09 10:29:19 +00:00
Brecht Van Lommel
7294d19d66 Bugfix:
Issue with dual quaternion scaling + vertex group influence.
2007-11-08 18:02:15 +00:00
Martin Poirier
4b38620d3f Fix for bug [#7741] new colorband for weightpainting overlaps with verse settings 2007-11-08 15:57:18 +00:00
Campbell Barton
4482f3b2e8 user interface added for 'Tree from curves' tool.
renamed Filter to Blur to Filter for #define as well
2007-11-08 15:41:11 +00:00
Juho Vepsalainen
b2a972b4cd Fix for bug #7697 Appending screen crashes when appended screen is accessed:
This commit fixes the issue by disabling access to screens via the path input field.

Note that appending screens might actually be a useful feature to implement at some point.
2007-11-08 13:49:11 +00:00
Campbell Barton
40f871c07f * new stamp option to stamp forground sequence strip name.
* made stamp filename optional
* renamed weightpaint "Filter" to "Blur"
* made the defailt weightpaint opacity 1.0 rather then 0.2 so when you select 1.0 weight you can paint it with without multiple clicks.
2007-11-08 13:02:59 +00:00
Joshua Leung
0100ebe230 Bugfix #7682: Constraint.InsertKey works odd for PoseBones
Constraint.InsertKey was inserting keyframes for the wrong action-channel. It was doing so for the active bone, not the owner of the constraint.
2007-11-08 09:49:49 +00:00
Joshua Leung
45f72036a5 Patch #7722: no 'Auto IK' for solitary (unconnected) bone
'Auto IK' is a great feature, however when solitary unconnected bone (without connected child bones) is grabbed it can't be moved because of IK. This can be really annoying. Preventing 'Auto IK' for solitary bones would improve user-experience by making mixing of FK and IK  more convenient while using 'Auto IK'.

Patch by Teppo Kansala (teppoka).
2007-11-08 08:27:21 +00:00
Joshua Leung
3f6d993dce Patch #7760: X-Axis-Mirror support for 'make bone parent'
This patch by Teppo Känsälä (teppoka) makes parenting bones with Ctrl-P support the X-Axis-Mirror option for Armatures. It will cause the mirror-bone of the selected bone to also get parented. i.e. if "bone.R" was selected and being parented, "bone.L" would also get parented.

I've made an addition to this patch, which means that if the bone that acts as the parent also has a mirror-bone (i.e. when parenting "lowerArm.L" to "upperArm.L", "lowerArm.R" gets parented to "upperArm.R"). Otherwise, they both get parented to the same parent bone (i.e. a parent bone that doesn't belong on either side such as "upperSpine")
2007-11-08 08:06:50 +00:00
Campbell Barton
574744bf42 New Curve function in the curve specials menu - "Smooth Radius" this smooth's the radius of selected curve points to unselected or endpoints. useful when changing the taper of a long curve
with many points (think treetrunk), it would be nice to take into account distance on the path when doing the curve interpolation.
Also moved added undo call's that were missing for 2 of the other curve specials.
2007-11-08 00:06:48 +00:00
Joseph Eagar
b4ec6efb41 =Python API bugfix=
Scene.update(full=1) was pretty useless as it didn't actually evaluate the
depsgraph DAG.  This meant, for example, that re-evaluating the parenting
tree for an armature pose could only be done by redrawing the view (which
evaluates the depsgraph). scene_update_for_newframe() is now called when Scene.update is in "full" mode; to prevent firing off newframe scriptlink events, scriptlinks are
temporarily disabled while scene_update_for_newframe() is being called.
2007-11-07 18:52:23 +00:00
Campbell Barton
50e5c9d1c2 own silly error, was reusing an existing flag for the draw curve handles setting. 2007-11-07 13:02:50 +00:00
Ton Roosendaal
2480173125 Small fix for feature 'custom weight paint range': the range was not
initialized on starting Blender.
2007-11-07 11:14:52 +00:00
Campbell Barton
94e8a05ba6 curve selection wasnt checking if the screen coords were clipped. made selecting off screen verts possible. This looks like an old bug (at least it existed before I added
hide handles option).
2007-11-06 19:56:25 +00:00
Campbell Barton
2ad21e2286 ==Python API==
Blender.Geometry.ClosestPointOnLine(pt, vec1, vec2) -> (pt, lambda)
This wraps lambda_cp_line_ex

Needed for experemental tree generator
2007-11-06 18:53:46 +00:00
Brecht Van Lommel
296a8ca146 Bugfix:
Mesh deform invert vertex group influence didn't work entirely correct.
2007-11-06 14:15:45 +00:00
Campbell Barton
6142ae3785 ==Python API==
Bugfix, Space Handlers could crash blender when used with armatures.
also fixed some possible bugs in other areas.
2007-11-06 13:44:26 +00:00
Joshua Leung
9cd76a6609 == "Extend" Transform Mode for Action + NLA Editors ==
Peach Request:
Now the Action and NLA editors have the "Extend" transform mode first seen in the Sequence Editor. Just use the EKEY to start transforming.

It works like Grab, except it only moves the keyframes/side of NLA-strip that was on the same side of the current-frame marker as the mouse was when transform started.
2007-11-06 11:41:09 +00:00
Brecht Van Lommel
f66aeb7a74 Bugfix:
Mesh deform modifier crashed when applied to lattices.
2007-11-06 11:25:48 +00:00
Brecht Van Lommel
e2504c2ff1 Mesh Deform Modifier
====================

Added a button to invert the vertex group influence, to make blending
between mdef and armature deform easier.
2007-11-06 09:44:34 +00:00
Campbell Barton
f1c6a69aad sequencer snap was crashing when no last selected was available (own mistake)
material names spelling was odd - HalveGreen -> HalfGreen
2007-11-05 21:06:27 +00:00
Brecht Van Lommel
63c5dbe745 Bugfix:
B-bones didn't work well with non-uniform scaling applied to them.
The code to solve this is not too pretty, but don't know how to do
it simpler, and at least it makes that stretchy spine work.
2007-11-05 18:44:42 +00:00
Brecht Van Lommel
7d70dd98d6 Bugfix:
Dual quaternions + armature modifier vgroup didn't work together correct.
2007-11-05 17:38:07 +00:00
Kent Mein
86278584f3 Tweaks I needed to get blender compiling on my new macbook running leopard.
Kent
2007-11-05 17:27:11 +00:00
Brecht Van Lommel
1b9d661eca Mesh Deform Modifier
====================

The MeshDeform modifier can deform a mesh with another 'cage' mesh.
It is similar to a lattice modifier, but instead of being restricted
to the regular grid layout of a lattice, the cage mesh can be modeled
to fit the mesh better.

http://www.blender.org/development/current-projects/changes-since-244/modifiers/

Implementation Notes:
- OpenNL has been refactored a bit to allow least squares matrices to
  be built without passing the matrix row by row, but instead with
  random access. MDef doesn't need this actually, but it's using this
  version of OpenNL so I'm just committing it now.
- Mean value weights for polygons have been added to arithb.c, a type
  of barycentric coordinates for polygons with >= 3 vertices. This
  might be useful for other parts of blender too.
2007-11-04 22:00:24 +00:00
Ton Roosendaal
044ae7f82f A different approach for the new driver option: it now uses pose-space
instead of bone-space. This makes it visual easier to use. For the todo:
a large array of buttons for users to pick what kind of 'space' is used?
2007-11-04 19:41:21 +00:00
Ton Roosendaal
f996607632 New driver option for the poor suffering riggers:
"Rotation Difference"

This option, for Bones, allows the angle between two Bones to be
the driver for another Ipo channel. This angle now is hardcoded 
based on the Bone-space orientation (without parenting rotation).

Thanks to nathan for poking and test!
2007-11-04 17:14:39 +00:00
Chris Want
034138b597 Bug fix to handle extruding with a mirror modifier, now that axes are
specified with a bitmask rather than only operating on a single axis.
This is a reworking of the fix done in blender 2.42 that was mentioned
in the sixth on item on this page:

http://www.blender.org/development/release-logs/blender-242/mesh-tools/
2007-11-04 02:25:32 +00:00
Joshua Leung
5baf3bd490 Typo fix for my previous commit... wrong-sized array was being allocated, but somehow this still managed to work fine last night. 2007-11-02 03:00:35 +00:00
Martin Poirier
c3cc13e71b == utils ==
New listbase functions:
	void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink);
		- corrolary to insertlinkbefore
		
	BLI_sortlist(struct ListBase *listbase, int (*cmp)(void *, void *));
		- simple in place sorting method. NOT optimized, so use for small lists only. Uses a variant of insertion sort (I was lazy, people should feel free to rewrite).
2007-11-01 21:44:41 +00:00
Brecht Van Lommel
0ca5c98f23 Hinge Bone Transform
====================

This changes the way hinge bones are transformed when their parent bones
are also selected. Before it just disabled transform for these, now they
are rotated and scaled as well, but without influencing the transform
center, which gives behaviour as if they were regular bones.
2007-11-01 12:55:47 +00:00
Brecht Van Lommel
c5d2be76d7 IK
==

Solving is now done independent of scale, by scaling the chain to have a
size of about 1.0. This solves some issues with small or big chains, and
also makes the IK stretch setting independent of scale. The latter breaks
backwards compatibility somewhat, but is an improvement over what it did
before.
2007-11-01 12:40:46 +00:00
Joshua Leung
aa7c13c9a0 Bugfix - Ipo-Editor Scaling:
When scaling all the control-points in the IPO Editor with negative scales, the control-points would end up "sticking together", and cancelling/undo would not help.
2007-11-01 11:40:56 +00:00
Joshua Leung
1b4ca6d1bd Bugfix #7639: Visual Rot keyframing not working properly
When using targetless-ik, the offset in rotation of the final transform from the rest-position was being incorrectly calculated. 

Now, visual-rotation keyframing uses the space-switching code I wrote for constraints, to calculate the value to keyframe. So far, it seems to work quite well. 

As the constraint space-switcher correctly handles hinged bones too (I think it should!), I've also removed the restriction of only allowing visual-rotation keying on bones that didn't have hinge set.
2007-11-01 11:08:07 +00:00
Matt Ebb
0edb5983ec * Two usability tweaks in adding objects, with user prefs
This changes the default behaviour in adding new objects, which has been
discussed for a long time, in person, on the funboard, and in the tracker,
and was agreed to be implemented during the 2.5 release cycle, so here it is.
They have been made default, with preferences to bring back old behaviour since 
although people like myself still prefer the new default anyway, it will benefit 
new users the most. 

The preferences are in the 'Edit Methods' section, changing back to old behaviour
is as simple as a click of a button.

- Switch to edit mode preference 

By default, now adding a new object doesn't automatically switch to edit mode.
Not only can this be annoying (most of the time when setting up scenes and models
I don't want to edit it straight away anyway), but it's a major hurdle in the learning
curve that new users have had to deal with at a very early stage.

Blender's different modes are an important part of understanding how the software works
and should have clear behaviour. The problem is that when a user selects something from
the add menu, he's not telling Blender to change modes, he wants to add an object.
But Blender then goes ahead and changes modes underneath him anyway, something that was 
never explicitly asked for, something that's unrelated to the mental task at hand, and 
fundamentally important to the operation of the software.

We observed plenty of people struggling with this during the training sessions that 
we ran during Project Orange, and there's also no shortage of "why can't I select 
other objects" questions on the forums.

- Aligned to View preference

Now by default, adding a new object doesn't rotate it so it's aligned facing the view, 
but rather, it's remains unrotated in world space. This is something that's more of 
a convenience issue (allowing people like me to stop the 'Add->Tab->Alt R dance), 
but also makes things easier for new users, especially when doing things like rigging.

For a lot of tools in Blender, like curve deform, path cycling, constraints, it's necessary
for your objects' local axes to be aligned. This requirement isn't that obvious, and I've 
had to debug rigs a few times from the animator in our studio, who has everything set up
correctly, but he just happened to be in a different vie at the time he added the object,
so they're misaligned and causing problems. Having all objects get created aligned to
worldspace, by default, makes a lot of these problems go away. It's much more understandable
when rotations are caused by something you've done explicitly, rather than as a side effect
of the software.

For convenience as well, most of the time, when I'm working in context and I decide I need a new object, 
particularly working on production scenes that involve more than just one model, an Alt R 
is almost always required after adding, since I don't want to have to disrupt the current 
view of the scene by switching to top view, just to add an object. It's a bit arbitrary, 
the view from which you want to look at your objects isn't usually the way you want them to
be looking at you.
2007-10-31 21:55:06 +00:00