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:
authorCampbell Barton <ideasman42@gmail.com>2012-04-05 09:05:18 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-05 09:05:18 +0400
commitdb562488d672567dd367d64fa7a8a081e9dcbf9e (patch)
treeb1c2c4ae10875cc7954cc80eb786fb3fcae55fd5 /source/blender/makesrna/intern/rna_key.c
parent62b254e42af10a38d1dd760b4b26177f23f6baca (diff)
report [#30814] Absolute Shape Keys not working in 2.6
This report points out thet absolute shape keys are unusable. The problem is there was no way to adjust the play time of a shape key (all absolte shape keys would start at frame zero with no way to change the speed). Added an 'eval_time' property to the key block that works like the curve path evaluation time, so the time in the keyblock can be controlled.
Diffstat (limited to 'source/blender/makesrna/intern/rna_key.c')
-rw-r--r--source/blender/makesrna/intern/rna_key.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index 304af04ec27..245346326ae 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -33,6 +33,7 @@
#include "rna_internal.h"
#include "DNA_ID.h"
+#include "DNA_scene_types.h"
#include "DNA_curve_types.h"
#include "DNA_key_types.h"
#include "DNA_lattice_types.h"
@@ -620,7 +621,15 @@ static void rna_def_key(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_relative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "type", KEY_RELATIVE);
- RNA_def_property_ui_text(prop, "Relative", "Make shape keys relative");
+ RNA_def_property_ui_text(prop, "Relative",
+ "Make shape keys relative, "
+ "otherwise play through shapes as a sequence using the evaluation time");
+ RNA_def_property_update(prop, 0, "rna_Key_update_data");
+
+ prop = RNA_def_property(srna, "eval_time", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "ctime");
+ RNA_def_property_range(prop, MINFRAME, MAXFRAME);
+ RNA_def_property_ui_text(prop, "Evaluation Time", "Evaluation time for absolute shape keys");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
prop = RNA_def_property(srna, "slurph", PROP_INT, PROP_UNSIGNED);