[Bf-blender-cvs] [d7eac00] master: Expose track's offset to the RNA

Sergey Sharybin noreply at git.blender.org
Wed Nov 20 10:58:58 CET 2013


Commit: d7eac00d12a13876786c9c8b7b409f104dc6ae1d
Author: Sergey Sharybin
Date:   Wed Nov 20 15:55:23 2013 +0600
http://developer.blender.org/rBd7eac00d12a13876786c9c8b7b409f104dc6ae1d

Expose track's offset to the RNA

===================================================================

M	source/blender/makesrna/intern/rna_tracking.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c
index 92d12a3..a0aed94 100644
--- a/source/blender/makesrna/intern/rna_tracking.c
+++ b/source/blender/makesrna/intern/rna_tracking.c
@@ -1354,6 +1354,14 @@ static void rna_def_trackingTrack(BlenderRNA *brna)
 	RNA_def_property_float_sdna(prop, NULL, "weight");
 	RNA_def_property_range(prop, 0.0f, 1.0f);
 	RNA_def_property_ui_text(prop, "Weight", "Influence of this track on a final solution");
+
+	/* offset */
+	prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_TRANSLATION);
+	RNA_def_property_array(prop, 2);
+	RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, RNA_TRANSLATION_PREC_DEFAULT);
+	RNA_def_property_float_sdna(prop, NULL, "offset");
+	RNA_def_property_ui_text(prop, "Offset", "Offset of track from the parenting point");
+	RNA_def_property_update(prop, NC_MOVIECLIP | NA_EDITED, NULL);
 }
 
 static void rna_def_trackingPlaneMarker(BlenderRNA *brna)




More information about the Bf-blender-cvs mailing list