diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-02-02 23:37:50 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-02-02 23:37:50 +0400 |
commit | 60dc2f521b05794901109a55caa5c810be6b6128 (patch) | |
tree | d333893576ed390afd050a8d33c4d21937fbceb7 | |
parent | 3b3d811bf0a7e1a69a863d6b248be6dff74ada44 (diff) |
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.
-rw-r--r-- | source/blender/editors/space_clip/tracking_ops.c | 10 |
1 files 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); } |