Commit Graph

224 Commits

Author SHA1 Message Date
a30740c196 - convert all DerivedMesh map functions to use index based
mapping (instead of Edit{Vert,Edge,Face} pointers)
 - dropped convertToDispListMeshMapped (whew, glad of it too)
 - added DerivedMesh drawMappedFaces function
 - dropped EM suffix for DerivedMesh functions, it was neither
   particularly correct nor descriptive
 - converted test_index_mface to test_index_face that also corrects
   MCol and TFace. Good thing we had three versions of this routine,
   you never know when one might burn down.
 - removed flipnorm_mesh, not used anymore (and was incorrect to
   boot)

 - Getting face select to work with modifiers turned out to be much
   more complicated than expected. Reworked mapping architecture for
   modifiers - basically elements in a DispListMesh are now required
   to be stored in an order that corresponds exactly to original
   ordering. MVert/MEdge/MFace all have a new flag ME_XXX_STEPINDEX
   that is set on each element that is set on the first derived element
   of each original element. I can't say the code to follow these
   requirements for subsurf is particularly transparent, but on the
   upside it is a reasonably consistent and simple system that is memory
   efficient and allows keeping the DispListMesh structure.

 - rewrote mirror modifier to be simpler/conform to new requirements
   for mapped DispListMesh structure. This also means that mirror interacts
   much better with incremental subsurf calculation (it used to recalc
   one entire side on any topology change, now it generally avoids that).

 - added EM_{init,free}_index_arrays and EM_get_{vert,edge,face}_for_index
   functions to handle mapping indices back into appropriate EditMesh
   structures.
 - bug fix, make edges didn't recalc object data
 - bug fix, initial image assignment to TFace's didn't recalc object data

 - new feature, added circle select support for FACESELECT
 - bug fix, creating new faces in editmode duplicated the TFACE active
   flag - but there should only be one active tface
 - bug fix, possible crash when deleting all faces in faceselect mode
   on mesh with tfaces...

Still todo: TFace edge drawing is still not always correct in face
mode, in particular with a mirror modifier when mesh has edges (and
no preceeding subsurf). Have not yet decided how to deal with this.
Best solution is probably to do switch to meshes all having MEdge's,
in which case I can get rid of TFace edge flags (and need to recalc
modifiers on tface selection change).
2005-08-20 03:08:23 +00:00
6d60b0acfe More armature stuff;
- The "Skinnable" option for Bones now is taken into account for the
  Envelope drawmode. If not Skinnable, it also doesn't draw the soft
  deform area. Maybe bone should be hidden... dunno yet.
- Use CTRL+LMB in weightpaint mode to sample the weight in a mesh.
  Note; it returns the weight of the closest visible vertex, not of a
  Blended result.
- NKey Panel for Mesh edit now shows a menu with the VertexGroup name(s)
  of a selected Vertex, plus the Weight.

Fix:
- while scaling Bone points in editmode (Envelope drawtype), the Bone
  root scale was not copied from (or to) the parent tip. This was not
  visible (is not drawn) but deform did use it... causing weird errors.
  For those who saw this error today: just go into editmode, select all
  Bones, press Skey, enter. That fixes it :)
2005-08-19 21:37:29 +00:00
da930194f9 - added code to draw loose edges in textured and fastshade views 2005-08-18 11:49:33 +00:00
8c41c00ff7 - added DerivedMesh.drawUVEdges function & implementations
- removed DerivedMesh.drawLooseEdges and replaced with much more
   general drawEdgesFlag function that draws based edge flags.
 - switch DerivedMesh.drawFacesTex to give user control over which
   faces are drawn
 - added object_uvs_changed and object_tface_flags_changed functions
   to do object recalc flag flush/redraw queueing and added calls
   in appropriate places
 - added various edge flags to mark TFace information. This is used
   by the drawEdgesFlag routine and was the best way I could come
   up with to deal with drawing TFace information from modifier stack.
   Unfortunate side effects are (1) uses a lot of MEdge flags (although
   not needed in file so thats fine) and (2) requires recalculation
   of modifier stack on UV selection changes. #2 is disappointing
   but I could not find a better solution.
 - update UV mesh shadow drawing to use modifier result. At the moment
   just uses the final result but probably should be integrated with
   the editmode cage option.
 - convert draw_tfaces3D to use drawEdgesFlag routine which cleaned
   up the code quite a bit.
 - convert draw_tface_mesh to draw using result of modifier stack.
   Same comment about which result actually gets draw in FACESELECT
   mode as for UV editor shadow drawing applies.

