Commit Graph

56 Commits

Author SHA1 Message Date
Campbell Barton bd023c443b remove mat_nr from MVert struct, saves 4 bytes per vertex.
used to be used for halo's
2011-02-07 13:02:44 +00:00
Campbell Barton 081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
Campbell Barton 54c9557b85 Solidify modifier for Durian (allow cloth sim on single layer and make solid after)
Mostly the same as the recently added editmode tool with some extras.

* Options to disable filling in the rim between inner and outer surface, since its faster not to detect this in cases where its not needed.
* Option to disable high quality normal calculation, mostly noticable when operating on building walls, not needed for cloth or more organic shapes.
* Option to disable 'even thickness', again, not needed in some cases.

Also options for creasing inner/outer and rim edges, need this for makign Sintels cloths solid since zero crease looks far too soft.

note:
* UVs and VCols etc are copied to the new skin however rim faces dont get the UVs or vcols set from the faces they are created from yet.
* Normals are assumed to be pointing outwards
* used patch from Uncle Entity as a template since it added the DNA and RNA entries but the actual modifier from the patch wasnt used.
2009-12-21 01:02:08 +00:00
Brecht Van Lommel 636fe90680 Sculpt: updating normals now no longer uses the vert-face map, to save memory.
The weak point now is the thread-safe atomic access to normals from multiple
threads, did not seem to be a bottleneck in my tests but I don't really trust
it to be fast.
2009-11-04 20:36:38 +00:00
Brecht Van Lommel 26ef6da24b 2.5
* Objects now support up to 32767 material slots. It's easy to
  increase this further, but I prefer not to increase the memory
  usage of mesh faces, it seems unlikely that someone would
  create 32767 distinct materials?
* Forward compatibility: the only thing you can potentially lose
  reading a 2.5 file in 2.4 is object linking (instead of default
  data), though usually that will go fine too. Reading files with
  > 32 material slots in 2.4 can start giving issues.

* The ob->colbits variable is deprecated by the array ob->matbits
  but I didn't remove the ob->colbits updates in very few places
  it is set.
* I hope I changed all the relevant things, various places just
  hardcoded the number 16 instead of using the MAXMAT define.

* Join Objects operator back. This is using the version from the
  animsys2 branch coded by Joshua, which means it now supports
  joining of shape keys.

* Fix for crash reading file saved during render.
2009-07-13 00:40:20 +00:00
Brecht Van Lommel 401b58cb45 2.5: Image Editor
* Started porting over to python, menus nearly done, header WIP.
* Game Properties panel is in python too
* Deprecated "Tiles" as a per face flag here, now it's always on
  the image, used to be both, working in a very confusing way.
  Unlikely someone actually had a purpose for this being per face.
* Remove GPC_PolygonMaterial.cpp/h, it's not actually used anymore,
  so I don't want to bother updating it.
* Fix crash in image painting (own mistake in porting over bugfix
  from 2.4x).
2009-06-16 01:22:56 +00:00
Nicholas Bishop 25e5765f47 Got rid of old multires code, brought in multires modifier from
soc-2008-nicholasbishop branch.

Note: any old code with multires_test() or multires_level1_test() can 
just be deleted, not needed by the multires modifier.
2009-01-06 18:59:03 +00:00
Andrea Weikert ebb6628a01 2.5 BLI_blenlib cleanup
DONE:
* moved almost all declarations from BLI_blenlib.h into their own proper header files.
* BLI_blenlib.h still includes all the declarations for convenience and to avoid changes in existing code
* split util.c into several files, where it wasn't done already
*    DynamicList -> dynamiclist, 
*    ListBase    -> listbase, 
*    String utility functions -> string.c
* removed a few unused macros and functions, if they're needed back, they're still in svn ;)
TODO:
* btempdir global
* further cleanup in the code of the different modules (especially util.c)
2008-12-20 10:02:00 +00:00
Geoffrey Bantle ead69661e8 -> Fix for 64 bit alignment of Vertex colors in bmesh
Vertex color structure in bmesh needed to be padded for
8 byte aligned memory access.
2008-09-02 16:39:03 +00:00
Brecht Van Lommel 908337bee1 Game Engine: alpha blending and sorting
=======================================

