Commit Graph

4218 Commits

Author SHA1 Message Date
Willian Padovani Germano
399f670ac7 Scripts updated:
- 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.
2005-07-11 02:41:08 +00:00
Joseph Gilbert
c015d52d76 Removed ika files from projectfiles for armature update 2005-07-10 20:40:20 +00:00
Johnny Matthews
3d267e88e3 Fix for Bug #2793.
A really dumb coding error that I made when I coded this. left out brackets around an if block.
2005-07-10 13:45:12 +00:00
Ton Roosendaal
31f50d9247 For long on the wanna-have list;
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.
2005-07-10 12:50:14 +00:00
Ton Roosendaal
227a67e105 Bug fix #2774
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.
2005-07-10 11:00:27 +00:00
Ton Roosendaal
65c9ea4588 Duplicating armatures didn't give proper re-build pose signal. 2005-07-10 10:36:01 +00:00
Ton Roosendaal
d7c7b54875 Switching scenes in the editor now correctly exits all modes, it didn't do
vertex/weight/texture paint yet.
2005-07-10 09:55:55 +00:00
Ton Roosendaal
36c2f0b682 Bug fix #2790
Pressing Wkey with no object active crashed.
2005-07-10 09:42:13 +00:00
Ton Roosendaal
3d6d14011c Bugfix #2791
Apply deform without object active crashed (only when using pulldowns)
2005-07-10 09:38:36 +00:00
Ton Roosendaal
7a31d07fda Bugfix #2797
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.
2005-07-10 09:32:30 +00:00
Ton Roosendaal
9fa952f9a5 Bugfix #2803
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.
2005-07-10 08:55:14 +00:00
Ton Roosendaal
0c89ddbf1c Changed type for new textimeout and texcollectrate into "int".
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?
:)
2005-07-10 08:31:56 +00:00
Ton Roosendaal
a7cd780ebf Armature;
- 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
2005-07-09 20:40:44 +00:00
Ton Roosendaal
d7bf5c0583 New! Pose-constraint Ipos now are integrated in NLA. ALso cleaned up the
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.
2005-07-09 19:37:38 +00:00
Daniel Dunbar
ef4bc76dc7 - add missing includes for lazy programmers who don't read error msgs 2005-07-09 18:04:53 +00:00
Daniel Dunbar
23980dd6b0 - fix what appeared to be obvious bug, "if (fclose) fclose(file)" ->
"if (file) fclose(file)", Text3d.c owner should check.
2005-07-09 17:54:03 +00:00
Ton Roosendaal
a4f907d2e0 Armatures; the bones menu used for "Make Parent" (CTRL+P) used wrong
indices still.
Cleaned the code, moved to editobject.c
2005-07-09 16:16:45 +00:00
Ton Roosendaal
30f89a6db7 Armature drawing fixes;
- Dashed line to parent bone was drawn to wrong bone in Rest Position
- Dashed line had selection color of parent, not of own bone.
2005-07-09 14:08:09 +00:00
Ton Roosendaal
c8f195d00c - Fix for action constraints; for Bone targets (target is input bone
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
2005-07-09 13:41:01 +00:00
Ton Roosendaal
24c9dc7322 Commented out one more line to make debug version of engine compile, needed
because API for armatures changed.
2005-07-09 13:33:36 +00:00
Ton Roosendaal
5b24b2d31e Two little bugs showing up in workshop;
- 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...
2005-07-08 06:55:10 +00:00
Ton Roosendaal
895c9a55d8 Two small fixes;
- 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)
2005-07-07 07:03:35 +00:00
Martin Poirier
6a2cf42b7d Well, it's better if the spelling is corrected everywhere the variable is used... (why must I make that kind of error?!) 2005-07-06 08:14:13 +00:00
Martin Poirier
167110c3aa After much debate on IRC, it was decided to spell "cancelled" properly... 2005-07-06 08:09:51 +00:00
Ton Roosendaal
f0ae48dfe5 Pressing ESC on armature posemode now restores position correctly again. 2005-07-06 07:31:43 +00:00
Ton Roosendaal
d956c62044 Reverted accidental change in compiling Python for OSX. Now it is default
again to use the Framework library.
2005-07-06 07:01:27 +00:00
Martin Poirier
c68a0ea7c3 Image garbage collection settings init was in the wrong do_version branch (236 instead of 237). 2005-07-06 05:10:31 +00:00
Martin Poirier
22a18ecdb8 3D view orbit option: Around Active
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.
2005-07-06 00:33:41 +00:00
Chris Want
d50b2c0ff8 Make WITH_FREETYPE2 and INTERNATIONAL set to true by default when
building under linux (set to false in user-def.mk if you don't
want them).
2005-07-05 19:04:52 +00:00
Martin Poirier
bc60480d15 cursors.c for blender's special cursors was half done.
GetBlenderCursor was prototyped but never defined. I filled it in, might be useful at one point (and for some uncommited evil Py code of mine).
2005-07-05 00:46:52 +00:00
Martin Poirier
44ed77b888 Added some missing quaternions fonctions:
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
2005-07-05 00:30:40 +00:00
Martin Poirier
1ec178ecc7 MSVC 6.0 projectfiles update for the removal of IKA files. 2005-07-04 23:32:59 +00:00
Ton Roosendaal
4fb314b809 Action constraint works again. Needs revision though... do that with
testfiles i get from Bassam. :)

