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>2013-04-26 17:42:55 +0400
committerJoshua Leung <aligorith@gmail.com>2013-04-26 17:42:55 +0400
commiteda757d4c8df59ae75de54506e810a3abb783107 (patch)
treea8bab95f03e10e7f6d747a9c5288f25a1c875ec0 /source/blender/makesrna/intern/rna_nla.c
parent1a3c59baacf9caecb4b13bbe2bb6316ef115f19e (diff)
Bugfix [#34645] NlaStrip Tweak Mode - No automatic action length sync on exit
Originally I was thinking of not restoring this functionality (see report for further details). However, upon rechecking the code, it seems that there was actually a define set up for this already, but which wasn't actually hooked up yet. So, this commit basically exposes this option ("Sync Length") which ensures that when exiting tweak mode on a NLA Strip, that strip instance (and not other users of the same action) will be updated to include the newly added keyframes. This option is not enabled by default, and shouldn't really be needed in most ("intended") workflows.
Diffstat (limited to 'source/blender/makesrna/intern/rna_nla.c')
-rw-r--r--source/blender/makesrna/intern/rna_nla.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c
index 3bf6c11d935..399131bbd61 100644
--- a/source/blender/makesrna/intern/rna_nla.c
+++ b/source/blender/makesrna/intern/rna_nla.c
@@ -517,13 +517,13 @@ static void rna_def_nlastrip(BlenderRNA *brna)
prop = RNA_def_property(srna, "action_frame_start", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "actstart");
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_action_start_frame_set", NULL);
- RNA_def_property_ui_text(prop, "Action Start Frame", "");
+ RNA_def_property_ui_text(prop, "Action Start Frame", "First frame from action to use");
RNA_def_property_update(prop, NC_ANIMATION | ND_NLA, NULL); /* this will do? */
prop = RNA_def_property(srna, "action_frame_end", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "actend");
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_action_end_frame_set", NULL);
- RNA_def_property_ui_text(prop, "Action End Frame", "");
+ RNA_def_property_ui_text(prop, "Action End Frame", "Last frame from action to use");
RNA_def_property_update(prop, NC_ANIMATION | ND_NLA, NULL); /* this will do? */
/* Action Reuse */
@@ -616,8 +616,12 @@ static void rna_def_nlastrip(BlenderRNA *brna)
"automatically determined)");
RNA_def_property_update(prop, NC_ANIMATION | ND_NLA, NULL); /* this will do? */
- /* TODO: */
- /* - sync length */
+ prop = RNA_def_property(srna, "use_sync_length", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", NLASTRIP_FLAG_SYNC_LENGTH);
+ RNA_def_property_ui_text(prop, "Sync Action Length",
+ "Update range of frames referenced from action "
+ "after tweaking strip and its keyframes");
+ RNA_def_property_update(prop, NC_ANIMATION | ND_NLA, NULL); /* this will do? */
}
static void rna_api_nlatrack_strips(BlenderRNA *brna, PropertyRNA *cprop)