Alpha blending + sorting was revised, to fix bugs and get it
to work more predictable.

* A new per texture face "Sort" setting defines if the face
  is alpha sorted or not, instead of abusing the "ZTransp"
  setting as it did before.
* Existing files are converted to hopefully match the old
  behavior as much as possible with a version patch.
* On new meshes the Sort flag is disabled by the default, to
  avoid unexpected and hard to find slowdowns.
* Alpha sorting for faces was incredibly slow. Sorting faces
  in a mesh with 600 faces lowered the framerate from 200 to
  70 fps in my test.. the sorting there case goes about 15x
  faster now, but it is still advised to use Clip Alpha if
  possible instead of regular Alpha.
* There still various limitations in the alpha sorting code,
  I've added some comments to the code about this.

Some docs at the bottom of the page:
http://www.blender.org/development/current-projects/changes-since-246/realtime-glsl-materials/

Merged some fixes from the apricot branch, most important
change is that  tangents are now exactly the same as the rest
of Blender, instead of being computed in the game engine with a
different algorithm.

Also, the subversion was bumped to 1.
2008-07-29 15:48:31 +00:00
Geoffrey Bantle 733b4c9351 -> Vertex Group support for bevel (editmode only)
Vertex groups are now preserved when beveling (editmode only).
Modifier support as well as uv/vert colors to follow soon.
2008-07-04 17:59:16 +00:00
Campbell Barton f39758cddc adding clip alpha (binary alpha) to the 3D view and game engine. 2008-06-09 15:45:46 +00:00
Chris Want 5d0a207ecb Patch from GSR that a) fixes a whole bunch of GPL/BL license
blocks that were previously missed; and b) greatly increase my
ohloh stats!
2008-04-16 22:40:48 +00:00
Geoffrey Bantle e03ab146ae -> Bevel tools and Bmesh kernel
The following is a commit of Levi Schooley's bevel code and 
the bmesh library it depends on. The current editmode bevel has 
been replaced with a new per edge bevel function. Vertex beveling is 
also availible.

To set weights for the modifier to use, use the ctrl-shift-e shortcut on either edges 
or vertices.

Recursive beveling is turned of for the time being.
2008-02-23 22:11:16 +00:00
Nicholas Bishop 727f9ff727 == Multires ==
Fixed bug #8215, Crash with shaded view + multires mesh
2008-02-09 20:50:25 +00:00
Brecht Van Lommel 7da56f4a9b Particles
=========

Merge of the famous particle patch by Janne Karhu, a full rewrite
of the Blender particle system. This includes:

- Emitter, Hair and Reactor particle types.
- Newtonian, Keyed and Boids physics.
- Various particle visualisation and rendering types.
- Vertex group and texture control for various properties.
- Interpolated child particles from parents.
- Hair editing with combing, growing, cutting, .. .
- Explode modifier.
- Harmonic, Magnetic fields, and multiple falloff types.

.. and lots of other things, some more info is here:

http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite_Doc

The new particle system cannot be backwards compatible. Old particle
systems are being converted to the new system, but will require
tweaking to get them looking the same as before.

Point Cache
===========

The new system to replace manual baking, based on automatic caching
on disk. This is currently used by softbodies and the particle system.

See the Cache API section on:
http://wiki.blender.org/index.php/BlenderDev/PhysicsSprint

Documentation
=============

These new features still need good docs for the release logs, help
for this is appreciated.
2007-11-26 22:09:57 +00:00
Campbell Barton aee06ac0d0 added an active face for the mesh editmode and normal mesh - this is needed because the TFace flag was not always easy to access from editmode.
using the last selected face was almost good enough however when selecting verts and edges the last selected face would become inactive and the space image would flicker about too much.
The active face is used for getting the space image at the moment and keeps scripts that use this flag working also.

This has 2 commands to get and set, so the variable is not accessed directly.

all "UV Calculate" scripts work now

last commit crashed when in solid draw mode, it seems subsurf modifier is ignoring the displayMask since MTFACE is available. just made it do a null check for now.

