Commit Graph

47594 Commits

Author SHA1 Message Date
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
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
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
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
Daniel Dunbar
64e7615b5b - fix pedantic complaint from MSVC 2005-06-21 14:13:44 +00:00
Alexander Ewering
f1ac77db68 - Copy buffer is preserved across editing multiple text objects
- Potential memory leak with selection drawing fixed
- "Copy Attributes" menu (CTRL-C) now copies all fonts (Plain/B/I/BI)
  correctly
2005-06-21 13:52:29 +00:00
Johnny Matthews
245acfc909 Updating with lorem.c 2005-06-20 13:37:52 +00:00
Alexander Ewering
4aee690bbd Fix for the "Lorem" button. Missing an extern keyword in BIF_editfont.h
(thanks Matthew for spotting this!)

Now it should work even on platforms with sane compilers (unlike gcc) :-)
2005-06-20 01:28:42 +00:00
Alexander Ewering
e7e61ba489 Attempt at providing the best possible flexibility and usefulness with
"Flush":

- There are now two modes, "Flush" and "Justify". Justify only flushes
  a line when it is *terminated* either by wordwrap or by Enter.

- "Flush" *always* flushes the line, also when it's still being entered.

  This mode can be used for things like this:

  http://pub.intrr.org/flush.png

  ..while "Justify" would not flush the second line.

- Fixed "Flush" squeezing all characters on the same spot if the textframe
  was set to 0 width
2005-06-18 00:52:25 +00:00
Alexander Ewering
5a7a2e8f78 Fix drawing of text frames inside editmode, stupid error. 2005-06-17 23:30:39 +00:00
Alexander Ewering
d422964c31 Compatibility code for 'Word spacing' value, old files will now load
with Word spacing set to 1.0 instead of 0.0.
2005-06-17 23:05:59 +00:00
Alexander Ewering
ad8ff9762b - Fix a few warnings
- Improved text editing for justified ('Flush') text: Line will not
  be filled up until it is completed (wordwrap or Enter)

- Fixed waitcursor flickering in displist.c
2005-06-17 22:52:11 +00:00
Alexander Ewering
e48ea7e668 File containing our famous Lorem Ipsum text, complete even! 2005-06-17 21:05:38 +00:00
Alexander Ewering
97df61a7e5 Initial commit for new text object.
Important notes:

 - Full compatibility with old text objects not fully restored
   (word spacing will be 0.0, need to set it manually to 1.0), will
   either need version upgrade to 238 or a hack. Will check.

 - lorem.c (about to be committed) contains BF copyright notice, but as
   BF did not exist a few hundred years ago, probably best to remove it :)

 - If you notice any cross-platform issues (especially beloved windows),
   please report

 - A few tiny warnings left, I will fix those issues still.

The rest has been said already - so have fun testing. And please do!

=== Reminder:
=== Documentation at http://blender.instinctive.de/docs/textobject.txt ===
2005-06-17 21:04:27 +00:00
Martin Poirier
9ee2a1ee09 One file missing from prevous commit. This one is even worse, decref'ed a borrowed reference. 2005-06-17 05:37:24 +00:00
Martin Poirier
5f5844b95e Some of the setattr functions created a tuple to pass to the set* functions and didn't decref'ed it properly, "leaking" memory.
Commit approved by stivs.
2005-06-17 05:10:14 +00:00
Martin Poirier
2a640f03cd My patch to BPy's curve module (applied by stivs) had a small mem leak. Fixing now. 2005-06-17 04:40:07 +00:00
Martin Poirier
e382d8ad4a Adding Jiri's manipulator path. This makes Normal orientation align to meta element's rotation (in edit mode, obviously). 2005-06-17 04:28:01 +00:00
Ton Roosendaal
5fac7965c2 Bug #2751
Recurring issue, but also bug in 2.37/37a: OSA sample amount versus AO
sample amount conflict... if AO and OSA amounts were exact equal it gives
black spots. Solution not optimal yet... but at least looks good.
Still think it's useless to sample fewer than AO level 8 (64), but
nevertheless. :)
2005-06-16 21:56:49 +00:00
Ton Roosendaal
49d38efe7e With no objects in scene, press F (ALT+F) for faceselect crashed.
Bugfix #2755
2005-06-16 21:19:13 +00:00
Stephen Swaney
401dfba305 Changes to Documentation Format ONLY.
no executable code.

