Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-01-13 00:20:09 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-01-13 00:20:09 +0300
commitb39be6007576021fb377343cd880bfcc44b77031 (patch)
tree90ef38312c85bb513413b41484db98030de07e33 /source/blender/makesrna/intern/rna_nla.c
parent63e80e271dd3f9f79fe3a85c10253ee6eea2ba4e (diff)
NLA: fix keyframes getting messed up when making strips longer. For drawing
and other operations the nla mapping would be applied to the curves, but not restored correctly. The unmap function was not the inverse of the map function, and it's not clear to me it's even possible to make it so due to repeat, so now the old coordinates are backed up in a list and then restored afterwards.
Diffstat (limited to 'source/blender/makesrna/intern/rna_nla.c')
-rw-r--r--source/blender/makesrna/intern/rna_nla.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c
index 20d1a898303..426cb1f0772 100644
--- a/source/blender/makesrna/intern/rna_nla.c
+++ b/source/blender/makesrna/intern/rna_nla.c
@@ -85,6 +85,12 @@ static char *rna_NlaStrip_path(PointerRNA *ptr)
return "";
}
+static void rna_NlaStrip_transform_update(Main *bmain, PointerRNA *ptr)
+{
+ NlaStrip *strip= (NlaStrip*)ptr->data;
+
+ BKE_nlameta_flush_transforms(strip);
+}
static void rna_NlaStrip_start_frame_set(PointerRNA *ptr, float value)
{
@@ -326,11 +332,13 @@ static void rna_def_nlastrip(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "start");
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_start_frame_set", NULL);
RNA_def_property_ui_text(prop, "Start Frame", "");
+ RNA_def_property_update(prop, 0, "rna_NlaStrip_transform_update");
prop= RNA_def_property(srna, "end_frame", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "end");
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_end_frame_set", NULL);
RNA_def_property_ui_text(prop, "End Frame", "");
+ RNA_def_property_update(prop, 0, "rna_NlaStrip_transform_update");
/* Blending */
prop= RNA_def_property(srna, "blend_in", PROP_FLOAT, PROP_NONE);