- Jean-Michel Soler: paths import -- ai and svg modules;
- Jean-Baptiste PERIN: bvh to armatures (note: should not work until we re-wrap armatures in bpython);
- Campbell Barton: obj importer.
Thanks guys, excuse me the delay.
- tiny doc update.
Ipocurves with "Auto" handles now have option to remain horizontal on the
extrema (tops & valleys). Use ALT+H to set this per selected curve.
Note this is a per-curve feature, not per-handle.
If it works satisfying I can check on making this the default new added
curve.
Using linked library files with relative paths, didn't set the correct
relative root... so it only worked with files in the same directory.
ALso fixed the button-lock in material buttons, it didn't allow to see
which materials were linked to the mesh/object.
Editmesh SHIFT+F "Fill" used an unsigned char to count amount of selected
edges linking to vertices, but also subtracted... causing the char to
become 255. Gave crashes (or infinite loops) when using "Fill" on random
input of solid meshes.
Transparent shadow could accidentally intersect first with a face being
farther away, due to the fact larger faces can fill up multiple octree
nodes. Had to use the same exception handling as for raytracing mirror or
glass.
Please note that the "long" should be avoided in dna structs... it is a
reserved type for use in our code for pointer storage. It is 32 or 64 bits,
depending CPU architecture (pointer size).
The "long" type currently is in the makesdna.c code, and interpreted as 32
bits only, which is actually wrong yes... I should remove it or code it
correct.
BTW; this gave a warning in space.c, another case where MSVC forgives you?
:)
- IK constraint now uses Ipo from action again
- Bug in last commit; the object action was ignored... did NLA always
Editmesh:
- when there are edges in mesh, it now only copies selection in edges
when you have selectmode edge
weird disabled code that was hanging out there for ages.
Also cleaned up NLA blending itself, it was copying far too much data
around. Should be three times faster or so... need good test!
And restored Action Baking.
actually) only the relative rotation is used.
- Added scale=1.0 initializer in saving files, this fixes a little bit
better upward compatibility
- Still there are cases where bones flip 180 degrees when you read it with
older Blenders... not sure what it is caused by
- update_for_new_frame() (on frame advance, alt+a) crashed when no 3d view
was opened ever (NULL pointer)
- using proportional mode on Curve editing wrote beyond end of a malloced
block. Just a minus one needed here...
- ALT+R clear rotation on PoseMode didn't work when an Action was assigned
- 'Delete object' didn't set object pointers to NULL for Armature/Pose
constraints (old bug)
This fixes the active object in place when orbiting the view.
Choppy 15fps demo can be seen there: http://www.elysiun.com/~theeth/bf/around_active.html
Image Memory Grabage Collection
This adds memory handling to the image code. An image is tagged each time it is used.
During a collection cycle (frequency of cycles is user defined), if an image is older
than a user defined limit, its buffer gets deallocated. This also applies to gl memory buffers.
Images that are loading in GL memory needs to go through two time outs before being fully deallocated: the first time out deallocated the gl memorry, the second the buffer in ram.
Notes:
Image buffer loaded from python gets tagged as permanent upon load. That tag is removed when python stops using the image.
I might have missed some tagging spots, especially in the rendering pipeline. Someone with more knowledge about this code should check to be careful.
Tagging is done on every access, for rendering, this will probably be a performance hit. A scheme should be developped to only tag when the rendering is completed.
Collecting is called in draw_object, most likely not the best place to do it.
Safe from undo, since using undo deallocates memory anyway (like when loading a blend file with one currently opened)
Userpref DNA changes:
I've changed a couple of flagging variables from short to int. Some because they needed more space, others to keep SDNA happy.
Info window changes:
I've grouped a couple of buttons in aligned blocks and changed the color of mutually exclusive options to make them clearer.
Matt didn't do any changes on that in tuhopuu, so hopefully I'm not stepping on anyone's feet with this.
Also changed double constants into floats with f in a couple of places (mostly space.c) to make compiler happier.
QuatMulVecf Multiplies vector (3-float) by quaternion (rotation). Assumes it recieves a unit quaternion
QuatConj Quaternion conjugate
QuatInv Quaternion inverse (does not assume a unit quat)
QuatMulf Quaternion multiplication with scalar
QuatDot Quaternion dot product
printquat debug print function
With new system, very easy to do in the end (figuring it out was less so).
No need to go down parent chains or anything of the sort, just apply parent pose and we're all set.
Ton's commit reverted back before my include files cleanup in transform, recleaning.
Also, as mentionned by bjornmose, declaration after instruction choked MSVC. Fixed.
Aim was to get a total refresh of the animation system. This
is needed because;
- we need to upgrade it with 21st century features
- current code is spaghetti/hack combo, and hides good design
- it should become lag-free with using dependency graphs
A full log, with complete code API/structure/design explanation
will follow, that's a load of work... so here below the list with
hot changes;
- The entire object update system (matrices, geometry) is now
centralized. Calls to where_is_object and makeDispList are
forbidden, instead we tag objects 'changed' and let the
depgraph code sort it out
- Removed all old "Ika" code
- Depgraph is aware of all relationships, including meta balls,
constraints, bevelcurve, and so on.
- Made depgraph aware of relation types and layers, to do smart
flushing of 'changed' events. Nothing gets calculated too often!
- Transform uses depgraph to detect changes
- On frame-advance, depgraph flushes animated changes
Armatures;
Almost all armature related code has been fully built from scratch.
It now reveils the original design much better, with a very clean
implementation, lag free without even calculating each Bone more than
once. Result is quite a speedup yes!
Important to note is;
1) Armature is data containing the 'rest position'
2) Pose is the changes of rest position, and always on object level.
That way more Objects can use same Pose. Also constraints are in Pose
3) Actions only contain the Ipos to change values in Poses.
- Bones draw unrotated now
- Drawing bones speedup enormously (10-20 times)
- Bone selecting in EditMode, selection state is saved for PoseMode,
and vice-versa
- Undo in editmode
- Bone renaming does vertexgroups, constraints, posechannels, actions,
for all users of Armature in entire file
- Added Bone renaming in NKey panel
- Nkey PoseMode shows eulers now
- EditMode and PoseMode now have 'active' bone too (last clicked)
- Parenting in EditMode' CTRL+P, ALT+P, with nice options!
- Pose is added in Outliner now, with showing that constraints are in
the Pose, not Armature
- Disconnected IK solving from constraints. It's a separate phase now,
on top of the full Pose calculations
- Pose itself has a dependency graph too, so evaluation order is lag free.
TODO NOW;
- Rotating in Posemode has incorrect inverse transform (Martin will fix)
- Python Bone/Armature/Pose API disabled... needs full recode too
(wait for my doc!)
- Game engine will need upgrade too
- Depgraph code needs revision, cleanup, can be much faster!
(But, compliments for Jean-Luc, it works like a charm!)
- IK changed, it now doesnt use previous position to advance to next
position anymore. That system looks nice (no flips) but is not well
suited for NLA and background render.
TODO LATER;
We now can do loadsa new nifty features as well; like:
- Kill PoseMode (can be option for armatures itself)
- Make B-Bones (Bezier, Bspline, like for spines)
- Move all silly button level edit to 3d window (like CTRL+I = add
IK)
- Much better & informative drawing
- Fix action/nla editors
- Put all ipos in Actions (object, mesh key, lamp color)
- Add hooks
- Null bones
- Much more advanced constraints...
Bugfixes;
- OGL render (view3d header) had wrong first frame on anim render
- Ipo 'recording' mode had wrong playback speed
- Vertex-key mode now sticks to show 'active key', until frame change
-Ton-
INIT_MINMAX and INIT_MINMAX2 are always used on floats but use doubles for initializing, giving countless warnings.
Added the nice 'f' to tell compilers that we want floats.
Cleanup in transform.c: removed uneeded includes and removed REPEAT experiment.
Split off manipulator init function, no need to resort on hacks to setup stuff before starting transform anymore.
Fix0r3d single axis projection for constraints. It deals with perspective correctly now (as much as planar constraints).
a few small modifications:
- also display normalized coords while transforming
- adapt step size & precision for button
- moved option to 'View' menu
Also made sure pixel snapping when transforming uv's is off by default.
- For avoiding the 'overlapping character problem' in Text objects, I had
changed the sorting code for filling nurbs to use nu->charidx (a new
variable incremented with each new character) instead of nu->mat_nr
(which used to work for material indices inside a 2D Curve).
- This broke material indices in normal 2D Curves completely, thus:
- nu->charidx is now not only used for seperating
characters in text objects for filling, but also for normal 2D curves
when they contain material indices. In fact, charidx is just set to
the material index.
- There's compatibility code in readfile.c that sets nu->charidx to nu->mat_nr
when reading curves from files that are not text objects
- So, the big conclusion: Instead of using material indices for creating
'filling groups', filldisplist() now uses nu->charidx, which is set
appropriately when reading old files and assigning/deleting material
indices in curves.
- This is all pretty obscure and hard to explain. If I haven't been clear,
ask.
- If it breaks anything, complain!
correct (although fairly unnoticable).
- bug fix, vertex normal calculation didn't normalize face normals before
summing... silly mistake
p.s. perhaps the Crystal Space bla bla naming conversation is not most
appropriate for the commit list?