Martin noticed many of our bpy instance variables were
incorrectly marked as class variables in the doc.  This
commit essentially changes the title of sections of the doc
from Class Variables to Instance Variables.  Now that we are
adding class or module dictionaries for constants, etc. this is
a distinction worth making.  Plus it is right.
2005-06-15 06:22:26 +00:00
Ton Roosendaal
79d2ae1134 Splash for 2.37a 2005-06-13 20:33:44 +00:00
Stephen Swaney
769fa6252d Patch from Martin Poirier.
Misc bpy Curve fixes and updates, includes bugs #1687 and #2637
2005-06-13 19:15:02 +00:00
Stephen Swaney
7e81664287 remove version number for doc directory name as
discussed at today's meeting.
Was BPY_API_237, now BPY_API
2005-06-12 16:20:29 +00:00
Ton Roosendaal
161f8b3dbe Bug fix #2737
Extrude 1 edge, created with Fkey for 2 vertices, didn't give the
correct options... lacked a countall() to update stats.
2005-06-12 12:57:21 +00:00
Ton Roosendaal
0197fdc8b5 Bugfix #2734
Added update of normals and face center after using NKey properties or
do-centre option in Mesh EditMode.
2005-06-12 12:44:51 +00:00
Willian Padovani Germano
3d4438dcd7 Scripts:
- Campbell Barton updated his Wavefront obj importer;
- Jean-Michel Soler updated his paths import (eps part).

BPython bug fixes:

- oldie found by Ken Hughes: reference count of two pyobjects not being decremented in slider callback (Draw.c):
http://projects.blender.org/tracker/index.php?func=detail&aid=2727&group_id=9&atid=127

- Gergely Erdelyi found that setText() in Text3d module was not updating str length var, leading to mem corruption and provided a patch:
http://projects.blender.org/tracker/?func=detail&aid=2713&group_id=9&atid=127

- doc updates (suggested by Campbell)

Thanks guys.
2005-06-12 05:54:15 +00:00
Alexander Ewering
70c9f9b319 Typo in fastshade() giving wrong colors for shadeless objects with
Vertex colours
2005-06-11 17:57:34 +00:00
Nathan Letwory
c91355f3b6 Rollback of http://projects.blender.org/pipermail/bf-blender-cvs/2005-June/003769.html (which I in my commithappyness did before properly checking) 2005-06-11 16:30:36 +00:00
Ton Roosendaal
3d9833982b Bug fix #2726
Adjustment in wire frame optimizer, it only removes edges with 'valence' 2,
meaning 2 faces sharing edge. Bug was that it removed edges having 3 faces.
2005-06-11 12:56:39 +00:00
Willian Padovani Germano
6cec51b259 BPython bug fixes:
- #2646 reported by Campbell: Python/Fileselector (moving from fileselector called by script to another space caused script to hang around open but not accessible)
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2646&group_id=9

- #2676 reported by Wim Van Hoydonck: 2.37 python scripts gui: event 8 ignored (thanks Ton for discussing / pointing what to do, Ken Hughes for also working on a fix)
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2676&group_id=9

- gui-less scripts with calls to progress bar inside fileselector callbacks didn't return to the previous space on exit (staying on Scripts win), requiring an event to do so (mouse movement, for example).  Quick fix for now, will rework a little after 2.37a for a better alternative, not needing to move to the Scripts win at all.

- added syntax colors access to Window.Theme module.

Scripts:

- updates by Jean-Michel Soler: svg2obj (svg paths import), tex2uvbaker, fixfromarmature;
- updates by Campbell Barton: obj import / export, console;
- tiny: converted vrml97 export to unix line endings;
- updates in ac3d exporter, help browser, save theme.

Thanks all mentioned above.
2005-06-11 05:30:14 +00:00