Skip to content
Curtis Holt edited this page Oct 4, 2020 · 2 revisions

Modes

set_mode(ref, newmode)

Sets the mode for the provided ref object. newmode is expected to be a string.

  • Find a list of all possible newmode values here. If you do not want to use these string values, then convenience functions are available, as outlined below.

Convenience functions:

  • set_object_mode(ref) <- Sets to object mode.
  • set_edit_mode(ref) <- Sets to edit mode.
  • edit_mode(ref) <- Sets to edit mode.
  • set_sculpt_mode(ref) <- Sets to sculpt mode.
  • sculpt_mode(ref) <- Sets to sculpt mode.
  • set_vertex_paint_mode(ref) <- Sets to vertex paint mode.
  • vertex_paint_mode(ref) <- Sets to vertex paint mode.
  • set_weight_paint_mode(ref) <- Sets to weight paint mode.
  • weight_paint_mode(ref) <- Sets to weight paint mode.
  • set_texture_paint_mode(ref) <- Sets to texture paint mode.
  • texture_paing_mode(ref) <- Sets to texture paint mode.

get_mode()

Returns the value of bpy.context.mode.

Clone this wiki locally