[Bf-blender-cvs] [93828de] wiggly-widgets: Fix jumping/wrongly offset 2-axes constrained widgets

Julian Eisel noreply at git.blender.org
Sun Aug 23 14:15:23 CEST 2015


Commit: 93828de99b8dc503448460890cfe83d62fa9fe43
Author: Julian Eisel
Date:   Sun Aug 23 14:14:28 2015 +0200
Branches: wiggly-widgets
https://developer.blender.org/rB93828de99b8dc503448460890cfe83d62fa9fe43

Fix jumping/wrongly offset 2-axes constrained widgets

===================================================================

M	source/blender/editors/transform/manipulator_widget.c
M	source/blender/windowmanager/intern/wm_widgets.c

===================================================================

diff --git a/source/blender/editors/transform/manipulator_widget.c b/source/blender/editors/transform/manipulator_widget.c
index f33b308..0a31f34 100644
--- a/source/blender/editors/transform/manipulator_widget.c
+++ b/source/blender/editors/transform/manipulator_widget.c
@@ -1161,9 +1161,9 @@ void WIDGETGROUP_manipulator_draw(const struct bContext *C, struct wmWidgetGroup
 
 				/* XXX hrmpf, widgets call this twice on every redraw, could use update flag */
 				ED_view3d_update_viewmat(CTX_data_scene(C), CTX_wm_view3d(C), CTX_wm_region(C), NULL, NULL);
-				px = ED_view3d_pixel_size(rv3d, origin);
 
 				copy_v4_v4(origin, rv3d->twmat[3]);
+				px = ED_view3d_pixel_size(rv3d, origin);
 
 				if (ELEM(axis_idx, MAN_AXIS_TRANS_XY, MAN_AXIS_SCALE_XY)) {
 					origin[0] += px * ofs_fac;
diff --git a/source/blender/windowmanager/intern/wm_widgets.c b/source/blender/windowmanager/intern/wm_widgets.c
index 16dd049..e6ea4ff 100644
--- a/source/blender/windowmanager/intern/wm_widgets.c
+++ b/source/blender/windowmanager/intern/wm_widgets.c
@@ -875,6 +875,7 @@ void wm_widget_handler_modal_update(bContext *C, wmEvent *event, wmEventHandler
 {
 	wmWidgetMap *wmap;
 
+	/* happens on render */
 	if (!handler->op_region)
 		return;




More information about the Bf-blender-cvs mailing list