Blender
V3.3
|
#include <stdio.h>
#include "BLI_ghash.h"
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "BKE_main.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "MEM_guardedalloc.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_prototypes.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_screen.h"
#include "wm.h"
#include "wm_gizmo_intern.h"
#include "wm_gizmo_wmapi.h"
Go to the source code of this file.
Gizmo Type Append | |
| |
static GHash * | global_gizmotype_hash = NULL |
const wmGizmoType * | WM_gizmotype_find (const char *idname, bool quiet) |
void | WM_gizmotype_iter (GHashIterator *ghi) |
static wmGizmoType * | wm_gizmotype_append__begin (void) |
static void | wm_gizmotype_append__end (wmGizmoType *gzt) |
void | WM_gizmotype_append (void(*gtfunc)(struct wmGizmoType *)) |
void | WM_gizmotype_append_ptr (void(*gtfunc)(struct wmGizmoType *, void *), void *userdata) |
void | WM_gizmotype_free_ptr (wmGizmoType *gzt) |
static void | gizmotype_unlink (bContext *C, Main *bmain, wmGizmoType *gzt) |
void | WM_gizmotype_remove_ptr (bContext *C, Main *bmain, wmGizmoType *gzt) |
bool | WM_gizmotype_remove (bContext *C, Main *bmain, const char *idname) |
static void | wm_gizmotype_ghash_free_cb (wmGizmoType *gzt) |
void | wm_gizmotype_free (void) |
void | wm_gizmotype_init (void) |
|
static |
C | May be NULL. |
Definition at line 120 of file wm_gizmo_type.c.
References blender::compositor::area(), BLI_assert, C, ED_region_tag_redraw_editor_overlays(), ListBase::first, wmGizmoGroup::gizmos, wmGizmoMap::groups, LISTBASE_FOREACH, wmGizmoGroup::next, wmGizmoGroup::parent_gzmap, Main::screens, and WM_gizmo_unlink().
Referenced by WM_gizmotype_remove_ptr().
void WM_gizmotype_append | ( | void(*)(struct wmGizmoType *) | gtfunc | ) |
Definition at line 93 of file wm_gizmo_type.c.
References wm_gizmotype_append__begin(), and wm_gizmotype_append__end().
Referenced by ED_gizmotypes_arrow_3d(), ED_gizmotypes_blank_3d(), ED_gizmotypes_button_2d(), ED_gizmotypes_cage_2d(), ED_gizmotypes_cage_3d(), ED_gizmotypes_dial_3d(), ED_gizmotypes_move_3d(), ED_gizmotypes_preselect_3d(), ED_gizmotypes_primitive_3d(), ED_gizmotypes_snap_3d(), and view3d_widgets().
|
static |
Definition at line 73 of file wm_gizmo_type.c.
References BLENDER_RNA, BLT_I18NCONTEXT_OPERATOR_DEFAULT, MEM_callocN, ot, RNA_def_struct_ptr(), RNA_def_struct_translation_context(), wmGizmoType::srna, wmOperatorType::srna, and wmOperatorType::translation_context.
Referenced by WM_gizmotype_append(), and WM_gizmotype_append_ptr().
|
static |
Definition at line 84 of file wm_gizmo_type.c.
References BLENDER_RNA, BLI_assert, BLI_ghash_insert(), global_gizmotype_hash, wmGizmoType::idname, RNA_def_struct_identifier(), wmGizmoType::srna, and wmGizmoType::struct_size.
Referenced by WM_gizmotype_append(), and WM_gizmotype_append_ptr().
void WM_gizmotype_append_ptr | ( | void(*)(struct wmGizmoType *, void *) | gtfunc, |
void * | userdata | ||
) |
Definition at line 100 of file wm_gizmo_type.c.
References wm_gizmotype_append__begin(), and wm_gizmotype_append__end().
const wmGizmoType* WM_gizmotype_find | ( | const char * | idname, |
bool | quiet | ||
) |
Definition at line 45 of file wm_gizmo_type.c.
References BLI_ghash_lookup(), global_gizmotype_hash, and NULL.
Referenced by gizmo_mesh_bisect_setup(), gizmo_mesh_extrude_setup(), gizmo_mesh_placement_setup(), gizmo_mesh_spin_init_setup(), gizmo_mesh_spin_redo_setup(), gizmogroup2d_init(), gizmogroup2d_resize_init(), gizmogroup2d_rotate_init(), gizmogroup_init(), ruler_item_add(), WIDGETGROUP_armature_spline_setup(), WIDGETGROUP_camera_setup(), WIDGETGROUP_mesh_preselect_edgering_setup(), WIDGETGROUP_mesh_preselect_elem_setup(), blender::ed::space_node::WIDGETGROUP_node_corner_pin_setup(), WIDGETGROUP_ruler_setup(), WIDGETGROUP_xform_cage_setup(), WIDGETGROUP_xform_shear_setup(), WM_gizmo_new(), WM_gizmo_properties_create(), and WM_gizmotype_remove_ptr().
Definition at line 175 of file wm_gizmo_type.c.
References BLI_ghash_free(), global_gizmotype_hash, NULL, and wm_gizmotype_ghash_free_cb().
Referenced by WM_exit_ex().
void WM_gizmotype_free_ptr | ( | struct wmGizmoType * | gzt | ) |
Free but don't remove from GHash.
Definition at line 107 of file wm_gizmo_type.c.
References BLI_freelistN(), wmGizmoType::idname, MEM_freeN, wmGizmoType::rna_ext, ExtensionRNA::srna, and wmGizmoType::target_property_defs.
Referenced by wm_gizmotype_ghash_free_cb().
|
static |
Definition at line 170 of file wm_gizmo_type.c.
References WM_gizmotype_free_ptr().
Referenced by wm_gizmotype_free().
Called on initialize WM_init().
Definition at line 181 of file wm_gizmo_type.c.
References BLI_ghash_str_new_ex(), and global_gizmotype_hash.
Referenced by WM_init().
void WM_gizmotype_iter | ( | struct GHashIterator * | ghi | ) |
Caller must free.
Definition at line 68 of file wm_gizmo_type.c.
References BLI_ghashIterator_init(), and global_gizmotype_hash.
Definition at line 157 of file wm_gizmo_type.c.
References BLI_ghash_lookup(), C, global_gizmotype_hash, NULL, and WM_gizmotype_remove_ptr().
void WM_gizmotype_remove_ptr | ( | bContext * | C, |
Main * | bmain, | ||
wmGizmoType * | gzt | ||
) |
Definition at line 148 of file wm_gizmo_type.c.
References BLI_assert, BLI_ghash_remove(), C, gizmotype_unlink(), global_gizmotype_hash, wmGizmoType::idname, NULL, and WM_gizmotype_find().
Referenced by WM_gizmotype_remove().
Definition at line 43 of file wm_gizmo_type.c.
Referenced by wm_gizmotype_append__end(), WM_gizmotype_find(), wm_gizmotype_free(), wm_gizmotype_init(), WM_gizmotype_iter(), WM_gizmotype_remove(), and WM_gizmotype_remove_ptr().