Further removed old code that was ifdeffed hanging around still.
2005-07-04 20:09:32 +00:00
Ton Roosendaal
a4e959b369 Merging error... rotating bones in pose-mode, with an action inserted
accidentally flushed recalc of Pose. So it popped back to the action state,
preventing editing new keypositions.
2005-07-04 17:41:58 +00:00
Martin Poirier
71f3e88293 Fixing pose mode transform.
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.
2005-07-04 05:16:54 +00:00
Ton Roosendaal
d59894ac42 Old define in engine still... 2005-07-03 18:10:41 +00:00
Ton Roosendaal
28a1e8277b Result of 2 weeks of quiet coding work in Greece :)
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-
2005-07-03 17:35:38 +00:00
Martin Poirier
99a8747e82 Warning hunt:
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.
2005-06-30 04:11:41 +00:00
Martin Poirier
a344dca9cf Transform stuff
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).
2005-06-28 07:58:16 +00:00
Kent Mein
12d10f45ea Bug reported by Jean-Baptiste.
(Inexed 0 0 0 instead of 0 1 2

I also removed dos linebreaks.

Kent
2005-06-27 15:57:09 +00:00
Brecht Van Lommel
ece2733c63 Patch by Martin Poirier: display normalized coordinates in image window, with
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.
2005-06-26 15:37:36 +00:00
Alexander Ewering
08169d7fba The overlapping curves/material indices problem got a bit out of control.
- 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!
2005-06-25 22:51:51 +00:00
Alexander Ewering
da76fc6e03 Fix a potential issue with vfontb/i/bi not getting freed when converting
font to curve.

(Sorry, I had typed a 10000k commit log last time, then it errored and
I really don't feel like retyping it all.)
2005-06-25 12:18:23 +00:00
Joseph Gilbert
bb7b3c4612 - update to add lorem.c dependency 2005-06-24 17:23:47 +00:00
Daniel Dunbar
eb41fcdf23 - bug fix, crash with edges with no face in subsurf 2005-06-24 05:30:41 +00:00
Daniel Dunbar
83f988c279 - bug fix, vertex normal calculation during incremental update was not
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?
2005-06-23 23:44:22 +00:00
Martin Poirier
0a92e159d9 Segfault waiting to happen. This is way old code that I did, I blame my rusty C skills from back then (and the fact that lazy evaluation would make it work correctly). :) 2005-06-22 05:45:23 +00:00
Alexander Ewering
9020455429 Removed a debug print 2005-06-21 15:10:49 +00:00
Daniel Dunbar
7e4e8b9a50 - fix strange declaration of adduplicate that just used matrix argument
as flag... confusing and weird.
2005-06-21 14:51:57 +00:00
Daniel Dunbar
50b4a5a958 - #ifndef O_BINARY section should be after includes which would define
it...
2005-06-21 14:14:41 +00:00