Gizmo API documentation - missing infos

Hi,

I was wondering if a dev can update the API documentation for the Gizmo. the list of the types we can use is missing and some information for each type is missing too. I made a list for myself, maybe it can help someone else.

Thanks !

GizmoType :

  • GIZMO_GT_arrow_2d
    length : arrow length
    angle : do nothing

  • GIZMO_GT_arrow_3d
    length : arrow length
    draw_options : {‘STEM’} do nothing
    draw_style : (‘NORMAL’, ‘CROSS’, ‘BOX’, ‘CONE’)
    transform : {‘INVERT’, ‘CONSTRAIN’} ‘CONSTRAIN’ crash Blender
    aspect : (flt, flt) do nothing

  • GIZMO_GT_blank_3d

  • GIZMO_GT_cage_2d
    draw_style : (‘BOX’, ‘CIRCLE’) Box = Open cage // Nothing = Closed Cage // Circle = Do nothing
    draw_options : (‘XFORM_CENTER_HANDLE’) do nothing : Not working, should work with the ‘BOX’ draw_style for open or closed cage.

  • GIZMO_GT_cage_3d
    draw_style : (‘BOX’, ‘CIRCLE’) Box = 3D cage 1 handle// Nothing = 3D Cage multiple handles // Circle = Do nothing
    draw_options : (‘XFORM_CENTER_HANDLE’) do nothing

  • GIZMO_GT_dial_3d
    draw_options : (‘CLIP’, ‘FILL’, ‘FILL_SELECT’, ‘ANGLE_MIRROR’, ‘ANGLE_START_Y’, ‘ANGLE_VALUE’)
    wrap_angle : Bool True : add offset value indefinitely // False : Only add for one turn
    arc_inner_factor : 0.5 Add inner circle in middle // 1 = size of outer circle
    arc_partial_angle : Show Partial Dial
    incremental_angle : flt Angle to snap in steps
    click_value : Value to use for a single click action

  • GIZMO_GT_button_2d
    draw_options : {‘OUTLINE’, ‘BACKDROP’, ‘HELPLINE’}

  • GIZMO_GT_move_3d
    draw_style : (‘RING_2D’, ‘CROSS_2D’)
    draw_options : {‘FILL’, ‘FILL_SELECT’, ‘ALIGN_VIEW’}
    use_snap : Bool

  • GIZMO_GT_primitive_3d
    draw_style = “PLANE” only plane

  • GIZMO_GT_value_2d
    ??

Hi thank you for speaking out on this.

Can you copy this into a bug report here:

https://developer.blender.org/maniphest/task/edit/form/default/?project=PHID-PROJ-c4nvvrxuczix2326vlti

Done : https://developer.blender.org/T68709

Thanks !

For someone new to Blender and its source code, would it be possible to link to where you found these? Is this a good place to look?

Yes, that’s exactly here !