Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_graph/graph_buttons.c')
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c12
1 files changed, 11 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..483348db18e 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -714,7 +714,17 @@ 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);
}
}