Blender V5.3
blender::bToolRef Struct Reference

#include <DNA_workspace_types.h>

Public Attributes

struct bToolRef * next = nullptr
struct bToolRef * prev = nullptr
char idname [64] = ""
char idname_fallback [64] = ""
char idname_pending [64] = ""
short tag = 0
short space_type = 0
int mode = 0
IDProperty * properties = nullptr
bToolRef_Runtime * runtime = nullptr

Detailed Description

Note
Stored per mode.

Definition at line 69 of file DNA_workspace_types.h.

Member Data Documentation

◆ idname

◆ idname_fallback

char blender::bToolRef::idname_fallback[64] = ""

Optionally use these when not interacting directly with the primary tools gizmo.

Definition at line 74 of file DNA_workspace_types.h.

Referenced by blender::WM_toolsystem_ref_set_from_runtime().

◆ idname_pending

char blender::bToolRef::idname_pending[64] = ""

A pending request to switch to a different tool, this will be performed as part of the areas tool initialization. (see #toolsystem_ref_set_by_id_pending).

Notes:

  • This can be used to synchronize tools between areas (if necessary).
  • If the tool doesn't exist, the exiting tool will left as is.
  • There is no need for a "fallback" version of this variable since activating the tool will also set its fallback, if it's defined.
  • This is not stored in the run-time because it's possible (for example) for a request to sync to another area isn't handled if the area isn't visible. So store this in the file, so the pending change can be performed when the area is shown.

Definition at line 90 of file DNA_workspace_types.h.

Referenced by blender::toolsystem_ref_set_by_id_pending(), blender::toolsystem_reinit_with_toolref(), and blender::WM_toolsystem_ref_set_from_runtime().

◆ mode

◆ next

struct bToolRef* blender::bToolRef::next = nullptr

Definition at line 70 of file DNA_workspace_types.h.

◆ prev

struct bToolRef * blender::bToolRef::prev = nullptr

Definition at line 70 of file DNA_workspace_types.h.

◆ properties

IDProperty* blender::bToolRef::properties = nullptr

Use for tool options, each group's name must match a tool name:

{"Tool Name": {"SOME_OT_operator": {...}, ..}, ..}

This is done since different tools may call the same operators with their own options.

Definition at line 112 of file DNA_workspace_types.h.

Referenced by blender::BKE_workspace_tool_remove(), blender::WM_toolsystem_ref_properties_ensure_idprops(), blender::WM_toolsystem_ref_properties_get_idprops(), blender::workspace_blend_read_data(), and blender::workspace_blend_write().

◆ runtime

◆ space_type

◆ tag

short blender::bToolRef::tag = 0

Use to avoid initializing the same tool multiple times.

Definition at line 93 of file DNA_workspace_types.h.

Referenced by blender::WM_toolsystem_reinit_all(), and blender::WM_toolsystem_unlink_all().


The documentation for this struct was generated from the following file: