forked from bartvdbraak/blender
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.
This commit is contained in:
parent
05a97747dc
commit
e05474d52f
@ -5731,6 +5731,14 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb)
|
||||
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:
|
||||
|
@ -167,6 +167,7 @@ static void act_edit_transformmenu(bContext *C, uiLayout *layout, void *arg_unus
|
||||
|
||||
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_snapmenu(bContext *C, uiLayout *layout, void *arg_unused)
|
||||
|
||||
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_mirrormenu(bContext *C, uiLayout *layout, void *arg_unused)
|
||||
|
||||
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_handlesmenu(bContext *C, uiLayout *layout, void *arg_unused
|
||||
|
||||
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_ipomenu(bContext *C, uiLayout *layout, void *arg_unused)
|
||||
|
||||
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);
|
||||
}
|
||||
|
@ -158,6 +158,7 @@ static void graph_edit_transformmenu(bContext *C, uiLayout *layout, void *arg_un
|
||||
|
||||
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_snapmenu(bContext *C, uiLayout *layout, void *arg_unused)
|
||||
|
||||
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_mirrormenu(bContext *C, uiLayout *layout, void *arg_unuse
|
||||
|
||||
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_handlesmenu(bContext *C, uiLayout *layout, void *arg_unus
|
||||
|
||||
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_ipomenu(bContext *C, uiLayout *layout, void *arg_unused)
|
||||
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user