Commit Graph

3082 Commits

Author SHA1 Message Date
11a96fdddc - restored msvc warning disable code 2005-03-30 05:05:05 +00:00
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
340748fd5c - zero derivedmesh pointers on load 2005-03-29 17:52:14 +00:00
70687a2e84 - removed dlm->flag 2005-03-29 17:20:28 +00:00
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
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
a95d5d7312 - remove unused var 2005-03-29 16:56:26 +00:00
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
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
3ee7a1fa6f - print # bytes to add on sizeerror 2005-03-29 15:31:35 +00:00
53437f9536 - it is possible to rotate with MetaBalls in edit mode now 2005-03-29 10:03:30 +00:00
ea92a56193 - simplify extverts handling 2005-03-29 07:58:56 +00:00
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
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
2b82405829 - zero DispListMesh.{editedge,editface} on copy
- calc normals for mesh displistmesh's
2005-03-28 21:53:26 +00:00
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
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
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
f2d940aa1b - Bug fix, accidentally broke deform for non subsurfs. 2005-03-28 19:41:33 +00:00
85b9f7ccfb - switch some code to using BLI_strncpy (with right string lengths!) 2005-03-28 18:37:19 +00:00
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
9c48ebeaa3 Fix stupid error in connected code.
No more crashes, wheee!
2005-03-28 16:11:35 +00:00
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
137432637f - add bad level call stubs for bglBegin/bglVertex3fv/bglEnd 2005-03-28 15:23:36 +00:00
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
cdd7e93566 - subsurf creation no longer needs extverts argument... removed 2005-03-28 08:43:24 +00:00
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
0c05224a15 - removed old prototype (subsurf_optimal) 2005-03-28 07:40:19 +00:00
29aae3452e - added getMappedVertCoEM and drawMappedVertEM to DerivedMesh with
implementations (slightly redundant, could implement draw in terms
   of first... can be cleaned later)
 - switch to use of new APIs... all uses of EditVert->ssco are now
   clean (read: ready to die as soon as a proper DerivedMesh implementation
   is swapped in with ccgsubsurf)
2005-03-28 07:10:32 +00:00
8acfd730cf - added drawMapped{Verts,Edges,Faces}EMSelect calls to DerivedMesh with
implementations
 - updated drawobject selection code to use DerivedMesh (last DispListMesh
   usage in drawobject.c that needs to be replaced! Woot!)
 - interface could still be a lot cleaner, mostly calculating indices for
   the various things to pass to selection color routine is hacky.
2005-03-28 06:46:21 +00:00
09596b04a5 - added mesh_get_cage_derived (returns appropriate DerivedMesh
to be used as a cage - depends on ME_OPT_EDGE flag)
2005-03-28 05:58:43 +00:00
a0feaebfa5 - added set_framebuffer_index_color (shortcut for
cpack(index_to_framebuffer(index)) but that is all that is ever
   used.
2005-03-28 05:55:45 +00:00
Stephen Swaney
51ca37b995 add new file DerivedMesh.c 2005-03-28 02:05:36 +00:00
21a4e28fb3 - non-optimal subsurf was drawing regular mesh faces 2005-03-28 01:21:27 +00:00
927425608c Alright, this hopefully fixes some problems with the last transform commit.
Replaced old transform call when extruding and duplicating. Added a CTX_NOPET context flag for extrude. This is done rather a bit hackishly in Transform right now, better to do it with a on/off pet flag in TransInfo and check that everywhere instead.

Made sure transinfo Ext was initialised at NULL (I'm pretty sure it was in another spot, but LetterRip reported some crash leading me to believe that it might not be all the time. Better be safe than sorry).

Connected PET for curves uses the real distance for the fall off calculations now.
2005-03-28 00:56:00 +00:00
9f2f13aa99 Transform was still prototyped as having only one parameter in transform.h. Caused some warnings and possibly errors since some calls were missing the context.
The rest is proof of concept goody for a CONNECTED limiter for PET.
That is, PET affecting only elements which are connected together.

Only affects Curves right now since that was easier to test connectivity with. Still some polishing to do (falloff is based on distance of effect, not real distance), but it's a proof of concept, so...
2005-03-27 23:13:52 +00:00
0d19ac1d94 - update NMesh.c to use DerivedMesh API 2005-03-27 22:51:48 +00:00
57b1660420 - added DerivedMesh convertToDispListMesh function with implementations,
this is to ease migration.
 - updated particles and STL converter to use DerivedMesh interface. This
   is a bit wasteful at the moment, but these are not key performance areas.
   Can update once DerivedMesh has accessors for faces and face data.
2005-03-27 22:42:57 +00:00
e86d5ea498 - added drawMappedEdgeEM function to DerivedMesh with implementations
(draws single mapped edge)
 - updated editmesh code to use new interface (-2 DLM uses)
2005-03-27 22:14:57 +00:00
2a66e1d73f - added getNum{Verts,Faces} accessors to DerivedMesh with implementations
- updated edit.c to use DerivedMesh interface
2005-03-27 21:27:12 +00:00
05685e6ca7 Context parameter for Transform.
For tex space edit, crease (soon) and future use.


Manipulator assumes no context.
2005-03-27 21:25:15 +00:00
35aa81cd2c Scary commit!
- Switch to using DerivedMesh interface for draw_mesh_object.
 - Code builds a "fake" DerivedMesh for Mesh/EditMesh which ends
   up making code a lot clearer.

Plenty of work to be done - the DerivedMesh is still very specialized
to how the code draws which means it is not a very general interface
and is a little messy. Should work though I hope.
2005-03-27 20:39:28 +00:00
818d76bdcb NOTE: New file to be added to project files
- add new DerivedMesh type, currently just encapsulates drawing
2005-03-27 20:34:18 +00:00
9cfcd5d82e Two small fixes in transform, committed so Martin can work...
- scale negative draws widget OK (scale widget only now)
- scale negative threshold (for flip) was on vertical Y, now is perpen-
  dicular to center of axis.
2005-03-27 19:54:18 +00:00
b8d59ccb69 Transform goodies;
- Added icons for the Widgets to blenderbuttons pic
- Added in header - if widget in use - three buttons to choose widget type
  (hold shift for combo widgets)
- Hotkey CTRL+space now switches widgets on/off

I also noticed negative scaling doesn't work satisfying yet;
- for scale widget, using center didn't work correct anymore (fixed)
- negative scaling didn't even get applied! (fixed)
- but; scaling somethig negative now flips back to positive... ????

Last one i need Martin P for! Note that I had to change Mat3ToSize....
2005-03-27 18:17:48 +00:00
642012064b - everyone loves prototypes 2005-03-27 17:17:53 +00:00
9744f93f0c - one last CCG warning patch 2005-03-27 14:38:18 +00:00
61c9e1035c - more warning removal/cleanup for CCG, apparently GCC is not
happy about coercing (xxx**) to (void**) (sadly enough)
2005-03-27 14:37:00 +00:00
3c5a013c2e - get rid of some warnings in CCG code, thanks lukep 2005-03-27 14:17:28 +00:00
c9c47bd44e Adding some docs for camera insertIpoKey additions 2005-03-27 13:34:59 +00:00