[Bf-blender-cvs] [7a2d0f2] master: View3d: fix for roll operating on locked views, now apply to user view
Campbell Barton
noreply at git.blender.org
Tue Feb 4 11:48:06 CET 2014
Commit: 7a2d0f23fbb2da3f01a2caf6d991d87fdc956748
Author: Campbell Barton
Date: Tue Feb 4 21:44:37 2014 +1100
https://developer.blender.org/rB7a2d0f23fbb2da3f01a2caf6d991d87fdc956748
View3d: fix for roll operating on locked views, now apply to user view
===================================================================
M source/blender/editors/space_view3d/view3d_edit.c
===================================================================
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 3754b18..c055a2e 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -3720,8 +3720,7 @@ static int viewroll_exec(bContext *C, wmOperator *op)
v3d = vod->v3d;
}
else {
- ar = CTX_wm_region(C);
- v3d = CTX_wm_view3d(C);
+ ED_view3d_context_user_region(C, &v3d, &ar);
}
rv3d = ar->regiondata;
@@ -3753,15 +3752,15 @@ static int viewroll_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
ViewOpsData *vod;
- /* makes op->customdata */
- viewops_data_alloc(C, op);
- viewops_data_create(C, op, event);
- vod = op->customdata;
-
if (RNA_struct_property_is_set(op->ptr, "angle")) {
viewroll_exec(C, op);
}
else {
+ /* makes op->customdata */
+ viewops_data_alloc(C, op);
+ viewops_data_create(C, op, event);
+ vod = op->customdata;
+
/* overwrite the mouse vector with the view direction */
normalize_v3_v3(vod->mousevec, vod->rv3d->viewinv[2]);
negate_v3(vod->mousevec);
More information about the Bf-blender-cvs
mailing list