This commit is an attempt at improving the behaviour of the Push Pose tool (Ctrl E) when dealing with quaternion rotations. Now the delta rotation from the previous keyframe to the current pose is taken and 'added' to the current pose. This may not be the best behaviour yet, but at least there are some visible results now (compared to before, when the method used resulted in minor twitching only).
Also, fixed a number of bugs that went unnoticed for a while due to various refactors:
- quaternion rotations were broken for the pose sliding tools, since the wrong RNA path was being used
- the wrong keyframes were being picked up due to float vs ints being passed to the searching functions
Shift-MMB for user orientation constraint selection didn't work for global orientation (the matrix wasn't initialized properly).
Also, MMB can be used to cancel a constraint again.
Now the default eye separation value is 0.10 (reasonable for games with 1 meter == 1 B.U.
The focallength used is the camera focal length (DOF settings). It allow you to even use different focal lengths for different scenes (good for UI)
In order to change it you can change the camera focal length or use Rasterizer.setFocalLength.
If you use the Rasterizer method it will use this value for all the cameras.
ToDo:
- Blenderplayer settings
- Update wiki documentation (any volunteer)?
* Note to stereo fans:
I don't have a real stereo environment to test it (other than cheap cyan-red glasses). If you can give it a try in a more robust system and report bugs or problems with BGE current system please let me know. I would be glad to help to make it work 100% by the time Blender 2.5 is out.
For the record, BGE is using the method known as 'parallel axis asymmetric frustum perspective projection'. This method is well documented here:
http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/stereographics/stereorender/
* utility function BLI_findstring to avoid listbase lookup loops everywhere.
eg:
ListBase *lb= objects= &CTX_data_main(C)->object;
Object *ob= BLI_findstring(lb, name, offsetof(ID, name) + 2);
* made some more math functions use const's, (fix warnings I made in previous commits)
* Reorganised the (template) drawing code for modifiers, removing some old/commented out code, and grouping related sets of info to draw
* Separated the render/realtime/editmode toggles into a separate row below the modifier name so that the layout is less compressed with narrow properties windows (i.e. on the default setup).
is now just used to set the rotation property value during invoke.
This removes some reliance on 3d view info for non-interactive use, and also lets you specify
new object's locations/rotations explicitly when calling from Python.
* Fix for compiler warning in mesh.c from previous commit
* Fix for wrong name for dopesheet filter button used for meshes
* Added RNA defines for the default values for quaternion and axis-angle rotations, so that clearing these to their default values "does the right thing (TM)"
The system that ensures unique ID names chopped off the end
of the name to add a number suffix (.001 or so) regardless of
whether it already had a number or not. In this particular case,
(no suffix number) it now just shaves off the last letter of the
name until it's unique.
I've been testing this patch here for a while, and seems to work
properly, if anyone would like to have a quick look over this
commit and doublecheck, that would be great too.
Now, there are preset brushes made for each tool type (eg. for sculpt mode, Grab,
Draw, Inflate, etc), and the recommended method for changing sculpt tools is to
change between Brushes. The shortcut keys for changing between tools have
now been changed to change between named brushes - the G key in sculpt
mode now changes to any brush named 'Grab'.
The advantages of this are:
* Changing between brushes remembers the strength/size/texture etc settings for
each brush. This means that for example, you can draw with a strong textured
Clay brush, but then switch quickly to a weaker, untextured Smooth brush,
without having to re-do your settings each time.
* You can now add your own custom shortcut keys to your own custom brushes -
just add a keymap entry similar to the existing ones, that references your own
custom brush names.
To bring over these new default brushes to an existing B.blend setup, just
append them in from the new B.blend in svn.
* Mesh data/settings can now be animated. It is not recommended that geometry be animated directly, but other settings such as autosmooth, etc. can be...
* Code cleanups for depsgraph, making sure that drivers get included for all object data types.
* NURBS and Font animation data now appear in the animation editors.
* Fixed depsgraph tagging code for determining if the AnimData attached to object data blocks (i.e. animation for curve or lamp data) needs to be tagged for updates on frame changes. This means that animating curve settings now works.
Move gridview (the actual drawn grid size, including adaptation to zoom) to RegionView3D from View3D.
This solves the transform increment bug but not the Snap Menu bug (context is not set to the correct rv3d when executing operator from menu).
Useful if you have 2 different characters with the same base mesh (matching indicies), and want to copy a facial expression for eg, from one to another.
Durian request to re-use shapes between characters.
* Copies the active shape to other selected objects
* Different methods to apply the shape
* * OFFSET, simple translation offset
* * RELATIVE (EDGE/FACE), Use Barycentric transformation to copy the shape. This means the target mesh can be a different orientation and scale and the shape should still apply since the surrounding geometry is used as a basis for the offset.
bug: barycentric transform's depth was inverted.
Note:
* This isnt added into a menu yet,
* This cant be redone since adding a shape key messes up the redo stack. needs fixing for other scripts too.
From 2 triangles and 1 point, the relative position between the point and the first triangle is applied to the second triangle to find the target point.
the barycentric weights are calculated in 2D space with a signed area so values outside the triangle bounds are supported.
wrapped by python:
pt_to = Geometry.BarycentricTransform(pt_from, t1a, t1b, t1c, t2a, t1b, t1c)
NOTE:
- moved some barycentric weight functions out of projection painting into the math lib.
- ended up making some of the math functions use const args.
TODO:
- support exceptional cases. zero area tries and similar.