Commit Graph

66005 Commits

Author SHA1 Message Date
Daniel Dunbar cfbab6f6a4 - fix warnings for gcc
- some subsurf settings not correctly changed in editmode
2005-03-31 16:08:29 +00:00
Daniel Dunbar d4b9ace5ae - adapt to reprototyping in BKE_DerivedMesh.h 2005-03-31 15:57:18 +00:00
Daniel Dunbar 9c91e1a954 - adapt caching check for G.editMesh->derived 2005-03-31 15:55:31 +00:00
Daniel Dunbar f0a8a93292 - removed USE_CCGSUBSURF define (always on now)
- added G.editMesh->derived pointer... idea is to use this
   for mesh derived from editmesh instead of Mesh->derived (as the
   derived mesh tends to vary depending on what it came from).

   This part could be cleaner, also there may problems with it not
   being invalidated correctly.

 - And most importantly: In case people were beginning to worry all
   these edits were just crazy zr stuff, the big point comes about:
   Incremental subsurf calculation is now enabled. This gives massive
   speed improvements when editing a large mesh.

   For the eye-candy happy: try setting G.rt==52 before entering editmode
   and the edges and vertices (in optimal mode) will switch to displaying
   visually the age since a region has last been calculated. Lots of
   fun!
2005-03-31 15:44:05 +00:00
Daniel Dunbar 0d35a1dd1e - fix some signed/unsigned comparison warnings 2005-03-31 15:15:12 +00:00
Daniel Dunbar eeb3e173a6 - perhaps I should commit a version that compiles 2005-03-31 13:56:50 +00:00
Daniel Dunbar ac35fb34b8 - committed VecLength function for theeth 2005-03-31 13:44:23 +00:00
Martin Poirier e62740fa01 Different floodfill method for PET connected with mesh. More accurate but needs two temporary scratch arrays to keep vectors and nearest element pointers.
Will comment the code more later tonight, I'm a bit pissed at the moment (stupid errors right in your face. grrrr)
2005-03-30 23:19:42 +00:00
Daniel Dunbar 84ccd0dcde - zero derived and decimated pointers on copy 2005-03-30 18:06:42 +00:00
Daniel Dunbar cc4320e790 - added dlm->medge for displistmesh_from_mesh 2005-03-30 17:40:51 +00:00
Daniel Dunbar 489b38fa40 - Claims of speed improvement last night were slightly
overrated. Turns out there was a bug in recalc code where
   in editmode mesh was getting reevaluated all the time (because
   ob->disp doesn't get built in editmode). This should fix.
 - Fix some normal calculation/backwards face drawing
2005-03-30 17:32:23 +00:00
Ton Roosendaal 3fd3728000 Fix for centered submenu (for example py export script) also worked
when menu didn't open to left/right but on top/bottom. Caused errors...
2005-03-30 14:17:53 +00:00
Stephen Swaney 9b6febecd3 Two scons changes:
1) fix evil use of internal scons interfaces that breaks latest scons version.

2) a hack to turn on new CCGSUBSURF stuff by adding -DUSE_CCGSUBSURFLIB
to extra_flags.  This is currently the default for all platforms except
win32 (due solely to my ignorance of win32 compiler flags).
2005-03-30 12:13:02 +00:00
Ton Roosendaal aa41e1ddc3 Bug in new drawing code; hack with storing stuff in editvertex->prev did
not get restored OK. :)
2005-03-30 10:12:05 +00:00
Daniel Dunbar fef6e0012e - initial commit of a real (as in not just copying the DispListMesh)
DerivedMesh implementation of CCGSubSurf. Only used in editmode at
   the moment, and does not draw smooth normals correctly.
 - Just in its own this brings a rather large speedup for editing
   subsurfs.