uvcalc_follow_active_coords.py - should be done inC and put in the snap menu.
2007-09-22 17:54:13 +00:00
Campbell Barton 6789b8fd82 added commends to some DNA_*.h files - as well as some TODO's for removal.
header_view3d.c was doign an implicit declaration also.
2007-07-19 00:42:01 +00:00
Nicholas Bishop 2494a5ed0d == Multires ==
* Small optimization to multires based on profiling data; calculation of edge boudndaries is now cached along with multires mapping data to improve the performance of the catmull-clark code.

* Removed an unneeded call to create the temporary data when loading files.
2007-06-10 21:51:11 +00:00
Nicholas Bishop 2393896cee == Multires ==
Removed an unused integer from MultiresFace
2007-06-10 09:23:50 +00:00
Geoffrey Bantle ba958bea0f -> Custom Properties for Mesh entities
In order to give import/export script authors the ability to add properties
to inidividual faces, vertices and edges in the same manner as they are able
to do with ID structures three new custom data types have been added to blender
for floats, integers and strings.

Things to note:

-Since property Layers are custom data, they are added to all verts, edges 
 or faces at once.
-Only one property layer for each unique property name may exist. In  other 
 words, you cannot have a float layer as well as an integer layer
 both with the same name.
-No user interface for this exists at the moment.

The following methods and attributes have been added to the Blender.Mesh
Python module and it's object types:

->MVert/Edge/FaceSeq:
	addPropertyLayer(name, type)
	removePropertyLayer(name)
	renamePropertyLayer(original name, new name)
	properties(readonly list.)

->MVert/Edge/Face
	getProperty(name)
	setProperty(name, value)

->Mesh module
	PropertyTypes (readonly dictionary)
2007-06-04 19:18:19 +00:00
Nicholas Bishop 1a9f0e692a == Multires ==
* Moved the multires vertex data from struct MultiresLevel to struct Multires. There's no longer any reason to store data seperately for each level; it was just taking up extra memory.

* Incremented the subversion to 2 and adjusted do_versions to correctly load older files.

* Refactored the multires update process (which handles propagating changes to other levels)
2007-06-01 02:21:11 +00:00
Campbell Barton 99135b0674 dont use tface hide or select anymore, since maintaining 2 sets of hide/select data for each face is annoying.
using mface->flag for both.

Also found that the cdDM_drawMappedFaces and cdDM_drawFacesTex_common could get normals mixed up when rendering hidden faces. because hidden/invisible faces used continue without advancing to the next normal.
2007-04-29 13:39:46 +00:00
Campbell Barton 5a3ab0e32e Found a bug where "make dupes real" would crash, when the group was an extternal link. - 1 liner fix from Ton.
Also added "sort faces by selection" to the sort menu.


DNA_meshdata_types use C comments for GCC verbose warnings to be quiet
2007-04-10 11:45:07 +00:00
Nicholas Bishop d58cc7b9e6 == Multires ==
Partial fix for bug #5771, Multires tool deletes crease flags on edges

* Modified the edge flags code to support all of the edge flags (not just seams.)
* Added a new array to the Multires struct to store creases.
* For Mark Sharp, Clear Sharp, and Crease, displays an error if applied to a multires mesh not on level 1.
2007-01-22 08:34:53 +00:00
Nicholas Bishop b5acfe3eb0 A few cleanups for multires (removed commented-out code, unused variables), also removed use_tex flag from the Multires struct (that is now stored implicitly by the fdata struct.) 2007-01-10 06:29:44 +00:00
Nicholas Bishop 043be07050 Large fix for multires. Changed UV coordinates (MTFaces) to be special first-level data in multires. The data is now stored in a standard CustomData struct in Multires, rather than being stored for each level. (The UVs can now only be edited on level 1.) Changes allow multiple sets of UVs to work correctly. This change should also decrease multires memory usage some (though only when UVs are being used, of course.)
Changes to CustomData:
Some functions would only return the current active layer, added extra variants that take an index to select the level (modeled after CustomData_get_layer_n.)

