diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-04-24 02:08:18 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-04-24 02:08:18 +0400 |
commit | bd860f89e75a10cae56be31f97fcd6aa9eb13b8e (patch) | |
tree | 4ad82db39475b754b9bb4c1c439033ce46e0c62e /source/blender/editors/space_nla | |
parent | 2497af95a11122e6c30d42dd7bff5d8f239269ac (diff) | |
parent | 040a049fb17af2e690219ec7f48f601a6d2189c4 (diff) |
Merged changes in the trunk up to revision 36301.
Diffstat (limited to 'source/blender/editors/space_nla')
-rw-r--r-- | source/blender/editors/space_nla/nla_buttons.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_nla/nla_edit.c | 22 | ||||
-rw-r--r-- | source/blender/editors/space_nla/space_nla.c | 2 |
3 files changed, 21 insertions, 5 deletions
diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index b2d1ffbe790..17cd7ae41bd 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -505,7 +505,7 @@ void NLA_OT_properties(wmOperatorType *ot) ot->exec= nla_properties; ot->poll= ED_operator_nla_active; - + /* flags */ ot->flag= 0; } diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index d058ea746b6..77c91b28a63 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -271,6 +271,12 @@ static int nlaedit_add_actionclip_exec (bContext *C, wmOperator *op) //printf("Add strip - actname = '%s' \n", actname); return OPERATOR_CANCELLED; } + else if (act->idroot == 0) { + /* hopefully in this case (i.e. library of userless actions), the user knows what they're doing... */ + BKE_reportf(op->reports, RPT_WARNING, + "Action '%s' does not specify what datablocks it can be used on. Try setting the 'ID Root Type' setting from the Datablocks Editor for this Action to avoid future problems", + act->id.name+2); + } /* get a list of the editable tracks being shown in the NLA * - this is limited to active ones for now, but could be expanded to @@ -289,6 +295,16 @@ static int nlaedit_add_actionclip_exec (bContext *C, wmOperator *op) AnimData *adt= ale->adt; NlaStrip *strip= NULL; + /* sanity check: only apply actions of the right type for this ID + * NOTE: in the case that this hasn't been set, we've already warned the user about this already + */ + if ((act->idroot) && (act->idroot != GS(ale->id->name))) { + BKE_reportf(op->reports, RPT_ERROR, + "Couldn't add action '%s' as it cannot be used relative to ID-blocks of type '%s'", + act->id.name+2, ale->id->name); + continue; + } + /* create a new strip, and offset it to start on the current frame */ strip= add_nlastrip(act); @@ -1002,7 +1018,7 @@ void NLA_OT_mute_toggle (wmOperatorType *ot) /* identifiers */ ot->name= "Toggle Muting"; ot->idname= "NLA_OT_mute_toggle"; - ot->description= "Mute or un-muted selected strips"; + ot->description= "Mute or un-mute selected strips"; /* api callbacks */ ot->exec= nlaedit_toggle_mute_exec; @@ -1384,7 +1400,7 @@ void NLA_OT_action_sync_length (wmOperatorType *ot) /* identifiers */ ot->name= "Sync Action Length"; ot->idname= "NLA_OT_action_sync_length"; - ot->description= "Sychronise the length of the referenced Action with the lengths used in the strip"; + ot->description= "Synchronise the length of the referenced Action with the lengths used in the strip"; /* api callbacks */ ot->exec= nlaedit_sync_actlen_exec; @@ -1803,7 +1819,7 @@ void NLA_OT_fmodifier_add (wmOperatorType *ot) /* identifiers */ ot->name= "Add F-Modifier"; ot->idname= "NLA_OT_fmodifier_add"; - ot->description= "Add F-Modifier of the secified type to the selected NLA-Strips"; + ot->description= "Add F-Modifier of the specified type to the selected NLA-Strips"; /* api callbacks */ ot->invoke= nla_fmodifier_add_invoke; diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c index 941a88c5c40..90f9996e392 100644 --- a/source/blender/editors/space_nla/space_nla.c +++ b/source/blender/editors/space_nla/space_nla.c @@ -159,7 +159,7 @@ static SpaceLink *nla_new(const bContext *C) ar->v2d.max[0]= MAXFRAMEF; ar->v2d.max[1]= 10000.0f; - + ar->v2d.minzoom= 0.01f; ar->v2d.maxzoom= 50; ar->v2d.scroll = (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL); |