There is a still a bug in that selection is using the wrong
mesh to draw.
2005-08-18 11:31:20 +00:00
2862e25147 - bug fix, draw wire extra should use cage with vpaint/wpaint/tpaint 2005-08-16 20:42:52 +00:00
2abd79b491 - readded DL_VERTS type to store lattice deformed verts
- new feature, twiddled with lattice resizing to try to maintain
   existing vertex changes... much nicer than just resetting the
   lattice if you decide you need more detail in the lattice.
 - modifiers work with lattices now. yes, that does mean you
   can make a chain of lattices effecting each other 8 miles
   long.
 - some cleanup of softbody code, was rather splintered and call
   path was twisted and confusing. reworked main object step
   routine to do things in a more obvious and consistent manner
   and without duplicate code
 - added ob->softflag OB_SB_RESET instead of sbObjectReset
   call
 - modifier changes reset softbody now
 - moved curve_getVertexCos/curve_applyVertexCos into curve.c
 - update curve modifier eval to work with virtual modifiers
 - update modifier apply to work with curves/surfs
 - update make parent to also recalc object data

NOTE: Although you can turn SB on for curve/font objects at the
moment it doesn't really work because they call deform in
multiple steps and this confuses SB. Not sure how to deal with
atm.
2005-08-15 10:30:53 +00:00
0c7f65d152 - added view3d_get_object_project_mat function, returns mat to project
object cos into screenspace without mucking with gl matrices.
 - added view3d_project_ functions, take arguments instead of using
   globals
 - removed View3D.{mx,my,mxo,myo}
 - switch drawobject foreachScreenVert functions to use new projection
   functions
 - switch edge slide to use new projection functions, fixes erratic
   behavior (project was using wrong mat I believe)
 - bug fix in edgeslide, nearest edge to start was one-off
2005-08-15 04:10:02 +00:00
524d3493f7 - cleaned up edge drawing a tad, there were issues with mesh's
with "loose" edges (edges without a face) and drawing in
   solid mode. they would either not draw, or draw with a nasty
   selection outline. Added a ME_LOOSEEDGE flag to mark such
   edges in displists/mesh and editmode sets it.
 - changed DerivedMesh drawEdges to take an argument whether
   it should draw loose edges or not
2005-08-14 10:35:58 +00:00
0721727887 - added hook "cursor center" feature (sets hook center to cursor position),
gives better control over falloff
 - added modifier UI access to hook "select" and "reassign" features
 - bug fix, unbroke path-tilt drawing
2005-08-14 07:02:51 +00:00
93aeb6b318 - added make_orco_curf, even does keys!
- removed {lattice,curve}_modifier functions
 - changed render code to use displist for curve rendering
   instead of making its own. required adding a bevelSplitFlag
   field to DispList. I also fixed the bevel face splitting
   which did not work correctly in many situations.
 - changed so all curve data creation happens in makeDispListCurveTypes,
   includes making bevel list and filling polys
 - changed render code to use displist for surface rendering
 - removed Curve.orco variable, built as needed now
 - removed stupid BLI_setScanFill* functions... why use a function
   argument when you can use a global and two functions! Why indeed.
   (this fixed crash when reloading a file with filled curves and
   toggling editmode)
 - bug fix, setting curve width!=1 disabled simple bevel for no
   apparent reason
 - cleaned up lots and lots of curve/displist code (fun example:
   "if(dl->type==DL_INDEX3 || dl->type==DL_INDEX3)"). Hmmm!
 - switched almost all lattice calls to go through lattice_deform_verts,
   only exception left is particles
 - added DBG_show_shared_render_faces function in render, just
   helps to visualize which verts are shared while testing (no
   user interface).
 - renamed some curve bevel buttons and rewrote tooltips to be
   more obvious
 - made CU_FAST work without dupfontbase hack

