UI: Small Changes to Graph Editor Active Vertex Panel
- X / Y value orders are all consistent, between handles and the keyframe. - Values are labeled consistently, with just "Frame" and "Value" - The more important type property that can affect the others comes first. - The "type" property provides nice visual separation between the handle properties. Reviewed By: sybren, billreynish Differential Revision: https://developer.blender.org/D7738
This commit is contained in:
@@ -423,8 +423,25 @@ static void graph_panel_key_properties(const bContext *C, Panel *panel)
|
|||||||
col = uiLayoutColumn(layout, true);
|
col = uiLayoutColumn(layout, true);
|
||||||
/* keyframe itself */
|
/* keyframe itself */
|
||||||
{
|
{
|
||||||
|
uiItemL_respect_property_split(col, IFACE_("Key Frame"), ICON_NONE);
|
||||||
|
but = uiDefButR(block,
|
||||||
|
UI_BTYPE_NUM,
|
||||||
|
B_REDR,
|
||||||
|
"",
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
but_max_width,
|
||||||
|
UI_UNIT_Y,
|
||||||
|
&bezt_ptr,
|
||||||
|
"co",
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
-1,
|
||||||
|
-1,
|
||||||
|
NULL);
|
||||||
|
|
||||||
uiItemL_respect_property_split(col, IFACE_("Key Value"), ICON_NONE);
|
uiItemL_respect_property_split(col, IFACE_("Value"), ICON_NONE);
|
||||||
but = uiDefButR(block,
|
but = uiDefButR(block,
|
||||||
UI_BTYPE_NUM,
|
UI_BTYPE_NUM,
|
||||||
B_REDR,
|
B_REDR,
|
||||||
@@ -444,23 +461,6 @@ static void graph_panel_key_properties(const bContext *C, Panel *panel)
|
|||||||
UI_but_func_set(but, graphedit_activekey_update_cb, fcu, bezt);
|
UI_but_func_set(but, graphedit_activekey_update_cb, fcu, bezt);
|
||||||
UI_but_unit_type_set(but, unit);
|
UI_but_unit_type_set(but, unit);
|
||||||
|
|
||||||
uiItemL_respect_property_split(col, IFACE_("Frame"), ICON_NONE);
|
|
||||||
but = uiDefButR(block,
|
|
||||||
UI_BTYPE_NUM,
|
|
||||||
B_REDR,
|
|
||||||
"",
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
but_max_width,
|
|
||||||
UI_UNIT_Y,
|
|
||||||
&bezt_ptr,
|
|
||||||
"co",
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
-1,
|
|
||||||
-1,
|
|
||||||
NULL);
|
|
||||||
UI_but_func_set(but, graphedit_activekey_update_cb, fcu, bezt);
|
UI_but_func_set(but, graphedit_activekey_update_cb, fcu, bezt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -468,47 +468,7 @@ static void graph_panel_key_properties(const bContext *C, Panel *panel)
|
|||||||
if ((prevbezt) && (prevbezt->ipo == BEZT_IPO_BEZ)) {
|
if ((prevbezt) && (prevbezt->ipo == BEZT_IPO_BEZ)) {
|
||||||
|
|
||||||
col = uiLayoutColumn(layout, true);
|
col = uiLayoutColumn(layout, true);
|
||||||
|
uiItemL_respect_property_split(col, IFACE_("Left Handle Type"), ICON_NONE);
|
||||||
uiItemL_respect_property_split(col, IFACE_("Left Handle X"), ICON_NONE);
|
|
||||||
but = uiDefButR(block,
|
|
||||||
UI_BTYPE_NUM,
|
|
||||||
B_REDR,
|
|
||||||
"",
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
but_max_width,
|
|
||||||
UI_UNIT_Y,
|
|
||||||
&bezt_ptr,
|
|
||||||
"handle_left",
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
-1,
|
|
||||||
-1,
|
|
||||||
NULL);
|
|
||||||
UI_but_func_set(but, graphedit_activekey_left_handle_coord_cb, fcu, bezt);
|
|
||||||
|
|
||||||
uiItemL_respect_property_split(col, IFACE_("Y"), ICON_NONE);
|
|
||||||
but = uiDefButR(block,
|
|
||||||
UI_BTYPE_NUM,
|
|
||||||
B_REDR,
|
|
||||||
"",
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
but_max_width,
|
|
||||||
UI_UNIT_Y,
|
|
||||||
&bezt_ptr,
|
|
||||||
"handle_left",
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
-1,
|
|
||||||
-1,
|
|
||||||
NULL);
|
|
||||||
UI_but_func_set(but, graphedit_activekey_left_handle_coord_cb, fcu, bezt);
|
|
||||||
UI_but_unit_type_set(but, unit);
|
|
||||||
|
|
||||||
uiItemL_respect_property_split(col, IFACE_("Type"), ICON_NONE);
|
|
||||||
but = uiDefButR(block,
|
but = uiDefButR(block,
|
||||||
UI_BTYPE_MENU,
|
UI_BTYPE_MENU,
|
||||||
B_REDR,
|
B_REDR,
|
||||||
@@ -526,6 +486,45 @@ static void graph_panel_key_properties(const bContext *C, Panel *panel)
|
|||||||
-1,
|
-1,
|
||||||
"Type of left handle");
|
"Type of left handle");
|
||||||
UI_but_func_set(but, graphedit_activekey_handles_cb, fcu, bezt);
|
UI_but_func_set(but, graphedit_activekey_handles_cb, fcu, bezt);
|
||||||
|
|
||||||
|
uiItemL_respect_property_split(col, IFACE_("Frame"), ICON_NONE);
|
||||||
|
but = uiDefButR(block,
|
||||||
|
UI_BTYPE_NUM,
|
||||||
|
B_REDR,
|
||||||
|
"",
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
but_max_width,
|
||||||
|
UI_UNIT_Y,
|
||||||
|
&bezt_ptr,
|
||||||
|
"handle_left",
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
-1,
|
||||||
|
-1,
|
||||||
|
NULL);
|
||||||
|
UI_but_func_set(but, graphedit_activekey_left_handle_coord_cb, fcu, bezt);
|
||||||
|
|
||||||
|
uiItemL_respect_property_split(col, IFACE_("Value"), ICON_NONE);
|
||||||
|
but = uiDefButR(block,
|
||||||
|
UI_BTYPE_NUM,
|
||||||
|
B_REDR,
|
||||||
|
"",
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
but_max_width,
|
||||||
|
UI_UNIT_Y,
|
||||||
|
&bezt_ptr,
|
||||||
|
"handle_left",
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
-1,
|
||||||
|
-1,
|
||||||
|
NULL);
|
||||||
|
UI_but_func_set(but, graphedit_activekey_left_handle_coord_cb, fcu, bezt);
|
||||||
|
UI_but_unit_type_set(but, unit);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* next handle - only if current is Bezier interpolation */
|
/* next handle - only if current is Bezier interpolation */
|
||||||
@@ -533,7 +532,26 @@ static void graph_panel_key_properties(const bContext *C, Panel *panel)
|
|||||||
/* NOTE: special update callbacks are needed on the coords here due to T39911 */
|
/* NOTE: special update callbacks are needed on the coords here due to T39911 */
|
||||||
|
|
||||||
col = uiLayoutColumn(layout, true);
|
col = uiLayoutColumn(layout, true);
|
||||||
uiItemL_respect_property_split(col, IFACE_("Right Handle X"), ICON_NONE);
|
uiItemL_respect_property_split(col, IFACE_("Right Handle Type"), ICON_NONE);
|
||||||
|
but = uiDefButR(block,
|
||||||
|
UI_BTYPE_MENU,
|
||||||
|
B_REDR,
|
||||||
|
NULL,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
but_max_width,
|
||||||
|
UI_UNIT_Y,
|
||||||
|
&bezt_ptr,
|
||||||
|
"handle_right_type",
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
-1,
|
||||||
|
-1,
|
||||||
|
"Type of right handle");
|
||||||
|
UI_but_func_set(but, graphedit_activekey_handles_cb, fcu, bezt);
|
||||||
|
|
||||||
|
uiItemL_respect_property_split(col, IFACE_("Frame"), ICON_NONE);
|
||||||
but = uiDefButR(block,
|
but = uiDefButR(block,
|
||||||
UI_BTYPE_NUM,
|
UI_BTYPE_NUM,
|
||||||
B_REDR,
|
B_REDR,
|
||||||
@@ -552,7 +570,7 @@ static void graph_panel_key_properties(const bContext *C, Panel *panel)
|
|||||||
NULL);
|
NULL);
|
||||||
UI_but_func_set(but, graphedit_activekey_right_handle_coord_cb, fcu, bezt);
|
UI_but_func_set(but, graphedit_activekey_right_handle_coord_cb, fcu, bezt);
|
||||||
|
|
||||||
uiItemL_respect_property_split(col, IFACE_("Y"), ICON_NONE);
|
uiItemL_respect_property_split(col, IFACE_("Value"), ICON_NONE);
|
||||||
but = uiDefButR(block,
|
but = uiDefButR(block,
|
||||||
UI_BTYPE_NUM,
|
UI_BTYPE_NUM,
|
||||||
B_REDR,
|
B_REDR,
|
||||||
@@ -571,25 +589,6 @@ static void graph_panel_key_properties(const bContext *C, Panel *panel)
|
|||||||
NULL);
|
NULL);
|
||||||
UI_but_func_set(but, graphedit_activekey_right_handle_coord_cb, fcu, bezt);
|
UI_but_func_set(but, graphedit_activekey_right_handle_coord_cb, fcu, bezt);
|
||||||
UI_but_unit_type_set(but, unit);
|
UI_but_unit_type_set(but, unit);
|
||||||
|
|
||||||
uiItemL_respect_property_split(col, IFACE_("Type"), ICON_NONE);
|
|
||||||
but = uiDefButR(block,
|
|
||||||
UI_BTYPE_MENU,
|
|
||||||
B_REDR,
|
|
||||||
NULL,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
but_max_width,
|
|
||||||
UI_UNIT_Y,
|
|
||||||
&bezt_ptr,
|
|
||||||
"handle_right_type",
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
-1,
|
|
||||||
-1,
|
|
||||||
"Type of right handle");
|
|
||||||
UI_but_func_set(but, graphedit_activekey_handles_cb, fcu, bezt);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Reference in New Issue
Block a user