2005-03-30 08:12:27 +00:00
Daniel Dunbar e5d1411283 - add editedge and editface for displistmesh_from_editmesh 2005-03-30 06:39:55 +00:00
Daniel Dunbar f8248b23a7 - fix another minor use of wrong mface bug 2005-03-30 06:24:34 +00:00
Daniel Dunbar 347619f501 - fix silly bug in mesh DerivedMesh tex drawing func (only was drawing
first face.
 - change DerivedMesh callback prototypes to help eliminate errors
2005-03-30 05:57:40 +00:00
Daniel Dunbar ae07d869a6 - strange drawing bug, wierd vertices were showing up (wrong
DerivedMesh call)
2005-03-30 05:35:01 +00:00
Joseph Gilbert f49224137f - update to msvc7 projectfiles to accomodate recent file additions
- fixed bad path in extern project file
2005-03-30 05:19:33 +00:00
Daniel Dunbar 11a96fdddc - restored msvc warning disable code 2005-03-30 05:05:05 +00:00
Daniel Dunbar cfd90889e2 - made some DerivedMesh drawing functions more generic (take callback
to determine if element should be drawn and to set draw options),
   which meant some could be combined - eases implementation of new
   DerivedMesh types and keeps more app specific logic out of DerivedMesh
   implementations.
2005-03-30 00:32:10 +00:00
Daniel Dunbar 340748fd5c - zero derivedmesh pointers on load 2005-03-29 17:52:14 +00:00
Daniel Dunbar 70687a2e84 - removed dlm->flag 2005-03-29 17:20:28 +00:00
Daniel Dunbar 03e364aba6 - remove free_displist_by_type
- free derived mesh on freedisplist_object... bit of a hack but
   just to be safe. oh dependency graph where are you!
2005-03-29 17:10:07 +00:00
Ton Roosendaal fa37194082 Prop mode goodie;
- Made proportional edit in Mesh editmode use connectivity to clip the
  area where proportional editing is allowed.
  Uses some kind of manhattan distance for clip area still, so is slightly
  too large for diagonals. Will be worked on!

- Fix; in constraint code, using (0 0 0) delta caused NaN.
2005-03-29 17:05:43 +00:00
Daniel Dunbar a95d5d7312 - remove unused var 2005-03-29 16:56:26 +00:00
Daniel Dunbar e229722d5b - added Mesh->derived and Mesh->decimated DerivedMesh pointers
- removed DL_MESH displist type!!!! Now store a DerivedMesh directly.
 - May still be some issues left having to do with releasing this
   at the right time (old code just splashed free_displist all
   over the place).
2005-03-29 16:43:39 +00:00
Martin Poirier da0a55d2b4 Tiny error in Jiri's commit. Unselected meta elements needs the quat flag too if they want to rotate using PET. 2005-03-29 16:12:42 +00:00
Daniel Dunbar 3ee7a1fa6f - print # bytes to add on sizeerror 2005-03-29 15:31:35 +00:00
Stephen Swaney 607083cc9a Removed comma at end of enumerator list to please fussy compiler. 2005-03-29 14:27:20 +00:00
Kent Mein 4d4e776542 Changed:
-       memset(m_keyboard_vector,32,0);
+       memset(m_keyboard_vector,0,32);

Patch submitted by Dave Jones

Kent
2005-03-29 13:06:58 +00:00
Jiri Hnidek 53437f9536 - it is possible to rotate with MetaBalls in edit mode now 2005-03-29 10:03:30 +00:00
Daniel Dunbar ea92a56193 - simplify extverts handling 2005-03-29 07:58:56 +00:00
Daniel Dunbar 4a5a9f4e49 - added drawFacesTex function to DerivedMesh with implementations
- switched drawmesh.c to use new functions
 - WHEE! This is last such function that has to be written for the time
   being, and also effectively marks the end of DL_MESH! DispListMesh still
   hangs around as a kind of interchange format but should also die once
   DerivedMesh provides more intimate mesh access.

   DL_MESH (the displist type for DispListMesh) is still used to hold
   the DispListMesh, but that will die as soon as new subsurf switches to
   using a bonafide DerivedMesh implementation. There is also one silly
   usage for the decimator that is easy to kill.
 - Oh, and I also made potatoe mode draw mesh vertex colors - seemed to
   be more uniform behavior.
2005-03-29 07:51:00 +00:00
Daniel Dunbar 4c511daa88 - fix shadedisplist to use derivedmesh
- also a bug fix! Made subsurfs now use tface colors when shading
   displist.
2005-03-29 06:46:11 +00:00
Daniel Dunbar 2b82405829 - zero DispListMesh.{editedge,editface} on copy
- calc normals for mesh displistmesh's
2005-03-28 21:53:26 +00:00
Daniel Dunbar 67eaf69f3f - added mesh_get_derived_render
- cancelled previous commit to add RE_findTFAce, instead just added
   a MemArena to render struct... free'd at end of render, can be used
   to store other data as well
 - switch rendering to using DerivedMesh API... this is slightly more
   inefficient now because it is doing some unnecessary copying. Can
   be fixed by defining a DerivedMesh function to convert the object
   into a render object (on todo list)
2005-03-28 21:49:49 +00:00
Daniel Dunbar 7dbb253908 - Funny joke! Blender gave "Can't apply deform to shared mesh" error
and then went ahead and did it anyway. Someone is lying!
2005-03-28 19:55:04 +00:00
Daniel Dunbar 983745d102 - renderer currently uses links into tface structures that actually
are owned by mesh (or displistmesh)... this causes problems for
   adapting to systems that build tfaces on the fly. Added RE_findTFace
   function to allow allocating tfaces inside renderer itself.
2005-03-28 19:43:45 +00:00
Daniel Dunbar f2d940aa1b - Bug fix, accidentally broke deform for non subsurfs. 2005-03-28 19:41:33 +00:00
Daniel Dunbar 85b9f7ccfb - switch some code to using BLI_strncpy (with right string lengths!) 2005-03-28 18:37:19 +00:00
Ton Roosendaal c094d49ed0 Shameless intrusive commit in Daniels beloved project! :)
The dl->mesh pointer was used without checking dl... dunno what this call
exactly does, but it causes crashes here. Fixed with a if(NULL) check.
2005-03-28 17:17:51 +00:00
Martin Poirier 9c48ebeaa3 Fix stupid error in connected code.
No more crashes, wheee!
2005-03-28 16:11:35 +00:00
Simon Clitherow b4ff308709 bug fix for #2096:
- switched strcpy calls to strncpy using FILE_MAXDIR & FILE_MAXFILE to prevent buffer overruns.  Non-windows code left untouched. :)
2005-03-28 15:29:59 +00:00
Daniel Dunbar 137432637f - add bad level call stubs for bglBegin/bglVertex3fv/bglEnd 2005-03-28 15:23:36 +00:00
Ton Roosendaal c3abdd9608 Cleanup of widget code;
- made more general calls with args for drawing types
- made it accept transparency for all modes (used while transform now)
- added argument to detect 'combo' mode, gave offsets to translate/scale
  handles in combos.
- added 'pie chart' on view-aligned rotate for widget
- made trackball for rotate widget rt==4 behave compatible
- removed redundant code for 'ghosting'
2005-03-28 14:00:49 +00:00
Daniel Dunbar cdd7e93566 - subsurf creation no longer needs extverts argument... removed 2005-03-28 08:43:24 +00:00
Daniel Dunbar 6a8fb8bf6c - added nors to DispListMesh (for face normals)... this is just to
avoid throwing them on later with addnormalsdisplist which is just
   silly and burdensome.
 - renamed displist_calc_vert_normals to displist_calc_normals
2005-03-28 08:17:51 +00:00
Daniel Dunbar 0c05224a15 - removed old prototype (subsurf_optimal) 2005-03-28 07:40:19 +00:00