Angle UI element

The Angle is a UI Control which can be used to draw a circular clock-like element representing an angle in degrees or radians.

The syntax is:

Angle <name> [caption] [color:<color>] [degrees:<float>] [bitmap:<bitmap>] [diameter:<float>] [StartDegrees:<integer>] [StartRadians:<integer>] [dir:<#cw|#ccw>] [range:<point3>] [    radians:<float> ] [ applyUIScaling:<boolean> ]

Properties

<Angle>.color color default:(color 0 0 255)   

Get/set the angle fill-in color. Setting the color turns off the Bitmap fill.

<Angle>.bitmap Bitmap default:undefined 

Get/set the angle fill-in Bitmap. Setting the Bitmap turns off the color fill.

<Angle>.diameter Integer default:64 

Get/set the full diameter of the control, synonymous to .width and .height.

<Angle>.degrees Float default:0.0 

Get/set the current angle in degrees.

<Angle>.radians Float default:0.0 

Get/set the current angle in radians.

<Angle>.StartDegrees Integerdefault:0 

Get/set the start angle in degrees.

<Angle>.StartRadians Integerdefault:0 

Get/set the start angle in radians.

<Angle>.dir Name default:#ccw 

Get/set the angle direction. Possible values are #cw for Clockwise and #ccw for Counter-Clockwise.

<Angle>.range 

Get/set the angle range as a point3 value. The first component defines the min. value, the second is the max. value, the third is the current value. All three values are in degrees.

If min. and max. values have the same sign, click and move in angle UI will give result with the same sign.

If min. and max. values have different signs, shift or ctrl click will give negative result, click will give positive result.

If range is specified, and StartDegrees and StartRadians are not, the z component of range is used as the StartDegrees.

Events

on <Angle> changed <arg> do <expr> 

Called when the angle is being changed . <arg> is the current degrees value.

on <Angle> rightClick do <expr> 

Called when the Angle control is right-clicked.

If the handler is not defined, right-clicking the Angle control resets its value.

Available in 3ds Max 2010 and higher.

EXAMPLE

   rollout test "Angle Test"
   (
   Angle ang1 "Angle 1" diameter:50 align:#left range:[-180,180,45] startdegrees:0 dir:#cw color:red across:3
   Angle ang2 "Angle 2" diameter:50 align:#center range:[0,270,90] startdegrees:90 dir:#ccw color:green
   Angle ang3 "Angle 3" diameter:50 align:#right range:[0,360,120] startdegrees:270 dir:#cw color:blue
   spinner val1 fieldwidth:40 align:#left across:3 range:[-180,180,45]
   spinner val2 fieldwidth:40 align:#center range:[0,270,90]
   spinner val3 fieldwidth:40 align:#right range:[0,360,120]
   on ang1 changed val do val1.value = val
   on ang2 changed val do val2.value = val
   on ang3 changed val do val3.value = val
   on val1 changed val do ang1.degrees = val
   on val2 changed val do ang2.degrees= val
   on val3 changed val do ang3.degrees= val
   )
   createdialog test 200 110