[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20807] branches/soc-2009-aligorith/source /blender/makesrna/intern: NLA SoC: RNA Fixes

Joshua Leung aligorith at gmail.com
Thu Jun 11 13:53:41 CEST 2009


Revision: 20807
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20807
Author:   aligorith
Date:     2009-06-11 13:53:41 +0200 (Thu, 11 Jun 2009)

Log Message:
-----------
NLA SoC: RNA Fixes

- Lower bound for start values has been expanded to -MAXFRAME, to avoid clipping problems when the strip is moved past frame 0

- Removed some obsolete (+ commented out) NLA wrapping in Object stuff

Modified Paths:
--------------
    branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_nla.c
    branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_object.c

Modified: branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_nla.c
===================================================================
--- branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_nla.c	2009-06-11 11:46:12 UTC (rev 20806)
+++ branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_nla.c	2009-06-11 11:53:41 UTC (rev 20807)
@@ -47,13 +47,13 @@
 	/* clamp value to lie within valid limits 
 	 *	- cannot start past the end of the strip + some flexibility threshold
 	 *	- cannot start before the previous strip (if present) ends 
-	 *	- minimum frame is 1.0f (this can be changed)
+	 *	- minimum frame is -MAXFRAME so that we don't get clipping on frame 0
 	 */
 	if (data->prev) {
 		CLAMP(value, data->prev->end, data->end-0.1f);
 	}
 	else {
-		CLAMP(value, 1, data->end);
+		CLAMP(value, -MAXFRAME, data->end);
 	}
 	data->start= value;
 }
@@ -137,7 +137,7 @@
 static void rna_NlaStrip_action_start_frame_set(PointerRNA *ptr, float value)
 {
 	NlaStrip *data= (NlaStrip*)ptr->data;
-	CLAMP(value, 1, data->actend);
+	CLAMP(value, -MAXFRAME, data->actend);
 	data->actstart= value;
 }
 

Modified: branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_object.c
===================================================================
--- branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_object.c	2009-06-11 11:46:12 UTC (rev 20806)
+++ branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_object.c	2009-06-11 11:53:41 UTC (rev 20807)
@@ -1069,29 +1069,6 @@
 	RNA_def_property_clear_flag(prop, PROP_EDITABLE);
 	RNA_def_property_ui_text(prop, "Pose Mode", "Object with armature data is in pose mode.");
 
-	// XXX this stuff should be moved to AnimData...
-/*
-	prop= RNA_def_property(srna, "nla_disable_path", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "nlaflag", OB_DISABLE_PATH);
-	RNA_def_property_ui_text(prop, "NLA Disable Path", "Disable path temporally, for editing cycles.");
-
-	prop= RNA_def_property(srna, "nla_collapsed", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "nlaflag", OB_NLA_COLLAPSED);
-	RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-	RNA_def_property_ui_text(prop, "NLA Collapsed", "");
-
-	prop= RNA_def_property(srna, "nla_override", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "nlaflag", OB_NLA_OVERRIDE);
-	RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-	RNA_def_property_ui_text(prop, "NLA Override", "");
-
-	prop= RNA_def_property(srna, "nla_strips", PROP_COLLECTION, PROP_NONE);
-	RNA_def_property_collection_sdna(prop, NULL, "nlastrips", NULL);
-	RNA_def_property_struct_type(prop, "UnknownType");
-	RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-	RNA_def_property_ui_text(prop, "NLA Strips", "NLA strips of the object.");
-*/
-	
 	/* shape keys */
 
 	prop= RNA_def_property(srna, "shape_key_lock", PROP_BOOLEAN, PROP_NONE);





More information about the Bf-blender-cvs mailing list