[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20722] branches/soc-2009-aligorith/source /blender/editors/space_nla: NLA SoC: Added button for entering/ exiting TweakMode
Joshua Leung
aligorith at gmail.com
Mon Jun 8 03:07:22 CEST 2009
Revision: 20722
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20722
Author: aligorith
Date: 2009-06-08 03:07:19 +0200 (Mon, 08 Jun 2009)
Log Message:
-----------
NLA SoC: Added button for entering/exiting TweakMode
- Should the icons used for this be reversed?
Modified Paths:
--------------
branches/soc-2009-aligorith/source/blender/editors/space_nla/nla_edit.c
branches/soc-2009-aligorith/source/blender/editors/space_nla/nla_header.c
Modified: branches/soc-2009-aligorith/source/blender/editors/space_nla/nla_edit.c
===================================================================
--- branches/soc-2009-aligorith/source/blender/editors/space_nla/nla_edit.c 2009-06-07 23:36:34 UTC (rev 20721)
+++ branches/soc-2009-aligorith/source/blender/editors/space_nla/nla_edit.c 2009-06-08 01:07:19 UTC (rev 20722)
@@ -120,6 +120,10 @@
ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_BOTH);
WM_event_add_notifier(C, NC_SCENE, NULL);
}
+ else {
+ BKE_report(op->reports, RPT_ERROR, "No active strip(s) to enter tweakmode on.");
+ return OPERATOR_CANCELLED;
+ }
/* done */
return OPERATOR_FINISHED;
Modified: branches/soc-2009-aligorith/source/blender/editors/space_nla/nla_header.c
===================================================================
--- branches/soc-2009-aligorith/source/blender/editors/space_nla/nla_header.c 2009-06-07 23:36:34 UTC (rev 20721)
+++ branches/soc-2009-aligorith/source/blender/editors/space_nla/nla_header.c 2009-06-08 01:07:19 UTC (rev 20722)
@@ -118,6 +118,7 @@
void nla_header_buttons(const bContext *C, ARegion *ar)
{
SpaceNla *snla= (SpaceNla *)CTX_wm_space_data(C);
+ Scene *scene= CTX_data_scene(C);
ScrArea *sa= CTX_wm_area(C);
uiBlock *block;
int xco, yco= 3;
@@ -178,6 +179,14 @@
}
xco += 98;
+ /* Tweakmode... */
+ // XXX these icons need to be changed
+ if (scene->flag & SCE_NLA_EDIT_ON)
+ uiDefIconTextButO(block, BUT, "NLAEDIT_OT_tweakmode_exit", WM_OP_INVOKE_REGION_WIN, ICON_NLA, "Exit TweakMode", xco,yco,130,YIC, "Restore the true active action. (TAB)");
+ else
+ uiDefIconTextButO(block, BUT, "NLAEDIT_OT_tweakmode_enter", WM_OP_INVOKE_REGION_WIN, ICON_EDIT, "Enter TweakMode", xco,yco,130,YIC, "Temporarily set the action referenced by the active strip as the active action so that it can be tweaked. (TAB)");
+ xco+= 150;
+
/* always as last */
UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin);
More information about the Bf-blender-cvs
mailing list