diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2012-11-21 03:35:03 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2012-11-21 03:35:03 +0400 |
commit | 1b13f4428bba33cafa3c71904afed50871e4415f (patch) | |
tree | cb05a6caad5044dc85f910c77941cd446a20bc23 /source/blender/editors/space_graph/graph_buttons.c | |
parent | 622196113a2a2b342bd884e8aa39404ed46c9bb3 (diff) |
Debug value in degrees (under parenthesis) for rotation driver variables
Specifically the Rotational Difference and XYZ Rotation Transform Channel
Feature requested during BlenderPRO 2012 (Brazilian Blender Conference)
and coded during my flight back :)
Reviewed by Joshua Leung(Aligorith)
Diffstat (limited to 'source/blender/editors/space_graph/graph_buttons.c')
-rw-r--r-- | source/blender/editors/space_graph/graph_buttons.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index 8bb57a32090..67b427daa9c 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -714,7 +714,14 @@ static void graph_panel_drivers(const bContext *C, Panel *pa) row = uiLayoutRow(box, TRUE); uiItemL(row, IFACE_("Value:"), ICON_NONE); - BLI_snprintf(valBuf, sizeof(valBuf), "%.3f", dvar->curval); + if ((dvar->type == DVAR_TYPE_ROT_DIFF) || + (dvar->type == DVAR_TYPE_TRANSFORM_CHAN && + dvar->targets[0].transChan >= DTAR_TRANSCHAN_ROTX && + dvar->targets[0].transChan < DTAR_TRANSCHAN_SCALEX)) + BLI_snprintf(valBuf, sizeof(valBuf), "%.3f (%4.1f°)", dvar->curval, RAD2DEGF(dvar->curval)); + else + BLI_snprintf(valBuf, sizeof(valBuf), "%.3f", dvar->curval); + uiItemL(row, valBuf, ICON_NONE); } } |