[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52415] trunk/blender/source/blender/ editors/space_graph/graph_buttons.c: Debug value in degrees ( under parenthesis) for rotation driver variables
Dalai Felinto
dfelinto at gmail.com
Wed Nov 21 00:35:11 CET 2012
Revision: 52415
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52415
Author: dfelinto
Date: 2012-11-20 23:35:03 +0000 (Tue, 20 Nov 2012)
Log Message:
-----------
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)
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_graph/graph_buttons.c
Modified: trunk/blender/source/blender/editors/space_graph/graph_buttons.c
===================================================================
--- trunk/blender/source/blender/editors/space_graph/graph_buttons.c 2012-11-20 20:45:04 UTC (rev 52414)
+++ trunk/blender/source/blender/editors/space_graph/graph_buttons.c 2012-11-20 23:35:03 UTC (rev 52415)
@@ -714,7 +714,14 @@
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);
}
}
More information about the Bf-blender-cvs
mailing list