Blender  V3.3
gizmo_utils.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
9 #include <string.h>
10 
11 #include "BLI_utildefines.h"
12 
13 #include "BKE_context.h"
14 
15 #include "DNA_workspace_types.h"
16 
17 #include "WM_api.h"
18 #include "WM_toolsystem.h"
19 #include "WM_types.h"
20 
21 #include "ED_gizmo_utils.h"
22 
24  wmGizmoGroupType *gzgt,
25  const char *idname)
26 {
27 #if 0
28  /* Causes selection to continue showing the last gizmo. */
30 #else
32  wmOperator *op = wm->operators.last;
33 #endif
34 
35  if (op == NULL || !STREQ(op->type->idname, idname)) {
37  return false;
38  }
39  return true;
40 }
41 
43  wmGizmoGroupType *gzgt,
44  const char *gzgt_idname)
45 {
47  if ((tref_rt == NULL) || !STREQ(gzgt_idname, tref_rt->gizmo_group)) {
51  if (gzgt->users == 0) {
53  }
54  return false;
55  }
56  return true;
57 }
58 
60 {
62 }
struct ScrArea * CTX_wm_area(const bContext *C)
Definition: context.c:738
struct wmWindowManager * CTX_wm_manager(const bContext *C)
Definition: context.c:713
#define STREQ(a, b)
#define C
Definition: RandGen.cpp:25
bool ED_gizmo_poll_or_unlink_delayed_from_tool(const bContext *C, wmGizmoGroupType *gzgt)
Definition: gizmo_utils.c:59
bool ED_gizmo_poll_or_unlink_delayed_from_operator(const bContext *C, wmGizmoGroupType *gzgt, const char *idname)
Definition: gizmo_utils.c:23
bool ED_gizmo_poll_or_unlink_delayed_from_tool_ex(const bContext *C, wmGizmoGroupType *gzgt, const char *gzgt_idname)
Definition: gizmo_utils.c:42
static void area(int d1, int d2, int e1, int e2, float weights[2])
void * last
Definition: DNA_listBase.h:31
const char * idname
struct wmGizmoMapType_Params gzmap_params
const char * idname
Definition: WM_types.h:890
struct wmOperatorType * type
void WM_gizmo_group_type_unlink_delayed_ptr(wmGizmoGroupType *gzgt)
void WM_gizmo_group_unlink_delayed_ptr_from_space(wmGizmoGroupType *gzgt, wmGizmoMapType *gzmap_type, ScrArea *area)
wmGizmoMapType * WM_gizmomaptype_ensure(const struct wmGizmoMapType_Params *gzmap_params)
wmOperator * WM_operator_last_redo(const bContext *C)
struct bToolRef_Runtime * WM_toolsystem_runtime_from_context(struct bContext *C)
Definition: wm_toolsystem.c:77