[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22159] branches/blender2.5/blender/source /blender: Graph Editor Bugfixes:
Joshua Leung
aligorith at gmail.com
Mon Aug 3 00:56:43 CEST 2009
Revision: 22159
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22159
Author: aligorith
Date: 2009-08-03 00:56:42 +0200 (Mon, 03 Aug 2009)
Log Message:
-----------
Graph Editor Bugfixes:
* Tools such as set handle type, etc. were not being called correctly from the menus. There were missing operator-context calls to make sure that the invoke methods would get skipped.
* Hack for loading old files - buttons region for Graph Editor now gets added. Dunno why this didn't work automatically as for NLA despite the two having the same code.
Modified Paths:
--------------
branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c
branches/blender2.5/blender/source/blender/editors/space_action/action_header.c
branches/blender2.5/blender/source/blender/editors/space_graph/graph_header.c
Modified: branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c 2009-08-02 22:39:21 UTC (rev 22158)
+++ branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c 2009-08-02 22:56:42 UTC (rev 22159)
@@ -5731,6 +5731,14 @@
ar->regiontype= RGN_TYPE_CHANNELS;
ar->alignment= RGN_ALIGN_LEFT;
ar->v2d.scroll= (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM);
+
+ // for some reason, this doesn't seem to go auto like for NLA...
+ ar= MEM_callocN(sizeof(ARegion), "area region from do_versions");
+ BLI_addtail(lb, ar);
+ ar->regiontype= RGN_TYPE_UI;
+ ar->alignment= RGN_ALIGN_RIGHT;
+ ar->v2d.scroll= V2D_SCROLL_RIGHT;
+ ar->v2d.flag = RGN_FLAG_HIDDEN;
break;
case SPACE_ACTION:
Modified: branches/blender2.5/blender/source/blender/editors/space_action/action_header.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_action/action_header.c 2009-08-02 22:39:21 UTC (rev 22158)
+++ branches/blender2.5/blender/source/blender/editors/space_action/action_header.c 2009-08-02 22:56:42 UTC (rev 22159)
@@ -167,6 +167,7 @@
static void act_edit_snapmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "ACT_OT_snap", "type", ACTKEYS_SNAP_CFRA);
uiItemEnumO(layout, NULL, 0, "ACT_OT_snap", "type", ACTKEYS_SNAP_NEAREST_FRAME);
uiItemEnumO(layout, NULL, 0, "ACT_OT_snap", "type", ACTKEYS_SNAP_NEAREST_SECOND);
@@ -175,6 +176,7 @@
static void act_edit_mirrormenu(bContext *C, uiLayout *layout, void *arg_unused)
{
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "ACT_OT_mirror", "type", ACTKEYS_MIRROR_CFRA);
uiItemEnumO(layout, NULL, 0, "ACT_OT_mirror", "type", ACTKEYS_MIRROR_YAXIS);
uiItemEnumO(layout, NULL, 0, "ACT_OT_mirror", "type", ACTKEYS_MIRROR_XAXIS);
@@ -183,6 +185,7 @@
static void act_edit_handlesmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type", "type", HD_FREE);
uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type", "type", HD_AUTO);
uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type", "type", HD_VECT);
@@ -192,6 +195,7 @@
static void act_edit_ipomenu(bContext *C, uiLayout *layout, void *arg_unused)
{
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "ACT_OT_interpolation_type", "type", BEZT_IPO_CONST);
uiItemEnumO(layout, NULL, 0, "ACT_OT_interpolation_type", "type", BEZT_IPO_LIN);
uiItemEnumO(layout, NULL, 0, "ACT_OT_interpolation_type", "type", BEZT_IPO_BEZ);
@@ -199,6 +203,7 @@
static void act_edit_expomenu(bContext *C, uiLayout *layout, void *arg_unused)
{
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "ACT_OT_extrapolation_type", "type", FCURVE_EXTRAPOLATE_CONSTANT);
uiItemEnumO(layout, NULL, 0, "ACT_OT_extrapolation_type", "type", FCURVE_EXTRAPOLATE_LINEAR);
}
Modified: branches/blender2.5/blender/source/blender/editors/space_graph/graph_header.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_graph/graph_header.c 2009-08-02 22:39:21 UTC (rev 22158)
+++ branches/blender2.5/blender/source/blender/editors/space_graph/graph_header.c 2009-08-02 22:56:42 UTC (rev 22159)
@@ -158,6 +158,7 @@
static void graph_edit_snapmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_snap", "type", GRAPHKEYS_SNAP_CFRA);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_snap", "type", GRAPHKEYS_SNAP_NEAREST_FRAME);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_snap", "type", GRAPHKEYS_SNAP_NEAREST_SECOND);
@@ -166,6 +167,7 @@
static void graph_edit_mirrormenu(bContext *C, uiLayout *layout, void *arg_unused)
{
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_mirror", "type", GRAPHKEYS_MIRROR_CFRA);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_mirror", "type", GRAPHKEYS_MIRROR_YAXIS);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_mirror", "type", GRAPHKEYS_MIRROR_XAXIS);
@@ -174,6 +176,7 @@
static void graph_edit_handlesmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_handle_type", "type", HD_FREE);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_handle_type", "type", HD_AUTO);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_handle_type", "type", HD_VECT);
@@ -183,6 +186,7 @@
static void graph_edit_ipomenu(bContext *C, uiLayout *layout, void *arg_unused)
{
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_interpolation_type", "type", BEZT_IPO_CONST);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_interpolation_type", "type", BEZT_IPO_LIN);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_interpolation_type", "type", BEZT_IPO_BEZ);
@@ -190,6 +194,7 @@
static void graph_edit_expomenu(bContext *C, uiLayout *layout, void *arg_unused)
{
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_extrapolation_type", "type", FCURVE_EXTRAPOLATE_CONSTANT);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_extrapolation_type", "type", FCURVE_EXTRAPOLATE_LINEAR);
}
More information about the Bf-blender-cvs
mailing list