diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-08-02 17:15:20 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-08-02 17:15:20 +0400 |
commit | 81146e419cc9958559b3a4b0f1c919e378cce531 (patch) | |
tree | 40e1dbba948496b1484300b8c3b50da893a2d271 /source/blender/makesrna | |
parent | 1aa3885ef72658771bec837007b3ef0296a81bc4 (diff) |
NLA Tweaks:
* "Pushing down" the action to make a new strip will now make the new strip the 'active' one.
* 'Active Action' field in Animation Data panel is now editable as long as we aren't in "tweakmode"
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_animation.c | 12 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_pose.c | 1 |
2 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index 76ed62f6438..e334e2b5e90 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -38,6 +38,17 @@ #ifdef RNA_RUNTIME +static int rna_AnimData_action_editable(PointerRNA *ptr) +{ + AnimData *adt= (AnimData *)ptr->data; + + /* active action is only editable when it is not a tweaking strip */ + if ((adt->flag & ADT_NLA_EDIT_ON) || (adt->actstrip) || (adt->tmpact)) + return 0; + else + return 1; +} + static void rna_ksPath_RnaPath_get(PointerRNA *ptr, char *value) { KS_Path *ksp= (KS_Path *)ptr->data; @@ -191,6 +202,7 @@ void rna_def_animdata(BlenderRNA *brna) /* 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_editable_func(prop, "rna_AnimData_action_editable"); /* Active Action Settings */ prop= RNA_def_property(srna, "action_extrapolation", PROP_ENUM, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index 095471dd053..0148ce819d4 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -60,7 +60,6 @@ static void rna_Pose_update(bContext *C, PointerRNA *ptr) static char *rna_PoseChannel_path(PointerRNA *ptr) { - // XXX do we really need the 'pose.' bit? return BLI_sprintfN("pose.pose_channels[\"%s\"]", ((bPoseChannel*)ptr->data)->name); } |