WorkSpaceTool(bpy_struct)
base class — bpy_struct
- class bpy.types.WorkSpaceTool(bpy_struct)
- brush_type
If the tool uses brushes and is limited to a specific brush type, the identifier of the brush type (default
'DEFAULT', readonly)- Type:
Literal[‘DEFAULT’]
- has_datablock
(default False, readonly)
- Type:
bool
- idname
(default “”, never None)
- Type:
str
- idname_fallback
(default “”, never None)
- Type:
str
- index
(in [-inf, inf], default 0, readonly)
- Type:
int
- mode
(default
'DEFAULT', readonly)- Type:
Literal[‘DEFAULT’]
- space_type
(default
'EMPTY', readonly)- Type:
Literal[Space Type Items]
- use_brushes
(default False, readonly)
- Type:
bool
- use_paint_canvas
Does this tool use a painting canvas (default False, readonly)
- Type:
bool
- widget
(default “”, readonly, never None)
- Type:
str
- setup(idname, *, cursor='DEFAULT', keymap='', gizmo_group='', brush_type='', data_block='', operator='', index=0, options={}, idname_fallback='', keymap_fallback='')
Set the tool settings
- Parameters:
idname (str) – Identifier, (never None)
cursor (Literal[Window Cursor Items]) – cursor, (optional)
keymap (str) – Key Map, (optional, never None)
gizmo_group (str) – Gizmo Group, (optional, never None)
brush_type (str) – Brush Type, Limit this tool to a specific type of brush (optional)
data_block (str) – Data Block, (optional, never None)
operator (str) – Operator, (optional, never None)
index (int) – Index, (in [-inf, inf], optional)
options (set[Literal['KEYMAP_FALLBACK', 'USE_BRUSHES']]) –
Tool Options, (optional)
KEYMAP_FALLBACKFallback.USE_BRUSHESUses Brushes – Allow this tool to use brushes via the asset system.
idname_fallback (str) – Fallback Identifier, (optional, never None)
keymap_fallback (str) – Fallback Key Map, (optional, never None)
- operator_properties(operator)
operator_properties
- Parameters:
operator (str) – (never None)
- Returns:
(never None)
- Return type:
- gizmo_group_properties(group)
gizmo_group_properties
- Parameters:
group (str) – (never None)
- Returns:
(never None)
- Return type:
- refresh_from_context()
refresh_from_context
- classmethod bl_rna_get_subclass(id, default=None, /)
- Parameters:
id (str) – The RNA type identifier.
- Returns:
The RNA type or default when not found.
- Return type:
- classmethod bl_rna_get_subclass_py(id, default=None, /)
- Parameters:
id (str) – The RNA type identifier.
- Returns:
The class or default when not found.
- Return type:
type