[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17010] branches/etch-a-ton/source/blender /src/editarmature_sketch.c: Sketch Embed: fix bug when used in edit mode.
Martin Poirier
theeth at yahoo.com
Fri Oct 10 22:23:49 CEST 2008
Revision: 17010
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17010
Author: theeth
Date: 2008-10-10 22:23:49 +0200 (Fri, 10 Oct 2008)
Log Message:
-----------
Sketch Embed: fix bug when used in edit mode. It's not supposed to be used in mesh edit mode, but at least now it doesn't crash.
Modified Paths:
--------------
branches/etch-a-ton/source/blender/src/editarmature_sketch.c
Modified: branches/etch-a-ton/source/blender/src/editarmature_sketch.c
===================================================================
--- branches/etch-a-ton/source/blender/src/editarmature_sketch.c 2008-10-10 20:18:35 UTC (rev 17009)
+++ branches/etch-a-ton/source/blender/src/editarmature_sketch.c 2008-10-10 20:23:49 UTC (rev 17010)
@@ -284,11 +284,22 @@
}
if (ob->type == OB_MESH) {
- DerivedMesh *dm = mesh_get_derived_final(ob, CD_MASK_BAREMESH);
+ DerivedMesh *dm = NULL;
int val;
-
- val = peelDerivedMesh(ob, dm, ob->obmat, ray_start, ray_normal, mval, depth_peels);
-
+
+ if (ob != G.obedit)
+ {
+ dm = mesh_get_derived_final(ob, CD_MASK_BAREMESH);
+
+ val = peelDerivedMesh(ob, dm, ob->obmat, ray_start, ray_normal, mval, depth_peels);
+ }
+ else
+ {
+ dm = editmesh_get_derived_cage(CD_MASK_BAREMESH);
+
+ val = peelDerivedMesh(ob, dm, ob->obmat, ray_start, ray_normal, mval, depth_peels);
+ }
+
retval = retval || val;
dm->release(dm);
More information about the Bf-blender-cvs
mailing list