Code cleanup: simplify the DerivedMesh.drawMappedFaces interface.
authorNicholas Bishop <nicholasbishop@gmail.com>
Wed, 7 Mar 2012 12:48:52 +0000 (12:48 +0000)
committerNicholas Bishop <nicholasbishop@gmail.com>
Wed, 7 Mar 2012 12:48:52 +0000 (12:48 +0000)
commit925f21342709522afa334218e97e0b31f87f1516
tree5fd06cc9a34227079fa47d8c9a7554c6441a7d32
parent43711d856891c46c1dc898554f40534d9b5f529f
Code cleanup: simplify the DerivedMesh.drawMappedFaces interface.

This function pointer's 'setDrawOptions' parameter took a slightly
different type than the other drawing callbacks. In particular, it
could set a 'drawSmooth' value to indicate that smoothing should
always be enabled, overriding the face flag. However, all callbacks
either did not set this value, or set it unconditionally to
1. Replaced this by adding a new 'flag' parameter to drawFacesMapped,
which can be set to DM_DRAW_ALWAYS_SMOOTH where appropriate.

Also removed the 'useColors' parameter and replaced it with another
flag value, DM_DRAW_USE_COLORS.

Removed the 'wpaint__setSolidDrawOptions' callback, was only being
used to set the shading to smooth.
source/blender/blenkernel/BKE_DerivedMesh.h
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/editderivedmesh.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/editors/space_view3d/drawmesh.c
source/blender/editors/space_view3d/drawobject.c