Still todo:
* UVs are being interpolated linearly, should probably offer Catmull-Clark subdivision like Subsurf modifier.
* Vertex Colors still don't support multiple customdata layers.
* Editing UV data on levels other than 1 should be disabled in the interface (same for weights)
2007-01-10 06:09:10 +00:00
Nicholas Bishop 1ccc7c46bf Retyped texcolfaces.tex_page to match MTFace. 2007-01-04 22:14:40 +00:00
Nicholas Bishop c101ee5d22 Added propagation of the edge seam flag for multires. Note that the flag is only stored for level 1. 2006-12-31 10:36:48 +00:00
Nicholas Bishop 547be2a5ce As Brecht suggested, changed multires vert maps to use one big chunk of memory rather than many small ones. 2006-12-20 08:12:32 +00:00
Nicholas Bishop c0823d1de6 Do a better job of propagating face data in multires, including flags and materials 2006-12-11 01:54:34 +00:00
Ton Roosendaal 869eeadeff Damn! Commit for render passes in wrong dir.... 2006-12-05 16:44:57 +00:00
Nicholas Bishop b4f536c5e5 Modified multires to use CustomData for deformedverts. Deformedverts now load properly from editmesh. 2006-12-03 19:59:18 +00:00
Brecht Van Lommel e435fbc3c5 Added custom vertex/edge/face data for meshes:
All data layers, including MVert/MEdge/MFace, are now managed as custom
data layers. The pointers like Mesh.mvert, Mesh.dvert or Mesh.mcol are
still used of course, but allocating, copying or freeing these arrays
should be done through the CustomData API.

Work in progress documentation on this is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData


Replaced TFace by MTFace:

This is the same struct, except that it does not contain color, that now
always stays separated in MCol. This was not a good design decision to
begin with, and it is needed for adding multiple color layers later. Note
that this does mean older Blender versions will not be able to read UV
coordinates from the next release, due to an SDNA limitation.


Removed DispListMesh:

This now fully replaced by DerivedMesh. To provide access to arrays of
vertices, edges and faces, like DispListMesh does. The semantics of the
DerivedMesh.getVertArray() and similar functions were changed to return
a pointer to an array if one exists, or otherwise allocate a temporary
one. On releasing the DerivedMesh, this temporary array will be removed
automatically.


Removed ssDM and meshDM DerivedMesh backends:

The ssDM backend was for DispListMesh, so that became obsolete automatically.
The meshDM backend was replaced by the custom data backend, that now figures
out which layers need to be modified, and only duplicates those.


This changes code in many places, and overall removes 2514 lines of code.
So, there's a good chance this might break some stuff, although I've been
testing it for a few days now. The good news is, adding multiple color and
uv layers should now become easy.
2006-11-20 04:28:02 +00:00
Nicholas Bishop 8e97a2955b Merged Google Summer of Code sculptmode/multires/retopo tools.
From the tracker:
https://projects.blender.org/tracker/index.php?func=detail&aid=5018&group_id=9&atid=127
2006-11-06 01:08:26 +00:00
Ben Batt 433f6c7043 Integration of the Google Summer of Code Modifier Stack Upgrade project. The
main features are:
* Modifiers can now be in any order in the modifier stack
* DerivedMesh now has a standard framework for custom element data to be passed
  through the stack with mesh data (being copied and interpolated as
  appropriate), so modifiers can access whatever data they need
* The modifier stack code has been refactored and a number of bugs have been
  removed
* The EdgeSplit modifier has been added:
  http://mediawiki.blender.org/index.php/BlenderDev/EdgeSplitModifier
* The DerivedMesh modifier has been added:
  http://mediawiki.blender.org/index.php/BlenderDev/DisplaceModifier
* The UVProject modifier has been added:
  http://mediawiki.blender.org/index.php/BlenderDev/UVProjectModifier

