[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43490] trunk/blender/source/blender/ editors/space_clip/tracking_ops.c: Fix #29918: Set Scale does not work the second time

Sergey Sharybin sergey.vfx at gmail.com
Wed Jan 18 12:41:41 CET 2012


Revision: 43490
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43490
Author:   nazgul
Date:     2012-01-18 11:41:35 +0000 (Wed, 18 Jan 2012)
Log Message:
-----------
Fix #29918: Set Scale does not work the second time

Issue was caused by recently added operator presets stuff.

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-01-18 11:25:30 UTC (rev 43489)
+++ trunk/blender/source/blender/editors/space_clip/tracking_ops.c	2012-01-18 11:41:35 UTC (rev 43490)
@@ -2520,9 +2520,8 @@
 {
 	SpaceClip *sc= CTX_wm_space_clip(C);
 	MovieClip *clip= ED_space_clip(sc);
-	float dist= RNA_float_get(op->ptr, "distance");
 
-	if(dist==0.0f)
+	if(!RNA_struct_property_is_set(op->ptr, "distance"))
 		RNA_float_set(op->ptr, "distance", clip->tracking.settings.dist);
 
 	return set_scale_exec(C, op);
@@ -2573,9 +2572,8 @@
 {
 	SpaceClip *sc= CTX_wm_space_clip(C);
 	MovieClip *clip= ED_space_clip(sc);
-	float dist= RNA_float_get(op->ptr, "distance");
 
-	if(dist==0.0f)
+	if(!RNA_struct_property_is_set(op->ptr, "distance"))
 		RNA_float_set(op->ptr, "distance", clip->tracking.settings.object_distance);
 
 	return set_solution_scale_exec(C, op);



More information about the Bf-blender-cvs mailing list