From 60dc2f521b05794901109a55caa5c810be6b6128 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 2 Feb 2012 19:37:50 +0000 Subject: Camera tracking: fix for Clean Tracks operator which used to always use properties values from previous operator run instead of using values from tool settings. --- source/blender/editors/space_clip/tracking_ops.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index 935dda864bf..6a9c2755330 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -3417,15 +3417,15 @@ static int clean_tracks_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even { SpaceClip *sc= CTX_wm_space_clip(C); MovieClip *clip= ED_space_clip(sc); - int frames= RNA_int_get(op->ptr, "frames"); - float error= RNA_float_get(op->ptr, "error"); - int action= RNA_enum_get(op->ptr, "action"); - if(frames==0 && error==0 && action==0) { + if(!RNA_struct_property_is_set(op->ptr, "frames")) RNA_int_set(op->ptr, "frames", clip->tracking.settings.clean_frames); + + if(!RNA_struct_property_is_set(op->ptr, "error")) RNA_float_set(op->ptr, "error", clip->tracking.settings.clean_error); + + if(!RNA_struct_property_is_set(op->ptr, "action")) RNA_enum_set(op->ptr, "action", clip->tracking.settings.clean_action); - } return clean_tracks_exec(C, op); } -- cgit v1.2.3