For more info, see:
http://mediawiki.blender.org/index.php/User:Artificer/ModifierStackUpgrade
(currently undergoing reorganisation)
2006-08-28 01:12:36 +00:00
Geoffrey Bantle cc8051eead -> Stored Selections in Mesh DNA
Stored selections now get saved to mesh library blocks as direct data.
The idea that stored selections are 'erased' when leaving editmode and
switching objects is pretty mysterious for the user. Note that currently
the mselect array in a mesh is not written to file.  Not sure whether
to change this or not.
2006-04-03 19:02:22 +00:00
Brecht Van Lommel 3753d817ab Seam Cutting in Faceselect Mode:
- Mark Border Seam: mark edges on the border of face selection as seam.
- Clear Seam: clears seams in selected faces.
Hotkey: Ctrl+E

- Alt+RMB Click: mark/clear edge as seam
- Alt+Shift+RMB Click: mark/clear seams along the shortest/straightest path
  from last marked seam. The cost of the path also includes some measure of
  'straightness' next to the typical distance to make things work more
  predicatble and edgeloop friendly. Note that this cuts a path from edge to
  edge, not vertex to vertex. That gives some nice control over the direction
  of the seam.

Also includes:

- Removed old LSCM code.
- Fix updates glitches with DerivedMesh/Subsurf drawing in FaceSelect mode.
  Now there's a drawMappedFacesTex instead of drawFacesTex.
- Minimize Stretch menu entry called Limit Stitch.
- Removed the lasttface global, was being set before it was used anyway, so
  might as wel return from a function.
- Moved some backbuf sampling code to drawview.c from editmesh, so it can be
  used by Faceselect and VPaint.
- Use BLI_heap in parametrizer.c.
2006-02-08 21:01:00 +00:00
Brecht Van Lommel dd7e0b6bfe Apply Subsurf to UV's.
This fixes most of the UV distortion issues with subsurf. Near seams
however there might still be some distortion, but this should at least
not be worse than before. Subsurf UV is enabled by default on new meshes,
and can be enabled in the modifier panel for existing ones.

Before and after:
http://users.pandora.be/blendix/notsmooth.png
http://users.pandora.be/blendix/smooth.png
2006-01-10 11:36:57 +00:00
Ton Roosendaal 0f6194e5bc Bugfix #3077
Radiosity didn't add edges block, on "Replace Meshes". Caused wireframe
not to draw, but also crashes like for join().

Also: added patch that sets the drawflags in edges derived from the
ones set in faces. This ensures the conversion to be done correct.

TODO: this edges call also used in other areas in code, that has to be
catched and done differently.
2005-09-22 17:00:58 +00:00
Daniel Dunbar dd7bcb94bf - sillyness... added drawMappedEdges for mesh
- revert to drawLooseEdges instead of general drawEdgesFlag
 - ditched TFace edge flags, done dynamically now which also
   means don't need to recalc surface on flag changes
 - added BLI_edgehash, guess what it does
2005-08-21 20:48:45 +00:00
Daniel Dunbar 7804860cf6 - added mesh_strip_loose_faces, works in conjunction with make_edges
to get rid of faces with MFace.v3==0
 - change all Mesh's to have ->medge now. This is forced by make_edges
   on readfile, and in the various exotic important routines, and on
   conversion back in python.
 - make python NMesh structure always have medges now (needs testing)
 - with above two changes it is guarenteed that mf->v3 is never ==0
   in main blender code (i.e., all MFace's are actually triangles
   or quads) and so I went through and removed all the historic tests
   to deal with MFace.v3==0. Equals lots of deleting, I am in heaven!
 - removed MEdge edcode flag, no longer needed
 - added experimental replacement for edge flag system

Still are some inconsistencies in FACESELECT mode edge drawing to
be ironed out.

NOTE: This commit adds an experimental edge flag calc system, based
on 10-seconds-of-thought algorithm by yours truly. Would appreciate
feedback on how this system works, esp compared to old one and esp
on complex or interesting models.

