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:
authorJoshua Leung <aligorith@gmail.com>2009-07-31 11:43:47 +0400
committerJoshua Leung <aligorith@gmail.com>2009-07-31 11:43:47 +0400
commita1eef5bb4d1ac64cfde0a5055a889116ee855b7f (patch)
tree9d6d41c69b672868f0e8f09d7dd0430cc4ade00b /source/blender/makesrna/intern/rna_animation.c
parent6f847863a131cc61addbe6485abf2f24ae150ff1 (diff)
Animato - NLA + Realtime Animating Goodies
* When doing realtime recording of animation (i.e. transforming objects + bones while animation playback is running, and auto-keying is enabled), animation will be added to a new NLA Track+Strip combo everytime a single 'loop' of the frame range has finished. This will allow 'passes' over the animation to be less destructive. * Made the evaluation of the active action (when NLA data is present), be handled as part of the normal NLA system evaluation code (as if it were just another strip in a track at the end). The immediate benefit is that there are now some settings (available in the "Animation Data" panel in the NLA Editor with a strip selected) which allow for the way the active action is combined with the NLA stack results. For instance, the way that the action extrapolates is used in the recording tweaks above.
Diffstat (limited to 'source/blender/makesrna/intern/rna_animation.c')
-rw-r--r--source/blender/makesrna/intern/rna_animation.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index 3469d716853..76ed62f6438 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -26,6 +26,7 @@
#include "RNA_define.h"
#include "RNA_types.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
@@ -187,9 +188,26 @@ void rna_def_animdata(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "NlaTrack");
RNA_def_property_ui_text(prop, "NLA Tracks", "NLA Tracks (i.e. Animation Layers).");
- /* Action */
+ /* Active Action */
prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
- RNA_def_property_ui_text(prop, "Action", "Active Action for this datablock.");
+ RNA_def_property_ui_text(prop, "Action", "Active Action for this datablock.");
+
+ /* Active Action Settings */
+ prop= RNA_def_property(srna, "action_extrapolation", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "act_extendmode");
+ RNA_def_property_enum_items(prop, nla_mode_extend_items);
+ RNA_def_property_ui_text(prop, "Action Extrapolation", "Action to take for gaps past the Active Action's range (when evaluating with NLA).");
+
+ prop= RNA_def_property(srna, "action_blending", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "act_blendmode");
+ RNA_def_property_enum_items(prop, nla_mode_blend_items);
+ RNA_def_property_ui_text(prop, "Action Blending", "Method used for combining Active Action's result with result of NLA stack.");
+
+ prop= RNA_def_property(srna, "action_influence", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "act_influence");
+ RNA_def_property_float_default(prop, 1.0f);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Action Influence", "Amount the Active Action contributes to the result of the NLA stack.");
/* Drivers */
prop= RNA_def_property(srna, "drivers", PROP_COLLECTION, PROP_NONE);
@@ -197,7 +215,10 @@ void rna_def_animdata(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "FCurve");
RNA_def_property_ui_text(prop, "Drivers", "The Drivers/Expressions for this datablock.");
- /* Settings */
+ /* General Settings */
+ prop= RNA_def_property(srna, "nla_enabled", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ADT_NLA_EVAL_OFF);
+ RNA_def_property_ui_text(prop, "NLA Evaluation Enabled", "NLA stack is evaluated when evaluating this block.");
}
/* --- */