[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14192] trunk/blender/source/blender: Fixed bug #8514, sculpt: pivot last and undo
Nicholas Bishop
nicholasbishop at gmail.com
Fri Mar 21 02:10:34 CET 2008
Revision: 14192
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14192
Author: nicholasbishop
Date: 2008-03-21 02:10:32 +0100 (Fri, 21 Mar 2008)
Log Message:
-----------
Fixed bug #8514, sculpt: pivot last and undo
Undoing in sculpt mode correctly returns to previous pivots now.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/BKE_sculpt.h
trunk/blender/source/blender/makesdna/DNA_scene_types.h
trunk/blender/source/blender/src/sculptmode.c
trunk/blender/source/blender/src/view.c
Modified: trunk/blender/source/blender/blenkernel/BKE_sculpt.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_sculpt.h 2008-03-20 21:43:32 UTC (rev 14191)
+++ trunk/blender/source/blender/blenkernel/BKE_sculpt.h 2008-03-21 01:10:32 UTC (rev 14192)
@@ -59,9 +59,6 @@
struct RadialControl *radialcontrol;
- /* For rotating around a pivot point */
- vec3f pivot;
-
struct SculptStroke *stroke;
} SculptSession;
Modified: trunk/blender/source/blender/makesdna/DNA_scene_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_scene_types.h 2008-03-20 21:43:32 UTC (rev 14191)
+++ trunk/blender/source/blender/makesdna/DNA_scene_types.h 2008-03-21 01:10:32 UTC (rev 14192)
@@ -468,6 +468,10 @@
/* Settings for each brush */
BrushData drawbrush, smoothbrush, pinchbrush, inflatebrush, grabbrush, layerbrush, flattenbrush;
+
+ /* For rotating around a pivot point */
+ float pivot[3];
+
short brush_type;
/* For the Brush Shape */
@@ -486,10 +490,10 @@
/* Symmetry is separate from the other BrushData because the same
settings are always used for all brush types */
char symm;
-
+
/* Added to store if the 'Rake' setting has been set */
char rake;
- char pad[7];
+ char pad[3];
} SculptData;
typedef struct Scene {
Modified: trunk/blender/source/blender/src/sculptmode.c
===================================================================
--- trunk/blender/source/blender/src/sculptmode.c 2008-03-20 21:43:32 UTC (rev 14191)
+++ trunk/blender/source/blender/src/sculptmode.c 2008-03-21 01:10:32 UTC (rev 14192)
@@ -1231,7 +1231,7 @@
/* Set the pivot to allow the model to rotate around the center of the brush */
if(get_depth(mouse[0],mouse[1]) < 1.0)
- VecCopyf(&sculpt_session()->pivot.x, a->symm.center_3d);
+ VecCopyf(sd->pivot, a->symm.center_3d);
/* Now project the Up, Right, and Out normals from view to model coords */
unproject(zero_loc, 0, 0, 0);
@@ -1692,7 +1692,7 @@
}
else {
do_symmetrical_brush_actions(a, mouse, mvalo);
- unproject(&ss->pivot.x, mouse[0], mouse[1], a->depth);
+ unproject(sd->pivot, mouse[0], mouse[1], a->depth);
}
if(modifier_calculations || ob_get_keyblock(ob))
Modified: trunk/blender/source/blender/src/view.c
===================================================================
--- trunk/blender/source/blender/src/view.c 2008-03-20 21:43:32 UTC (rev 14191)
+++ trunk/blender/source/blender/src/view.c 2008-03-21 01:10:32 UTC (rev 14192)
@@ -579,7 +579,7 @@
use_sel= 1;
VecCopyf(ofs, G.vd->ofs);
- VecCopyf(obofs,&sculpt_session()->pivot.x);
+ VecCopyf(obofs, sculpt_data()->pivot);
Mat4MulVecfl(ob->obmat, obofs);
obofs[0]= -obofs[0];
obofs[1]= -obofs[1];
More information about the Bf-blender-cvs
mailing list