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>2010-03-18 16:04:46 +0300
committerJoshua Leung <aligorith@gmail.com>2010-03-18 16:04:46 +0300
commit618b459e8b3630eea747523febec666889a364f7 (patch)
tree481c530e96e9e77ae09029f35a436475921bea39 /source/blender/makesrna/intern/rna_fcurve.c
parent148985edf03814b26f99bf4ae883c83db216ccf3 (diff)
F-Modifier Goodies (as requested by @ndy):
* Copy/Paste operators for F-Modifiers Available in Graph and NLA Editors. Use the Copy/Paste buttons beside the 'Add Modifier' buttons. Copy copies all the modifiers of the ACTIVE F-Curve or Strip depending on the editor. Paste pastes modifiers from the buffer to all the selected F-Curves or Strips, adding the new modifiers to the ends of each list. * 'Stepped Interpolation' F-Modifier This modifier holds each interpolated value from the F-Curve for several frames without changing the timing. This allows to preview motions 'on-twos' for example without altering the timing, or having to go through setting heaps of keyframes. In this case, Andy wanted to use this for CG <-> StopMo.
Diffstat (limited to 'source/blender/makesrna/intern/rna_fcurve.c')
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index d5d28ac83ae..3ab4673212d 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -51,6 +51,7 @@ EnumPropertyItem fmodifier_type_items[] = {
{FMODIFIER_TYPE_FILTER, "FILTER", 0, "Filter", ""},
{FMODIFIER_TYPE_PYTHON, "PYTHON", 0, "Python", ""},
{FMODIFIER_TYPE_LIMITS, "LIMITS", 0, "Limits", ""},
+ {FMODIFIER_TYPE_STEPPED, "STEPPED", 0, "Stepped Interpolation", ""},
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem beztriple_keyframe_type_items[] = {
@@ -84,6 +85,8 @@ static StructRNA *rna_FModifierType_refine(struct PointerRNA *ptr)
return &RNA_FModifierPython;
case FMODIFIER_TYPE_LIMITS:
return &RNA_FModifierLimits;
+ case FMODIFIER_TYPE_STEPPED:
+ return &RNA_FModifierStepped;
default:
return &RNA_UnknownType;
}
@@ -712,9 +715,31 @@ static void rna_def_fmodifier_noise(BlenderRNA *brna)
}
+/* --------- */
+
+static void rna_def_fmodifier_stepped(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "FModifierStepped", "FModifier");
+ RNA_def_struct_ui_text(srna, "Stepped Interpolation F-Modifier", "Holds each interpolated value from the F-Curve for several frames without changing the timing");
+ RNA_def_struct_sdna_from(srna, "FMod_Stepped", "data");
+
+ /* properties */
+ prop= RNA_def_property(srna, "step_size", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Step Size", "Number of frames to hold each value");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
+
+ prop= RNA_def_property(srna, "start_offset", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "start");
+ RNA_def_property_ui_text(prop, "Start Offset", "Reference number of frames before frames get held. Use to get hold for '1-3' vs '5-7' holding patterns");
+ RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
+}
/* --------- */
+
static void rna_def_fmodifier(BlenderRNA *brna)
{
StructRNA *srna;
@@ -1209,6 +1234,7 @@ void RNA_def_fcurve(BlenderRNA *brna)
rna_def_fmodifier_python(brna);
rna_def_fmodifier_limits(brna);
rna_def_fmodifier_noise(brna);
+ rna_def_fmodifier_stepped(brna);
}