Also by the way I wrote down some notes on how curve code
works, nothing spiffy but it is at:

http://wiki.blender.org/bin/view.pl/Blenderdev/CurveNotes
2005-08-14 06:08:41 +00:00
9030e5f686 - added eModifierTypeFlag_RequiresOriginalData for modifiers that
can only follow deform (for example, they store mesh vertex
   indices)
 - added ModifierType.foreachObjectLink for iterating over Object
   links inside modifier data (used for file load, relinking, etc)
 - switched various modifiers_ functions to take object argument
   instead of ListBase
 - added user editable name field to modifiers
 - bug fix, duplicate and make single user didn't relink object
   pointers in modifier data
 - added modifiers to outliner, needs icon
 - added armature, hook, and softbody modifiers (softbody doesn't
   do anything atm). added conversion of old hooks to modifiers.

NOTE-THE-FIRST: User name field is not initialized on loading 2.38 files
so if you have saved stuff with a cvs blender you will see blank names.

NOTE-THE-SECOND: Since modifiers aren't evaluated yet for non-Mesh
objects, hooks for lattices and curves are broken. Don't updated if
you actually, say, *use* Blender.

NOTE-THE-THIRD: Old hooks used a quirky weighting system during
deformation which can't be extended to modifiers. On the upside,
I doubt anyone relied on the old quirky system and the new system
makes much more sense. (Although the way falloff works is still
quite stupid I think).
2005-08-10 22:05:52 +00:00
c192b80b17 Big commit, had to rework lots of selection stuff so that things
worked properly with modifiers. Needs more testing I am sure.
No, honestly, I wasn't just cleaning for the hell of it, it
was *necessary* (I would never do such a thing). Selection should
work completely with cage options of modifiers now.

 - added DerivedMesh foreach functions to iterate over mapped
   verts/edges/face centers. These replaced some of the drawing
   functions and are more general anyway. Special edge drawing
   functions remain for performance reasons.
 - removed EditFace xs, ys fields
 - added general functions to iterate over screen coordinates of
   mesh/curve/lattice objects
 - removed all calc_*verts* functions that were used for storing
   screen coordinates in objects. they were recalc'd on the fly
   for most situations anyway, so now we just always do that.
   calc_*verts_ext was one of those calls that did dirty things
   deep down in the callstack (changing curarea and poking at
   matrices)
 - rewrote all vertex level selection routines (circle, lasso, bbox)
   and closest vertex routines (rightmouse select) to use the new
   system. This cleaned up the selection code a lot and the structure
   of selection is much easier to see now. This is good for future
   work on allowing modifiers to completely override the selection
   system. It also points out some discrepancies in the way selection
   is handled that might be nice to resolve (mesh vertex selection has
   fancy stuff to try to help with selecting overlapping, but it only
   works w/o bbuf select, and curves/lattices don't have at all).
 - had to remove ton's code to move Manipulator to cage location, this
   is not reliable (can come up with a different method if requested)
 - as it happens BezTriple.s and BPoint.s are basically available to
   be removed, just need to rewrite editipo code that still does
   background calc of screen coordinates
 - MVert.{xs,ys} are still around because they are abused in some places
   for other info (not sure if this is safe actually, since they are
   short's and the mvert limit went up).

And did I mention this commit is comes out to -305 lines? Well it does.
2005-08-09 08:12:36 +00:00
9c8c51cbe3 - added VecLerpf to blenlib
- switch to using DerivedMesh.drawMappedFaceCentersEM to draw
   face dots, still need to do some work so this works in all
   selection modes (atm it does not work in no-zbuf mode)
2005-08-08 18:50:47 +00:00
8da5df8887 - add allowShared argument to DerivedMesh.convertToDispListMesh to allow returned
DLM to share data from DerivedMesh (reduces some copying/memory allocation)
 - added displistmesh_copyShared function to copy a DLM but not duplicate any
   internal data
 - changed crease drawing to use DerivedMesh functions... this means varying
   edge width style of creases had to go, I replaced by using varying color to
   show crease weight instead. Don't think this is a big loss since the subsurf
   result gives you a much better indication of the crease weight anyway.
 - bug fix in mirror modifier, didn't copy edge creases from editmesh correctly
2005-08-07 02:30:29 +00:00
80dcdc9508 - added editmhes_get_derived_base, used when a mesh with multiple users
is in editmode. current bevahaior is to display the object that is
   actually in editmode with its modifiers, and all other objects that
   share the mesh using just the base editmesh data. this is not 100%
   consistent but no architecture at the moment to display all objects
   that have mesh in editmode with each individual modifier stack.
2005-08-06 20:44:59 +00:00
74820841df - removed BLO_findstruct_offset (obsolete)
- remove python access to Optimal and Subsurf flags (they don't
   work this way anymore, I suppose need to replace with python
   access to modifiers but not going to do right now).
 - removed interface access to OPTIMAL mode, needs to be rethough...
   this means at the moment subsurfs outside editmode always draw
   and render all edges
2005-08-03 19:56:27 +00:00
951a4934b0 - added wave modifier & removed old wave effect
- added decimate modifier & removed old decimate interface
   (currently lacks warning about destroying data, and there needs
   to be a way for modifiers to return errors back to the interface)
 - allow applyModifier to return NULL to indicate error
 - unfortunately new decimate modifier means it does not know exact
   number of faces in mesh (other modifiers may come before) and so
   instead interface uses a percentage. if people need exact face
   count slider then I will have to think of some hack to fit this
   in. note that it does display the output face count so its possible
   to tweak the pct to get what you want regardless.
 - removed python Wave object

If you are bored now how much easier it is to implement something
like decimate as a modifier. Very few changes to interface, very
few entry points.
2005-07-26 02:44:59 +00:00
e331e68b57 - added ModifierData flag, is modifier enabled in editmode
- added modifier type flag: should modifier be enabled by default for
   active in editmode
 - added subsurf "debug incremental" option instead of G.rt==52 (it becomes
   a slightly useful feature now for debugging how well a modifier works
   with incremental subsurf... maybe important for future python modifier
   developers)
 - shuffled modifier button layout just to keep people guessing
 - switched back to drawing editmesh face centers not through derivedmesh,
   I didn't think this one through, forgot that centers were also used for
   selection. have to think about what to do about this, should be either
   (a) don't draw centers with a cage active (optimal mode) or (b) come up
   with api to draw centers through derivedmesh and also handle selection.
 - changed recalc_editnormals to also follow the len(no)==0.0 use vertex
   co convention
2005-07-23 19:15:08 +00:00
948f27c0d8 Killed silly modal PoseMode mode! :)
- PoseMode now is a state Armature Objects can be in. So, while in PoseMode
  for an Armature, you can just select another Object or Armature.
- The old PoseMode options (transform, insert keys etc) are accessible
  with making the Armature Object 'active' (and have object in PoseMode).
- At this moment no multiple Poses can be transformed/edited at the same
  time.
- The old hotkey CTRL+TAB, and view3d header menu, still work to set an
  Object's PoseMode

It was quite a lot recode, so tests & reports are welcome.

Oh, as a bonus I added Lasso Select for Bones in PoseMode! It selects using
only the line between root and tip of the Bone.
2005-07-23 18:52:31 +00:00
32255b65df - added DerivedMesh.drawMapped{VertNormals,FaceNormals,FaceCenters}EM
functions and implementation for EditmeshDerivedMesh
 - switch drawobject to drawing normals/centers through the DerivedMesh
 - added G_DRAW_VNORMALS flag and button, implementation is not yet complete
   because editmesh normals are not updated regularly
 - switch editmesh draw buttons to use uiDefButBit (can't we get some
   monkey to convert all of the uiDefBut calls with TOG|BIT type? It
   makes grepping the source much nicer)
2005-07-23 07:45:39 +00:00
33709bf6e2 - shuffled editmesh derived function name/function
- added ModifierTypeInfo.freeData function
 - added modifier_{new,free] utility function
 - added ccgSubSurf_getUseAgeCounts to query info
 - removed subsurf modifier faking (ME_SUBSURF flag is no
   longer valid). subsurf modifier gets converted on file load
   although there is obscure linked mesh situation where this
   can go wrong, will fix shortly. this also means that some
   places in the code that test/copy subsurf settings are broken
   for the time being.
 - shuffled modifier calculation to be simpler. note that
   all modifiers are currently disabled in editmode (including
   subsurf). don't worry, will return shortly.
 - bug fix, build modifier didn't randomize meshes with only verts
 - cleaned up subsurf_ccg and adapted for future editmode modifier
   work
 - added editmesh.derived{Cage,Final}, not used yet
 - added SubsurfModifierData.{mCache,emCache}, will be used to cache
   subsurf instead of caching in derivedmesh itself
 - removed old subsurf buttons
 - added do_modifiers_buttons to handle modifier events
 - removed count_object counting of modifier (subsurfed) objects...
   this would be nice to add back at some point but requires care.
   probably requires rewrite of counting system.

New feature: Incremental Subsurf in Object Mode

The previous release introduce incremental subsurf calculation during
editmode but it was not turned on during object mode. In general it
does not make sense to have it always enabled during object mode because
it requires caching a fair amount of information about the mesh which
is a waste of memory unless the mesh is often recalculated.

However, for mesh's that have subsurfed armatures for example, or that
have other modifiers so that the mesh is essentially changing on every
frame, it makes a lot of sense to keep the subsurf'd object around and
that is what the new incremental subsurf modifier toggle is for. The
intent is that the user will enable this option for (a) a mesh that is
currently under active editing or (b) a mesh that is heavily updated
in the scene, such as a character.

I will try to write more about this feature for release, because it
has advantages and disadvantages that are not immediately obvious (the
first user reaction will be to turn it on for ever object, which is
probably not correct).
2005-07-21 20:30:33 +00:00
b58f7d0c55 - change mesh_get_derived_render to mesh_create_derived_render (always
builds new DerivedMesh... caching can come later)
 - split DerivedMesh returning functions into editmesh and mesh groups
 - got rid of DL_NORS displist type (get built on fly for mesh when
   needed)
 - got rid of Mesh.disp (yay!)
 - started to punch DerivedMesh returning functions into shape to introduce
   modifier stack
2005-07-19 00:21:01 +00:00
033f3d5126 - switch shadeDispList to always using DispListMesh from
mesh_get_derived_final... a bit slower atm because of extraneous
   copying (will be fixed shortly) but normals are correct for deformed
   meshes now (don't think they ever have been)
2005-07-17 18:37:27 +00:00
726aea881c - convert mesh_modifier to return deformed verts instead of
leaving in a DL_VERTS type displist (and modifying mesh)
 - removed DL_VERTS displist type (woot woot)
 - makeDispListMesh now puts deformed verts in object->derivedDeform
 - switch over other system parts to new deformed vert storage,
   still kinda hacky and maybe some inconsistencies... will be
   sorted out soon enough.
 - moved build_particle_system to makeDispListMesh... this may have
   adverse side effects, needs to be sorted out with depgraph system
2005-07-17 17:41:03 +00:00
80327e675a - converted draw_tfaces3d and bbs_mesh_solid to use
mesh_get_derived_deform... (whats that? more general AND it uses less
   lines? how can that be!!!)
2005-07-17 03:48:29 +00:00
67d58c0f45 - added DirectMesh.getVert{Co,No} functions
- added mesh_get_derived_deform function (always returns a DerivedMesh
   corresponding to deformed (but not subdivided) mesh). used in places
   where original mesh is to be displayed but with deformed coordinates
   (vpaint for example).
 - added DirectMesh.getVert{Co,No} implementations for MeshDerivedMesh
 - updated vpaint to use mesh_get_derived_deform
2005-07-17 01:18:59 +00:00
e67ba0ae33 More armature goodies;
The B-Bones!
(where the B can be read as 'block' or 'bezier' or 'b-spline')

- set option on/off in edit buttons, armature panel
- scaling of B-bones only works in editmode, use ALT+S to make bones fatter
  or thinner. Also works for constrainted transform
- In pose mode, you now have a buttons panel with per-bone settings too
  Here you can find the "segments" button, which allows bones to
  interpolate between previous/next bones, including roll.
- Buttons to control interpolation ("In" and "Out" are disabled, doesn't
  work satisfying yet

NOTE: this doesn't give deform yet! Main purpose for now is to test if this
drawing method serves to animate/pose armatures well.
Still need to review proper interpolation methods... maybe bezier is too
limited.
2005-07-16 19:07:02 +00:00
573f86bc3c - remove some redundant drawing code
- mousewheel zooming in drawipo used uninitialized var (MSVC run time
   error).
2005-07-15 15:00:08 +00:00
480b8ce10b - switch em_{vert,solid,wire}offs to be unsigned
- some other twiddles to fix mixed signedness compiler warnings

And from the "Dear lazy programmers" file: After you have extern declared
a variable 5 or more times at the top a function, you would have actually
saved a lot of effort by just putting it in the header where it belonged.
Or perhaps you thought by hiding it no one else would notice you were
using global variables to pass information around. Tsk tsk.
2005-07-14 22:16:38 +00:00
8da29921ba - added mesh_get_texspace (should be used instead of direct access)
which calculates texspace on demand if need be.
 - removed almost all calls to tex_space_mesh

There may be a few corner cases where this goes wrong (meshes with vertex
keys) but these should get ironed out by coming modifier system.
2005-07-14 21:57:18 +00:00
3929802335 - switch several instances of makeDispList to use more specific version 2005-07-14 18:14:19 +00:00
b22e3414ca - add mesh_get_bb function to return mesh boundbox and calc if needed
- switch all mesh boundbox access to go through mesh_get_bb
 - switch object_handle_update to call mesh_changed instead of making
   the displist data immediately (delayed calculation)
2005-07-14 18:04:27 +00:00
aa454cd412 - switch to using DAG_object_flush_update instead of mesh_changed
- mesh drawing calculated derived surface before clipping to view matrix,
   waste for offscreen objects
2005-07-14 17:10:44 +00:00
f265d4925a Bug reported by Guillaume LeCocq
Setting both 'xray' and 'transp' did not work proper. Had to add one
extra check, and switch drawing order. Now a transparent object gets
drawn OK as Xray too. :)
2005-07-14 15:49:31 +00:00
e5a639a161 New:
- XRAY draw for armatures now is generic "Draw Extra" option for any
  Object type. This feature just moves drawing to the end, after clearing
  the zbuffer again.
- Solid draw mode now displays materials with Alpha, with the new
  "Draw extra" option "Transp" set. This also moves drawing transparent to
  the end, but it doesn't sort the transparent faces. Still looks OK.
  Note: this is not enabled in mesh editmode. Here all the fancy extra
  drawing just makes it nearly impossible to do OK.
- Re-ordered Object Buttons -> "Draw" panel

Fixes:

- do_versions had check for the UserDef in it (new ogl texture cache).
  that can't be there, should be in usiblender.c (stupid exception).
- same error caused reading older files to not always fix version
  changes on armatures (commit yesterday).
- Outline select drawing happened also on picking-select draw, needless
  slowdown.
2005-07-14 12:44:33 +00:00
682c51663e Previous commit for Xray bones disabled selection of bones. Overlooked one
if()...
2005-07-13 20:21:54 +00:00
2bde6502f2 - Change DerivedMesh.drawSolidFaces setMaterial argument to return
boolean value indicating whether faces with that material should
   be drawn or not.
2005-07-13 20:16:35 +00:00
75ae1ae5ef Armature "XRay mode" now draws nicely with solid too. For it to work, I
had to add a new feature to the 3d window, to collect "after draw" objects,
which get drawn as last, after a clear of the zbuffer.

Same method can be used for nice OpenGL transparent draw, the system is
ready for it, do that later.

The huge commit is caused by cleaning up globals from struct Global. Many
variables were unused or just not needed anymore. Did that to move the ugly
G.zbuf to where it belongs, in the View3D space struct. :)
2005-07-13 19:42:08 +00:00
1adf750fc3 Cleanup of Armature 3d drawing.
- In Solid drawmode, bones get drawn solid too now. Including Outline-
  selection color, if that's set.
  Disable it by setting Object-buttons "drawtype" for the Armature.
  Color used for solid bones is in Theme editor.
- EditMode armature now follows (Mesh edit) theme colors (Vertex, Edge)
- PoseMode armature has ThemeColor for selection, and draws three extra
  colors now;
   - blue shade for bones with action Ipos
   - yellow for bones with IK
   - green for bones with a constraint
- "X ray" now only works for PoseMode... needs review, can be done better
- "Draw Names" option uses theme color too, also indicates selection.

Fixes;

- In Armature EditMode, the deformed Mesh goes to rest-position
- Border select didn't clear 'active' flag in Bones in PoseMode
- Mouse-click select didn't work when a dashed line was close to Bone
2005-07-12 15:47:53 +00:00
ef4bc76dc7 - add missing includes for lazy programmers who don't read error msgs 2005-07-09 18:04:53 +00:00
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
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
Alexander Ewering
5a7a2e8f78 Fix drawing of text frames inside editmode, stupid error. 2005-06-17 23:30:39 +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
25a4b8fa07 Bug #2661
Drawing face stats in editmesh didn't work... a typo caused using the 2nd
point of a face as third one.
2005-06-01 18:36:58 +00:00
53082cf0f1 Bug fix #2575
VertexPaint, FaceSelect draws with 'culled faces' but should therefor
check for negative scaling as well, set the glFrontFace() OK.
2005-05-26 21:00:50 +00:00
563af2aac1 - stiffness circle of MetaElem isn't paint in Object mode now 2005-05-22 19:16:04 +00:00
422b69fe1e UI cleanup work;
Proportional edit:

- Proportional mode added to header as button/menu. Including new option
  to have only connected geometry influenced.
- Added icons for proportional & proportional modes
- Make proportional edit data part of Scene, so all gets saved.
  The Global flag G_PROPORTIONAL was removed
- Made sure #defines get used properly, also tweaked order for proportional
  so it starts with regular 'smooth' by default.
- Use ALT+O in editmode to switch to new proportional 'connected' mode

Other UI stuff:

- in EditMode, the layer buttons get hidden... the amount of icons in
  3d header grows to fast. :)
