[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43855] trunk/blender/source/blender/ editors/space_clip/tracking_ops.c: Camera tracking: fix for Clean Tracks operator which used to always use

Sergey Sharybin sergey.vfx at gmail.com
Thu Feb 2 20:37:53 CET 2012


Revision: 43855
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43855
Author:   nazgul
Date:     2012-02-02 19:37:50 +0000 (Thu, 02 Feb 2012)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_clip/tracking_ops.c

Modified: trunk/blender/source/blender/editors/space_clip/tracking_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_clip/tracking_ops.c	2012-02-02 19:20:51 UTC (rev 43854)
+++ trunk/blender/source/blender/editors/space_clip/tracking_ops.c	2012-02-02 19:37:50 UTC (rev 43855)
@@ -3417,15 +3417,15 @@
 {
 	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);
 }




More information about the Bf-blender-cvs mailing list