[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43929] branches/bmesh/blender/source/ blender/blenkernel/intern: fix [#30083] Sculpt not redrawing with plain mesh
Campbell Barton
ideasman42 at gmail.com
Mon Feb 6 07:57:02 CET 2012
Revision: 43929
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43929
Author: campbellbarton
Date: 2012-02-06 06:56:54 +0000 (Mon, 06 Feb 2012)
Log Message:
-----------
fix [#30083] Sculpt not redrawing with plain mesh
Modified Paths:
--------------
branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c
branches/bmesh/blender/source/blender/blenkernel/intern/cdderivedmesh.c
Modified: branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c 2012-02-06 06:26:54 UTC (rev 43928)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c 2012-02-06 06:56:54 UTC (rev 43929)
@@ -1657,21 +1657,28 @@
}
#endif /* WITH_GAMEENGINE */
- /* --------------------------------------------------------------------- */
- /* First calculate the polygon and vertex normals, re-tesselation
- * copies these into the tessface's normal layer */
- finaldm->calcNormals(finaldm);
- /* Re-tesselation is necessary to push render data (uvs, textures, colors)
- * from loops and polys onto the tessfaces. This may be currently be
- * redundantin cases where the render mode doesn't use these inputs, but
- * ideally eventually tesselation would happen on-demand, and this is one
- * of the primary places it would be needed. */
- finaldm->recalcTesselation(finaldm);
- /* Need to watch this, it can cause issues, see bug [#29338] */
- /* take care with this block, we really need testing frameworks */
- /* --------------------------------------------------------------------- */
+ {
+ /* calculating normals can re-calculate tessfaces in some cases */
+ int num_tessface = finaldm->getNumTessFaces(finaldm);
+ /* --------------------------------------------------------------------- */
+ /* First calculate the polygon and vertex normals, re-tesselation
+ * copies these into the tessface's normal layer */
+ finaldm->calcNormals(finaldm);
+ /* Re-tesselation is necessary to push render data (uvs, textures, colors)
+ * from loops and polys onto the tessfaces. This may be currently be
+ * redundantin cases where the render mode doesn't use these inputs, but
+ * ideally eventually tesselation would happen on-demand, and this is one
+ * of the primary places it would be needed. */
+ if (num_tessface == 0 && finaldm->getNumTessFaces(finaldm) == 0) {
+ finaldm->recalcTesselation(finaldm);
+ }
+ /* Need to watch this, it can cause issues, see bug [#29338] */
+ /* take care with this block, we really need testing frameworks */
+ /* --------------------------------------------------------------------- */
+ }
+
*final_r = finaldm;
if(orcodm)
Modified: branches/bmesh/blender/source/blender/blenkernel/intern/cdderivedmesh.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/cdderivedmesh.c 2012-02-06 06:26:54 UTC (rev 43928)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/cdderivedmesh.c 2012-02-06 06:56:54 UTC (rev 43929)
@@ -1681,7 +1681,7 @@
dm->getEdgeDataArray = DM_get_edge_data_layer;
dm->getTessFaceDataArray = DM_get_tessface_data_layer;
- dm->calcNormals = CDDM_calc_normals;
+ dm->calcNormals = CDDM_calc_normals_mapping;
dm->recalcTesselation = CDDM_recalc_tesselation;
dm->getVertCos = cdDM_getVertCos;
More information about the Bf-blender-cvs
mailing list