- made less ugly icons for the Manipulators. Still can be better.
- Added alpha-filter for pre-processing Icon-image, giving nicer display
  of icon-antialising on dark or bright backdrops
- disabled Manipulators when in editmode, and current layers don't show
  the edited data.
- Added the value used to define Normal size (editmode draw) in Scene too,
  so it gets saved.
2005-05-03 10:54:42 +00:00
42126cb5fc Added baking for softbodies.
Works as follows;
- press the 'show bake settings' button (no space left... :)
- define start/end frame for bake, and an interval step.
  The baked result interpolates nicely (Bspline, 4 keys) so in general a
  step size of 2 or 3 still gives OK results.
- Press "BAKE". This will do a full animation + playback. Press ESC if it
  you don't want it.

Once Baked, the BAKE button becomes a FREE BAKE. As reminder the softbody
buttons get blocked with error() menu.

This saves OK in a file. Renders any frame, including fields and moblur.
You can also set a "Timeoffs" for the softbody. And yes, this should be
in the NLA once... :)

NOTE! With this commit, files saved with the old (first commit) version by
Jens Ole won't read the settings back... he stored all sofbody variables in
Object, which was moved to a new struct when I did my first commit on SB
(over a month ago)

Also note that I moved particle deflecting & softbody to a new include.
2005-05-02 13:28:13 +00:00
b7a927cc95 More stats-junk stuff!
Added in Nkey panel (transform properties) option to show in editmode
at choice the global or local coordinate values.
Same option works for the "Tech draw" options. :)
2005-04-29 18:43:17 +00:00