To Use: New system is enabled by setting G.rt to a value between
1 and 1000 (Value of 0 uses old system). Value 1000 is reserved for
"auto" edge, which is more or less identical to old system but also
makes sure that at least 10% of edges are drawn (solves errors for
super subdivided meshes). Values between 1 and 999 act as percent
(out of 1000) of edges that should be drawn, starting with "most
interesting" edges first. Please try it and comment!
2005-08-21 07:19:20 +00:00
Daniel Dunbar 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
Daniel Dunbar 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
Ton Roosendaal 4fed035618 Weight Paint & Vertex Paint goodies;
- New: "Spray" is an option now. This used to be the only available vertex
  painting method, while holding the mousebutton and move mouse, it keeps
  applying (adding, blending) the color.
  Disabling "Spray" will give more a 'paint' effect, only applying the
  maximum what you indicated to be painting.

- Weight Paint now offers all options Vertex Paint has. This includes "Add",
  "Mult", "Sub", and "Filter". And of course the "Spray", which is default
  off btw.
  Since Weight Paint might need totally different settings, they are stored
  separate from Vertex Paint options.

- Renamed the weird "Area" and "Soft" options into something that tells what
  it actually does (Even tooltips were wrong).
  Area -> "All Faces", option to have all Faces inside the brush being
     painted on. Disabling this only paints on the face under the cursor.
  Soft -> "Vertex Dist", option that uses distances from cursor to vertex
     to calculate the effect. Disable it to only paint per-face.
  If someone knows better names... go ahead! :)

- New WeightPaint option in the Panel: "Clear", which removes reference
  to this deform group from all vertices.

- Removed code that deleted 'deform vertices' from Mesh on exit editmode,
  when vertexgroups were empty. This just worked against you... you could
  not paint on empty groups.

- Made Weight Paint painting much nicer. The way it applied values was very
  harsh without good transitions. Mainly because it didn't use the
  "Vertex Dist" option, but also because it applied colors 3 or 4 times per
  vertex (tria/quad).

- Weight Paint undo now restores on a 2nd Undo.

- Vertex Paint Panel button "Clear" didn't work even.
2005-08-16 19:37:36 +00:00
Daniel Dunbar 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
Daniel Dunbar 7b1dcf4c42 - readded Subsurf "optimal" edge drawing/rendering
- added ME_EDGERENDER flag, barely changes things atm except makes
   sure plain meshes with FasterDraw/etc set still render all edges.
   The edge drawing system needs a bit of a revamping - it is a cool
   feature but could use several improvements:
     (1) The algorithm could be better in choosing the best edges to
         draw.
     (2) The drawflags should interact well with modifiers. It is wierd
         to have a large grid with a deformer that draws no edges because
         flags are only calculated based on base mesh.
     (3) Drawflags should not be destroyed by editmode. Better design
         would be a "Draw % of edges" button.

   Of course, could also be the feature is not worth it and we
   should just drop. Feel free to comment if you have an opinion.
2005-08-12 21:55:50 +00:00
Daniel Dunbar 76d2f0da9e - couldn't help myself, got distracted working on something else and
wondered what these silly data pointers in MDeformVert were for.
   Turns out they aren't even need! Just taking up extra memory and
   space and confusing the armature deform algorithm. Naturally I
   had to clean things up. Sorry Ton.

   Deform weights are still stored in a pretty expensive and unnecessary
   way, probably use about twice as much memory as needed, and do
   way too many memory allocs.
 - moved armature_deform_verts into armature.c
 - some python code accessed the MDeformWeight data pointers, but
   did so in a completely wrong way, I am positive this code could
   never have worked (or maybe things changed during tons refactor),
   regardless it wouldn't work now... will test later.
2005-08-11 06:44:32 +00:00
Daniel Dunbar 42da62679f - removed mface->puno flags, was only used to flip normals in display
and this is better left to user (whee this was a fun commit! so
   much deleting!)
 - removed mesh_calculate_vertex_normals (replaced by mesh_calc_normals)
2005-07-23 16:09:08 +00:00
Ton Roosendaal f59503682d - basic code for fake-polygon support (called FGon in code). Disabled now
- hide flags now save correctly in mesh, to restore after going in/out
  editmode
- after an extrude, faces/edges could have wrong select flags
  (only in vertex select mode)
- new rule for addfacelist(); this now copies edges too, if an example
  is provided. That prevents a lot of awkward code, still testing if it
  goes as desired though...
2004-09-24 12:40:37 +00:00