Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_navigate_dolly.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_navigate_dolly.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/source/blender/editors/space_view3d/view3d_navigate_dolly.c b/source/blender/editors/space_view3d/view3d_navigate_dolly.c
index 07099ea221e..02783c2a244 100644
--- a/source/blender/editors/space_view3d/view3d_navigate_dolly.c
+++ b/source/blender/editors/space_view3d/view3d_navigate_dolly.c
@@ -174,7 +174,8 @@ static int viewdolly_modal(bContext *C, wmOperator *op, const wmEvent *event)
}
if (ret & OPERATOR_FINISHED) {
- viewops_data_free(C, op);
+ viewops_data_free(C, vod);
+ op->customdata = NULL;
}
return ret;
@@ -225,7 +226,8 @@ static int viewdolly_exec(bContext *C, wmOperator *op)
ED_region_tag_redraw(region);
- viewops_data_free(C, op);
+ viewops_data_free(C, op->customdata);
+ op->customdata = NULL;
return OPERATOR_FINISHED;
}
@@ -241,13 +243,11 @@ static int viewdolly_invoke(bContext *C, wmOperator *op, const wmEvent *event)
const bool use_cursor_init = RNA_boolean_get(op->ptr, "use_cursor_init");
- /* makes op->customdata */
- viewops_data_create(C,
- op,
- event,
- (viewops_flag_from_prefs() & ~VIEWOPS_FLAG_ORBIT_SELECT) |
- (use_cursor_init ? VIEWOPS_FLAG_USE_MOUSE_INIT : 0));
- vod = op->customdata;
+ vod = op->customdata = viewops_data_create(
+ C,
+ event,
+ (viewops_flag_from_prefs() & ~VIEWOPS_FLAG_ORBIT_SELECT) |
+ (use_cursor_init ? VIEWOPS_FLAG_USE_MOUSE_INIT : 0));
ED_view3d_smooth_view_force_finish(C, vod->v3d, vod->region);
@@ -294,7 +294,8 @@ static int viewdolly_invoke(bContext *C, wmOperator *op, const wmEvent *event)
}
viewdolly_apply(vod, event->prev_xy, (U.uiflag & USER_ZOOM_INVERT) == 0);
- viewops_data_free(C, op);
+ viewops_data_free(C, op->customdata);
+ op->customdata = NULL;
return OPERATOR_FINISHED;
}
@@ -307,7 +308,8 @@ static int viewdolly_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void viewdolly_cancel(bContext *C, wmOperator *op)
{
- viewops_data_free(C, op);
+ viewops_data_free(C, op->customdata);
+ op->customdata = NULL;
}
void VIEW3D_OT_dolly(wmOperatorType *ot)