I tried to add driver to Sphere's RotateX and link it with Cube's LocationX.

However, as shown in the image below, the driver value is 4.651, but the Sphere RotateY is 266.

The value of the driver will be regarded as radians without permission.

I created and tried the following Expression and it worked correctly, is this method recommended by Blender?

var * (3.1415/180)

• I don't know why it uses radians here, as it displays degrees, I guess underneath the units system it uses radians and this must be what drivers act on. It is quite annoying and unintuitive.
– Moog
Nov 29, 2019 at 21:17
• @Merlin scene > units > rotation is set to display degrees by default. (Which makes perfect sense, since multiples / fractions of 360 is easier to visualize than those of pi) The standard python math module is available to drivers. Using sin(value) will give the expected result with a radian input value. Same with numpy. No guessing needed, blender uses radians under the hood. Once this is known it's really not that difficult. Nov 30, 2019 at 2:51
• @batFINGER thanks, I don't have a problem with radians per se but with entering a value as a driver doesn't honour the units. If for example I enter a driver with #frame / 360, one would expect it to revolve at 1 degree per frame but it doesn't, in fact tests show it as deciframes per radian or something weird. I understand the technical challenge that it presents, but intuition would observe that units should be in the chosen system.
– Moog
Nov 30, 2019 at 10:27

It's correct that the value is in radians. Blender uses radians for angles internally, since this is common practice for the calculation of trigonometric functions. The conversion to degree is only for display purposes in the user interface.

The same situation can be seen in the Python API. Assuming that you have an object named 'Cube' in your scene which is rotated 180° around the x-axis. When accessing the Euler rotation

bpy.data.objects["Cube"].rotation_euler.x


you will see that it returns 3.1415927410125732 which is a rough approximation of $$\pi$$.

This was previously asked on the bug tracker in T29797.

• Maybe a mention or picture of scene > units > rotation Nov 30, 2019 at 2:20
• The displayed unit for the angles can be changed in Scene Properties > Units as shown in this screenshot. However since this impact how the driver handles the value, I don't think this is really relevant. Nov 30, 2019 at 10:42
• Since the math module is loaded for the driver expression (when Python restrictions are disabled) you can also use radians(var) if you want var to be treated as angle in degree and convert it to radians. Nov 30, 2019 at 10:47
• '...rough approximation...' :) Nov 30, 2019 at 10:48
• The unit can be changed\? Good to know. , The assumption to this question is that the values should match. if the unit is set to radians the values do ofcourse match, Matching expectation. Suggested as a visual aid re first paragraph above. Nov 30, 2019 at 11:24